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 1gpzaW-0002Gp-Lo for pgsql-hackers@arkaria.postgresql.org; Sat, 02 Feb 2019 18:00: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 1gpzaV-0003QS-2n for pgsql-hackers@arkaria.postgresql.org; Sat, 02 Feb 2019 18:00:19 +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 1gpzaU-0003QL-LM for pgsql-hackers@lists.postgresql.org; Sat, 02 Feb 2019 18:00:18 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gpzaQ-0003kS-U1 for pgsql-hackers@postgresql.org; Sat, 02 Feb 2019 18:00:17 +0000 Received: by mail-wm1-x342.google.com with SMTP id p6so9322919wmc.1 for ; Sat, 02 Feb 2019 10:00:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=yDcP8e6+2rNgTjp6zARFLr/20w16Ak1PHAUvh76fWnw=; b=zh4WF5TSM5VhCe2ams41vma9Mu9cA2aEKHbp3abAYnSlu9LP01y1yXYbFLUbsVLzap g9Zy7PeO/JKUxou3ItzoVRF8BCALlzOBHwqmgMZrRR3S4bm78K5EnZIJ+MgPjN7tow2F CJh3DlpERP03pvKRvhzup+PyAzYaUgjHwesPHSLAfV+hPuX07vE9ZHeq+NSM/+XhIqr0 KljV9eMhdAUJATHzVSYKLNUhFz9o4e4dvPfg8KpiE3eeVhYLQRVLv5aBvnntuo2CQfE0 SgTRcpGW/JCl8SjZGNBErzBSQ0jWxLljs4BAmK7DN1iLlBajKdolxVQtVLSVfuCq3K5c vZqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=yDcP8e6+2rNgTjp6zARFLr/20w16Ak1PHAUvh76fWnw=; b=j+FgJrG8I+wq5l3pZPkVQE2r6uV1zqWKhS7bGxNbIZKUdGpGAa98Wg7Rk8zQrAIRBt 2UCbStx4Gr2+LBathVp2m6WC25o7fqqJJwPkNR5uIH6fvg5yvsd89x5KBgQOZDywn1ps pMTaUi9VlxUIYVTHECerRywOQlIxm3mcGf2HMazT3MBEPOVvhJvFVzWGG4mMpPPeuQrN OpVfjoPqTLBqwTO9Z3TWMOpsZvAIcOOcIkH8UvKjXEI6qsudNccPIe3c2n4a+eVxLrGK xQV4LlE5DxAsbT0fNKasSc1+cg9Hy7b3f9cQbsR+pPf8ysjpJOLadev3PdGbgkA/OXW4 kjnA== X-Gm-Message-State: AHQUAuY46Yb2oex/gcHhlIpOpuar7zQO/Ec5f0iTEXkecX89cHyu8v70 6zF/QWpX8wHFVu7qq0lo7qol/w== X-Google-Smtp-Source: AHgI3IbGxz5XzOfur/x9rNpFuxgoTmuIzhq+wqNpxTBL+UQaTmwz6CYVfVP2EZfDroOUMW2B7qScmg== X-Received: by 2002:a1c:9a4c:: with SMTP id c73mr7283762wme.35.1549130413113; Sat, 02 Feb 2019 10:00:13 -0800 (PST) Received: from alvin.alvh.no-ip.org ([212.76.254.98]) by smtp.gmail.com with ESMTPSA id q12sm3562304wmf.2.2019.02.02.10.00.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 02 Feb 2019 10:00:11 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 4BF20CFA; Sat, 2 Feb 2019 13:04:55 -0300 (-03) Date: Sat, 2 Feb 2019 13:04:55 -0300 From: Alvaro Herrera To: "Bossart, Nathan" Cc: Masahiko Sawada , Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: New vacuum option to do only freezing Message-ID: <201902021604.zimvqvgmo672@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <0EA5A139-A127-416B-963F-6301F9F8B75D@amazon.com> User-Agent: NeoMutt/20180716-1013-2c1e88 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Feb-01, Bossart, Nathan wrote: > IMHO we could document this feature at a slightly higher level without > leaving out any really important user-facing behavior. Here's a quick > attempt to show what I am thinking: > > With this option, VACUUM skips all index cleanup behavior and > only marks tuples as "dead" without reclaiming the storage. > While this can help reclaim transaction IDs faster to avoid > transaction ID wraparound (see Section 24.1.5), it will not > reduce bloat. Hmm ... don't we compact out the storage for dead tuples? If we do (and I think we should) then this wording is not entirely correct. > Note that this option is ignored for tables > that have no indexes. Also, this option cannot be used in > conjunction with the FULL option, since FULL requires > rewriting the table. I would remove the "Also," in there, since it seems to me to give the wrong impression about those two things being similar, but they're not: one is convenient behavior, the other is a limitation. > + /* Notify user that DISABLE_INDEX_CLEANUP option is ignored */ > + if (!vacrelstats->hasindex && (options & VACOPT_DISABLE_INDEX_CLEANUP)) > + ereport(NOTICE, > + (errmsg("DISABLE_INDEX_CLEANUP is ignored because table \"%s\" does not have index", > + RelationGetRelationName(onerel)))); > > It might make more sense to emit this in lazy_scan_heap() where we > determine the value of skip_index_vacuum. Why do we need a NOTICE here? I think this case should be silent. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services