postgresql/src/test/modules
Álvaro Herrera f0ad417161
BRIN autosummarization may need a snapshot
It's possible to define BRIN indexes on functions that require a
snapshot to run, but the autosummarization feature introduced by commit
7526e10224 fails to provide one.  This causes autovacuum to leave a
BRIN placeholder tuple behind after a failed work-item execution, making
such indexes less efficient.  Repair by obtaining a snapshot prior to
running the task, and add a test to verify this behavior.

Author: Álvaro Herrera <alvherre@kurilemu.de>
Reported-by: Giovanni Fabris <giovanni.fabris@icon.it>
Reported-by: Arthur Nascimento <tureba@gmail.com>
Backpatch-through: 13
Discussion: https://postgr.es/m/202511031106.h4fwyuyui6fz@alvherre.pgsql
2025-11-04 13:23:26 +01:00
..
brin BRIN autosummarization may need a snapshot 2025-11-04 13:23:26 +01:00
commit_ts Initial pgindent and pgperltidy run for v14. 2021-05-12 13:14:10 -04:00
delay_execution Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
dummy_index_am Pass down "logically unchanged index" hint. 2021-01-13 08:11:00 -08:00
dummy_seclabel Update copyright for 2021 2021-01-02 13:06:25 -05:00
libpq_pipeline Fix incorrect error message in libpq_pipeline 2023-06-23 17:50:28 +09:00
plsample Update copyright for 2021 2021-01-02 13:06:25 -05:00
snapshot_too_old Reduce test runtime of src/test/modules/snapshot_too_old. 2022-08-03 11:14:55 -04:00
spgist_name_ops Prevent infinite insertion loops in spgdoinsert(). 2021-05-14 15:07:34 -04:00
ssl_passphrase_callback Add a copyright notice to perl files lacking one. 2021-05-07 10:56:14 -04:00
test_bloomfilter Update copyright for 2021 2021-01-02 13:06:25 -05:00
test_ddl_deparse Fix DDL deparse of CREATE OPERATOR CLASS 2022-05-20 18:52:55 +02:00
test_escape With GB18030, prevent SIGSEGV from reading past end of allocation. 2025-05-05 04:52:08 -07:00
test_extensions Reject substituting extension schemas or owners matching ["$'\]. 2023-08-07 06:06:00 -07:00
test_ginpostinglist Update copyright for 2021 2021-01-02 13:06:25 -05:00
test_integerset Update copyright for 2021 2021-01-02 13:06:25 -05:00
test_misc Fix assertion failure with replication slot release in single-user mode 2025-08-20 15:00:16 +09:00
test_parser Update copyright for 2021 2021-01-02 13:06:25 -05:00
test_pg_dump Drop global objects after completed test 2024-09-24 12:10:30 +09:00
test_predtest Tighten test_predtest's input checks, and improve error messages. 2024-06-07 16:45:56 -04:00
test_rbtree Update copyright for 2021 2021-01-02 13:06:25 -05:00
test_regex Avoid assertion due to disconnected NFA sub-graphs in regex parsing. 2024-11-15 18:23:38 -05:00
test_rls_hooks Update copyright for 2021 2021-01-02 13:06:25 -05:00
test_shm_mq Use correct DatumGet*() function in test_shm_mq_main(). 2025-06-27 13:37:26 -05:00
unsafe_tests Fix per-session activation of ALTER {ROLE|DATABASE} SET role. 2024-11-15 20:40:00 -08:00
worker_spi Update copyright for 2021 2021-01-02 13:06:25 -05:00
Makefile Add test of various escape functions 2025-02-10 10:03:40 -05:00
README Add an enforcement mechanism for global object names in regression tests. 2019-06-29 11:34:00 -04:00

Test extensions and libraries
=============================

src/test/modules contains PostgreSQL extensions that are primarily or entirely
intended for testing PostgreSQL and/or to serve as example code. The extensions
here aren't intended to be installed in a production server and aren't suitable
for "real work".

Furthermore, while you can do "make install" and "make installcheck" in
this directory or its children, it is NOT ADVISABLE to do so with a server
containing valuable data.  Some of these tests may have undesirable
side-effects on roles or other global objects within the tested server.
"make installcheck-world" at the top level does not recurse into this
directory.

Most extensions have their own pg_regress tests or isolationtester specs. Some
are also used by tests elsewhere in the tree.

If you're adding new hooks or other functionality exposed as C-level API this
is where to add the tests for it.