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

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy