pgsql: Adjust interaction of libpq pipeline mode with errorMessage rese

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Adjust interaction of libpq pipeline mode with errorMessage rese
Дата
Msg-id E1nOiw0-000JLj-LL@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Adjust interaction of libpq pipeline mode with errorMessage resets.

Since commit ffa2e4670, libpq resets conn->errorMessage only when
starting a new query.  However, the later introduction of pipelining
requires a further refinement: the "start of query" isn't necessarily
when it's submitted to PQsendQueryStart.  If we clear at that point
then we risk dropping text for an error that the application has not
noticed yet.  Instead, when queuing a query while a previous query is
still in flight, leave errorMessage alone; reset it when we begin
to process the next query in pqPipelineProcessQueue.

Perhaps this should be back-patched to v14 where ffa2e4670 came in.
However I'm uncertain about whether it interacts with 618c16707.
In the absence of user complaints, leave v14 alone.

Discussion: https://postgr.es/m/1421785.1645723238@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b15f254466aefbabcbed001929f6e09db59fd158

Modified Files
--------------
src/interfaces/libpq/fe-exec.c | 51 ++++++++++++++++++++++++++----------------
1 file changed, 32 insertions(+), 19 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Improve some psql test code
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix SPI's handling of errors during transaction commit.