Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sKgIx-00BaV3-M8 for pgsql-bugs@arkaria.postgresql.org; Fri, 21 Jun 2024 15:35:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sKgIv-003TjS-Un for pgsql-bugs@arkaria.postgresql.org; Fri, 21 Jun 2024 15:35:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sKgIv-003TjI-MS for pgsql-bugs@lists.postgresql.org; Fri, 21 Jun 2024 15:35:58 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sKgIp-002qdy-QE for pgsql-bugs@lists.postgresql.org; Fri, 21 Jun 2024 15:35:57 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 45LFZo20595888; Fri, 21 Jun 2024 11:35:50 -0400 From: Tom Lane To: Eric Marsden cc: pgsql-bugs@lists.postgresql.org Subject: Re: Cache lookup failed for type 34813 (CREATE TYPE AS ENUM + P/B/E insert, processor-specific) In-reply-to: <2dcacb45-81c9-4c38-aa36-70e2dc8df487@risk-engineering.org> References: <2dcacb45-81c9-4c38-aa36-70e2dc8df487@risk-engineering.org> Comments: In-reply-to Eric Marsden message dated "Fri, 21 Jun 2024 16:02:48 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <595886.1718984150.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 21 Jun 2024 11:35:50 -0400 Message-ID: <595887.1718984150@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Eric Marsden writes: > I see a PostgreSQL error "cache lookup failed for type 34813" after the = > following sequence of network requests over a single network connection = > to PostgreSQL (which is otherwise idle): > CREATE TYPE rating AS ENUM('ungood', 'good') > CREATE TABLE act(name TEXT, value RATING) > INSERT INTO act VALUES('thoughtcrime', 'ungood') -- OK > INSERT INTO act VALUES('blackwhite', $1) -- with $1 =3D "good" / type oi= d for "rating" / text format Interesting. To clarify, are these commands run within a single transaction, and if not where are the transaction boundaries? Would you run this under log_error_verbosity =3D verbose and post the full postmaster log entry for the failure, especially the LOCATION data? (Even better would be a stack trace from the errfinish call, but perhaps LOCATION will be enough.) regards, tom lane