Re: fixing CREATEROLE
| От | Tom Lane |
|---|---|
| Тема | Re: fixing CREATEROLE |
| Дата | |
| Msg-id | 3441968.1669128615@sss.pgh.pa.us обсуждение |
| Ответ на | Re: fixing CREATEROLE (walther@technowledgy.de) |
| Ответы |
Re: fixing CREATEROLE
|
| Список | pgsql-hackers |
walther@technowledgy.de writes:
> Robert Haas:
>> 2. There are some serious implementation challenges because the
>> constraints on duplicate object names must be something which can be
>> enforced by unique constraints on the relevant catalogs. Off-hand, I
>> don't see how to do that.
> For each database created, create a partial unique index:
> CREATE UNIQUE INDEX ... ON pg_authid (rolname) WHERE roldatabase IN (0,
> <database_oid>);
> Is that possible on catalogs?
No, we don't support partial indexes on catalogs, and I don't think
we want to change that. Partial indexes would require expression
evaluations occurring at very inopportune times.
Also, we don't support creating shared indexes post-initdb.
The code has hard-wired lists of which relations are shared,
besides which there's no way to update other databases' pg_class.
Even without that, the idea of a shared catalog ending up with 10000
indexes after you create 10000 databases (requiring 10^8 pg_class
entries across the whole cluster) seems ... unattractive.
regards, tom lane
В списке pgsql-hackers по дате отправления: