Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gZniS-0007oF-6B for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Dec 2018 02:05:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gZniQ-0005zj-TI for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Dec 2018 02:05:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gZniP-0005yZ-Tj for pgsql-hackers@lists.postgresql.org; Thu, 20 Dec 2018 02:05:34 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gZniN-0003QR-6B for pgsql-hackers@postgresql.org; Thu, 20 Dec 2018 02:05:33 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 0ED852209E; Wed, 19 Dec 2018 21:05:28 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 19 Dec 2018 21:05:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=VJFP+Yg4O+w9DhgFEELmeDslwHv uzeqdWzNbc3va4Y8=; b=shKLK/Rui64BLrx7wwvD5QZRdu7vO4LwR1ZAABPw+4j 9YDNVVwctFek5J8mibi9nftKncC7Vk2MhOi3NIhWbavg2SqRb/VOcDBEGfZ59Zgq A/qJs6gLZasQikl2yrUcgvkBFur9c0fIktv1EfrSsk5PBPEnSueNlZV9Lrbvynaj AHeLYcPo47JHQwuN/FGk9U2y+wFQzVRsswmQjAXWL3qMMhA8qvFORlGcilCnLQy9 RsFAztPokWiBZM/xx9M6CCQwqDDU9F/wjxqZHd91aB6jTvbN+xX4xjnhIynDWU/T 8QH/ysiimOh08FbjNmJLKZ4p3DbKGisBcroNtTL7uUg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=VJFP+Y g4O+w9DhgFEELmeDslwHvuzeqdWzNbc3va4Y8=; b=TGxwJIR1MMvU46AtuTSTFa aKebOsdezCi8bEFVe+xBQogeSXt583w9cW3mmH0GLxDgHKvNcuB6cierwGqe8GJ6 uIcKL0kYOctziaET+AL5X9TWgVaudbVDvp6jOux4RdP2ZM2zOEZC/nAPPHQZFC/C ZhX9q26SYYIVaWzXfCbd/i1aOiIoAWMZIRynWpFV6qKoZhOUrQ6q7OPuru7Zmc3q bv+pDEf2hy2mZSC9dj6Hxkm48oHvKqOUHI0dnfD/WkhFefTNkKRRxF+Jhm00GQSM cUemcqLtxV+UkbhOxU9/lTVJ+RwjZABBukqK4CPVEcNUSiiMruhgCAwDhS9WiHaQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudejvddgfeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdejtd dmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgt hhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqne cukfhppeeiuddrvdduhedrudefjedrudeivdenucfrrghrrghmpehmrghilhhfrhhomhep mhhitghhrggvlhesphgrqhhuihgvrhdrgiihiienucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id F033FE405D; Wed, 19 Dec 2018 21:05:25 -0500 (EST) Date: Thu, 20 Dec 2018 11:05:22 +0900 From: Michael Paquier To: "Bossart, Nathan" Cc: "pgsql-hackers@postgresql.org" Subject: Re: A few new options for vacuumdb Message-ID: <20181220020522.GM27104@paquier.xyz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="31zvzas5NXT9fief" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --31zvzas5NXT9fief Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Dec 19, 2018 at 08:50:10PM +0000, Bossart, Nathan wrote: > If an option is specified for a server version that is not supported, > the option is silently ignored. For example, SKIP_LOCKED was only > added to VACUUM and ANALYZE for v12. Alternatively, I think we could > fail in vacuum_one_database() if an unsupported option is specified. > Some of these options will work on all currently supported versions, > so I am curious what others think about skipping some of these version > checks altogether. prepare_vacuum_command() already handles that by ignoring silently unsupported options (see the case of SKIP_LOCKED). So why not doing the same? > It does not seem clear whether the user wants us to process mytable > only if it is at least 1 GB, or if we should process mytable in > addition to any other relations over 1 GB. Either way, I think trying > to support these combinations of options adds more complexity than it > is worth. It seems to me that a combination of both options means that the listed table should be processed only if its minimum size is 1GB. If multiple tables are specified with --table, then only those reaching 1GB would be processed. So this restriction can go away. The same applies for the proposed --min-xid-age and --min-mxid-age. + + Only execute the vacuum or analyze commands on tables with a multixact + ID age of at least mxid_age. + Adding a link to explain the multixact business may be helpful, say vacuum-for-multixact-wraparound. Same comment for XID. > 0001 is a minor fix that is somewhat separate from these new options, > although the new options will make the edge case it aims to fix much > easier to reach. When the catalogs are queried in parallel mode to > get the list of tables to process, we currently assume that at least > one table will be returned. If no tables are found, the tables > variable will stay as NULL, which leads to database-wide VACUUM or > ANALYZE commands. Since there are currently no user-configurable > options available for this catalog query, this case is likely > exceptionally rare. However, with the new options, it is much easier > to inadvertently filter out all relations. Agreed. No need to visibly bother about that in back-branches. There is an argument about also adding DISABLE_PAGE_SKIPPING. -- Michael --31zvzas5NXT9fief Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlwa+OIACgkQnvQgOdby QH0HtA//SYrFy5vOrUY7hnW2VNNpSuIVdrEEHKRjNTuPcBWSY84L209XuCKMG/9U +icL8bXWfC8xswtwOQ7IUSKs2rBqpwqzbCmUDbuse8ZG78UFOdbp1zYWaGMutAkN nL/G45K4lJvtN3QJbNG4XbbaWPj53at5BWs7C0gPjKbd3PQCP3JiaziW3wrL9TAW QK/zqCIseY0MNH0qZLj1G1uvoUJEOaZXT9AEyJUh0j3DsETF36SwuZ7QwjKijWLu 67FM/mIU5VAoS0KS+72exQAOacNRCjOS1NkVIfRbQGFrpHuIoKcf5Hg2FfC9vb7D oZDFxVFA65ZCrtmUSRqc+8wPBc5/GlYE6FUaXeWWoPpe2r7z1/ZnzVXW/4CXUKsk oxIaGVl/DyAW1Zf1zdvxMqWKM+jdke2BpvXR8y7qfACfXt1GIuWLG8SmWNVwqXX3 9AE/gu9cqnZ7XIeHr4HOO3QqVAEzFxCrMsByBNScIPsFmGvK0mCu7rXgUOxB8Iev 1AZFXq5YB0SMXrw+/0jWBBqNqhDcpggDtL80Gl3H/OhUt++srLiXI89x97PKQZHb hVT9N84McuGhCcLHvYUZprtxOiNH+nNHTYdGU4bXXklIrm7ZPbWNoDNVNdet+QGJ gu8g2xkRgwthxfq2BEqtSh9kzOjncEmDkYeriSAHy7TVHgveHUc= =HoQU -----END PGP SIGNATURE----- --31zvzas5NXT9fief--