Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id DBE88632C8C for ; Mon, 19 Apr 2010 14:50:08 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 48549-05 for ; Mon, 19 Apr 2010 17:49:55 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f216.google.com (mail-bw0-f216.google.com [209.85.218.216]) by mail.postgresql.org (Postfix) with ESMTP id CC686632C56 for ; Mon, 19 Apr 2010 14:49:57 -0300 (ADT) Received: by bwz8 with SMTP id 8so4683738bwz.3 for ; Mon, 19 Apr 2010 10:49:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=uHcK7UvDdAiXlwMXph+h0IHUGEAYU8JQnq9C5K0zMbw=; b=Ma3GjAV2/1cObBwfsY0cy3jSrQ5/yBlCxWo9TsIQ/D349CMdkfxadhaNBRokVuZB7K IUMlavOQ5/l3DE4CUsWWjOv61Qcg5fMaqF5RgE3HtNnEMLVCIwfGmmUblfKSp/j9TYGn K1sGd5K5UAmM1ef1pnx7C2OSdqC6w+I4z9yEs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=JL8snhk84YPLC2SEp4Iswm1OgMzcJldlpv6iYdvF0kuj5k55JVkly5lcCmCsF63kWM YOjSLXcQSLgyol83etRTQWBpNZQDqBoVKGqI9OlLoV94dUWDR853oR6K9BbsmAVYwIQS c354gGz6ZWeqfO2BBhzAlcqQnaluQ93yQS1hI= Received: by 10.86.22.31 with SMTP id 31mr4505140fgv.24.1271699395839; Mon, 19 Apr 2010 10:49:55 -0700 (PDT) Received: from [192.168.1.253] (adsl-71-140-54-198.dsl.pltn13.pacbell.net [71.140.54.198]) by mx.google.com with ESMTPS id 12sm2957729muq.3.2010.04.19.10.49.53 (version=SSLv3 cipher=RC4-MD5); Mon, 19 Apr 2010 10:49:54 -0700 (PDT) Message-ID: <4BCC97BF.8090501@gmail.com> Date: Mon, 19 Apr 2010 10:49:51 -0700 From: Frederiko Costa User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc11 Thunderbird/3.0.4 MIME-Version: 1.0 To: Kevin Grittner CC: pgsql-admin@postgresql.org Subject: Re: archived WALL files question References: <7965A9DCF12CC14984420BCC37B1608F25AC0B99AD@Elzar.grant.co.uk> <4BC6F21D0200002500030956@gw.wicourts.gov> <7965A9DCF12CC14984420BCC37B1608F25AC0B99E4@Elzar.grant.co.uk> <4BCC7804.9070604@gmail.com> <4BCC415D0200002500030A6B@gw.wicourts.gov> <4BCC8E76.2040105@gmail.com> <4BCC4BEB0200002500030A75@gw.wicourts.gov> In-Reply-To: <4BCC4BEB0200002500030A75@gw.wicourts.gov> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=AWL=0.000, BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201004/262 X-Sequence-Number: 34356 On 04/19/2010 10:26 AM, Kevin Grittner wrote: > Frederiko Costa wrote: > >> I have seen new 16 MB segments files created in pg_xlog directory >> as time goes on. Honestly, I did not understand why it got >> created, because I was running it on a VM and there was no >> activity. I got several new segments. >> >> If I run the command you asked, this is the output. Neither >> segment is copied, nor a new segment file gets created: >> >> select pg_switch_xlog(); >> pg_switch_xlog >> ---------------- >> 0/81000088 >> (1 row) >> > > What version of PostgreSQL is this? > 8.4.3 > > What do you see if you run?: > > show archive_command; > cp -p %p /mnt/data/%f > show archive_mode; > on > show archive_timeout; > 1min I have just enabled that. Now, log files are being copied directly to the /mnt/data dir. However, the same segments are not in the pg_xlog dir. Is this a default behaviour? Must I set archive_timeout? I don't think I want that, because, specially for the next few months, where the activity would be very limited and I would get several zero written segments just because timeout has been reached. Is this approach recommended anyway? Or is it better to use this approach even having limited approach? > Check your log file from the time you ran pg_switch_xlog to look for > any messages which might give a clue to what's happening. > > The log files did not write anything about pg_switch_xlog. > -Kevin >