Thread: Inconsistencies in documentation of row-level locking

Inconsistencies in documentation of row-level locking

From
Michael Paquier
Date:
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

Re: Inconsistencies in documentation of row-level locking

From
Jim Nasby
Date:
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



Re: Inconsistencies in documentation of row-level locking

From
Michael Paquier
Date:
<div dir="ltr">On Tue, Oct 21, 2014 at 10:26 AM, Jim Nasby <span dir="ltr"><<a
href="mailto:Jim.Nasby@bluetreble.com"target="_blank">Jim.Nasby@bluetreble.com</a>></span> wrote:<br /><div
class="gmail_extra"><divclass="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1pxsolid rgb(204,204,204);padding-left:1ex"> Did this get committed? Should probably add it to the
commitfestif not...<span class=""><font color="#888888"><br /></font></span></blockquote></div>Already done in CF3, I
shouldhave mentioned it:<br /><a
href="https://commitfest.postgresql.org/action/patch_view?id=1594">https://commitfest.postgresql.org/action/patch_view?id=1594</a><br
/>--<br />Michael<br /></div></div> 

Re: Inconsistencies in documentation of row-level locking

From
Alvaro Herrera
Date:
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



Re: Inconsistencies in documentation of row-level locking

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