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 e34b63bd-7d01-dab1-4d70-975bb39c4b10@aklaver.com
Whole thread Raw
In response to Re: list tablespaces named in custom format dump  (Rob Sargent <robjsargent@gmail.com>)
List pgsql-general
On 5/23/22 11:04 AM, Rob Sargent wrote:

> Thanks Adrian.  There's enough wiggle room in there for me to at least 
> try the restore. Linus file command tells me
> 
>     db.dump: PostgreSQL custom database dump - v1.13-0

The

pg_restore -l <custom_format_file>

command will show the relevant information at top of file so:

pg_restore -l pg14_test.out > toc.txt

head -n 15 toc.txt
;
; Archive created at 2022-05-23 10:24:23 PDT
;     dbname: test
;     TOC Entries: 745
;     Compression: -1
;     Dump Version: 1.14-0
;     Format: CUSTOM
;     Integer: 4 bytes
;     Offset: 8 bytes
;     Dumped from database version: 14.2
;     Dumped by pg_dump version: 14.2
;
;
; Selected TOC Entries:

> 
> That dump was from a version 10 server.  Any guess at how that "v1.13-0" 
> relates to the server version?  Dumps from the current pg14 server  say 
> "v1.14-0" so it looks to me like the dumps were done with v13 
> pg-restore.  This surprises me, but I do not manage the server.  Maybe 
> my dump file doesn't have anything pg14 restore can't handle.. we'll see

I have abused this on occasion and succeeded, though sometimes it 
involves some tweaks.

> 
> Thanks again, all.


-- 
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: Tom Lane
Date:
Subject: Re: list tablespaces named in custom format dump