Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aynLD-0004ZU-Vh for pgsql-hackers@arkaria.postgresql.org; Fri, 06 May 2016 21:31:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1aynLD-0004DW-IV for pgsql-hackers@arkaria.postgresql.org; Fri, 06 May 2016 21:31: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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aynLC-0004At-6P for pgsql-hackers@postgresql.org; Fri, 06 May 2016 21:31:18 +0000 Received: from out.smtp-auth.no-ip.com ([8.23.224.60]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1aynL8-0004I0-6E for pgsql-hackers@postgresql.org; Fri, 06 May 2016 21:31:17 +0000 X-No-IP: alvh.no-ip.org@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from alvin.alvh.no-ip.org (unknown [216.155.90.98]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 455D9400898; Fri, 6 May 2016 14:31:06 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id ED4994C5; Fri, 6 May 2016 18:31:03 -0300 (CLST) Date: Fri, 6 May 2016 18:31:03 -0300 From: Alvaro Herrera To: "Joshua D. Drake" Cc: Robert Haas , Andres Freund , Masahiko Sawada , "pgsql-hackers@postgresql.org" Subject: Re: Reviewing freeze map code Message-ID: <20160506213103.GA287664@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <572D0309.4090402@commandprompt.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -1.1 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Joshua D. Drake wrote: > On 05/06/2016 01:40 PM, Robert Haas wrote: > >On Wed, May 4, 2016 at 8:08 PM, Andres Freund wrote: > >>On 2016-05-02 14:48:18 -0700, Andres Freund wrote: > >>>77a1d1e Department of second thoughts: remove PD_ALL_FROZEN. > >> > >>Nothing to say here. > >> > >>>fd31cd2 Don't vacuum all-frozen pages. > >> > >>Hm. I do wonder if it's going to bite us that we don't have a way to > >>actually force vacuuming of the whole table (besides manually rm'ing the > >>VM). I've more than once seen VACUUM used to try to do some integrity > >>checking of the database. How are we actually going to test that the > >>feature works correctly? They'd have to write checks ontop of > >>pg_visibility to see whether things are borked. > > > >Let's add VACUUM (FORCE) or something like that. > > This is actually inverted. Vacuum by default should vacuum the entire > relation, however if we are going to keep the existing behavior of this > patch, VACUUM (FROZEN) seems to be better than (FORCE)? Prior to some 7.x release, VACUUM actually did what we ripped out in 9.0 release as VACUUM FULL. We actually changed the mode of operation quite heavily into the "lazy" mode which didn't acquire access exclusive lock, and it was a huge relief. I think that changing the mode of operation to be the lightest possible thing that gets the job done is convenient for users, because their existing scripts continue to clean their tables only they take less time. No need to tweak the maintenance scripts. I don't know what happens when the freeze_table_age threshold is reached. Do we scan the whole table when that happens? Because if we do, then we don't need a new keyword: just invoke the command after lowering the setting. Another question on this feature is what happens with the table age (relfrozenxid, relminmxid) when the table is not wholly scanned by vacuum. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers