Fix replica identity check for a partitioned table.
authorAmit Kapila <akapila@postgresql.org>
Tue, 16 Aug 2022 09:21:42 +0000 (14:51 +0530)
committerAmit Kapila <akapila@postgresql.org>
Tue, 16 Aug 2022 09:21:42 +0000 (14:51 +0530)
commit02f8d68af256c34cfac774ae46b2d4a465d35276
tree01e05166de6e336d226b637b0ee70ef0531c183a
parenta1a5e6d95cc9fabbd4e0209161662aa45220c4b1
Fix replica identity check for a partitioned table.

The current publisher code checks if UPDATE or DELETE can be executed with
the replica identity of the table even if it's a partitioned table. We can
skip checking the replica identity for partitioned tables because the
operations are actually performed on the leaf partitions (not the
partitioned table).

Reported-by: Brad Nicholson
Author: Hou Zhijie
Reviewed-by: Peter Smith, Amit Kapila
Backpatch-through: 13
Discussion: https://postgr.es/m/CAMMnM%3D8i5DohH%3DYKzV0_wYuYSYvuOJoL9F5nzXTc%2ByzsG1f6rg%40mail.gmail.com
src/backend/executor/execReplication.c
src/test/regress/expected/publication.out
src/test/regress/sql/publication.sql