1 /* contrib/pg_walinspect/pg_walinspect--1.0--1.1.sql */
3 -- complain if script is sourced in psql, rather than via ALTER EXTENSION
4 \echo Use "ALTER EXTENSION pg_walinspect UPDATE TO '1.1'" to load this file. \quit
6 -- Unsupported functions after 1.1.
7 DROP FUNCTION pg_get_wal_records_info_till_end_of_wal(pg_lsn);
8 DROP FUNCTION pg_get_wal_stats_till_end_of_wal(pg_lsn, boolean);
11 -- pg_get_wal_block_info()
13 CREATE FUNCTION pg_get_wal_block_info(IN start_lsn pg_lsn,
15 IN show_data boolean DEFAULT true,
20 OUT reltablespace oid,
23 OUT relforknumber int2,
24 OUT relblocknumber int8,
26 OUT resource_manager text,
28 OUT record_length int4,
29 OUT main_data_length int4,
30 OUT block_data_length int4,
31 OUT block_fpi_length int4,
32 OUT block_fpi_info text[],
35 OUT block_fpi_data bytea
38 AS 'MODULE_PATHNAME', 'pg_get_wal_block_info'
39 LANGUAGE C STRICT PARALLEL SAFE;
41 REVOKE EXECUTE ON FUNCTION pg_get_wal_block_info(pg_lsn, pg_lsn, boolean) FROM PUBLIC;
42 GRANT EXECUTE ON FUNCTION pg_get_wal_block_info(pg_lsn, pg_lsn, boolean) TO pg_read_server_files;