These days, even trying to delete them with a manual SQL statement doesn't work. I tried this query, let it run for 90 minutes and then gave up:
maasdb=# delete from maasserver_event where id < 6000000;
^CCancel request sent
ERROR: canceling statement due to user request
CONTEXT: SQL statement "SELECT pg_notify('event_delete',CAST(OLD.id AS text))"
PL/pgSQL function event_delete_notify() line 4 at PERFORM
These days, even trying to delete them with a manual SQL statement doesn't work. I tried this query, let it run for 90 minutes and then gave up:
maasdb=# delete from maasserver_event where id < 6000000; 'event_ delete' ,CAST(OLD. id AS text))" notify( ) line 4 at PERFORM
^CCancel request sent
ERROR: canceling statement due to user request
CONTEXT: SQL statement "SELECT pg_notify(
PL/pgSQL function event_delete_
It takes about 20 seconds to delete 50k records.