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 1iu1EI-0007pt-OM for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Jan 2020 21:38:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iu1EG-0006xY-BO for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Jan 2020 21:38:32 +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 1iu1EF-0006ut-UM for pgsql-hackers@lists.postgresql.org; Tue, 21 Jan 2020 21:38:32 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iu1E9-0007cO-3K for pgsql-hackers@postgresql.org; Tue, 21 Jan 2020 21:38:31 +0000 Received: by mail-wm1-x32d.google.com with SMTP id b19so4617430wmj.4 for ; Tue, 21 Jan 2020 13:38:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=kE7JOjMP+kKtEjMFCFTNOCsWKLrHNkMDx+2gyfHkSa8=; b=p5SXBgePOrGvY+ORTTxmJaU8dG6BxzY3FaWXRj82b7kNUdOYpWcYEplsknc6zAd81p dMKgIeyrX36c/ecEYteEGCcn4LEm1HyMGOsyqb0FE5tmKK7GP6QmNdChz8V7UbIo2dys /ngQdUa6AtINRcuHASxFXCacoTJkQBVQNEE34uz+5ibUAcoaunl8EtzK7EiEwfWtmZXp 9fzMc37fuUmxouOWI1xZdk7hhwYpjzxO172AnAIIuaL0wiUG0I3aKrKbgC8wznBUscrb N+kQOqUgOtPn48thOqF/C2++/FndCaLaZJBQDlTuMMnnEKvpaxUoo/hzqKy9XeGiKLCT r1AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=kE7JOjMP+kKtEjMFCFTNOCsWKLrHNkMDx+2gyfHkSa8=; b=BJhYgO4DZpZtUiFN/tahCIdNTJlPJiakbhFk9VBlRNzHYJfpp3m+PKIdIK9S+irGbT 4ObBDWh71evgRexK1S06QTCTj4oatU3qYd5CBvZ27sP76s0o7pORVLkxqWI+r12FW6Dr xwdRVr51xbZFSFFJKmygelQ1DL7BQGMLbu3O+MHP8gPkvOdv+85c7thl+WtD8Tc5h17Z oa7+wNGLmanG/J+ZL8nVL3dwc3QlGthAYmASHQqENmj+Yy0vBfZ8U9f0Cr/3z+SX4qlX EEjpArTEexJEduxja/AbGvzh1fWS5XJ4P2RxPqmDzbAV3tEqetppx5pU+2pEB+bPKgbT UUsw== X-Gm-Message-State: APjAAAWFZW6FYPBozlM13aEYOWeZv8f59Pktjg4RiCiZUb80/QECMO5d AFiBpmvgNQtgNby7bZggNF+9kAS8nDad9/XGImn/RkrTCYMOq9sw8wfZukWRY/O9bR4YfLNyokv Hi/jPtNZ0TAQLrS2EMYBYdaAf5kwjK8cru5TMmAfH577OknZ1QPwIHkrXzm8xkkE9NsZHB2uBzW xkGuVDtp3W+n3U X-Google-Smtp-Source: APXvYqyFaEmSPhnPrcFQ1sQewCfagAGICZl0Jo9Ne8jqqIGERk2pqA9fo5edRS5Gcxs7lnhxsR2XJw== X-Received: by 2002:a05:600c:2959:: with SMTP id n25mr361539wmd.185.1579642703719; Tue, 21 Jan 2020 13:38:23 -0800 (PST) Received: from [10.8.8.19] ([185.94.189.190]) by smtp.gmail.com with ESMTPSA id b16sm56066140wrj.23.2020.01.21.13.38.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Jan 2020 13:38:23 -0800 (PST) Subject: Re: Add MAIN_RELATION_CLEANUP and SECONDARY_RELATION_CLEANUP options to VACUUM To: "Bossart, Nathan" , "pgsql-hackers@postgresql.org" References: From: Vik Fearing Message-ID: <657e9792-29b2-9dda-0ea3-73d8ba28b2ac@2ndquadrant.com> Date: Tue, 21 Jan 2020 22:38:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 21/01/2020 22:21, Bossart, Nathan wrote: > I've attached a patch for a couple of new options for VACUUM: > MAIN_RELATION_CLEANUP and SECONDARY_RELATION_CLEANUP. The motive > behind these options is to allow table owners to easily vacuum only > the TOAST table or only the main relation. This is especially useful > for TOAST tables since roles do not have access to the pg_toast schema > by default and some users may find it difficult to discover the name > of a relation's TOAST table. Could you explain why one would want to do this?  Autovacuum will already deal with the tables separately as needed, but I don't see when a manual vacuum would want to make this distinction. -- Vik Fearing