Re: list tablespaces named in custom format dump

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Rob Sargent <robjsargent(at)gmail(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: list tablespaces named in custom format dump
Date: 2022-05-23 18:10:49
Message-ID: e34b63bd-7d01-dab1-4d70-975bb39c4b10@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2022-05-23 18:15:02 Re: list tablespaces named in custom format dump
Previous Message Rob Sargent 2022-05-23 18:04:30 Re: list tablespaces named in custom format dump