pgsql: Avoid freeing objects during json aggregate finalization

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Avoid freeing objects during json aggregate finalization
Date: 2022-04-04 15:03:59
Message-ID: E1nbOFK-000IMt-VY@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Avoid freeing objects during json aggregate finalization

Commit f4fb45d15c tried to free memory during aggregate finalization.
This cause issues, particularly when used as a window function, so stop
doing that.

Per complaint by Jaime Casanova and diagnosis by Andres Freund

Discussion: https://postgr.es/m/YkfeMNYRCGhySKyg@ahch-to

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4eb9798879680dcc0e3ebb301cf6f925dfa69422

Modified Files
--------------
src/backend/utils/adt/json.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2022-04-04 16:38:58 pgsql: Disable synchronize_seqscans in 027_stream_regress.pl.
Previous Message Robert Haas 2022-04-04 14:45:00 pgsql: pg_basebackup: Fix code that thinks about LZ4 buffer size.