Re: Wait for parallel workers to attach

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Peter Geoghegan <pg(at)bowt(dot)ie>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Subject: Re: Wait for parallel workers to attach
Date: 2018-01-31 03:29:31
Message-ID: CAA4eK1Jgxy+h=sFh72jz493Cyz=PA-3ZuHiEXSZimPXXSW2-dg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 31, 2018 at 8:46 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Tue, Jan 30, 2018 at 10:10 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>> I am not getting what exactly you are suggesting here. The wait loop
>> is intended for the case when some workers are not started. We want
>> to wait for sometime before checking again whether workers are
>> started. I wanted to avoid busy looping waiting for some worker to
>> start. I think in most cases we don't need to wait, but for some
>> corner cases where postmaster didn't get chance to start a worker, we
>> should avoid busy looping waiting for a worker to start.
>
> I agree we need to avoid busy-looping. What I'm saying is that we
> don't need a timeout. Why do you think we need a timeout?
>

I thought we need it for worker startup, but now after again looking
at the code, it seems we do notify at worker startup as well. So, we
don't need a timeout.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Haozhou Wang 2018-01-31 03:57:12 [PATCH] Add missing type conversion functions for PL/Python
Previous Message Michael Paquier 2018-01-31 03:18:16 Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files