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
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
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 @@
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
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
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,
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