postgresql/src/test
Amit Kapila 26b3455afa Fix partition table's REPLICA IDENTITY checking on the subscriber.
In logical replication, we will check if the target table on the
subscriber is updatable by comparing the replica identity of the table on
the publisher with the table on the subscriber. When the target table is a
partitioned table, we only check its replica identity but not for the
partition tables. This leads to assertion failure while applying changes
for update/delete as we expect those to succeed only when the
corresponding partition table has a primary key or has a replica
identity defined.

Fix it by checking the replica identity of the partition table while
applying changes.

Reported-by: Shi Yu
Author: Shi Yu, Hou Zhijie
Reviewed-by: Amit Langote, Amit Kapila
Backpatch-through: 13, where it was introduced
Discussion: https://postgr.es/m/OSZPR01MB6310F46CD425A967E4AEF736FDA49@OSZPR01MB6310.jpnprd01.prod.outlook.com
2022-06-21 08:07:43 +05:30
..
authentication Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
examples Update copyright for 2022 2022-01-07 19:04:57 -05:00
icu Pre-beta mechanical code beautification. 2022-05-12 15:17:30 -04:00
isolation pgstat: fix stats.spec instability on slow machines. 2022-05-22 15:25:13 -07:00
kerberos Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
ldap Pre-beta mechanical code beautification. 2022-05-12 15:17:30 -04:00
locale pycodestyle (PEP 8) cleanup in Python scripts 2022-03-09 10:54:20 +01:00
mb
modules Revert changes in HOT handling of BRIN indexes 2022-06-16 15:02:49 +02:00
perl Add pg_version() to PostgreSQL::Test::Cluster 2022-05-20 18:29:51 +09:00
recovery Fix slow animal timeouts in 032_relfilenode_reuse.pl. 2022-05-14 11:58:10 +12:00
regress Message and documentation refinements 2022-06-19 17:39:50 +02:00
ssl Pre-beta mechanical code beautification. 2022-05-12 15:17:30 -04:00
subscription Fix partition table's REPLICA IDENTITY checking on the subscriber. 2022-06-21 08:07:43 +05:30
Makefile Add option to use ICU as global locale provider 2022-03-17 11:13:16 +01: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