\echo == variant: arg0 computed per-row with ~5 kB padding, so the per-tuple context \echo == spills out of its keeper block and the jsonb null lands in a block free()d on reset SELECT jsonb_set_lax(j || jsonb_build_object('pad', repeat('x', 5000)), '{a}', NULL, true, t) - 'pad' FROM (VALUES (jsonb_build_object('a','1'),'use_json_null'), (jsonb_build_object('a','1'),'delete_key')) AS v(j,t);