Hi!
https://docs.microsoft.com/en-us/sysinternals/downloads/handle
Examined todays logs in other windows 2019 server with Postgres
13.1
Permission denied occurs single file but permanently . Last entry is 6 minutes ago:
2021-03-09 00:02:23.915 EET [11328] LOG: could not rename file "pg_wal/000000010000004C00000034": Permission denied
2021-03-09 00:07:24.430 EET [11328] LOG: could not rename file "pg_wal/000000010000004C00000034": Permission denied
2021-03-09 00:12:34.392 EET [11328] LOG: could not rename file
"pg_wal/000000010000004C00000034": Permission denied
2021-03-09 00:17:24.270 EET [11328] LOG: could not rename file
"pg_wal/000000010000004C00000034": Permission denied
2021-03-09 00:22:23.780 EET [11328] LOG: could not rename file
"pg_wal/000000010000004C00000034": Permission denied
..
2021-03-09 17:59:04 EET checkpointerLOG: could not rename
file "pg_wal/000000010000004C00000034": Permission denied
Used Resource Monitor / CPU / Associated Handles and searched for "000000010000004C00000034". Resource Monitor shows that process 11336 is using that file
pg_stat_activity shows that this is "background writer" waiting
for event BgWriterMain or BgWriterHibernate
Permisson denied exception occurs accoring to log above in process 11328 which is listed as checkpointer.
So Background writer has locked the file permanently.
Checkpointer tries to write into it and gets permission denied
error all the time.
How to fix this ?