forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1578d13
committed
Treat 2PC commit/abort the same as regular xacts in recovery.
There were several oversights in recovery code where COMMIT/ABORT PREPAREDrecords were ignored:* pg_last_xact_replay_timestamp() (wasn't updated for 2PC commits)* recovery_min_apply_delay (2PC commits were applied immediately)* recovery_target_xid (recovery would not stop if the XID used 2PC)The first of those was reported by Sergiy Zuban in bug #11032, analyzed byTom Lane and Andres Freund. The bug was always there, but was masked beforecommitd19bd29, because COMMIT PREPAREDalways created an extra regular transaction that was WAL-logged.Backpatch to all supported versions (older versions didn't have all thefeatures and therefore didn't have all of the above bugs).1 parentaf9d516 commit1578d13
2 files changed
+29
-6
lines changedLines changed: 28 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5880 | 5880 |
| |
5881 | 5881 |
| |
5882 | 5882 |
| |
| 5883 | + | |
5883 | 5884 |
| |
5884 | 5885 |
| |
5885 | 5886 |
| |
| |||
5892 | 5893 |
| |
5893 | 5894 |
| |
5894 | 5895 |
| |
| 5896 | + | |
5895 | 5897 |
| |
5896 | 5898 |
| |
5897 | 5899 |
| |
5898 | 5900 |
| |
5899 | 5901 |
| |
5900 | 5902 |
| |
5901 | 5903 |
| |
| 5904 | + | |
| 5905 | + | |
| 5906 | + | |
| 5907 | + | |
| 5908 | + | |
| 5909 | + | |
| 5910 | + | |
| 5911 | + | |
| 5912 | + | |
5902 | 5913 |
| |
5903 | 5914 |
| |
5904 | 5915 |
| |
5905 | 5916 |
| |
5906 | 5917 |
| |
5907 | 5918 |
| |
5908 | 5919 |
| |
| 5920 | + | |
| 5921 | + | |
| 5922 | + | |
| 5923 | + | |
| 5924 | + | |
| 5925 | + | |
| 5926 | + | |
| 5927 | + | |
| 5928 | + | |
5909 | 5929 |
| |
5910 | 5930 |
| |
5911 | 5931 |
| |
5912 | 5932 |
| |
5913 | 5933 |
| |
5914 | 5934 |
| |
5915 | 5935 |
| |
| 5936 | + | |
5916 | 5937 |
| |
5917 | 5938 |
| |
5918 | 5939 |
| |
| |||
5941 | 5962 |
| |
5942 | 5963 |
| |
5943 | 5964 |
| |
5944 |
| - | |
| 5965 | + | |
5945 | 5966 |
| |
5946 | 5967 |
| |
5947 | 5968 |
| |
| |||
5976 | 5997 |
| |
5977 | 5998 |
| |
5978 | 5999 |
| |
5979 |
| - | |
| 6000 | + | |
5980 | 6001 |
| |
5981 | 6002 |
| |
5982 | 6003 |
| |
5983 |
| - | |
| 6004 | + | |
| 6005 | + | |
| 6006 | + | |
5984 | 6007 |
| |
5985 | 6008 |
| |
5986 | 6009 |
| |
| |||
5993 | 6016 |
| |
5994 | 6017 |
| |
5995 | 6018 |
| |
5996 |
| - | |
| 6019 | + | |
| 6020 | + | |
5997 | 6021 |
| |
5998 | 6022 |
| |
5999 | 6023 |
| |
|
Lines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
177 | 177 |
| |
178 | 178 |
| |
179 | 179 |
| |
180 |
| - | |
181 |
| - | |
| 180 | + | |
182 | 181 |
| |
183 | 182 |
| |
184 | 183 |
| |
|
0 commit comments
Comments
(0)