Re: pg_dump LOCK TABLE ONLY question

From: Noah Misch <noah(at)leadboat(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Filip Rembiałkowski <filip(dot)rembialkowski(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump LOCK TABLE ONLY question
Date: 2016-01-02 03:28:10
Message-ID: 20160102032810.GA2956858@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2016-01-02 03:59:36 Re: Patch: Revised documentation on base backups
Previous Message Amit Kapila 2016-01-02 03:10:24 Re: [PATCH] Refactoring of LWLock tranches