pgsql: Fix assertion with relation using REPLICA IDENTITY FULL in subsc

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix assertion with relation using REPLICA IDENTITY FULL in subsc
Date: 2020-05-16 09:19:28
Message-ID: E1jZsye-0004wP-ME@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix assertion with relation using REPLICA IDENTITY FULL in subscriber

In a logical replication subscriber, a table using REPLICA IDENTITY FULL
which has a primary key would try to use the primary key's index
available to scan for a tuple, but an assertion only assumed as correct
the case of an index associated to REPLICA IDENTITY USING INDEX. This
commit corrects the assertion so as the use of a primary key index is a
valid case.

Reported-by: Dilip Kumar
Analyzed-by: Dilip Kumar
Author: Euler Taveira
Reviewed-by: Michael Paquier, Masahiko Sawada
Discussion: https://postgr.es/m/CAFiTN-u64S5bUiPL1q5kwpHNd0hRnf1OE-bzxNiOs5zo84i51w@mail.gmail.com
Backpatch-through: 10

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/70ae82b9b4b5871604ba4e98ebe0f32bef223200

Modified Files
--------------
src/backend/executor/execReplication.c | 3 ++-
src/test/subscription/t/001_rep_changes.pl | 15 ++++++++++++++-
2 files changed, 16 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2020-05-16 15:54:58 pgsql: Run pgindent with new pg_bsd_indent version 2.1.1.
Previous Message Tom Lane 2020-05-16 01:48:00 pgsql: Change locktype "speculative token" to "spectoken".