pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Rob Sargent <robjsargent@gmail.com>
To: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: list tablespaces named in custom format dump
Date: Mon, 23 May 2022 10:07:04 -0700
Message-ID: <78db98f0-0e1b-d744-25fd-5390d720e2b8@aklaver.com> (raw)
In-Reply-To: <2904d7b9-3bf0-fee0-f043-c8f904fc6c1d@gmail.com>
References: <29112dbe-b1bd-afe9-63d3-f7ba50ece939@gmail.com>
	<9013c93e-3f01-f40a-4e14-7b1c9d7b065d@aklaver.com>
	<caaf8cd5-5728-6b23-e74d-cc25d89b3a58@gmail.com>
	<55cf2ca7-b431-b5bc-1b86-b6c8726ac4c5@aklaver.com>
	<2904d7b9-3bf0-fee0-f043-c8f904fc6c1d@gmail.com>

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:
>>
>>> Roger that, but does the dump of a database name the tablespaces from 
>>> which the objects were retrieved? And if so, is that accessible?
>>>
>>
>>
>> https://www.postgresql.org/docs/14/app-pgrestore.html
>>
>> "--no-tablespaces
>>
>>     Do not output commands to select tablespaces. With this option, 
>> all objects will be created in whichever tablespace is the default 
>> during restore.
>> "
>>
>> Would indicate it does. I don't have cluster set up with tablespaces 
>> to test, but I would try:
>>
>> pg_restore -l <custom_format_file>
>>
>> This will produce a Table of Contents for the file.
>>
> Ah, missed that. Thanks.
> (Now I'll have to find the version used to dump the db...)

If you have it just use the Postgres 14 version of pg_restore it will be 
able to read older files from older versions of pg_dump.


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (18+ messages)  latest in thread

Message-ID: <78db98f0-0e1b-d744-25fd-5390d720e2b8@aklaver.com>
Permalink:  ../78db98f0-0e1b-d744-25fd-5390d720e2b8@aklaver.com/
Also on:    postgresql.org/message-id/78db98f0-0e1b-d744-25fd-5390d720e2b8@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, robjsargent@gmail.com
  Subject: Re: list tablespaces named in custom format dump
  In-Reply-To: <78db98f0-0e1b-d744-25fd-5390d720e2b8@aklaver.com>
  References: <29112dbe-b1bd-afe9-63d3-f7ba50ece939@gmail.com> <9013c93e-3f01-f40a-4e14-7b1c9d7b065d@aklaver.com> <caaf8cd5-5728-6b23-e74d-cc25d89b3a58@gmail.com> <55cf2ca7-b431-b5bc-1b86-b6c8726ac4c5@aklaver.com> <2904d7b9-3bf0-fee0-f043-c8f904fc6c1d@gmail.com> <78db98f0-0e1b-d744-25fd-5390d720e2b8@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox