Re: Bug report - pg_upgrade tool seems to have a race condition when trying to delete a pg_wal file

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Waka Ranai <wakadotranai(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Bug report - pg_upgrade tool seems to have a race condition when trying to delete a pg_wal file
Date: 2024-07-03 08:44:30
Message-ID: cb6770d34ab64200fa6628e23923a7d16a8c768f.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, 2024-07-02 at 11:57 +0200, Waka Ranai wrote:
> > command: "C:/Program Files/PostgreSQL/15/bin/pg_resetwal" -f -x 3466214 "C:/Program Files/PostgreSQL/15/data" >> "C:/Program Files/PostgreSQL/15/data/pg_upgrade_output.d/20>
> > pg_resetwal: error: could not delete file "pg_wal/000000010000000000000001": No such file or directory
>
> Hi again, I eventually found out that Cortex XDR was also installed on the system,
> but even after uninstalling it, I'm still faced with the same issue. I try to monitor
> the resources that might have a handle on the file, but the only ones shown are from
> postgres (one from postgres.exe and one from pg_resetwal). I did the monitoring with
> the bundled Resource Monitor of Microsoft, do you have any recommendations for another
> monitoring tool with automatic scanning maybe ?

I am not a Windows person; sorry.

> How could I make sure that the issue is not due to an internal postgres process ?

No idea - but the problem only happens for you, and as you say, it happens
always. Why would PostgreSQL do something else on your system only?

> Did you consider not failing the upgrade if the file cannot be deleted ? What would
> be the problems, if any, in that use case ?

Should PostgreSQL be resilient to important files being removed from under it?
I think not...

Yours,
Laurenz Albe

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Ware, Christopher M. (LARC-D318)[RSES] 2024-07-03 12:12:15 RE: [EXTERNAL] Re: BUG #18528: Installer displays error when installing
Previous Message Sandeep Thakkar 2024-07-03 02:42:25 Re: BUG #18528: Installer displays error when installing