> "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@kevin-desktop:~$ psql -p 5433 test psql: FATAL: can not create a serializable snapshot during recovery Ideas? -Kevin
hs-default-serializable-v1.diff
Description: Binary data
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers