]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
pgbench: Correct log level of message output when socket wait method fails.
authorFujii Masao <fujii@postgresql.org>
Wed, 29 Sep 2021 11:35:00 +0000 (20:35 +0900)
committerFujii Masao <fujii@postgresql.org>
Wed, 29 Sep 2021 12:47:31 +0000 (21:47 +0900)
The failure of socket wait method like "select()" doesn't terminate pgbench.
So the log level of error message when that failure happens should be ERROR.
But previously FATAL was used in that case.

Back-patch to v13 where pgbench started using common logging API.

Author: Yugo Nagata, Fabien COELHO
Reviewed-by: Kyotaro Horiguchi, Fujii Masao
Discussion: https://postgr.es/m/20210617005934.8bd37bf72efd5f1b38e6f482@sraoss.co.jp

src/bin/pgbench/pgbench.c

index 338c0152a278a22f4433ae2794564afaaa771485..156348acfd7c9c2c1883d7819f623f3a1ecc2123 100644 (file)
@@ -6421,7 +6421,7 @@ threadRun(void *arg)
                                        continue;
                                }
                                /* must be something wrong */
-                               pg_log_fatal("%s() failed: %m", SOCKET_WAIT_METHOD);
+                               pg_log_error("%s() failed: %m", SOCKET_WAIT_METHOD);
                                goto done;
                        }
                }