From 872278a277ef0c3cca2e6c72baf624daaa9774c0 Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Fri, 18 Nov 2011 11:55:24 +0200 Subject: [PATCH] londiste copy: fast exit if table is removed Old code crashed, which sucks. It can leave constraints/fkeys unapplied, but its to complex to restore here. Better let the trigger-happy admins clean after themselves. --- python/londiste/table_copy.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/londiste/table_copy.py b/python/londiste/table_copy.py index 5f0f8bc5..6ba0612e 100644 --- a/python/londiste/table_copy.py +++ b/python/londiste/table_copy.py @@ -45,6 +45,9 @@ class CopyTable(Replicator): def reload_table_stat(self, dst_curs, tblname): self.load_table_state(dst_curs) + if tblname not in self.table_map: + self.log.warning('Table %s removed from replication', tblname) + sys.exit(1) t = self.table_map[tblname] return t -- 2.39.5