Re: retry shm attach for windows (WAS: Re: OK, so culicidae is *still* broken)

From: Noah Misch <noah(at)leadboat(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: retry shm attach for windows (WAS: Re: OK, so culicidae is *still* broken)
Date: 2017-05-25 02:23:44
Message-ID: 20170525022344.GA104533@gust.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 24, 2017 at 09:29:11AM -0400, Michael Paquier wrote:
> On Tue, May 23, 2017 at 8:14 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> > So it seems both you and Tom are leaning towards some sort of retry
> > mechanism for shm reattach on Windows. I also think that is a viable
> > option to negate the impact of ASLR. Attached patch does that. Note
> > that, as I have mentioned above I think we need to do it for shm
> > reserve operation as well. I think we need to decide how many retries
> > are sufficient before bailing out. As of now, I have used 10 to have
> > some similarity with PGSharedMemoryCreate(), but we can choose some
> > different count as well. One might say that we can have "number of
> > retries" as a guc parameter, but I am not sure about it, so not used.
>
> New GUCs can be backpatched if necessary, though this does not seem
> necessary. Who is going to set up that anyway if we have a limit high
> enough. 10 looks like a sufficient number to me.

Ten feels low to me. The value should be be low enough so users don't give up
and assume a permanent hang, but there's little advantage to making it lower.
I'd set it such that we give up in 1-5s on a modern Windows machine, which I
expect implies a retry count of one hundred or more.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tsunakawa, Takayuki 2017-05-25 02:34:21 Re: retry shm attach for windows (WAS: Re: OK, so culicidae is *still* broken)
Previous Message Masahiko Sawada 2017-05-25 02:15:54 Re: Create subscription with `create_slot=false` and incorrect slot name