Re: pg_dump LOCK TABLE ONLY question - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: pg_dump LOCK TABLE ONLY question
Date
Msg-id 56204F37.60804@BlueTreble.com
Whole thread Raw
In response to Re: pg_dump LOCK TABLE ONLY question  (Filip Rembiałkowski <filip.rembialkowski@gmail.com>)
Responses Re: pg_dump LOCK TABLE ONLY question  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 10/7/15 6:44 AM, Filip Rembiałkowski wrote:
> Oct 2 2015 01:19 "Michael Paquier" <michael.paquier@gmail.com
> <mailto:michael.paquier@gmail.com>> wrote:
>  >
>  > On Thu, Oct 1, 2015 at 10:43 PM, Filip Rembiałkowski
> <filip.rembialkowski@gmail.com <mailto:filip.rembialkowski@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 dump is only done on a subset of tables, using --table for
>  > example.
>
> Right. But please consider this use case, when I have to dunp only given
> schema, nothing more and nothing less.
>
> Is --schema option not just for that?
>
> Locking child tables seems a bit counter-intuitive.
>
> COPY does not touch child tables, also.

I agree this seems unnecessary.

OTOH, now that the catalog is MVCC capable, do we even still need to 
lock the objects for a schema-only dump?
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com



pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: [PATCH] SQL function to report log message
Next
From: Alvaro Herrera
Date:
Subject: Re: Patch: Optimize memory allocation in function 'bringetbitmap'