Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 4E6524759F2 for ; Wed, 6 Nov 2002 07:05:20 -0500 (EST) Received: from mail.libertyrms.com (unknown [209.167.124.227]) by postgresql.org (Postfix) with ESMTP id 4A51D47656B for ; Wed, 6 Nov 2002 07:05:09 -0500 (EST) Received: from andrew by mail.libertyrms.com with local (Exim 3.22 #3 (Debian)) id 189Ovj-0002Hn-00 for ; Wed, 06 Nov 2002 07:05:07 -0500 Date: Wed, 6 Nov 2002 07:05:07 -0500 From: Andrew Sullivan To: pgsql-general@postgresql.org Subject: Re: Vacuum full Message-ID: <20021106070507.A8423@mail.libertyrms.com> Mail-Followup-To: Andrew Sullivan , pgsql-general@postgresql.org References: <003a01c28536$9f4395d0$3200a8c0@abartleypc> <3DC8782B.A7979D94@postgresql.org> <004301c2853c$f0072fd0$3200a8c0@abartleypc> <3DC88358.67D35777@postgresql.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3DC88358.67D35777@postgresql.org>; from justin@postgresql.org on Wed, Nov 06, 2002 at 01:50:00PM +1100 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/187 X-Sequence-Number: 32608 On Wed, Nov 06, 2002 at 01:50:00PM +1100, Justin Clift wrote: > Andrew Bartley wrote: > > > I am also aware there is an upper limit on the number of transactions > > postgres can do before the DB needs vacuuming. Somthing to do with tran ids > > wrapping or something. Do you know anything about this? > > Not my area. One of the more-hard-core developers will be able to tell > you about this though. From memory though it happens around the 2 or 4 > billionth transaction mark, and something may have been done about it > for the upcoming 7.3 release (we're in beta testing of this at present). There has alwaus been a problem with transaction id wrap-around. There is a maximum number of transactions the system can perform before the transaction identifiers (which are required for MVCC to work) wrap (the ids are int4, so the number is strictly speaking 4 billion). Prior to 7.2.x, the only way to solve the problem was a complete initdb-and-restore. As of 7.2, there is a better solution; but the price of the solution is that _every table_ in the database must be vacuumed at least once every billion transactions. See (that's a long line. Sorry.) VACUUM without FULL doesn't block, however. It will cost you almost nothing to VACUUM nightly with cron. Think Martha Stewart: It's a Good Thing. A -- ---- Andrew Sullivan 204-4141 Yonge Street Liberty RMS Toronto, Ontario Canada M2P 2A8 +1 416 646 3304 x110