Re: pg_terminate_backend idea

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Magnus Hagander <mha(at)sollentuna(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_terminate_backend idea
Date: 2005-06-22 01:15:02
Message-ID: 42B8BB96.5010600@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> "Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
>
>>But it still requires me to send some data (such as a dummy query) to
>>the backend before it exits. This is because server side libpq blocks
>>when reading and ignores signals at this time. I believe the fix for
>>this would be to pass a flag down to the libpq routines that we want to
>>be abort in case of signal+flag, set only when doing the "main call" to
>>recv, so we can kill idle process.
>
>
> Yech! That code is messy enough already, lets not pile another kluge
> atop it in order to handle something that's not even being requested
> AFAIR.

I ran into the same problem back when I was trying to implement an
idle-in-transaction timeout, so solving this might be useful in more
than one place..

-O

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2005-06-22 01:45:56 Re: Removing Kerberos 4
Previous Message Dave Cramer 2005-06-22 00:35:58 Re: PROPOSAL FE/BE extension to handle IN/OUT parameters