This is an automated email from the ASF dual-hosted git repository.
chenjinbao1989 pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/cbdb-postgres-merge by this
push:
new a08b0c8497d Fix position of error
a08b0c8497d is described below
commit a08b0c8497d6bfbc245cfa4c5931b3ba7c7b3509
Author: Jinbao Chen <[email protected]>
AuthorDate: Mon Oct 27 21:45:56 2025 +0800
Fix position of error
---
src/interfaces/libpq/fe-exec.c | 14 ++++++++++----
src/interfaces/libpq/fe-protocol3.c | 2 +-
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c
index e9525492d78..ea469534216 100644
--- a/src/interfaces/libpq/fe-exec.c
+++ b/src/interfaces/libpq/fe-exec.c
@@ -1413,11 +1413,9 @@ pqAppendCmdQueueEntry(PGconn *conn, PGcmdQueueEntry
*entry)
* itself consume commands from the queue; if we're in
any other
* state, we don't have to do anything.
*/
- if (conn->asyncStatus == PGASYNC_IDLE)
- {
- resetPQExpBuffer(&conn->errorMessage);
+ if (conn->asyncStatus == PGASYNC_IDLE ||
+ conn->asyncStatus == PGASYNC_PIPELINE_IDLE)
pqPipelineProcessQueue(conn);
- }
break;
}
}
@@ -3293,6 +3291,14 @@ PQsendFlushRequest(PGconn *conn)
return 0;
}
+ /*
+ * Give the data a push (in pipeline mode, only if we're past the size
+ * threshold). In nonblock mode, don't complain if we're unable to send
+ * it all; PQgetResult() will do any additional flushing needed.
+ */
+ if (pqPipelineFlush(conn) < 0)
+ return 0;
+
return 1;
}
diff --git a/src/interfaces/libpq/fe-protocol3.c
b/src/interfaces/libpq/fe-protocol3.c
index 79a17c6d5fe..b64611431bf 100644
--- a/src/interfaces/libpq/fe-protocol3.c
+++ b/src/interfaces/libpq/fe-protocol3.c
@@ -271,7 +271,7 @@ pqParseInput3(PGconn *conn)
else
{
/* Advance the command queue
and set us idle */
- pqCommandQueueAdvance(conn,
false, false);
+ pqCommandQueueAdvance(conn,
true, false);
conn->asyncStatus =
PGASYNC_IDLE;
}
break;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]