Re: Strange behavior with pg_locks and partitioning

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Strange behavior with pg_locks and partitioning
Date: 2012-06-15 16:48:35
Message-ID: CA+TgmoYyxwwAL5k1dAcwAtUkNYfZepAPEAkydducsjD2icYy6A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 15, 2012 at 12:42 PM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
> In the course of debugging why a particular server required increasing
> max_locks_per_transation, I found a peculiar behavior.  If you do an
> UPDATE which doesn't match any CE constraint on the parent table in an
> inheritance chain, you get a RowExclusiveLock on every partition and
> every index on every partition.  However, these rowexclusivelocks have
> no page or tuple reference; it's a RowExclusiveLock with no row.
>
> Is this intentional?

RowExclusiveLock is a type of table lock, not a lock on a row.

You're going to get that on all tables (and their indexes) involved in
any write query.

So it sounds unsurprising to me.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-06-15 17:04:52 Re: Saving snapshots for later use
Previous Message Josh Berkus 2012-06-15 16:42:06 Strange behavior with pg_locks and partitioning