[COMMITTERS] pgsql: Be more careful about Python refcounts while creating exception

2016-12-09 Thread Tom Lane
Be more careful about Python refcounts while creating exception objects. PLy_generate_spi_exceptions neglected to do Py_INCREF on the new exception objects, evidently supposing that PyModule_AddObject would do that --- but it doesn't. This left us in a situation where a Python garbage collection

[COMMITTERS] pgsql: Be more careful about Python refcounts while creating exception

2016-12-09 Thread Tom Lane
Be more careful about Python refcounts while creating exception objects. PLy_generate_spi_exceptions neglected to do Py_INCREF on the new exception objects, evidently supposing that PyModule_AddObject would do that --- but it doesn't. This left us in a situation where a Python garbage collection

[COMMITTERS] pgsql: Be more careful about Python refcounts while creating exception

2016-12-09 Thread Tom Lane
Be more careful about Python refcounts while creating exception objects. PLy_generate_spi_exceptions neglected to do Py_INCREF on the new exception objects, evidently supposing that PyModule_AddObject would do that --- but it doesn't. This left us in a situation where a Python garbage collection

[COMMITTERS] pgsql: Be more careful about Python refcounts while creating exception

2016-12-09 Thread Tom Lane
Be more careful about Python refcounts while creating exception objects. PLy_generate_spi_exceptions neglected to do Py_INCREF on the new exception objects, evidently supposing that PyModule_AddObject would do that --- but it doesn't. This left us in a situation where a Python garbage collection

[COMMITTERS] pgsql: Be more careful about Python refcounts while creating exception

2016-12-09 Thread Tom Lane
Be more careful about Python refcounts while creating exception objects. PLy_generate_spi_exceptions neglected to do Py_INCREF on the new exception objects, evidently supposing that PyModule_AddObject would do that --- but it doesn't. This left us in a situation where a Python garbage collection

[COMMITTERS] pgsql: Be more careful about Python refcounts while creating exception

2016-12-09 Thread Tom Lane
Be more careful about Python refcounts while creating exception objects. PLy_generate_spi_exceptions neglected to do Py_INCREF on the new exception objects, evidently supposing that PyModule_AddObject would do that --- but it doesn't. This left us in a situation where a Python garbage collection