From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: Andrey <parihaaraka@gmail.com>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: NOTIFY does not work as expected
Date: Tue, 03 Jul 2018 14:27:04 -0400
Message-ID: <65571.1530642424@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMkU=1w68PkRCZLmX+pVc3RdWRyWuRCSw8-g4xvQNwy_1FkVtA@mail.gmail.com>
References: <CAOYf6ec-TmRYjKBXLLaGaB-jrd=mjG1Hzn1a1wufUAR39PQYhw@mail.gmail.com>
<CAMkU=1ytid9NHkLpOyu9bgLb47L34WX+KQnfU8KmQGAOAFJ_Zg@mail.gmail.com>
<64711.1530595730@sss.pgh.pa.us>
<CAMkU=1zXAuV+xW6SVpBc_q6M_h_EFxAQHpi+UFb3k2ZPZ_uO=g@mail.gmail.com>
<CAMkU=1w68PkRCZLmX+pVc3RdWRyWuRCSw8-g4xvQNwy_1FkVtA@mail.gmail.com>
Jeff Janes <jeff.janes@gmail.com> writes:
> Further diagnosis here is that in the "working" case the client receives a
> single packet from the server containing both the pg_sleep response, and
> async response, in that order, and the client processes both of them. In
> the "broken" case, the client receives a single packet from the server
> containing the pg_sleep response, and processes it, and then blocks on user
> input. The async response is immediately available in the next packet if
> the client would ask for it, but the client doesn't do so.
This suggests that 4f85fde8e introduced an extra output-flush operation
into the code path, ie it must be flushing the output buffer to the client
after ReadyForQuery and then again after emitting the Notify.
> If I am diagnosing the right problem, this still doesn't seem like a bug to
> me.
Well, it seems undesirable to me, both because it implies network traffic
inefficiency and because clients don't seem to be expecting it.
We have another recent complaint that seems to be possibly the
same thing, bug #15255.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, jeff.janes@gmail.com, parihaaraka@gmail.com
Subject: Re: NOTIFY does not work as expected
In-Reply-To: <65571.1530642424@sss.pgh.pa.us>
References: <CAOYf6ec-TmRYjKBXLLaGaB-jrd=mjG1Hzn1a1wufUAR39PQYhw@mail.gmail.com> <CAMkU=1ytid9NHkLpOyu9bgLb47L34WX+KQnfU8KmQGAOAFJ_Zg@mail.gmail.com> <64711.1530595730@sss.pgh.pa.us> <CAMkU=1zXAuV+xW6SVpBc_q6M_h_EFxAQHpi+UFb3k2ZPZ_uO=g@mail.gmail.com> <CAMkU=1w68PkRCZLmX+pVc3RdWRyWuRCSw8-g4xvQNwy_1FkVtA@mail.gmail.com> <65571.1530642424@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox