pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Chris Hoover <revoohc@gmail.com>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Why so long between archive calls?
Date: Thu, 07 Sep 2006 19:11:19 -0400
Message-ID: <581.1157670679@sss.pgh.pa.us> (raw)
In-Reply-To: <1d219a6f0609071302yabbebd0rcc018cbff3d2858e@mail.gmail.com>
References: <1d219a6f0608290835u6647a8e1g437dfd4cedb81658@mail.gmail.com>
	<24247.1157059093@sss.pgh.pa.us>
	<1d219a6f0609011230t2407cba5u53a5e536ad4fbc20@mail.gmail.com>
	<25848.1157153334@sss.pgh.pa.us>
	<20060902014010.GA14288@alvh.no-ip.org>
	<26777.1157161705@sss.pgh.pa.us>
	<1d219a6f0609051333t70e1207eife3d0ad7a55a2e07@mail.gmail.com>
	<23808.1157572848@sss.pgh.pa.us>
	<1d219a6f0609061313q5f94ab54l9e84211e8b43c8fd@mail.gmail.com>
	<24338.1157576070@sss.pgh.pa.us>
	<1d219a6f0609071302yabbebd0rcc018cbff3d2858e@mail.gmail.com>

"Chris Hoover" <revoohc@gmail.com> writes:
> I am able to tell how far behind the archiving is running since every
> minute, I copy the current archive_logs to a backup directory.  This is
> allowing me to be able to do an up to the minute pitr if required.  The
> archive_command removes the file from this backup dir when the file is
> archived by PostgreSQL.

> Here my script for that:

It looks to me like your script does not understand the difference
between xlog files that have been used and xlog files that haven't been
used yet.  Since you've got checkpoint_segments = 256, the xlog code
will allow as many as 513 (2*checkpoint_segments+1) not-yet-used xlog
files to be allocated.

The only simple way to tell where the end of WAL is at the moment is to
look for the xlog file with the latest mod time.  (There'll be more
support for this in 8.2.)  Any files with names numerically larger than
that one are just sitting there waiting to be used, they are not
interesting for archiving purposes.

			regards, tom lane



view thread (16+ messages)

Message-ID: <581.1157670679@sss.pgh.pa.us>
Permalink:  ../581.1157670679@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/581.1157670679@sss.pgh.pa.us

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, revoohc@gmail.com, alvherre@commandprompt.com
  Subject: Re: Why so long between archive calls?
  In-Reply-To: <581.1157670679@sss.pgh.pa.us>
  References: <1d219a6f0608290835u6647a8e1g437dfd4cedb81658@mail.gmail.com> <24247.1157059093@sss.pgh.pa.us> <1d219a6f0609011230t2407cba5u53a5e536ad4fbc20@mail.gmail.com> <25848.1157153334@sss.pgh.pa.us> <20060902014010.GA14288@alvh.no-ip.org> <26777.1157161705@sss.pgh.pa.us> <1d219a6f0609051333t70e1207eife3d0ad7a55a2e07@mail.gmail.com> <23808.1157572848@sss.pgh.pa.us> <1d219a6f0609061313q5f94ab54l9e84211e8b43c8fd@mail.gmail.com> <24338.1157576070@sss.pgh.pa.us> <1d219a6f0609071302yabbebd0rcc018cbff3d2858e@mail.gmail.com> <581.1157670679@sss.pgh.pa.us>

* 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