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

From: Waka Ranai <wakadotranai(at)gmail(dot)com>
To: 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-05-23 09:39:24
Message-ID: CAP8Vo=9Rp6MnE3LsNo5aAkjLNueXEXjDmjvBPF3AQEwbpnfXcA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I cannot confirm for each of the machines, but I know that on some of them
where the issue happened, no virus scanner were installed apart from the
default one of Microsoft, and I did not see any other processes than
postgres using the file when I looked with Process Explorer, do you know
how I can be 100% sure that it was not the case ?

Thanks in advance,

Thomas

Le jeu. 23 mai 2024 à 09:21, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> a
écrit :

> On Wed, 2024-05-22 at 18:14 +0200, Waka Ranai wrote:
> > The command I ran is
> > "C:\Program Files\PostgreSQL\15\bin\pg_upgrade.exe" -d "C:\Program
> Files\PostgreSQL\9.6\data" -D "C:\Program Files\PostgreSQL\15\data" -b
> "C:\Program Files\PostgreSQL\9.6\bin" -B "C:\Program
> Files\PostgreSQL\15\bin" -U postgres
> > after having set PGPASSWORD to the correct password.
> >
> > The issue was either
> > “pg_resetwal: error: could not delete file
> "pg_wal/000000010000000000000001": Permission denied”
> > or sometimes it was saying that the file could not be found instead of
> Permission denied.
> > When I look in the directory while it is executing, I can see that the
> file is there previously,
> > and always removed after the pg_upgrade crashes. I tried to inspect with
> Process Explorer what
> > processes were using it, always processes from postgres, only one after
> a fresh install of
> > postgres 15, but I saw that during the execution of pg_upgrade,
> sometimes two processes were
> > using it.
>
> Did you make sure that no virus scanner is active on the data directories?
>
> Yours,
> Laurenz Albe
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Pengfei Wang 2024-05-23 10:06:24 issue: nbtpage.c,_bt_pagedel may get wrong result
Previous Message Laurenz Albe 2024-05-23 07:21:10 Re: Bug report - pg_upgrade tool seems to have a race condition when trying to delete a pg_wal file