You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently do not support creating user tables in template1 and template0. Specifically because our internal copydb during CREATE DATABASE will only copy the system catalogs. It will not will not duplicate the tablets for any user tables and therefore might leave that database in an inconsistent state.
We should disable create tables or indexes in template databases. Other things (that do not require storage) such as (non-materialized) views might work, but it's better to disable every DDL (except for initdb mode) for now.
The text was updated successfully, but these errors were encountered:
…template databases
Summary:
1. Earlier "unsupported feature" error was shown in case YB_ENABLED_IN_POSTGRES=1 and current DB
is not template0/template1. It was possible to connect to template0/template1 DB and call any unsupported feature (like VACUUM, DROP DATABASE etc).
Now name of current DB is ignored. All features allowed only in "initdb" mode (by checking YB_PG_INITDB_MODE env variable)
2. The following functions are restricted when user connected to template0/template1 database:
- CREATE TABLE
- CREATE SEQUENCE
Test Plan:
Unit tests are added
yb_build.sh --java-test org.yb.pgsql.TestPgMisc
Reviewers: neil, mihnea, neha
Reviewed By: neha
Subscribers: neha, yql
Differential Revision: https://phabricator.dev.yugabyte.com/D6430
We currently do not support creating user tables in
template1
andtemplate0
. Specifically because our internal copydb duringCREATE DATABASE
will only copy the system catalogs. It will not will not duplicate the tablets for any user tables and therefore might leave that database in an inconsistent state.We should disable create tables or indexes in template databases. Other things (that do not require storage) such as (non-materialized) views might work, but it's better to disable every DDL (except for initdb mode) for now.
The text was updated successfully, but these errors were encountered: