Re: PG19 regression in ecd9288624a: JSON_ARRAY() indexes that go stale

From: Manu <manuelreyesbravo(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Nikolay Samokhvalov <nik(at)postgres(dot)ai>, jian he <jian(dot)universality(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, shihao zhong <zhong950419(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: PG19 regression in ecd9288624a: JSON_ARRAY() indexes that go stale
Date: 2026-11-06 17:29:09
Message-ID: 179398614993.2388386.7586162912341993945@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Andrew,

On Thu, Nov 5, 2026 at 4:41 PM Andrew Dunstan
<andrew(at)dunslane(dot)net> wrote:
> I think the best thing we can do is revert the feature and have
> another go in the next development cycle. That leaves us still with
> bugs, but stops us from introducing new bugs.
>
> I propose to do that revert tomorrow.

Agreed. I tried the revert on REL_19_STABLE and master as of
de903547c74 and f1e97a29210: git revert applies cleanly, touches only
the six files of the original commit and no catalog, builds without
warnings, and make check and check-world pass on both.

After it, to_json_is_immutable() and to_jsonb_is_immutable() are
identical to 18.6's, and of the 330 types I tried in both, the same
ones are accepted in a json_array() index. All the 19-only stale
cases from this thread are rejected again, including Nik's float8[]
and the 24 array variants I posted after it. What can still go
stale is what 18.6 already has: types whose cast to json is created
or dropped after the index, and float, bytea and geometric values
after a change to extra_float_digits or bytea_output. On master,
where e75fcc9867f made those output functions stable, only the cast
cases remain.

One side effect: an index or stored generated column created on a 19
beta or RC with such an expression stays in place after the revert,
but a dump of it no longer restores.

Once it's in, I'll update the open item.

Regards,
Manu

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Prashant Chinnam 2026-11-06 17:34:46 Re: extension_control_path: ignore empty elements and deduplicate directories
Previous Message Jacob Champion 2026-11-06 17:05:08 Re: [PATCH] Add a check_hook for output_plugin_libraries