postgresql/src/test/modules
Michael Paquier b1e48bbe64 Include replication origins in SQL functions for commit timestamp
This includes two changes:
- Addition of a new function pg_xact_commit_timestamp_origin() able, for
a given transaction ID, to return the commit timestamp and replication
origin of this transaction.  An equivalent function existed in
pglogical.
- Addition of the replication origin to pg_last_committed_xact().

The commit timestamp manager includes already APIs able to return the
replication origin of a transaction on top of its commit timestamp, but
the code paths for replication origins were never stressed as those
functions have never looked for a replication origin, and the SQL
functions available have never included this information since their
introduction in 73c986a.

While on it, refactor a test of modules/commit_ts/ to use tstzrange() to
check that a transaction timestamp is within the wanted range, making
the test a bit easier to read.

Bump catalog version.

Author: Movead Li
Reviewed-by: Madan Kumar, Michael Paquier
Discussion: https://postgr.es/m/2020051116430836450630@highgo.ca
2020-07-12 20:47:15 +09:00
..
brin Add PGXS options to control TAP and isolation tests, take two 2018-12-03 09:27:35 +09:00
commit_ts Include replication origins in SQL functions for commit timestamp 2020-07-12 20:47:15 +09:00
dummy_index_am Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
dummy_seclabel doc: Fix naming of SELinux 2020-01-10 09:36:55 +09:00
snapshot_too_old Add PGXS options to control TAP and isolation tests, take two 2018-12-03 09:27:35 +09:00
ssl_passphrase_callback Make ssl certificate for ssl_passphrase_callback test via Makefile 2020-06-01 17:32:32 -04:00
test_bloomfilter Update copyrights for 2020 2020-01-01 12:21:45 -05:00
test_ddl_deparse Introduce xid8-based functions to replace txid_XXX. 2020-04-07 12:04:32 +12:00
test_extensions Add ALTER .. NO DEPENDS ON 2020-04-20 13:42:12 -04:00
test_ginpostinglist Update copyrights for 2020 2020-01-01 12:21:45 -05:00
test_integerset Update copyrights for 2020 2020-01-01 12:21:45 -05:00
test_misc tap tests: replace 'master' with 'primary'. 2020-07-08 12:39:56 -07:00
test_parser Remove support for upgrading extensions from "unpackaged" state. 2020-02-19 16:59:14 -05:00
test_pg_dump Refactor AlterExtensionContentsStmt grammar 2020-06-13 09:19:30 +02:00
test_predtest Update copyrights for 2020 2020-01-01 12:21:45 -05:00
test_rbtree Update copyrights for 2020 2020-01-01 12:21:45 -05:00
test_rls_hooks Introduce macros for typalign and typstorage constants. 2020-03-04 10:34:25 -05:00
test_shm_mq Spelling adjustments 2020-06-07 15:06:51 +02:00
unsafe_tests Remove junk in test file 2020-07-08 11:17:52 +02:00
worker_spi Update copyrights for 2020 2020-01-01 12:21:45 -05:00
Makefile Fix assorted portability issues in commit 896fcdb23. 2020-03-25 19:37:30 -04: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.