summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Kreen2007-04-05 09:49:36 +0000
committerMarko Kreen2007-04-05 09:49:36 +0000
commit7fc9791ed2b1f1677fedc2b0ee8e793526f51ef6 (patch)
treea93029ca1debb77e5e0acb2519b35bb6ce57ef13
parent823f1716466bdf9c2b1fe68bb4f73a6e4d3bc267 (diff)
duh, more missed fields
-rw-r--r--sql/pgq/functions/pgq.maint_rotate_tables.sql4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/pgq/functions/pgq.maint_rotate_tables.sql b/sql/pgq/functions/pgq.maint_rotate_tables.sql
index 0195b605..f9d12367 100644
--- a/sql/pgq/functions/pgq.maint_rotate_tables.sql
+++ b/sql/pgq/functions/pgq.maint_rotate_tables.sql
@@ -48,7 +48,7 @@ begin
if nr = cf.queue_ntables then
nr := 0;
end if;
- tbl := cf.table_name || '_' || nr;
+ tbl := cf.queue_data_pfx || '_' || nr;
-- there may be long lock on the table from pg_dump,
-- detect it and skip rotate then
@@ -72,7 +72,7 @@ begin
-- clean ticks - avoid partial batches
delete from pgq.tick
where tick_queue = cf.queue_id
- and get_snapshot_xmin(snapshot) < cf.last_switch_step2;
+ and get_snapshot_xmin(tick_snapshot) < cf.queue_switch_step2;
return 1;
end;