Skip to content

Commit b2f2fdf

Browse files
author
Daniel Shelepanov
committed
[PBCKP-334] Unified segno code for any fork
In fact, any fork (not only MAIN_FORKNUM) can have multiple segments. tags: ptrack
1 parent 4a3d24b commit b2f2fdf

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

Diff for: ptrack.c

+4-8
Original file line numberDiff line numberDiff line change
@@ -345,15 +345,11 @@ ptrack_gather_filelist(List **filelist, char *path, Oid spcOid, Oid dbOid)
345345
if (!parse_filename_for_nontemp_relation(de->d_name, &oidchars, &pfl->forknum))
346346
continue;
347347

348-
/* Parse segno for main fork */
349-
if (pfl->forknum == MAIN_FORKNUM)
350-
{
351-
segpath = strstr(de->d_name, ".");
352-
pfl->segno = segpath != NULL ? atoi(segpath + 1) : 0;
353-
}
354-
else
355-
pfl->segno = 0;
348+
/* Parse segno */
349+
segpath = strstr(de->d_name, ".");
350+
pfl->segno = segpath != NULL ? atoi(segpath + 1) : 0;
356351

352+
/* Fill the pfl in */
357353
memcpy(oidbuf, de->d_name, oidchars);
358354
oidbuf[oidchars] = '\0';
359355
pfl->relnode.relNode = atooid(oidbuf);

0 commit comments

Comments
 (0)