MERGE just landed for #postgresql 15.
I had this on my list of "I really hope it makes it, but it's a tough one" list from my talk at
I am very glad it made it! Thanks for keeping up to the finish line, and team!
Conversation
So what does MERGE do that you couldn’t do with INSERT … ON CONFLICT UPDATE?
3
You’re unable to view this Tweet because this account owner limits who can view their Tweets. Learn more
Right, but the downside is that MERGE's MVCC snapshot might not be able to see a concurrently inserted tuple, go on to insert (instead of say updating the other session's row), then get a unique violation. AFAICT you can't have generality of MERGE without accepting that downside.
3
3
You’re unable to view this Tweet because this account owner limits who can view their Tweets. Learn more
That seems right to me, but I'd expect high level application requirements to drive the choice to use one over the other



