Skip to content

Commit 1ae37b1

Browse files
authored
Update the changing database default tablespace (#558)
Update the database default tablespace behavior description to include alter/set command. Previously the explanation was not quite helpful, as in the user can technically still use the command, previously we said it was not supported which is not true.
1 parent bbafa9f commit 1ae37b1

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

documentation/docs/index/tde-limitations.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,17 @@ Limitations of `pg_tde` {{release}}:
4949

5050
The `pg_upgrade` tool does not properly handle the internal encryption keys used by `pg_tde`, which prevents the upgraded cluster from decrypting encrypted relations.
5151

52-
## Changing the database default tablespace
52+
## `ALTER DATABASE ... SET TABLESPACE`
5353

54-
!!! warning "Changing the database default tablespace is not supported with `pg_tde`"
55-
Changing the default tablespace of a database is currently not supported when using `pg_tde`.
54+
!!! warning "Changing a database tablespace has limited support with `pg_tde`"
55+
The `ALTER DATABASE ... SET TABLESPACE` command bypasses PostgreSQL's storage manager (SMGR), which `pg_tde` relies on to enforce encryption.
5656

57-
This operation bypasses PostgreSQL's storage manager (SMGR), which is not supported by `pg_tde`.
57+
- If encrypted objects exist in the database's default tablespace, the operation is refused.
58+
- If no encrypted objects are present in the default tablespace, the operation is allowed.
5859

59-
As a safeguard, `pg_tde` blocks the operation if encrypted objects are detected in the default tablespace.
60+
Only objects in the default tablespace are checked. Objects in other tablespaces are not evaluated by `pg_tde`.
6061

61-
Objects located outside the default tablespace are not affected by this command.
62+
To move encrypted tables individually, use `ALTER TABLE ... SET TABLESPACE`, which operates through SMGR and is compatible with `pg_tde`.
6263

6364
## Currently unsupported WAL tools
6465

0 commit comments

Comments
 (0)