Re: default_transaction_isolation = serializable causes crash under Hot Standby

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: default_transaction_isolation = serializable causes crash under Hot Standby
Дата
Msg-id CA+U5nMKv-JazTu4wjSQjHbRWbjSrmkK6i7duyzfpXqRfhnoAmA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: default_transaction_isolation = serializable causes crash under Hot Standby  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Ответы Re: default_transaction_isolation = serializable causes crash under Hot Standby  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Sat, Apr 28, 2012 at 5:56 AM, Kevin Grittner
<Kevin.Grittner@wicourts.gov> wrote:

> But if you set it in the postgresql.conf file, it's not pretty:
>
> kevin@kevin-desktop:~$ psql -p 5433 test
> psql: FATAL:  can not create a serializable snapshot during recovery
>
> Ideas?

The patch as submitted doesn't do anything useful for the case where
the setting in .conf is serializable. It just throws an ERROR for any
action, which is not useful or friendly.

IMHO the desired behaviour would be

* prevent default_transaction_isolation = serializable as a default
setting when we enter Hot Standby by throwing a FATAL error from the
startup process. I can help implement that if we agree.

* throw a WARNING if serializable is stated in other cases, and
downgrade the request to repeatable read

Throwing a WARNING is better than an ERROR, since it reduces the level
of application editing to make it work for HS. Or better still, just
document that serializable currently means repeatable read when
executed on an HS.

On another note, what happened to the plan to export regular
serializable snapshots to the standby for use as deferred snapshots?

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


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

Предыдущее
От: "Erik Rijkers"
Дата:
Сообщение: Re: Patch: add conversion from pg_wchar to multibyte
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: 9.2 release notes, beta time?