Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rB2cQ-009ENW-3l for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Dec 2023 00:51:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rB2cM-00Dhd3-W5 for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Dec 2023 00:51:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rB2cM-00Dhcv-MW for pgsql-hackers@lists.postgresql.org; Thu, 07 Dec 2023 00:51:54 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rB2cK-00ATV9-75 for pgsql-hackers@lists.postgresql.org; Thu, 07 Dec 2023 00:51:54 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 4FDF33200A54; Wed, 6 Dec 2023 19:51:48 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 06 Dec 2023 19:51:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type: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=1701910307; x=1701996707; bh=nh YkvEht17/QbMYZB15rTjiYA7rhCObwyU1nmYxMnC8=; b=xwRVqZuNF8bNMfq6bh HO4fPcAznVfU7+E75tZyFXQEzNP+nGyOPcY9xX9XxqIfzZywQtnloPsasMb3C6dW z0iSINPZOeWF9HWS0Rou2T01hBzWOxZ32qY3ZJxQhsy3ow+2JTUkhk6s66wx+NIl e3PgYOQFjsIf7lH3bm9QfdmnneQT6UbIf9bnniASsBh/rOyU1yKtQ8CgeE7lB1rr uqrG9shcaAKm9YGi2muv9+lpS78WjJSJQKmrzoWW0x1AwUTVOu19EcvWc8K7n+aq 6NNxVdODhQEjAq2h26xuJNRvRxKrDlf5hhuIhtCT4GVCYXItlNSu+2NtLqTBXrFl XtHQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type: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=1701910307; x=1701996707; bh=nhYkvEht17/Qb MYZB15rTjiYA7rhCObwyU1nmYxMnC8=; b=wt4nILN4BGC5c912KKF+3a7sgejhb D+Z4kOzB0R3QZF/Lm9nN3xM4Sq25MIysprVFEmv5DcszH/famhZuB+XhzyLvgWAN Ryf27gMv/cMoT4VAxz+VYY1hilMYfBdbdrIw2DRQ3JByuSIFbYLUWUE0QOQiJ0ro xBFNQ+hkRrnbCZ28ALxMt8Z7vokIyiqxe12lm7ff1qEQnO2cC60p0F1IuGC00WtE X9SlCXB3w2fCU4Sh03/SZx4F7XqfZ3SdkccASQlPP8br5QOJDk0MXGRJ0rkj6mVU ps9WMokjfS/GKiecuFm4QbnTCtLfDPvJhoG2jAIMczf7FX1HkCAAgWZuA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudekuddgvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtdorredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepffduleehgefhkeefgfeftdfh kedutddvhfdukeeggeehieekffelhfelkeehteefnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 6 Dec 2023 19:51:45 -0500 (EST) Date: Thu, 7 Dec 2023 09:51:28 +0900 From: Michael Paquier To: Euler Taveira Cc: Peter Eisentraut , Bharath Rupireddy , PostgreSQL Hackers Subject: Re: Is WAL_DEBUG related code still relevant today? Message-ID: References: <5a2e43da-0425-4fc1-9b13-19fd33123950@eisentraut.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="b2PW6KVlSNpy6TxA" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --b2PW6KVlSNpy6TxA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 06, 2023 at 09:46:09AM -0300, Euler Taveira wrote: > On Wed, Dec 6, 2023, at 8:27 AM, Peter Eisentraut wrote: >> This kind of thing could be mostly avoided if we didn't hide all the=20 >> WAL_DEBUG behind #ifdefs. >=20 > AFAICS LOCK_DEBUG also hides its GUCs behind #ifdefs. The fact that XLOG_= DEBUG > is a variable but seems like a constant surprises me. I would rename it to > XLogDebug or xlog_debug. +1. Or just wal_debug for greppability. >> in the normal case. That way, we don't need to wrap that in #ifdef=20 >> WAL_DEBUG, and the compiler can see the disabled code and make sure it= =20 >> continues to build. >=20 > I didn't check the LOCK_DEBUG code path to make sure it fits in the same > category as WAL_DEBUG. If it does, maybe it is worth to apply the same lo= gic > there. PerformWalRecovery() with its log for RM_XACT_ID is something that stresses me a bit though because this is in the main redo loop which is never free. The same can be said about GenericXLogFinish() because the extra computation happens while holding a buffer and marking it dirty. The ones in xlog.c are free of charge as they are called outside any critical portions. This makes me wonder how much we need to care about trace_recovery_messages, actually, and I've never used it. -- Michael --b2PW6KVlSNpy6TxA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmVxFxAACgkQnvQgOdby QH3wHg//TjbTc7/1bXSnsoFl6DAeOuaF3DCKA+LtSnIjetP8m6/WrRpCigkQncg9 zeDFtLWZqhzvs4fztMDIKWwbWiz4jqh07ZZERpoE6EsEP+xxe4xL9SLmJWUJUbrn 7P7R+RQ9F5fajrvZ3oY9mnlH5c6F2ZrhuO2hRLJJjVebZagKPQQQ2/cBN6zq/Z0D T9E6gJLb5dMwyQTJwAoPU0VpZUpKhL/dJn4SR2QkLulQMAFDwSQndQicK1v9RVx3 yTK82g0Bfn8rynwb6GhBGrDmQSMyXVXrigmk2yJAvok2/ZG7T4RMcdNfFxVAw3nP 95xBeRHg39seEMPCKqxvsEDvn17mxCm41nw/zOAZgorTx7C9w8HTT5nQxuRUfHaM BB3ZLOIUsvmOF7Pob7qPP6s6BifqXwhrx7K6o2ai+FSTOJBKMgLktCg95OOlDXJV s0OR1S8w4nK6bHnLpfbBF7dLS/in+RQAcMiw5hTg0Jiwc+6YQ/gAcWJhuV4EJUIC bIEwC/x5kEFjMnn3lxuiGwcZc8aSJF6Ag2cmiFAS0EjsQYOAns//3DZvzigy06Rt cx1WabPHAFa9eNyDVUyGusjADeiT9kizMI5rwThTNNlv80vCGGyLmNseslsmSftm 8ewXFWzyzZbZBmQ6muabrjjY1wHanWpsa9BP+7R4hTKnAy0RPTY= =LGAq -----END PGP SIGNATURE----- --b2PW6KVlSNpy6TxA--