diff options
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/access/common/reloptions.c | 10 | ||||
-rw-r--r-- | src/backend/commands/tablecmds.c | 6 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.c index b5fd30a4f95..31941e99edb 100644 --- a/src/backend/access/common/reloptions.c +++ b/src/backend/access/common/reloptions.c @@ -63,6 +63,14 @@ static relopt_bool boolRelOpts[] = }, { { + "user_catalog_table", + "Declare a table as an additional catalog table, e.g. for the purpose of logical replication", + RELOPT_KIND_HEAP + }, + false + }, + { + { "fastupdate", "Enables \"fast update\" feature for this GIN index", RELOPT_KIND_GIN @@ -1166,6 +1174,8 @@ default_reloptions(Datum reloptions, bool validate, relopt_kind kind) offsetof(StdRdOptions, security_barrier)}, {"check_option", RELOPT_TYPE_STRING, offsetof(StdRdOptions, check_option_offset)}, + {"user_catalog_table", RELOPT_TYPE_BOOL, + offsetof(StdRdOptions, user_catalog_table)} }; options = parseRelOptions(reloptions, validate, kind, &numoptions); diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 1d9f29a7b7c..b9cd88d5701 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -3532,6 +3532,12 @@ ATRewriteTables(List **wqueue, LOCKMODE lockmode) errmsg("cannot rewrite system relation \"%s\"", RelationGetRelationName(OldHeap)))); + if (RelationIsUsedAsCatalogTable(OldHeap)) + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("cannot rewrite table \"%s\" used as a catalog table", + RelationGetRelationName(OldHeap)))); + /* * Don't allow rewrite on temp tables of other backends ... their * local buffer manager is not going to cope. |