Re: pg_terminate_backend idea

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Magnus Hagander <mha(at)sollentuna(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_terminate_backend idea
Date: 2005-06-22 14:01:04
Message-ID: 27175.1119448864@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andreas Pflug <pgadmin(at)pse-consulting(dot)de> writes:
>> I thought we agreed that using the cancel functionality, which we know
>> works and is tested,

> I've seen cancel *not* working. In 80 % this was the reason to use
> terminate.

Even a moment's perusal of the code will prove that there is no
situation in which a backend will respond to SIGTERM but not SIGINT
--- there is only one InterruptPending flag and both cases are checked
in ProcessInterrupts(). So I don't believe the above argument for
using terminate in the slightest.

I can easily believe that we have missed some places that need a
CHECK_FOR_INTERRUPTS() call added, to ensure the backend can't go too
long without making these checks. I added one in the planner main
loop just a couple weeks ago, for instance. If you can identify what
a backend that's ignoring a cancel request is doing, please let us know.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jonah H. Harris 2005-06-22 15:28:26 Re: User Quota Implementation
Previous Message Tom Lane 2005-06-22 13:54:08 Re: pg_terminate_backend idea