Re: pg_dump of partitioned table not working.

From: Ron <ronljohnsonjr(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_dump of partitioned table not working.
Date: 2020-12-03 00:05:55
Message-ID: 1d857216-a9b9-0d1c-ade3-73692ba5508d@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 12/2/20 5:42 PM, David G. Johnston wrote:
> On Wednesday, December 2, 2020, Ron <ronljohnsonjr(at)gmail(dot)com
> <mailto:ronljohnsonjr(at)gmail(dot)com>> wrote:
>
> What am I missing?
>
> postgres=# \d+ measurement
>                            Partitioned table "public.measurement"
>
>
> $ /usr/lib/postgresql/12/bin/pg_dump -p5433 -d postgres -t measurement
> --data-only
>
>
> I’m unsure whether to expect a dump of only the partitioned table’s data
> to be empty or include everything.  I suspect “empty” is the correct
> answer.  If you dump everything the individual tables would be dumped, and
> not all partition should be dumped.

The individual partition tables regularly (for some site-specific definition
of "regularly") change, as new partitions are added and old partitions are
dropped.  Or the DBA decides to change the partition scheme.

Needing to remember all the partition names is absurd, especially when there
might be dozens of them

--
Angular momentum makes the world go 'round.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2020-12-03 00:06:51 Re: pg_dump of partitioned table not working.
Previous Message Martin Goodson 2020-12-02 23:56:49 Re: "Server versions prior to 8.0 do not support savepoints" when using JDBC ...