mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-15 08:20:16 +08:00
aecf5ee2bb
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
15 lines
549 B
SQL
15 lines
549 B
SQL
/* contrib/old_snapshot/old_snapshot--1.0.sql */
|
|
|
|
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
|
|
\echo Use "CREATE EXTENSION old_snapshot" to load this file. \quit
|
|
|
|
-- Show visibility map and page-level visibility information for each block.
|
|
CREATE FUNCTION pg_old_snapshot_time_mapping(array_offset OUT int4,
|
|
end_timestamp OUT timestamptz,
|
|
newest_xmin OUT xid)
|
|
RETURNS SETOF record
|
|
AS 'MODULE_PATHNAME', 'pg_old_snapshot_time_mapping'
|
|
LANGUAGE C STRICT;
|
|
|
|
-- XXX. Do we want REVOKE commands here?
|