8000 [PBCKP-334] Unified segno code for any fork · postgrespro/ptrack@b2f2fdf · GitHub
[go: up one dir, main page]

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 4a3d2
8000
4b commit b2f2fdf

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

ptrack.c

Lines changed: 4 additions & 8 deletions
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)
0