Re: transaction timeout

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: transaction timeout
Дата
Msg-id 1122400717.15145.81.camel@state.g2switchworks.com
обсуждение исходный текст
Ответ на Re: transaction timeout  ("Magnus Hagander" <mha@sollentuna.net>)
Ответы Re: transaction timeout  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Tue, 2005-07-26 at 12:41, Magnus Hagander wrote:
> > > > That said, I have seen some folks post about writing a
> > perl or shell
> > > > script that runs every x minutes looking for connections
> > that have
> > > > been idle for > a certain amount of time and kill the backend
> > > > associated with it (sigterm, not -9...)
> > >
> > > what are the implications of killing a postmaster process?
> >
> > A Sigterm is generally considered safe.  It's -9 and its ilk
> > that you need to be wary of.
>
> No it's not. See the archives.
> The only *safe* way to do it ATM is to restart the database. SIGTERM may
> leave orphaned locks or such things in the system. (Incidentally, -9 on
> a single backend should be safe I believe. The postmaster will tell all
> concurrent connections to abort and restart. It's not nice, but it
> should be safe - should perform onrmal recovery same as if you pull the
> plug)

Really?  I was under the impression that doing a "kill <backendpid>" on
an idle connection would clean up those things.  Was that a discussion
on hackers that brought this up?  And if so, what was the time period,
I'd like to read through it.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Trigger disactivation and SELECT WAITING
Следующее
От: "Magnus Hagander"
Дата:
Сообщение: Re: transaction timeout