From: Frederiko Costa <frederiko@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Re: archived WALL files question
Date: Mon, 19 Apr 2010 10:10:14 -0700
Message-ID: <4BCC8E76.2040105@gmail.com> (raw)
In-Reply-To: <4BCC415D0200002500030A6B@gw.wicourts.gov>
References: <7965A9DCF12CC14984420BCC37B1608F25AC0B99AD@Elzar.grant.co.uk>
<4BC6F21D0200002500030956@gw.wicourts.gov>
<7965A9DCF12CC14984420BCC37B1608F25AC0B99E4@Elzar.grant.co.uk>
<4BCC7804.9070604@gmail.com>
<4BCC415D0200002500030A6B@gw.wicourts.gov>
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)
Wasn't this command supposed to create a new segment file and copy the
last non-copied segments - using command specified at archive_command -
to the destination you defined?
I wanted to understand why the newly created wal segment files (with 16
MB each) did not copied automatically to the new place. What's the
criteria? They only get copied when I carry out a base backup.
Thanks for the help!
On 04/19/2010 09:41 AM, Kevin Grittner wrote:
> Frederiko Costa<frederiko@gmail.com> wrote:
>
>
>> I noticed the new logs files don't get copied to the directory
>> specified on the archive_command. It's only copied when I do the
>> pg_start_backup()/pg_stop_backup() base backup. Is this behaviour
>> only achieved if I set archive_timeout? I did not want to do that,
>> because I thought as soon as the 16MB WAL segment file got created
>> it would be copied to the exported directory.
>>
>
> Have you actually been filling up any 16MB WAL file segments? How
> have you determined that? What happens when you run (as a database
> superuser) this command?:
>
> SELECT pg_switch_xlog();
>
> If the reason you don't want to set archive_timeout is that you
> don't want 16MB files piling up when there is little or no activity,
> you might want to consider using pglesslog or pg_clearxlogtail.
> These can eliminate nearly all the cost of the more frequent logs.
>
> -Kevin
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: frederiko@gmail.com
Subject: Re: archived WALL files question
In-Reply-To: <4BCC8E76.2040105@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox