I’ve just run discourse-doctor, which fails on the same error.
Additional detail; the failing row:
DETAIL: Failing row contains (1152, 16673, null, -1, null, 2021-05-10 18:32:53.008822, 2021-05-10 18:32:53.008822)
If I could access the db without the container running, I could delete the row…