From b94fe01f32f7d51ccbd1a537b71a987519b841fa Mon Sep 17 00:00:00 2001 From: Petr Jelinek Date: Thu, 21 Nov 2024 13:56:11 +0100 Subject: [PATCH] Update ddl-command-handling.mdx Update allowed DDL commands and overrides --- .../docs/pgd/5.6/ddl/ddl-command-handling.mdx | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/product_docs/docs/pgd/5.6/ddl/ddl-command-handling.mdx b/product_docs/docs/pgd/5.6/ddl/ddl-command-handling.mdx index fad0aa6f068..9fdf01482ac 100644 --- a/product_docs/docs/pgd/5.6/ddl/ddl-command-handling.mdx +++ b/product_docs/docs/pgd/5.6/ddl/ddl-command-handling.mdx @@ -118,7 +118,7 @@ under the following table. | CREATE STATISTICS | Y | Y | DDL | | CREATE SUBSCRIPTION | Y | Y | DDL | | CREATE SYNONYM | Y | Y | DDL | -| CREATE TABLE | [Details](#bdr_ddl_allowed_CreateStmt) | Y | DDL | +| CREATE TABLE | Y | Y | DDL | | CREATE TABLE AS | [Details](#bdr_ddl_allowed_CreateTableAsStmt) | Y | DDL | | CREATE TABLESPACE | Y | N | N | | CREATE TEXT SEARCH CONFIGURATION | Y | Y | DDL | @@ -253,10 +253,12 @@ Some variants of `ALTER TABLE` currently aren't allowed on a PGD node: - `ADD COLUMN ... DEFAULT (non-immutable expression)` — This is not allowed because it currently results in different data on different nodes. See [Adding a column](ddl-workarounds/#adding-a-column) for a suggested workaround. -- `ALTER TABLE ... SET WITH[OUT] OIDS` — Isn't supported for the same reasons - as in `CREATE TABLE`. + This can be overriden using `bdr.permit_unsafe_commands` if user is sure the command is + safe. - `ALTER COLUMN ... SET STORAGE external` — Is rejected if the column is one of the columns of the replica identity for the table. + This can be overriden using `bdr.permit_unsafe_commands` if user is sure the command is + safe. - `RENAME` — Can't rename an Autopartitioned table. - `SET SCHEMA` — Can't set the schema of an Autopartitioned table. - `ALTER COLUMN ... TYPE` — Changing a column's type isn't supported if the @@ -272,6 +274,8 @@ Some variants of `ALTER TABLE` currently aren't allowed on a PGD node: AccessExclusiveLock for extended periods on larger tables, so such commands are likely to be infeasible on highly available databases in any case. See [Changing a column's type](ddl-workarounds/#changing-a-columns-type) for a suggested workaround. + This can be overriden using `bdr.permit_unsafe_commands` if user is sure the command is + safe. - `ALTER TABLE ... ADD FOREIGN KEY` — Isn't supported if current user doesn't have permission to read the referenced table or if the referenced table has RLS restrictions enabled that the current user can't bypass. @@ -500,13 +504,6 @@ break the replication due to the `writer` worker throwing the error: `cannot cha Generally `CREATE SEQUENCE` is supported, but when using global sequences, some options have no effect. -
- -### CREATE TABLE - -Generally `CREATE TABLE` is supported, but `CREATE TABLE WITH OIDS` isn't -allowed on a PGD node. -
### CREATE TABLE AS and SELECT INTO