Re: transaction timeout

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Scott Marlowe" <smarlowe(at)g2switchworks(dot)com>, "Dr NoName" <spamacct11(at)yahoo(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: transaction timeout
Date: 2005-07-26 17:41:13
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE094619@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> > > 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)

//Magnus

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dr NoName 2005-07-26 17:51:16 Re: transaction timeout
Previous Message Andrew Stewart 2005-07-26 17:39:12 error when using SELECT