Re: Using PQexecQuery in pipeline mode produces unexpected Close messages
Kyotaro Horiguchi <horikyota.ntt@gmail.com>
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: alvherre@alvh.no-ip.org
Cc: tgl@sss.pgh.pa.us, daniele.varrazzo@gmail.com,
pgsql-hackers@lists.postgresql.org
Date: 2022-07-06T01:05:04Z
Lists: pgsql-bugs, pgsql-hackers
At Mon, 4 Jul 2022 10:49:33 +0200, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote in > > Mmm. My patch moves the point of failure of the scenario a bit but > > still a little short. However, as my understanding, it seems like the > > task of the PQpipelineSync()-PQgetResult() pair to consume the > > CloseComplete. If Iinserted PQpipelineSync() just after PQsendQuery() > > and called PQgetResult() for PGRES_PIPELINE_SYNC before > > PQexitPipelineMode(), the out-of-sync CloseComplete is not seen in the > > scenario. But if it is right, I'd like to complain about the > > obscure-but-stiff protocol of pipleline mode.. > > Yeah, if you introduce PQpipelineSync then I think it'll work okay, but > my point here was to make it work without requiring that; that's why I > wrote the test to use PQsendFlushRequest instead. A bit too late, but it is good to make state-transition simpler. -- Kyotaro Horiguchi NTT Open Source Software Center
Commits
-
001_libpq_pipeline.pl: use Test::Differences if available
- 87e4f24d8293 16.0 landed
-
libpq: Improve idle state handling in pipeline mode
- 93cf9233cd54 15.0 landed
- 7c1f42612384 14.5 landed
- 054325c5eeb3 16.0 landed