• Alvaro Herrera's avatar
    Fix relpersistence setting in reindex_index · 0f9692b4
    Alvaro Herrera authored
    Buildfarm members with CLOBBER_CACHE_ALWAYS advised us that commit
    85b506bb was mistaken in setting the relpersistence value of the
    index directly in the relcache entry, within reindex_index.  The reason
    for the failure is that an invalidation message that comes after mucking
    with the relcache entry directly, but before writing it to the catalogs,
    would cause the entry to become rebuilt in place from catalogs with the
    old contents, losing the update.
    
    Fix by passing the correct persistence value to
    RelationSetNewRelfilenode instead; this routine also writes the updated
    tuple to pg_class, avoiding the problem.  Suggested by Tom Lane.
    0f9692b4
tablecmds.c 347 KB