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 1haONV-0004sG-RQ for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Jun 2019 17:46:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1haONS-0005iy-Px for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Jun 2019 17:46:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1haNSf-0000Ts-51 for pgsql-hackers@lists.postgresql.org; Mon, 10 Jun 2019 16:47:57 +0000 Received: from mout.perfora.net ([74.208.4.197]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1haNSc-0007wH-G5 for pgsql-hackers@lists.postgresql.org; Mon, 10 Jun 2019 16:47:55 +0000 Received: from oxuslxaltgw04.schlund.de ([10.72.76.60]) by mrelay.perfora.net (mreueus004 [74.208.5.2]) with ESMTPSA (Nemesis) id 1Mpm0f-1gkrbo17RV-00qDzy; Mon, 10 Jun 2019 18:47:45 +0200 Date: Mon, 10 Jun 2019 12:47:42 -0400 (EDT) From: - - To: Andres Freund Cc: Michael Paquier , Robert Haas , Tom Lane , pgsql-hackers@lists.postgresql.org Message-ID: <531286628.288219.1560185262575@email.ionos.com> In-Reply-To: <20190609213126.uutlkqlrsud3bdfs@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> <20190607225843.z73jqqyy6hhc6qnp@alap3.anarazel.de> <20190607235937.GA1590@paquier.xyz> <20190608002632.ptuvc6tbffjhlsgi@alap3.anarazel.de> <20190608014540.GC7228@paquier.xyz> <20190608040639.Horde.mXgiHVLprn9sAsYXLi6I9up@webmail.iciel.com> <20190609213126.uutlkqlrsud3bdfs@alap3.anarazel.de> Subject: Re: Temp table handling after anti-wraparound shutdown (Was: BUG #15840) MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.8.4-Rev55 X-Originating-Client: open-xchange-appsuite X-Provags-ID: V03:K1:yaLD7dL7JUBdLvEUJQvghxHq/lCYY2ud4PQIyw0QqVezl+yepuv xJmy/9cX6bYSEE5yvJeirLC2P7Qg6FeC7x/lp9xztBcZVbiZH5fphUK7tr2sHylbUyvcvAc 6uIqoZdkLZ8vA4rYkeROgKMwLFvUXhHQUGO4pvdiZawTBUPUH20Ej89nYZ2PV+X+kZnibIn OibegCUAEJbfe/n9Ho/hA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:q2uIYitY00I=:Ktvd96HuTC7hyDzaNDLHdC OiPQ3RvBe8areuXDvuVMJ/loemp2cXdBm5G4wNwg6M7LUVEqUjb8SOcdvvtv/iTMajW9bN0Ps xNiiCNrhs6wA6n5Jqc0Yx6sRNtnq/swfgjtJzotXzVHxKZjdbvbzZM3/p0BQyJtFc4lAUpKd3 HrZ0UtkY3d5a50w9ZzxA7LfSGcfHfi/XapboprC9yz1OVlnW2Vqh1biqTUb6+BtW/BsxLjm6t 6zUkGMU7vaqYanNQ67xYAfLjN+t2W57CFiOA00OI/AG4U6kzYnHJq7BYTX1/9BcS2aNnwPj6d Rryp95r0DevyJD1AOIMZm+QOb1lctU4mh1bNicTZ6oTIM5kd2bGy8jOzK2cg/gbxo4dr8brV3 /q9tKJsonL4NJulBGf/VbV4P01/YL4wB9PGMra84AJmBkhWmn9Zwu1rRdmu3hBfujEzleTvKz Xey8C+868Je49TjitlYBCfdt5mAShyfFdLjQ2DP6O0NpOgIhrVU/M8ZWr8sle1xjRPTAcOTjm 2TtoTfOepuMSU3/EIQ9ZBNhXgObWV29HTZNMYNTR1SWoqxrzUTRonD4/PScZFUk1wxGOZVVCT BbfWcsIURleWLRDl3yehcjjvhOG71K+HRnkLEPyaTP+/4k5BH1yYmDqDA/pOM7gBtuKq6aMxx bRqL1aX3ZnBeISojojH+Z/xaDYRrTT5/StSV1PnV5i6WOsfmuUs66ymy+mZdW3bU/bFw/LZfQ QaCG0DSCXtwNr7mZvf1kdpRzlkzkWLrzUTULw/eECtUTI8mgtsFo9fLTYdI= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk
> Hm, I'd like to know more about that corruption. Did yo= u report it when
> it occured?

Thank= s Andres for explanations. I didn't reported the corruption when it
occured as it was my fault, not a PG bug, as the main cause was that= I was using network dr= ive, knowingly it's unreliable for DB but management didn't<= /div>
believe me.
I had these kind of errors:
pg_du= mp emet_istina -F c -n usr_...
pg_dump: schema with OID 308991 do= es not exist
\dt+ pg_temp*.*
ERROR:  catalog is mi= ssing 1 attribute(s) for relid 5733555
drop schema pg_temp_9;
ERROR:  cache lookup failed for relation 5733715
drop= schema pg_temp_6;
ERROR:  cannot drop schema pg_temp_6 beca= use other objects depend on it
DETAIL:  table pg_temp_6.cur_= dde000_105577 depends on schema pg_temp_6
HINT:  Use DROP ..= . CASCADE to drop the dependent objects too.
I had to manualy rem= ove/edit records from pg_class, pg_type, pg_namespace,
pg_depend,= pg_shdepend.
I finaly managed to make it works and could dump ev= erything and rebuild the
DB for more security. Server was down fo= r 1 week, and that event gave me
proven arguments to have local s= torage. That was with 9.6 and I took the opportunity to upgrade to 10.3 at the same time.
Now it's more clear it's a PG9/10/12 (I didn't tried 1= 1) problem with
vacuum/autovacuum not changing xid on temp tables= . So, as long a temp table
exists, it take age and finish by caus= ing a wraparound protection.
Thierry
=20