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 1pU15D-0004dn-BY for pgsql-bugs@arkaria.postgresql.org; Mon, 20 Feb 2023 07:59:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pU15C-00079l-7H for pgsql-bugs@arkaria.postgresql.org; Mon, 20 Feb 2023 07:59:34 +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 1pU15B-00079c-VT for pgsql-bugs@lists.postgresql.org; Mon, 20 Feb 2023 07:59:33 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pU159-0008Sp-TM for pgsql-bugs@lists.postgresql.org; Mon, 20 Feb 2023 07:59:33 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 864965C008B; Mon, 20 Feb 2023 02:59:30 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 20 Feb 2023 02:59:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1676879970; x=1676966370; bh=tXoYTcefQT CxaXVyWMmXAdpNET5f2l0233hO3SS6GGk=; b=fV2d49m7cEbZnWQPM5d8ST0Qae zBLrmH8fkTtOKVV6Da4W5xxiP4FnYW+M0LZlPnD2hCGD/p5YaZOu/NMh7jv5/lXQ +yxkG/Nu10fQfkmKaf8HU0Yw/TiOqhDV0PvvVzXlDD3CUFICN3DSPUfNRdJn8H05 3lJfG5kakpJ6uUEysqmlYv3hT08OkdDskt65b6hRV9A5BIonr5QCRCm6TKvLiV0K ATi1+XvlgufKPznKZfaiPcDNQUVyoIf9FNzxcN2OU4zf5Myczz7M1s/oVhv1INIg m8TVrKXUqbT0sTrWQgi4uE9Tyb4xomrlVBgesWWsaSZJ7eiLO5x6eeqagRtQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1676879970; x=1676966370; bh=tXoYTcefQTCxaXVyWMmXAdpNET5f 2l0233hO3SS6GGk=; b=Nr66DzfjKB/gusHoLEd5S2dKOYWV4TROyQAF5+gg7JFz On1ZHF21h8Qo386cZLB9MvyfJ65E2UEPYKoxJ3xHLzfOtSPcwJlZNYzHfh+DnjDz M4Uw48GLD1Dhyq8CoBq0QqNrn/hptCvYW6086STybciv07UsQ73f+56KAe95Hj2a Pthxe7IYr8u+CA7k1IP7rnm6Zv08trDBozrN0gZbrD3n+QWZVUxKfgZ2atFUjbqz tPKCE0IifEInVM4K5fqHhGpG77omj/sZdxQzhVRwt3aS3R78kL90tewI4kabLHJq eEQL1/mNixXaREcEoZn9I3xcPutv/91XMjAkbUtRgg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudejgedgudduvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdejtddmnecujfgurhepff fhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcurfgr qhhuihgvrhcuoehmihgthhgrvghlsehprghquhhivghrrdighiiiqeenucggtffrrghtth gvrhhnpeetleeifedufffhhfdtteelgeeggeffhfekueevteeigfduudevudetgfegiedv jeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmih gthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 20 Feb 2023 02:59:28 -0500 (EST) Date: Mon, 20 Feb 2023 16:59:25 +0900 From: Michael Paquier To: Kyotaro Horiguchi Cc: sawada.mshk@gmail.com, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17789: process_pgfdw_appname() fails for autovacuum workers Message-ID: References: <17789-8b31c5a4672b74d9@postgresql.org> <20230214.140544.79456937383215325.horikyota.ntt@gmail.com> <20230215.161254.1131534874642120926.horikyota.ntt@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="GCOqrqKQbmQk5N1l" Content-Disposition: inline In-Reply-To: <20230215.161254.1131534874642120926.horikyota.ntt@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --GCOqrqKQbmQk5N1l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Feb 15, 2023 at 04:12:54PM +0900, Kyotaro Horiguchi wrote: > By the way, when we designed that part, we first concluded that the > user name and database name cannot be NULL before we later concluded > that MyProcPort cannot be NULL. However, log_status_format() takes > into account the case where MyProcPort stores NULL as user and > database names. Do you think we should still ignore the case of NULL > user name and database names, even though our assumption about > MyProcPort was found to be incorrect? In that case, > log_status_format() replaces, for example, %u with '[unknown]'. Hmm. I think that I would play it safe but consistent here for %d and %u as this code could be triggered in various contexts as far as I understand: - When MyProcPort is NULL, insert no data, because there is nothing to report. - When MyProcPort is not NULL but the %d or %u field is NULL, use [unknown], because we just don't know what to show up, still there is a MyProcPort. This has the advantage to be able to make the difference in both cases, which could be important for the end-user depending on the context where the code is run. -- Michael --GCOqrqKQbmQk5N1l Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmPzKF0ACgkQnvQgOdby QH0cKQ/9Fvhm0IEFIvimtI3VrCqkSER+5RtlvqppiEYUCvkAOcPzhYx4ljcBFme8 aqjrKSZWjm3RrKxjY9ElHvIFomdV8CG8p3GO4J1QpEDzaYClNLji+bP4a1B7ZXgD V9Sr1gYWREdwY3ecng5tdwLnj9rd6OGMeHIysBD0j36A01EJCbemVeIOz+OTinYE xxyMoRsvpw2w8+QiA69XuhP2+wc899R1DqkuRc4a1AQKJwRE90j+ccIjVXn6uziC L+XyvVxADFOgOpd1SmBwtrALmWm+WF5oI+ZlDbPsPUBc544Bm9+0rs8gBqmkM8go XiQhBGOXcEzES+omkMF/7jkXofP9HR8cs5vWKwIatpaJQo/0q8Y8fCgO8qMwhifU qZryxNpY4/zk4qa6UXDhsGT5sik4gk3dMfnErcCsQeM8N5EjMp3Yd3R6e+iPYCg4 5CvB2ieGDvTquwy1bPULZdsH4Tcc4CDb+urmDIKvi1qFN6+hRmWxu36QoENVghLB /XOgT9/W/3Oruq9jBJKr4Vrsic9vpfTk2ljkW7zTcEBULpfxcUQxnkYunKQDDSz1 i1MDTcTyPxGYWFpHNcxpXNGMhp2YrMS25OPPVZ3+KDtOfhDgEPOkTZRtmtNWxe7f Mi5Pr8Zh2WMFliQbqvihxLpW53L9tQrv5BPUC9owIsU/QFgbonU= =G/oJ -----END PGP SIGNATURE----- --GCOqrqKQbmQk5N1l--