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 1s4LFb-002wRc-JE for pgsql-hackers@arkaria.postgresql.org; Tue, 07 May 2024 13:52:59 +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 1s4LFY-0037Uz-TO for pgsql-hackers@arkaria.postgresql.org; Tue, 07 May 2024 13:52:57 +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 1s4LFY-0037Ur-Jq for pgsql-hackers@lists.postgresql.org; Tue, 07 May 2024 13:52:57 +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 1s4LFS-001sgt-Rc for pgsql-hackers@lists.postgresql.org; Tue, 07 May 2024 13:52:56 +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 447Dqndn4054894; Tue, 7 May 2024 09:52:50 -0400 From: Tom Lane To: Justin Pryzby cc: pgsql-hackers@lists.postgresql.org Subject: Re: pg_restore -N loses extension comment In-reply-to: References: Comments: In-reply-to Justin Pryzby message dated "Tue, 07 May 2024 07:28:58 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4054892.1715089969.1@sss.pgh.pa.us> Date: Tue, 07 May 2024 09:52:49 -0400 Message-ID: <4054893.1715089969@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Justin Pryzby writes: > pg_dump -Fc |pg_restore -l -N schema: > | 2; 3079 18187 EXTENSION - pg_buffercache > Without -N schema also shows: > | 2562; 0 0 COMMENT - EXTENSION pg_buffercache Hmm, but what happens if you actually do the restore? I think this may be a bug in -l mode: ProcessArchiveRestoreOptions saves the result of _tocEntryRequired in te->reqs, but PrintTOCSummary doesn't, and that will bollix its subsequent _tocEntryRequired checks for "dependent" TOC entries. regards, tom lane