Re: list tablespaces named in custom format dump - Mailing list pgsql-general

From Adrian Klaver
Subject Re: list tablespaces named in custom format dump
Date
Msg-id 6272f0ac-4faa-d86e-3f05-7736a4010b54@aklaver.com
Whole thread Raw
In response to Re: list tablespaces named in custom format dump  (Rob Sargent <robjsargent@gmail.com>)
Responses Re: list tablespaces named in custom format dump
List pgsql-general
On 5/23/22 10:19 AM, Rob Sargent wrote:
> On 5/23/22 11:07, Adrian Klaver wrote:
>> On 5/23/22 10:01 AM, Rob Sargent wrote:
>>> On 5/23/22 11:00, Adrian Klaver wrote:
>>>> On 5/23/22 9:54 AM, Rob Sargent wrote:
>>>>> On 5/23/22 10:50, Adrian Klaver wrote:
>>>>

>>
> This is great news.  I do have pg14.  I thought you had to dump with the 
> save version as restore

pg_dump and pg_restore are backwards compatible. The recommendation is 
to use the same version of pg_dump as the server you are dumping if the 
plan is use it as backup to restore to same version of server. If you 
are planning on restoring to newer version then use the newer version of 
pg_dump to dump the older server version e.g. version 14 pg_dump dumps 
version 12 Postgres server. Then use the newer version of pg_restore(14 
in this case) to restore to the Postgres 14 server.

For the purposes of this question using the 14 version of pg_restore is 
acceptable to get the information. Actually doing a restore to a 14 
version of the server with 12 version of a dump file may create problems 
as the 12 version of pg_dump may not include information needed by the 
newer server.


-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Rob Sargent
Date:
Subject: Re: list tablespaces named in custom format dump
Next
From: Rob Sargent
Date:
Subject: Re: list tablespaces named in custom format dump