pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedlibPQ -Canceling Blocking Calls
3+ messages / 2 participants
[nested] [flat]
* libPQ -Canceling Blocking Calls
@ 2008-07-10 20:09 Keary Suska <hierophant@pcisys.net>
2008-07-10 21:05 ` Re: libPQ -Canceling Blocking Calls Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 3+ messages in thread
From: Keary Suska @ 2008-07-10 20:09 UTC (permalink / raw)
To: pgsql-interfaces
Is it possible to use PQcancel() to cancel a blocking call, such as a call
to PQexec?
TIA,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: libPQ -Canceling Blocking Calls
2008-07-10 20:09 libPQ -Canceling Blocking Calls Keary Suska <hierophant@pcisys.net>
@ 2008-07-10 21:05 ` Tom Lane <tgl@sss.pgh.pa.us>
2008-07-10 22:51 ` Re: libPQ -Canceling Blocking Calls Keary Suska <hierophant@pcisys.net>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2008-07-10 21:05 UTC (permalink / raw)
To: Keary Suska <hierophant@pcisys.net>; +Cc: pgsql-interfaces
Keary Suska <hierophant@pcisys.net> writes:
> Is it possible to use PQcancel() to cancel a blocking call, such as a call
> to PQexec?
Sure. Look at psql for an example. You probably need to call PQcancel
from a signal handler, but there's a signal-safe variant for that.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: libPQ -Canceling Blocking Calls
2008-07-10 20:09 libPQ -Canceling Blocking Calls Keary Suska <hierophant@pcisys.net>
2008-07-10 21:05 ` Re: libPQ -Canceling Blocking Calls Tom Lane <tgl@sss.pgh.pa.us>
@ 2008-07-10 22:51 ` Keary Suska <hierophant@pcisys.net>
0 siblings, 0 replies; 3+ messages in thread
From: Keary Suska @ 2008-07-10 22:51 UTC (permalink / raw)
To: pgsql-interfaces
7/10/08 3:05 PM, also sprach tgl@sss.pgh.pa.us:
> Sure. Look at psql for an example. You probably need to call PQcancel
> from a signal handler, but there's a signal-safe variant for that.
Great. Although I was planning on using a threaded approach, but since libpq
was compiled thread-safe, I assume this would be fine. I was hoping I could
cancel a synchronous call without having to collapse the thread. This is
good news.
Thanks,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2008-07-10 22:51 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-07-10 20:09 libPQ -Canceling Blocking Calls Keary Suska <hierophant@pcisys.net>
2008-07-10 21:05 ` Tom Lane <tgl@sss.pgh.pa.us>
2008-07-10 22:51 ` Keary Suska <hierophant@pcisys.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox