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-21 23:49:03
Message-ID: 8224.1292975343@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:
> hm, a pq_flush() after command completion putmessage in
> backend/tcop/dest.c seems to fix the problem. I'll send up a patch to
> -hackers. They might backpatch it, unless there is a good reason not
> to do this (I can't think of any).

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.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2010-12-22 00:02:22 Re: plpython returns integer[] fails for multi-dimensional array
Previous Message Adrian Klaver 2010-12-21 23:32:44 Re: plpython returns integer[] fails for multi-dimensional array