Re: pg_restore - cannot to restore blobs in dictionary format from older pg dumps
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-06-08T20:38:40Z
Lists: pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes: > It is a problem of PostgreSQL 11 - the pg_dump from PostgreSQL 12 sets > filename correctly, > and pg_restore doesn't need patching (in this case). Yeah. It looks like the actual filename was always "blobs.toc" before v17, but prior to 548e50976 pg_backup_directory.c's _ArchiveEntry put the wrong filename into tctx->filename. That had no visible effect, because _StartBlobs and _LoadBlobs ignored that field and hard-wired the filename to use. Then in a45c78e32 I made those functions rely on tctx->filename instead of hard-wiring "blobs.toc", so they fail on archives made by versions before 548e50976. I think your patch is about the right thing to do, although I'm inclined to check for K_VERS_1_14 which is closer to when the fix was made. regards, tom lane
Commits
-
pg_restore: fix incompatibility with old directory-format dumps.
- 839802792f01 17.6 landed
- 166b4f4560d6 18.0 landed
-
Rearrange pg_dump's handling of large objects for better efficiency.
- a45c78e3284b 17.0 cited