Re: [HACKERS] Problem Observed in behavior of Create Index Concurrently and Hot Update

2012-11-27 Thread Tom Lane
BTW, I was thinking that the DROP INDEX CONCURRENTLY logic needed to be: 1. Unset indisvalid, commit, wait out all reading transactions. 2. Unset indisready, commit, wait out all writing transactions. 3. Unset indislive, commit (with parent table relcache flush), wait out all reading-or-writing

Re: [HACKERS] Problem Observed in behavior of Create Index Concurrently and Hot Update

2012-11-27 Thread Tom Lane
Andres Freund writes: > So the idea would be to skip about-to-be-dropped indexes in > RelationGetIndexList directly - we don't ever need to watch those, not > even for HOT - because we only have the necessary knowledge there. The > normal valid/ready checks will be done at the callsites of > Relat

Re: [HACKERS] Problem Observed in behavior of Create Index Concurrently and Hot Update

2012-11-15 Thread Pavan Deolasee
On Wed, Oct 31, 2012 at 2:40 PM, Simon Riggs wrote: > > > diff --git a/src/backend/utils/cache/relcache.c > > b/src/backend/utils/cache/relcache.c > > index a59950e..9cadb3f 100644 > > --- a/src/backend/utils/cache/relcache.c > > +++ b/src/backend/utils/cache/relcache.c > > @@ -3355,6 +3355,12 @@

Re: [HACKERS] Problem Observed in behavior of Create Index Concurrently and Hot Update

2012-11-02 Thread Pavan Deolasee
On Wed, Oct 31, 2012 at 2:40 PM, Simon Riggs wrote: > > > > > diff --git a/src/backend/utils/cache/relcache.c > > b/src/backend/utils/cache/relcache.c > > index a59950e..9cadb3f 100644 > > --- a/src/backend/utils/cache/relcache.c > > +++ b/src/backend/utils/cache/relcache.c > > @@ -3355,6 +3355,1

Re: [HACKERS] Problem Observed in behavior of Create Index Concurrently and Hot Update

2012-10-31 Thread Simon Riggs
On 31 October 2012 08:59, Pavan Deolasee wrote: > > > On Wed, Oct 31, 2012 at 11:41 AM, Amit Kapila > wrote: >> >> >> >> According to me, the problem happens at Step-4. As at Step-4, it does the >> HOT update due to which validate_index() is not able to put an entry for >> C2=5 >> > > Thanks for

Re: [HACKERS] Problem Observed in behavior of Create Index Concurrently and Hot Update

2012-10-31 Thread Pavan Deolasee
On Wed, Oct 31, 2012 at 11:41 AM, Amit Kapila wrote: > > > According to me, the problem happens at Step-4. As at Step-4, it does the > HOT update due to which validate_index() is not able to put an entry for > C2=5 > > Thanks for the report. I can reproduce this issue. As you rightly pointed out,

[HACKERS] Problem Observed in behavior of Create Index Concurrently and Hot Update

2012-10-30 Thread Amit Kapila
There seems to be a problem in behavior of Create Index Concurrently and Hot Update in HEAD code . Please see the below testcase Step-1 --- Client-1 Create table t1(c1 int, c2 int, c3 int); insert into t1 values(1,2,3); Step-2 --- Client - 2 update t1 set c2=4; where c1