"EXCEPTION: psql נכשל: DETAIL: Key (post_id)=(36946) משוכפל."

It sounds like you have a corrupt index. What version of postgres is this?

There are a few topics about this. You can try to reindex that table on the running instance and then delete or fix the duplicate IDs.