Oliver Jowett wrote:
> This is equivalent to asking "Does the server deliver all
> notifications before sending ReadyForQuery in response to Sync
> after the commit command?". The last thing the driver processes
> from the server before returning from commit() is the RFQ message.
Tom Lane wrote:
> The backend will deliver all such notifies after returning the
> COMMIT's command-complete response message, but before it delivers
> ReadyForQuery. If JDBC waits for ReadyForQuery before believing
> the operation is complete, you should see them reliably.
Good news! Many thanks to both of you!
> I believe that the situation for incoming notifies from other
> sessions is a bit less predictable, though --- it looks like those
> can get sent *after* ReadyForQuery, even if they arrived
> beforehand.
Thanks, I'll keep that in mind. The immediate issue was regarding
self-notification; knowing we can rely on that keep things simple for
us there. I would expect inter-session messaging to be less
deterministic. I'm sure we can make that work as long as we don't
make the wrong assumptions.
-Kevin