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 1ntBry-0001FH-MQ for pgsql-general@arkaria.postgresql.org; Mon, 23 May 2022 17:29:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ntBrx-0001L1-IT for pgsql-general@arkaria.postgresql.org; Mon, 23 May 2022 17:29:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ntBrx-0001Ks-7j for pgsql-general@lists.postgresql.org; Mon, 23 May 2022 17:29:25 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ntBrv-0007TI-9A for pgsql-general@lists.postgresql.org; Mon, 23 May 2022 17:29:24 +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 24NHTIsY1292869; Mon, 23 May 2022 13:29:18 -0400 From: Tom Lane To: Adrian Klaver cc: Rob Sargent , "pgsql-generallists.postgresql.org" Subject: Re: list tablespaces named in custom format dump In-reply-to: <55cf2ca7-b431-b5bc-1b86-b6c8726ac4c5@aklaver.com> References: <29112dbe-b1bd-afe9-63d3-f7ba50ece939@gmail.com> <9013c93e-3f01-f40a-4e14-7b1c9d7b065d@aklaver.com> <55cf2ca7-b431-b5bc-1b86-b6c8726ac4c5@aklaver.com> Comments: In-reply-to Adrian Klaver message dated "Mon, 23 May 2022 10:00:20 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1292867.1653326958.1@sss.pgh.pa.us> Date: Mon, 23 May 2022 13:29:18 -0400 Message-ID: <1292868.1653326958@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Adrian Klaver writes: > On 5/23/22 9:54 AM, Rob Sargent wrote: >> Roger that, but does the dump of a database name the tablespaces from >> which the objects were retrieved? And if so, is that accessible? > Would indicate it does. I don't have cluster set up with tablespaces to > test, but I would try: > pg_restore -l AFAICS, the output produced by -l doesn't mention objects' tablespaces. You could see them by extracting the plain text archive and grepping for object comments that include a tablespace name: pg_restore -s -f - archive_file | grep Tablespace: It looks to me like that will only appear for tables with non-default tablespaces. regards, tom lane