aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2020-04-06 11:06:07 +0900
committerMichael Paquier <michael@paquier.xyz>2020-04-06 11:06:07 +0900
commit3f77a670241d114eb4b65ad6eed52298d28dcef8 (patch)
treed5ad3e7e3e22bbd1ebaa0cba0446a26811b4d110 /src/include
parenta850063ee0bc6c2c703117395a51eb3154e907db (diff)
downloadpostgresql-3f77a670241d114eb4b65ad6eed52298d28dcef8.tar.gz
postgresql-3f77a670241d114eb4b65ad6eed52298d28dcef8.zip
Preserve clustered index after rewrites with ALTER TABLE
A table rewritten by ALTER TABLE would lose tracking of an index usable for CLUSTER. This setting is tracked by pg_index.indisclustered and is controlled by ALTER TABLE, so some extra work was needed to restore it properly. Note that ALTER TABLE only marks the index that can be used for clustering, and does not do the actual operation. Author: Amit Langote, Justin Pryzby Reviewed-by: Ibrar Ahmed, Michael Paquier Discussion: https://postgr.es/m/20200202161718.GI13621@telsasoft.com Backpatch-through: 9.5
Diffstat (limited to 'src/include')
-rw-r--r--src/include/utils/lsyscache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/utils/lsyscache.h b/src/include/utils/lsyscache.h
index f01934afa14..211c54a2cad 100644
--- a/src/include/utils/lsyscache.h
+++ b/src/include/utils/lsyscache.h
@@ -159,6 +159,7 @@ extern char *get_namespace_name_or_temp(Oid nspid);
extern Oid get_range_subtype(Oid rangeOid);
extern Oid get_range_collation(Oid rangeOid);
extern bool get_index_isreplident(Oid index_oid);
+extern bool get_index_isclustered(Oid index_oid);
#define type_is_array(typid) (get_element_type(typid) != InvalidOid)
/* type_is_array_domain accepts both plain arrays and domains over arrays */