Re: Pipeline mode and PQpipelineSync()

From: Boris Kolpackov <boris(at)codesynthesis(dot)com>
To: Alvaro Herrera <alvaro(dot)herrera(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Pipeline mode and PQpipelineSync()
Date: 2021-06-25 07:13:53
Message-ID: boris.20210625091052@codesynthesis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvaro(dot)herrera(at)2ndquadrant(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2021-06-25 07:31:17 Re: pglz compression performance, take two
Previous Message Guillaume Lelarge 2021-06-25 07:02:48 Re: Weird use of parentheses in the manual