Re: BUG #15293: Stored Procedure Triggered by Logical Replication is Unable to use Notification Events

Sergey Fedchenko <seregayoga@bk.ru>

From: Sergey Fedchenko <seregayoga@bk.ru>
To: Daniel Danzberger <daniel@dd-wrt.com>
Cc: Andres Freund <andres@anarazel.de>, Tom Lane <tgl@sss.pgh.pa.us>, Sergei Kornilov <sk@zsrv.org>, pgsql-hackers@postgresql.org, Peter Eisentraut <peter_e@gmx.net>, Marc Dean <marc.dean.jr@gmail.com>, Petr Jelinek <petr@2ndquadrant.com>, michael.paul.powers@gmail.com <michael.paul.powers@gmail.com>, pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>, Alvaro Herrera <alvherre@2ndquadrant.com>, Robert Welin <robert@vaion.com>
Date: 2021-06-14T11:17:24Z
Lists: pgsql-bugs, pgsql-hackers
Hi all! I still can reproduce it on 14beta1 version. I adapted a patch I found in this thread  https://github.com/seregayoga/postgres/commit/338bc33f2cf77edde7c45bfdfb9f39a92ec57eb8 . It solved this bug for me (tested with simple Go program using  https://github.com/lib/pq ). It would be nice to have this bug fixed. I’m not so familiar with postgres code base, but would glad to help with testing.

  
>Monday, June 14, 2021 12:39 PM +03:00 from Daniel Danzberger < daniel@dd-wrt.com >:
> 
>On Fri, 2019-06-28 at 17:22 -0400, Alvaro Herrera wrote:
>> On 2019-Feb-22, Robert Welin wrote:
>>
>> > I have reproduced this bug on PostgreSQL version 10.7 and 11.2
>> > using the
>> > steps described in Michael Powers' original report. The issue also
>> > still
>> > seems to be present even with the patch provided by Sergei
>> > Kornilov.
>> >
>> > Are there plans to address this issue any time soon or is there
>> > some way
>> > I can assist in fixing it? It would be great to have notifications
>> > from
>> > logical replication.
>>
>> This issue seems largely forgotten about :-(
>>
>Are there any news to this issue ?
>I can reproduce this bug up to now with version 12.
>
>--
>Regards
>
>Daniel Danzberger
>embeDD GmbH, Alter Postplatz 2, CH-6370 Stans
>
>
>
>  
 
 
Best regards, Sergey Fedchenko.
 
 

Commits

  1. Disallow LISTEN in background workers.

  2. Send NOTIFY signals during CommitTransaction.

  3. Make some efficiency improvements in LISTEN/NOTIFY.