Re: default_transaction_isolation = serializable causes crash under Hot Standby

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, robertmhaas(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: default_transaction_isolation = serializable causes crash under Hot Standby
Date: 2012-04-29 12:20:15
Message-ID: CA+U5nMKv-JazTu4wjSQjHbRWbjSrmkK6i7duyzfpXqRfhnoAmA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Apr 28, 2012 at 5:56 AM, Kevin Grittner
<Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:

> But if you set it in the postgresql.conf file, it's not pretty:
>
> kevin(at)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2012-04-29 12:23:10 Re: 9.2 release notes, beta time?
Previous Message Erik Rijkers 2012-04-29 12:12:49 Re: Patch: add conversion from pg_wchar to multibyte