Saad Talaat - 2015-03-08

postgres=# SHOW DEFAULT_TRANSACTION_ISOLATION;
default_transaction_isolation


repeatable read
(1 row)

postgres=# BEGIN;
BEGIN
postgres=# SHOW DEFAULT_TRANSACTION_ISOLATION;
default_transaction_isolation


repeatable read
(1 row)

postgres=# SET DEFAULT_TRANSACTION_ISOLATION='SERIALIZABLE';
SET
postgres=# SHOW DEFAULT_TRANSACTION_ISOLATION;
default_transaction_isolation


serializable
(1 row)

postgres=# END;
COMMIT

It does work on a local transaction. However not for a session transaction it doesn't, It default to repeatable read as you stated. The problem stands out however once you commit. that's why you get that in both a session SET statement and once you commit on a local transaction.

 

Last edit: Saad Talaat 2015-03-08