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_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2c4d0f32e0c75179bba360ee884f535117b28b90

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