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

Commit faac769

Browse files
committed
Minor editorial improvements to txid functions' documentation: put back
some text that got dropped, improve markup, improve descriptions of snapshot components.
1 parent c00055e commit faac769

File tree

1 file changed

+29
-28
lines changed

1 file changed

+29
-28
lines changed

doc/src/sgml/func.sgml

+29-28
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.409 2007/11/05 16:57:23 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.410 2007/11/05 17:40:21 tgl Exp $ -->
22

33
<chapter id="functions">
44
<title>Functions and Operators</title>
@@ -11514,6 +11514,13 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
1151411514
<primary>txid_visible_in_snapshot</primary>
1151511515
</indexterm>
1151611516

11517+
<para>
11518+
The functions shown in <xref linkend="functions-txid-snapshot">
11519+
export server internal transaction information to user level. The main
11520+
use of these functions is to determine which transactions were committed
11521+
between two snapshots.
11522+
</para>
11523+
1151711524
<table id="functions-txid-snapshot">
1151811525
<title>Transaction IDs and snapshots</title>
1151911526
<tgroup cols="3">
@@ -11557,27 +11564,22 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
1155711564
</table>
1155811565

1155911566
<para>
11560-
The internal transaction ID type (<type>xid</>) is 32 bits wide and
11561-
so it wraps around every 4 billion transactions. However, these
11562-
functions export a 64-bit format that is extended with an
11563-
<quote>epoch</> counter so that it will not wrap around for the life
11564-
of an installation. The main use of these functions is to determine
11565-
which transactions were committed between two snapshots.
11567+
The internal transaction ID type (<type>xid</>) is 32 bits wide and so
11568+
it wraps around every 4 billion transactions. However, these functions
11569+
export a 64-bit format that is extended with an <quote>epoch</> counter
11570+
so that it will not wrap around for the life of an installation.
11571+
The data type used by these functions, <type>txid_snapshot</type>,
11572+
stores information about transaction ID
11573+
visibility at a particular moment in time. Its components are
11574+
described in <xref linkend="functions-txid-snapshot-parts">.
1156611575
</para>
1156711576

11568-
<para>
11569-
The data type <type>txid_snapshot</type> stores info about transaction ID
11570-
visibility at a particular moment in time. The components are
11571-
described in <xref linkend="datatype-txid-snapshot-parts">.
11572-
</para>
11573-
11574-
<table id="datatype-txid-snapshot-parts">
11577+
<table id="functions-txid-snapshot-parts">
1157511578
<title>Snapshot components</title>
1157611579
<tgroup cols="2">
1157711580
<thead>
1157811581
<row>
1157911582
<entry>Name</entry>
11580-
<entry>Query Function</entry>
1158111583
<entry>Description</entry>
1158211584
</row>
1158311585
</thead>
@@ -11586,30 +11588,29 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
1158611588

1158711589
<row>
1158811590
<entry><type>xmin</type></entry>
11589-
<entry>txid_snapshot_xmin()</entry>
1159011591
<entry>
11591-
Earliest transaction ID that is still active. All earlier
11592+
Earliest transaction ID (txid) that is still active. All earlier
1159211593
transactions will either be committed and visible, or rolled
1159311594
back and dead.
1159411595
</entry>
1159511596
</row>
1159611597

1159711598
<row>
1159811599
<entry><type>xmax</type></entry>
11599-
<entry>txid_snapshot_xmax()</entry>
1160011600
<entry>
11601-
Next unassigned txid. All txids later than this one are
11602-
unassigned, and thus invisible.
11601+
First as-yet-unassigned txid. All txids later than this one are
11602+
not yet started as of the time of the snapshot, and thus invisible.
1160311603
</entry>
1160411604
</row>
1160511605

1160611606
<row>
1160711607
<entry><type>xip_list</type></entry>
11608-
<entry>txid_snapshot_xip()</entry>
1160911608
<entry>
11610-
Active txids at the time of snapshot. All of them are between
11611-
xmin and xmax. A txid that is <literal>xmin &lt;= txid &lt;
11612-
xmax</literal> and not in this list is visible.
11609+
Active txids at the time of the snapshot. All of them are between
11610+
<literal>xmin</> and <literal>xmax</>. A txid that is
11611+
<literal>xmin &lt;= txid &lt; xmax</literal> and not in this list was
11612+
already completed at the time of the snapshot, and thus either visible
11613+
or dead according to its commit status.
1161311614
</entry>
1161411615
</row>
1161511616

@@ -11618,11 +11619,11 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
1161811619
</table>
1161911620

1162011621
<para>
11621-
Snapshot's textual representation is <literal>[xmin]:[xmax]:[xip_list]</literal>
11622-
for example <literal>10:20:10,14,15</literal> means
11623-
<literal>xmin=10 xmax=20 xip_list=10,14,15</literal>.
11622+
<type>txid_snapshot</>'s textual representation is
11623+
<literal><replaceable>xmin</>:<replaceable>xmax</>:<replaceable>xip_list</></literal>.
11624+
For example <literal>10:20:10,14,15</literal> means
11625+
<literal>xmin=10, xmax=20, xip_list=10, 14, 15</literal>.
1162411626
</para>
11625-
1162611627
</sect1>
1162711628

1162811629
<sect1 id="functions-admin">

0 commit comments

Comments
 (0)