Hi Tom
I would like to ask you about the details of index build.
I found that in the index_update_stats function, i.e. the CREATE
INDEX/REINDEX/Truncate INDEX process,
relchche is invalidated whether the index information is updated. I want to
know why you're did this
The code is:
if (dirty)
{
heap_inplace_update(pg_class, tuple);
/* the above sends a cache inval message */ }
else
{
/* no need to change tuple, but force relcache inval
anyway */
CacheInvalidateRelcacheByTuple(tuple);
}
There's a special line of comment here, and I think you wrote that part for
some reason.
The reason I ask this question is that
1 similar places like the vac_update_relstats /vac_update_datfrozenxid function
don't do this.
2 Local Temp table with ON COMMIT DELETE ROWS builds index for each transaction
commit.
This causes relcache of the temp table to be rebuilt over and over again.
Looking forward to your reply.
Thanks
Wenjing