pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gilles Darold <gilles.darold@dalibo.com>
To: pgsql-hackers@postgresql.org
Subject: Re: Patch pg_is_in_backup()
Date: Thu, 02 Feb 2012 18:47:35 +0100
Message-ID: <4F2ACC37.9030902@dalibo.com> (raw)
In-Reply-To: <CABRT9RAo_xTOVdBAEDqzcP+QvoHa0SZW1Ud1p3vjmA5tJUnYLw@mail.gmail.com>
References: <4F26E291.9020605@dalibo.com>
	<CABRT9RAo_xTOVdBAEDqzcP+QvoHa0SZW1Ud1p3vjmA5tJUnYLw@mail.gmail.com>

Le 02/02/2012 12:23, Marti Raudsepp a écrit :
> On Mon, Jan 30, 2012 at 20:33, Gilles Darold <gilles.darold@dalibo.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.

For now the internal function BackupInProgress() only return a boolean.
I like the idea that pg_is_in_backup() just works as pg_is_in_recovery()
do. I mean it doesn't return the timestamp of the recovery starting time
but only true or false.

Maybe we can have an other function that will return all information
available in the backup_label file ?

Regards,

-- 
Gilles Darold
http://dalibo.com - http://dalibo.org




view thread (29+ messages)  latest in thread

Message-ID: <4F2ACC37.9030902@dalibo.com>
Permalink:  ../4F2ACC37.9030902@dalibo.com/
Also on:    postgresql.org/message-id/4F2ACC37.9030902@dalibo.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: gilles.darold@dalibo.com
  Subject: Re: Patch pg_is_in_backup()
  In-Reply-To: <4F2ACC37.9030902@dalibo.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