Re: Surprising behaviour of \set AUTOCOMMIT ON

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Surprising behaviour of \set AUTOCOMMIT ON
Дата
Msg-id 10679.1473952228@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Surprising behaviour of \set AUTOCOMMIT ON  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Surprising behaviour of \set AUTOCOMMIT ON  (Robert Haas <robertmhaas@gmail.com>)
Re: Surprising behaviour of \set AUTOCOMMIT ON  ("Daniel Verite" <daniel@manitou-mail.org>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Sep 15, 2016 at 7:29 AM, Rahila Syed <rahilasyed90@gmail.com> wrote:
>> In keeping with current design of hooks instead of rejecting autocommit 'ON'
>> setting inside
>> a transaction,the value can be set to 'ON' with a psql_error displaying that
>> the value
>> will be effective when the current transaction has ended.

> Hmm, that seems like a reasonable compromise.

I dunno, implementing that seems like it will require some very fragile
behavior in the autocommit code, ie that even though the variable is "on"
we don't do anything until after reaching an out-of-transaction state.
It might work today but I'm afraid we'd break it in future.

I think changing the hook API is a pretty reasonable thing to do here
(though I'd make it its own patch and then add the autocommit change
on top).  When was the last time you actually wanted to set VERBOSITY
to "fubar"?
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: select_parallel test fails with nonstandard block size
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: Vacuum: allow usage of more than 1GB of work mem