Re: BUG #15293: Stored Procedure Triggered by Logical Replication is Unable to use Notification Events
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Artur Zakirov <artur.zakirov@adjust.com>
Cc: Sergey Fedchenko <seregayoga@bk.ru>,
Daniel Danzberger <daniel@dd-wrt.com>,
Andres Freund <andres@anarazel.de>, 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>,
Alvaro Herrera <alvherre@2ndquadrant.com>,
Robert Welin <robert@vaion.com>
Date: 2021-09-14T21:56:58Z
Lists: pgsql-bugs, pgsql-hackers
Attachments
- forbid-LISTEN-in-background.patch (text/x-diff) patch
I wrote: > Hence, I present the attached, which also tweaks things to avoid an > extra pq_flush in the end-of-command code path, and improves the > comments to discuss the issue of NOTIFYs sent by procedures. Hearing no comments, I pushed that. > I'm inclined to think we should flat-out reject LISTEN in any process > that is not attached to a frontend, at least until somebody takes the > trouble to add infrastructure that would let it be useful. I've not > done that here though; I'm not quite sure what we should test for. After a bit of looking around, it seems that MyBackendType addresses that problem nicely, so I propose the attached. regards, tom lane
Commits
-
Disallow LISTEN in background workers.
- e06cc024bd33 13.5 landed
- d84d62b6225b 14.0 landed
- 1316be28664f 15.0 landed
-
Send NOTIFY signals during CommitTransaction.
- 63f28776cb9f 13.5 landed
- 2e4eae87d02f 15.0 landed
- 0eff10a00844 14.0 landed
-
Make some efficiency improvements in LISTEN/NOTIFY.
- 51004c7172b5 13.0 cited