Re: pg_terminate_backend() idea

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: pg_terminate_backend() idea
Дата
Msg-id 87r6d6somm.fsf@oxford.xeocode.com
обсуждение исходный текст
Ответ на pg_terminate_backend() idea  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
"Bruce Momjian" <bruce@momjian.us> writes:

> Gregory Stark wrote:
>
>> It seems to me we could replace all of the above with either SIGINT or USR1
>> and have a bunch of boolean flags in MyProc. I'm not sure of the implication
>> for sinval processing of having to get a whole bunch of LWLocks though.
>
> Keep in mind PGPROC->terminate was easier because once it was set it was
> never cleared.  If you need to clear the flag and keep going the code is
> going to need to be a little more sophisticated to avoid lost interrupts.

That's kind of the point. I don't think we care about lost interrupts for any
of these things. As long as we know a sinval flush happened I think we don't
care how many more happened. Or a cancel request or terminate request.

For sinval of course it would be important to clear the flags (with MyProc
locked) prior to processing the queue in case one arrives as soon as we're
finished. But I think that's the only detail.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about
EnterpriseDB'sPostgreSQL training!
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: DROP DATABASE vs patch to not remove files right away
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_terminate_backend() issues