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

Amit Kapila
Fix cleanup lock acquisition in SPLIT_ALLOCATE_PAGE replay.
During XLOG_HASH_SPLIT_ALLOCATE_PAGE replay, we were checking for acleanup lock on the new bucket page after acquiring an exclusive lock onit and raising a PANIC error on failure. However, it is quite possiblethat checkpointer can acquire the pin on the same page before acquiring alock on it, and then the replay will lead to an error. So instead, directlyacquire the cleanup lock on the new bucket page duringXLOG_HASH_SPLIT_ALLOCATE_PAGE replay operation.Reported-by: Andres FreundAuthor: Robert HaasReviewed-By: Amit Kapila, Andres Freund, Vignesh CBackpatch-through: 11Discussion:https://postgr.es/m/20220810022617.fvjkjiauaykwrbse@awork3.anarazel.de1 parentad6c528 commite848be6
2 files changed
+9
-6
lines changedLines changed: 2 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
351 | 351 |
| |
352 | 352 |
| |
353 | 353 |
| |
354 |
| - | |
| 354 | + | |
| 355 | + | |
355 | 356 |
| |
356 | 357 |
| |
357 |
| - | |
358 |
| - | |
359 | 358 |
| |
360 | 359 |
| |
361 | 360 |
| |
|
Lines changed: 7 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
805 | 805 |
| |
806 | 806 |
| |
807 | 807 |
| |
808 |
| - | |
809 |
| - | |
810 |
| - | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
811 | 815 |
| |
812 | 816 |
| |
813 | 817 |
| |
|
0 commit comments
Comments
(0)