Re: [PATCHES] [HACKERS] CIC and deadlocks

2008-03-17 Thread Tom Lane
Pavan Deolasee [EMAIL PROTECTED] writes: [ patch to reduce probability of deadlock of CREATE INDEX CONCURRENTLY with other things ] This patch no longer applies because of the VirtualXid changes. Looking at it again, I'm fairly dissatisfied with it anyway; I really don't like moving the

Re: [PATCHES] [HACKERS] CIC and deadlocks

2007-04-26 Thread Bruce Momjian
This has been saved for the 8.4 release: http://momjian.postgresql.org/cgi-bin/pgpatches_hold --- Pavan Deolasee wrote: On 4/11/07, Tom Lane [EMAIL PROTECTED] wrote: [ itch... ] The problem is with

Re: [PATCHES] [HACKERS] CIC and deadlocks

2007-04-11 Thread Pavan Deolasee
On 4/1/07, Tom Lane [EMAIL PROTECTED] wrote: Good point. I'm envisioning a procarray.c function along the lines of bool TransactionHasSnapshot(xid) which returns true if the xid is currently listed in PGPROC and has a nonzero xmin. CIC's cleanup wait loop would check this and ignore

Re: [PATCHES] [HACKERS] CIC and deadlocks

2007-04-11 Thread Tom Lane
Pavan Deolasee [EMAIL PROTECTED] writes: When I looked at the code, it occurred to me that possibly we are OK with just taking shared lock on the procarray. That means that some other transaction can concurrently set its serializable snapshot while we are scanning the procarray. But that

Re: [PATCHES] [HACKERS] CIC and deadlocks

2007-04-11 Thread Pavan Deolasee
On 4/11/07, Tom Lane [EMAIL PROTECTED] 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