Re: [HACKERS] parallel.c oblivion of worker-startup failures - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] parallel.c oblivion of worker-startup failures
Date
Msg-id 22410.1512572062@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] parallel.c oblivion of worker-startup failures  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [HACKERS] parallel.c oblivion of worker-startup failures
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> I'm not in love with that part of the fix; the other parts of that if
> statement are just testing variables, and a function call that takes
> and releases an LWLock is a lot more expensive.  Furthermore, that
> test will often be hit in practice, because we'll often arrive at this
> function before workers have actually finished.  On top of that, we'll
> typically arrive here having already communicated with the worker in
> some way, such as by receiving tuples, which means that in most cases
> we already know that the worker was alive at least at some point, and
> therefore the extra test isn't necessary.  We only need that test, if
> I understand correctly, to cover the failure-to-launch case, which is
> presumably very rare.

Maybe track "worker is known to have launched" in the leader's state
someplace?

            regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Transaction control in procedures
Next
From: Ildus Kurbangaliev
Date:
Subject: Re: [HACKERS] Custom compression methods