diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2018-11-23 08:44:15 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2018-11-23 08:47:34 -0300 |
commit | a5586a0e0b6b6cf58f77fe0f3e506646444e6d51 (patch) | |
tree | 3b35965d5094bd163b817b09d7c1b11fdc89e9c2 /src/backend | |
parent | efcb06f1f593d2db0e953df6cc5b597057bc1716 (diff) | |
download | postgresql-a5586a0e0b6b6cf58f77fe0f3e506646444e6d51.tar.gz postgresql-a5586a0e0b6b6cf58f77fe0f3e506646444e6d51.zip |
Don't allow partitioned indexes in pg_global tablespace
Missing in dfa608141982.
Author: David Rowley
Discussion: https://postgr.es/m/CAKJS1f-M3NMTCpv=vDfkoqHbMPFf=3-Z1ud=+1DHH00tC+zLaQ@mail.gmail.com
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/commands/tablecmds.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index d40d3ca70ca..82312686c4f 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -11070,6 +11070,12 @@ ATExecPartedIdxSetTableSpace(Relation rel, Oid newTableSpace) Assert(rel->rd_rel->relkind == RELKIND_PARTITIONED_INDEX); + /* Can't allow a non-shared relation in pg_global */ + if (newTableSpace == GLOBALTABLESPACE_OID) + ereport(ERROR, + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("only shared relations can be placed in pg_global tablespace"))); + /* * No work if no change in tablespace. */ |