Re: setting per-database/role parameters checks them against wrong context

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: setting per-database/role parameters checks them against wrong context
Дата
Msg-id 22133.1348841434@sss.pgh.pa.us
обсуждение исходный текст
Ответ на setting per-database/role parameters checks them against wrong context  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: setting per-database/role parameters checks them against wrong context  (Selena Deckelmann <selena@chesnok.com>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Example:
> create temporary table foo (a int);
> insert into foo values (1);
> alter role peter set temp_buffers = 120;
> ERROR:  22023: invalid value for parameter "temp_buffers": 120
> DETAIL:  "temp_buffers" cannot be changed after any temporary tables
> have been accessed in the session.

> Another example:

> set log_statement_stats = on;
> alter role peter set log_parser_stats = on;
> ERROR:  22023: invalid value for parameter "log_parser_stats": 1
> DETAIL:  Cannot enable parameter when "log_statement_stats" is true.

> Another example is that in <=9.1, ALTER DATABASE ... SET search_path
> would check the existence of the schema in the current database, but
> that was done away with in 9.2.

> The first example could probably be fixed if check_temp_buffers() paid
> attention to the GucSource, but in the second case and in general there
> doesn't seem to be a way to distinguish "assigning per-database setting"
> and "enacting per-database setting" as a source.

> Ideas?

Perhaps instead of trying to solve the problem as stated, it would be
more useful to put the effort into getting rid of context-sensitive
restrictions on GUC settings.  Neither of the examples above seem
particularly essential - they are just protecting incomplete
implementations.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Marko Kreen
Дата:
Сообщение: Re: [9.1] 2 bugs with extensions
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: 64-bit API for large object