Re: pg_restore - cannot to restore blobs in dictionary format from older pg dumps - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_restore - cannot to restore blobs in dictionary format from older pg dumps
Date
Msg-id 230992.1749415120@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_restore - cannot to restore blobs in dictionary format from older pg dumps  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: pg_restore - cannot to restore blobs in dictionary format from older pg dumps
List 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



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Sanding down some edge cases for PL/pgSQL reserved words
Next
From: Tom Lane
Date:
Subject: Re: pg_restore - cannot to restore blobs in dictionary format from older pg dumps