diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2011-07-07 18:04:37 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2011-07-07 18:12:15 +0300 |
commit | 928408d9e5b4b389897b799b3b6af505d719a3f6 (patch) | |
tree | d1fddeb28c5359e671777a4a4ee2a2fea2c6a926 /src/backend/commands/trigger.c | |
parent | b2e3be41a604a36d6586c6e24d93349ca098f0c3 (diff) | |
download | postgresql-928408d9e5b4b389897b799b3b6af505d719a3f6.tar.gz postgresql-928408d9e5b4b389897b799b3b6af505d719a3f6.zip |
Fix a bug with SSI and prepared transactions:
If there's a dangerous structure T0 ---> T1 ---> T2, and T2 commits first,
we need to abort something. If T2 commits before both conflicts appear,
then it should be caught by OnConflict_CheckForSerializationFailure. If
both conflicts appear before T2 commits, it should be caught by
PreCommit_CheckForSerializationFailure. But that is actually run when
T2 *prepares*. Fix that in OnConflict_CheckForSerializationFailure, by
treating a prepared T2 as if it committed already.
This is mostly a problem for prepared transactions, which are in prepared
state for some time, but also for regular transactions because they also go
through the prepared state in the SSI code for a short moment when they're
committed.
Kevin Grittner and Dan Ports
Diffstat (limited to 'src/backend/commands/trigger.c')
0 files changed, 0 insertions, 0 deletions