Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UDQA0-0000BL-Jz for pgsql-admin@arkaria.postgresql.org; Thu, 07 Mar 2013 02:02:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UDQ9z-0005zp-VP for pgsql-admin@arkaria.postgresql.org; Thu, 07 Mar 2013 02:02:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UDQ9y-0005zi-Rm for pgsql-admin@postgresql.org; Thu, 07 Mar 2013 02:02:19 +0000 Received: from mail-qa0-f52.google.com ([209.85.216.52]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UDQ9v-0008Kv-Ar for pgsql-admin@postgresql.org; Thu, 07 Mar 2013 02:02:18 +0000 Received: by mail-qa0-f52.google.com with SMTP id bs12so29661qab.11 for ; Wed, 06 Mar 2013 18:02:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=KYUw/yuis27UyfVs/7fuyXkQzM5e9BeQRdBhvsIon3M=; b=LGOAYCRGAv+FLcMZHWXHpDQOqvZcKYhEY6q4j6SkHWKx1czpe2yk0do11V3uZZgHKN x7GncIf7OzwDGuUmnfoPcYspeV2GGv0a2tSkooxxXDob4rNed+kEX/r2OmrSWcCYZsGd HMITbINrsD7T4Sqhh3wQyC7HOFd3vRuMnyVZswfllbuP8FuoKTtwQf7y5DMpdOaPEp8X wJN6SUg2kC0U4ptckf0vLC2fGBFySZN4eYQe9smwOon7XmD6PdVZ4/emYTn52wDBTVF3 ZYM88WsGN2L15SuGou0/YUOz9rhn968vCBcdDnD+3QllvfYYvK5BN9I1ynFUfcEZcOR3 OhIg== MIME-Version: 1.0 X-Received: by 10.229.204.167 with SMTP id fm39mr10630540qcb.97.1362621734177; Wed, 06 Mar 2013 18:02:14 -0800 (PST) Received: by 10.49.97.40 with HTTP; Wed, 6 Mar 2013 18:02:14 -0800 (PST) In-Reply-To: <5137EE26.6010405@consistentstate.com> References: <5137EE26.6010405@consistentstate.com> Date: Thu, 7 Mar 2013 07:32:14 +0530 Message-ID: Subject: Re: HOT Standby - slave does not appear to be removing wal files From: Prashanth Ranjalkar To: CS DBA Cc: pgsql-admin@postgresql.org Content-Type: multipart/alternative; boundary=0016369fa1996df26604d74c1892 X-Pg-Spam-Score: -2.7 (--) 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 --0016369fa1996df26604d74c1892 Content-Type: text/plain; charset=ISO-8859-1 While setting up Hot Standby, it's not a method to copy the primary database using dump and restore it on standby using restore command as it's a logical backup. I doubt your WAL archiving is enabled and files are copied to archive destination that set in archive_command therefore keep accumulating under pg_xlog directory. For hot standby setup, archiving must be enabled and online backup (file system level) needs to be taken for setting up Standby server and recovery.conf need to be prepared on slave server. Please go through http://www.postgresql.org/docs/9.2/static/high-availability.html for more details. *Thanks & Regards,* *** * *Prashanth Ranjalkar* *Database Consultant & Architect* *Skype:prashanth.ranjalkar* *www.postgresdba.net* On Thu, Mar 7, 2013 at 7:02 AM, CS DBA wrote: > All; > > We're doing a migration as follows: > > 1) we setup a HOT standby pair > > 2) we did an import of a db that wan backed up via pg_dump > > The pg_xlog directory has > 1700 files in it, It seems that the slave is > way behind which I get since we just imported a 55GB database but the slave > is not removing it's local pg_xlog wal files. > > We actually stopped the import when the slave hit 97% full for the file > system where we have it's pg_xlog directory mounted > after like 30minutes the file count in the slave's pg_xlog dir has not > changed. > > Any thoughts per why the slave is not removing these files? > > Thanks in advance > > > > > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/**mailpref/pgsql-admin > --0016369fa1996df26604d74c1892 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
While setting up Hot Standby, it&= #39;s not a method to copy the primary database using dump and restore it o= n standby=A0 using restore command as it's a logical backup. I doubt yo= ur WAL archiving is enabled and files are copied to archive destination tha= t set in archive_command therefore keep accumulating under pg_xlog director= y.

For hot standby setup, archiving must be enabled and online backup (fil= e system level) needs to be taken for setting up Standby server and recover= y.conf need to be prepared on slave server.

Please go through htt= p://www.postgresql.org/docs/9.2/static/high-availability.html for more details.
Thanks & Regards,=
=A0
Prashanth Ranjalkar
Database Consultant & Archi= tect
Skype:prashanth.ranja= lkar



On Thu, Mar 7, 2013 at 7:02 AM, CS DBA <cs_dba@consistentstate.com> wrote:
All;

We're doing a migrati= on as follows:

1) we setup a HOT standby pair

2) we did an im= port of a db that wan backed up via pg_dump

The pg_xlog directory has > 1700 files in it, It seems that the slav= e is way behind which I get since we just imported a 55GB database but the = slave is not removing it's local pg_xlog wal files.

We actually = stopped the import when the slave hit 97% =A0full for the file system where= we have it's pg_xlog directory mounted
after like 30minutes the file count in the slave's pg_xlog dir has not = changed.

Any thoughts per why the slave is not removing these files?=

Thanks in advance



--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org= /mailpref/pgsql-admin

--0016369fa1996df26604d74c1892--