Re: [HACKERS] Instability in select_parallel regression test - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] Instability in select_parallel regression test
Date
Msg-id CA+TgmoaOZRuL_FZGYk__rTEysLZNWMi3M=VfoJhuf7j33f8ncg@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Instability in select_parallel regression test  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: [HACKERS] Instability in select_parallel regression test  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On Sun, Feb 19, 2017 at 6:50 PM, Amit Kapila <amit.kapila16@gmail.com> wrote:
> To close the remaining gap, don't you think we can check slot->in_use
> flag when generation number for handle and slot are same.

That doesn't completely fix it either, because
ForgetBackgroundWorker() also does
BackgroundWorkerData->parallel_terminate_count++, which we might also
fail to see, which would cause RegisterDynamicBackgroundWorker() to
bail out early.  There are CPU ordering effects to think about here,
not just the order in which the operations are actually performed.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robins Tharakan
Date:
Subject: Re: [HACKERS] Allow pg_dumpall to work without pg_authid
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] drop support for Python 2.3