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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4f10e7ea7b2231f453bb18b6e710ac333eaf121b

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