Lists: | pgsql-general |
---|
From: | "William Temperley" <willtemperley(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | <IDLE> in transaction - safest way to kill |
Date: | 2008-12-05 14:08:45 |
Message-ID: | 439dc11e0812050608o538aed3bwc40e2f5bb1009ff8@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
Hi all
Could anyone tell me what's the best thing to with idle transactions
that are holding locks?
I just killed the process as I wanted to get on with some work. I'm
just not sure this is a good idea when we go into production.
Cheers
Will T
From: | Glyn Astill <glynastill(at)yahoo(dot)co(dot)uk> |
---|---|
To: | pgsql-general(at)postgresql(dot)org, William Temperley <willtemperley(at)gmail(dot)com> |
Subject: | Re: <IDLE> in transaction - safest way to kill |
Date: | 2008-12-05 14:25:02 |
Message-ID: | 94263.23327.qm@web23606.mail.ird.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
select pg_cancel_backend(<pid>);
--- On Fri, 5/12/08, William Temperley <willtemperley(at)gmail(dot)com> wrote:
> From: William Temperley <willtemperley(at)gmail(dot)com>
> Subject: [GENERAL] <IDLE> in transaction - safest way to kill
> To: pgsql-general(at)postgresql(dot)org
> Date: Friday, 5 December, 2008, 2:08 PM
> Hi all
>
> Could anyone tell me what's the best thing to with idle
> transactions
> that are holding locks?
>
> I just killed the process as I wanted to get on with some
> work. I'm
> just not sure this is a good idea when we go into
> production.
>
> Cheers
>
> Will T
>
> --
> Sent via pgsql-general mailing list
> (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
From: | "William Temperley" <willtemperley(at)gmail(dot)com> |
---|---|
To: | glynastill(at)yahoo(dot)co(dot)uk |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: <IDLE> in transaction - safest way to kill |
Date: | 2008-12-05 15:44:54 |
Message-ID: | 439dc11e0812050744p14562eb8v9cdce9f9e7963ed1@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
>>
>> Could anyone tell me what's the best thing to with idle
>> transactions
>> that are holding locks?
On Fri, Dec 5, 2008 at 2:25 PM, Glyn Astill <glynastill(at)yahoo(dot)co(dot)uk> wrote:
>
> select pg_cancel_backend(<pid>);
>
Thanks. Sorry for the basic question.
Will
From: | "Fujii Masao" <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | glynastill(at)yahoo(dot)co(dot)uk |
Cc: | pgsql-general(at)postgresql(dot)org, "William Temperley" <willtemperley(at)gmail(dot)com> |
Subject: | Re: <IDLE> in transaction - safest way to kill |
Date: | 2008-12-06 04:03:21 |
Message-ID: | 3f0b79eb0812052003v2a9436a1qfef600333a508b0a@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
On Fri, Dec 5, 2008 at 11:25 PM, Glyn Astill <glynastill(at)yahoo(dot)co(dot)uk> wrote:
>
> select pg_cancel_backend(<pid>);
No, pg_cancel_backend() cancels only *query*, and doesn't kill idle
in transaction. I think that killing the backend (idle in transaction) with
SIGTERM is better way.
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center