| 1 | /*------------------------------------------------------------------------- |
| 2 | * |
| 3 | * cluster.h |
| 4 | * header file for postgres cluster command stuff |
| 5 | * |
| 6 | * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group |
| 7 | * Portions Copyright (c) 1994-5, Regents of the University of California |
| 8 | * |
| 9 | * src/include/commands/cluster.h |
| 10 | * |
| 11 | *------------------------------------------------------------------------- |
| 12 | */ |
| 13 | #ifndef CLUSTER_H |
| 14 | #define CLUSTER_H |
| 15 | |
| 16 | #include "nodes/parsenodes.h" |
| 17 | #include "storage/lock.h" |
| 18 | #include "utils/relcache.h" |
| 19 | |
| 20 | |
| 21 | extern void cluster(ClusterStmt *stmt, bool isTopLevel); |
| 22 | extern void cluster_rel(Oid tableOid, Oid indexOid, int options); |
| 23 | extern void check_index_is_clusterable(Relation OldHeap, Oid indexOid, |
| 24 | bool recheck, LOCKMODE lockmode); |
| 25 | extern void mark_index_clustered(Relation rel, Oid indexOid, bool is_internal); |
| 26 | |
| 27 | extern Oid make_new_heap(Oid OIDOldHeap, Oid NewTableSpace, char relpersistence, |
| 28 | LOCKMODE lockmode); |
| 29 | extern void finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap, |
| 30 | bool is_system_catalog, |
| 31 | bool swap_toast_by_content, |
| 32 | bool check_constraints, |
| 33 | bool is_internal, |
| 34 | TransactionId frozenXid, |
| 35 | MultiXactId minMulti, |
| 36 | char newrelpersistence); |
| 37 | |
| 38 | #endif /* CLUSTER_H */ |
| 39 | |