Re: Timing of notice delivery

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Timing of notice delivery
Date: 2011-02-02 00:49:12
Message-ID: 4D4855A8020000250003A15A@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Hugo Garza 2011-02-02 17:03:08 Re: My query table aliases don't exist in my application
Previous Message Tom Lane 2011-02-02 00:31:50 Re: Timing of notice delivery