mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-04 12:16:50 +02:00
c31cf1c03d
This function is able to extract the full page images from a range of records, specified as of input arguments start_lsn and end_lsn. Like the other functions of this module, an error is returned if using LSNs that do not reflect real system values. All the FPIs stored in a single record are extracted. The module's version is bumped to 1.1. Author: Bharath Rupireddy Reviewed-by: Bertrand Drouvot Discussion: https://postgr.es/m/CALj2ACVCcvzd7WiWvD=6_7NBvVB_r6G0EGSxL4F8vosAi6Se4g@mail.gmail.com
25 lines
733 B
SQL
25 lines
733 B
SQL
/* contrib/pg_walinspect/pg_walinspect--1.0--1.1.sql */
|
|
|
|
-- complain if script is sourced in psql, rather than via ALTER EXTENSION
|
|
\echo Use "ALTER EXTENSION pg_walinspect UPDATE TO '1.1'" to load this file. \quit
|
|
|
|
--
|
|
-- pg_get_wal_fpi_info()
|
|
--
|
|
CREATE FUNCTION pg_get_wal_fpi_info(IN start_lsn pg_lsn,
|
|
IN end_lsn pg_lsn,
|
|
OUT lsn pg_lsn,
|
|
OUT reltablespace oid,
|
|
OUT reldatabase oid,
|
|
OUT relfilenode oid,
|
|
OUT relblocknumber int8,
|
|
OUT forkname text,
|
|
OUT fpi bytea
|
|
)
|
|
RETURNS SETOF record
|
|
AS 'MODULE_PATHNAME', 'pg_get_wal_fpi_info'
|
|
LANGUAGE C STRICT PARALLEL SAFE;
|
|
|
|
REVOKE EXECUTE ON FUNCTION pg_get_wal_fpi_info(pg_lsn, pg_lsn) FROM PUBLIC;
|
|
GRANT EXECUTE ON FUNCTION pg_get_wal_fpi_info(pg_lsn, pg_lsn) TO pg_read_server_files;
|