Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mmJLX-0006dt-H1 for pgsql-general@arkaria.postgresql.org; Sun, 14 Nov 2021 17:31:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mmJLV-0005xf-VG for pgsql-general@arkaria.postgresql.org; Sun, 14 Nov 2021 17:31:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mmJLV-0005xW-Ke for pgsql-general@lists.postgresql.org; Sun, 14 Nov 2021 17:31:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mmJLT-0001aX-N9 for pgsql-general@lists.postgresql.org; Sun, 14 Nov 2021 17:31:12 +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 1AEHV9YM2011526; Sun, 14 Nov 2021 12:31:09 -0500 From: Tom Lane To: =?UTF-8?B?0JTQvNC40YLRgNC40Lkg0JjQstCw0L3QvtCy?= cc: pgsql-general@lists.postgresql.org Subject: Re: pg_restore depending on user functions In-reply-to: References: Comments: In-reply-to =?UTF-8?B?0JTQvNC40YLRgNC40Lkg0JjQstCw0L3QvtCy?= message dated "Sun, 14 Nov 2021 15:10:32 +0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2011524.1636911069.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 14 Nov 2021 12:31:09 -0500 Message-ID: <2011525.1636911069@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk =3D?UTF-8?B?0JTQvNC40YLRgNC40Lkg0JjQstCw0L3QvtCy?=3D writes: > 1. I can determine the dependencies of the custom functions when creatin= g > the pg_dump? I did not find anything suitable for SUPPORT, probably this= is > not the case? > To recreate all of the functionality, I had to run schema recovery twice= . > (--schema-only) Usually this is caused by being careless about search_path assumptions in your functions ... but with no details, it's impossible to say anything with certainty. > 2. Why is pg_restore trying to set the value of fields of type GENERATED > ALWAYS? Otherwise it couldn't guarantee that the rows were restored with the same values of the identity column that they had before. I recall that we had some bugs with GENERATED ALWAYS in early v10 versions, but when I try it now, dump/restore of a table with an identity column seems to work as expected. What minor release are you using? regards, tom lane