pgsql: Refactor cluster.c to use new routine get_index_isclustered() - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Refactor cluster.c to use new routine get_index_isclustered()
Date
Msg-id E1jLHl3-0002wg-Sn@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Refactor cluster.c to use new routine get_index_isclustered()

This new cache lookup routine has been introduced in a40caf5, 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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8ef9451f58ee92d1cdb910e72010dbe75e76f9b8

Modified Files
--------------
src/backend/commands/cluster.c | 41 +++--------------------------------------
1 file changed, 3 insertions(+), 38 deletions(-)


pgsql-committers by date:

Previous
From: Amit Kapila
Date:
Subject: pgsql: Add the option to report WAL usage in EXPLAIN and auto_explain.
Next
From: Amit Kapila
Date:
Subject: pgsql: Allow autovacuum to log WAL usage statistics.