pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Avoid Python memory leaks in hstore_plpython and jsonb_plpython.
Date: Sat, 06 Apr 2019 21:54:34 +0000
Message-ID: <E1hCtGk-0002OS-PA@gemulon.postgresql.org> (raw)

Avoid Python memory leaks in hstore_plpython and jsonb_plpython.

Fix some places where we might fail to do Py_DECREF() on a Python
object (thereby leaking it for the rest of the session).  Almost
all of the risks were in error-recovery paths, which we don't really
expect to hit anyway.  Hence, while this is definitely a bug fix,
it doesn't quite seem worth back-patching.

Nikita Glukhov, Michael Paquier, Tom Lane

Discussion: https://postgr.es/m/28053a7d-10d8-fc23-b05c-b4749c873f63@postgrespro.ru

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9e360f0e8327bcf4b7c5ce957024fdff8f95f7de

Modified Files
--------------
contrib/hstore_plpython/hstore_plpython.c |  11 +--
contrib/jsonb_plpython/jsonb_plpython.c   | 108 +++++++++++++++++++++---------
2 files changed, 83 insertions(+), 36 deletions(-)



Message-ID: <E1hCtGk-0002OS-PA@gemulon.postgresql.org>
Permalink:  ../E1hCtGk-0002OS-PA@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hCtGk-0002OS-PA@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: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Avoid Python memory leaks in hstore_plpython and jsonb_plpython.
  In-Reply-To: <E1hCtGk-0002OS-PA@gemulon.postgresql.org>
  References: <E1hCtGk-0002OS-PA@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