Re: [HACKERS] Patch pg_is_in_backup()

2012-06-14 Thread Marco Nenciarini
Hi Gilles, unfortunately Gabriele has been very busy recently and he asked me to check again the status of this patch for this commit fest. In order to speed up the application of the patch, I am sending an updated version which correctly compiles with current head. Gabriele will then proceed

Re: [HACKERS] Patch pg_is_in_backup()

2012-06-14 Thread Gabriele Bartolini
Hello Gilles, thank you very much for your patience (and thank you Marco for supporting me). I apologise for the delay. I have retested the updated patch and it works fine with me. It is ready for committer for me. Cheers, Gabriele Il 14/06/12 11:36, Marco Nenciarini ha scritto:

Re: [HACKERS] Patch pg_is_in_backup()

2012-06-14 Thread Robert Haas
On Thu, Jun 14, 2012 at 6:06 AM, Gabriele Bartolini gabriele.bartol...@2ndquadrant.it wrote:    thank you very much for your patience (and thank you Marco for supporting me). I apologise for the delay.    I have retested the updated patch and it works fine with me. It is ready for committer

Re: [HACKERS] Patch pg_is_in_backup()

2012-06-14 Thread Gurjeet Singh
On Thu, Jun 14, 2012 at 1:29 PM, Robert Haas robertmh...@gmail.com wrote: On Thu, Jun 14, 2012 at 6:06 AM, Gabriele Bartolini gabriele.bartol...@2ndquadrant.it wrote: thank you very much for your patience (and thank you Marco for supporting me). I apologise for the delay. I have

Re: [HACKERS] Patch pg_is_in_backup()

