Version 18_2
·
3 commits
to patches18
since this release
Add XACT_EVENT_PRE_PROC_ARRAY A transaction's CSN is assigned by ProcArrayEndTransaction(), while an extension's XACT_EVENT_COMMIT callback runs afterwards. An extension that keeps its own commit state therefore has no place to publish it together with the transaction's own visibility: everything it can hook runs either before the CSN exists or after it is already visible. Fire a new event immediately before ProcArrayEndTransaction(), that is, in the last moment at which the transaction is still in progress for everybody else. The commit is durable by then, so a callback must not fail: the event is meant for publishing commit state, not for work that can error out. OrioleDB uses it to mark an oxid as committing before its CSN becomes visible, closing a window in which a snapshot could be taken above a transaction's CSN while OrioleDB still reported it in progress.