From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net> |
Cc: | wader2 <wader2(at)jcom(dot)home(dot)ne(dot)jp>, pgsql-bugs(at)postgresql(dot)org, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: BUG #4961: pg_standby.exe crashes with no args |
Date: | 2009-08-19 06:38:35 |
Message-ID: | 3f0b79eb0908182338r2dedc76g394ecf6a8eb2ba5b@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
Hi,
On Thu, Aug 13, 2009 at 2:24 AM, Magnus Hagander<magnus(at)hagander(dot)net> wrote:
> Not sure. Potentially pure luck. SIGINT has never *worked*, though, it
> just hasn't crashed.
OK.
> We could implement the same type of check in pg_standby, but it
> requires something like CHECK_FOR_INTERRUPTS. And these interrupts
> won't, by default, cause any kind of interruption of the process. In
> the backend, we interrupt socket calls because we have the socket
> wrapper layer, and nothing else. I don't know how doable this would be
> in pg_standby - does it always block on a single thing where we could
> stick some win32 synchronization code? If it's a single, or limited,
> places we could implement something similar to the backend. But if we
> need to interrupt at arbitrary locations, that's just not possible.
I think that CHECK_FOR_INTERRUPTS should be placed just before
checking the flag 'signaled' which may be enabled by the signal handler.
Here is the pseudo-code.
--------------------
{
/* Check for trigger file or signal first */
CheckForExternalTrigger();
+ #ifdef WIN32
+ CHECK_FOR_INTERRUPTS();
+ #endif /* WIN32 */
if (signaled)
{
Failover = FastFailover;
--------------------
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2009-08-19 09:30:26 | Re: BUG #4961: pg_standby.exe crashes with no args |
Previous Message | Morus Walter | 2009-08-19 06:25:02 | Re: BUG #4993: memory issue with array_agg |
From | Date | Subject | |
---|---|---|---|
Next Message | Albe Laurenz | 2009-08-19 07:11:11 | Re: PQgetlength vs. octet_length() |
Previous Message | Pavel Stehule | 2009-08-19 03:52:37 | release notes - issue |