pgsql: Avoid Python memory leaks in hstore_plpython and jsonb_plpython.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Avoid Python memory leaks in hstore_plpython and jsonb_plpython.
Date: 2019-04-06 21:54:34
Message-ID: E1hCtGk-0002OS-PA@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2019-04-07 08:48:06 pgsql: Cast pg_stat_progress_cluster.cluster_index_relid to oid
Previous Message Tom Lane 2019-04-06 19:09:23 pgsql: Fix failures in validateForeignKeyConstraint's slow path.