diff options
author | Robert Haas <rhaas@postgresql.org> | 2020-09-24 13:55:47 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2020-09-24 13:55:47 -0400 |
commit | aecf5ee2bb36c597d3c6142e367e38d67816c777 (patch) | |
tree | 6ae8f565726d6dd2f9164725c6891aecb906e573 /doc/src | |
parent | f5ea92e8d620a1260d3427b92fa350bbf36594a2 (diff) | |
download | postgresql-aecf5ee2bb36c597d3c6142e367e38d67816c777.tar.gz postgresql-aecf5ee2bb36c597d3c6142e367e38d67816c777.zip |
Add new 'old_snapshot' contrib module.
You can use this to view the contents of the time to XID mapping
which the server maintains when old_snapshot_threshold != -1.
Being able to view that information may be interesting for users,
and it's definitely useful for figuring out whether the mapping
is being maintained correctly. It isn't, so that will need to be
fixed in a subsequent commit.
Patch by me, reviewed by Thomas Munro, Dilip Kumar, Hamid Akhtar.
Discussion: http://postgr.es/m/CA+TgmoY=aqf0zjTD+3dUWYkgMiNDegDLFjo+6ze=Wtpik+3XqA@mail.gmail.com
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/contrib.sgml | 1 | ||||
-rw-r--r-- | doc/src/sgml/filelist.sgml | 1 | ||||
-rw-r--r-- | doc/src/sgml/oldsnapshot.sgml | 33 |
3 files changed, 35 insertions, 0 deletions
diff --git a/doc/src/sgml/contrib.sgml b/doc/src/sgml/contrib.sgml index c82dde27263..4e833d79ef9 100644 --- a/doc/src/sgml/contrib.sgml +++ b/doc/src/sgml/contrib.sgml @@ -116,6 +116,7 @@ CREATE EXTENSION <replaceable>module_name</replaceable>; &isn; &lo; <ree; + &oldsnapshot; &pageinspect; &passwordcheck; &pgbuffercache; diff --git a/doc/src/sgml/filelist.sgml b/doc/src/sgml/filelist.sgml index 828396d4a9e..47271addc14 100644 --- a/doc/src/sgml/filelist.sgml +++ b/doc/src/sgml/filelist.sgml @@ -129,6 +129,7 @@ <!ENTITY lo SYSTEM "lo.sgml"> <!ENTITY ltree SYSTEM "ltree.sgml"> <!ENTITY oid2name SYSTEM "oid2name.sgml"> +<!ENTITY oldsnapshot SYSTEM "oldsnapshot.sgml"> <!ENTITY pageinspect SYSTEM "pageinspect.sgml"> <!ENTITY passwordcheck SYSTEM "passwordcheck.sgml"> <!ENTITY pgbuffercache SYSTEM "pgbuffercache.sgml"> diff --git a/doc/src/sgml/oldsnapshot.sgml b/doc/src/sgml/oldsnapshot.sgml new file mode 100644 index 00000000000..a665ae72e78 --- /dev/null +++ b/doc/src/sgml/oldsnapshot.sgml @@ -0,0 +1,33 @@ +<!-- doc/src/sgml/oldsnapshot.sgml --> + +<sect1 id="oldsnapshot" xreflabel="old_snapshot"> + <title>old_snapshot</title> + + <indexterm zone="oldsnapshot"> + <primary>old_snapshot</primary> + </indexterm> + + <para> + The <filename>old_snapshot</filename> module allows inspection + of the server state that is used to implement + <xref linkend="guc-old-snapshot-threshold" />. + </para> + + <sect2> + <title>Functions</title> + + <variablelist> + <varlistentry> + <term><function>pg_old_snapshot_time_mapping(array_offset OUT int4, end_timestamp OUT timestamptz, newest_xmin OUT xid) returns setof record</function></term> + <listitem> + <para> + Returns all of the entries in the server's timestamp to XID mapping. + Each entry represents the newest xmin of any snapshot taken in the + corresponding minute. + </para> + </listitem> + </varlistentry> + </variablelist> + </sect2> + +</sect1> |