Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XRH3T-0001Iz-06 for pgsql-admin@arkaria.postgresql.org; Tue, 09 Sep 2014 08:45:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XRH3R-0005oh-TJ for pgsql-admin@arkaria.postgresql.org; Tue, 09 Sep 2014 08:45:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XRH3P-0005oY-3F for pgsql-admin@postgresql.org; Tue, 09 Sep 2014 08:45:35 +0000 Received: from nm10-vm4.bullet.mail.ir2.yahoo.com ([212.82.96.156]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XRH36-0000UW-AB for pgsql-admin@postgresql.org; Tue, 09 Sep 2014 08:45:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1410252313; bh=zapyJsDrerU0JI0NcLnCFd3zkUSqPF7+7/731PyPbxo=; h=Received:Received:Received:DKIM-Signature:X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Date:From:To:Subject:Message-Id:In-Reply-To:References:X-Mailer:Disposition-Notification-To:Mime-Version:Content-Type:Content-Transfer-Encoding:From:Subject; b=WjeB/Qxi1K5Y03PA1p3Fsuqqr17D1jcHIgcltQTR9L+BdECVbhGx2YFnQSCEDwVfE2sqJ0md3h7ahA47o1SHCDFW6KwWT5J/4pUpQW1p1MWzRO+IDa5qeMj4wU4zUikrMAAP8ZvwtVtCRDgv+vgLcMTFhGvsIqYNKgBvpV3hP4NLJMt8S8Txz+zNzJlQlmG6a3OS27+gyLSjQydtDPXPVX6r6l39Di5iww9z6rxHm0qlZAZVdlKqjWGGXyUSdadhdn+ZEpMex9riJoA35m8vcnHd5u/pLAp7ASzMflYDo8VnE2PLYR3gcyNqRBxOI8p0u5C87/rZVlAoYvLvZvb4Yw== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.es; b=cPCmlUea0QHZcL+j3G+smusS0NvuoPQuCdXRyaiDwfc/ChrfZb/Bm2eZDRpt7E+OWMNk7ziwAMr5/KzZBMF643wompXxHzDb2qohGgn03zAkqAeDobTF+4/EnlWyIucN+bif5LeoTwM9inSGNOwfOWsnE4x7UQHbz42O/BqMSCqOByxVjqhmnvWctXhG3qGTKd/LzxuTx/OFlr3oKfxTMelt5YBe/zmG18WZAc78MYA+7BxKGc4w/TC5NecCKGuRLIBaMj5L0iIrgrMkSJkTzxnqQAntEheH4Q3uw5jBbiqZMJNuKv9yOBg2iWdN7+6H+0j/5JTRO9ZJ2uL82hvFjQ==; Received: from [212.82.98.50] by nm10.bullet.mail.ir2.yahoo.com with NNFMP; 09 Sep 2014 08:45:13 -0000 Received: from [46.228.39.74] by tm3.bullet.mail.ir2.yahoo.com with NNFMP; 09 Sep 2014 08:45:13 -0000 Received: from [127.0.0.1] by smtp111.mail.ir2.yahoo.com with NNFMP; 09 Sep 2014 08:45:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s1024; t=1410252313; bh=zapyJsDrerU0JI0NcLnCFd3zkUSqPF7+7/731PyPbxo=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Date:From:To:Subject:Message-Id:In-Reply-To:References:X-Mailer:Disposition-Notification-To:Mime-Version:Content-Type:Content-Transfer-Encoding; b=QQXWxmZ7Ck+te3085YSd5crtp6pXBNZRtEmMghck89iPPXGXDYitUm8AsxAXrytTvnWCJfmVvSSQbjtmkYmpkLo599FKKEyuy/xNl2DTFYYdcNzUhUtLZgxGXhgCtjwnBJK/x9TmZuVFBMN8BLZP9E+fWXWydepcAtsLoa6ARpE= X-Yahoo-Newman-Id: 828975.80174.bm@smtp111.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: bKhenCgVM1mf3Y2JjckD0eLgXt0enT9595h6KqutJB7Wz8n 0I988QCHMzKH7nbtdX2ghUSmFPYixqftdm9qZtEtgeZ0J3xOQ6cPCRJ2H0pF tJDn9tQ44rf1N3qPcIyzcdtx1G.wZ5ir2vZE4F4aJgnvYky9Z2GQjtFCJsg_ J8R5FCzahWSgUbCl2NR8bQPg_cvwbshTPS2WM9P1BFZLWzt0tIkKUtt2nmSE iXZWSEfIkmYJa.Xgcm.plsP6qC5B1WuOEsO_f89OqLFCFJgK87.MBO1GPib0 djgzDlQQPs6cyWTDbpf6WUqzRv7oBz8JF8op1V2huE3pZX44HafamzrKP6pO Iw_lBJMwzkU0_pKaysqgXC_lAiAdvqc_t6xWa4kTP2mt1jUi_PX6n2NiO11I YwethW8CZOwYjysVSe.cNCsCvahARNty3_Ii9nF26ANGyHqMg_f5uEbbzLt. tfo6j58oNqo4hGBN3WGZ7NU.UhLK.LnSNNJUYdBVahuduT7kcGiuCG1eD X-Yahoo-SMTP: mX392iiswBAeJNdO_s.EW62LZDJR Date: Tue, 9 Sep 2014 10:45:24 +0200 From: Eduardo Morras To: pgsql-admin@postgresql.org Subject: Re: Standby is not removing restored WAL segments Message-Id: <20140909104524.9c158f39a3edff9166a376d0@yahoo.es> In-Reply-To: References: X-Mailer: Sylpheed 3.4.2 (GTK+ 2.24.22; amd64-portbld-freebsd9.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -3.8 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org On Fri, 5 Sep 2014 09:33:57 +0200 Alexey Klyukin wrote: > Greetings, > > We've got a 9.3.5 DB running in a standby mode for a fairly large DB > (500GB) with a busy WAL traffic (couple of GBs per hour) and it > occasionally 'forgets' to remove the segments it restored. > > The checkpoint_segments is set to 128, and usually we observe around > 270 segments accumulated, but at the time it happens our check > triggers at around 2K segments. The manual checkpoint command takes > ages to complete there, the fast shutdown is very slow (around 10 > minutes, usually less than 1 minute) and the WAL receiver process is > also unable to run for some reason. > > The only way to make this host delete WAL files is to restart . The > particularly notable restart point right after the shutdown shows > quite a number of removed files and buffers written (the shared > buffers is set to 8GB on this system): > > 2014-09-04 14:39:33.376 CEST,,,22354,,537a4553.5752,88217,,2014-05-19 > 19:54:27 CEST,,0,LOG,00000,"restartpoint complete: wrote 332473 > buffers (31.7%); 0 transaction log file(s) added, 1237 removed, 6 > recycled; write=9.745 s, sync=680.314 s, total=694.447 s; sync > files=499 > , longest=37.774 s, average=1.363 s",,,,,,,,,"" > > If we leave the host running, this restartpoint never happens. > > The only difference I can come up with from the other databases that > do not show this behavior is that the host is running with > max_standby_streaming_delay and max_standby_archive_delay set to -1, > but at the time we observed the problem no queries were running on it > at all. > > The problem occurs rarely, but steadily, around once every 3 months. > During this time the PostgreSQL has been upgraded from 9.0 to 9.3, > which did not solve the issue. > Perhaps, the delete of wal files occurs before, in filesystem time, the wal file is closed by filesystem, and delete returns "error file still open". > Any clues on how can we debug and diagnose the problem further to come > up with a proper bug report, if it is a bug, or are we missing > something in the configuration that causes this? > > > Regards, > -- > Alexey Klyukin > > > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin --- --- Eduardo Morras -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin