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  (walther@technowledgy.de)
Список 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 по дате отправления:

Предыдущее
От: walther@technowledgy.de
Дата:
Сообщение: Re: fixing CREATEROLE
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: psql: Add command to use extended query protocol