Re: It would be nice to clarify is there any point in select queries pipelining

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: evgeny(dot)v(dot)smirnov(at)gmail(dot)com, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: It would be nice to clarify is there any point in select queries pipelining
Date: 2024-01-25 14:45:13
Message-ID: 9cc1005603f3d4fc8d676de77d05f1993af05848.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Thu, 2024-01-25 at 04:46 +0000, PG Doc comments form wrote:
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/16/protocol-flow.html
>
> Please consider the following exchange with a PG database (Kotlin + Reactor+
> r2dbc-postgresql):
>
> [trace of a pipelined message flow]
>
> The application code is the following (for the sake of clarity):
>
> [some Java code]
>
> I’m aware that Postgres doesn’t support cursor(portal) multiplexing so its
> impossible to fetch data for two selects simultaneously but should I make
> use of selects pipelining when I want to make the most of the DB? I mean to
> say does a single Postgres backend employs concurrent processing and its
> possible for a DB to transmit results for a query #2 (see the traffic) and
> concurrently parse/rewrite/plan/optimize the subsequent (pipelined) queries
> (issued from the same transaction). Neither chapter 55 nor 52 expand on it
> (or it’s hard to spot at least).

No, PostgreSQL is single-threaded (with the exception of parallel query execution).

Yours,
Laurenz Albe

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message David G. Johnston 2024-01-25 21:10:22 Re: SQL command : ALTER DATABASE OWNER TO
Previous Message Laurenz Albe 2024-01-25 14:35:23 Re: SQL command : ALTER DATABASE OWNER TO