Re: PATCH: pg_restore parallel-execution-deadlock issue

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Armin Schöffmann <armin(dot)schoeffmann(at)aegaeon(dot)de>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: pg_restore parallel-execution-deadlock issue
Date: 2016-05-27 16:06:40
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Michael Paquier <michael(dot)paquier(at)gmail(dot)com> writes:
> On Fri, May 27, 2016 at 4:07 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>> On Fri, May 27, 2016 at 3:05 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> 2. Armin proposes that WaitForTerminatingWorkers needs to do CloseHandle()
>>> on the various thread handles. That sounds plausible but I don't know
>>> enough Windows programming to know if it really matters.
>>> 3. Should we replace ExitThread() with _endthreadex()? Again, it
>>> seems plausible but I'm not the person to ask.

>> I think point (2) and (3) are related because using _endthreadex won't close
>> the thread handle explicitly [1].

> Yep.

OK, I pushed something based on that. It's untested by me but the
buildfarm should tell us if I broke anything too badly.

I believe we've now dealt with all the issues originally raised by
Armin, so I've marked this patch committed in the CF app.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2016-05-27 16:36:42 Re: Allow COPY to use parameters
Previous Message Kevin Grittner 2016-05-27 15:35:37 Re: [HACKERS] Re: pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <