Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pnKPT-0006PC-RI for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Apr 2023 14:28:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pnKPS-00048q-Np for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Apr 2023 14:28:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pnKPS-00048c-E3 for pgsql-hackers@lists.postgresql.org; Fri, 14 Apr 2023 14:28:18 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pnKPP-0001Uv-NT for pgsql-hackers@lists.postgresql.org; Fri, 14 Apr 2023 14:28:17 +0000 Received: from [192.168.11.8] (p3342141-ipngn9201funabasi.chiba.ocn.ne.jp [180.15.124.141]) by oss.nttdata.com (Postfix) with ESMTPSA id 5BB966098F; Fri, 14 Apr 2023 23:28:12 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at oss.nttdata.com Message-ID: <67cad2e7-f9c1-5eb0-a0be-99fd78571906@oss.nttdata.com> Date: Fri, 14 Apr 2023 23:28:11 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: Issue in postgres_fdw causing unnecessary wait for cancel request reply Content-Language: en-US To: Etsuro Fujita Cc: pgsql-hackers@lists.postgresql.org References: <9ee1aca8-4678-fc71-33e6-85ee025608ee@oss.nttdata.com> From: Fujii Masao In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023/04/14 18:59, Etsuro Fujita wrote: >> The primary message basically should avoid reference to implementation details such as specific structure names like PGcancel, shouldn't it, as per the error message style guide? > > I do not think that PGcancel is that specific, as it is described in > the user-facing documentation [1]. (In addition, the error message I > proposed was created by copying the existing error message "could not > create OpenSSL BIO structure" in contrib/sslinfo.c.) I think that mentioning PGcancel in the error message could be confusing for average users who are just running a query on a foreign table and encounter the error message after pressing Ctrl-C. They may not understand why the PGcancel struct is referenced in the error message while accessing foreign tables. It could be viewed as an internal detail that is not necessary for the user to know. >> Although the primary message is the same, the supplemental message provides additional context that can help distinguish which function is reporting the message. > > If the user is familiar with the PQgetCancel/PQcancel internals, this > is true, but if not, I do not think this is always true. Consider > this error message, for example: > > 2023-04-14 17:48:55.862 JST [24344] WARNING: could not send cancel > request: invalid integer value "99999999999" for connection option > "keepalives" > > It would be hard for users without the knowledge about those internals > to distinguish that from this message. For average users, I think it > would be good to use a more distinguishable error message. In this case, I believe that they should be able to understand that an invalid integer value "99999999999" was specified in the "keepalives" connection option, which caused the warning message. Then, they would need to check the setting of the "keepalives" option and correct it if necessary. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION