Re: SQL/JSON features for v15 - Mailing list pgsql-hackers

From Robert Haas
Subject Re: SQL/JSON features for v15
Date
Msg-id CA+TgmobLe0NXWXD2R=7ZBbb23Sd0Hszq0NrNbzGDUQoHQYQ0Jw@mail.gmail.com
Whole thread Raw
In response to Re: SQL/JSON features for v15  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Mon, Aug 15, 2022 at 6:39 PM Andres Freund <andres@anarazel.de> wrote:
> I don't think it's sane from a performance view to start a subtransaction for
> every coercion, particularly because most coercion paths will never trigger an
> error, leaving things like out-of-memory or interrupts aside. And those are
> re-thrown by ExecEvalJsonExprSubtrans().  A quick and dirty benchmark shows
> ERROR ON ERROR nearly 2xing speed.  I'm worried about the system impact of
> using subtransactions this heavily, it's not exactly the best performing
> system - the only reason it's kind of ok here is that it's going to be very
> rare to allocate a subxid, I think.

I agree. It kinda surprises me that we thought it was OK to commit
something that uses that many subtransactions. I feel like that's
going to cause people to hose themselves in ways that we can't really
do anything about. Like they'll test it out, it will work, and then
when they put it into production, they'll have constant wraparound
issues for which the only real solution is to not use the feature they
relied on to build the application.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Move NON_EXEC_STATIC from c.h
Next
From: Christoph Berg
Date:
Subject: Re: pg_receivewal and SIGTERM