projects
/
skytools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
426b335
)
londiste copy: fast exit if table is removed
author
Marko Kreen
<markokr@gmail.com>
Fri, 18 Nov 2011 09:55:24 +0000
(11:55 +0200)
committer
Marko Kreen
<markokr@gmail.com>
Fri, 18 Nov 2011 09:55:24 +0000
(11:55 +0200)
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
patch
|
blob
|
blame
|
history
diff --git
a/python/londiste/table_copy.py
b/python/londiste/table_copy.py
index 5f0f8bc53d342515adedc020644c454ab60ba056..6ba0612e27fb5edaeee15fa1210ba80db3b442b3 100644
(file)
--- 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