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 1s4JwN-002lPa-P4 for pgsql-hackers@arkaria.postgresql.org; Tue, 07 May 2024 12:29:03 +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 1s4JwL-002nyl-7g for pgsql-hackers@arkaria.postgresql.org; Tue, 07 May 2024 12:29:02 +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 1s4JwK-002nyd-UU for pgsql-hackers@lists.postgresql.org; Tue, 07 May 2024 12:29:01 +0000 Received: from charmander.telsasoft.com ([50.244.222.1] helo=pryzbyj2023.telsasoft) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s4JwJ-001s49-GF for pgsql-hackers@lists.postgresql.org; Tue, 07 May 2024 12:29:00 +0000 Received: by pryzbyj2023.telsasoft (Postfix, from userid 1000) id A6B853504; Tue, 7 May 2024 07:28:58 -0500 (CDT) Date: Tue, 7 May 2024 07:28:58 -0500 From: Justin Pryzby To: pgsql-hackers@lists.postgresql.org Subject: pg_restore -N loses extension comment Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 I mean literal s-c-h-e-m-a, but I suppose anything else will work the same. BTW, I noticed that pg_restore -v shows that duplicate dependencies can be stored. We see things like this (and worse). | 4284; 1259 191439414 VIEW public wmg_server_view telsasoft | ; depends on: 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 612 23087 612 I see that's possible not only for views, but also tables. That's probaably wasteful of CPU, at least. -- Justin