Re: few more wait events to add to docs

From: Jeremy Schneider <schnjere(at)amazon(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: few more wait events to add to docs
Date: 2019-03-06 19:08:12
Message-ID: 7aa90741-4824-309a-9985-7405dd4a8c58@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3/5/19 18:49, Michael Paquier wrote:
> Why not using this occasion to reorganize the LWLock and Lock sections
> so as their entries are fully alphabetized then? I have made an
> effort in this direction in 5ef037c for all the sections except these
> two. And honestly getting all these organized would really help
> documentation readers.

Right now, the LWLock documentation implicitly follows a predictable
pattern, so it's not really that hard to check for completeness.  I'm
not sure to what extent you want to alphabetize, but I think the current
structure isn't bad:

LWLock order in documentation:
1) CamelCase LWLocks: individually named - see lwlocknames.txt
2) lowercase LWLocks: tranches
2a) SLRUs - see SimpleLruInit() callers on doxygen
2b) Shared Buffer (buffer_content, buffer_io)
2c) Individually Named - see RegisterLWLockTranches() in lwlock.c

[see attached screenshot image... spoiler alert, it'll be a slide in my
talk at PgConf NY]

If anything, I think we might just want to add comments to
RegisterLWLockTranches() and lwlocknames.txt with links to the doc file
that needs to be updated whenever a new tranche is added.

Not sure the best place for a comment on SLRUs (is SimpleLruInit a good
place?)... but I'm kindof hopeful that we're not adding many more new
SLRUs anyway and that people would bias toward leveraging the buffer
cache when possible.

I'd rather make this pattern explicit in the docs than lose it... it
greatly helps me understand what some particular wait event is, and
where I need to look in the code to find it.

-Jeremy

--
Jeremy Schneider
Database Engineer
Amazon Web Services

Attachment Content-Type Size
Screen Shot 2019-03-06 at 11.01.57.png image/png 276.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2019-03-06 19:25:12 Re: Online verification of checksums
Previous Message Tomas Vondra 2019-03-06 19:06:38 Re: performance issue in remove_from_unowned_list()