aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/commit_ts.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2025-02-13 16:30:58 +0900
committerMichael Paquier <michael@paquier.xyz>2025-02-13 16:30:58 +0900
commit773c51dd39ada5f107a3656377a9611ff89132f1 (patch)
tree680dbbcc3c7de1e59b006cec9362d1aeaf93fcb2 /src/backend/access/transam/commit_ts.c
parentabfb29648f9adcde84656afde1d50bc8b8e9b6e0 (diff)
downloadpostgresql-773c51dd39ada5f107a3656377a9611ff89132f1.tar.gz
postgresql-773c51dd39ada5f107a3656377a9611ff89132f1.zip
Fix MakeTransitionCaptureState() to return a consistent result
When an UPDATE trigger referencing a new table and a DELETE trigger referencing an old table are both present, MakeTransitionCaptureState() returns an inconsistent result for UPDATE commands in its set of flags and tuplestores holding the TransitionCaptureState for transition tables. As proved by the test added here, this issue causes a crash in v14 and earlier versions (down to 11, actually, older versions do not support triggers on partitioned tables) during cross-partition updates on a partitioned table. v15 and newer versions are safe thanks to 7103ebb7aae8. This commit fixes the function so that it returns a consistent state by using portions of the changes made in commit 7103ebb7aae8 for v13 and v14. v15 and newer versions are slightly tweaked to match with the older versions, mainly for consistency across branches. Author: Kyotaro Horiguchi Discussion: https://postgr.es/m/20250207.150238.968446820828052276.horikyota.ntt@gmail.com Backpatch-through: 13
Diffstat (limited to 'src/backend/access/transam/commit_ts.c')
0 files changed, 0 insertions, 0 deletions