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 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 (pgsql-hackers@postgresql.

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 wrote: > Thanks for the review! > > On Thu, Feb 10, 2011 at 11:25 PM, Magnus Hagander 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 remai

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 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 you. I re-added

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 wrote: > On Tue, Feb 8, 2011 at 05:24, Robert Haas wrote: >> On Wed, Jan 19, 2011 at 1:01 AM, Fujii Masao wrote: >>> On Thu, Jan 13, 2011 at 9:08 PM, Fujii Masao 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-02-10 Thread Magnus Hagander
On Tue, Feb 8, 2011 at 05:24, Robert Haas wrote: > On Wed, Jan 19, 2011 at 1:01 AM, Fujii Masao wrote: >> On Thu, Jan 13, 2011 at 9:08 PM, Fujii Masao 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.

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 wrote: > On Thu, Jan 13, 2011 at 9:08 PM, Fujii Masao 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 Ready for Committer. (Someone else please

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 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, >>> whi

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 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, >> which wou

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 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 process doesn't check the

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 wrote: > On Sat, Jan 29, 2011 at 1:11 AM, Tatsuo Ishii 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 bee

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, prob

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 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 function should send t

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 op

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

2011-01-28 Thread Tom Lane
Robert Haas writes: > On Fri, Jan 28, 2011 at 3:40 AM, Tatsuo Ishii wrote: Agreed. I submitted the patch before, but I forgot to update it and add it to CF. http://archives.postgresql.org/message-id/aanlktimuhbxbum+zlkaex3adqseimue3xb4ww1qts...@mail.gmail.com >> >> Great! > I hat

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 wrote: >> On Fri, Jan 28, 2011 at 4:57 PM, Magnus Hagander wrote: >>> On Fri, Jan 28, 2011 at 08:44, Tatsuo Ishii wrote: >> I did s/failover/promote. Here is the updated patch. > > I rebased the patch to current git master. I'm

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 wrote: >> On Fri, Jan 28, 2011 at 08:44, Tatsuo Ishii 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

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 wrote: > On Fri, Jan 28, 2011 at 08:44, Tatsuo Ishii 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 >>

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 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 th

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 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 the promot

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-18 Thread Fujii Masao
On Thu, Jan 13, 2011 at 9:08 PM, Fujii Masao 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 pg_ctl_promote_v3.patch Description: Binary

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 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 to anyone who needs > it. I d

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 wrote: > On 13.01.2011 04:29, Itagaki Takahiro wrote: >> >> On Thu, Jan 13, 2011 at 00:14, Fujii Masao  wrote: pg_ctl failover ? At the moment, the location of the trigger file is configurable, but if we accept a constant location

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 Masao 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 sen

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 wrote: > On Thu, Jan 13, 2011 at 00:14, Fujii Masao 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-12 Thread Itagaki Takahiro
On Thu, Jan 13, 2011 at 00:14, Fujii Masao 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 >> Window already k