Skip to content

Commit

Permalink
Update ddl-command-handling.mdx
Browse files Browse the repository at this point in the history
Update allowed DDL commands and overrides
  • Loading branch information
PJMODOS authored and djw-m committed Nov 21, 2024
1 parent 701a756 commit b94fe01
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions product_docs/docs/pgd/5.6/ddl/ddl-command-handling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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.

<div id='bdr_ddl_allowed_CreateStmt'></div>

### CREATE TABLE

Generally `CREATE TABLE` is supported, but `CREATE TABLE WITH OIDS` isn't
allowed on a PGD node.

<div id='bdr_ddl_allowed_CreateTableAsStmt'></div>

### CREATE TABLE AS and SELECT INTO
Expand Down

0 comments on commit b94fe01

Please sign in to comment.