News for hackers. Stuff that matters.
Re:PostgreSQL 9.4 Beta 1 Released by pilif on Thursday May 15, 2014 @11:54AM (#7750166)
In that regard, have a look at http://www.depesz.com/2012/06/10/why-is-upsert-so-complicate... which is a very good article explaining why you have to continue to wait.

Getting MERGE right is one of these "pick two" things. You get to chose between "fast", "doesn't corrupt data" and "doesn't throw errors at times" but you only get to pick two.

Re:PostgreSQL 9.4 Beta 1 Released by ajtaylor on Thursday May 15, 2014 @09:03PM (#7753220)
Pretty much every Pg related post on depesz.com is a gold mine. You should read them all, especially where he explains upcoming features in new Pg releases. I've learned a ton simply be browsing through his site, which is very readable with great examples to put the concepts into practice.
Re:PostgreSQL 9.4 Beta 1 Released by spitfire on Thursday May 15, 2014 @01:32PM (#7750904)
I pick correct semantics NOW and fix performance issues at your leisure.

upsert has been an embarrassment for Postgres for far too long now. Particularly obnoxious was the "upsert is hard! Roll your own" stance taken.

Re:PostgreSQL 9.4 Beta 1 Released by jeffdavis on Thursday May 15, 2014 @03:43PM (#7751751)
A completely reasonable stance.

However, it's not so much a performance question as one of concurrency. The easiest way to get the right semantics is by locking the entire destination table against concurrent writes. Maybe that's fine for a lot of users. But it has caused some hesitation, because other users might be disappointed.

It would be fair to say "just do it" though.

Re:PostgreSQL 9.4 Beta 1 Released by audreyt on Friday May 16, 2014 @01:00AM (#7753827)
Part of the motivation behind PgREST is to get a reusable and generic enough upsert implementation as a stored procedure; see https://github.com/pgrest/pgrest/blob/master/test/upsert.ls for details.
Re:PostgreSQL 9.4 Beta 1 Released by azinman2 on Thursday May 15, 2014 @01:46PM (#7751002)
That's a really great blog post, as well as the most informative blog I've seen on postgresql in general! Thanks for the link!