On Fri, Apr 09, 2021 at 08:47:07AM +0200, Fabien COELHO wrote: > Yep, it looks much better. I found it strange that the later did a reset but > was not doing the set. > > Attached v2 does as you suggest.
Close enough. I was thinking about this position of the attached, which is more consistent with the rest. -- Michael
diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c
index 028a357991..f289f05843 100644
--- a/src/bin/psql/common.c
+++ b/src/bin/psql/common.c
@@ -1117,7 +1117,6 @@ SendQueryAndProcessResults(const char *query, double *pelapsed_msec, bool is_wat
INSTR_TIME_SET_CURRENT(before);
success = PQsendQuery(pset.db, query);
- ResetCancelConn();
if (!success)
{
@@ -1382,6 +1381,7 @@ SendQuery(const char *query)
{
/* Default fetch-it-all-and-print mode */
int res = SendQueryAndProcessResults(query, &elapsed_msec, false);
+ ResetCancelConn();
OK = (res >= 0);
results = NULL;
}
signature.asc
Description: PGP signature
