postgresql/src/test
Nathan Bossart b52adbad46 Ensure we have a snapshot when updating pg_index entries.
Creating, reindexing, and dropping an index concurrently could
entail accessing pg_index's TOAST table, which was recently added
in commit b52c4fc3c0.  These code paths start and commit their own
transactions, but they do not always set an active snapshot.  This
rightfully leads to assertion failures and ERRORs when trying to
access pg_index's TOAST table, such as the following:

	ERROR:  cannot fetch toast data without an active snapshot

To fix, push an active snapshot just before each section of code
that might require accessing pg_index's TOAST table, and pop it
shortly afterwards.

Reported-by: Alexander Lakhin
Reviewed-by: Michael Paquier
Discussion: https://postgr.es/m/a97d7401-e7c9-f771-6a00-037379f0a8bb%40gmail.com
2024-09-26 15:51:23 -05:00
..
authentication Fix an assortment of typos 2024-05-04 02:33:25 +12:00
examples Update copyright for 2024 2024-01-03 20:49:05 -05:00
icu Address more review comments on commit 2d819a08a1. 2024-03-18 11:58:13 -07:00
isolation For inplace update durability, make heap_update() callers wait. 2024-09-24 15:25:18 -07:00
kerberos Move Kerberos module 2024-04-08 02:49:30 +03:00
ldap ldapurl is supported with simple bind 2024-07-23 10:17:55 +02:00
locale Update copyright for 2024 2024-01-03 20:49:05 -05:00
mb Fix MB regression tests for WAL-logging of hash indexes. 2017-03-15 07:25:36 -04:00
modules Fix data loss at inplace update after heap_update(). 2024-09-24 15:25:18 -07:00
perl Add parameter "connstr" to PostgreSQL::Test::Cluster::background_psql 2024-09-20 09:59:22 +09:00
recovery Extend PgStat_HashKey.objid from 4 to 8 bytes 2024-09-18 12:44:15 +09:00
regress Ensure we have a snapshot when updating pg_index entries. 2024-09-26 15:51:23 -05:00
ssl Use library functions to edit config in SSL tests 2024-09-03 18:57:56 +02:00
subscription Collect statistics about conflicts in logical replication. 2024-09-04 08:55:21 +05:30
Makefile Refactor PG_TEST_EXTRA logic in autoconf build 2022-09-20 11:24:16 -07:00
meson.build Move libpq encryption negotiation tests 2024-04-12 19:52:37 +03:00
README Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00

PostgreSQL tests
================

This directory contains a variety of test infrastructure as well as some of the
tests in PostgreSQL. Not all tests are here -- in particular, there are more in
individual contrib/ modules and in src/bin.

Not all these tests get run by "make check". Check src/test/Makefile to see
which tests get run automatically.

authentication/
  Tests for authentication (but see also below)

examples/
  Demonstration programs for libpq that double as regression tests via
  "make check"

isolation/
  Tests for concurrent behavior at the SQL level

kerberos/
  Tests for Kerberos/GSSAPI authentication and encryption

ldap/
  Tests for LDAP-based authentication

locale/
  Sanity checks for locale data, encodings, etc

mb/
  Tests for multibyte encoding (UTF-8) support

modules/
  Extensions used only or mainly for test purposes, generally not suitable
  for installing in production databases

perl/
  Infrastructure for Perl-based TAP tests

recovery/
  Test suite for recovery and replication

regress/
  PostgreSQL's main regression test suite, pg_regress

ssl/
  Tests to exercise and verify SSL certificate handling

subscription/
  Tests for logical replication