forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2360eea
committed
Don't MultiXactIdIsRunning when in recovery
In 9.1 and earlier, it is possible for index_getnext() to try to examinea heap buffer for possible HOT-prune when in recovery; this causes aproblem when a multixact is found in a tuple's Xmax, becauseGetMultiXactIdMembers refuses to run when in recovery, raising an error:ERROR: cannot GetMultiXactIdMembers() during recoveryThis can be solved easily by having MultiXactIdIsRunning always returnfalse when in recovery, which is reasonable because a HOT standby cannotacquire further tuple locks nor update/delete tuples.(Note: it doesn't look like this specific code path has a problem in9.2, because instead of doing HeapTupleSatisfiesUpdate directly,heap_hot_search_buffer uses HeapTupleIsSurelyDead instead. Still, theremay be other paths affected by the same bug, for instance in pgrowlocks,and the multixact code hasn't changed; so apply the same fixthroughout.)Apply this fix to 9.0 through 9.2. In 9.3 the multixact code has beenchanged completely and is no longer subject to this problem.Per report from Marko Tiikkaja,https://www.postgresql.org/message-id/54EB3283.2080305@joh.toAnalysis by Andres Freund1 parent46c877e commit2360eea
1 file changed
+15
-0
lines changedLines changed: 15 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
383 | 383 |
| |
384 | 384 |
| |
385 | 385 |
| |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
386 | 401 |
| |
387 | 402 |
| |
388 | 403 |
| |
|
0 commit comments
Comments
(0)