Skip site navigation (1) Skip section navigation (2)

Re: default_transaction_isolation = serializable causes crash under Hot Standby

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <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-28 04:56:10
Message-ID: 4F9B321A02000025000474F5@gw.wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-hackers
> "Kevin Grittner"  wrote:
> Tom Lane  wrote:
> 
>> Yeah, it would definitely be nicer if BEGIN; SET TRANSACTION LEVEL
>> would work too. Maybe the place to put the check is where we
>> establish the transaction snapshot.
> 
> That makes sense, 
 
> I'll take a shot at it sometime today,
 
Attached.  With a default setting in postgresql.conf it handles
Robert's test case nicely, and does what Tom asks for above:

test=# set default_transaction_isolation = 'serializable';
SET
test=# begin;
BEGIN
test=# select 1;
ERROR:  can not create a serializable snapshot during recovery
test=# rollback;
ROLLBACK
test=# begin;
BEGIN
test=# set transaction isolation level repeatable read;
SET
test=# select 1;
 ?column? 
----------
        1
(1 row)

test=# commit;
COMMIT

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?
 
-Kevin



Attachment: hs-default-serializable-v1.diff
Description: application/octet-stream (1.2 KB)

Responses

pgsql-hackers by date

Next:From: Simon RiggsDate: 2012-04-28 08:04:27
Subject: Re: Re: xReader, double-effort (was: Temporary tables under hot standby)
Previous:From: Tom LaneDate: 2012-04-28 04:32:57
Subject: Re: plpython crash (PG 92)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group