
Add the 'checkunique' argument to bt_index_check() and bt_index_parent_check(). When the flag is specified the procedures will check the unique constraint violation for unique indexes. Only one heap entry for all equal keys in the index should be visible (including posting list entries). Report an error otherwise. pg_amcheck called with the --checkunique option will do the same check for all the indexes it checks. Author: Anastasia Lubennikova <lubennikovaav@gmail.com> Author: Pavel Borisov <pashkin.elfe@gmail.com> Author: Maxim Orlov <orlovmg@gmail.com> Reviewed-by: Mark Dilger <mark.dilger@enterprisedb.com> Reviewed-by: Zhihong Yu <zyu@yugabyte.com> Reviewed-by: Peter Geoghegan <pg@bowt.ie> Reviewed-by: Aleksander Alekseev <aleksander@timescale.com> Discussion: https://postgr.es/m/CALT9ZEHRn5xAM5boga0qnrCmPV52bScEK2QnQ1HmUZDD301JEg%40mail.gmail.com
50 lines
1003 B
Meson
50 lines
1003 B
Meson
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
|
|
|
|
amcheck_sources = files(
|
|
'verify_heapam.c',
|
|
'verify_nbtree.c',
|
|
)
|
|
|
|
if host_system == 'windows'
|
|
amcheck_sources += rc_lib_gen.process(win32ver_rc, extra_args: [
|
|
'--NAME', 'amcheck',
|
|
'--FILEDESC', 'amcheck - function for verifying relation integrity',])
|
|
endif
|
|
|
|
amcheck = shared_module('amcheck',
|
|
amcheck_sources,
|
|
kwargs: contrib_mod_args,
|
|
)
|
|
contrib_targets += amcheck
|
|
|
|
install_data(
|
|
'amcheck.control',
|
|
'amcheck--1.0.sql',
|
|
'amcheck--1.0--1.1.sql',
|
|
'amcheck--1.1--1.2.sql',
|
|
'amcheck--1.2--1.3.sql',
|
|
'amcheck--1.3--1.4.sql',
|
|
kwargs: contrib_data_args,
|
|
)
|
|
|
|
tests += {
|
|
'name': 'amcheck',
|
|
'sd': meson.current_source_dir(),
|
|
'bd': meson.current_build_dir(),
|
|
'regress': {
|
|
'sql': [
|
|
'check',
|
|
'check_btree',
|
|
'check_heap',
|
|
],
|
|
},
|
|
'tap': {
|
|
'tests': [
|
|
't/001_verify_heapam.pl',
|
|
't/002_cic.pl',
|
|
't/003_cic_2pc.pl',
|
|
't/004_verify_nbtree_unique.pl',
|
|
],
|
|
},
|
|
}
|