1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-12 15:23:02 +03:00
Files
postgres/src/backend
Thomas Munro 1d93d18045 Fix race in dsm_unpin_segment() when handles are reused.
Teach dsm_unpin_segment() to skip segments that are in the process
of being destroyed by another backend, when searching for a handle.
Such a segment cannot possibly be the one we are looking for, even
if its handle matches.  Another slot might hold a recently created
segment that has the same handle value by coincidence, and we need
to keep searching for that one.

The bug caused rare "cannot unpin a segment that is not pinned"
errors on 10 and 11.  Similar to commit 6c0fb941 for dsm_attach().

Back-patch to 10, where dsm_unpin_segment() landed.

Author: Thomas Munro
Reported-by: Justin Pryzby
Tested-by: Justin Pryzby (along with other recent DSA/DSM fixes)
Discussion: https://postgr.es/m/20190216023854.GF30291@telsasoft.com
2019-02-18 09:59:27 +13:00
..
2019-02-11 10:31:36 +01:00
2019-02-05 15:18:25 -05:00
2018-01-02 23:30:12 -05:00
2019-02-11 14:31:57 +01:00
2019-02-12 18:42:37 -03:00
2018-08-21 15:17:25 +09:00
2018-08-27 09:34:35 +12:00
2019-01-25 21:14:31 -05:00
2018-03-30 17:33:04 -07:00
2018-09-17 08:40:36 +02:00