aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/functions.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-06-10 12:27:27 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2021-06-10 12:27:27 -0400
commit3a09d75b4f6cabc8331e228b6988dbfcd9afdfbe (patch)
treea2f34ba54caf9efbbdc6db1c5183b0d6f6aa0295 /src/backend/executor/functions.c
parentbb4aed46a5aeb00d2f1d8b8160feed339f4eaf12 (diff)
downloadpostgresql-3a09d75b4f6cabc8331e228b6988dbfcd9afdfbe.tar.gz
postgresql-3a09d75b4f6cabc8331e228b6988dbfcd9afdfbe.zip
Rearrange logrep worker's snapshot handling some more.
It turns out that worker.c's code path for TRUNCATE was also careless about establishing a snapshot while executing user-defined code, allowing the checks added by commit 84f5c2908 to fail when a trigger is fired in that context. We could just wrap Push/PopActiveSnapshot around the truncate call, but it seems better to establish a policy of holding a snapshot throughout execution of a replication step. To help with that and possible future requirements, replace the previous ensure_transaction calls with pairs of begin/end_replication_step calls. Per report from Mark Dilger. Back-patch to v11, like the previous changes. Discussion: https://postgr.es/m/B4A3AF82-79ED-4F4C-A4E5-CD2622098972@enterprisedb.com
Diffstat (limited to 'src/backend/executor/functions.c')
0 files changed, 0 insertions, 0 deletions