From: Jonathan S. Katz <jkatz@postgresql.org>
To: Nikita Glukhov <n.gluhov@postgrespro.ru>
To: Andres Freund <andres@anarazel.de>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: John Naylor <john.naylor@enterprisedb.com>
Cc: Amit Langote <amitlangote09@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Subject: Re: SQL/JSON features for v15
Date: Mon, 22 Aug 2022 21:52:01 -0400
Message-ID: <92cab50c-152b-84fc-fd49-12b936113a3d@postgresql.org> (raw)
In-Reply-To: <69022273-e7e3-6d1a-10f8-d1b4740e4b97@postgresql.org>
References: <abd9b83b-aa66-f230-3d6d-734817f0995d@postgresql.org>
<20220815223853.itrlpqgpqheg6r6a@awork3.anarazel.de>
<225d341b-f310-eed0-ceff-b8ec61669d9f@postgrespro.ru>
<20220816021425.5sa6gx67zmpou3bc@awork3.anarazel.de>
<8d0ffc54-469a-ffab-68a3-8b547e24a08d@postgresql.org>
<7d83684b-7932-9f29-400b-0beedfafcdd4@postgrespro.ru>
<69022273-e7e3-6d1a-10f8-d1b4740e4b97@postgresql.org>
On 8/19/22 10:11 AM, Jonathan S. Katz wrote:
> Hi,
>
> On 8/17/22 11:45 PM, Nikita Glukhov wrote:
>> Hi,
>>
>> On 17.08.2022 04:45, Jonathan S. Katz wrote:
>>>
>>> On 8/15/22 10:14 PM, Andres Freund wrote:
>>>
>>>> I pushed a few cleanups to
>>>> https://github.com/anarazel/postgres/commits/json
>>>> while I was hacking on this (ignore that it's based on the meson
>>>> tree, that's
>>>> just faster for me). Some of them might not be applicable anymore,
>>>> but it
>>>> might still make sense for you to look at.
>>>
>>> With RMT hat on, this appears to be making progress. A few questions
>>> / comments for the group:
>>>
>>> 1. Nikita: Did you have a chance to review Andres's changes as well?
>>
>> Yes, I have reviewed Andres's changes, they all are ok.
>
> Thank you!
>
>> Then I started to do on the top of it other fixes that help to avoid
>> subtransactions when they are not needed. And it ended in the new
>> refactoring of coercion code. Also I moved here from v6-0003 fix of
>> ExecEvalJsonNeedSubtransaction() which considers more cases.
>
> Great.
>
> Andres, Robert: Do these changes address your concerns about the use of
> substransactions and reduce the risk of xid wraparound?
>
>> On 16.08.2022 05:14, Andres Freund wrote:
>>>> But for JIT I still had to construct additional ExprState with a
>>>> function compiled from subexpression steps.
>>
>>> Why did you have to do this?
>>
>> I simply did not dare to implement compilation of recursively-callable
>> function with additional parameter stepno. In the v8 patch I did it
>> by adding a switch with all possible jump addresses of EEOP_SUBTRANS
>> steps in the beginning of the function. And it really seems to work
>> faster, but needs more exploration. See patch 0003, where both
>> variants preserved using #ifdef.
>>
>>
>> The desciprion of the v7 patches:
>>
>> 0001 Simplify JsonExpr execution
>> Andres's changes + mine:
>> - Added JsonCoercionType enum, fields like via_io replaced with it
>> - Emit only context item steps in JSON_TABLE_OP case
>> - Skip coercion of NULLs to non-domain types (is it correct?)
>>
>> 0002 Fix returning of json[b] domains in JSON_VALUE:
>> simply rebase of v6 onto 0001
>>
>> 0003 Add EEOP_SUBTRANS executor step
>> v6 + new recursive JIT
>>
>> 0004 Split JsonExpr execution into steps
>> simply rebase of v6 + used LLMBuildSwitch() in EEOP_JSONEXPR
>
> What do folks think of these patches?
Andres, Andrew, Amit, Robert -- as you have either worked on this or
expressed opinions -- any thoughts on this current patch set?
Thanks,
Jonathan
Attachments:
OpenPGP_signature (application/pgp-signature, 839B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: jkatz@postgresql.org, n.gluhov@postgrespro.ru, andres@anarazel.de, pgsql-hackers@lists.postgresql.org, andrew@dunslane.net, tgl@sss.pgh.pa.us, michael@paquier.xyz, john.naylor@enterprisedb.com, amitlangote09@gmail.com, robertmhaas@gmail.com
Subject: Re: SQL/JSON features for v15
In-Reply-To: <92cab50c-152b-84fc-fd49-12b936113a3d@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox