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-17 01:42:15
Message-ID: CA+hUKGLOgxbg4e07VJDqdU-y3ANReADV0_Ok6ZjgNMFCWSpVaw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 9, 2019 at 10:23 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> 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.

This was listed as an open item for PostgreSQL 12, but I'm going to
move it to "older bugs". I want to fix it, but now that I understand
what's wrong, it's a slightly bigger design issue than I'm game to try
to fix right now.

This means that 12, like 11, will be capable of leaking empty
temporary directories on Windows whenever an error is raised in the
middle of parallel CREATE INDEX or multi-batch Parallel Hash Join.
The directories are eventually unlinked at restart, and at least
the (potentially large) files inside the directory are unlinked on
abort. I think we can live with that for a bit longer.

--
Thomas Munro
https://enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-05-17 01:44:24 Re: pglz performance
Previous Message Michael Paquier 2019-05-17 01:34:56 Re: VACUUM fails to parse 0 and 1 as boolean value