Re: pg_dump of partitioned table not working.

2020-12-02 Thread Ron
On 12/2/20 6:14 PM, Ron wrote: On 12/2/20 5:50 PM, Tom Lane wrote: I wrote: What you need here is something like "pg_dump -t measurement*" to indicate that you want measurement's child tables too, but AFAIR pg_dump has no such feature.  Maybe we should add it. Or actually: that syntax does do

Re: pg_dump of partitioned table not working.

2020-12-02 Thread Ron
On 12/2/20 6:54 PM, Adrian Klaver wrote: On 12/2/20 4:38 PM, Ron wrote: On 12/2/20 6:21 PM, Adrian Klaver wrote: On 12/2/20 4:13 PM, Ron wrote: On 12/2/20 6:08 PM, David G. Johnston wrote: On Wed, Dec 2, 2020 at 5:06 PM Ron > wrote: That you were comparing app

Re: pg_dump of partitioned table not working.

2020-12-02 Thread Adrian Klaver
On 12/2/20 4:38 PM, Ron wrote: On 12/2/20 6:21 PM, Adrian Klaver wrote: On 12/2/20 4:13 PM, Ron wrote: On 12/2/20 6:08 PM, David G. Johnston wrote: On Wed, Dec 2, 2020 at 5:06 PM Ron > wrote: That you were comparing apples and oranges - specifically that the d

Re: pg_dump of partitioned table not working.

2020-12-02 Thread David G. Johnston
On Wed, Dec 2, 2020 at 5:38 PM Ron wrote: > Shame on me for assuming, based on the explicit pg_dump command in the > example. > > This is what you wrote: > > (Specifying the whole file name because multiple versions are installed.) The path of the executable doesn't generally make a difference h

Re: pg_dump of partitioned table not working.

2020-12-02 Thread Ron
On 12/2/20 6:21 PM, Adrian Klaver wrote: On 12/2/20 4:13 PM, Ron wrote: On 12/2/20 6:08 PM, David G. Johnston wrote: On Wed, Dec 2, 2020 at 5:06 PM Ron > wrote: That you were comparing apples and oranges - specifically that the database you were dumping was emp

Re: pg_dump of partitioned table not working.

2020-12-02 Thread Ron
On 12/2/20 6:21 PM, David G. Johnston wrote: On Wed, Dec 2, 2020 at 5:14 PM Ron > wrote: > It does seem like there might be reason to have a switch along > the lines of "--include-child-tables". That would be great, but won't help me in v12. I'd pr

Re: pg_dump of partitioned table not working.

2020-12-02 Thread David G. Johnston
On Wed, Dec 2, 2020 at 5:14 PM Ron wrote: > > > It does seem like there might be reason to have a switch along > > the lines of "--include-child-tables". > > That would be great, but won't help me in v12. > > I'd probably just relocate the table to a separate schema and require that all partition

Re: pg_dump of partitioned table not working.

2020-12-02 Thread Adrian Klaver
On 12/2/20 4:13 PM, Ron wrote: On 12/2/20 6:08 PM, David G. Johnston wrote: On Wed, Dec 2, 2020 at 5:06 PM Ron > wrote: That you were comparing apples and oranges - specifically that the database you were dumping was empty but the one you were checking was not.

Re: pg_dump of partitioned table not working.

2020-12-02 Thread Ron
On 12/2/20 5:50 PM, Tom Lane wrote: I wrote: What you need here is something like "pg_dump -t measurement*" to indicate that you want measurement's child tables too, but AFAIR pg_dump has no such feature. Maybe we should add it. Or actually: that syntax does do something, but it selects tables

Re: pg_dump of partitioned table not working.

2020-12-02 Thread Ron
On 12/2/20 6:08 PM, David G. Johnston wrote: On Wed, Dec 2, 2020 at 5:06 PM Ron > wrote: On 12/2/20 5:35 PM, David G. Johnston wrote: On Wednesday, December 2, 2020, Ron mailto:ronljohnso...@gmail.com>> wrote: What am I missing? (Specify

Re: pg_dump of partitioned table not working.

2020-12-02 Thread Ron
On 12/2/20 5:49 PM, David G. Johnston wrote: On Wednesday, December 2, 2020, Tom Lane > wrote: What you need here is something like "pg_dump -t measurement*" to indicate that you want measurement's child tables too, but AFAIR pg_dump has no such feature.

Re: pg_dump of partitioned table not working.

2020-12-02 Thread David G. Johnston
On Wed, Dec 2, 2020 at 5:06 PM Ron wrote: > On 12/2/20 5:35 PM, David G. Johnston wrote: > > On Wednesday, December 2, 2020, Ron wrote: > >> What am I missing? >> >> (Specifying the whole file name because multiple versions are installed.) >> >> $ /usr/lib/postgresql/12/bin/pg_dump --version >>

Re: pg_dump of partitioned table not working.

2020-12-02 Thread Ron
On 12/2/20 5:35 PM, David G. Johnston wrote: On Wednesday, December 2, 2020, Ron > wrote: What am I missing? (Specifying the whole file name because multiple versions are installed.) $ /usr/lib/postgresql/12/bin/pg_dump --version pg_dump (Postgre

Re: pg_dump of partitioned table not working.

2020-12-02 Thread Ron
On 12/2/20 5:42 PM, David G. Johnston wrote: On Wednesday, December 2, 2020, Ron > wrote: What am I missing? postgres=# \d+ measurement    Partitioned table "public.measurement" $ /usr/lib/postgresql/12/bin/pg_dump -p5433

Re: pg_dump of partitioned table not working.

2020-12-02 Thread Tom Lane
I wrote: > What you need here is something like "pg_dump -t measurement*" > to indicate that you want measurement's child tables too, but > AFAIR pg_dump has no such feature. Maybe we should add it. Or actually: that syntax does do something, but it selects tables by pattern matching not hierarch

Re: pg_dump of partitioned table not working.

2020-12-02 Thread David G. Johnston
On Wednesday, December 2, 2020, Tom Lane wrote: > > > What you need here is something like "pg_dump -t measurement*" > to indicate that you want measurement's child tables too, but > AFAIR pg_dump has no such feature. -t accepts a pattern in pg_dump. But that requires the user to adhere to a n

Re: pg_dump of partitioned table not working.

2020-12-02 Thread David G. Johnston
On Wednesday, December 2, 2020, Ron 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 o

Re: pg_dump of partitioned table not working.

2020-12-02 Thread Tom Lane
Ron writes: > What am I missing? There's no data in a partitioned table per se, so the result is not surprising. What you need here is something like "pg_dump -t measurement*" to indicate that you want measurement's child tables too, but AFAIR pg_dump has no such feature. Maybe we should add it

Re: pg_dump of partitioned table not working.

2020-12-02 Thread David G. Johnston
On Wednesday, December 2, 2020, Ron wrote: > What am I missing? > > (Specifying the whole file name because multiple versions are installed.) > > $ /usr/lib/postgresql/12/bin/pg_dump --version > pg_dump (PostgreSQL) 12.5 (Ubuntu 12.5-1.pgdg18.04+1) > > postgres=# \d+ measurement > > psql? on (de