forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit701cf1e

Amit Kapila
Change the misleading local end_lsn for prepared transactions.
The apply worker was using XactLastCommitEnd as local end_lsn for applyingprepare and rollback_prepare. The XactLastCommitEnd value is the end lsnof the last commit applied before the prepare transaction which makes nosense. This LSN is used to decide whether we can send the acknowledgmentof the corresponding remote LSN to the server.It is okay not to set the local_end LSN with the actual WAL position forthe prepare because we always flush the prepare record. So, we can sendthe acknowledgment of the remote_end LSN as soon as prepare is finished.The current code is misleading but as such doesn't create any problem, sodecided not to backpatch.Author: Hayato KurodaReviewed-by: Shveta Malik, Amit KapilaDiscussion:https://postgr.es/m/TYAPR01MB5692FA4926754B91E9D7B5F0F5AA2@TYAPR01MB5692.jpnprd01.prod.outlook.com1 parent4eb179e commit701cf1e
1 file changed
+27
-4
lines changedLines changed: 27 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1133 | 1133 |
| |
1134 | 1134 |
| |
1135 | 1135 |
| |
1136 |
| - | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
1137 | 1147 |
| |
1138 | 1148 |
| |
1139 | 1149 |
| |
| |||
1251 | 1261 |
| |
1252 | 1262 |
| |
1253 | 1263 |
| |
1254 |
| - | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
1255 | 1270 |
| |
1256 | 1271 |
| |
1257 | 1272 |
| |
| |||
1306 | 1321 |
| |
1307 | 1322 |
| |
1308 | 1323 |
| |
1309 |
| - | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
1310 | 1329 |
| |
1311 | 1330 |
| |
1312 | 1331 |
| |
| |||
1364 | 1383 |
| |
1365 | 1384 |
| |
1366 | 1385 |
| |
1367 |
| - | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
1368 | 1391 |
| |
1369 | 1392 |
| |
1370 | 1393 |
| |
|
0 commit comments
Comments
(0)