| From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
|---|---|
| To: | Alpha Shuro <alphashuro(at)gmail(dot)com>, pgsql-docs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: (docs): add missing info about ShareLocks |
| Date: | 2025-11-22 12:07:57 |
| Message-ID: | 58e8295701c9e15c251ed608c5ed297688c785a2.camel@cybertec.at |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-docs |
On Sat, 2025-11-22 at 09:07 +0100, Alpha Shuro wrote:
> I had a production incident a few weeks ago while using deferred indexes, where
> the Postgres docs lead me down the wrong path of investigation due to missing details.
> Specifically, the docs implied that a `ShareLock` was only acquired when creating
> indexes, but only after looking at the code did I learn that this lock is also
> acquired when transactions are waiting for other transactions to complete.
> I think this would be helpful to someone who might find themselves on the same path
> in the future, and as I understand it this mailing list is the way to submit patches
> to the docs?
No, that is wrong. This section is about table locks, and a lock on a transaction ID
should, if anywhere, be documented elsewhere. Actually, there is already something
about transaction ID locks in https://www.postgresql.org/docs/current/xact-locking.html
Perhaps you could improve that short documentation?
Yours,
Laurenz Albe
PS: There are also SHARE locks on rows.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bernice Southey | 2025-11-23 10:24:42 | More guidance on ctid |
| Previous Message | Alpha Shuro | 2025-11-22 08:07:01 | (docs): add missing info about ShareLocks |