summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormartinko2013-12-03 14:58:47 +0000
committermartinko2013-12-03 14:58:47 +0000
commitb18e10987e59691df4cb33499d64b5e03ce37a6d (patch)
tree1dccc2ee5c06f28e629b56617056ca2aefb1e7bd
parenta7b364a96dd68ac4617c86256f24f47065f985bf (diff)
parentbe0b1db66f5f37af3b9336191e83a180b4b999f4 (diff)
Merge branch 'hotfix/3.1.5.4' into develop
-rw-r--r--debian/changelog6
-rw-r--r--python/londiste/handlers/dispatch.py12
-rw-r--r--python/londiste/setup.py2
-rw-r--r--sql/pgq/expected/pgq_init_ext.out4
-rw-r--r--sql/pgq/structure/ext_postproc.sql4
5 files changed, 18 insertions, 10 deletions
diff --git a/debian/changelog b/debian/changelog
index f15aec6a..84b41949 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+skytools3 (3.1.5.4) experimental; urgency=low
+
+ * v3.1.5.4
+
+ -- martinko <[email protected]> Tue, 03 Dec 2013 15:16:17 +0100
+
skytools3 (3.1.5.3) experimental; urgency=low
* v3.1.5.3
diff --git a/python/londiste/handlers/dispatch.py b/python/londiste/handlers/dispatch.py
index d139428c..66f43f76 100644
--- a/python/londiste/handlers/dispatch.py
+++ b/python/londiste/handlers/dispatch.py
@@ -906,11 +906,12 @@ class Dispatcher (ShardHandler):
self.log.info("Created table: %s", dst)
if self.conf.retention_period:
- self.drop_obsolete_partitions (self.dest_table, self.conf.retention_period, self.conf.period)
- if self.conf.ignore_old_events and not skytools.exists_table(curs, dst):
- self.ignored_tables.add(dst) # must have been just dropped
- if dst in self.row_handler.table_map:
- del self.row_handler.table_map[dst]
+ dropped = self.drop_obsolete_partitions (self.dest_table, self.conf.retention_period, self.conf.period)
+ if self.conf.ignore_old_events and dropped:
+ for tbl in dropped:
+ self.ignored_tables.add(tbl)
+ if tbl in self.row_handler.table_map:
+ del self.row_handler.table_map[tbl]
def drop_obsolete_partitions (self, parent_table, retention_period, partition_period):
""" Drop obsolete partitions of partition-by-date parent table.
@@ -924,6 +925,7 @@ class Dispatcher (ShardHandler):
res = [row[0] for row in curs.fetchall()]
if res:
self.log.info("Dropped tables: %s", ", ".join(res))
+ return res
def get_copy_condition(self, src_curs, dst_curs):
""" Prepare where condition for copy and replay filtering.
diff --git a/python/londiste/setup.py b/python/londiste/setup.py
index 1ce79598..055be922 100644
--- a/python/londiste/setup.py
+++ b/python/londiste/setup.py
@@ -45,7 +45,7 @@ class LondisteSetup(CascadeAdmin):
londiste.handler.load_handler_modules(self.cf)
def init_optparse(self, parser=None):
- """Add londiste switches to cascadeadmin ones."""
+ """Add londiste switches to CascadeAdmin ones."""
p = CascadeAdmin.init_optparse(self, parser)
p.add_option("--expect-sync", action="store_true", dest="expect_sync",
diff --git a/sql/pgq/expected/pgq_init_ext.out b/sql/pgq/expected/pgq_init_ext.out
index df0cc184..814ed056 100644
--- a/sql/pgq/expected/pgq_init_ext.out
+++ b/sql/pgq/expected/pgq_init_ext.out
@@ -15,7 +15,7 @@ create extension pgq from 'unpackaged';
select array_length(extconfig, 1) from pg_catalog.pg_extension where extname = 'pgq';
array_length
--------------
- 6
+ 7
(1 row)
select pgq.create_queue('testqueue2');
@@ -44,6 +44,6 @@ create extension pgq;
select array_length(extconfig, 1) from pg_catalog.pg_extension where extname = 'pgq';
array_length
--------------
- 6
+ 7
(1 row)
diff --git a/sql/pgq/structure/ext_postproc.sql b/sql/pgq/structure/ext_postproc.sql
index 5c945e87..3e9cf00d 100644
--- a/sql/pgq/structure/ext_postproc.sql
+++ b/sql/pgq/structure/ext_postproc.sql
@@ -8,6 +8,6 @@ SELECT pg_catalog.pg_extension_config_dump('pgq.subscription', '');
SELECT pg_catalog.pg_extension_config_dump('pgq.event_template', '');
SELECT pg_catalog.pg_extension_config_dump('pgq.retry_queue', '');
----- pg_dump is broken and cannot handle dumpable sequences
--- SELECT pg_catalog.pg_extension_config_dump('pgq.batch_id_seq', '');
+-- This needs pg_dump 9.1.7+
+SELECT pg_catalog.pg_extension_config_dump('pgq.batch_id_seq', '');