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 1hyHjV-0002Ao-FU for pgsql-general@arkaria.postgresql.org; Thu, 15 Aug 2019 15:32:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hyHjS-0004fH-69 for pgsql-general@arkaria.postgresql.org; Thu, 15 Aug 2019 15:32:06 +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 1hyHjR-0004f9-Sp for pgsql-general@lists.postgresql.org; Thu, 15 Aug 2019 15:32:05 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hyHjO-0004Fi-25 for pgsql-general@postgresql.org; Thu, 15 Aug 2019 15:32:05 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x7FFVwvG029077; Thu, 15 Aug 2019 11:31:58 -0400 From: Tom Lane To: Simon Windsor cc: pgsql-general@postgresql.org Subject: Re: Error XX000 After pg11 upgrade In-reply-to: References: Comments: In-reply-to Simon Windsor message dated "Thu, 15 Aug 2019 15:30:29 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <29075.1565883118.1@sss.pgh.pa.us> Date: Thu, 15 Aug 2019 11:31:58 -0400 Message-ID: <29076.1565883118@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Simon Windsor writes: > I have just upgraded a Db from pg 10.5 to pg11.4 and almost immediately we > are seeing errors like > ERROR,XX000,"cache lookup failed for type 22079" > When inserting into a a partitioned table. About 30% of inserts are > reporting this error. Hmm ... can you show the full schema (eg, psql \d+ output) for the partitioned table and its children? Is there any pattern to the failing inserts, eg do they all resolve as inserts to the same partition(s)? > ... And an insert trigger uses the current date to dertmine where the > object is stored. In other words, this isn't actual partitioning as introduced in v10, but a hand-rolled equivalent? > How do I determine what type 22079 refers to? Presumably, the problem is that that type OID *doesn't* refer to anything any more. You should be asking "where is this dangling reference coming from?". It's possibly hiding in the partitioning expression(s) of this partitioned table, but there's no way to tell with this amount of info. How did you do the upgrade exactly? regards, tom lane