Skip to content

Commit 9654c32

Browse files
committed
weird compatibility with private edition.
Well, it looks ugly. But in reality one should not see files > 4GB in data folder. If one puts such file there, ptrack already will produce garbage.
1 parent 23b56d1 commit 9654c32

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ptrack.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ ptrack_filelist_getnext(PtScanCtx * ctx)
394394
ListCell *cell;
395395
char *fullpath;
396396
struct stat fst;
397-
off_t rel_st_size = 0;
397+
uint32_t rel_st_size = 0;
398398

399399
get_next:
400400

@@ -444,16 +444,16 @@ ptrack_filelist_getnext(PtScanCtx * ctx)
444444
goto get_next;
445445
}
446446

447-
if (fst.st_size == 0)
447+
rel_st_size = fst.st_size;
448+
449+
if (rel_st_size == 0)
448450
{
449451
elog(DEBUG3, "ptrack: skip empty file %s", fullpath);
450452

451453
/* But try the next one */
452454
goto get_next;
453455
}
454456

455-
rel_st_size = fst.st_size;
456-
457457
if (pfl->segno > 0)
458458
{
459459
ctx->relsize = pfl->segno * RELSEG_SIZE + rel_st_size / BLCKSZ;

0 commit comments

Comments
 (0)