Set ActiveSnapshot when logically replaying inserts

Input functions for the inserted tuples may require a snapshot, when
they are replayed by native logical replication.  An example is a domain
with a constraint using a SQL-language function, which prior to this
commit failed to apply on the subscriber side.

Reported-by: Mai Peng <[email protected]>
Co-authored-by: Minh-Quan TRAN <[email protected]>
Co-authored-by: Álvaro Herrera <[email protected]>
Discussion: 
https://postgr.es/m/[email protected]
Discussion: 
https://postgr.es/m/[email protected]

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5dbd0beb8a95fa1de3a931d20102cc9f273fceef

Modified Files
--------------
src/backend/replication/logical/worker.c |  4 +++-
src/test/subscription/t/002_types.pl     | 24 ++++++++++++++++++++++--
2 files changed, 25 insertions(+), 3 deletions(-)

Reply via email to