Re: Log files polluted with permission denied error messages after every 10 seconds

2021-03-09 Thread Thomas Kellerer
Andrus schrieb am 05.03.2021 um 18:36: > Hi! > >>Windows? Don't let anti-virus software mess with the data directory. > > Windows default Windows Defender is active. I excluded data, pg_wal folders > and postgres process: > > > Then turned real-time protection off: > > Problem persists. New ent

Re: Log files polluted with permission denied error messages after every 10 seconds

2021-03-08 Thread Andrus
Yeah, I've wondered for some time if the apparent EACCES code is actually being mapped from something other than ERROR_SHARING_VIOLATION in (some of?) these reports. The hard part is to hold onto the Windows error code alongside errno without massively invasive changes. Permission denied erro

Re: Log files polluted with permission denied error messages after every 10 seconds

2021-03-08 Thread Andrus
Another thought: if it's not a sharing violation, I wonder if we should consider dumping more raw Windows error information in the messages we log, because, if I recall correctly, we're converting many Windows error codes into few Unix-style error numbers and thereby throwing away valuable clues

Re: Log files polluted with permission denied error messages after every 10 seconds

2021-03-08 Thread Tom Lane
Thomas Munro writes: > Another thought: if it's not a sharing violation, I wonder if we > should consider dumping more raw Windows error information in the > messages we log, because, if I recall correctly, we're converting many > Windows error codes into few Unix-style error numbers and thereby >

Re: Log files polluted with permission denied error messages after every 10 seconds

2021-03-08 Thread Thomas Munro
On Sat, Mar 6, 2021 at 2:36 PM Michael Paquier wrote: > On Fri, Mar 05, 2021 at 07:36:37PM +0200, Andrus wrote: > > Then turned real-time protection off: > > > > Problem persists. New entry is written after every 10 seconds. > > On which files are those complaints? It seems to me that you may hav

Re: Log files polluted with permission denied error messages after every 10 seconds

2021-03-07 Thread Michael Paquier
On Sun, Mar 07, 2021 at 11:45:26AM +0200, Andrus wrote: > Should files with .deleted extension deleted manually to save disk space ? > May of them have dates before today. RemoveOldXlogFiles() would discard any of those .deleted files because they don't match a legal WAL segment name, so checkpoin

Re: Log files polluted with permission denied error messages after every 10 seconds

2021-03-07 Thread Andrus
Hi! On Windows, RemoveXlogFile() would still rename a given WAL segment file with a ".deleted" suffix with ou without wal_recycle in the case where the a recycling of a WAL segment is not necessary, for example if max_wal_size is already full. So this has no effect. Should files with .deleted

Re: Log files polluted with permission denied error messages after every 10 seconds

2021-03-07 Thread Michael Paquier
On Sat, Mar 06, 2021 at 07:53:11PM +0200, Andrus wrote: > I changed wal_recycle to off. So checkpointer should no more try to rename > wal files. Iit still tries to rename files. No idea way it does not use this > setting: On Windows, RemoveXlogFile() would still rename a given WAL segment file wi

Re: Log files polluted with permission denied error messages after every 10 seconds

2021-03-06 Thread Andrus
Hi! These are generated on Windows when removing a past WAL segment, where the process involves a rename followed by durable_unlink() that would generate some LOG entries in the logs if the internal unlink() failed (see RemoveXlogFile() in xlog.c). I changed wal_recycle to off. So checkpointe

Re: Log files polluted with permission denied error messages after every 10 seconds

2021-03-06 Thread Andrus
Hi! > On which files are those complaints? log contains file names: ... 2021-03-06 10:27:51.468 EET [4580] LOG:  could not rename file "pg_wal/000100060092": Permission denied 2021-03-06 10:28:01.526 EET [4580] LOG:  could not rename file "pg_wal/000100060098": Permis

Re: Log files polluted with permission denied error messages after every 10 seconds

2021-03-05 Thread Michael Paquier
On Fri, Mar 05, 2021 at 07:36:37PM +0200, Andrus wrote: > Then turned real-time protection off: > > Problem persists. New entry is written after every 10 seconds. On which files are those complaints? It seems to me that you may have more going on in this system that interacts with your data fold

Re: Log files polluted with permission denied error messages after every 10 seconds

2021-03-05 Thread Andrus
Hi! >Windows? Don't let anti-virus software mess with the data directory. Windows default Windows Defender is active. I excluded data, pg_wal folders and postgres process: Then turned real-time protection off: Problem persists. New entry is written after every 10 seconds. pg_wal also conta

Re: Log files polluted with permission denied error messages after every 10 seconds

2021-03-05 Thread Laurenz Albe
On Fri, 2021-03-05 at 12:13 +0200, Andrus wrote: > Postgres 13.1 is installed in windows server. There are about 100 users. > > Log files contain huge number of permisson denied error messages in every day > like : > > 2021-03-04 01:38:49.818 EET [4580] LOG: could not rename file > "pg_wal/000