Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-02-15 Thread Robert Haas
On Sun, Feb 13, 2011 at 10:18 PM, Fujii Masao masao.fu...@gmail.com wrote: Thanks for the review! On Thu, Feb 10, 2011 at 11:25 PM, Magnus Hagander mag...@hagander.net wrote: I see that the docs part of the patch removes the mentioning of reporting servers - is that intentional, or a mistake?

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-02-15 Thread Fujii Masao
On Wed, Feb 16, 2011 at 11:30 AM, Robert Haas robertmh...@gmail.com wrote: Committed with minor tweaks to comments and documentation. Thanks a lot! Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center -- Sent via pgsql-hackers mailing list

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-02-13 Thread Fujii Masao
Thanks for the review! On Thu, Feb 10, 2011 at 11:25 PM, Magnus Hagander mag...@hagander.net wrote: I see that the docs part of the patch removes the mentioning of reporting servers - is that intentional, or a mistake? Seems that usecase still remains, no? It was intentional, but I agree with

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-02-10 Thread Magnus Hagander
On Tue, Feb 8, 2011 at 05:24, Robert Haas robertmh...@gmail.com wrote: On Wed, Jan 19, 2011 at 1:01 AM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Jan 13, 2011 at 9:08 PM, Fujii Masao masao.fu...@gmail.com wrote: I did s/failover/promote. Here is the updated patch. I rebased the patch

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-02-10 Thread Magnus Hagander
On Thu, Feb 10, 2011 at 15:25, Magnus Hagander mag...@hagander.net wrote: On Tue, Feb 8, 2011 at 05:24, Robert Haas robertmh...@gmail.com wrote: On Wed, Jan 19, 2011 at 1:01 AM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Jan 13, 2011 at 9:08 PM, Fujii Masao masao.fu...@gmail.com wrote: I

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-02-07 Thread Robert Haas
On Wed, Jan 19, 2011 at 1:01 AM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Jan 13, 2011 at 9:08 PM, Fujii Masao masao.fu...@gmail.com wrote: I did s/failover/promote. Here is the updated patch. I rebased the patch to current git master. This patch looks fine to me. I will mark it

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-01-30 Thread Fujii Masao
On Sat, Jan 29, 2011 at 1:11 AM, Tatsuo Ishii is...@postgresql.org wrote: Ok. I will write a C user function and add to pgpool source tree. I think it will be fairly easy to create a trigger file in the function. If the pg_ctl promote patch will have been committed, I recommend that the C

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-01-30 Thread Tatsuo Ishii
If the pg_ctl promote patch will have been committed, I recommend that the C function should send the signal to the startup process rather than creating the trigger file. Because the trigger file is checked every for 5s, which would lengthen the failover time by an average 2.5s. Ok, probably

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-01-30 Thread Itagaki Takahiro
On Mon, Jan 31, 2011 at 11:52, Fujii Masao masao.fu...@gmail.com wrote: On Sat, Jan 29, 2011 at 1:11 AM, Tatsuo Ishii is...@postgresql.org wrote: Ok. I will write a C user function and add to pgpool source tree. I think it will be fairly easy to create a trigger file in the function. If the

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-01-30 Thread Fujii Masao
On Mon, Jan 31, 2011 at 12:31 PM, Itagaki Takahiro itagaki.takah...@gmail.com wrote: The C function needs to create a trigger file in $PGDATA/promote before sending signals, no? No. At least in the current patch, just receipt of SIGUSR2 causes the startup process to end a recovery. The startup

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-01-30 Thread Fujii Masao
On Mon, Jan 31, 2011 at 12:35 PM, Tatsuo Ishii is...@postgresql.org wrote: If the pg_ctl promote patch will have been committed, I recommend that the C function should send the signal to the startup process rather than creating the trigger file. Because the trigger file is checked every for 5s,

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-01-30 Thread Tatsuo Ishii
On Mon, Jan 31, 2011 at 12:35 PM, Tatsuo Ishii is...@postgresql.org wrote: If the pg_ctl promote patch will have been committed, I recommend that the C function should send the signal to the startup process rather than creating the trigger file. Because the trigger file is checked every for

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-01-28 Thread Tatsuo Ishii
On Fri, Jan 28, 2011 at 08:44, Tatsuo Ishii is...@postgresql.org wrote: I did s/failover/promote. Here is the updated patch. I rebased the patch to current git master. I'm thinking about implementing a function which does a promotion for the standby. It will make pgpool lot easier to

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-01-28 Thread Fujii Masao
On Fri, Jan 28, 2011 at 4:57 PM, Magnus Hagander mag...@hagander.net wrote: On Fri, Jan 28, 2011 at 08:44, Tatsuo Ishii is...@postgresql.org wrote: I did s/failover/promote. Here is the updated patch. I rebased the patch to current git master. I'm thinking about implementing a function which

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-01-28 Thread Tatsuo Ishii
On Fri, Jan 28, 2011 at 4:57 PM, Magnus Hagander mag...@hagander.net wrote: On Fri, Jan 28, 2011 at 08:44, Tatsuo Ishii is...@postgresql.org wrote: I did s/failover/promote. Here is the updated patch. I rebased the patch to current git master. I'm thinking about implementing a function

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-01-28 Thread Robert Haas
On Fri, Jan 28, 2011 at 3:40 AM, Tatsuo Ishii is...@postgresql.org wrote: On Fri, Jan 28, 2011 at 4:57 PM, Magnus Hagander mag...@hagander.net wrote: On Fri, Jan 28, 2011 at 08:44, Tatsuo Ishii is...@postgresql.org wrote: I did s/failover/promote. Here is the updated patch. I rebased the

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-01-28 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Fri, Jan 28, 2011 at 3:40 AM, Tatsuo Ishii is...@postgresql.org wrote: Agreed. I submitted the patch before, but I forgot to update it and add it to CF.

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-01-28 Thread Tatsuo Ishii
I did s/failover/promote. Here is the updated patch. I rebased the patch to current git master. I'm thinking about implementing a function which does a promotion for the standby. It will make pgpool lot easier to control the promotion since it allow to fire the promotion operation (either

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-01-27 Thread Tatsuo Ishii
I did s/failover/promote. Here is the updated patch. I rebased the patch to current git master. I'm thinking about implementing a function which does a promotion for the standby. It will make pgpool lot easier to control the promotion since it allow to fire the promotion operation (either

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-01-27 Thread Magnus Hagander
On Fri, Jan 28, 2011 at 08:44, Tatsuo Ishii is...@postgresql.org wrote: I did s/failover/promote. Here is the updated patch. I rebased the patch to current git master. I'm thinking about implementing a function which does a promotion for the standby. It will make pgpool lot easier to control

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-01-18 Thread Fujii Masao
On Thu, Jan 13, 2011 at 9:08 PM, Fujii Masao masao.fu...@gmail.com wrote: I did s/failover/promote. Here is the updated patch. I rebased the patch to current git master. Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-01-13 Thread Heikki Linnakangas
On 13.01.2011 04:29, Itagaki Takahiro wrote: On Thu, Jan 13, 2011 at 00:14, Fujii Masaomasao.fu...@gmail.com wrote: pg_ctl failover ? At the moment, the location of the trigger file is configurable, but if we accept a constant location like $PGDATA/failover pg_ctl could do the whole thing,

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-01-13 Thread Robert Haas
On Thu, Jan 13, 2011 at 5:00 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 13.01.2011 04:29, Itagaki Takahiro wrote: On Thu, Jan 13, 2011 at 00:14, Fujii Masaomasao.fu...@gmail.com  wrote: pg_ctl failover ? At the moment, the location of the trigger file is

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-01-13 Thread Fujii Masao
On Thu, Jan 13, 2011 at 7:00 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: +1 for promote. People unfamiliar with the replication stuff might not immediately understand that it's related to replication, but they wouldn't have any use for the option anyway. It should be clear

pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-01-12 Thread Fujii Masao
On Wed, Sep 15, 2010 at 11:14 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 15/09/10 16:55, Tom Lane wrote: So I'm wondering if we couldn't eliminate the five-second sleep requirement here too.  It's problematic anyhow, since somebody looking for energy efficiency will

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-01-12 Thread Itagaki Takahiro
On Thu, Jan 13, 2011 at 00:14, Fujii Masao masao.fu...@gmail.com wrote: pg_ctl failover ? At the moment, the location of the trigger file is configurable, but if we accept a constant location like $PGDATA/failover pg_ctl could do the whole thing, create the file and send signal. pg_ctl on

Re: pg_ctl failover Re: [HACKERS] Latches, signals, and waiting

2011-01-12 Thread Fujii Masao
On Thu, Jan 13, 2011 at 11:29 AM, Itagaki Takahiro itagaki.takah...@gmail.com wrote: On Thu, Jan 13, 2011 at 00:14, Fujii Masao masao.fu...@gmail.com wrote: pg_ctl failover ? At the moment, the location of the trigger file is configurable, but if we accept a constant location like