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 1pXbNb-0002QN-48 for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Mar 2023 05:21:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pXbNZ-00053M-80 for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Mar 2023 05:21:21 +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 1pXbNY-00053C-V2 for pgsql-hackers@lists.postgresql.org; Thu, 02 Mar 2023 05:21:20 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pXbNU-0001vG-TF for pgsql-hackers@postgresql.org; Thu, 02 Mar 2023 05:21:20 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 7853D5C00C3; Thu, 2 Mar 2023 00:21:15 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 02 Mar 2023 00:21:15 -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=1677734475; x=1677820875; bh=t2 AvOAg/FUz4TD6FRVFQcMNNOojJ2n5CKz3CRujUiRI=; b=LPA6dJmNcUoC3/EtGg fNgMHrHEArGKPiKcA3YtqPVj0iNPTHTP3j4S4bzZw5fz8VZWAXWExM/cGWbgiURK BgmCxk0ET06zLntZObsn9aBsDa4kD0PSW8yPnC3SDDMvSrjZg3Q3RProh7vEViQW N2Xjo0YP5uz4kqx8ZP/ROQI2yijx3fdes1kx1uaE77CEmfqVT0f4DENJOcGU/IkV ai0vo/jYoK376T0y3ABhWDILWT+NMRuNQFgAf1xQHLGugfQEYTZI/bvVuLSAoDev ZP0ENsajFUT3YXnkb+wWO9RwNrC5KLoBPkFhohZcU22Ag5e7mWanFQPYV082y9nk fAuw== 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=1677734475; x=1677820875; bh=t2AvOAg/FUz4T D6FRVFQcMNNOojJ2n5CKz3CRujUiRI=; b=E3F0/upSX1xY2BWA4gmKXnGiuD6Gp GwI8fH3C/OdJ8Boj5kY4JWfhggikATva9Q5hJd5D6oePSQCgJYUrEpiL4QEs3dtq KIB8EF6nWTcs+IC9KePTT5aUWO0ji48dMntOmptGiZxK7NmLQcI6O3VFpHNSi/9N Aha4rOayRRhGvkVxwVu3xlA7tHWWdNLjNbSMRyTl5pmQfnIGBoYApnj0xmmh1nYz OZ1WPwZfW9p2c97z7UpkelO8kuGOnnG3ZeCXkpdmal5vCdKlJmQZjJanhc5lEh6e OBQ7G7UQcNIX240OrJKWJEO+2HfRozozRh+iPgxsfmvXOnnqzhaqWmdhQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudeliedgkedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 2 Mar 2023 00:21:13 -0500 (EST) Date: Thu, 2 Mar 2023 14:21:08 +0900 From: Michael Paquier To: Masahiko Sawada Cc: Nathan Bossart , Alvaro Herrera , vignesh C , pgsql-hackers@postgresql.org Subject: Re: add PROCESS_MAIN to VACUUM Message-ID: References: <20230301180953.b64tekcnh43xtzqn@alvherre.pgsql> <20230301191344.GA1543729@nathanxps13> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="n3jGppAs0iN0HSFW" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --n3jGppAs0iN0HSFW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 02, 2023 at 12:58:32PM +0900, Masahiko Sawada wrote: > Cutting the toast relation name to 'pg_toast' is a bit confusing to me > as we have the pg_toast schema. How about using the following query > instead to improve the readability? >=20 > SELECT > CASE WHEN c.relname IS NULL THEN > s.relname > ELSE > 'toast for ' || c.relname > END as relname, > s.vacuum_count > FROM pg_stat_all_tables s > LEFT JOIN pg_class c ON s.relid =3D c.reltoastrelid > WHERE c.relname =3D 'vactst' OR s.relname =3D 'vactst' Another tweak that I have learnt to like is to apply a filter with regexp_replace(), see 090_reindexdb.pl: regexp_replace(b.indname::text, '(pg_toast.pg_toast_)\\d+(_index)', '\\1\\2') If you make that part of the view definition, the result is the same, so that's up to which solution one prefers. -- Michael --n3jGppAs0iN0HSFW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmQAMkQACgkQnvQgOdby QH2e6RAAjJ24p+mHAYG5jkVt4znxToc1AyHE0dEEELj/IbVtcf5Xt9sRKXPIgnVd KYGEPXQNw2g/yN0ZJ8eN+fgQJvFwWm0BAjf/mXutenaiYOncIqJD6AeQ5j6yPw8i xi7l4yb+CsV/4g/lFQrZ+W6CBJskvOCQfWcL5fd6gCkN4c3WGJA+vtMfpKpBMXSu XRMZIRmRzicvQWsDjgijPxFxYYxnDndKYpyrQvkmPcz/R6ysEqQyrGJ2y8L4lpCw 8FruqpJdBZ+yWK6gzU2FPFp0OjatAEbXEi/UMU2fCLZifFDBA14BgWHE8vtaWRvt 4ircmOY7pETvEQBiAS2oUrKOPCsx4EZ/cCZlawzv24etio8zll16ICQEadKFA2DU o4/Sb254boT/BQy8wwOoVRN+5mbAK5YXDRBb+euLT4TnIzhy5FmHuh6YuVTXf+Lt sTERaegOJRlnH0V15X7FP58JfNgfbACEdbeHMjpLGiaeIKaofg5q0jI+Rt8G6fm1 PqpfcqFvxBeSyYTIJoE0tS9mSP5f2ez+B/mpmvaBa/QZy3pDrCZLpzD8walb+RLL 62HbMxCvX5H5Wwv+wRGT3YGvo4Hr9N75tPSI63hz8YMCKvUWMTTvXSAYa5W/OLau zOzek1ESAQDQVolXUgxHex6dN5zf4zL2HI7RaiZargiT3NDikvs= =wSZ0 -----END PGP SIGNATURE----- --n3jGppAs0iN0HSFW--