diff options
author | Heikki Linnakangas | 2024-03-03 17:38:22 +0000 |
---|---|---|
committer | Heikki Linnakangas | 2024-03-03 17:38:22 +0000 |
commit | 024c521117579a6d356050ad3d78fdc95e44eefa (patch) | |
tree | 27a2d9588eefc43c4bc3ac7b31f8a6740a2de34b /doc/src | |
parent | ab355e3a88de745607f6dd4c21f0119b5c68f2ad (diff) |
Replace BackendIds with 0-based ProcNumbers
Now that BackendId was just another index into the proc array, it was
redundant with the 0-based proc numbers used in other places. Replace
all usage of backend IDs with proc numbers.
The only place where the term "backend id" remains is in a few pgstat
functions that expose backend IDs at the SQL level. Those IDs are now
in fact 0-based ProcNumbers too, but the documentation still calls
them "backend ids". That term still seems appropriate to describe what
the numbers are, so I let it be.
One user-visible effect is that pg_temp_0 is now a valid temp schema
name, for backend with ProcNumber 0.
Reviewed-by: Andres Freund
Discussion: https://www.postgresql.org/message-id/[email protected]
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/config.sgml | 2 | ||||
-rw-r--r-- | doc/src/sgml/monitoring.sgml | 18 | ||||
-rw-r--r-- | doc/src/sgml/storage.sgml | 2 | ||||
-rw-r--r-- | doc/src/sgml/xact.sgml | 4 |
4 files changed, 13 insertions, 13 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 43b1a132a2c..b38cbd714aa 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -7495,7 +7495,7 @@ local0.* /var/log/postgresql </row> <row> <entry><literal>%v</literal></entry> - <entry>Virtual transaction ID (backendID/localXID); see + <entry>Virtual transaction ID (procNumber/localXID); see <xref linkend="transaction-id"/></entry> <entry>no</entry> </row> diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 4b8b38b70ef..8aca08140ea 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -4940,7 +4940,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage access functions can be used; these are shown in <xref linkend="monitoring-stats-backend-funcs-table"/>. These access functions use the session's backend ID number, which is a - small positive integer that is distinct from the backend ID of any + small integer (>= 0) that is distinct from the backend ID of any concurrent session, although a session's ID can be recycled as soon as it exits. The backend ID is used, among other things, to identify the session's temporary schema if it has one. @@ -6813,7 +6813,7 @@ FROM pg_stat_get_backend_idset() AS backendid; arg0 contains the fork to be extended. arg1, arg2, and arg3 contain the tablespace, database, and relation OIDs identifying the relation. arg4 is the ID of the backend which created the temporary relation for a - local buffer, or <symbol>InvalidBackendId</symbol> (-1) for a shared + local buffer, or <symbol>INVALID_PROC_NUMBER</symbol> (-1) for a shared buffer. arg5 is the number of blocks the caller would like to extend by.</entry> </row> @@ -6824,7 +6824,7 @@ FROM pg_stat_get_backend_idset() AS backendid; arg0 contains the fork to be extended. arg1, arg2, and arg3 contain the tablespace, database, and relation OIDs identifying the relation. arg4 is the ID of the backend which created the temporary relation for a - local buffer, or <symbol>InvalidBackendId</symbol> (-1) for a shared + local buffer, or <symbol>INVALID_PROC_NUMBER</symbol> (-1) for a shared buffer. arg5 is the number of blocks the relation was extended by, this can be less than the number in the <literal>buffer-extend-start</literal> due to resource @@ -6839,7 +6839,7 @@ FROM pg_stat_get_backend_idset() AS backendid; arg2, arg3, and arg4 contain the tablespace, database, and relation OIDs identifying the relation. arg5 is the ID of the backend which created the temporary relation for a - local buffer, or <symbol>InvalidBackendId</symbol> (-1) for a shared buffer. + local buffer, or <symbol>INVALID_PROC_NUMBER</symbol> (-1) for a shared buffer. </entry> </row> <row> @@ -6850,7 +6850,7 @@ FROM pg_stat_get_backend_idset() AS backendid; arg2, arg3, and arg4 contain the tablespace, database, and relation OIDs identifying the relation. arg5 is the ID of the backend which created the temporary relation for a - local buffer, or <symbol>InvalidBackendId</symbol> (-1) for a shared buffer. + local buffer, or <symbol>INVALID_PROC_NUMBER</symbol> (-1) for a shared buffer. arg6 is true if the buffer was found in the pool, false if not.</entry> </row> <row> @@ -6903,7 +6903,7 @@ FROM pg_stat_get_backend_idset() AS backendid; arg2, arg3, and arg4 contain the tablespace, database, and relation OIDs identifying the relation. arg5 is the ID of the backend which created the temporary relation for a - local buffer, or <symbol>InvalidBackendId</symbol> (-1) for a shared buffer.</entry> + local buffer, or <symbol>INVALID_PROC_NUMBER</symbol> (-1) for a shared buffer.</entry> </row> <row> <entry><literal>smgr-md-read-done</literal></entry> @@ -6913,7 +6913,7 @@ FROM pg_stat_get_backend_idset() AS backendid; arg2, arg3, and arg4 contain the tablespace, database, and relation OIDs identifying the relation. arg5 is the ID of the backend which created the temporary relation for a - local buffer, or <symbol>InvalidBackendId</symbol> (-1) for a shared buffer. + local buffer, or <symbol>INVALID_PROC_NUMBER</symbol> (-1) for a shared buffer. arg6 is the number of bytes actually read, while arg7 is the number requested (if these are different it indicates a short read).</entry> </row> @@ -6925,7 +6925,7 @@ FROM pg_stat_get_backend_idset() AS backendid; arg2, arg3, and arg4 contain the tablespace, database, and relation OIDs identifying the relation. arg5 is the ID of the backend which created the temporary relation for a - local buffer, or <symbol>InvalidBackendId</symbol> (-1) for a shared buffer.</entry> + local buffer, or <symbol>INVALID_PROC_NUMBER</symbol> (-1) for a shared buffer.</entry> </row> <row> <entry><literal>smgr-md-write-done</literal></entry> @@ -6935,7 +6935,7 @@ FROM pg_stat_get_backend_idset() AS backendid; arg2, arg3, and arg4 contain the tablespace, database, and relation OIDs identifying the relation. arg5 is the ID of the backend which created the temporary relation for a - local buffer, or <symbol>InvalidBackendId</symbol> (-1) for a shared buffer. + local buffer, or <symbol>INVALID_PROC_NUMBER</symbol> (-1) for a shared buffer. arg6 is the number of bytes actually written, while arg7 is the number requested (if these are different it indicates a short write).</entry> </row> diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml index 3ea4e5526df..652946db7d7 100644 --- a/doc/src/sgml/storage.sgml +++ b/doc/src/sgml/storage.sgml @@ -202,7 +202,7 @@ these files are named after the table or index's <firstterm>filenode</firstterm> which can be found in <structname>pg_class</structname>.<structfield>relfilenode</structfield>. But for temporary relations, the file name is of the form <literal>t<replaceable>BBB</replaceable>_<replaceable>FFF</replaceable></literal>, where <replaceable>BBB</replaceable> -is the backend ID of the backend which created the file, and <replaceable>FFF</replaceable> +is the process number of the backend which created the file, and <replaceable>FFF</replaceable> is the filenode number. In either case, in addition to the main file (a/k/a main fork), each table and index has a <firstterm>free space map</firstterm> (see <xref linkend="storage-fsm"/>), which stores information about free space available in diff --git a/doc/src/sgml/xact.sgml b/doc/src/sgml/xact.sgml index 07b94b11329..3aa7ee1383e 100644 --- a/doc/src/sgml/xact.sgml +++ b/doc/src/sgml/xact.sgml @@ -26,10 +26,10 @@ Every transaction is identified by a unique <literal>VirtualTransactionId</literal> (also called <literal>virtualXID</literal> or <literal>vxid</literal>), which - is comprised of a backend ID (or <literal>backendID</literal>) + is comprised of a backend's process number (or <literal>procNumber</literal>) and a sequentially-assigned number local to each backend, known as <literal>localXID</literal>. For example, the virtual transaction - ID <literal>4/12532</literal> has a <literal>backendID</literal> + ID <literal>4/12532</literal> has a <literal>procNumber</literal> of <literal>4</literal> and a <literal>localXID</literal> of <literal>12532</literal>. </para> |