Re: Fixing order of resowner cleanup in 12, for Windows - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Fixing order of resowner cleanup in 12, for Windows
Date
Msg-id CA+hUKGJL=gLQ4yZVa9yg08NYGEpVQ-CsCV8Dn2xSFwDBLSgTQA@mail.gmail.com
Whole thread Raw
In response to Re: Fixing order of resowner cleanup in 12, for Windows  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Fixing order of resowner cleanup in 12, for Windows  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On Mon, May 6, 2019 at 9:26 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
> On Mon, May 6, 2019 at 3:43 AM Thomas Munro <thomas.munro@gmail.com> wrote:
> > Here's a way to produce an error which might produce the log message
> > on Windows.  Does anyone want to try it?
>
> I can give it a try.

Thanks!

> > If it does produce the log message, then the attached patch should
> > make it go away.
>
> Are you referring to log message  "LOG:  could not rmdir directory
> "base/pgsql_tmp/pgsql_tmp3692.0.sharedfileset": Directory not empty"?

Yes.

> If so, I am getting it both before and after your patch.

Huh.  I thought the only problem here was the phenomenon demonstrated
by [1].  I'm a bit stumped... if we've closed all the handles in every
backend before detaching, and then the last to detach unlinks all the
files first and then the directory, how can we get that error?

[1] https://www.postgresql.org/message-id/CAEepm%3D2rH_V5by1kH1Q1HZWPFj%3D4ykjU4JcyoKMNVT6Jh8Q_Rw%40mail.gmail.com


--
Thomas Munro
https://enterprisedb.com



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: improving wraparound behavior
Next
From: Amit Kapila
Date:
Subject: Re: Fixing order of resowner cleanup in 12, for Windows