Re: libpq pipelineing

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Samuel Williams <space(dot)ship(dot)traveller(at)gmail(dot)com>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: libpq pipelineing
Date: 2020-06-27 14:40:22
Message-ID: 70948.1593268822@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Samuel Williams <space(dot)ship(dot)traveller(at)gmail(dot)com> writes:
> Here is a short example:
> https://gist.github.com/ioquatix/2f08f78699418f65971035785c80cf18
> It makes 10 queries in one "PQsendQuery" and sets single row mode. But
> all the results come back at once as shown by the timestamps.

That looks to be less about what libpq will do than what the Ruby
interface code will do.

The volume of return data may also be an issue. I don't think the
backend will flush data out to the client except when it (a) reaches
an idle state or (b) fills the output buffer. Ten occurrences of
a short query result aren't gonna be enough for (b) --- from memory,
that buffer is probably 8KB.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matthias Apitz 2020-06-27 17:52:29 Re: error messages (autovaccum canceled and syntax errors) while loading a DUMP
Previous Message Brajendra Pratap Singh 2020-06-27 14:24:33 Fwd: BUG #16513: Postgresql HA Cluster