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
This commit is contained in:
parent
1d3743023e
commit
474e7da648
|
@ -10238,7 +10238,7 @@ SCRAM-SHA-256$<replaceable><iteration count></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>.
|
||||||
|
|
|
@ -919,68 +919,66 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
|
||||||
<tbody>
|
<tbody>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>Activity</literal></entry>
|
<entry><literal>Activity</literal></entry>
|
||||||
<entry>The server process is idle. This is used by
|
<entry>The server process is idle. This event type indicates a process
|
||||||
system processes waiting for activity in their main processing loop.
|
waiting for activity in its main processing loop.
|
||||||
<literal>wait_event</literal> will identify the specific wait point.
|
<literal>wait_event</literal> will identify the specific wait point;
|
||||||
See <xref linkend="wait-event-activity-table"/>.
|
see <xref linkend="wait-event-activity-table"/>.
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>BufferPin</literal></entry>
|
<entry><literal>BufferPin</literal></entry>
|
||||||
<entry>The server process is waiting to access to
|
<entry>The server process is waiting for exclusive access to
|
||||||
a data buffer during a period when no other process can be
|
a data buffer. Buffer pin waits can be protracted if
|
||||||
examining that buffer. Buffer pin waits can be protracted if
|
another process holds an open cursor that last read data from the
|
||||||
another process holds an open cursor which last read data from the
|
|
||||||
buffer in question. See <xref linkend="wait-event-bufferpin-table"/>.
|
buffer in question. See <xref linkend="wait-event-bufferpin-table"/>.
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>Client</literal></entry>
|
<entry><literal>Client</literal></entry>
|
||||||
<entry>The server process is waiting for some activity
|
<entry>The server process is waiting for activity on a socket
|
||||||
on a socket from user applications, and that the server expects
|
connected to a user application. Thus, the server expects something
|
||||||
something to happen that is independent from its internal processes.
|
to happen that is independent of its internal processes.
|
||||||
<literal>wait_event</literal> will identify the specific wait point.
|
<literal>wait_event</literal> will identify the specific wait point;
|
||||||
See <xref linkend="wait-event-client-table"/>.
|
see <xref linkend="wait-event-client-table"/>.
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>Extension</literal></entry>
|
<entry><literal>Extension</literal></entry>
|
||||||
<entry>The server process is waiting for activity
|
<entry>The server process is waiting for some condition defined by an
|
||||||
in an extension module. This category is useful for modules to
|
extension module.
|
||||||
track custom waiting points.
|
|
||||||
See <xref linkend="wait-event-extension-table"/>.
|
See <xref linkend="wait-event-extension-table"/>.
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>IO</literal></entry>
|
<entry><literal>IO</literal></entry>
|
||||||
<entry>The server process is waiting for a IO to complete.
|
<entry>The server process is waiting for an I/O operation to complete.
|
||||||
<literal>wait_event</literal> will identify the specific wait point.
|
<literal>wait_event</literal> will identify the specific wait point;
|
||||||
See <xref linkend="wait-event-io-table"/>.
|
see <xref linkend="wait-event-io-table"/>.
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>IPC</literal></entry>
|
<entry><literal>IPC</literal></entry>
|
||||||
<entry>The server process is waiting for some activity
|
<entry>The server process is waiting for some interaction with
|
||||||
from another process in the server. <literal>wait_event</literal> will
|
another server process. <literal>wait_event</literal> will
|
||||||
identify the specific wait point.
|
identify the specific wait point;
|
||||||
See <xref linkend="wait-event-ipc-table"/>.
|
see <xref linkend="wait-event-ipc-table"/>.
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>Lock</literal></entry>
|
<entry><literal>Lock</literal></entry>
|
||||||
<entry>The backend is waiting for a heavyweight lock.
|
<entry>The server process is waiting for a heavyweight lock.
|
||||||
Heavyweight locks, also known as lock manager locks or simply locks,
|
Heavyweight locks, also known as lock manager locks or simply locks,
|
||||||
primarily protect SQL-visible objects such as tables. However,
|
primarily protect SQL-visible objects such as tables. However,
|
||||||
they are also used to ensure mutual exclusion for certain internal
|
they are also used to ensure mutual exclusion for certain internal
|
||||||
operations such as relation extension. <literal>wait_event</literal>
|
operations such as relation extension. <literal>wait_event</literal>
|
||||||
will identify the type of lock awaited.
|
will identify the type of lock awaited;
|
||||||
See <xref linkend="wait-event-lock-table"/>.
|
see <xref linkend="wait-event-lock-table"/>.
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>LWLock</literal></entry>
|
<entry><literal>LWLock</literal></entry>
|
||||||
<entry> The backend is waiting for a lightweight lock.
|
<entry> The server process is waiting for a lightweight lock.
|
||||||
Each such lock protects a particular data structure in shared memory.
|
Most such locks protect a particular data structure in shared memory.
|
||||||
<literal>wait_event</literal> will contain a name identifying the purpose
|
<literal>wait_event</literal> will contain a name identifying the purpose
|
||||||
of the lightweight lock. (Some locks have specific names; others
|
of the lightweight lock. (Some locks have specific names; others
|
||||||
are part of a group of locks each with a similar purpose.)
|
are part of a group of locks each with a similar purpose.)
|
||||||
|
@ -991,7 +989,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
|
||||||
<entry><literal>Timeout</literal></entry>
|
<entry><literal>Timeout</literal></entry>
|
||||||
<entry>The server process is waiting for a timeout
|
<entry>The server process is waiting for a timeout
|
||||||
to expire. <literal>wait_event</literal> will identify the specific wait
|
to expire. <literal>wait_event</literal> will identify the specific wait
|
||||||
point. See <xref linkend="wait-event-timeout-table"/>.
|
point; see <xref linkend="wait-event-timeout-table"/>.
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -1011,7 +1009,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
|
||||||
<tbody>
|
<tbody>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>ArchiverMain</literal></entry>
|
<entry><literal>ArchiverMain</literal></entry>
|
||||||
<entry>Waiting in main loop of the archiver process.</entry>
|
<entry>Waiting in main loop of archiver process.</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>AutoVacuumMain</literal></entry>
|
<entry><literal>AutoVacuumMain</literal></entry>
|
||||||
|
@ -1023,8 +1021,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>BgWriterMain</literal></entry>
|
<entry><literal>BgWriterMain</literal></entry>
|
||||||
<entry>Waiting in main loop of background writer process background
|
<entry>Waiting in main loop of background writer process.</entry>
|
||||||
worker.</entry>
|
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>CheckpointerMain</literal></entry>
|
<entry><literal>CheckpointerMain</literal></entry>
|
||||||
|
@ -1032,19 +1029,20 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>LogicalApplyMain</literal></entry>
|
<entry><literal>LogicalApplyMain</literal></entry>
|
||||||
<entry>Waiting in main loop of logical apply process.</entry>
|
<entry>Waiting in main loop of logical replication apply process.</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>LogicalLauncherMain</literal></entry>
|
<entry><literal>LogicalLauncherMain</literal></entry>
|
||||||
<entry>Waiting in main loop of logical launcher process.</entry>
|
<entry>Waiting in main loop of logical replication launcher process.</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>PgStatMain</literal></entry>
|
<entry><literal>PgStatMain</literal></entry>
|
||||||
<entry>Waiting in main loop of the statistics collector process.</entry>
|
<entry>Waiting in main loop of statistics collector process.</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>RecoveryWalStream</literal></entry>
|
<entry><literal>RecoveryWalStream</literal></entry>
|
||||||
<entry>Waiting for WAL from a stream at recovery.</entry>
|
<entry>Waiting in main loop of startup process for WAL to arrive, during
|
||||||
|
streaming recovery.</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>SysLoggerMain</literal></entry>
|
<entry><literal>SysLoggerMain</literal></entry>
|
||||||
|
@ -1079,7 +1077,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
|
||||||
<tbody>
|
<tbody>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>BufferPin</literal></entry>
|
<entry><literal>BufferPin</literal></entry>
|
||||||
<entry>Waiting to acquire a pin on a buffer.</entry>
|
<entry>Waiting to acquire an exclusive pin on a buffer.</entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
|
@ -1106,7 +1104,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>GSSOpenServer</literal></entry>
|
<entry><literal>GSSOpenServer</literal></entry>
|
||||||
<entry>Waiting to read data from the client while establishing the GSSAPI
|
<entry>Waiting to read data from the client while establishing a GSSAPI
|
||||||
session.</entry>
|
session.</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
|
@ -1708,14 +1706,14 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>page</literal></entry>
|
<entry><literal>page</literal></entry>
|
||||||
<entry>Waiting to acquire a lock on page of a relation.</entry>
|
<entry>Waiting to acquire a lock on a page of a relation.</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>relation</literal></entry>
|
<entry><literal>relation</literal></entry>
|
||||||
<entry>Waiting to acquire a lock on a relation.</entry>
|
<entry>Waiting to acquire a lock on a relation.</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>speculative token</literal></entry>
|
<entry><literal>spectoken</literal></entry>
|
||||||
<entry>Waiting to acquire a speculative insertion lock.</entry>
|
<entry>Waiting to acquire a speculative insertion lock.</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
|
@ -1732,7 +1730,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>virtualxid</literal></entry>
|
<entry><literal>virtualxid</literal></entry>
|
||||||
<entry>Waiting to acquire a virtual xid lock.</entry>
|
<entry>Waiting to acquire a virtual transaction ID lock.</entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
|
@ -2072,7 +2070,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
|
||||||
Extensions can add <literal>LWLock</literal> types to the list shown in
|
Extensions can add <literal>LWLock</literal> types to the list shown in
|
||||||
<xref linkend="wait-event-lwlock-table"/>. In some cases, the name
|
<xref linkend="wait-event-lwlock-table"/>. In some cases, the name
|
||||||
assigned by an extension will not be available in all server processes;
|
assigned by an extension will not be available in all server processes;
|
||||||
so a wait event might be reported as
|
so an <literal>LWLock</literal> wait event might be reported as
|
||||||
just <quote><literal>extension</literal></quote> rather than the
|
just <quote><literal>extension</literal></quote> rather than the
|
||||||
extension-assigned name.
|
extension-assigned name.
|
||||||
</para>
|
</para>
|
||||||
|
@ -2095,17 +2093,18 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>PgSleep</literal></entry>
|
<entry><literal>PgSleep</literal></entry>
|
||||||
<entry>Waiting in process that called <function>pg_sleep</function>.</entry>
|
<entry>Waiting due to a call to <function>pg_sleep</function> or
|
||||||
|
a sibling function.</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>RecoveryApplyDelay</literal></entry>
|
<entry><literal>RecoveryApplyDelay</literal></entry>
|
||||||
<entry>Waiting to apply WAL at recovery because it is delayed.</entry>
|
<entry>Waiting to apply WAL during recovery because of a delay
|
||||||
|
setting.</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>RecoveryRetrieveRetryInterval</literal></entry>
|
<entry><literal>RecoveryRetrieveRetryInterval</literal></entry>
|
||||||
<entry>Waiting when WAL data is not available from any kind of sources
|
<entry>Waiting during recovery when WAL data is not available from any
|
||||||
(<filename>pg_wal</filename>, archive or stream) before trying
|
source (<filename>pg_wal</filename>, archive or stream).</entry>
|
||||||
again to retrieve WAL data, at recovery.</entry>
|
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>VacuumDelay</literal></entry>
|
<entry><literal>VacuumDelay</literal></entry>
|
||||||
|
|
|
@ -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[] = {
|
||||||
"tuple",
|
"tuple",
|
||||||
"transactionid",
|
"transactionid",
|
||||||
"virtualxid",
|
"virtualxid",
|
||||||
"speculative token",
|
"spectoken",
|
||||||
"object",
|
"object",
|
||||||
"userlock",
|
"userlock",
|
||||||
"advisory"
|
"advisory"
|
||||||
|
|
|
@ -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:
|
||||||
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:
|
||||||
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" {
|
||||||
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;
|
||||||
|
|
Loading…
Reference in New Issue