Re: Waiting for archive to complete - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Waiting for archive to complete
Date
Msg-id 1182836221.3625.63.camel@silverbirch.site
Whole thread Raw
In response to Re: Waiting for archive to complete  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, 2007-06-25 at 18:14 -0400, Tom Lane wrote:
> "Simon Riggs" <simon@2ndquadrant.com> writes:
> > A simple solution is to introduce a new function:
> 
> > pg_archive_wait(integer maxwait);
> > maxwait = 0 means wait forever, otherwise time measured in seconds.
> 
> maxwait is redundant; people who want a timeout should use
> statement_timeout.

> > This will get the current xlog position and wait for all files prior to
> > that point to be shown as archive done.
> 
> Including the current one?  If so, it'll wait longer than necessary;
> if not, ISTM it's a gotcha waiting to trap the unwary.
> 
> Perhaps better is a variant of pg_stop_backup that includes a wait for
> the pushed-out xlog segment to be archived.

OK, will do.


For a timeout, I think you are suggesting this:

SET statement_timeout = X;
pg_stop_backup_wait();

So no need to include a function parameter for the wait time?
If thats what you are thinking, OK to that also.

--  Simon Riggs              EnterpriseDB   http://www.enterprisedb.com




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Winner of naming discussions: Synchronous Commit
Next
From: ITAGAKI Takahiro
Date:
Subject: HOT: Incomplete issues