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 1ga9GI-0004zQ-SQ for pgsql-hackers@arkaria.postgresql.org; Fri, 21 Dec 2018 01:05:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ga9GH-0002cX-BQ for pgsql-hackers@arkaria.postgresql.org; Fri, 21 Dec 2018 01:05:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ga9GF-0002cQ-IN for pgsql-hackers@lists.postgresql.org; Fri, 21 Dec 2018 01:05:57 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ga9GC-0004qS-AK for pgsql-hackers@postgresql.org; Fri, 21 Dec 2018 01:05:54 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 38D9A221C6; Thu, 20 Dec 2018 20:05:51 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 20 Dec 2018 20:05:51 -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=TD/p5hEU26TwRhLpXbPYwVIND53 XQguqHJxGbvtbvYw=; b=MAz7L5oYk32Mm8JFzcjCKkyejP161PE4kVDkz71nPZh 5jl9NFIE6rFAaj5lzsL/apa8LbyFao3Oh4l4uG/3KjIsoTcs7xO/sFl2r4MEMuQP zn096WFxrJQ5cJaADShQ6GtXZMZrvpLDZOD55Q2PAfoIJG8zBMfTD3uB3a0iAe/K jM0Vgqc+hJaacevObuUUc2RFTNYrfhwkWAiVzjGy2yXsAMPPj82HjEL0n7nPHOq1 PLXcrmiwgqkade3kJrTW53nlL36px95tvZSG5k2Q04uvu9MGvFYV3uHnUk3iBPko uhomo4Z6sSKvPc6BeitnpJwoythRouqhG+o5qu+v8cg== 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=TD/p5h EU26TwRhLpXbPYwVIND53XQguqHJxGbvtbvYw=; b=F65PmHQ8AYnjVMfeYyxsbc NQNbZ9EotRMNxwQaJIMWwy9fnmSQB4VCbKSbkb7dS8pqTQjgpBJZ3fJzEIrAJU4E 16eyeE94dE6ZofQz9Mki4r7N/ex/WI9e38maek63dUiwXW4+XBTuqN9x6Rv3d9J4 1t4sZ2Itl2RnPZ6ALMLBj9A2OH2YZpWYDsbePTz3s3/y74fjyi9XzKQOuzXCKAn6 5lUuQrJlJrtGsZcVYREFqugtMAFFok3s9xaMF66upUZNIpECeJUxQmpaiDgRJIay MOs4hpJKlYwYpMts2VMA3SQlvjABgk/hoysi8wuz/x7BdlLI4SYDnPSHBjuMRXnA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudejgedgvdejucetufdoteggodetrfdotf 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 61AF8100BB; Thu, 20 Dec 2018 20:05:49 -0500 (EST) Date: Fri, 21 Dec 2018 10:05:45 +0900 From: Michael Paquier To: "Bossart, Nathan" Cc: "pgsql-hackers@postgresql.org" Subject: Re: A few new options for vacuumdb Message-ID: <20181221010545.GD1886@paquier.xyz> References: <20181220020522.GM27104@paquier.xyz> <7B4ACE8E-5D81-416B-B984-17E60F7ABABA@amazon.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="AbQceqfdZEv+FvjW" Content-Disposition: inline In-Reply-To: <7B4ACE8E-5D81-416B-B984-17E60F7ABABA@amazon.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --AbQceqfdZEv+FvjW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Dec 20, 2018 at 04:48:11PM +0000, Bossart, Nathan wrote: > The --skip-locked option in vacuumdb is part of 0002, so I don't think > there's much precedent here. It looks like I was not looking at the master branch here ;) > We do currently fall back to the > unparenthesized syntax for VACUUM for versions before 9.0, so there is > some version handling already. What do you think about removing > version checks for unsupported major versions? I am not exactly sure down to which version this needs to be supported and what's the policy about that (if others have an opinion to share, please feel free) but surely it does not hurt to keep those code paths either from a maintenance point of view. > If we went that route, these new patches could add version checks only > for options that were added in a supported major version (e.g. > mxid_age() was added in 9.5). Either way, we'll still have to decide > whether to fail or to silently skip the option if you do something > like specify --min-mxid-age for a 9.4 server. There are downsides and upsides for each approach. Reporting a failure makes it clear that an option is not available with a clear error message, however it complicates a bit the error handling for parallel runs. And vacuum_one_database should be the code path doing as that's where all the connections are taken even when all databases are processed. Ignoring the option, as your patch set does, has the disadvantage to potentially confuse users, say we may see complains like "why is VACUUM locking even if I specified --skip-locked?". Still this keeps the code minimalistic and simple. Just passing down the options and seeing a failure in the query generated is also a confusing experience I guess for not-so-advanced users even if it may simplify the error handling. Issuing a proper error feels more natural to me I think, as users can react on that properly. Opinions from others are welcome. -- Michael --AbQceqfdZEv+FvjW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlwcPGkACgkQnvQgOdby QH07yg/8C3uQJe5/cjIW3durFrzWdcgLVJyFrVbf14c6Oc596Hk1m6YU9ZDJmqGd dvseCNGPTIFY/HQSoFgkB8MHdZWrAOL7G+iAT9exhVHjl8+OmR/yTOHktZtJ/3Y6 MGITyKqLwexdjufAJVRYY2ZJ4khRt3GyjqHSfc5GyjQQJb5GcQjlutvBYigKRxrQ 60CN0m9pMcJIYwQoMMJv0TVeyIUlzyOeUZzl2RAaFDkLXGHq0pxMHpEjzian3CGf Ukna1Y2BePOpDnPfPkFXyybV9GVQW/DAdc9LjDPBUg5nA7qjMhZRvGbb9TBm0r44 66zidW5CeXzC/S+TUney6LHyT7CLfE2bZSJoag5O8pwj3YlGifWmVwgJjyv0XKBs Bx08YG9XnU0OLr2w3DyHNSidJpGBhd2gMZjLC6GGle5eNOdagAixpnvzawTGwpW0 4ee5OsAbyV3AP/9g2Gf2w9PSaZcxTwBsZnBNl9WuLv0KhKNEMEl0J4+Yl+3zs3Jv jzDwKbFPJ3akb9XDoWgbY7amAi+mrwDXhzNsatayIuAZeflsTP4wpMhny4c/RrVo qQS1/QJVIn+OAd/rqxMip4HPg4MZpBMzJ8NqaLcalRJ4FJyHhzoEBkBZKzUJRtkK lYqGNirPuEovQLtsTKx2eGLU5qDxPlOrmd67VIr5Fjc9y1TNZQQ= =q4FX -----END PGP SIGNATURE----- --AbQceqfdZEv+FvjW--