Re: libpq sendQuery -- getResult not returning until all queries complete

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Daniel Verite <daniel(at)manitou-mail(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: libpq sendQuery -- getResult not returning until all queries complete
Date: 2010-12-22 00:11:58
Message-ID: 8623.1292976718@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Merlin Moncure <mmoncure(at)gmail(dot)com> writes:
> On Tue, Dec 21, 2010 at 6:49 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> If you just unconditionally flush there, it will result in an extra
>> network message in the normal case where there's not another query
>> to do. The current code is designed not to flush until it sends
>> ReadyForQuery.

> yeah, I was looking at that. I don't see an easy way to test if there
> is another query waiting to execute right there. Maybe a
> documentation patch is in order :-).

dest.c doesn't have the info available. I think that to do this, we'd
need to move the responsibility for calling pq_flush out to postgres.c.
Not sure if it's worth it.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message William Gordon Rutherdale (rutherw) 2010-12-22 00:16:00 Cannot unsubscribe
Previous Message Matthias Müller 2010-12-22 00:10:22 Re: Understanding PG9.0 streaming replication feature