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 1qmcu9-008LID-PQ for pgsql-general@arkaria.postgresql.org; Sat, 30 Sep 2023 16:33:21 +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 1qmcu7-00DjsV-Vr for pgsql-general@arkaria.postgresql.org; Sat, 30 Sep 2023 16:33:19 +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 1qmcu7-00DjqJ-6g for pgsql-general@lists.postgresql.org; Sat, 30 Sep 2023 16:33:19 +0000 Received: from rs6162.luxsci.com ([162.142.76.255]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qmctx-008TIV-Pb for pgsql-general@lists.postgresql.org; Sat, 30 Sep 2023 16:33:17 +0000 Received: from pfortin.com (h128.249.89.75.dynamic.ip.windstream.net [75.89.249.128]) (authenticated bits=0) by rs6162.luxsci.com (8.15.2/8.14.9) with ESMTPSA id 38UGX60L1302373 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Sat, 30 Sep 2023 16:33:06 GMT Date: Sat, 30 Sep 2023 12:33:06 -0400 From: pf@pfortin.com To: pgsql-general@lists.postgresql.org Subject: Re: cache lookup failed for function 0 Message-ID: <20230930123306.12d10df2@pfortin.com> In-Reply-To: <1418544.1696026062@sss.pgh.pa.us> References: <20230929163739.3bea46e5.pfortin@pfortin.com> <1418544.1696026062@sss.pgh.pa.us> X-Mailer: Claws Mail 4.1.1git67 (GTK 3.24.38; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Lux-Comment: Message 38UGX60L1302373 sent by user #22429 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pfortin.com; h=date:from:to:subject:message-id:in-reply-to:references:mime-version:content-type:content-transfer-encoding; s=dkim; bh=8hli9Db5EsEXiaPj2h8WdEOMf7XS3/8OeMw+TL57E9o=; b=uGXgsinX0BNNeeEl8qHr+rphhcUEUnxwhLhkqjrwJUBQDTXfRe7owpW+tf9QDVqbsaaJxYYeTxdsi9hkWMcboTAWxmG4EnzsAhCnq3HFdHQjWwretIN32xyyiTPuvI8845ajw3azI5lnXE2tVpQNhXq2tdTcI+pXAofaBELGanI= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 29 Sep 2023 18:21:02 -0400 Tom Lane wrote: >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? I have one production DB with fuzzystrmatch installed; but it's not in any other DB. I'm trying to import into a test DB, and not yet at the point of understanding or using triggers. This is a very simple setup, other than the volume of data. The production DB has many tables, mostly in the range of 8M-33M rows. >Also, the reference to ENCODING 'ISO-8859-1' makes me wonder what >encoding conversion is being performed. The source files are mostly UTF-8; some files have the 1/2 (0xbd) character in street addresses, hence the ISO... > regards, tom lane Thanks, Pierre