2012-06-14 Thread Robert Haas
On Thu, Jun 14, 2012 at 1:48 PM, Gurjeet Singh singh.gurj...@gmail.com wrote: On Thu, Jun 14, 2012 at 1:29 PM, Robert Haas robertmh...@gmail.com wrote: On Thu, Jun 14, 2012 at 6:06 AM, Gabriele Bartolini gabriele.bartol...@2ndquadrant.it wrote:    thank you very much for your patience (and

Re: [HACKERS] Patch pg_is_in_backup()

2012-06-14 Thread Fujii Masao
On Fri, Jun 15, 2012 at 2:29 AM, Robert Haas robertmh...@gmail.com wrote: On Thu, Jun 14, 2012 at 6:06 AM, Gabriele Bartolini gabriele.bartol...@2ndquadrant.it wrote:    thank you very much for your patience (and thank you Marco for supporting me). I apologise for the delay.    I have

Re: [HACKERS] Patch pg_is_in_backup()

2012-06-14 Thread Robert Haas
On Thu, Jun 14, 2012 at 2:05 PM, Fujii Masao masao.fu...@gmail.com wrote: On Fri, Jun 15, 2012 at 2:29 AM, Robert Haas robertmh...@gmail.com wrote: On Thu, Jun 14, 2012 at 6:06 AM, Gabriele Bartolini gabriele.bartol...@2ndquadrant.it wrote:    thank you very much for your patience (and thank

Re: [HACKERS] Patch pg_is_in_backup()

2012-06-14 Thread Gurjeet Singh
On Thu, Jun 14, 2012 at 2:02 PM, Robert Haas robertmh...@gmail.com wrote: On Thu, Jun 14, 2012 at 1:48 PM, Gurjeet Singh singh.gurj...@gmail.com wrote: On Thu, Jun 14, 2012 at 1:29 PM, Robert Haas robertmh...@gmail.com wrote: Committed. A minor gripe: + /* + * Close the

Re: [HACKERS] Patch pg_is_in_backup()

2012-06-14 Thread Robert Haas
On Thu, Jun 14, 2012 at 3:10 PM, Gurjeet Singh singh.gurj...@gmail.com wrote: Well, according to the comments for AllocateFile:  * fd.c will automatically close all files opened with AllocateFile at  * transaction commit or abort; this prevents FD leakage if a routine  * that calls

Re: [HACKERS] Patch pg_is_in_backup()

2012-06-14 Thread Gurjeet Singh
On Thu, Jun 14, 2012 at 3:20 PM, Robert Haas robertmh...@gmail.com wrote: Also, you had the same primary content for both comments, and you incorrectly reversed the sense of the FreeFile() test. I am known for my fat fingers :) Committed with those changes. Thanks! -- Gurjeet Singh

Re: [HACKERS] Patch pg_is_in_backup()

2012-05-14 Thread Gilles Darold
Sorry for the the double post but it seems that my previous reply doesn't reach the pgsql-hacker list. So here is the new patches that limit lines to 80 characters. Regards, Le 02/05/2012 19:53, Gabriele Bartolini a écrit : Hi Gilles, Sorry for the delay. Il 03/04/12 14:21, Gilles Darold

Re: [HACKERS] Patch pg_is_in_backup()

2012-05-02 Thread Gabriele Bartolini
Hi Gilles, Sorry for the delay. Il 03/04/12 14:21, Gilles Darold ha scritto: +1, this is also my point of view. I have looked at the patch that contains both pg_is_in_backup() and pg_backup_start_time(). From a functional point of view it looks fine to me. I was thinking of

Re: [HACKERS] Patch pg_is_in_backup()

2012-04-03 Thread Gilles Darold
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,

Re: [HACKERS] Patch pg_is_in_backup()

2012-03-31 Thread Gabriele Bartolini
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

Re: [HACKERS] Patch pg_is_in_backup()

2012-03-02 Thread Gilles Darold
Le 03/02/2012 10:52, Magnus Hagander a écrit : On Fri, Feb 3, 2012 at 10:47, Fujii Masao masao.fu...@gmail.com wrote: On Fri, Feb 3, 2012 at 6:10 PM, Bernd Helmle maili...@oopsware.de wrote: --On 3. Februar 2012 13:21:11 +0900 Fujii Masao masao.fu...@gmail.com wrote: It seems to be more

Re: [HACKERS] Patch pg_is_in_backup()

2012-02-03 Thread Bernd Helmle
--On 3. Februar 2012 13:21:11 +0900 Fujii Masao masao.fu...@gmail.com wrote: It seems to be more user-friendly to introduce a view like pg_stat_backup rather than the function returning an array. I like this idea. A use case i saw for monitoring backup_label's in the past, was mainly to

Re: [HACKERS] Patch pg_is_in_backup()

2012-02-03 Thread Fujii Masao
On Fri, Feb 3, 2012 at 6:10 PM, Bernd Helmle maili...@oopsware.de wrote: --On 3. Februar 2012 13:21:11 +0900 Fujii Masao masao.fu...@gmail.com wrote: It seems to be more user-friendly to introduce a view like pg_stat_backup rather than the function returning an array. I like this idea. A

Re: [HACKERS] Patch pg_is_in_backup()

2012-02-03 Thread Magnus Hagander
On Fri, Feb 3, 2012 at 10:47, Fujii Masao masao.fu...@gmail.com wrote: On Fri, Feb 3, 2012 at 6:10 PM, Bernd Helmle maili...@oopsware.de wrote: --On 3. Februar 2012 13:21:11 +0900 Fujii Masao masao.fu...@gmail.com wrote: It seems to be more user-friendly to introduce a view like

Re: [HACKERS] Patch pg_is_in_backup()

2012-02-03 Thread Fujii Masao
On Fri, Feb 3, 2012 at 6:52 PM, Magnus Hagander mag...@hagander.net wrote: On Fri, Feb 3, 2012 at 10:47, Fujii Masao masao.fu...@gmail.com wrote: On Fri, Feb 3, 2012 at 6:10 PM, Bernd Helmle maili...@oopsware.de wrote: --On 3. Februar 2012 13:21:11 +0900 Fujii Masao masao.fu...@gmail.com

Re: [HACKERS] Patch pg_is_in_backup()

2012-02-02 Thread Marti Raudsepp
On Mon, Jan 30, 2012 at 20:33, Gilles Darold gilles.dar...@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

Re: [HACKERS] Patch pg_is_in_backup()

2012-02-02 Thread Pavel Stehule
2012/2/2 Marti Raudsepp ma...@juffo.org: On Mon, Jan 30, 2012 at 20:33, Gilles Darold gilles.dar...@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

Re: [HACKERS] Patch pg_is_in_backup()

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

Re: [HACKERS] Patch pg_is_in_backup()

2012-02-02 Thread Bernd Helmle
--On 2. Februar 2012 18:47:35 +0100 Gilles Darold gilles.dar...@dalibo.com wrote: 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

Re: [HACKERS] Patch pg_is_in_backup()

2012-02-02 Thread Magnus Hagander
On Thu, Feb 2, 2012 at 12:23, Marti Raudsepp ma...@juffo.org wrote: On Mon, Jan 30, 2012 at 20:33, Gilles Darold gilles.dar...@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

Re: [HACKERS] Patch pg_is_in_backup()

2012-02-02 Thread Euler Taveira de Oliveira
On 02-02-2012 20:06, Magnus Hagander wrote: 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... IMHO, pg_is_in_backup() should return true if one or more backup copies are

Re: [HACKERS] Patch pg_is_in_backup()

2012-02-02 Thread Fujii Masao
On Fri, Feb 3, 2012 at 11:31 AM, Euler Taveira de Oliveira eu...@timbira.com wrote: On 02-02-2012 20:06, Magnus Hagander wrote: 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

Re: [HACKERS] Patch pg_is_in_backup()

2012-01-31 Thread Gilles Darold
Le 30/01/2012 22:14, Euler Taveira de Oliveira a écrit : On 30-01-2012 15:33, Gilles Darold wrote: Yesterday I was facing a little issue with a backup software (NetBackup) that do not report error when a post backup script is run. The problem is that this script execute pg_stop_backup() and if

[HACKERS] Patch pg_is_in_backup()

2012-01-30 Thread Gilles Darold
Hello, Yesterday I was facing a little issue with a backup software (NetBackup) that do not report error when a post backup script is run. The problem is that this script execute pg_stop_backup() and if there's any failure PostgreSQL keeps running in on-line backup mode. So the backup is not

Re: [HACKERS] Patch pg_is_in_backup()

2012-01-30 Thread Euler Taveira de Oliveira
On 30-01-2012 15:33, Gilles Darold wrote: Yesterday I was facing a little issue with a backup software (NetBackup) that do not report error when a post backup script is run. The problem is that this script execute pg_stop_backup() and if there's any failure PostgreSQL keeps running in on-line