From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Refactor cluster.c to use new routine get_index_isclustered()
Date: Mon, 06 Apr 2020 02:45:05 +0000
Message-ID: <E1jLHl3-0002wg-Sn@gemulon.postgresql.org> (raw)
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(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz
Subject: Re: pgsql: Refactor cluster.c to use new routine get_index_isclustered()
In-Reply-To: <E1jLHl3-0002wg-Sn@gemulon.postgresql.org>
References: <E1jLHl3-0002wg-Sn@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox