• Tom Lane's avatar
    index_destroy() must grab exclusive access to the parent table · 40d3e925
    Tom Lane authored
    of the index it wants to destroy.  This ensures that no other backend is
    actively scanning or updating that index.  Getting exclusive access on
    the index alone is NOT sufficient, because the executor is rather
    cavalier about getting locks on indexes --- see ExecOpenIndices().
    It might be better to grab index locks in the executor, but I'm not
    sure the extra lockmanager traffic is really worth it just to make
    index_destroy cleaner.
    40d3e925
index.c 49.1 KB