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: Ben Chobot <bench@silentmedia.com>
Cc: Andres Freund <andres@anarazel.de>, Michael Paquier <michael.paquier@gmail.com>, PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Date: 2017-10-06T23:21:10Z
Lists: pgsql-bugs
I wrote:
> I thought of a better way, as attached.

Pushed.  Ben, could you confirm that the committed patch fixes your
original use-case?  The 9.5 version of the patch is at

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=13d2ed921035f2d88adf87d796373e920bdd56ee

			regards, tom lane


Commits

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