forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1a43de5
committed
Fix race condition in committing a serializable transaction
The finished transaction list can contain XIDs that are older than theserializable global xmin. It's a short-lived state;ClearOldPredicateLocks() removes any such transactions from the list,and it's called whenever the global xmin advances. But if anotherbackend calls SummarizeOldestCommittedSxact() in that window, it willcall SerialAdd() on an XID that's older than the global xmin, or ifthere are no more transactions running, when global xmin isinvalid. That trips the assertion in SerialAdd().Fixes bug #18658 reported by Andrew Bille. Thanks to Alexander Lakhinfor analysis. Backpatch to all versions.Discussion:https://www.postgresql.org/message-id/18658-7dab125ec688c70b%40postgresql.org1 parent57a36e8 commit1a43de5
1 file changed
+9
-4
lines changedLines changed: 9 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
877 | 877 |
| |
878 | 878 |
| |
879 | 879 |
| |
880 |
| - | |
881 |
| - | |
882 |
| - | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
883 | 884 |
| |
884 | 885 |
| |
885 |
| - | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
886 | 891 |
| |
887 | 892 |
| |
888 | 893 |
| |
|
0 commit comments
Comments
(0)