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 1hZMiU-0000h1-Ql for pgsql-bugs@arkaria.postgresql.org; Fri, 07 Jun 2019 21:48:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hZMiS-0004yM-CA for pgsql-bugs@arkaria.postgresql.org; Fri, 07 Jun 2019 21:48:04 +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 1hZMiQ-0004pa-8x for pgsql-bugs@lists.postgresql.org; Fri, 07 Jun 2019 21:48:04 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hZMiH-0003xG-Bn for pgsql-bugs@lists.postgresql.org; Fri, 07 Jun 2019 21:48:01 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id B068122196; Fri, 7 Jun 2019 17:47:50 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 07 Jun 2019 17:47:50 -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=EbglziuIke+PlNa6LKZC/GU3pNg bvFzbtKRp90d15B4=; b=stGgqLl7Yx4At7QzRdHQ60IDZuQ7covUrehFjytfX2U ipq09HVlq8HthSWh+6R5B7Ajg6E57sFX3FJ/PXTZS/88CxlHJVfcP+0DzMsRlcqe PATE2kfCJaUjVh7cvEm15gVEJZvJmsnsA6Ychbx8hTx0lc7AEpbEL64rDjJJSfAw sAyGuBR8VX471EzjGzEcTtj/HLFmQmVvTE3WXxBo5foyQhKTFSDIoCg8f9ejBjKp zvbT+55ASfP8oczhQhzJbYVx6YmhD4800dTqSO8X0q23tzDlb67n+tyO7WG4uf4d 8DG6IOL9ff2dxP/3DFHFKwoxezwJYYjPvDgbc3qX5vg== 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=Ebglzi uIke+PlNa6LKZC/GU3pNgbvFzbtKRp90d15B4=; b=v4ejAtIEJEJIQAJ7SvwT6J iRy6x2DgrO9BJvKwld0RAixCXt22eRToItI66tBs8wkNE/RX2fTbO3VrNLlkZBd+ o02OLhUyo8Gb9agibVn+zHUmUqWr3lhf181QZ19kC5xbk0R8JaBjjE460fFgz0Kk Uvf/279Und6jgOXbtXD7s95ezgEDFV+pQeFCFlx/rkwg0/2cEDpP/nT85aQp5jvg +lmWJGWXXsmlwpRwjS4ouf8RmUDmXLiiIBWhvf1kEeX+3D5jRv5uSxooUuW13N6R LZqMe5rsLHSguDf9Ip3YslYCSnCKBOFaON1dwgjmaDVom8uxfZ1pPv3hR+Y0eL/A == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrudegjecutefuodetggdotefrodftvfcurf hrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughrvghsucfh rhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecukfhppeeijedrud eitddrvddukedrvdefjeenucfrrghrrghmpehmrghilhhfrhhomheprghnughrvghssegr nhgrrhgriigvlhdruggvnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from intern.anarazel.de (c-67-160-218-237.hsd1.ca.comcast.net [67.160.218.237]) by mail.messagingengine.com (Postfix) with ESMTPA id D80078005B; Fri, 7 Jun 2019 17:47:49 -0400 (EDT) Date: Fri, 7 Jun 2019 14:47:47 -0700 From: Andres Freund To: Thierry Husson Cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15840: Vacuum does not work after database stopped for wraparound protection. Database seems unrepearable. Message-ID: <20190607214747.r3icif752clcof6p@alap3.anarazel.de> References: <15840-06c9565bfd8099f6@postgresql.org> <20190607190231.6psb6w3bvlod7lvk@alap3.anarazel.de> <20190607145911.Horde.MKizKAnShw4nKEYGDUC2M-T@webmail.iciel.com> <20190607201002.cado5goe3rcup43n@alap3.anarazel.de> <20190607164027.Horde._egTUMJMTDBA4f31sPYgl_J@webmail.iciel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190607164027.Horde._egTUMJMTDBA4f31sPYgl_J@webmail.iciel.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2019-06-07 16:40:27 -0500, Thierry Husson wrote: > oid | oid | relkind | relfrozenxid | > age > --------+--------------------------------------+---------+--------------+------------ > 460564 | pg_temp_3.cur_semt700_progsync_4996 | r | 36464 | > 2146483652 > 460764 | pg_temp_8.cur_semt700_progsync_5568 | r | 19836544 | > 2126683572 > 460718 | pg_temp_4.cur_semt700_progsync_5564 | r | 19836544 | > 2126683572 > 460721 | pg_temp_5.cur_semt700_progsync_5565 | r | 19836544 | > 2126683572 > 461068 | pg_temp_22.cur_semt700_progsync_5581 | r | 19836544 | > 2126683572 > > These are temporary tables to manage concurrency & server load. It seems the > sudden disconnection due to wraparound protection didn't get them removed. I > removed them manually under single mode and there is no more warning now, > vacuum command included. Your command is very interesting to know. Hm. But you do have autovacuum enabled, is that right? If enabled, have you tuned it at all? It seems quite possible that given your load (10 parallel loads), the default settings werent aggressive enough. > It annoying PG create a xId for empty temporary tables. You can't clear it > with a vacuum as there is no record. I have to terminate connexions of my > deamon processes daily to avoid wraparound protection. Is there a way to > tell PG to forget these tables on its age estimation? Normally postgres would drop such "orphaned" temp tables on its own, in autovacuum (triggering it when close to a wraparound, even if disabled). But if it can't keep up for some reason, then that's not necessarily good enough with very rapid xid usage as you seem to have. I'll start a thread about this subtopic on -hackers. Greetings, Andres Freund