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 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
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 | Content-Type | Size |
---|---|---|
hs-default-serializable-v1.diff | application/octet-stream | 1.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2012-04-28 08:04:27 | Re: Re: xReader, double-effort (was: Temporary tables under hot standby) |
Previous Message | Tom Lane | 2012-04-28 04:32:57 | Re: plpython crash (PG 92) |