Re: Patch pg_is_in_backup()

From: Gilles Darold <gilles(dot)darold(at)dalibo(dot)com>
To: Gabriele Bartolini <gabriele(dot)bartolini(at)2ndQuadrant(dot)it>
Cc: pgsql-hackers(at)postgresql(dot)org, Magnus Hagander <magnus(at)hagander(dot)net>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Bernd Helmle <mailings(at)oopsware(dot)de>, Euler Taveira de Oliveira <euler(at)timbira(dot)com>, Marti Raudsepp <marti(at)juffo(dot)org>
Subject: Re: Patch pg_is_in_backup()
Date: 2012-04-03 12:21:55
Message-ID: 4F7AEB63.1000704@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Gabriele,

Le 31/03/2012 14:25, Gabriele Bartolini a écrit :
> Hi Gilles,
>
> first and foremost, sorry for jumping in this thread so late. I
> read all previous discussions and I'd be happy to help you with this
> patch.
>
>> Agreed and sorry for the response delay. I've attached 2 patches
>> here, the first one is the same as before with just the renaming of
>> the function into pg_is_in_exclusive_backup().
>
> My quick response: I really like the idea of having a function that
> simply returns a boolean value. To be honest, I would have called it
> pg_is_in_backup() as you originally did - after all, I do not execute
> pg_start_exclusive_backup() or pg_stop_exclusive_backup(). It is more
> intuitive and pairs with pg_is_in_recovery(). I have never found any
> mention whatsoever in the documentation that talks about exclusive
> backup, and I am afraid it would generate confusion.

+1, this is also my point of view.

> However, I leave this up to the rest of the community's judgement
> (here is my opinion).
>
> I agree also that a function that returns the timestamp of the
> start of the backup might be useful. My opinion with the 'exclusive'
> keyword applies here too (I would simply name it pg_backup_start_time()).

Ok, I've reverted the name to pg_is_in_backup() and
pg_backup_start_time(), if at the end the functions names have to be
changed a simple replacement in the patch will be easy to do.

> Finally, I tried to apply the patch but it looks like we need a new
> version that can apply with current HEAD. If you can do that, I am
> happy to assist with the review.

I've attach 3 patches, the first one include both functions, the others
are patches per function. They are all from the current HEAD branch, if
they don't work please help me with the correct git/diff command to perform.

Thank you, regards,

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

Attachment Content-Type Size
postgresql-pg_backup_start_time-pg_is_in_backup-patch-v3.diff text/x-patch 5.4 KB
postgresql-pg_backup_start_time-patch-v3.diff text/x-patch 4.6 KB
postgresql-pg_is_in_backup-patch-v3.diff text/x-patch 3.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-04-03 12:22:31 Re: Switching to Homebrew as recommended Mac install?
Previous Message Robert Haas 2012-04-03 12:04:44 Re: Command Triggers patch v18