pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: libpq: Reset singlerow flag correctly in pipeline mode 3+ messages / 1 participants [nested] [flat]
* pgsql: libpq: Reset singlerow flag correctly in pipeline mode @ 2022-10-14 17:08 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 3+ messages in thread From: Alvaro Herrera @ 2022-10-14 17:08 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org libpq: Reset singlerow flag correctly in pipeline mode When a query whose results were requested in single-row mode is the last in the queue by the time those results are being read, the single-row flag was not being reset, because we were returning early from pqPipelineProcessQueue. Move that stanza up so that the flag is always reset at the end of sending that query's results. Add a test for the situation. Backpatch to 14. Author: Denis Laxalde <denis.laxalde@dalibo.com> Discussion: https://postgr.es/m/01af18c5-dacc-a8c8-07ee-aecc7650c3e8@dalibo.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/db1b931a4ee885ebd27bb5b335c1e461ccc34bbe Modified Files -------------- src/interfaces/libpq/fe-exec.c | 12 +++--- src/test/modules/libpq_pipeline/libpq_pipeline.c | 45 +++++++++++++++++++++- .../modules/libpq_pipeline/traces/singlerow.trace | 20 ++++++++++ 3 files changed, 70 insertions(+), 7 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: libpq: Reset singlerow flag correctly in pipeline mode @ 2022-10-14 17:08 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 3+ messages in thread From: Alvaro Herrera @ 2022-10-14 17:08 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org libpq: Reset singlerow flag correctly in pipeline mode When a query whose results were requested in single-row mode is the last in the queue by the time those results are being read, the single-row flag was not being reset, because we were returning early from pqPipelineProcessQueue. Move that stanza up so that the flag is always reset at the end of sending that query's results. Add a test for the situation. Backpatch to 14. Author: Denis Laxalde <denis.laxalde@dalibo.com> Discussion: https://postgr.es/m/01af18c5-dacc-a8c8-07ee-aecc7650c3e8@dalibo.com Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/27ca0bce5f41cecc3b219cc9d675239a79d7562a Modified Files -------------- src/interfaces/libpq/fe-exec.c | 12 +++--- src/test/modules/libpq_pipeline/libpq_pipeline.c | 45 +++++++++++++++++++++- .../modules/libpq_pipeline/traces/singlerow.trace | 20 ++++++++++ 3 files changed, 70 insertions(+), 7 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: libpq: Reset singlerow flag correctly in pipeline mode @ 2022-10-14 17:08 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 3+ messages in thread From: Alvaro Herrera @ 2022-10-14 17:08 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org libpq: Reset singlerow flag correctly in pipeline mode When a query whose results were requested in single-row mode is the last in the queue by the time those results are being read, the single-row flag was not being reset, because we were returning early from pqPipelineProcessQueue. Move that stanza up so that the flag is always reset at the end of sending that query's results. Add a test for the situation. Backpatch to 14. Author: Denis Laxalde <denis.laxalde@dalibo.com> Discussion: https://postgr.es/m/01af18c5-dacc-a8c8-07ee-aecc7650c3e8@dalibo.com Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b8af4166ff96af9c7bed1b511d0356284a8b7766 Modified Files -------------- src/interfaces/libpq/fe-exec.c | 12 +++--- src/test/modules/libpq_pipeline/libpq_pipeline.c | 45 +++++++++++++++++++++- .../modules/libpq_pipeline/traces/singlerow.trace | 20 ++++++++++ 3 files changed, 70 insertions(+), 7 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2022-10-14 17:08 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-10-14 17:08 pgsql: libpq: Reset singlerow flag correctly in pipeline mode Alvaro Herrera <alvherre@alvh.no-ip.org> 2022-10-14 17:08 pgsql: libpq: Reset singlerow flag correctly in pipeline mode Alvaro Herrera <alvherre@alvh.no-ip.org> 2022-10-14 17:08 pgsql: libpq: Reset singlerow flag correctly in pipeline mode Alvaro Herrera <alvherre@alvh.no-ip.org>
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