forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit42750b0
committed
Ensure snapshot is registered within ScanPgRelation().
In 9.4 I added support to use a historical snapshot inScanPgRelation(), while adding logical decoding. Unfortunately aconflict with the concurrent removal of SnapshotNow was incorrectlyresolved, leading to an unregistered snapshot being used.It is not correct to use an unregistered (or non-active) snapshot foranything non-trivial, because catalog invalidations can cause thesnapshot to be invalidated.Luckily it seems unlikely to actively cause problems in practice, asScanPgRelation() requires that we already have a lock on the relation,we only look for a single row, and we don't appear to rely on theresult's tid to be correct. It however is clearly wrong and potentialnegative consequences would likely be hard to find. So it seems worthbackpatching the fix, even without a concrete hazard.Discussion:https://postgr.es/m/20200229052459.wzhqnbhrriezg4v2@alap3.anarazel.deBackpatch: 9.5-1 parent7351bfe commit42750b0
1 file changed
+4
-4
lines changedLines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
313 | 313 |
| |
314 | 314 |
| |
315 | 315 |
| |
316 |
| - | |
| 316 | + | |
317 | 317 |
| |
318 | 318 |
| |
319 | 319 |
| |
| |||
343 | 343 |
| |
344 | 344 |
| |
345 | 345 |
| |
346 |
| - | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
347 | 349 |
| |
348 | 350 |
| |
349 | 351 |
| |
350 |
| - | |
351 |
| - | |
352 | 352 |
| |
353 | 353 |
| |
354 | 354 |
| |
|
0 commit comments
Comments
(0)