diff options
-rw-r--r-- | src/bin/pgbench/pgbench.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c index 3cafd88ac53..cc03af05447 100644 --- a/src/bin/pgbench/pgbench.c +++ b/src/bin/pgbench/pgbench.c @@ -3059,7 +3059,14 @@ commandFailed(CState *st, const char *cmd, const char *message) static void commandError(CState *st, const char *message) { - Assert(sql_script[st->use_file].commands[st->command]->type == SQL_COMMAND); + /* + * Errors should only be detected during an SQL command or the + * \endpipeline meta command. Any other case triggers an assertion + * failure. + */ + Assert(sql_script[st->use_file].commands[st->command]->type == SQL_COMMAND || + sql_script[st->use_file].commands[st->command]->meta == META_ENDPIPELINE); + pg_log_info("client %d got an error in command %d (SQL) of script %d; %s", st->id, st->command, st->use_file, message); } |