pg_dump LOCK TABLE ONLY question

From: Filip Rembiałkowski <filip(dot)rembialkowski(at)gmail(dot)com>
To: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_dump LOCK TABLE ONLY question
Date: 2015-09-27 10:43:14
Message-ID: CAP_rww=n_v48D0Q97MfNzCQj=iWJKXKT82OEVdz3gBE7HRFCSQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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, I have to LOCK all these tables
not only parent.

pg_dump does it automatically, I checked in current trunk - it does
not add ONLY keyword. Should it?

I wonder if it it counts as a bug.
If not a bug, maybe it counts as a feature request?

Thanks.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2015-09-27 12:00:03 Re: PATCH: use foreign keys to improve join estimates v1
Previous Message Jinyu Zhang 2015-09-27 07:20:31 Patch: Optimize memory allocation in function 'bringetbitmap'