From: | "Gurjeet Singh" <singh(dot)gurjeet(at)gmail(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "PGSQL Hackers" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: <IDLE> and waiting |
Date: | 2008-02-02 23:13:57 |
Message-ID: | 65937bea0802021513m9f45e5bufb4a8fce0730421a@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Feb 2, 2008 2:28 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I wrote:
> > "Gurjeet Singh" <singh(dot)gurjeet(at)gmail(dot)com> writes:
> >> I saw a strange behaviour on one of the production boxes. The
> >> pg_stat_activity shows a process as <IDLE> and yet 'waiting' !!! On top
> of
> >> it (understandably, since its IDLE), there are no entries for this pid
> in
> >> pg_locks!
>
> > Hmm, I can reproduce something like this by aborting a wait for lock.
> > It seems the problem is that WaitOnLock() is ignoring its own good
> > advice, assuming that it can do cleanup work after waiting.
>
> I've committed a fix for this. (Too late for 8.3.0, unfortunately.)
>
Thanks. Like 8.2, can it not be back-patched on 8.3 too?
I just looked at the patch... Isn't PG_TRY() an expensive call to make in
the lock.c code? I was thinking of registering a Xact callback using
RegisterXactCallback() and performing 'waiting' reset in that callback if
the Xact event is XACT_EVENT_ABORT.
That would have been compliant with the previous comments ('if we fail, any
cleanup must happen in xact abort processing, not here').
Comments.
Best regards,
--
gurjeet[(dot)singh](at)EnterpriseDB(dot)com
singh(dot)gurjeet(at){ gmail | hotmail | indiatimes | yahoo }.com
EnterpriseDB http://www.enterprisedb.com
17° 29' 34.37"N, 78° 30' 59.76"E - Hyderabad
18° 32' 57.25"N, 73° 56' 25.42"E - Pune
37° 47' 19.72"N, 122° 24' 1.69" W - San Francisco *
Mail sent from my BlackLaptop device
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2008-02-02 23:27:57 | Re: <IDLE> and waiting |
Previous Message | Tom Lane | 2008-02-02 22:38:40 | Re: Truncate Triggers |