diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/catalog/dependency.h | 6 | ||||
| -rw-r--r-- | src/include/catalog/index.h | 16 | ||||
| -rw-r--r-- | src/include/commands/defrem.h | 6 | ||||
| -rw-r--r-- | src/include/nodes/parsenodes.h | 1 |
4 files changed, 25 insertions, 4 deletions
diff --git a/src/include/catalog/dependency.h b/src/include/catalog/dependency.h index f537f015879..4f9dde9df9d 100644 --- a/src/include/catalog/dependency.h +++ b/src/include/catalog/dependency.h @@ -136,6 +136,7 @@ typedef enum ObjectClass #define PERFORM_DELETION_QUIETLY 0x0004 /* suppress notices */ #define PERFORM_DELETION_SKIP_ORIGINAL 0x0008 /* keep original obj */ #define PERFORM_DELETION_SKIP_EXTENSIONS 0x0010 /* keep extensions */ +#define PERFORM_DELETION_CONCURRENT_LOCK 0x0020 /* normal drop with concurrent lock mode */ /* in dependency.c */ @@ -198,6 +199,9 @@ extern long changeDependencyFor(Oid classId, Oid objectId, Oid refClassId, Oid oldRefObjectId, Oid newRefObjectId); +extern long changeDependenciesOn(Oid refClassId, Oid oldRefObjectId, + Oid newRefObjectId); + extern Oid getExtensionOfObject(Oid classId, Oid objectId); extern bool sequenceIsOwned(Oid seqId, char deptype, Oid *tableId, int32 *colId); @@ -208,6 +212,8 @@ extern Oid get_constraint_index(Oid constraintId); extern Oid get_index_constraint(Oid indexId); +extern List *get_index_ref_constraints(Oid indexId); + /* in pg_shdepend.c */ extern void recordSharedDependencyOn(ObjectAddress *depender, diff --git a/src/include/catalog/index.h b/src/include/catalog/index.h index 55a3f446833..799efee9542 100644 --- a/src/include/catalog/index.h +++ b/src/include/catalog/index.h @@ -78,6 +78,20 @@ extern Oid index_create(Relation heapRelation, #define INDEX_CONSTR_CREATE_UPDATE_INDEX (1 << 3) #define INDEX_CONSTR_CREATE_REMOVE_OLD_DEPS (1 << 4) +extern Oid index_concurrently_create_copy(Relation heapRelation, + Oid oldIndexId, + const char *newName); + +extern void index_concurrently_build(Oid heapRelationId, + Oid indexRelationId); + +extern void index_concurrently_swap(Oid newIndexId, + Oid oldIndexId, + const char *oldName); + +extern void index_concurrently_set_dead(Oid heapId, + Oid indexId); + extern ObjectAddress index_constraint_create(Relation heapRelation, Oid indexRelationId, Oid parentConstraintId, @@ -88,7 +102,7 @@ extern ObjectAddress index_constraint_create(Relation heapRelation, bool allow_system_table_mods, bool is_internal); -extern void index_drop(Oid indexId, bool concurrent); +extern void index_drop(Oid indexId, bool concurrent, bool concurrent_lock_mode); extern IndexInfo *BuildIndexInfo(Relation index); diff --git a/src/include/commands/defrem.h b/src/include/commands/defrem.h index 3bc2e8eb16c..7f49625987a 100644 --- a/src/include/commands/defrem.h +++ b/src/include/commands/defrem.h @@ -34,10 +34,10 @@ extern ObjectAddress DefineIndex(Oid relationId, bool check_not_in_use, bool skip_build, bool quiet); -extern void ReindexIndex(RangeVar *indexRelation, int options); -extern Oid ReindexTable(RangeVar *relation, int options); +extern void ReindexIndex(RangeVar *indexRelation, int options, bool concurrent); +extern Oid ReindexTable(RangeVar *relation, int options, bool concurrent); extern void ReindexMultipleTables(const char *objectName, ReindexObjectType objectKind, - int options); + int options, bool concurrent); extern char *makeObjectName(const char *name1, const char *name2, const char *label); extern char *ChooseRelationName(const char *name1, const char *name2, diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index bdd2bd2fd9c..e81c6269137 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -3305,6 +3305,7 @@ typedef struct ReindexStmt RangeVar *relation; /* Table or index to reindex */ const char *name; /* name of database to reindex */ int options; /* Reindex options flags */ + bool concurrent; /* reindex concurrently? */ } ReindexStmt; /* ---------------------- |
