Skip to content

Commit 0e164eb

Browse files
committed
Fix a pg_dump scenario for platforms where SEEK_CUR != 1.
POSIX allows such platforms. Given the lack of complaints, we may not currently test on such a platform. This is new in v18 (commit 7d5c83b), so no back-patch.
1 parent 73bdcfa commit 0e164eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2655,7 +2655,7 @@ WriteToc(ArchiveHandle *AH)
26552655
pg_fatal("unexpected TOC entry in WriteToc(): %d %s %s",
26562656
te->dumpId, te->desc, te->tag);
26572657

2658-
if (fseeko(AH->FH, te->defnLen, SEEK_CUR != 0))
2658+
if (fseeko(AH->FH, te->defnLen, SEEK_CUR) != 0)
26592659
pg_fatal("error during file seek: %m");
26602660
}
26612661
else if (te->defnDumper)

0 commit comments

Comments
 (0)