Skip site navigation (1) Skip section navigation (2)

Re: Waiting for archive to complete

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Waiting for archive to complete
Date: 2007-06-25 22:14:08
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
"Simon Riggs" <simon(at)2ndquadrant(dot)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

> 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.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2007-06-25 22:24:21
Subject: Re: libpq protocol version 2
Previous:From: Chuck McDevittDate: 2007-06-25 21:35:01
Subject: libpq protocol version 2

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group