pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Boris Kolpackov <boris@codesynthesis.com>
To: Alvaro Herrera <alvaro.herrera@2ndquadrant.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Pipeline mode and PQpipelineSync()
Date: Fri, 25 Jun 2021 09:13:53 +0200
Message-ID: <boris.20210625091052@codesynthesis.com> (raw)
In-Reply-To: <202106242232.vpewlschvxfv@alvherre.pgsql>
References: <boris.20210623100839@codesynthesis.com>
	<202106242232.vpewlschvxfv@alvherre.pgsql>

Alvaro Herrera <alvaro.herrera@2ndquadrant.com> writes:

> IIUC the problem is that PQgetResult is indeed not prepared to deal with
> a result the first time until after the queue has been "prepared", and
> this happens on calling PQpipelineSync.  But I think the formulation in
> the attached patch works too, and the resulting code is less surprising.
> 
> I wrote a test case that works as you describe, and indeed with the
> original code it gets a NULL initially; that disappears with the
> attached patch.  Can you give it a try?

Yes, I can confirm this appears to have addressed the first issue,
thanks! The second issue [1], however, is still there even with
this patch.

[1] https://www.postgresql.org/message-id/boris.20210624103805%40codesynthesis.com





view thread (41+ messages)  latest in thread

Message-ID: <boris.20210625091052@codesynthesis.com>
Permalink:  ../boris.20210625091052@codesynthesis.com/
Also on:    postgresql.org/message-id/boris.20210625091052@codesynthesis.com

 · 

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: pgsql-hackers@postgresql.org
  Cc: boris@codesynthesis.com, alvaro.herrera@2ndquadrant.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Pipeline mode and PQpipelineSync()
  In-Reply-To: <boris.20210625091052@codesynthesis.com>

* 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