I tried to decypher that page but without much luck.
In the end, I did delete the records from the database (I had to remove records from other tables as well due to foreign key constraints):
postgres=# delete from hyperkitty_lastview where thread_id in ( 1309,1310); postgres=# delete from hyperkitty_attachment where email_id in (1365,1366); postgres=# update hyperkitty_thread set starting_email_id = NULL where starting_email_id in ( 1365,1366); postgres=# delete from hyperkitty_email where id in ( 1365, 1366); postgres=# delete from hyperkitty_thread where id in ( 1309,1310);
And now the error messages have stopped.
The first time I restarted mailman3-web I got two warning messages: WARNING 2023-09-18 21:54:34,850 1825 hyperkitty.tasks Cannot rebuild the thread cache: thread 1310 does not exist. WARNING 2023-09-18 21:54:34,852 1826 hyperkitty.tasks Cannot rebuild the thread cache: thread 1309 does not exist.
Is that something that is going to come back to bite me? Subsequent restarts did not produce the same warning messages.