Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X6VqY-0004rP-DE for pgsql-admin@arkaria.postgresql.org; Mon, 14 Jul 2014 02:18:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X6VqX-0000tB-Rz for pgsql-admin@arkaria.postgresql.org; Mon, 14 Jul 2014 02:18:29 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X6VqW-0000qX-90 for pgsql-admin@postgresql.org; Mon, 14 Jul 2014 02:18:28 +0000 Received: from mout.kundenserver.de ([212.227.17.24]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X6VqS-0005Fa-VR for pgsql-admin@postgresql.org; Mon, 14 Jul 2014 02:18:26 +0000 Received: from ayaki.localdomain (58-7-95-106.dyn.iinet.net.au [58.7.95.106]) by mrelayeu.kundenserver.de (node=mreue103) with ESMTP (Nemesis) id 0MaU9p-1WqthX00YD-00KBF6; Mon, 14 Jul 2014 04:18:23 +0200 Message-ID: <53C33DE8.7000902@2ndquadrant.com> Date: Mon, 14 Jul 2014 10:18:16 +0800 From: Craig Ringer Organization: 2nd Quadrant User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: John Scalia , "pgsql-admin@postgresql.org" Subject: Re: WAL segment management on a standby References: <53C015AA.5070908@gmail.com> In-Reply-To: <53C015AA.5070908@gmail.com> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:7Xf+t3unVwJZo6+tMQ6xp6q1Dk1KbiCrYhKV9phAIDL jeW9H1xCyoBbjjI3rQRmdXx4j1VGifzmd6bXCggvVX5SdwvCx8 IocnecOHbT3skMP6hrNscJHK59kPSyuTHI0hF9GFxrZ8CC/evO 8MC1Ai0bgxWMbBLI6LxMeTFOQke10Ma4uFY3+TpssVPt3hybSc dcpbu98DSFtUgY3kLNbjNtdQ9Bo7Rrlyz9KY5FPyqaAnWrzyl3 UhA45fgpkLcdxCdMsMxaceJMSSkVWLv1bOSHAFlUTVHcTG53Av P1WdZgCkBCxqULlG0WbtVCe723CM8yJdmaNjtExLyWwcf0pr2o DHnYpKtp/LUoRQ3YWTH0orH31WdB8yEolGjLMjysq X-Pg-Spam-Score: -1.9 (-) 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 07/12/2014 12:49 AM, John Scalia wrote: > Again, thanks to all to have assisted me with getting the WAL segments > to both my standby servers. Everything with that is now working quite > well. I do have a related followup question, however. On these standby's > nothing is built in to manage those WAL segments in the archive > directory. Thus, that directory can grow to the point where it fills up > the disk rather quickly. Any good strategies for dealing with the WAL > segments that get put in there. Do I really need them after postgresql > has copied them up into the pg_xlog directory? If so, how far back > should I keep them? Yes, I know about keeping everything between > backups. So, if my directory looks like: > > 00000000300000000C000000A1 > 00000000300000000C000000A2 > 00000000300000000C000000A3 > 00000000300000000C000000A3.backup > 00000000300000000C000000A4 > > Could I safely delete the *A1, *A2, and maybe even the *A3 files? Take a look at the pg_archivecleanup tool. You might also want to look at PgBarman to automate this. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin