pgsql: Retry DSM control segment creation if Windows indicates access d - Mailing list pgsql-committers

From Robert Haas
Subject pgsql: Retry DSM control segment creation if Windows indicates access d
Date
Msg-id E1bmNgq-00075T-RC@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Retry DSM control segment creation if Windows indicates access denied.

Otherwise, attempts to run multiple postmasters running on the same
machine may fail, because Windows sometimes returns ERROR_ACCESS_DENIED
rather than ERROR_ALREADY_EXISTS when there is an existing segment.

Hitting this bug is much more likely because of another defect not
fixed by this patch, namely that dsm_postmaster_startup() uses
random() which returns the same value every time.  But that's not
a reason not to fix this.

Kyotaro Horiguchi and Amit Kapila, reviewed by Michael Paquier

Discussion: <CAA4eK1JyNdMeF-dgrpHozDecpDfsRZUtpCi+1AbtuEkfG3YooQ@mail.gmail.com>

Branch
------
REL9_6_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/6bcd26c43c4f0ef718e984643338ddd5b207f9f9

Modified Files
--------------
src/backend/storage/ipc/dsm_impl.c | 31 ++++++++++++++++++-------------
1 file changed, 18 insertions(+), 13 deletions(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Retry DSM control segment creation if Windows indicates access d
Next
From: Robert Haas
Date:
Subject: pgsql: Retry DSM control segment creation if Windows indicates access d