Re: How to fully restore a single table from a custom dump? - Mailing list pgsql-admin

From Thomas Kellerer
Subject Re: How to fully restore a single table from a custom dump?
Date
Msg-id a4428a67-51c5-8e84-c0de-8c803ea02edf@gmx.net
Whole thread Raw
In response to Re: How to fully restore a single table from a custom dump?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
Tom Lane schrieb am 09.08.2022 um 15:27:
> Thomas Kellerer <shammat@gmx.net> writes:
>> Any ideas, how I can _fully_ restore a single table from a custom dump?
>
> "pg_restore -l -v" will give you a table-of-contents with
> dependencies, like this:
>
> 8155; 0 40431 MATERIALIZED VIEW DATA public analytics_materialized_view postgres
> ;       depends on: 960 8161
>
> This is object number 8155 and it depends on objects 960 and 8161.
>
> Find the table you want, then look for things with dependencies
> on it (some of them may not be things you want to restore).
> Edit away all the lines for things you don't want, then feed
> the reduced list to "pg_restore -L".


Ah, thanks. I wasn't aware that -v would include dependencies.




pgsql-admin by date:

Previous
From: Ron
Date:
Subject: Re: How to fully restore a single table from a custom dump?
Next
From: richard coleman
Date:
Subject: postgresql definitive list of network resources used/needed?