Repository navigation
v2.2.0
What's Changed
Archives written by libpgdump could not be read by pg_restore in directory or tar format, and archives rewritten in any format were rejected by pg_restore before PostgreSQL 12. Anyone writing archives should upgrade.
Fixed
- Directory and tar writers stored a NULL extra-TOC filename for entries with no data file. pg_dump writes an empty string, and pg_restore's
_ReadExtraToccallsstrlen()on it, so every directory or tar archive we wrote crashed pg_restore — includingpg_restore -l(#12) - Tar members were written in filename order. pg_restore reads tar archives sequentially and rejected data members that came before the member of an earlier TOC entry, failing restores partway with "restoring data out of order is not supported in this archive format" (#12)
- The directory writer renamed blob TOC files, which pg_restore 16 and earlier reject, and blob TOC filenames read from an archive are now rejected if they escape the output directory (#12)
read_string()collapsed empty strings to NULL. pg_dump writes""for fields such as an entry's owner and drop statement, and pg_restore before PostgreSQL 12 callsstrlen()on them with no NULL check, so rewritten archives segfaulted those versions in all three formats (#13)set_compression()left the archive version alone, so selecting lz4 or zstd on an archive older than 1.15 — the version pg_dump 15 and earlier writes — failed withUnsupportedCompression. It now raises the version to 1.15, which added nothing but the compression-algorithm byte (#13)
Added
tar::read_metadata()reads a tar archive's header and TOC while seeking past the data members.pgdump-tocuses it, and no longer refuses tar archives with "unsupported format: 3" (#13)- Compressed data support in
CustomReader::read_entry_reader()(#7), and apgdump-tocCLI for inspecting an archive's header and TOC (#8), both by @NickCrews
Changed
- Empty strings now read as
Some("")rather thanNone.Entryfields such asowner,drop_stmt, andtablespacecarry the distinction pg_dump makes between an empty string and NULL, so code matching onNonefor those fields may need updating - CI now tests against PostgreSQL 13 through 18, up from 16 through 18, and archives written by libpgdump are checked with a real
pg_restoreacross every format and compression algorithm
Internal
Timestamp,Blob, andArchiveDatamoved totypes.rs, withread_timestamp()/write_timestamp()deduplicated (#9), and per-chunk allocation removed from the data reader (#7), both by @NickCrews
Full Changelog: v2.1.0...v2.2.0