From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Joseph Nahmias <joe(at)nahmias(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: create database with template doesn't copy database ACL |
Date: | 2020-06-15 03:39:34 |
Message-ID: | 20200615033934.GB12121@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs pgsql-hackers |
On Sun, Jun 14, 2020 at 11:24:56PM -0400, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > I am unclear if we should be copying the CONNECT and TEMPORARY
> > attributes or documenting that CREATE DATABASE does not copy them.
>
> We should absolutely not copy them.
>
> As an example, it'd make sense for an admin to revoke CONNECT on a
> template database, just to help ensure that nobody modifies it.
> If that propagated to every created database, it would be a complete
> fail.
>
> Moreover, since the ACLs of an object depend quite a bit on who the owner
> is, it'd make no sense to copy them to a new object that has a different
> owner. The granted-by fields would be wrong, if nothing else.
>
> In practice, CREATE DATABASE never has copied any database-level property
> of the template DB, only its contents. (Well, I guess it copies encoding
> and collation by default, but those are descriptive of the contents.)
Well, I thought we copied everything except things tha can be specified
as different in CREATE DATABASE, though I can see why we would not copy
them. Should we document this or issue a notice about not copying
non-default database attributes?
--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EnterpriseDB https://enterprisedb.com
The usefulness of a cup is in its emptiness, Bruce Lee
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-06-15 04:14:55 | Re: create database with template doesn't copy database ACL |
Previous Message | Tom Lane | 2020-06-15 03:24:56 | Re: create database with template doesn't copy database ACL |
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2020-06-15 03:40:03 | min_safe_lsn column in pg_replication_slots view |
Previous Message | Tom Lane | 2020-06-15 03:24:56 | Re: create database with template doesn't copy database ACL |