forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0b55aaa
committed
Fix race in dsm_unpin_segment() when handles are reused.
Teach dsm_unpin_segment() to skip segments that are in the processof being destroyed by another backend, when searching for a handle.Such a segment cannot possibly be the one we are looking for, evenif its handle matches. Another slot might hold a recently createdsegment that has the same handle value by coincidence, and we needto keep searching for that one.The bug caused rare "cannot unpin a segment that is not pinned"errors on 10 and 11. Similar to commit6c0fb94 for dsm_attach().Back-patch to 10, where dsm_unpin_segment() landed.Author: Thomas MunroReported-by: Justin PryzbyTested-by: Justin Pryzby (along with other recent DSA/DSM fixes)Discussion:https://postgr.es/m/20190216023854.GF30291@telsasoft.com1 parentbc6d7eb commit0b55aaa
1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
844 | 844 |
| |
845 | 845 |
| |
846 | 846 |
| |
847 |
| - | |
848 |
| - | |
| 847 | + | |
| 848 | + | |
849 | 849 |
| |
850 | 850 |
| |
851 | 851 |
| |
|
0 commit comments
Comments
(0)