Michael Monnerie wrote:
On Donnerstag, 12. Juli 2007 Aleksander Kamenik wrote:
There also are no 20k messages set for deletion nor purging. Is it
possible that these messages were left hanging? dbmail-util -ay
didn't find anything wrong.
Yes, I've had long discussions about this in a previous thread. You can
now do:
DELETE FROM dbmail_physmessage WHERE id NOT IN (SELECT physmessage_id
FROM dbmail_messages);
This will save you lots of space *g*
To prevent such leftover physmessages in the future, I've developed this
RULE with the help of others, for postgres:
CREATE RULE drop_messages_with_mailbox AS ON DELETE TO
dbmail_messages DO DELETE FROM dbmail_physmessage WHERE id =
OLD.physmessage_id AND id NOT IN (SELECT physmessage_id from
dbmail_messages);
Indeed:
mysql> select count(id) FROM dbmail_physmessage WHERE id NOT IN (SELECT
physmessage_id
-> FROM dbmail_messages);
+-----------+
| count(id) |
+-----------+
| 69977 |
+-----------+
1 row in set (8.25 sec)
Aaron or Paul, could you please confirm the issue and that these
physmessages can be deleted?
Thanks Michael!
--
Aleksander Kamenik
system administrator
+372 6659 649
[EMAIL PROTECTED]
Krediidiinfo AS
http://www.krediidiinfo.ee/
_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail