Re: PostgreSQL occasionally unable to rename WAL files (NTFS)

2021-03-21 Thread Michael Paquier
On Tue, Feb 16, 2021 at 12:22:36PM +0100, Thomas Kellerer wrote: > My first suspect is always the anti-virus on Windows when things like > that happen with Postgres. Or maybe not. 13 has introduced a regression in this area AFAIK, and 909b449 should have taken care of it (available in 13.3~). --

Re: PostgreSQL occasionally unable to rename WAL files (NTFS)

2021-02-16 Thread Thomas Kellerer
Guy Burgess schrieb am 15.02.2021 um 11:52: > The mystery now is that the only process logged as touching the > affected WAL files is postgres.exe (of which there are many separate > processes). Could it be that one of the postgres.exe instances is > holding the affected WAL files in use after anot

Re: PostgreSQL occasionally unable to rename WAL files (NTFS)

2021-02-16 Thread Guy Burgess
On 16/02/2021 12:23 am, Thorsten Schöning wrote: The mystery now is that the only process logged as touching the affected WAL files is postgres.exe (of which there are many separate processes). Could it be that one of the postgres.exe instances is holding the affected WAL files in use after anoth

Re: PostgreSQL occasionally unable to rename WAL files (NTFS)

2021-02-15 Thread Thorsten Schöning
Guten Tag Guy Burgess, am Montag, 15. Februar 2021 um 11:52 schrieben Sie: > The mystery now is that the only process logged as touching the > affected WAL files is postgres.exe (of which there are many separate > processes). Could it be that one of the postgres.exe instances is > holding the affe

Re: PostgreSQL occasionally unable to rename WAL files (NTFS)

2021-02-15 Thread Guy Burgess
On 12/02/2021 4:33 am, Thorsten Schöning wrote: The behaviour you describe happens exactly when two processes e.g. concurrently hold HANDLEs on the same file and one of those deletes the file then. Windows keeps file names until all open HANDLEs are closed and depending on how those HANDLEs have

Re: PostgreSQL occasionally unable to rename WAL files (NTFS)

2021-02-12 Thread Guy Burgess
On 12/02/2021 4:33 am, Thorsten Schöning wrote: If you see that somewhat frequently, use Process Monitor and Process Explorer to see who accesses those files how. ProcExp easily allows you to find all open handles per file. If it's not AV, it might be something like Windows Search Indexer as well

Re: PostgreSQL occasionally unable to rename WAL files (NTFS)

2021-02-12 Thread Guy Burgess
On 12/02/2021 12:31 am, Lionel Bouton wrote: I haven't dealt with a Windows environment for quite some time, but from what I remember an antivirus installs a driver intercepting file accesses and these drivers are still active even if you disable the antivirus (I suppose they just call a noop ins

Re: PostgreSQL occasionally unable to rename WAL files (NTFS)

2021-02-11 Thread Thorsten Schöning
Guten Tag Guy Burgess, am Donnerstag, 11. Februar 2021 um 01:21 schrieben Sie: > What appears to be happening is the affected WAL files (which is > usually only 2 or 3 WAL files at a time) are somehow "losing" their > NTFS permissions, so the PG process can't rename them - though of > course the P

Re: PostgreSQL occasionally unable to rename WAL files (NTFS)

2021-02-11 Thread Lionel Bouton
Hi, Le 11/02/2021 à 01:21, Guy Burgess a écrit : > > Hello, > > Running 13.1 on Windows Server 2019, I am getting the following log > entries occasionally: > >     2021-02-11 12:34:10.149 NZDT [6072] LOG:  could not rename file > "pg_wal/0001009900D3": Permission denied >     2021-02-1

PostgreSQL occasionally unable to rename WAL files (NTFS)

2021-02-10 Thread Guy Burgess
Hello, Running 13.1 on Windows Server 2019, I am getting the following log entries occasionally:     2021-02-11 12:34:10.149 NZDT [6072] LOG:  could not rename file "pg_wal/0001009900D3": Permission denied     2021-02-11 12:40:31.377 NZDT [6072] LOG:  could not rename file "pg_wa