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
>

Reply via email to