My fix for the initial issue:
# /var/discourse/launcher enter app
app# su - postgres
app# pgsql discourse
discourse=# DELETE FROM reviewables WHERE id = 2147;
discourse=# \q
and rebuild one more time.
There was no corresponding reviewables_scores.reviewable_id so hopefully there are no dangling keys anywhere else…