mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
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
This commit is contained in:
@ -116,6 +116,7 @@ CREATE EXTENSION <replaceable>module_name</replaceable>;
|
||||
&isn;
|
||||
&lo;
|
||||
<ree;
|
||||
&oldsnapshot;
|
||||
&pageinspect;
|
||||
&passwordcheck;
|
||||
&pgbuffercache;
|
||||
|
@ -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">
|
||||
|
33
doc/src/sgml/oldsnapshot.sgml
Normal file
33
doc/src/sgml/oldsnapshot.sgml
Normal file
@ -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>
|
Reference in New Issue
Block a user