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 1hZQQe-00037S-GZ for pgsql-hackers@arkaria.postgresql.org; Sat, 08 Jun 2019 01:45:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hZQQd-00043I-0T for pgsql-hackers@arkaria.postgresql.org; Sat, 08 Jun 2019 01:45:55 +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 1hZQQc-00041r-Ny for pgsql-hackers@lists.postgresql.org; Sat, 08 Jun 2019 01:45:54 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hZQQW-0000vX-2w for pgsql-hackers@lists.postgresql.org; Sat, 08 Jun 2019 01:45:54 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id E10BE22337; Fri, 7 Jun 2019 21:45:46 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 07 Jun 2019 21:45:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=mRqD7TlORY+dM2wh8B7I3eAP583 Hx3mxpwVRH9Q39EY=; b=CWMB1m/dCASeTnLE7WAaQUfGmujbV9a6VRfrXpb3ZnN TguWrRPHZ6ZIlU9ZeoebCSMbflHHK1VWjVz8OQa+YNT+mhSEksSfFZMayVlftAey WDWkulv9Hi7slZC1T+mWQv3DH0BOtuxkCMq2VzV4CXDzukzj1vf3HCLZvZTZt9Mh Wkb4E4IPw0ttaSvNzGo+CeHPtud+Q6iwmHc5LnGQeMT+4eMeWI+tQkmD31YA/Wo4 5FMdvcEkM1BqY353VZufAKOS/hLiqslnHFLo2uWuYXQrD9QtubQKSK07ARl3NDc2 gUu10d+bJ8mBY+QT+jPjiZXahL8BvJmrrJgTc9dZ1BQ== 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=mRqD7T lORY+dM2wh8B7I3eAP583Hx3mxpwVRH9Q39EY=; b=4j4lICmjd81C2ccNCivZPo kuYUZS7ccqObdZrn3BxUPNHk9Thr9LcNp0gNelrBrrgdc1z/6mTbPkdHje1hTeSF T1KE1N4c48GImwC9z9g/F4mH0b7ktCwFPBjKd6W4/oVYhc/O56fjVGHZezNcdl8b vRCGQPXNWpFI93VR+Cx5zeiLPwag/8VrhsxyGkazUqLUcskPYbyyZG5TvJ5nn1EH TjnKUkDmecl5UkJN2WB6DgvNOlmQSLG6ocQ6fHPlLiIBnSC42NP/5YepUM/08aub Ejr3fhlONan9HEwnFii0EmXMFcyl7WsU0MweyWF3dnDMO8RnhoiO99G0rr7kB11g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrudegjedggeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucfkphepudduuddruddtvddrudektddrudekheenucfrrghr rghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiienucevlh hushhtvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id B2C63380088; Fri, 7 Jun 2019 21:45:43 -0400 (EDT) Date: Sat, 8 Jun 2019 10:45:40 +0900 From: Michael Paquier To: Andres Freund Cc: Thierry Husson , Robert Haas , Tom Lane , pgsql-hackers@lists.postgresql.org Subject: Re: Temp table handling after anti-wraparound shutdown (Was: BUG #15840) Message-ID: <20190608014540.GC7228@paquier.xyz> 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> <20190607225843.z73jqqyy6hhc6qnp@alap3.anarazel.de> <20190607235937.GA1590@paquier.xyz> <20190608002632.ptuvc6tbffjhlsgi@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ZwgA9U+XZDXt4+m+" Content-Disposition: inline In-Reply-To: <20190608002632.ptuvc6tbffjhlsgi@alap3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --ZwgA9U+XZDXt4+m+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jun 07, 2019 at 05:26:32PM -0700, Andres Freund wrote: > I was more thinking that we'd move the check for orphaned-ness into a > separate function (maybe IsOrphanedRelation()), and move the code to > drop orphan relations into a separate function (maybe > DropOrphanRelations()). That'd limit the amount of code duplication for > doing this both in autovacuum and all-database vacuums quite > considerably. A separation makes sense. At some point we should actually try to separate vacuum and orphan relation cleanup, so separate functions make sense. The only reason why we are doing it with autovacuum is that it is the only thing in-core spawning a worker connected to a database which does a full scan of pg_class. -- Michael --ZwgA9U+XZDXt4+m+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlz7E0QACgkQnvQgOdby QH2Y4A//Ux6N+KxCy4KcaxxjfVXZb45hxv9zQ9fI/eHfHVeKI0BUib7JsuIS23DD xIvavrigDnNzEaAnxM2m6O+ll/xQqMVFj6U625Xi4A5Mngd5G/6V3tdwuBW/9L+f tlbs8dwKoFGrTPS6rpcJLzLEsX3QvQ1IIMR3yyisHHGLYS7/59Djhf+frI+Yn2q2 QhQ27WZr32fDpQ+FHXhMAHAf8d5xcXJD/2y3+jJizQafy14icAWduTkjjEVGsshd eP7hOA1svoMvZePHz43HXMCtsWzg+0kuwRYWj+CVPMYmDeTftWIGudAGvb2XIZr3 GHVQMsU2dYPLEHx8iMfikUnKM6Z3BI+66U8vgI0Jr3+w3r8bPu+3Mp30yPL6+4Xn O3yW8sAKJa6gr0JG8J/6qUgvs422tlTICJERRNISo1JUrcyVvwwWwWelcjZq21Kw /rbGBOtXVKhAwBw3Z7T2L+us9zQFWedMrsMzhsIcuET0E25b3yA6ww431bKSum7v xepRK3Cyhqd2wdrFG7znrdpwLFWDmYGnbwDciUZZL4koZyo4slrrQoWxsnQFBieD ZNVm4ryoqVleItfnLvfwbF5jZ50cUJSsojdKuURalI1ky5UC/QaxyYb0O01Fmv4/ mGFYxYh3o7aGnqaS7eVSVOTGAS2cF83vF+VxTKLpsoHDqPP3VLU= =yVxS -----END PGP SIGNATURE----- --ZwgA9U+XZDXt4+m+--