Re: BUG #9371: pg_dump acquiring ROW EXCLUSIVE locks on tables

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #9371: pg_dump acquiring ROW EXCLUSIVE locks on tables
Date: 2014-03-03 15:21:17
Message-ID: CAEZATCVVnoXMNZmcmK3ycfqpnRVf8ymnDtjNJLfzSwTOmgcdXg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 27 February 2014 11:54, <dean(dot)a(dot)rasheed(at)gmail(dot)com> wrote:
> [snip]
> perhaps
> AcquireRewriteLocks() could be told that the query is not about to be run in
> this case, and that it should only acquire ACCESS SHARE locks on the
> tables.
>

Here's a patch for HEAD along those lines.

I've tested it on our production data and confirmed that with this
patch pg_dump no longer acquires exclusive locks. I think this should
be back-patched, since we do promise that pg_dump does not block other
readers or writers.

Regards,
Dean

Attachment Content-Type Size
pg_dump-locking.patch text/x-diff 12.5 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message tejaswinihj24 2014-03-03 15:48:08 BUG #9424: Database size increased by 10MB everyday
Previous Message Tom Lane 2014-03-03 15:08:42 Re: BUG #9416: Setting up postgresql-9.1 (9.1.12-0wheezy1) Fails Configuration