Re: pg_logical_slot_peek_changes crashes postgres when called from inside pl/pgsql

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Michael Paquier <michael.paquier@gmail.com>, Ben Chobot <bench@silentmedia.com>, PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Date: 2017-10-06T01:16:26Z
Lists: pgsql-bugs
Andres Freund <andres@anarazel.de> writes:
> On 2017-10-05 19:42:30 -0400, Tom Lane wrote:
>> https://www.postgresql.org/message-id/26365.1162532453%40sss.pgh.pa.us

> Just ran this, got out-of-memory error, and then another out-of-memory
> error, ...  I wonder if we should exclude out_of_memory from OTHERS,
> like we do QUERY_CANCELED and ASSERT_FAILURE.

Nah; that presupposes that if a subquery runs out of memory then the
surrounding function is necessarily broken.  I don't buy that.

			regards, tom lane


Commits

  1. Fix crash when logical decoding is invoked from a PL function.