forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitfdaf448
committed
Invent pre-commit/pre-prepare/pre-subcommit events for xact callbacks.
Currently it's only possible for loadable modules to get control duringpost-commit cleanup of a transaction. That doesn't work too well if theywant to do something that could throw an error; for example, an FDW mightneed to issue a remote commit, which could well fail. To improve matters,extend the existing APIs for XactCallback and SubXactCallback functionsto provide new pre-commit events for this purpose.The release notes will need to mention that existing callback functionsshould be checked to make sure they don't do something unwanted when oneof the new event types occurs. In the examples within our source tree,contrib/sepgsql was fine but plpgsql had been a bit too cute.1 parent4765dd7 commitfdaf448
3 files changed
+27
-16
lines changedLines changed: 9 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1825 | 1825 |
| |
1826 | 1826 |
| |
1827 | 1827 |
| |
| 1828 | + | |
| 1829 | + | |
1828 | 1830 |
| |
1829 | 1831 |
| |
1830 | 1832 |
| |
| |||
2028 | 2030 |
| |
2029 | 2031 |
| |
2030 | 2032 |
| |
| 2033 | + | |
| 2034 | + | |
2031 | 2035 |
| |
2032 | 2036 |
| |
2033 | 2037 |
| |
| |||
4058 | 4062 |
| |
4059 | 4063 |
| |
4060 | 4064 |
| |
4061 |
| - | |
| 4065 | + | |
| 4066 | + | |
| 4067 | + | |
| 4068 | + | |
4062 | 4069 |
| |
| 4070 | + | |
4063 | 4071 |
| |
4064 | 4072 |
| |
4065 | 4073 |
| |
|
Lines changed: 5 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
76 | 76 |
| |
77 | 77 |
| |
78 | 78 |
| |
79 |
| - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
80 | 82 |
| |
81 | 83 |
| |
82 | 84 |
| |
| |||
85 | 87 |
| |
86 | 88 |
| |
87 | 89 |
| |
88 |
| - | |
| 90 | + | |
| 91 | + | |
89 | 92 |
| |
90 | 93 |
| |
91 | 94 |
| |
|
Lines changed: 13 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6150 | 6150 |
| |
6151 | 6151 |
| |
6152 | 6152 |
| |
6153 |
| - | |
| 6153 | + | |
6154 | 6154 |
| |
6155 | 6155 |
| |
6156 | 6156 |
| |
| |||
6159 | 6159 |
| |
6160 | 6160 |
| |
6161 | 6161 |
| |
6162 |
| - | |
| 6162 | + | |
6163 | 6163 |
| |
6164 | 6164 |
| |
6165 | 6165 |
| |
| |||
6178 | 6178 |
| |
6179 | 6179 |
| |
6180 | 6180 |
| |
6181 |
| - | |
6182 |
| - | |
6183 |
| - | |
6184 |
| - | |
6185 |
| - | |
| 6181 | + | |
6186 | 6182 |
| |
6187 |
| - | |
| 6183 | + | |
| 6184 | + | |
| 6185 | + | |
| 6186 | + | |
6188 | 6187 |
| |
6189 |
| - | |
6190 |
| - | |
6191 |
| - | |
6192 |
| - | |
6193 |
| - | |
| 6188 | + | |
| 6189 | + | |
| 6190 | + | |
| 6191 | + | |
| 6192 | + | |
| 6193 | + | |
6194 | 6194 |
| |
6195 | 6195 |
| |
6196 | 6196 |
| |
|
0 commit comments
Comments
(0)