compare workaroud for hashtext change between 8.3 and 8.4
authorAsko Oja <ascoja@gmail.com>
Tue, 18 Sep 2012 13:02:14 +0000 (16:02 +0300)
committerAsko Oja <ascoja@gmail.com>
Tue, 18 Sep 2012 13:02:14 +0000 (16:02 +0300)
python/londiste/playback.py

index e5fc83a77336ece3634db3419273980494eb04f4..aee0c301d84341945be61940f86d5d0dc6e32c11 100644 (file)
@@ -289,6 +289,8 @@ class Replicator(CascadedWorker):
         #lock_timeout = 10
         # compare: sql to use
         #compare_sql = select count(1) as cnt, sum(hashtext(t.*::text)) as chksum from only _TABLE_ t
+        # workaround for hashtext change between 8.3 and 8.4
+        #compare_sql = select count(1) as cnt, sum(('x'||substr(md5(t.*::text),1,16))::bit(64)::bigint) as chksum from only _TABLE_ t     
         #compare_fmt = %(cnt)d rows, checksum=%(chksum)s
     """