Inconsistencies in documentation of row-level locking

Lists: pgsql-hackers
From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Inconsistencies in documentation of row-level locking
Date: 2014-10-10 13:31:52
Message-ID: CAB7nPqQnxY7LxUYzFC8mfDZrufLrCijMA_-wXO1TKHsbkoWn+w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi all,

Currently all the row-level lock modes are described in the page for
SELECT query:
http://www.postgresql.org/docs/devel/static/explicit-locking.html#LOCKING-ROWS
However, after browsing the documentation, I noticed in the page
describing all the explicit locks of the system that there is a
portion dedicated to row-level locks and this section is not
mentioning at all FOR KEY SHARE and FOR NO KEY UPDATE. It seems that
this is something rather misleading for the user:
http://www.postgresql.org/docs/devel/static/explicit-locking.html#LOCKING-ROWS

Attached is a patch that refactors the whole and improves the documentation:
- Addition of a table showing the conflicts between each lock
- Moved description of each row-level lock mode to the explicit locking page
- Addition of a link in SELECT portion to redirect the user to the
explicit locking page
Regards,
--
Michael

Attachment Content-Type Size
20141010_rowlock_doc_refactor.patch text/x-patch 12.7 KB

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Inconsistencies in documentation of row-level locking
Date: 2014-10-21 01:26:05
Message-ID: 5445B62D.2020709@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 10/10/14, 8:31 AM, Michael Paquier wrote:
> Hi all,
>
> Currently all the row-level lock modes are described in the page for
> SELECT query:
> http://www.postgresql.org/docs/devel/static/explicit-locking.html#LOCKING-ROWS
> However, after browsing the documentation, I noticed in the page
> describing all the explicit locks of the system that there is a
> portion dedicated to row-level locks and this section is not
> mentioning at all FOR KEY SHARE and FOR NO KEY UPDATE. It seems that
> this is something rather misleading for the user:
> http://www.postgresql.org/docs/devel/static/explicit-locking.html#LOCKING-ROWS
>
> Attached is a patch that refactors the whole and improves the documentation:
> - Addition of a table showing the conflicts between each lock
> - Moved description of each row-level lock mode to the explicit locking page
> - Addition of a link in SELECT portion to redirect the user to the
> explicit locking page

Did this get committed? Should probably add it to the commitfest if not...
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com


From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Inconsistencies in documentation of row-level locking
Date: 2014-10-21 13:47:35
Message-ID: CAB7nPqQDWPVicKkVSkvQmCbb3nA6QtRxz6j4=EGcoFd79zxj1g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Oct 21, 2014 at 10:26 AM, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>
wrote:

> Did this get committed? Should probably add it to the commitfest if not...
>
Already done in CF3, I should have mentioned it:
https://commitfest.postgresql.org/action/patch_view?id=1594
--
Michael


From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Inconsistencies in documentation of row-level locking
Date: 2014-11-13 17:47:45
Message-ID: 20141113174745.GG1791@alvin.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Michael Paquier wrote:
> Hi all,
>
> Currently all the row-level lock modes are described in the page for
> SELECT query:
> http://www.postgresql.org/docs/devel/static/explicit-locking.html#LOCKING-ROWS
> However, after browsing the documentation, I noticed in the page
> describing all the explicit locks of the system that there is a
> portion dedicated to row-level locks and this section is not
> mentioning at all FOR KEY SHARE and FOR NO KEY UPDATE.

Thanks, I applied it to master and 9.4 after some slight
editorialization.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Inconsistencies in documentation of row-level locking
Date: 2014-11-13 22:18:18
Message-ID: CAB7nPqR3MPx82YuD3nC7V58ao088shVYRWoBkkD5xZWsVhj3-w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Nov 14, 2014 at 2:47 AM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> wrote:
> Thanks, I applied it to master and 9.4 after some slight
> editorialization.
Thanks.
--
Michael