postgresql/src/test
Michael Paquier 76bba03312 Add tests for logging of temporary file removal and statement
Temporary file usage is sometimes attributed to the wrong query in the logs
output.  One identified reason is that unnamed portal cleanup (and
consequently temp file logging) happens during the next BIND message as
a, after debug_query_string has already been updated to the new query.

Dropping an unnamed portal in the next BIND message is a rather old
protocol behavior (fe19e56c57, also mentioned in the docs).
log_temp_files is a bit newer than that, as of be8a431881.

This commit adds tests to track which query is displayed next to the
temporary file(s) removed when a portal is dropped, and in some cases if
a query is displayed or not.  We have not concluded how to improve the
situation yet; these tests will at least help in checking what changes
in the logs depending on the proposal discussed and how it affects the
scenarios tracked by this new test.

Author: Sami Imseih <samimseih@gmail.com>
Author: Frédéric Yhuel <frederic.yhuel@dalibo.com>
Reviewed-by: Mircea Cadariu <cadariu.mircea@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/3d07ee43-8855-42db-97e0-bad5db82d972@dalibo.com
2025-10-16 09:02:51 +09:00
..
authentication In username-map substitution, cope with more than one \1. 2025-07-13 13:52:32 -04:00
examples libpq: Deprecate pg_int64. 2025-03-25 21:40:00 +13:00
icu Update copyright for 2025 2025-01-01 11:21:55 -05:00
isolation Add stats_reset to pg_stat_user_functions 2025-10-08 12:43:40 +09:00
kerberos Replace deprecated log_connections values in docs and tests 2025-05-22 17:14:54 -04:00
ldap Add TAP tests for LDAP connection parameter lookup 2025-08-15 10:17:22 +02:00
locale Update copyright for 2025 2025-01-01 11:21:55 -05:00
mb Fix MB regression tests for WAL-logging of hash indexes. 2017-03-15 07:25:36 -04:00
modules Add tests for logging of temporary file removal and statement 2025-10-16 09:02:51 +09:00
perl Fix missing "use Test::More" in Kerberos.pm. 2025-08-18 14:54:59 -04:00
postmaster Run pgperltidy 2025-06-29 21:14:21 -04:00
recovery Fix comments in recovery tests 2025-09-25 15:24:41 +02:00
regress Fix lookups in pg_{clear,restore}_{attribute,relation}_stats(). 2025-10-15 12:47:33 -05:00
ssl Fix sslkeylogfile error handling logging 2025-07-10 23:26:51 +02:00
subscription Improve few errdetail messages introduced in commit 0d48d393d4. 2025-09-19 04:52:59 +00:00
Makefile Add PG_TEST_EXTRA configure option to the Make builds 2024-11-04 14:09:38 +02:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05: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