From 1b1534f294c829b03cb5f5f73c034812d673baf8 Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Mon, 26 Sep 2011 16:15:28 +0300 Subject: [PATCH] londiste copy: support startup isolation level when switching back from serializable level, use old level. This will help support autocommit on source side. --- python/londiste/table_copy.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/londiste/table_copy.py b/python/londiste/table_copy.py index a4ad2634..987e4126 100644 --- a/python/londiste/table_copy.py +++ b/python/londiste/table_copy.py @@ -90,6 +90,7 @@ class CopyTable(Replicator): cmode = 0 # change to SERIALIZABLE isolation level + oldiso = src_db.isolation_level src_db.set_isolation_level(skytools.I_SERIALIZABLE) src_db.commit() @@ -158,8 +159,8 @@ class CopyTable(Replicator): snapshot = src_curs.fetchone()[0] src_db.commit() - # restore READ COMMITTED behaviour - src_db.set_isolation_level(1) + # restore old behaviour + src_db.set_isolation_level(oldiso) src_db.commit() tbl_stat.change_state(TABLE_CATCHING_UP) -- 2.39.5