Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lIb7N-0006gV-OR for pgsql-general@arkaria.postgresql.org; Sat, 06 Mar 2021 17:53:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lIb7L-0001Bo-RG for pgsql-general@arkaria.postgresql.org; Sat, 06 Mar 2021 17:53:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lIb7L-0001Bh-GW for pgsql-general@lists.postgresql.org; Sat, 06 Mar 2021 17:53:31 +0000 Received: from portal-smtp-out.hot.ee ([194.126.101.125]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lIb7E-0002tJ-6V for pgsql-general@postgresql.org; Sat, 06 Mar 2021 17:53:30 +0000 Received: from localhost (localhost [127.0.0.1]) by vm-hot-relay10.estpak.ee (Postfix) with ESMTP id 974C01945; Sat, 6 Mar 2021 19:53:21 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at vm-hot-relay10.estpak.ee Received: from portal-smtp-out.hot.ee ([127.0.0.1]) by localhost (vm-hot-relay10.estpak.ee [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t5UQFkj-qSj9; Sat, 6 Mar 2021 19:53:19 +0200 (EET) Received: from mail.hot.ee (hot-relayhost2.estpak.ee [213.180.2.80]) by vm-hot-relay10.estpak.ee (Postfix) with ESMTP id 2466F16B2; Sat, 6 Mar 2021 19:53:19 +0200 (EET) Subject: Re: Log files polluted with permission denied error messages after every 10 seconds To: Michael Paquier Cc: Laurenz Albe , pgsql-general References: <3861ff1e-0923-7838-e826-094cc9bef737@hot.ee> <676dc946300076e60d6af455ac1bfa489fbbdd8b.camel@cybertec.at> <97e00b3b-9357-4386-d4bd-b9128e4b8924@hot.ee> From: Andrus Message-ID: Date: Sat, 6 Mar 2021 19:53:11 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------CED1B431758733DC0072F41D" Content-Language: et List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------CED1B431758733DC0072F41D Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit 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 checkpointer should no more try to rename wal files. Iit still tries to rename files. No idea way it does not use this setting: 2021-03-06 19:44:28 EET     checkpointer LOG:  could not rename file "pg_wal/0000000100000006000000EB": Permission denied 2021-03-06 19:44:38 EET     checkpointer LOG:  could not rename file "pg_wal/0000000100000006000000F0": Permission denied 2021-03-06 19:44:48 EET     checkpointer LOG:  could not rename file "pg_wal/0000000100000006000000F7": Permission denied 2021-03-06 19:44:58 EET     checkpointer LOG:  could not rename file "pg_wal/0000000100000006000000FB": Permission denied 2021-03-06 19:45:08 EET     postmaster LOG:  received SIGHUP, reloading configuration files 2021-03-06 19:45:08 EET     postmaster LOG:  parameter "wal_recycle" changed to "off" 2021-03-06 19:45:08 EET     checkpointer LOG:  could not rename file "pg_wal/0000000100000006000000FE": Permission denied 2021-03-06 19:45:18 EET     checkpointer LOG:  could not rename file "pg_wal/0000000100000006000000FF": Permission denied 2021-03-06 19:45:28 EET     checkpointer LOG:  could not rename file "pg_wal/000000010000000700000000": Permission denied 2021-03-06 19:45:38 EET     checkpointer LOG:  could not rename file "pg_wal/000000010000000700000002": Permission denied 2021-03-06 19:45:48 EET     checkpointer LOG:  could not rename file "pg_wal/000000010000000700000011": Permission denied 2021-03-06 19:45:59 EET     checkpointer LOG:  could not rename file "pg_wal/000000010000000700000012": Permission denied 2021-03-06 19:46:09 EET     checkpointer LOG:  could not rename file "pg_wal/000000010000000700000015": Permission denied 2021-03-06 19:46:19 EET     checkpointer LOG:  could not rename file "pg_wal/000000010000000700000016": Permission denied Should chekpointer process terminated to force it to use new setting. Is it safe to kill it during database usage. Andrus. --------------CED1B431758733DC0072F41D Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit

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 checkpointer should no more try to rename wal files. Iit still tries to rename files. No idea way it does not use this setting:

2021-03-06 19:44:28 EET     checkpointer LOG:  could not rename file "pg_wal/0000000100000006000000EB": Permission denied

2021-03-06 19:44:38 EET     checkpointer LOG:  could not rename file "pg_wal/0000000100000006000000F0": Permission denied
2021-03-06 19:44:48 EET     checkpointer LOG:  could not rename file "pg_wal/0000000100000006000000F7": Permission denied
2021-03-06 19:44:58 EET     checkpointer LOG:  could not rename file "pg_wal/0000000100000006000000FB": Permission denied
2021-03-06 19:45:08 EET     postmaster LOG:  received SIGHUP, reloading configuration files
2021-03-06 19:45:08 EET     postmaster LOG:  parameter "wal_recycle" changed to "off"
2021-03-06 19:45:08 EET     checkpointer LOG:  could not rename file "pg_wal/0000000100000006000000FE": Permission denied
2021-03-06 19:45:18 EET     checkpointer LOG:  could not rename file "pg_wal/0000000100000006000000FF": Permission denied
2021-03-06 19:45:28 EET     checkpointer LOG:  could not rename file "pg_wal/000000010000000700000000": Permission denied
2021-03-06 19:45:38 EET     checkpointer LOG:  could not rename file "pg_wal/000000010000000700000002": Permission denied
2021-03-06 19:45:48 EET     checkpointer LOG:  could not rename file "pg_wal/000000010000000700000011": Permission denied
2021-03-06 19:45:59 EET     checkpointer LOG:  could not rename file "pg_wal/000000010000000700000012": Permission denied

2021-03-06 19:46:09 EET     checkpointer LOG:  could not rename file "pg_wal/000000010000000700000015": Permission denied

2021-03-06 19:46:19 EET     checkpointer LOG:  could not rename file "pg_wal/000000010000000700000016": Permission denied

Should chekpointer process terminated to force it to use new setting. Is it safe to kill it during database usage.

Andrus.
--------------CED1B431758733DC0072F41D--