Re: Patch pg_is_in_backup()

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Marti Raudsepp <marti(at)juffo(dot)org>
Cc: Gilles Darold <gilles(dot)darold(at)dalibo(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Patch pg_is_in_backup()
Date: 2012-02-02 23:06:16
Message-ID: CABUevExm4_a-Yw3pt=weppb5ckzAYZwK3e79m__sznQNjjDveg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 2, 2012 at 12:23, Marti Raudsepp <marti(at)juffo(dot)org> wrote:
> On Mon, Jan 30, 2012 at 20:33, Gilles Darold <gilles(dot)darold(at)dalibo(dot)com> wrote:
>> After some time searching for a Pg system administration function like
>> pg_is_in_recovery(), let's say pg_is_in_backup(), I couldn't find one.
>> The minor patch attached here adds this administrative function that can
>> be used with others backup control functions. This is a very little
>> patch outside documentation because the function is only a wrapper to
>> the internal BackupInProgress() function, just like pg_is_in_recovery()
>> is calling RecoveryInProgress().
>
> I think it would be more useful to have a function that returns a
> timestamp when the backup started. That way, it's possible to write a
> generic monitoring script that alerts the sysadmin only when a backup
> has been running for too long, but is silent for well-behaved backups.

If there is more than one concurrent backup running, which one do you
return? The first one or the latest one? Or perhaps you need an
interface thta can return them all...

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-02-02 23:19:36 Re: Patch: Allow SQL-language functions to reference parameters by parameter name
Previous Message Bernd Helmle 2012-02-02 23:00:41 Re: Patch pg_is_in_backup()