From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tim Allen <tim@proximity.com.au>
Cc: pgsql-interfaces@hub.org
Subject: Re: [INTERFACES] Peculiar behaviour in libpq
Date: Thu, 24 Jun 1999 11:00:28 -0400
Message-ID: <23194.930236428@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.10.9906241349250.24932-100000@bee.proximity.com.au>
Tim Allen <tim@proximity.com.au> writes:
> I've noticed some strange behaviour when using libpq with
> PostgreSQL 6.4.2 on RedHat Linux 5.1. I'm using libpq asynchronously, with
> a select() loop, calling PQconsumeInput etc. What is happening is that
> occasionally, after I have received a callback via select() and processed
> the result, I get an extra callback. These extra callbacks have no result
> attached to them, PQisBusy() returns false, and, by the records I'm
> keeping in my own program, there is no database operation pending (ie I
> already have a result for every operation I've submitted).
Hmm. Could be that the terminating ReadyForQuery message ('Z') is
arriving in a separate packet from the last message of the query
response proper --- but that doesn't seem real probable. Other
possibilities are that backend NOTIFY or NOTICE messages are arriving;
but if you were using NOTIFY you'd know it, and NOTICEs ought to show
up on stderr (unless you've suppressed that).
If you really care, you could instrument the low-level guts of libpq
to see what is arriving when (the routines in fe-misc.c would be the
place to put debug logging).
> Will it go away in 6.5? On the whole it seems reasonably benign, I just
> worry there may be something bad going on that will bite me eventually.
Yeah, it seems worth understanding at least. I'm pretty sure 6.5 will
behave the same, since nothing much has changed in the BE/FE protocol.
I'd be interested to know what you find out, if you pursue it.
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 using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: tgl@sss.pgh.pa.us, tim@proximity.com.au, pgsql-interfaces@hub.org
Subject: Re: [INTERFACES] Peculiar behaviour in libpq
In-Reply-To: <23194.930236428@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