forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7718a99
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 parentc176997 commit7718a99
1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
904 | 904 |
| |
905 | 905 |
| |
906 | 906 |
| |
907 |
| - | |
908 |
| - | |
| 907 | + | |
| 908 | + | |
909 | 909 |
| |
910 | 910 |
| |
911 | 911 |
| |
|
0 commit comments
Comments
(0)