postgresql/src/test/modules
Masahiko Sawada 2d8f56dabb Rethink create and attach APIs of shared TidStore.
Previously, the behavior of TidStoreCreate() was inconsistent between
local and shared TidStore instances in terms of memory limitation. For
local TidStore, a memory context was created with initial and maximum
memory block sizes, as well as a minimum memory context size, based on
the specified max_bytes values. However, for shared TidStore, the
provided DSA area was used for TID storage. Although commit bb952c8c8b
allowed specifying the initial and maximum DSA segment sizes, callers
would have needed to clamp their own limits, which was not consistent
and user-friendly.

With this commit, when creating a shared TidStore, a dedicated DSA
area is created for TID storage instead of using a provided DSA
area. The initial and maximum DSA segment sizes are chosen based on
the specified max_bytes. Other processes can attach to the shared
TidStore using the handle of the created DSA returned by the new
TidStoreGetDSA() function and the DSA pointer returned by
TidStoreGetHandle(). The created DSA has the same lifetime as the
shared TidStore and is deleted when all processes detach from it.

To improve clarity, the TidStoreCreate() function has been divided
into two separate functions: TidStoreCreateLocal() and
TidStoreCreateShared().

Reviewed-by: John Naylor
Discussion: https://postgr.es/m/CAD21AoAyc1j%3DBCdUqZfk6qbdjZ68UgRx1Gkpk0oah4K7S0Ri9g%40mail.gmail.com
2024-03-28 10:03:28 +09:00
..
brin Update copyright for 2024 2024-01-03 20:49:05 -05:00
commit_ts Update copyright for 2024 2024-01-03 20:49:05 -05:00
delay_execution Update copyright for 2024 2024-01-03 20:49:05 -05:00
dummy_index_am Update copyright for 2024 2024-01-03 20:49:05 -05:00
dummy_seclabel Update copyright for 2024 2024-01-03 20:49:05 -05:00
gin Fix backstop in gin test if injection point is not reached 2024-03-15 17:55:12 +02:00
injection_points Try to unbreak injection-fault tests in the buildfarm 2024-03-15 15:22:12 +02:00
ldap_password_func Make the order of the header file includes consistent 2024-03-13 15:07:00 +01:00
libpq_pipeline Put libpq_pipeline cancel test back 2024-03-18 13:14:55 +01:00
plsample Update copyright for 2024 2024-01-03 20:49:05 -05:00
spgist_name_ops Update copyright for 2024 2024-01-03 20:49:05 -05:00
ssl_passphrase_callback Activate perlcritic InputOutput::RequireCheckedSyscalls and fix resulting warnings 2024-03-19 07:09:31 +01:00
test_bloomfilter Update copyright for 2024 2024-01-03 20:49:05 -05:00
test_copy_callbacks Update copyright for 2024 2024-01-03 20:49:05 -05:00
test_custom_rmgrs Update copyright for 2024 2024-01-03 20:49:05 -05:00
test_ddl_deparse Support identity columns in partitioned tables 2024-01-16 17:24:52 +01:00
test_dsa Make the order of the header file includes consistent 2024-03-13 15:07:00 +01:00
test_dsm_registry Introduce the dynamic shared memory registry. 2024-01-19 14:24:36 -06:00
test_extensions Explicitly list dependent types as extension members in pg_depend. 2024-03-04 14:49:36 -05:00
test_ginpostinglist Fix some typos 2024-01-22 13:55:25 +09:00
test_integerset Update copyright for 2024 2024-01-03 20:49:05 -05:00
test_lfind Update copyright for 2024 2024-01-03 20:49:05 -05:00
test_misc Use locale-aware value for \watch in 005_timeouts.pl 2024-03-15 21:37:17 +02:00
test_oat_hooks Fix search_path to a safe value during maintenance operations. 2024-03-04 17:31:38 -08:00
test_parser Update copyright for 2024 2024-01-03 20:49:05 -05:00
test_pg_dump Add "--exclude-extension" to pg_dump's options. 2024-03-20 08:05:44 +00:00
test_predtest Refactor predicate_{implied,refuted}_by_simple_clause. 2024-03-25 17:45:15 -04:00
test_radixtree Revert "Fix link error for test_radixtree module on Windows" 2024-03-08 11:09:15 +07:00
test_rbtree Update copyright for 2024 2024-01-03 20:49:05 -05:00
test_regex Update copyright for 2024 2024-01-03 20:49:05 -05:00
test_resowner Update copyright for 2024 2024-01-03 20:49:05 -05:00
test_rls_hooks Update copyright for 2024 2024-01-03 20:49:05 -05:00
test_shm_mq Update copyright for 2024 2024-01-03 20:49:05 -05:00
test_slru Improve performance of subsystems on top of SLRU 2024-02-28 17:05:31 +01:00
test_tidstore Rethink create and attach APIs of shared TidStore. 2024-03-28 10:03:28 +09:00
unsafe_tests Update copyright for 2024 2024-01-03 20:49:05 -05:00
worker_spi Make the order of the header file includes consistent 2024-03-13 15:07:00 +01:00
xid_wraparound Fix meson installation of xid_wraparound test. 2024-02-08 17:03:59 +09:00
Makefile Add TIDStore, to store sets of TIDs (ItemPointerData) efficiently. 2024-03-21 10:08:42 +09:00
README Add an enforcement mechanism for global object names in regression tests. 2019-06-29 11:34:00 -04:00
meson.build Add TIDStore, to store sets of TIDs (ItemPointerData) efficiently. 2024-03-21 10:08:42 +09:00

README

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.