From: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] parallel.c oblivion of worker-startup failures |
Date: | 2018-01-24 05:02:45 |
Message-ID: | CAEepm=3PV9auk9jGwJxz3bSFyxwdP7bCkRisc87jysJy6PTw8Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jan 24, 2018 at 5:43 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>> Hmm. Yeah. I can't seem to reach a stuck case and was probably just
>> confused and managed to confuse Robert too. If you make
>> fork_process() fail randomly (see attached), I see that there are a
>> couple of easily reachable failure modes (example session at bottom of
>> message):
>>
>
> In short, we are good with committed code. Right?
Yep. Sorry for the noise.
> Yes, this is what I am trying to explain on parallel create index
> thread. I think there we need to either use
> WaitForParallelWorkersToFinish or WaitForParallelWorkersToAttach (a
> new API as proposed in that thread) if we don't want to use barriers.
> I see a minor disadvantage in using WaitForParallelWorkersToFinish
> which I will say on that thread.
Ah, I see. So if you wait for them to attach you can detect
unexpected dead workers (via shm_mq_receive), at the cost of having
the leader wasting time waiting around for forked processes to say
hello when it could instead be sorting tuples.
--
Thomas Munro
http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2018-01-24 05:06:25 | Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation) |
Previous Message | Amit Kapila | 2018-01-24 04:59:19 | Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation) |