AccessExclusiveLock with pg_locks.locktype of tuple

From: Erik Jones <mage2k(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: AccessExclusiveLock with pg_locks.locktype of tuple
Date: 2019-12-18 23:01:30
Message-ID: CABX4GUvwPBm8a4RnZVTsXAC=WAJkwYF7_ZaJX3jbSw5XnWRVGA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greetings,

I've seen locks with mode of AccessExclusiveLock and locktype of tuple a
few times now but have never been able to reproduce one nor had a chance to
dig into them and now have a couple questions on them:

* When is this kind of heavy lock on a row/tuple taken out? I've done some
code spelunking but have yet to find anything.
* An AccessExcluciveLock on a tuple should only block all other access to
the given tuple, yes? It won't block access at the table level? I ask
since the manual only discusses AccessExclusiveLocks in the context of
table level locking.

The only thing I've found so far on them is this old pgsql-general thread
wherein Tom Lane essentially just says, "Yeah, it can happen and is an
implementation detail that can change from version to version." That was
on 9.4.x and the my most recent confirmed sighting was on a server running
11.3.

--
Erik Jones
mage2k(at)gmail(dot)com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matthew Phillips 2019-12-18 23:12:55 READ UNCOMMITTED in postgres
Previous Message Osahon Oduware 2019-12-18 20:25:54 Re: How to prevent POSTGRES killing linux system from accepting too much inserts?