Skip to content

Commit 0bc1e7d

Browse files
committed
Print more detailed eror code
1 parent c03d1e5 commit 0bc1e7d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

contrib/multimaster/multimaster.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,11 @@ mm_stop_replication(PG_FUNCTION_ARGS)
12021202
static bool MMRunUtilityStmt(PGconn* conn, char const* sql)
12031203
{
12041204
PGresult *result = PQexec(conn, sql);
1205-
bool ret = PQresultStatus(result) == PGRES_COMMAND_OK;
1205+
int status = PQresultStatus(result);
1206+
bool ret = status == PGRES_COMMAND_OK;
1207+
if (!ret) {
1208+
elog(WARNING, "Command '%s' failed with status %d", sql, status);
1209+
}
12061210
PQclear(result);
12071211
return ret;
12081212
}

contrib/multimaster/tests/perf.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
- name: run transfers
4747
shell: >
4848
~/pg_cluster/install/bin/dtmbench {{connections}}
49-
-w {{ nconns }} -r 1 -n 5000 -a 500000 -p {{ up }} |
49+
-w {{ nconns }} -r 0 -n 100000 -a 500000 -p {{ up }} |
5050
tee -a perf.results |
5151
sed "s/^/`hostname`:/"
5252
register: transfers_result

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy