Re: strange parallel query behavior after OOM crashes - Mailing list pgsql-hackers

From Robert Haas
Subject Re: strange parallel query behavior after OOM crashes
Date
Msg-id CA+TgmoZKp4cG1ORS6bYMtN52TZkrwYF+3A83D5DYB9v7fezAcw@mail.gmail.com
Whole thread Raw
In response to Re: strange parallel query behavior after OOM crashes  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List pgsql-hackers
On Tue, Apr 4, 2017 at 1:52 PM, Tomas Vondra
<tomas.vondra@2ndquadrant.com> wrote:
> In any case, the comment right before BackgroundWorkerArray says this:
>
>  * These counters can of course overflow, but it's not important here
>  * since the subtraction will still give the right number.
>
> which means that this assert
>
> +       Assert(BackgroundWorkerData->parallel_register_count >=
> +               BackgroundWorkerData->parallel_terminate_count);
>
> is outright broken, just like any other attempts to rely on simple
> comparisons of these two counters, no?

Yeah, that's busted.  Good catch.

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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Patch: Write Amplification Reduction Method (WARM)
Next
From: Tom Lane
Date:
Subject: Re: Re: Query fails when SRFs are part of FROM clause (Commit id: 69f4b9c85f)