diff options
| author | Michael Paquier | 2020-04-06 02:03:49 +0000 |
|---|---|---|
| committer | Michael Paquier | 2020-04-06 02:03:49 +0000 |
| commit | a40caf5f862ca8b7e927b2ab2567e934868e9376 (patch) | |
| tree | 2c98687392f271307de35ac3e5b868b6397be0e4 /src/include | |
| parent | fc3f4453a2bc95549682e23600b22e658cb2d6d7 (diff) | |
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/[email protected]
Backpatch-through: 9.5
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/utils/lsyscache.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/utils/lsyscache.h b/src/include/utils/lsyscache.h index 374f57fb43a..c9c68e2f4f8 100644 --- a/src/include/utils/lsyscache.h +++ b/src/include/utils/lsyscache.h @@ -185,6 +185,7 @@ extern Oid get_range_collation(Oid rangeOid); extern Oid get_index_column_opclass(Oid index_oid, int attno); extern bool get_index_isreplident(Oid index_oid); extern bool get_index_isvalid(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 */ |
