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 1qmLrD-006oZa-6p for pgsql-general@arkaria.postgresql.org; Fri, 29 Sep 2023 22:21:11 +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 1qmLrB-006ZyK-UW for pgsql-general@arkaria.postgresql.org; Fri, 29 Sep 2023 22:21:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qmLrB-006Zxc-JG for pgsql-general@lists.postgresql.org; Fri, 29 Sep 2023 22:21:09 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qmLr5-007Lk9-I9 for pgsql-general@lists.postgresql.org; Fri, 29 Sep 2023 22:21:08 +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 38TML2R71418546; Fri, 29 Sep 2023 18:21:02 -0400 From: Tom Lane To: pf@pfortin.com cc: pgsql-general@lists.postgresql.org Subject: Re: cache lookup failed for function 0 In-reply-to: <20230929163739.3bea46e5.pfortin@pfortin.com> References: <20230929163739.3bea46e5.pfortin@pfortin.com> Comments: In-reply-to pf@pfortin.com message dated "Fri, 29 Sep 2023 16:37:39 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1418543.1696026062.1@sss.pgh.pa.us> Date: Fri, 29 Sep 2023 18:21:02 -0400 Message-ID: <1418544.1696026062@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk pf@pfortin.com writes: > As a test, rather than use INSERT, I recently wrote a python test script > to import some 8M & 33M record files with COPY instead. These worked with > last weekend's data dump. Next, I wanted to look into importing a subset > of columns using the below logic; but I'm getting "ERROR: cache lookup > failed for function 0". Re-running the same full imports that worked > Saturday, I now get the same error. > Could something in the DB cause this "function" error? "cache lookup failed" certainly smells like a server internal error, but we'd have heard about it if the trivial case you show could reach such a problem. I'm thinking there's things you haven't told us. What extensions do you have installed? Maybe an event trigger? Also, the reference to ENCODING 'ISO-8859-1' makes me wonder what encoding conversion is being performed. regards, tom lane