Commit 474e7da6 authored by Tom Lane's avatar Tom Lane

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
parent 1d374302
...@@ -10238,7 +10238,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l ...@@ -10238,7 +10238,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
<literal>tuple</literal>, <literal>tuple</literal>,
<literal>transactionid</literal>, <literal>transactionid</literal>,
<literal>virtualxid</literal>, <literal>virtualxid</literal>,
<literal>speculative token</literal>, <literal>spectoken</literal>,
<literal>object</literal>, <literal>object</literal>,
<literal>userlock</literal>, or <literal>userlock</literal>, or
<literal>advisory</literal>. <literal>advisory</literal>.
......
This diff is collapsed.
...@@ -22,7 +22,10 @@ ...@@ -22,7 +22,10 @@
#include "utils/builtins.h" #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[] = { const char *const LockTagTypeNames[] = {
"relation", "relation",
"extend", "extend",
...@@ -30,7 +33,7 @@ const char *const LockTagTypeNames[] = { ...@@ -30,7 +33,7 @@ const char *const LockTagTypeNames[] = {
"tuple", "tuple",
"transactionid", "transactionid",
"virtualxid", "virtualxid",
"speculative token", "spectoken",
"object", "object",
"userlock", "userlock",
"advisory" "advisory"
......
...@@ -362,16 +362,16 @@ step controller_print_speculative_locks: ...@@ -362,16 +362,16 @@ step controller_print_speculative_locks:
SELECT pa.application_name, locktype, mode, granted SELECT pa.application_name, locktype, mode, granted
FROM pg_locks pl JOIN pg_stat_activity pa USING (pid) FROM pg_locks pl JOIN pg_stat_activity pa USING (pid)
WHERE WHERE
locktype IN ('speculative token', 'transactionid') locktype IN ('spectoken', 'transactionid')
AND pa.datname = current_database() AND pa.datname = current_database()
AND pa.application_name LIKE 'isolation/insert-conflict-specconflict-s%' AND pa.application_name LIKE 'isolation/insert-conflict-specconflict-s%'
ORDER BY 1, 2, 3, 4; ORDER BY 1, 2, 3, 4;
application_namelocktype mode granted application_namelocktype mode granted
isolation/insert-conflict-specconflict-s1speculative tokenShareLock f isolation/insert-conflict-specconflict-s1spectoken ShareLock f
isolation/insert-conflict-specconflict-s1transactionid ExclusiveLock t isolation/insert-conflict-specconflict-s1transactionid ExclusiveLock t
isolation/insert-conflict-specconflict-s2speculative tokenExclusiveLock t isolation/insert-conflict-specconflict-s2spectoken ExclusiveLock t
isolation/insert-conflict-specconflict-s2transactionid ExclusiveLock t isolation/insert-conflict-specconflict-s2transactionid ExclusiveLock t
step controller_unlock_2_4: SELECT pg_advisory_unlock(2, 4); step controller_unlock_2_4: SELECT pg_advisory_unlock(2, 4);
pg_advisory_unlock pg_advisory_unlock
...@@ -384,7 +384,7 @@ step controller_print_speculative_locks: ...@@ -384,7 +384,7 @@ step controller_print_speculative_locks:
SELECT pa.application_name, locktype, mode, granted SELECT pa.application_name, locktype, mode, granted
FROM pg_locks pl JOIN pg_stat_activity pa USING (pid) FROM pg_locks pl JOIN pg_stat_activity pa USING (pid)
WHERE WHERE
locktype IN ('speculative token', 'transactionid') locktype IN ('spectoken', 'transactionid')
AND pa.datname = current_database() AND pa.datname = current_database()
AND pa.application_name LIKE 'isolation/insert-conflict-specconflict-s%' AND pa.application_name LIKE 'isolation/insert-conflict-specconflict-s%'
ORDER BY 1, 2, 3, 4; ORDER BY 1, 2, 3, 4;
...@@ -406,7 +406,7 @@ step controller_print_speculative_locks: ...@@ -406,7 +406,7 @@ step controller_print_speculative_locks:
SELECT pa.application_name, locktype, mode, granted SELECT pa.application_name, locktype, mode, granted
FROM pg_locks pl JOIN pg_stat_activity pa USING (pid) FROM pg_locks pl JOIN pg_stat_activity pa USING (pid)
WHERE WHERE
locktype IN ('speculative token', 'transactionid') locktype IN ('spectoken', 'transactionid')
AND pa.datname = current_database() AND pa.datname = current_database()
AND pa.application_name LIKE 'isolation/insert-conflict-specconflict-s%' AND pa.application_name LIKE 'isolation/insert-conflict-specconflict-s%'
ORDER BY 1, 2, 3, 4; ORDER BY 1, 2, 3, 4;
......
...@@ -64,7 +64,7 @@ step "controller_print_speculative_locks" { ...@@ -64,7 +64,7 @@ step "controller_print_speculative_locks" {
SELECT pa.application_name, locktype, mode, granted SELECT pa.application_name, locktype, mode, granted
FROM pg_locks pl JOIN pg_stat_activity pa USING (pid) FROM pg_locks pl JOIN pg_stat_activity pa USING (pid)
WHERE WHERE
locktype IN ('speculative token', 'transactionid') locktype IN ('spectoken', 'transactionid')
AND pa.datname = current_database() AND pa.datname = current_database()
AND pa.application_name LIKE 'isolation/insert-conflict-specconflict-s%' AND pa.application_name LIKE 'isolation/insert-conflict-specconflict-s%'
ORDER BY 1, 2, 3, 4; ORDER BY 1, 2, 3, 4;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment