- Notifications
You must be signed in to change notification settings - Fork5
Commit56e19d9
committed
Don't use on-disk snapshots for exported logical decoding snapshot.
Logical decoding stores historical snapshots on disk, so that logicaldecoding can restart without having to reconstruct a snapshot fromscratch (for which the resources are not guaranteed to be presentanymore). These serialized snapshots were also used when creating anew slot via the walsender interface, which can export a "full"snapshot (i.e. one that can read all tables, not just catalog ones).The problem is that the serialized snapshots are only useful forcatalogs and not for normal user tables. Thus the use of such aserialized snapshot could result in an inconsistent snapshot beingexported, which could lead to queries returning wrong data. Thiswould only happen if logical slots are created while another logicalslot already exists.Author: Petr JelinekReviewed-By: Andres FreundDiscussion:https://postgr.es/m/f37e975c-908f-858e-707f-058d3b1eb214@2ndquadrant.comBackport: 9.4, where logical decoding was introduced.1 parent7834d20 commit56e19d9
File tree
3 files changed
+22
-9
lines changed- src
- backend/replication/logical
- include/replication
3 files changed
+22
-9
lines changedLines changed: 6 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
114 | 114 |
| |
115 | 115 |
| |
116 | 116 |
| |
| 117 | + | |
117 | 118 |
| |
118 | 119 |
| |
119 | 120 |
| |
| |||
171 | 172 |
| |
172 | 173 |
| |
173 | 174 |
| |
174 |
| - | |
| 175 | + | |
| 176 | + | |
175 | 177 |
| |
176 | 178 |
| |
177 | 179 |
| |
| |||
297 | 299 |
| |
298 | 300 |
| |
299 | 301 |
| |
300 |
| - | |
| 302 | + | |
| 303 | + | |
301 | 304 |
| |
302 | 305 |
| |
303 | 306 |
| |
| |||
386 | 389 |
| |
387 | 390 |
| |
388 | 391 |
| |
389 |
| - | |
| 392 | + | |
390 | 393 |
| |
391 | 394 |
| |
392 | 395 |
| |
|
Lines changed: 14 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
165 | 165 |
| |
166 | 166 |
| |
167 | 167 |
| |
| 168 | + | |
| 169 | + | |
| 170 | + | |
168 | 171 |
| |
169 | 172 |
| |
170 | 173 |
| |
| |||
281 | 284 |
| |
282 | 285 |
| |
283 | 286 |
| |
284 |
| - | |
| 287 | + | |
| 288 | + | |
285 | 289 |
| |
286 | 290 |
| |
287 | 291 |
| |
| |||
308 | 312 |
| |
309 | 313 |
| |
310 | 314 |
| |
| 315 | + | |
311 | 316 |
| |
312 | 317 |
| |
313 | 318 |
| |
| |||
1245 | 1250 |
| |
1246 | 1251 |
| |
1247 | 1252 |
| |
1248 |
| - | |
| 1253 | + | |
1249 | 1254 |
| |
1250 | 1255 |
| |
1251 | 1256 |
| |
| |||
1260 | 1265 |
| |
1261 | 1266 |
| |
1262 | 1267 |
| |
1263 |
| - | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
1264 | 1272 |
| |
1265 | 1273 |
| |
1266 | 1274 |
| |
| |||
1315 | 1323 |
| |
1316 | 1324 |
| |
1317 | 1325 |
| |
1318 |
| - | |
1319 |
| - | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
1320 | 1329 |
| |
1321 | 1330 |
| |
1322 | 1331 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
54 | 54 |
| |
55 | 55 |
| |
56 | 56 |
| |
57 |
| - | |
| 57 | + | |
| 58 | + | |
58 | 59 |
| |
59 | 60 |
| |
60 | 61 |
| |
|
0 commit comments
Comments
(0)