| From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
|---|---|
| To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: pg_restore - cannot to restore blobs in dictionary format from older pg dumps |
| Date: | 2025-06-08 19:00:48 |
| Message-ID: | CAFj8pRBYhuYF787bs22Tf6g8nFmFJgpz5VzSBiA_TF0P3ZChCQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi
> The problem is related to the commit a45c78e
>
> I am not sure if this is correct fix, but it fixed this issue
>
> diff --git a/src/bin/pg_dump/pg_backup_directory.c
> b/src/bin/pg_dump/pg_backup_directory.c
> index 21b00792a8a..16da4decbd0 100644
> --- a/src/bin/pg_dump/pg_backup_directory.c
> +++ b/src/bin/pg_dump/pg_backup_directory.c
> @@ -415,7 +415,15 @@ _LoadLOs(ArchiveHandle *AH, TocEntry *te)
> * now there can be multiple. We don't need to worry what version we
> are
> * reading though, because tctx->filename should be correct either way.
> */
> - setFilePath(AH, tocfname, tctx->filename);
> +
> + /*
> + * probably there is a bug in older releases (tested in Postgres 11).
> + * The filename is not correct - instead "blobs.toc" it is NNNN.dat.
>
+ */
> + if (AH->version < K_VERS_1_16)
> + setFilePath(AH, tocfname, "blobs.toc");
> + else
> + setFilePath(AH, tocfname, tctx->filename);
>
> CFH = ctx->LOsTocFH = InitDiscoverCompressFileHandle(tocfname,
> PG_BINARY_R);
>
> Regards
>
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).
Regards
Pavel
>
> Pavel
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2025-06-08 19:15:43 | Re: Non-reproducible AIO failure |
| Previous Message | Pavel Stehule | 2025-06-08 18:54:34 | Re: pg_restore - cannot to restore blobs in dictionary format from older pg dumps |