Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eYZ6B-0006Ug-5h for pgsql-bugs@arkaria.postgresql.org; Mon, 08 Jan 2018 15:12:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eYZ6A-0000Yk-GW for pgsql-bugs@arkaria.postgresql.org; Mon, 08 Jan 2018 15:12:26 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eYZ6A-0000Yb-B9 for pgsql-bugs@lists.postgresql.org; Mon, 08 Jan 2018 15:12:26 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eYZ68-000797-7H for pgsql-bugs@lists.postgresql.org; Mon, 08 Jan 2018 15:12:25 +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 w08FCH9s029961; Mon, 8 Jan 2018 10:12:17 -0500 From: Tom Lane To: postgres@kellerer.name cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15000: Cache lookup failure In-reply-to: <20180108113150.21778.4472@wrigleys.postgresql.org> References: <20180108113150.21778.4472@wrigleys.postgresql.org> Comments: In-reply-to =?utf-8?q?PG_Bug_reporting_form?= message dated "Mon, 08 Jan 2018 11:31:50 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <29959.1515424337.1@sss.pgh.pa.us> Date: Mon, 08 Jan 2018 10:12:17 -0500 Message-ID: <29960.1515424337@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =?utf-8?q?PG_Bug_reporting_form?= writes: > We have a script that copies data from one database to another using pg_dump > (plain text format) and the pipes the output to psql > The script consistently fails with: > pg_dump: [archiver (db)] query failed: ERROR: cache lookup failed for > relation 16693 > pg_dump: [archiver (db)] query was: SELECT tableoid, oid, conname, > pg_catalog.pg_get_constraintdef(oid) AS consrc, conislocal, convalidated > FROM pg_catalog.pg_constraint WHERE conr elid = > '16693'::pg_catalog.oid AND contype = 'c' ORDER BY conname Hmph. Is it always the same OID in the message and the reported query? If so, what table does that correspond to (try select '16693'::regclass) and is there anything odd about that table's declaration or usage? It's hard to explain this as a race condition because pg_dump should have a lock on the table by the time it issues this query. So I'm not sure what's going on. regards, tom lane