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 1hBTe6-00020u-QR for pgsql-general@arkaria.postgresql.org; Wed, 03 Apr 2019 00:20:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hBTe5-0002dn-JM for pgsql-general@arkaria.postgresql.org; Wed, 03 Apr 2019 00:20:49 +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 1hBTe3-0002dH-Ax for pgsql-general@lists.postgresql.org; Wed, 03 Apr 2019 00:20:49 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBTdy-0004Hq-Vd for pgsql-general@postgresql.org; Wed, 03 Apr 2019 00:20:46 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 226A05AED; Tue, 2 Apr 2019 20:20:39 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 02 Apr 2019 20:20:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=FQ3pUPrmZsU85qRzEC7t8vsZ9Kt EeE8XX8STh0YdTtw=; b=NoJVcWvFfDbww21mTUR/kDbD0wr9OD4hudY5Sirnwya tVstfJyDXIwvXQuXrfunknoG/DC8TDI9+3gw4Q9e1TufiNmrLD6HjoCQwMBrCGiQ tYnGe4U6X6sI7n3nCpV4YvsuG5Wl0pRuUqJ8PhUR6zYixVLPnuoqjWY4BOUQOE+F t3zVB7FgcdfMvbBdG1vDLChj9NyUCxX+gXUlalXzK8fGfCeWeqjTK/9E/IccGaLA pDeM+cYl1wrStuu+sBPFvnkYEtTvJLy6i8D/zh/60DBc0oGT03cq5auNlN+IyO9/ 7xy02rFWIftJ7Sdd3boR2NpDoExbbS46buNcvFRSFUw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=fm2; bh=FQ3pUP rmZsU85qRzEC7t8vsZ9KtEeE8XX8STh0YdTtw=; b=pgyRPyDju1haRDNkGokd4D Dgb04whdFFwL0exN/rKABC23H3ML3GIC2bb6Lz8sU1Vae3Lh67FxF7nxMXEe/Eup /spQhO8NjDP7ug+SxVlc8YCOpyYc+3GyMoIcP1Lt1+qF9HQ6xzP7KWKlybbK1Ovd 0gg9vvzoHXGhwiSuRArmhiN/828eR/rHUbFrhvucseChJ6BHtGC8TtV6fus4iVn4 zqYhKr88xv+fWNx6qe1ZyrIKp3BelDFEbBQNxONDHrDUaAMmbkLW8OtM8FQg64V9 AOyRxpKU5m8PlLFk2FGR6MyxCZy/zIPQZREERwZSO6621EqKCS44ygpXhrgRvuFw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrtddugdefudculddtuddrgedutddrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvden ucfhrhhomheptehnughrvghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivg hlrdguvgeqnecukfhppeelkedrvddutddrudegtddrudejudenucfrrghrrghmpehmrghi lhhfrhhomheprghnughrvghssegrnhgrrhgriigvlhdruggvnecuvehluhhsthgvrhfuih iivgeptd X-ME-Proxy: Received: from intern.anarazel.de (c-98-210-140-171.hsd1.ca.comcast.net [98.210.140.171]) by mail.messagingengine.com (Postfix) with ESMTPA id D369910319; Tue, 2 Apr 2019 20:20:37 -0400 (EDT) Date: Tue, 2 Apr 2019 17:20:36 -0700 From: Andres Freund To: AI Rumman Cc: pgsql-general General Subject: Re: template0 is having high age of datforzenxid Message-ID: <20190403002036.vrtno5dct635tbcn@alap3.anarazel.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2019-04-02 15:35:53 -0700, AI Rumman wrote: > I am running Postgresql 10 where I can see the template0 database is having > longest datfrozenxid: > ```db_name age_of_datfrozenxid > -------------------------------------- > postgres 251365 > template1 234574 > template0 75366462 > db1 253097 > db2 250649 > db3 250649 > db4 14641 > db5 14214``` > > Initially I had high age for all the databases and I ran "vacuum freeze" > which brought down the age of other databases. But how can I do the same > for template0? 75 million isn't that high - autovacuum will automatically look at it once above autovacuum_max_freeze_age (defaulting to 200 million). If you really for some reason need to make it have a lower datfrozenxid (why?), you'd need to update its pg_database entry to allow connections, connect to it, vacuum it, and change datallowconn back. Greetings, Andres Freund