Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axGUI-00055A-Dw for pgsql-admin@arkaria.postgresql.org; Mon, 02 May 2016 16:14:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1axGUH-000286-Fd for pgsql-admin@arkaria.postgresql.org; Mon, 02 May 2016 16:14:21 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1axGUH-000280-2O for pgsql-admin@postgresql.org; Mon, 02 May 2016 16:14:21 +0000 Received: from gw-mail1.roc.in.bccnetworks.net ([184.12.4.101]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1axGUD-0001Mq-Q6 for pgsql-admin@postgresql.org; Mon, 02 May 2016 16:14:19 +0000 Received: from localhost (localhost [127.0.0.1]) by gw-mail1.roc.in.bccnetworks.net (Postfix) with ESMTP id 2D61D44AEA04; Mon, 2 May 2016 12:14:16 -0400 (EDT) Received: from gw-mail1.roc.in.bccnetworks.net ([127.0.0.1]) by localhost (gw-mail1.roc.in.bccnetworks.net [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id EOQFuCVZxoPI; Mon, 2 May 2016 12:14:13 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by gw-mail1.roc.in.bccnetworks.net (Postfix) with ESMTP id BB47A44F3DB4; Mon, 2 May 2016 12:14:13 -0400 (EDT) X-Virus-Scanned: amavisd-new at bccglobal.com Received: from gw-mail1.roc.in.bccnetworks.net ([127.0.0.1]) by localhost (gw-mail1.roc.in.bccnetworks.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id BCZ76iqxDMQd; Mon, 2 May 2016 12:14:13 -0400 (EDT) Received: from gw-mail1.roc.in.bccnetworks.net (localhost [127.0.0.1]) by gw-mail1.roc.in.bccnetworks.net (Postfix) with ESMTP id 935B944AEA04; Mon, 2 May 2016 12:14:13 -0400 (EDT) Date: Mon, 2 May 2016 12:14:13 -0400 (EDT) From: Peter =?utf-8?Q?Brunnengr=C3=A4ber?= Reply-To: Peter =?utf-8?Q?Brunnengr=C3=A4ber?= To: pgsql-admin Cc: Keith Message-ID: <566233723.2724.1462205651189.JavaMail.pbrunnen@Station8.local> In-Reply-To: References: <1768734441.2711.1462204088868.JavaMail.pbrunnen@Station8.local> <1206916146.2714.1462204427454.JavaMail.pbrunnen@Station8.local> Subject: Re: Hot_standby WAL archiving question MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailer: Zimbra 8.6.0_GA_1194 (Zimbra Desktop/7.2.7_12059_Mac) Thread-Topic: Hot_standby WAL archiving question Thread-Index: ffJL6XfXwS/MjmbtKut82uX0EVh57g== 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 Hi Keith, Thank you for the reply. Ok, but so how can I safely clean up the pg_archive folder on my master? Thank you! -With kind regards, Peter Brunnengr=C3=A4ber ----- Original Message ----- From: "Keith" To: "Peter Brunnengr=C3=A4ber" Cc: "pgsql-admin" Sent: Monday, May 2, 2016 12:07:12 PM Subject: Re: [ADMIN] Hot_standby WAL archiving question On Mon, May 2, 2016 at 11:53 AM, Peter Brunnengr=C3=A4ber < pbrunnen@bccglo= bal.com > wrote:=20 Hello all,=20 So I have been working on setting up an active/standby clustered postgresql= 9.2 using corosync. The corosync documentation has me enable WAL archiving= "archive_command =3D 'cp %p /db/data/postgresql/9.2/pg_archive/%f'"=20 I assume so that the secondary can catch up in async (log shipping) mode be= fore going into sync (streaming) mode. But I am noticing as I push data thr= ough the DB, that my pg_archive keeps growing and I am worried about runnin= g out of disk space.=20 Per the postgresql documentation, I set "wal_keep_segments" but I believe t= his only effects the segments in the pg_xlog and not what the archive_comma= nd is processing.=20 So, since I am not keeping the archived WAL statements for long term use, i= s it safe to set "archive_cleanup_command =3D 'pg_archivecleanup /db/data/p= ostgresql/9.2/pg_archive %r'" on the master? Also will the archive cleanup = command even have effect? I only read about it being on slaves to clean-up = what has already been processed.=20 Thank you!=20 -With kind regards,=20 Peter Brunnengr=C3=A4ber=20 --=20 Sent via pgsql-admin mailing list ( pgsql-admin@postgresql.org )=20 To make changes to your subscription:=20 http://www.postgresql.org/mailpref/pgsql-admin=20 The archive_cleanup_command is something you set on the slave in the recove= ry.conf, not on the master. It will run whatever command you place there to= remove WAL files that have been confirmed to have been replayed by the sla= ve and are no longer needed by the slave itself.=20 Keith=20 --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin