Re: BUG #17863: Unable to restore dump 12.12 -> 15.2

From: Andrey Lizenko <lizenko79(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org, Daniel Gustafsson <daniel(at)yesql(dot)se>
Subject: Re: BUG #17863: Unable to restore dump 12.12 -> 15.2
Date: 2023-03-27 14:38:40
Message-ID: CADKuZZD6fKQxMrA8=ioe4YUqO0NmefdjjpDHiMOS5rMOCUQU_Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Sorry, have a typo here - files from №2 and №4 are the same

On Mon, 27 Mar 2023 at 16:36, Andrey Lizenko <lizenko79(at)gmail(dot)com> wrote:

> Workaround in few steps:
> 1. *12.12*
>
>> pg_dump -Fc -Z 9 -v -f ./<db_name>_20230322.dmp <db_name>
>
>
> 2. *12.12*
>
>> pg_restore --file=<db_name>_20230322.sql -vOx <db_name>_20230322.dmp
>
>
> 3. *15.2*
>
>> postgres(at)nerva:~$ psql
>> psql (15.2 (Ubuntu 15.2-1.pgdg20.04+1))
>> Type "help" for help.
>> postgres=# \c <db_name>
>> You are now connected to database " <db_name>" as user "postgres".
>
>
> 4. *15.2*
>
>> \i <db_name>_20230323.sql
>
>
>
> On Mon, 27 Mar 2023 at 11:17, Andrey Lizenko <lizenko79(at)gmail(dot)com> wrote:
>
>> If you use 12.12's pg_restore to convert the .dmp file to a text file
>>> (using
>>> the --file=somefile, instead of -h/-d), does that work?
>>
>>
>> (just to be sure, that it is not a typo)
>> The idea is to make a dump then start pg_restore in *12.12 to itself?*
>>
>> On Fri, 24 Mar 2023 at 22:27, Andres Freund <andres(at)anarazel(dot)de> wrote:
>>
>>> Hi,
>>>
>>> On 2023-03-22 21:42:56 +0000, PG Bug reporting form wrote:
>>> > 12.12
>>> > pg_dump -Fc -Z 9 -v -f ./<db_name>_20230322.dmp <db_name>
>>> >
>>> > 15.2
>>> > pg_restore -U <user_name> -h 127.0.0.1 -v -d ./<db_name>_20230322.dmp
>>> >
>>> > In short:
>>> > pg_restore: processing data for table "<db_name>.consensus_estimate"
>>> > pg_restore: error: could not uncompress data: (null)
>>>
>>> If you use 12.12's pg_restore to convert the .dmp file to a text file
>>> (using
>>> the --file=somefile, instead of -h/-d), does that work?
>>>
>>> Greetings,
>>>
>>> Andres Freund
>>>
>>>
>>>
>>
>> --
>> Regards, Andrei Lizenko
>>
>
>
> --
> Regards, Andrei Lizenko
>

--
Regards, Andrei Lizenko

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2023-03-27 14:43:13 Re: BUG #17870: Analyze on remote postgresql_fdw table never finish
Previous Message Andrey Lizenko 2023-03-27 14:36:16 Re: BUG #17863: Unable to restore dump 12.12 -> 15.2