From: | "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: [HACKERS] CIC and deadlocks |
Date: | 2007-04-11 08:13:43 |
Message-ID: | 2e78013d0704110113q123be526l70781e2b4763f1d3@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
On 4/11/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> [ itch... ] The problem is with time-extended execution of
> GetSnapshotData; what happens if the other guy lost the CPU for a good
> long time while in the middle of GetSnapshotData? He might set his
> xmin based on info you saw as long gone.
>
> You might be correct that it's safe, but the argument would have to
> hinge on the OldestXmin process being unable to commit because of
> someone holding shared ProcArrayLock; a point you are definitely not
> making above. (Study the comments in GetSnapshotData for awhile,
> also those in xact.c's commit-related code.)
>
>
My argument was based on what you said above, but I obviously did not
state it well :)
Anyways, I think its better to be safe and we agree that its not such a
bad thing to take exclusive lock on procarray because CIC is not something
that happens very often. Attached is a revised patch which takes exclusive
lock on the procarray, rest remaining the same.
Thanks,
Pavan
--
EnterpriseDB http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
CIC_deadlock_v2.patch | application/octet-stream | 12.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | NikhilS | 2007-04-11 09:04:46 | Re: UPDATE using sub selects |
Previous Message | Jacky Leng | 2007-04-11 07:35:02 | Why need XLogReadBuffer have the paramter "init"? |
From | Date | Subject | |
---|---|---|---|
Next Message | NikhilS | 2007-04-11 08:26:22 | UPDATE using sub selects |
Previous Message | Heikki Linnakangas | 2007-04-11 07:19:24 | Re: [HACKERS] Fix mdsync never-ending loop problem |