postgresql/src/test/modules
Andres Freund 9206ced1dc Clean up latch related code.
The larger part of this patch replaces usages of MyProc->procLatch
with MyLatch.  The latter works even early during backend startup,
where MyProc->procLatch doesn't yet.  While the affected code
shouldn't run in cases where it's not initialized, it might get copied
into places where it might.  Using MyLatch is simpler and a bit faster
to boot, so there's little point to stick with the previous coding.

While doing so I noticed some weaknesses around newly introduced uses
of latches that could lead to missed events, and an omitted
CHECK_FOR_INTERRUPTS() call in worker_spi.

As all the actual bugs are in v10 code, there doesn't seem to be
sufficient reason to backpatch this.

Author: Andres Freund
Discussion:
    https://postgr.es/m/20170606195321.sjmenrfgl2nu6j63@alap3.anarazel.de
    https://postgr.es/m/20170606210405.sim3yl6vpudhmufo@alap3.anarazel.de
Backpatch: -
2017-06-06 16:13:00 -07:00
..
brin Fix phony .PHONY. 2016-03-19 17:19:37 -04:00
commit_ts Post-PG 10 beta1 pgperltidy run 2017-05-17 19:01:23 -04:00
dummy_seclabel Rework the options syntax for logical replication commands 2017-05-12 08:57:49 -04:00
snapshot_too_old Add a regression test for snapshot too old with hash indexes. 2017-03-15 10:53:07 -04:00
test_ddl_deparse Remove deprecated COMMENT ON RULE syntax 2017-02-23 08:19:52 -05:00
test_extensions Ensure commands in extension scripts see the results of preceding DDL. 2017-05-02 18:06:09 -04:00
test_parser Remove contrib/tsearch2. 2017-02-13 11:06:11 -05:00
test_pg_dump Post-PG 10 beta1 pgperltidy run 2017-05-17 19:01:23 -04:00
test_rls_hooks Improve RLS planning by marking individual quals with security levels. 2017-01-18 12:58:20 -05:00
test_shm_mq Don't be so trusting that shm_toc_lookup() will always succeed. 2017-06-05 12:05:42 -04:00
worker_spi Clean up latch related code. 2017-06-06 16:13:00 -07:00
Makefile Provide and use a makefile target to build all generated headers. 2016-07-01 15:09:02 -04:00
README Add README in src/test and src/test/modules 2016-02-25 21:08:32 -03: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".

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.