pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Avoid freeing objects during json aggregate finalization
Date: Mon, 04 Apr 2022 15:03:59 +0000
Message-ID: <E1nbOFK-000IMt-VY@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1nbOFK-000IMt-VY@gemulon.postgresql.org>
Permalink:  ../E1nbOFK-000IMt-VY@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1nbOFK-000IMt-VY@gemulon.postgresql.org

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andrew@dunslane.net
  Subject: Re: pgsql: Avoid freeing objects during json aggregate finalization
  In-Reply-To: <E1nbOFK-000IMt-VY@gemulon.postgresql.org>
  References: <E1nbOFK-000IMt-VY@gemulon.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