From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Sergei Kornilov <sk(at)zsrv(dot)org>, pgsql-hackers(at)postgresql(dot)org, Peter Eisentraut <peter_e(at)gmx(dot)net>, Marc Dean <marc(dot)dean(dot)jr(at)gmail(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, "michael(dot)paul(dot)powers(at)gmail(dot)com" <michael(dot)paul(dot)powers(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: BUG #15293: Stored Procedure Triggered by Logical Replication is Unable to use Notification Events |
Date: | 2018-07-24 21:43:30 |
Message-ID: | 13844.1532468610@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
Andres Freund <andres(at)anarazel(dot)de> writes:
> But I wonder if we shouldn't actually move the signalling part of
> ProcessCompletedNotifies() into CommitTransactionCommand() in v11. Given
> that transactions can now commit without a ready command being sent, due
> to the addition of procedures, that kind of seems necessary?
Hrm. I have a nasty feeling that that code is dependent on being executed
at the outermost logic level. In particular, ProcessCompletedNotifies
calls CommitTransactionCommand itself, so your proposal will create
infinite recursion. There may be some other issues too.
Another question that needs consideration is whether an internal commit
should lead to immediate distribution of notifies to our own client.
I think it probably mustn't; from the standpoint of the client, its
originally-asked-for xact is still in progress, and it's not going to
expect any notifies until that ends. So the proposed change is just
wrong if you ask me.
I agree we need some serious rethinking here. Maybe the fix will end
up being just a few lines, but it might take significant restructuring
too.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2018-07-24 21:56:04 | Re: BUG #15293: Stored Procedure Triggered by Logical Replication is Unable to use Notification Events |
Previous Message | Michael Powers | 2018-07-24 19:33:36 | Re: BUG #15293: Stored Procedure Triggered by Logical Replication is Unable to use Notification Events |
From | Date | Subject | |
---|---|---|---|
Next Message | matshyeq | 2018-07-24 21:51:46 | Re: Enhancement request: enable FIRST/LAST_value() also as a regular aggregate (not only as windowing function) |
Previous Message | Vik Fearing | 2018-07-24 21:34:15 | Re: 11beta crash/assert caused by parameter type changes |