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 1iQu8a-0005wq-FF for pgsql-general@arkaria.postgresql.org; Sat, 02 Nov 2019 14:12:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iQu8X-0006Xk-Dj for pgsql-general@arkaria.postgresql.org; Sat, 02 Nov 2019 14:12:17 +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 1iQu8V-0006Xd-ID for pgsql-general@lists.postgresql.org; Sat, 02 Nov 2019 14:12:17 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iQu8L-00050o-Cz for pgsql-general@lists.postgresql.org; Sat, 02 Nov 2019 14:12:13 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 8F9E720E72; Sat, 2 Nov 2019 10:12:02 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sat, 02 Nov 2019 10:12:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=O wF/YwpzpDlE1QeYqwB433+qRf99yeyDp6HY2KJq8q4=; b=J5BqCrUDH+6kfmTdh u2oHqINZHiEKdb7HZojvZRB24Ws24I7kN77rm7R+IUz9lmmO7Qj6AON5EfODiKQL mgNfccbZRpcvg2UGP8PMD6vIGw/lYLWrSl9WlhQw6E6admtQQJTs9Ja7mN1b411I emP5yfxN2OjQMFlQ6uotvP/TJ8/B9nIb4GWcznXzO9tmqKq4cZsBZyz38Ab2SnnA vO58R5b1hIMxhFWXtkPFYLruZOHUxp7EgDeAy188OCmt67oEhOLgrGVYAC//D9ig BChvywFicnzov+leD1k4pV2AM4vLRQI73nJXPi2P6H8RoEZDpJ1qW4VEnn4NJHQe L17jQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding: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=OwF/YwpzpDlE1QeYqwB433+qRf99yeyDp6HY2KJq8 q4=; b=oJJZDCQJEDVoemgUUtARr/vhSIAaLQT5iDof3iZfvUqYKEjnGH4K8JeeF K4qlmMQYqk4czHm50C/PGOaV85z/HUVti9x6O4LDgl8e1mWYHjDZDX0+3RpZ2fMG T6Ut+VWi3Z2dTVyFnbfXAHQKH6UlhN/55QUuwVKlIAZ8pZXeZ3NP4+8YMgeloirO 4XsAlG24teylRPTA4/J6eXQTRazg5y4noCSY4HM4++L0symEgeg+cDPRb8OaUcAM A595O38eD2zNVcymj6hpgimnhrKhOE9zdbmJPlSTPSqrlVtv+nee0yhw1r2zi1yO jLzg/gVVJ1TZGt807F6OF3Yv9Uv1Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddtledgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgnecukfhppeejuddrvddu vddrudeffedrudekleenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklh grvhgvrhesrghklhgrvhgvrhdrtghomhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from [192.168.1.3] (unknown [71.212.133.189]) by mail.messagingengine.com (Postfix) with ESMTPA id CF7AF306005E; Sat, 2 Nov 2019 10:12:01 -0400 (EDT) Subject: Re: QUERY: autovacuum: VACUUM ANALYZE table versus QUERY: autovacuum: VACUUM table To: Jason Ralph , "pgsql-general@lists.postgresql.org" References: From: Adrian Klaver Message-ID: Date: Sat, 2 Nov 2019 07:12:00 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 11/1/19 7:49 PM, Jason Ralph wrote: > Hello list, > I am trying to find out if the naming convention from autovacuum does what its command line equivalent does, or at least what I think it does. > > QUERY: autovacuum: VACUUM ANALYZE table versus autovacuum: VACUUM ANALYZE table. The above are the same, I'm guessing you are referring to 1) and 2) below. > > I have been getting my autovacuum tuned and I have the settings where I see 2 types of queries running now and doing their jobs. I know vacuum alone will mark dead tuples ready for use again, and analyze alone will update statistics for the query planner. > > 1. QUERY: autovacuum: VACUUM ANALYZE table > 2. QUERY: autovacuum: VACUUM table > > My question is do we need both? Why wouldn't QUERY: autovacuum: VACUUM ANALYZE table perform both, I always thought when issuing VACUUM ANALYZE table it would do both. Why wouldn't we just want vacuum analyze to run? > Or is QUERY: autovacuum: VACUUM ANALYZE table different from the command line and it only analyzes and QUERY: autovacuum: VACUUM table only vacuums which would make sense. See here: https://www.postgresql.org/docs/11/routine-vacuuming.html#AUTOVACUUM "Each worker process will check each table within its database and execute VACUUM and/or ANALYZE as needed" In same section read sections on vacuum and analyze thresholds, which determine the 'and/or' above. The commands are the same. Autovacuum is just a background process that calls the regular VACUUM/ANALYZE commands as needed. > > > Thanks as always and hope this is clear. > > > Jason Ralph > > This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. > > > -- Adrian Klaver adrian.klaver@aklaver.com