pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix freshly-introduced PL/Python portability bug. 5+ messages / 1 participants [nested] [flat]
* pgsql: Fix freshly-introduced PL/Python portability bug. @ 2016-04-11 22:17 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2016-04-11 22:17 UTC (permalink / raw) To: pgsql-committers Fix freshly-introduced PL/Python portability bug. It turns out that those PyErr_Clear() calls I removed from plpy_elog.c in 7e3bb080387f4143 et al were not quite as random as they appeared: they mask a Python 2.3.x bug. (Specifically, it turns out that PyType_Ready() can fail if the error indicator is set on entry, and PLy_traceback's fetch of frame.f_code may be the first operation in a session that requires the "frame" type to be readied. Ick.) Put back the clear call, but in a more centralized place closer to what it's protecting, and this time with a comment warning what it's really for. Per buildfarm member prairiedog. Although prairiedog was only failing on HEAD, it seems clearly possible for this to occur in older branches as well, so back-patch to 9.2 the same as the previous patch. Branch ------ REL9_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/112e5d2a8b32d574daba9fec9b34bdad01937f76 Modified Files -------------- src/pl/plpython/plpy_elog.c | 6 ++++++ 1 file changed, 6 insertions(+) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Fix freshly-introduced PL/Python portability bug. @ 2016-04-11 22:17 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2016-04-11 22:17 UTC (permalink / raw) To: pgsql-committers Fix freshly-introduced PL/Python portability bug. It turns out that those PyErr_Clear() calls I removed from plpy_elog.c in 7e3bb080387f4143 et al were not quite as random as they appeared: they mask a Python 2.3.x bug. (Specifically, it turns out that PyType_Ready() can fail if the error indicator is set on entry, and PLy_traceback's fetch of frame.f_code may be the first operation in a session that requires the "frame" type to be readied. Ick.) Put back the clear call, but in a more centralized place closer to what it's protecting, and this time with a comment warning what it's really for. Per buildfarm member prairiedog. Although prairiedog was only failing on HEAD, it seems clearly possible for this to occur in older branches as well, so back-patch to 9.2 the same as the previous patch. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/1d2f9de38d18152f83cf570581cebac0733ff504 Modified Files -------------- src/pl/plpython/plpy_elog.c | 6 ++++++ 1 file changed, 6 insertions(+) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Fix freshly-introduced PL/Python portability bug. @ 2016-04-11 22:17 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2016-04-11 22:17 UTC (permalink / raw) To: pgsql-committers Fix freshly-introduced PL/Python portability bug. It turns out that those PyErr_Clear() calls I removed from plpy_elog.c in 7e3bb080387f4143 et al were not quite as random as they appeared: they mask a Python 2.3.x bug. (Specifically, it turns out that PyType_Ready() can fail if the error indicator is set on entry, and PLy_traceback's fetch of frame.f_code may be the first operation in a session that requires the "frame" type to be readied. Ick.) Put back the clear call, but in a more centralized place closer to what it's protecting, and this time with a comment warning what it's really for. Per buildfarm member prairiedog. Although prairiedog was only failing on HEAD, it seems clearly possible for this to occur in older branches as well, so back-patch to 9.2 the same as the previous patch. Branch ------ REL9_2_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/9422b61d1312f69a70ae2d8a3cc17a87aa50e5a9 Modified Files -------------- src/pl/plpython/plpy_elog.c | 6 ++++++ 1 file changed, 6 insertions(+) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Fix freshly-introduced PL/Python portability bug. @ 2016-04-11 22:17 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2016-04-11 22:17 UTC (permalink / raw) To: pgsql-committers Fix freshly-introduced PL/Python portability bug. It turns out that those PyErr_Clear() calls I removed from plpy_elog.c in 7e3bb080387f4143 et al were not quite as random as they appeared: they mask a Python 2.3.x bug. (Specifically, it turns out that PyType_Ready() can fail if the error indicator is set on entry, and PLy_traceback's fetch of frame.f_code may be the first operation in a session that requires the "frame" type to be readied. Ick.) Put back the clear call, but in a more centralized place closer to what it's protecting, and this time with a comment warning what it's really for. Per buildfarm member prairiedog. Although prairiedog was only failing on HEAD, it seems clearly possible for this to occur in older branches as well, so back-patch to 9.2 the same as the previous patch. Branch ------ REL9_3_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/f6b81162c5fc83f51921d8184bad5248c5eb1144 Modified Files -------------- src/pl/plpython/plpy_elog.c | 6 ++++++ 1 file changed, 6 insertions(+) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Fix freshly-introduced PL/Python portability bug. @ 2016-04-11 22:17 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2016-04-11 22:17 UTC (permalink / raw) To: pgsql-committers Fix freshly-introduced PL/Python portability bug. It turns out that those PyErr_Clear() calls I removed from plpy_elog.c in 7e3bb080387f4143 et al were not quite as random as they appeared: they mask a Python 2.3.x bug. (Specifically, it turns out that PyType_Ready() can fail if the error indicator is set on entry, and PLy_traceback's fetch of frame.f_code may be the first operation in a session that requires the "frame" type to be readied. Ick.) Put back the clear call, but in a more centralized place closer to what it's protecting, and this time with a comment warning what it's really for. Per buildfarm member prairiedog. Although prairiedog was only failing on HEAD, it seems clearly possible for this to occur in older branches as well, so back-patch to 9.2 the same as the previous patch. Branch ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/8207c6baf8b42085bef442178ce8721ea726d9c7 Modified Files -------------- src/pl/plpython/plpy_elog.c | 6 ++++++ 1 file changed, 6 insertions(+) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2016-04-11 22:17 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2016-04-11 22:17 pgsql: Fix freshly-introduced PL/Python portability bug. Tom Lane <tgl@sss.pgh.pa.us> 2016-04-11 22:17 pgsql: Fix freshly-introduced PL/Python portability bug. Tom Lane <tgl@sss.pgh.pa.us> 2016-04-11 22:17 pgsql: Fix freshly-introduced PL/Python portability bug. Tom Lane <tgl@sss.pgh.pa.us> 2016-04-11 22:17 pgsql: Fix freshly-introduced PL/Python portability bug. Tom Lane <tgl@sss.pgh.pa.us> 2016-04-11 22:17 pgsql: Fix freshly-introduced PL/Python portability bug. Tom Lane <tgl@sss.pgh.pa.us>
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