|
PostgreSQL Source Code git master
|
#include "nodes/parsenodes.h"#include "parser/parse_node.h"#include "storage/lockdefs.h"#include "utils/relcache.h"

Go to the source code of this file.
Data Structures | |
| struct | ClusterParams |
Macros | |
| #define | CLUOPT_VERBOSE 0x01 /* print progress info */ |
| #define | CLUOPT_RECHECK 0x02 /* recheck relation state */ |
| #define | CLUOPT_RECHECK_ISCLUSTERED |
| #define | CLUOPT_ANALYZE 0x08 /* do an ANALYZE */ |
Typedefs | |
| typedef struct ClusterParams | ClusterParams |
Functions | |
| void | ExecRepack (ParseState *pstate, RepackStmt *stmt, bool isTopLevel) |
| void | cluster_rel (RepackCommand command, Relation OldHeap, Oid indexOid, ClusterParams *params) |
| void | check_index_is_clusterable (Relation OldHeap, Oid indexOid, LOCKMODE lockmode) |
| void | mark_index_clustered (Relation rel, Oid indexOid, bool is_internal) |
| Oid | make_new_heap (Oid OIDOldHeap, Oid NewTableSpace, Oid NewAccessMethod, char relpersistence, LOCKMODE lockmode) |
| void | finish_heap_swap (Oid OIDOldHeap, Oid OIDNewHeap, bool is_system_catalog, bool swap_toast_by_content, bool check_constraints, bool is_internal, TransactionId frozenXid, MultiXactId cutoffMulti, char newrelpersistence) |
| #define CLUOPT_RECHECK_ISCLUSTERED |
Definition at line 25 of file cluster.h.
| typedef struct ClusterParams ClusterParams |
Definition at line 508 of file cluster.c.
References ereport, errcode(), errmsg, ERROR, fb(), heap_attisnull(), index_close(), index_open(), NoLock, RelationGetRelationName, and RelationGetRelid.
Referenced by ATExecClusterOn(), cluster_rel(), ExecRepack(), and process_single_relation().
|
extern |
Definition at line 300 of file cluster.c.
References AccessExclusiveLock, allowSystemTableMods, Assert, AtEOXact_GUC(), CHECK_FOR_INTERRUPTS, check_index_is_clusterable(), CheckRelationLockedByMe(), CheckTableNotInUse(), CLUOPT_RECHECK, CLUOPT_VERBOSE, cluster_rel_recheck(), ereport, errcode(), errdetail(), errmsg, ERROR, fb(), GetUserIdAndSecContext(), index_open(), IsCatalogRelation(), NewGUCNestLevel(), NoLock, OidIsValid, ClusterParams::options, pgstat_progress_end_command(), pgstat_progress_start_command(), pgstat_progress_update_param(), PROGRESS_COMMAND_REPACK, PROGRESS_REPACK_COMMAND, rebuild_relation(), relation_close(), RELATION_IS_OTHER_TEMP, RelationGetRelationName, RelationGetRelid, RelationIsPopulated, REPACK_COMMAND_CLUSTER, RepackCommandAsString(), RestrictSearchPath(), SECURITY_RESTRICTED_OPERATION, SetUserIdAndSecContext(), TransferPredicateLocksToHeapRelation(), and verbose.
Referenced by ExecRepack(), process_single_relation(), and vacuum_rel().
|
extern |
Definition at line 113 of file cluster.c.
References AccessExclusiveLock, ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, Assert, check_index_is_clusterable(), CLUOPT_ANALYZE, CLUOPT_RECHECK, CLUOPT_RECHECK_ISCLUSTERED, CLUOPT_VERBOSE, cluster_rel(), CommitTransactionCommand(), defGetBoolean(), determine_clustered_index(), elog, ereport, errcode(), errmsg, ERROR, fb(), foreach_node, foreach_ptr, get_tables_to_repack(), get_tables_to_repack_partitioned(), GetTransactionSnapshot(), MemoryContextDelete(), OidIsValid, ClusterParams::options, parser_errposition(), PopActiveSnapshot(), PortalContext, PreventInTransactionBlock(), process_single_relation(), PushActiveSnapshot(), RelationData::rd_rel, RelationGetRelationName, RelationGetRelid, REPACK_COMMAND_CLUSTER, RepackCommandAsString(), StartTransactionCommand(), stmt, table_close(), and try_table_open().
Referenced by standard_ProcessUtility().
|
extern |
Definition at line 1455 of file cluster.c.
References CacheInvalidateCatalog(), CatalogTupleUpdate(), CommandCounterIncrement(), DROP_RESTRICT, elog, ERROR, fb(), GETSTRUCT(), HeapTupleIsValid, i, NAMEDATALEN, NoLock, ObjectIdGetDatum(), OidIsValid, PERFORM_DELETION_INTERNAL, performDeletion(), pgstat_progress_update_param(), PROGRESS_REPACK_PHASE, PROGRESS_REPACK_PHASE_FINAL_CLEANUP, PROGRESS_REPACK_PHASE_REBUILD_INDEX, PROGRESS_REPACK_PHASE_SWAP_REL_FILES, REINDEX_REL_CHECK_CONSTRAINTS, REINDEX_REL_FORCE_INDEXES_PERMANENT, REINDEX_REL_FORCE_INDEXES_UNLOGGED, REINDEX_REL_SUPPRESS_INDEX_USE, reindex_relation(), relation_close(), RelationClearMissing(), RelationMapRemoveMapping(), RenameRelationInternal(), ResetRelRewrite(), RowExclusiveLock, SearchSysCacheCopy1, snprintf, swap_relation_files(), table_close(), table_open(), and toast_get_valid_index().
Referenced by ATRewriteTables(), rebuild_relation(), and refresh_by_heap_swap().
|
extern |
Definition at line 715 of file cluster.c.
References Assert, CommandCounterIncrement(), elog, ERROR, fb(), heap_create_with_catalog(), HeapTupleIsValid, InvalidOid, LookupCreationNamespace(), NAMEDATALEN, NewHeapCreateToastTable(), NIL, NoLock, ObjectIdGetDatum(), OidIsValid, ONCOMMIT_NOOP, RelationGetDescr, RelationGetNamespace, RelationIsMapped, ReleaseSysCache(), SearchSysCache1(), snprintf, SysCacheGetAttr(), table_close(), and table_open().
Referenced by ATRewriteTables(), rebuild_relation(), and RefreshMatViewByOid().
Definition at line 568 of file cluster.c.
References Assert, CatalogTupleUpdate(), elog, ERROR, fb(), Form_pg_index, get_index_isclustered(), GETSTRUCT(), heap_freetuple(), HeapTupleIsValid, InvalidOid, InvokeObjectPostAlterHookArg, lfirst_oid, ObjectIdGetDatum(), OidIsValid, RelationData::rd_rel, RelationGetIndexList(), RowExclusiveLock, SearchSysCacheCopy1, table_close(), and table_open().
Referenced by ATExecClusterOn(), ATExecDropCluster(), and rebuild_relation().