From 185ced570b0fee134dbf2913f02c9f5d375f1a29 Mon Sep 17 00:00:00 2001 From: martinko Date: Thu, 19 Sep 2013 14:46:01 +0200 Subject: [PATCH] londiste.drop_obsolete_partitions: drop tables in alphabetical order (that is from the oldest) --- sql/londiste/functions/londiste.drop_obsolete_partitions.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/londiste/functions/londiste.drop_obsolete_partitions.sql b/sql/londiste/functions/londiste.drop_obsolete_partitions.sql index ee18d904..4346724e 100644 --- a/sql/londiste/functions/londiste.drop_obsolete_partitions.sql +++ b/sql/londiste/functions/londiste.drop_obsolete_partitions.sql @@ -54,6 +54,7 @@ begin where t.schemaname = _schema and t.tablename ~ ('^'|| _table || _expr ||'$') and t.tablename < _table || to_char (now() - i_retention_period, _dfmt) + order by 1 loop execute 'drop table '|| _part; return next _part; -- 2.39.5