Improve pg_dump's checkSeek() function to verify the functioning of ftello
Tom Lane <tgl@sss.pgh.pa.us>
Improve pg_dump's checkSeek() function to verify the functioning of ftello as well as fseeko, and to not assume that fseeko(fp, 0, SEEK_CUR) proves anything. Also improve some related comments. Per my observation that the SEEK_CUR test didn't actually work on some platforms, and subsequent discussion with Robert Haas. Back-patch to 8.4. In earlier releases it's not that important whether we get the hasSeek test right, but with parallel restore it matters.
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/pg_dump/pg_backup_archiver.c | modified | +37 −18 |
| src/bin/pg_dump/pg_backup_custom.c | modified | +7 −5 |