forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf6c4a86
committed
Fix RBM_ZERO_AND_LOCK mode to not acquire lock on local buffers.
Commit81c4508 introduced a new RBM_ZERO_AND_LOCK mode to ReadBuffer, whichtakes a lock on the buffer before zeroing it. However, you cannot take alock on a local buffer, and you got a segfault instead. The version of thatpatch committed to master included a check for !isLocalBuf, and thereforedidn't crash, but oddly I missed that in the back-patched versions. Thispatch adds that check to the back-branches too.RBM_ZERO_AND_LOCK mode is only used during WAL replay, and in hash indexes.WAL replay only deals with shared buffers, so the only way to trigger thebug is with a temporary hash index.Reported by Artem Ignatyev, analysis by Tom Lane.1 parentdd75518 commitf6c4a86
1 file changed
+2
-1
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
494 | 494 |
| |
495 | 495 |
| |
496 | 496 |
| |
497 |
| - | |
| 497 | + | |
| 498 | + | |
498 | 499 |
| |
499 | 500 |
| |
500 | 501 |
| |
|
0 commit comments
Comments
(0)