From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Refactor cluster.c to use new routine get_index_isclustered() |
Date: | 2020-04-06 02:45:05 |
Message-ID: | E1jLHl3-0002wg-Sn@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2020-04-06 11:12:47 | pgsql: Allow autovacuum to log WAL usage statistics. |
Previous Message | Amit Kapila | 2020-04-06 02:42:08 | pgsql: Add the option to report WAL usage in EXPLAIN and auto_explain. |