Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UHcBp-0001vu-HS for pgsql-performance@arkaria.postgresql.org; Mon, 18 Mar 2013 15:41:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UHcBo-0000ZJ-SX for pgsql-performance@arkaria.postgresql.org; Mon, 18 Mar 2013 15:41:32 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UHcBn-0000ZD-Jx for pgsql-performance@postgresql.org; Mon, 18 Mar 2013 15:41:31 +0000 Received: from mail-wg0-f49.google.com ([74.125.82.49]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UHcBb-0007z9-GG for pgsql-performance@postgresql.org; Mon, 18 Mar 2013 15:41:30 +0000 Received: by mail-wg0-f49.google.com with SMTP id ds1so4023561wgb.4 for ; Mon, 18 Mar 2013 08:41:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:content-type:mime-version:subject:from:in-reply-to:date :cc:content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=eaG212ozkH+B+xvFqxTVshKGkfvk/TboGISKfUWN4i0=; b=AXVtUJ+mc0BQA1404HoGeEyHKBKapruoMq3f6oBbaRjIGM5A6wzGTpROILY2EZDODt wTeTDtSWKbVYhl2/hCMcUviyXaHNQ7pugz+hbWsu4sLvm+jgSwVLaDucv3DELYjIFaGV ijgEOUrbpfooPee8gG0LnB0YQW6ohBkuDeB6dolw69FC2715/IiZbIpRVSnOaW5cHai5 1yoM3OO0siSmBlC/UrtzherkdCCCvbnQXk+yPGsK6Ki3yLWe+dXVN9fsQDnJS1Q4vqxJ NMLbUYTv0b7Byj70tTY+zaJS5UjUQMGpaT3O6mMzNSDTsG7lX0plR7mmfFsWDIYWRoZD B81A== X-Received: by 10.194.110.69 with SMTP id hy5mr26083999wjb.1.1363621277777; Mon, 18 Mar 2013 08:41:17 -0700 (PDT) Received: from [192.168.1.34] (0905ds8-ar.0.fullrate.dk. [90.185.25.212]) by mx.google.com with ESMTPS id fx5sm15702011wib.11.2013.03.18.08.41.15 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 18 Mar 2013 08:41:16 -0700 (PDT) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: Why is my pg_xlog directory so huge? From: =?iso-8859-1?Q?Niels_Kristian_Schj=F8dt?= In-Reply-To: Date: Mon, 18 Mar 2013 16:41:19 +0100 Cc: postgres performance list Content-Transfer-Encoding: quoted-printable Message-Id: <1018C01B-F44B-4E42-AC57-F29EEA840A32@autouncle.com> References: <02E032A0-7E7A-4CB3-9C76-5739B05660D5@autouncle.com> <40D4328C-1761-4A2B-A579-7B69736BBAD6@autouncle.com> To: Magnus Hagander X-Mailer: Apple Mail (2.1499) X-Gm-Message-State: ALoCoQl71YsAhFI2U34MZLuOD74B5vyDlGB/NImRxuqw8MI3sJpJIqjrE1S9lYeZXQ2B1exxQF5l X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Thanks! it worked! :-) Den 18/03/2013 kl. 15.38 skrev Magnus Hagander : > On Mon, Mar 18, 2013 at 2:08 PM, Niels Kristian Schj=F8dt > wrote: >> Okay, thanks. It' seems you were right! Now I have fixed the issue (it w= as an ssh key). >> So I started a: >> SELECT pg_start_backup('backup', true); >>=20 >> And when done, I executed a: >> sudo -u postgres rsync -av --exclude postmaster.pid --exclude pg_xlog /v= ar/lib/postgresql/9.2/main/ postgres@192.168.0.2:/var/lib/postgresql/9.2/ma= in/ >>=20 >> Then I tried to finish off the backup by doing a: >> SELECT pg_stop_backup(); >>=20 >> But It keeps on telling me: >> WARNING: pg_stop_backup still waiting for all required WAL segments to = be archived (480 seconds elapsed) >> HINT: Check that your archive_command is executing properly. pg_stop_b= ackup can be canceled safely, but the database backup will not be usable wi= thout all the WAL segments. >>=20 >> And I could see in the log that it's some kind of permission issue. So I= canceled it, and started the streaming replication on my slave, and it see= ms to work fine. However the pg_xlog dir on the master is still HUGE 153G -= so how can I get this mess sorted, and cleaned up that directory? >=20 > Once you have your archive_command working, it will transfer all your > xlog to the archive. Once it is, the xlog directory should > automatically clean up fairly quickly. >=20 > If you still have a permissions problem with the archive, you > obviously need to fix that first. >=20 > If you don't care about your archive you could set your > archive_command to e.g. /bin/true, and that will make it pretend it > has archived the files, and should clean it up quicker. But that will > mean you have no valid archive and thus no valid backups, until you > start over froma new base. >=20 >=20 > --=20 > Magnus Hagander > Me: http://www.hagander.net/ > Work: http://www.redpill-linpro.com/ --=20 Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance