Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gK2jz-0005J8-Vt for pgsql-admin@arkaria.postgresql.org; Tue, 06 Nov 2018 14:54:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gK2jy-0005bF-4X for pgsql-admin@arkaria.postgresql.org; Tue, 06 Nov 2018 14:54:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gK2jx-0005b8-PP for pgsql-admin@lists.postgresql.org; Tue, 06 Nov 2018 14:54:01 +0000 Received: from hermes.gatewaynet.com ([193.92.121.98]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gK2jt-0003Un-QM for pgsql-admin@lists.postgresql.org; Tue, 06 Nov 2018 14:54:00 +0000 Received: from smadev.internal.net (pc131.internal.net [10.9.200.131]) by hermes.gatewaynet.com (8.14.3/8.14.3/Debian-9.4) with ESMTP id wA6ErDgt013479 for ; Tue, 6 Nov 2018 16:53:18 +0200 Received: from smadev.internal.net (smadev [10.9.200.131]) by smadev.internal.net (8.15.2/8.15.2) with ESMTP id wA6ErDNF039056 for ; Tue, 6 Nov 2018 16:53:13 +0200 (EET) (envelope-from achill@matrix.gatewaynet.com) Subject: Re: PostgreSQL 10.5 : Strange pg_wal fill-up, solved with the shutdown checkpoint To: pgsql-admin@lists.postgresql.org References: <0d25bb8c-9cc7-10bc-71ba-6a8a8c33ec49@matrix.gatewaynet.com> <4b18bbdd50bc58d36087e79c2768943361df3505.camel@cybertec.at> From: Achilleas Mantzios Message-ID: <79cdddc4-ab2f-c663-2e1b-5af38ddd172a@matrix.gatewaynet.com> Date: Tue, 6 Nov 2018 16:53:13 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.0.1 MIME-Version: 1.0 In-Reply-To: <4b18bbdd50bc58d36087e79c2768943361df3505.camel@cybertec.at> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Virus-Scanned: clamav-milter 0.98.7 at hermes X-Virus-Status: Clean X-Spam-Status: No, score=-29.0 required=5.0 tests=ALL_TRUSTED,DYN_HAM_COORD, DYN_HAM_IT,DYN_HAM_NAUTICAL autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on hermes.gatewaynet.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 6/11/18 2:41 μ.μ., Laurenz Albe wrote: > Achilleas Mantzios wrote: > > If you set log_min_messages to DEBUG2, you should get a log message like > > attempting to remove WAL segments older than log file ... > > during each checkpoint. That would help to determine what is going on. Thank you Laurenz, is DEBUG2 cause a great deal of excessive log lines written to the log? or is there any way to set log_min_messages to DEBUG2 only for the checkpoints (by e.g. kill -HUP the checkpointer )? > The traditional things to hold back WAL segment removal are wal_keep_segments and > replication slots, but that should also hold for a shutdown checkpoint. wal_keep_segments is unchanged. We have only one replication slot running for the subscriber (testsmadb) (which is usually ultra verbose about replication problems) and there was nothing in the logs prior to the incident (or many hours before the incident) in the primary (smadb) or the subscriber to indicate anything regarding those two. Moreover, we have monitoring in place to take metrics on the replication lag. No mail alert relevant to this. No emails/log msgs indicating anything abnormal on smadb2 either (the non-replication-slot physical standby) . But the connection from smadb2 to the barman host went downhill this morning, I don't know if this was still the case in Sunday or if the two incidents are connected. Today we had a much more serious situation. Our traffic increased by almost 10 and the net speed fell also by 10.  But at least, today I explained everything (I hope). > > Yours, > Laurenz Albe -- Achilleas Mantzios IT DEV Lead IT DEPT Dynacom Tankers Mgmt