pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Samuel Williams <space.ship.traveller@gmail.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: libpq pipelineing
Date: Sat, 27 Jun 2020 10:40:22 -0400
Message-ID: <70948.1593268822@sss.pgh.pa.us> (raw)
In-Reply-To: <CAHkN8V_s+KmSr3gH4YaGrKWJZRRHWKXS6ZjYBUYG1RLE21eLjQ@mail.gmail.com>
References: <CAHkN8V9fUtbcRA1wgSUFbPAPRZyLAN8Ps=iofvVs-9ATsGrB-Q@mail.gmail.com>
	<CAKFQuwZtD7Ne6ANiOgCa40YhPBEhDcDMo8nK8TuR3LKUxbjnjA@mail.gmail.com>
	<CAHkN8V-UKjv0z6Qr_Wf9hWmGy1uk2a1DLp5jjrjqMvY1GF18uA@mail.gmail.com>
	<CAKFQuwaHGskQbx0RfARhDAmSLhZ6FmxD=5AG-1A0hT8n0tSRCA@mail.gmail.com>
	<CAHkN8V-hVUESfNOgkT8WCcJfn_Ce-imasiAcVs0uePVkK=RMNw@mail.gmail.com>
	<CAKFQuwYV7fx9iGNc5JDNnmEY7pOqXpqxgGx70_vvmBC0tJvfLw@mail.gmail.com>
	<CAHkN8V_s+KmSr3gH4YaGrKWJZRRHWKXS6ZjYBUYG1RLE21eLjQ@mail.gmail.com>

Samuel Williams <space.ship.traveller@gmail.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





view thread (14+ messages)  latest in thread

Message-ID: <70948.1593268822@sss.pgh.pa.us>
Permalink:  ../70948.1593268822@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/70948.1593268822@sss.pgh.pa.us

 · 

reply

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-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, space.ship.traveller@gmail.com, david.g.johnston@gmail.com
  Subject: Re: libpq pipelineing
  In-Reply-To: <70948.1593268822@sss.pgh.pa.us>
  References: <CAHkN8V9fUtbcRA1wgSUFbPAPRZyLAN8Ps=iofvVs-9ATsGrB-Q@mail.gmail.com> <CAKFQuwZtD7Ne6ANiOgCa40YhPBEhDcDMo8nK8TuR3LKUxbjnjA@mail.gmail.com> <CAHkN8V-UKjv0z6Qr_Wf9hWmGy1uk2a1DLp5jjrjqMvY1GF18uA@mail.gmail.com> <CAKFQuwaHGskQbx0RfARhDAmSLhZ6FmxD=5AG-1A0hT8n0tSRCA@mail.gmail.com> <CAHkN8V-hVUESfNOgkT8WCcJfn_Ce-imasiAcVs0uePVkK=RMNw@mail.gmail.com> <CAKFQuwYV7fx9iGNc5JDNnmEY7pOqXpqxgGx70_vvmBC0tJvfLw@mail.gmail.com> <CAHkN8V_s+KmSr3gH4YaGrKWJZRRHWKXS6ZjYBUYG1RLE21eLjQ@mail.gmail.com> <70948.1593268822@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