Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fboVR-00062r-Vj for pgsql-bugs@arkaria.postgresql.org; Sat, 07 Jul 2018 14:48:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fboVP-0007xr-1y for pgsql-bugs@arkaria.postgresql.org; Sat, 07 Jul 2018 14:48:11 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fboVO-0007xk-Lt for pgsql-bugs@lists.postgresql.org; Sat, 07 Jul 2018 14:48:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fboVM-0003XY-0c for pgsql-bugs@lists.postgresql.org; Sat, 07 Jul 2018 14:48:09 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w67Em6be024292; Sat, 7 Jul 2018 10:48:06 -0400 From: Tom Lane To: Peter Eisentraut cc: ceccareb@talusmusic.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15263: pg_dump / psql failure. When loading, psql does not see function-based constraints or indices In-reply-to: <9d9fb168-027d-8cf5-8020-19cb188f2433@2ndquadrant.com> References: <153089394654.1402.10720489116717364594@wrigleys.postgresql.org> <9d9fb168-027d-8cf5-8020-19cb188f2433@2ndquadrant.com> Comments: In-reply-to Peter Eisentraut message dated "Sat, 07 Jul 2018 09:14:27 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <70631.1530974886.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 07 Jul 2018 10:48:06 -0400 Message-ID: <70632.1530974886@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Peter Eisentraut writes: > On 06.07.18 18:19, PG Bug reporting form wrote: >> When I load the database from the dump I just created, loading (via psq= l) >> logs error messages. Postgres cannot find functions inside the functio= n the >> constraint or index invokes. > I think this and your subsequent report are all instances of the problem > that pg_dump cannot see into the function body to check what database > objects it depends on, so it cannot produce a working ordering of the > objects. That's one possible issue, but I think a more likely cause is the recent security-driven changes in the search_path that the restore script runs with. If the function is relying on unqualified references to functions that aren't in pg_catalog, it'll fail. (This theory explains why things were okay with old copies of pg_dump.) regards, tom lane