Pavel Stehule <pavel.steh...@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