Re: BUG #19458: OOM killer in jsonb_path_exists_opr (@?) with malformed JSONPath containing non-existent variables

Amit Langote <amitlangote09@gmail.com>

From: Amit Langote <amitlangote09@gmail.com>
To: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: Nikita Malakhov <hukutoc@gmail.com>, Andrey Rachitskiy <pl0h0yp1@gmail.com>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>, Nikolay Shaplov <dhyan@nataraj.su>
Date: 2026-06-05T08:58:14Z
Lists: pgsql-bugs
Hi,

Before I dig into the patch properly after the weekend, one question
on the report itself: has anyone traced why the old path runs away on
memory? We've characterized it as missing-var, then null, then
evaluation continues, then OOM, but I don't think the actual growing
allocation has been pinned down. Mostly want to understand whether the
same runaway is reachable without a missing variable, since raising
the error early wouldn't catch those cases.

- Thanks, Amit



Commits

  1. Report undefined jsonpath variable when no variables are supplied