summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Misch2025-06-03 18:18:52 +0000
committerNoah Misch2025-06-03 18:18:52 +0000
commit0e164eb9f43626dc9e31f4bae26eeb3e8422584a (patch)
tree99e39b077691027502da3473491d5e5ca0c05f50
parent73bdcfab35ec0a7eff1a5dd630cbad8e77054547 (diff)
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 7d5c83b4e90c7156655f98b7312a30ae5eeb4d27), so no back-patch.
-rw-r--r--src/bin/pg_dump/pg_backup_archiver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index 175fe9c4273..197c1295d93 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -2655,7 +2655,7 @@ WriteToc(ArchiveHandle *AH)
pg_fatal("unexpected TOC entry in WriteToc(): %d %s %s",
te->dumpId, te->desc, te->tag);
- if (fseeko(AH->FH, te->defnLen, SEEK_CUR != 0))
+ if (fseeko(AH->FH, te->defnLen, SEEK_CUR) != 0)
pg_fatal("error during file seek: %m");
}
else if (te->defnDumper)