public inbox for [email protected]
help / color / mirror / Atom feedFrom: Daniel Frey <[email protected]>
To: pgsql-general <[email protected]>
Subject: Pipeline Mode vs Single Row Mode / Chunked Rows Mode
Date: Thu, 19 Dec 2024 15:36:49 +0100
Message-ID: <[email protected]> (raw)
Hi,
I'm adding support for Pipeline Mode to my C++ PostgreSQL client library (https://github.com/taocpp/taopq) and I tried to understand the interaction between Pipeline Mode and Single Row Mode / Chunked Rows Mode. It seems that it works sometimes, but I don't get the feeling that it was deliberately designed to work consistently. Example:
* Consider a table with three rows of data
* I send two (identical) SELECT commands, e.g. "SELECT * FROM test_table"
* I call PQpipelineSync()
* I call PQsetSingleRowMode()
* I read the results, I get
* One result with size 1
* Another one with size 1
* Another one with size 1
* A final one with size 0 for the first select
* A result with size 3 for the second select
* A result with PGRES_PIPELINE_SYNC
When I try to call PQsetSingleRowMode() for the second SELECT, it fails.
It also seems weird that I can call it for the first result after the sync call, but maybe that's OK?
Anyway, is there some documentation about how these modes interact and how they can be combined? Or should they never be combined?
-Daniel
view thread (4+ messages) latest in thread
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Pipeline Mode vs Single Row Mode / Chunked Rows Mode
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox