Re: Fwd: Problem with a "complex" upsert

Peter Geoghegan <pg@bowt.ie>

From: Peter Geoghegan <pg@bowt.ie>
To: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Dean Rasheed <dean.a.rasheed@gmail.com>, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>, Mario De Frutos Dieguez <mariodefrutos@gmail.com>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2018-08-03T23:14:17Z
Lists: pgsql-bugs
On Fri, Aug 3, 2018 at 3:44 PM, Andres Freund <andres@anarazel.de> wrote:
> This results in clearly inserting wrong data and/or crashing the
> server. And it's not a huge effect outside of already broken scenarios.
> I think we definitely should try to get this in.

I tend to agree. You told me privately that you had a customer that
had the same issue, so we know that it has affected multiple users.

I think that the surface area for new bugs from the fix has a lot of
overlap with cases that are already probably quite broken. I'm
concerned that existing affected users could suffer pernicious logical
corruption, that goes unnoticed for a long time but ultimately does a
lot of damage.

In the end, it's a matter for Dean, but there is definitely a good
case for proceeding with a full backpatch now, in my view.

-- 
Peter Geoghegan


Commits

  1. Fix INSERT ON CONFLICT UPDATE through a view that isn't just SELECT *.