Re: DROP INDEX docs - explicit lock naming

From: Greg Rychlewski <greg(dot)rychlewski(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: DROP INDEX docs - explicit lock naming
Date: 2021-03-31 03:29:17
Message-ID: CAKemG7VxU-GD7HO0QiE9KEiezbB7edW6YvrAkbjK43wDARZ5FA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks for pointing that out. I've attached a new patch with several other
updates where I felt confident the docs were referring to an ACCESS
EXCLUSIVE lock.

On Tue, Mar 30, 2021 at 8:47 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:

> On Tue, Mar 30, 2021 at 10:33:46AM -0400, Greg Rychlewski wrote:
> > While reading the documentation for DROP INDEX[1], I noticed the lock was
> > described colloquially as an "exclusive" lock, which made me pause for a
> > second because it's the same name as the EXCLUSIVE table lock.
> >
> > The attached patch explicitly states that an ACCESS EXCLUSIVE lock is
> > acquired.
>
> Indeed, this could be read as ACCESS SHARE being allowed, but that's
> never the case for any of the index code paths, except if CONCURRENTLY
> is involved. It is not the only place in the docs where we could do
> more clarification. For instance, reindex.sgml mentions twice an
> exclusive lock but that should be an access exclusive lock. To be
> exact, I can spot 27 places under doc/ that could be improved. Such
> changes depend on the surrounding context, of course.
> --
> Michael
>

Attachment Content-Type Size
v2-docs-access-exclusive-lock.patch application/octet-stream 7.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Chen 2021-03-31 03:30:54 Re: Inconsistent behavior of pg_dump/pg_restore on DEFAULT PRIVILEGES
Previous Message Amit Langote 2021-03-31 03:28:43 Re: making update/delete of inheritance trees scale better