On Thu, May 25, 2017 at 8:41 AM, Noah Misch <noah@leadboat.com> wrote:
> On Thu, May 25, 2017 at 11:41:19AM +0900, Michael Paquier wrote:
>
>> Indeed, pgrename() does so with a 100ms sleep time between each
>> iteration. Perhaps we could do that and limit to 50 iterations?
>
> pgrename() is polling for an asynchronous event, hence the sleep. To my
> knowledge, time doesn't heal shm attach failures; therefore, a sleep is not
> appropriate here.
>
Yes, I also share this opinion, the shm attach failures are due to
randomization behavior, so sleep won't help much. So, I will change
the patch to use 100 retries unless people have other opinions.
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com