Re: [PERFORM] GIN index not used if created in the same transaction as query - Mailing list pgsql-performance

From Tom Lane
Subject Re: [PERFORM] GIN index not used if created in the same transaction as query
Date
Msg-id 437.1495210198@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PERFORM] GIN index not used if created in the same transactionas query  (Adam Brusselback <adambrusselback@gmail.com>)
List pgsql-performance
Adam Brusselback <adambrusselback@gmail.com> writes:
> Is there any easy way I can know if an index is usable or not? Are there
> any catalog views or anything I could check that in?

IIRC, you can look at pg_index.indcheckxmin --- if that's set, then
the index had broken HOT chains during creation and may not be usable
right away.  Telling whether your own transaction can use it is harder
from SQL level, but if you're in the same transaction that made the
index then the answer is probably always "no" :-(

            regards, tom lane


pgsql-performance by date:

Previous
From: Adam Brusselback
Date:
Subject: Re: [PERFORM] GIN index not used if created in the same transactionas query
Next
From: Jeff Janes
Date:
Subject: [PERFORM] pg_stat_statements with fetch