On Sat, 2011-03-05 at 10:34 -0600, James Bottomley wrote: > If I remove the transactions and just do a straight delete, everything > works (at least in my test environment; I'll try it on the real program > tonight). There's actually no real reason for the deletes to be done > transactionally. Even if we get a crash, we don't care whether all the > keys or none are deleted ... if we get partial deletion, the next > cleanup will get the rest.
OK, so confirmed last night that the cleanup ran correctly without the transactional logic and that postgrey didn't die: Mar 6 02:17:23 bedivere postgrey[32282]: cleaning main database finished. before: 9349, after: 4484 Mar 6 02:17:24 bedivere postgrey[32282]: cleaning clients database finished. before: 2844, after: 2336 The patch below is what I'm running. James --- --- /usr/sbin/postgrey.orig 2011-01-11 13:15:43.000000000 -0800 +++ /usr/sbin/postgrey 2011-03-05 08:40:02.000000000 -0800 @@ -275,11 +275,7 @@ $nr_keys_after++; } } - my $db_obj = $self->{postgrey}{db_obj}; - my $txn = $db_env->txn_begin(); - $db_obj->Txn($txn); for my $key (@old_keys) { delete $db->{$key}; } - $txn->txn_commit(); $self->mylog(1, "cleaning main database finished. before: $nr_keys_before, after: $nr_keys_after"); @@ -299,11 +295,7 @@ $nr_keys_after++; } } - my $db_cawl_obj = $self->{postgrey}{db_cawl_obj}; - $txn = $db_env->txn_begin(); - $db_cawl_obj->Txn($txn); for my $key (@old_keys_cawl) { delete $cawl_db->{$key}; } - $txn->txn_commit(); $self->mylog(1, "cleaning clients database finished. before: $nr_keys_before, after: $nr_keys_after"); } -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org