Re: Fixing order of resowner cleanup in 12, for Windows

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fixing order of resowner cleanup in 12, for Windows
Date: 2019-05-09 10:23:25
Message-ID: CA+hUKGJCFfH6xDKXv02yYzv-yrX+WknJsvOLGcRAor1SsYvEwg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 7, 2019 at 6:08 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Mon, May 6, 2019 at 1:58 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > > Right. That's why I favor applying the change to move DSM cleanup to
> > > the end for now, and seeing how that goes. It could be that we'll
> > > eventually discover that doing it before all of the AtEOXact_BLAH
> > > functions have had a short at doing their thing is still too early,
> > > but the only concrete problem that we know about right now can be
> > > solved by this much-less-invasive change.
> >
> > But Amit's results say that this *doesn't* fix the problem that we know
> > about. I suspect the reason is exactly that we need to run AtEOXact_Files
> > or the like before closing DSM. But we should get some Windows developer
> > to trace through this and identify the cause for-sure before we go
> > designing an invasive fix.
>
> Huh, OK.

The reason the patch didn't solve the problem is that
AtEOXact_Parallel() calls DestroyParallelContext(). So DSM segments
that happen to belong to ParallelContext objects are already gone by
the time resowner.c gets involved.

--
Thomas Munro
https://enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2019-05-09 11:09:33 Re: Missing FDW documentation about GetForeignUpperPaths
Previous Message Etsuro Fujita 2019-05-09 09:52:38 Re: postgres_fdw: another oddity in costing aggregate pushdown paths