Postgres don't have an upsert/merge command - how does everybody deal withthis from an servlet (multi-thread)?