{"push_id":2035115909,"size":2,"distinct_size":1,"ref":"refs/heads/commitfest/15/1313","head":"39b215fe5068e7f7e6989449ec769d6ec468baff","before":"e09ca7018268dc1bf9db109abc93e12387127bcd","commits":[{"sha":"1518d07842dcb412ea6b8bb8172c40da7499b174","author":{"name":"Tom Lane","email":"9ca635a44fdf5aa326758d8d245579b9ae84653c@sss.pgh.pa.us"},"message":"Fix crash when logical decoding is invoked from a PL function.\n\nThe logical decoding functions do BeginInternalSubTransaction and\nRollbackAndReleaseCurrentSubTransaction to clean up after themselves.\nIt turns out that AtEOSubXact_SPI has an unrecognized assumption that\nwe always need to cancel the active SPI operation in the SPI context\nthat surrounds the subtransaction (if there is one).  That's true\nwhen the RollbackAndReleaseCurrentSubTransaction call is coming from\nthe SPI-using function itself, but not when it's happening inside\nsome unrelated function invoked by a SPI query.  In practice the\naffected callers are the various PLs.\n\nTo fix, record the current subtransaction ID when we begin a SPI\noperation, and clean up only if that ID is the subtransaction being\ncanceled.\n\nAlso, remove AtEOSubXact_SPI's assertion that it must have cleaned\nup the surrounding SPI context's active tuptable.  That's proven\nwrong by the same test case.\n\nAlso clarify (or, if you prefer, reinterpret) the calling conventions\nfor _SPI_begin_call and _SPI_end_call.  The memory context cleanup\nin the latter means that these have always had the flavor of a matched\nresource-management pair, but they weren't documented that way before.\n\nPer report from Ben Chobot.\n\nBack-patch to 9.4 where logical decoding came in.  In principle,\nthe SPI changes should go all the way back, since the problem dates\nback to commit 7ec1c5a86.  But given the lack of field complaints\nit seems few people are using internal subtransactions in this way.\nSo I don't feel a need to take any risks in 9.2/9.3.\n\nDiscussion: https://postgr.es/m/73FBA179-C68C-4540-9473-71E865408B15@silentmedia.com","distinct":false,"url":"https://api.github.com/repos/postgresql-cfbot/postgresql/commits/1518d07842dcb412ea6b8bb8172c40da7499b174"},{"sha":"39b215fe5068e7f7e6989449ec769d6ec468baff","author":{"name":"Commitfest Bot","email":"aab6a594935fe5db0d690bc154b19f642bfbe9d7@cputube.org"},"message":"[CF 15/1313] Fix bloom WAL check\n\nThis commit was automatically generated by cfbot at commitfest.cputube.org.\nIt is based on patches submitted to the PostgreSQL mailing lists and\nregistered in the PostgreSQL Commitfest application.\n\nThis branch will be overwritten each time a new patch version is posted to\nthe email thread or the master branch changes.\n\nCommitfest entry: https://commitfest.postgresql.org/15/1313\nPatch(es): https://www.postgresql.org/message-id/CAPpHfdtwOn%3Do0bACtcXrnexTmkyq%3DNoC0NzCY%2BUxCrf84CT%2B%3Dw%40mail.gmail.com\nAuthor(s): Alexander Korotkov","distinct":true,"url":"https://api.github.com/repos/postgresql-cfbot/postgresql/commits/39b215fe5068e7f7e6989449ec769d6ec468baff"}]}
{"actor":{"display_login":"postgresql-cfbot"}}