mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-17 13:10:38 +00:00
This makes it much more convenient to use in the common case that you want to flush all the WAL. (Passing pg_current_wal_insert_lsn() as the argument doesn't work for the same reasons as explained in the comments: we need to be back off to the beginning of a page if the previous record ended at page boundary.) I plan to use this to fix the issue that Arseny Sher called out at https://github.com/neondatabase/neon/pull/7288#discussion_r1660063852
48 lines
1.4 KiB
SQL
48 lines
1.4 KiB
SQL
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
|
|
\echo Use "CREATE EXTENSION neon_test_utils" to load this file. \quit
|
|
|
|
CREATE FUNCTION test_consume_xids(nxids int)
|
|
RETURNS VOID
|
|
AS 'MODULE_PATHNAME', 'test_consume_xids'
|
|
LANGUAGE C STRICT
|
|
PARALLEL UNSAFE;
|
|
|
|
CREATE FUNCTION test_consume_cpu(seconds int)
|
|
RETURNS VOID
|
|
AS 'MODULE_PATHNAME', 'test_consume_cpu'
|
|
LANGUAGE C STRICT
|
|
PARALLEL UNSAFE;
|
|
|
|
CREATE FUNCTION test_consume_memory(megabytes int)
|
|
RETURNS VOID
|
|
AS 'MODULE_PATHNAME', 'test_consume_memory'
|
|
LANGUAGE C STRICT
|
|
PARALLEL UNSAFE;
|
|
|
|
CREATE FUNCTION test_release_memory(megabytes int DEFAULT NULL)
|
|
RETURNS VOID
|
|
AS 'MODULE_PATHNAME', 'test_release_memory'
|
|
LANGUAGE C
|
|
PARALLEL UNSAFE;
|
|
|
|
CREATE FUNCTION clear_buffer_cache()
|
|
RETURNS VOID
|
|
AS 'MODULE_PATHNAME', 'clear_buffer_cache'
|
|
LANGUAGE C STRICT
|
|
PARALLEL UNSAFE;
|
|
|
|
CREATE FUNCTION get_raw_page_at_lsn(relname text, forkname text, blocknum int8, request_lsn pg_lsn, not_modified_since pg_lsn)
|
|
RETURNS bytea
|
|
AS 'MODULE_PATHNAME', 'get_raw_page_at_lsn'
|
|
LANGUAGE C PARALLEL UNSAFE;
|
|
|
|
CREATE FUNCTION get_raw_page_at_lsn(tbspc oid, db oid, relfilenode oid, forknum int8, blocknum int8, request_lsn pg_lsn, not_modified_since pg_lsn)
|
|
RETURNS bytea
|
|
AS 'MODULE_PATHNAME', 'get_raw_page_at_lsn_ex'
|
|
LANGUAGE C PARALLEL UNSAFE;
|
|
|
|
CREATE FUNCTION neon_xlogflush(lsn pg_lsn DEFAULT NULL)
|
|
RETURNS VOID
|
|
AS 'MODULE_PATHNAME', 'neon_xlogflush'
|
|
LANGUAGE C PARALLEL UNSAFE;
|