• Michael Paquier's avatar
    Refactor cluster.c to use new routine get_index_isclustered() · 8ef9451f
    Michael Paquier authored
    This new cache lookup routine has been introduced in a40caf5f, and more
    code paths can directly use it.
    
    Note that in cluster_rel(), the code was returning immediately if the
    tuple's entry in pg_index for the clustered index was not valid.  This
    commit changes the code so as a lookup error is raised instead,
    something that could not happen from the start as we check for the
    existence of the index beforehand, while holding an exclusive lock on
    the parent table.
    
    Author: Justin Pryzby
    Reviewed-by: Álvaro Herrera, Michael Paquier
    Discussion: https://postgr.es/m/20200202161718.GI13621@telsasoft.com
    8ef9451f
cluster.c 50.3 KB