From dcc77f475ce670b2acc68b90a0f78700a208cdfa Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Mon, 13 Aug 2007 21:37:23 +0000 Subject: [PATCH] only main thread is allowed to restore fkeys --- python/londiste/playback.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/londiste/playback.py b/python/londiste/playback.py index b703cd20..b2f6d1b0 100644 --- a/python/londiste/playback.py +++ b/python/londiste/playback.py @@ -284,7 +284,10 @@ class Replicator(pgq.SerialConsumer): self.sync_tables(dst_db) self.copy_snapshot_cleanup(dst_db) - self.restore_fkeys(dst_db) + + # only main thread is allowed to restore fkeys + if not self.copy_thread: + self.restore_fkeys(dst_db) # now the actual event processing happens. # they must be done all in one tx in dst side -- 2.39.5