[pgpool-general: 7774] Re: problem connecting to backend
Tatsuo Ishii
ishii at sraoss.co.jp
Tue Oct 12 15:28:00 JST 2021
> also I think you missed a line in your patch
>
> this part ...
> @@ -108,6 +110,7 @@ psprintf(const char *fmt,...)
> size_t
> pvsnprintf(char *buf, size_t len, const char *fmt, va_list args)
> {
> + int save_errno = errno;
> int nprinted;
>
> Assert(len > 0);
>
>
> should be
>
> @@ -108,6 +110,7 @@ psprintf(const char *fmt,...)
> size_t
> pvsnprintf(char *buf, size_t len, const char *fmt, va_list args)
> {
> + int save_errno = errno;
> int nprinted;
> *- errno = 0*
> Assert(len > 0);
I think this should be left as it is. Because the code wants to detect
if vsnprintf() set something to errno or not.
/*
* If vsnprintf reports an error other than ENOMEM, fail. The possible
* causes of this are not user-facing errors, so elog should be enough.
*/
if (nprinted < 0 && errno != 0 && errno != ENOMEM)
{
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp
More information about the pgpool-general
mailing list