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

From Noah Misch
Subject Re: pg_dump LOCK TABLE ONLY question
Date
Msg-id 20160102032810.GA2956858@tornado.leadboat.com
Whole thread Raw
In response to Re: pg_dump LOCK TABLE ONLY question  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: pg_dump LOCK TABLE ONLY question  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
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 because COPY refers only to the target table.
> 
> Why should that action cause a lock to be taken on another table that
> inherits from tab1?
> 
> It seems clear that the user is requesting an action ONLY on tab1, so we
> should use LOCK TABLE tab1 ONLY;

+1



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [PATCH] Refactoring of LWLock tranches
Next
From: Noah Misch
Date:
Subject: Re: Patch: Revised documentation on base backups