From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Our naming of wait events is a disaster.
Date: Tue, 12 May 2020 19:41:19 -0400
Message-ID: <24595.1589326879@sss.pgh.pa.us> (raw)
In-Reply-To: <9871.1589321468@sss.pgh.pa.us>
References: <20200512202726.GA31125@alvherre.pgsql>
<9871.1589321468@sss.pgh.pa.us>
For the specific category of the heavyweight lock types, I'm
now thinking that we can't change the event names very much, because
those are also exposed in pg_locks' locktype column. We can be
darn certain, for example, that changing the spelling of "relation"
in that column would break a lot of user queries. Conceivably we
could decouple the wait event names from the locktype column, but
on the whole that doesn't seem like a great plan.
However, having said that, I remain on the warpath about "speculative
token". That's an utterly horrid choice for both locktype and wait
event. I also notice, with no amusement, that "speculative token"
is not documented in the pg_locks documentation. So I think we should
change it ... but to what, exactly? Looking at the other existing names:
const char *const LockTagTypeNames[] = {
"relation",
"extend",
"page",
"tuple",
"transactionid",
"virtualxid",
"speculative token",
"object",
"userlock",
"advisory"
};
I'm inclined to propose "spectoken". I'd be okay with "spec_token" as
well, but there are not underscores in the longer-established names.
(Needless to say, this array is going to gain a comment noting that
there are two places to document any changes. Also, if we split up
the wait_event table as discussed earlier, it might make sense for
pg_locks' documentation to cross-reference the sub-table for heavyweight
lock events, since that has some explanation of what the codes mean.)
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, robertmhaas@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: Our naming of wait events is a disaster.
In-Reply-To: <24595.1589326879@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox