Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4ef522c

Browse files
author
Liudmila Mantrova
committed
DOC: bug fix for 64-bit xids - PGPRO-578
1 parent 5d56a2d commit 4ef522c

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

doc/src/sgml/datatype.sgml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4605,13 +4605,16 @@ SELECT * FROM pg_attribute
46054605
<para>
46064606
Another identifier type used by the system is <type>xid</>, or transaction
46074607
(abbreviated <abbrev>xact</>) identifier. This is the data type of the system columns
4608-
<structfield>xmin</> and <structfield>xmax</>. Transaction identifiers are 32-bit quantities.
4608+
<structfield>xmin</> and <structfield>xmax</>.
4609+
In <productname>&productname;</productname>, transaction IDs
4610+
are implemented as 64-bit counters to prevent transaction ID wraparound.
4611+
For details, see <xref linkend="vacuum-for-wraparound">.
46094612
</para>
46104613

46114614
<para>
46124615
A third identifier type used by the system is <type>cid</>, or
46134616
command identifier. This is the data type of the system columns
4614-
<structfield>cmin</> and <structfield>cmax</>. Command identifiers are also 32-bit quantities.
4617+
<structfield>cmin</> and <structfield>cmax</>. Command identifiers are 32-bit quantities.
46154618
</para>
46164619

46174620
<para>

doc/src/sgml/ddl.sgml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,16 +1097,13 @@ CREATE TABLE circles (
10971097
</para>
10981098

10991099
<para>
1100-
Transaction identifiers are also 32-bit quantities. In a
1101-
long-lived database it is possible for transaction IDs to wrap
1102-
around. This is not a fatal problem given appropriate maintenance
1103-
procedures; see <xref linkend="maintenance"> for details. It is
1104-
unwise, however, to depend on the uniqueness of transaction IDs
1105-
over the long term (more than one billion transactions).
1100+
In <productname>&productname;</productname>, transaction IDs
1101+
are implemented as 64-bit counters to prevent transaction ID wraparound.
1102+
For details, see <xref linkend="vacuum-for-wraparound">.
11061103
</para>
11071104

11081105
<para>
1109-
Command identifiers are also 32-bit quantities. This creates a hard limit
1106+
Command identifiers are 32-bit quantities. This creates a hard limit
11101107
of 2<superscript>32</> (4 billion) <acronym>SQL</acronym> commands
11111108
within a single transaction. In practice this limit is not a
11121109
problem &mdash; note that the limit is on the number of

doc/src/sgml/func.sgml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17771,8 +17771,9 @@ SELECT collation for ('foo' COLLATE "de_DE");
1777117771
</table>
1777217772

1777317773
<para>
17774-
The internal transaction ID type (<type>xid</>) is 32 bits wide and
17775-
wraps around every 4 billion transactions. However, these functions
17774+
In <productname>&productname;</productname>, transaction IDs
17775+
are implemented as 64-bit counters to prevent transaction ID wraparound.
17776+
The following functions
1777617777
export a 64-bit format that is extended with an <quote>epoch</> counter
1777717778
so it will not wrap around during the life of an installation.
1777817779
The data type used by these functions, <type>txid_snapshot</type>,

doc/src/sgml/maintenance.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@
405405
<productname>Postgres Pro Enterprise 9.6</productname> introduced
406406
64-bit transaction IDs, which are not subject to wraparound and
407407
do not need modulo-2<superscript>32</> arithmetic to be compared.
408-
Each tuple header contain two XIDs, so extending them would lead to
408+
Each tuple header contains two XIDs, so extending them would lead to
409409
high overhead. For that reason on-page XIDs are still 32-bit, but
410410
each page's header contains an offset, called <firstterm>epoch</>,
411411
to which they are added before comparing with each other.

0 commit comments

Comments
 (0)