Re: [HACKERS] pg_dump LOCK TABLE ONLY question

2016-01-02 Thread Michael Paquier
On Sat, Jan 2, 2016 at 12:28 PM, Noah Misch wrote: > On Sat, Oct 31, 2015 at 10:14:18AM +0100, Simon Riggs wrote: >> I agree with Filip that this is a bug. pg_dump clearly doesn't work >> correctly with inheritance. >> >> If I run this command >> >> pg_dump -t tab1 >> >> then I get a dump of "ta

Re: [HACKERS] pg_dump LOCK TABLE ONLY question

2016-01-01 Thread Noah Misch
On Sat, Oct 31, 2015 at 10:14:18AM +0100, Simon Riggs wrote: > I agree with Filip that this is a bug. pg_dump clearly doesn't work > correctly with inheritance. > > If I run this command > > pg_dump -t tab1 > > then I get a dump of "tab1". No data is included from tables that inherit > tab1 b

Re: [HACKERS] pg_dump LOCK TABLE ONLY question

2015-10-31 Thread Simon Riggs
On 2 October 2015 at 01:19, Michael Paquier wrote: > On Thu, Oct 1, 2015 at 10:43 PM, Filip Rembiałkowski > wrote: > > I just want to understand why there is LOCK TABLE not LOCK TABLE ONLY. > > It seems to me that you'd still want to use LOCK TABLE particularly if > the dump is only done on a su

Re: [HACKERS] pg_dump LOCK TABLE ONLY question

2015-10-30 Thread Filip Rembiałkowski
Please take it as a very naive and basic approach :-) What could go wrong here? diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 36863df..57a50b5 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -5169,9 +5169,9 @@ getTables(Archive *fout, DumpO

Re: [HACKERS] pg_dump LOCK TABLE ONLY question

2015-10-16 Thread Robert Haas
On Thu, Oct 15, 2015 at 9:13 PM, Jim Nasby wrote: > OTOH, now that the catalog is MVCC capable, do we even still need to lock > the objects for a schema-only dump? Yes. The MVCC snapshots used for catalog reads are stable only for the duration of one particular catalog read. We're not using the

Re: [HACKERS] pg_dump LOCK TABLE ONLY question

2015-10-15 Thread Jim Nasby
On 10/7/15 6:44 AM, Filip Rembiałkowski wrote: Oct 2 2015 01:19 "Michael Paquier" mailto:michael.paqu...@gmail.com>> wrote: > > On Thu, Oct 1, 2015 at 10:43 PM, Filip Rembiałkowski mailto:filip.rembialkow...@gmail.com>> wrote: > > I just want to understand why there is LOCK TABLE not LOCK TABL

Re: [HACKERS] pg_dump LOCK TABLE ONLY question

2015-10-07 Thread Filip Rembiałkowski
Oct 2 2015 01:19 "Michael Paquier" wrote: > > On Thu, Oct 1, 2015 at 10:43 PM, Filip Rembiałkowski < filip.rembialkow...@gmail.com> wrote: > > I just want to understand why there is LOCK TABLE not LOCK TABLE ONLY. > > It seems to me that you'd still want to use LOCK TABLE particularly if > the du

Re: [HACKERS] pg_dump LOCK TABLE ONLY question

2015-10-01 Thread Michael Paquier
On Thu, Oct 1, 2015 at 10:43 PM, Filip Rembiałkowski wrote: > I just want to understand why there is LOCK TABLE not LOCK TABLE ONLY. It seems to me that you'd still want to use LOCK TABLE particularly if the dump is only done on a subset of tables, using --table for example. -- Michael -- Sen

Re: [HACKERS] pg_dump LOCK TABLE ONLY question

2015-10-01 Thread Filip Rembiałkowski
(sorry I lost the original thread somehow) tgl wrote: > Filip wrote: > > I'm running pg_dump constrained to one schema. It appears that pg_dump runs > > "LOCK TABLE %s IN ACCESS SHARE MODE" for each table. > > Naturally it makes sense, but... > > This schema has a table that serves as parent fo

Re: [HACKERS] pg_dump LOCK TABLE ONLY question

2015-09-27 Thread Tom Lane
=?UTF-8?Q?Filip_Rembia=C5=82kowski?= writes: > I'm running pg_dump constrained to one schema. It appears that pg_dump runs > "LOCK TABLE %s IN ACCESS SHARE MODE" for each table. > Naturally it makes sense, but... > This schema has a table that serves as parent for thousands of child > tables (v

[HACKERS] pg_dump LOCK TABLE ONLY question

2015-09-27 Thread Filip Rembiałkowski
Hi. I'm running pg_dump constrained to one schema. It appears that pg_dump runs "LOCK TABLE %s IN ACCESS SHARE MODE" for each table. Naturally it makes sense, but... This schema has a table that serves as parent for thousands of child tables (via INHERITS). So effectively, to dump this schema,