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 1pnGD9-0000ad-5p for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Apr 2023 09:59: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 1pnGD7-0000cm-V0 for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Apr 2023 09:59:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pnGD7-0000cd-JG for pgsql-hackers@lists.postgresql.org; Fri, 14 Apr 2023 09:59:17 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1pnGD4-002pPg-DF for pgsql-hackers@lists.postgresql.org; Fri, 14 Apr 2023 09:59:17 +0000 Received: by mail-wr1-x436.google.com with SMTP id r20so1104926wra.5 for ; Fri, 14 Apr 2023 02:59:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681466353; x=1684058353; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=54cbV9rBf/nWdilFMoDZTU0y04M1F50RSfrvh+aaUkU=; b=PUkYDjiJ+WwUrhHnqnCrJVzEFbxAIxnmY1DHHJPJV7N3lzJFQ21UFGx4sVXmKLT/eA VHdAuwXtPIvwnTHTGLxkbCznh6+orpkReEb6IkkgkQqmOVcvWOHEBWJIM3zNHpvTagpb gVsv7LG1X7c1GJ3tNnrxZUDYAwxsKnBvqQsQdHnuTRRwM57LQzYWoqtJT9Cp5Y7sAj0N iSs/7lpqDkJSOjgAJtGkp3sM4Hw/+AmSecl/F3KUmnCu8fEaTPhO0/mAOqGOuxF9ODN6 APRm06hJXxoE37rOG+xAWTYKbKL7oGmyjEf0KZBvf5dLXcF9AznwCmbq9ZwzEoAZ3Lik Oi1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681466353; x=1684058353; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=54cbV9rBf/nWdilFMoDZTU0y04M1F50RSfrvh+aaUkU=; b=YOs9qUZoZ/x+Qz/Gq91BP9UWpKvxKWzMOPjVWrqnKClxyy3cCj4hVzydJuPOqCNSPK jLuU3LEGJPLyPxES8X0GQ8PLwD9xhw3lSoijvL58jp2WTaNZlmVK6E1VCfmN5TgCCl4u 3Z6lkmwZYVFNuWvnsuiwSSdgy77/ES8pLf+rkZ6EWZv41oTJF50nPA3rvRKP7WQlyHYh uaMfS22cXbIBRfpk6A1IoH1qNC+HTekNMKPZNMWrDcwzX8nYunehybkKnXnISRkmceHm ADIu09BpO8tfjE2fqunPD1SKjM3cbmdLWtTfCukvyMw8kH7jhYlZNi22Z/QN+HvX72DQ +2fQ== X-Gm-Message-State: AAQBX9c8cbgf386raiZKh1gXdEEsWg+6mA23nMMLMHJgWw/9FFnwB6fQ UvBH1z7NWMpRPJcfm9QECJFLff/NbWgacx3XSuxW622MpQg= X-Google-Smtp-Source: AKy350ZN8+MMneLpcNWKp9D7jfqwcJdvDPbfjJ9jJjhFmR2yye0c+PJY2fQF5+FUwEneY/pdIwe6XbIXX52GQn1EFyY= X-Received: by 2002:a5d:5981:0:b0:2f4:1933:d5f6 with SMTP id n1-20020a5d5981000000b002f41933d5f6mr2889932wri.1.1681466352457; Fri, 14 Apr 2023 02:59:12 -0700 (PDT) MIME-Version: 1.0 References: <9ee1aca8-4678-fc71-33e6-85ee025608ee@oss.nttdata.com> In-Reply-To: <9ee1aca8-4678-fc71-33e6-85ee025608ee@oss.nttdata.com> From: Etsuro Fujita Date: Fri, 14 Apr 2023 18:59:06 +0900 Message-ID: Subject: Re: Issue in postgres_fdw causing unnecessary wait for cancel request reply To: Fujii Masao Cc: pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Apr 14, 2023 at 3:19=E2=80=AFAM Fujii Masao wrote: > On 2023/04/13 15:13, Etsuro Fujita wrote: > > I am not 100% sure that it is a good idea to use the same error > > message "could not send cancel request" for the PQgetCancel() and > > PQcancel() cases, because they are different functions. How about > > "could not create PGcancel structure=E2=80=9D or something like that, f= or the > > The primary message basically should avoid reference to implementation de= tails 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.) > > former case, so we can distinguish the former error from the latter? > > Although the primary message is the same, the supplemental message provid= es 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. Best regards, Etsuro Fujita [1] https://www.postgresql.org/docs/current/libpq-cancel.html