mirror of
https://github.com/hanzoai/postgres.git
synced 2026-10-30 18:33:07 +00:00
Adds a new function, validating two kinds of invariants on a GIN index: - parent-child consistency: Paths in a GIN graph have to contain consistent keys. Tuples on parent pages consistently include tuples from child pages; parent tuples do not require any adjustments. - balanced-tree / graph: Each internal page has at least one downlink, and can reference either only leaf pages or only internal pages. The GIN verification is based on work by Grigory Kryachko, reworked by Heikki Linnakangas and with various improvements by Andrey Borodin. Investigation and fixes for multiple bugs by Kirill Reshke. Author: Grigory Kryachko <[email protected]> Author: Heikki Linnakangas <[email protected]> Author: Andrey Borodin <[email protected]> Reviewed-By: José Villanova <[email protected]> Reviewed-By: Aleksander Alekseev <[email protected]> Reviewed-By: Nikolay Samokhvalov <[email protected]> Reviewed-By: Andres Freund <[email protected]> Reviewed-By: Tomas Vondra <[email protected]> Reviewed-By: Kirill Reshke <[email protected]> Reviewed-By: Mark Dilger <[email protected]> Reviewed-By: Peter Geoghegan <[email protected]> Discussion: https://postgr.es/m/45AC9B0A-2B45-40EE-B08F-BDCF5739D1E1%40yandex-team.ru
15 lines
406 B
SQL
15 lines
406 B
SQL
/* contrib/amcheck/amcheck--1.4--1.5.sql */
|
|
|
|
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
|
|
\echo Use "ALTER EXTENSION amcheck UPDATE TO '1.5'" to load this file. \quit
|
|
|
|
|
|
-- gin_index_check()
|
|
--
|
|
CREATE FUNCTION gin_index_check(index regclass)
|
|
RETURNS VOID
|
|
AS 'MODULE_PATHNAME', 'gin_index_check'
|
|
LANGUAGE C STRICT;
|
|
|
|
REVOKE ALL ON FUNCTION gin_index_check(regclass) FROM PUBLIC;
|