From 474e7da6485687425d216eda1685d7e530b24fd6 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 15 May 2020 21:47:21 -0400 Subject: Change locktype "speculative token" to "spectoken". It's just weird that this name wasn't chosen to look like an identifier. The suspicion that it wasn't thought about too hard is reinforced by the fact that it wasn't documented in the pg_locks view (until I did so, a day or two back). Update, and add a comment reminding future adjusters of this array to fix the docs too. Do some desultory wordsmithing on various entries in the wait events tables. Discussion: https://postgr.es/m/24595.1589326879@sss.pgh.pa.us --- src/backend/utils/adt/lockfuncs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/backend/utils/adt/lockfuncs.c') diff --git a/src/backend/utils/adt/lockfuncs.c b/src/backend/utils/adt/lockfuncs.c index ecb1bf92ff7..e992d1bbfce 100644 --- a/src/backend/utils/adt/lockfuncs.c +++ b/src/backend/utils/adt/lockfuncs.c @@ -22,7 +22,10 @@ #include "utils/builtins.h" -/* This must match enum LockTagType! */ +/* + * This must match enum LockTagType! Also, be sure to document any changes + * in the docs for the pg_locks view and for wait event types. + */ const char *const LockTagTypeNames[] = { "relation", "extend", @@ -30,7 +33,7 @@ const char *const LockTagTypeNames[] = { "tuple", "transactionid", "virtualxid", - "speculative token", + "spectoken", "object", "userlock", "advisory" -- cgit v1.2.3