Re: Pipeline mode and PQpipelineSync()
Boris Kolpackov <boris@codesynthesis.com>
From: Boris Kolpackov <boris@codesynthesis.com>
To: Alvaro Herrera <alvaro.herrera@2ndquadrant.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2021-06-25T07:13:53Z
Lists: pgsql-hackers
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
Commits
-
libpq: Fix sending queries in pipeline aborted state
- ab0967942900 15.0 landed
- 1beaa654da61 14.0 landed
-
Fix libpq state machine in pipeline mode
- b71a9cb31e46 15.0 landed
- 690339fcd587 14.0 landed
-
Add PQsendFlushRequest to libpq
- a7192326c74d 15.0 landed
- 69cf1d5429d4 14.0 landed