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,
19 OUT reltablespace oid,
22 OUT relforknumber int2,
23 OUT relblocknumber int8,
25 OUT resource_manager text,
27 OUT record_length int4,
28 OUT main_data_length int4,
29 OUT block_data_length int4,
30 OUT block_fpi_length int4,
31 OUT block_fpi_info text[],
34 OUT block_fpi_data bytea
37 AS 'MODULE_PATHNAME', 'pg_get_wal_block_info'
38 LANGUAGE C STRICT PARALLEL SAFE;
40 REVOKE EXECUTE ON FUNCTION pg_get_wal_block_info(pg_lsn, pg_lsn) FROM PUBLIC;
41 GRANT EXECUTE ON FUNCTION pg_get_wal_block_info(pg_lsn, pg_lsn) TO pg_read_server_files;