Re: pqsignal - to be or (in this case) not to be

Lists: Postg사설 토토SQL : Postg사설
From: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
To: "Magnus Hagander" <mha(at)sollentuna(dot)net>
Cc: "pgsql-hackers-win32" <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: pqsignal - to be or (in this case) not to be
Date: 2004-02-04 22:24:16
Message-ID: 303E00EBDD07B943924382E153890E5434AA7A@cuthbert.rcsinc.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: Postg사설 토토SQL : Postg사설

Magnus Hagander wrote:
> I guess I've spent too much time listening to people, including
myself,
> assuming how things work without actually testing it.
>
> It turns out that both select() and recv() (and thus, probably send()
as
> well) put the thread in alertable state. This means that while we are
in
> a blocking select() or recv(), *our signals will be delivered using an
> APC*.

Ha! That makes things easy then, doesn't it!

As for the polling, adding a poll to one or two strategic plaes (like
the I/O subsystem) should cover 99% of the reasonable cases...

Merlin


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
Cc: "Magnus Hagander" <mha(at)sollentuna(dot)net>, "pgsql-hackers-win32" <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: pqsignal - to be or (in this case) not to be
Date: 2004-02-04 23:31:07
Message-ID: 22802.1075937467@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers-win32

"Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com> writes:
> As for the polling, adding a poll to one or two strategic plaes (like
> the I/O subsystem) should cover 99% of the reasonable cases...

Put it into the macro that checks for query cancel.

regards, tom lane