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 1ntBiN-0000oQ-86 for pgsql-general@arkaria.postgresql.org; Mon, 23 May 2022 17:19:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ntBiM-0004zF-4W for pgsql-general@arkaria.postgresql.org; Mon, 23 May 2022 17:19:30 +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 1ntBiL-0004z6-QO for pgsql-general@lists.postgresql.org; Mon, 23 May 2022 17:19:29 +0000 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ntBiH-0007OV-Cx for pgsql-general@lists.postgresql.org; Mon, 23 May 2022 17:19:29 +0000 Received: by mail-pl1-x62b.google.com with SMTP id s14so13686843plk.8 for ; Mon, 23 May 2022 10:19:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to; bh=zcuKUPBKSXN8CgLBeRj1/UOXl5m5Ij3Wk1U/A3hX4eo=; b=EJSDj36sqRY4BBzU8al3TcqkojAqLzufEb6JQCiNgAnXu1fxmLblW/n6j6WUkqMVCb tBuHNHroX645L03K4vbSUAlHEC4FuZRjCN5ol84zp7EHD9/JqSHvqST45bSm7ib2ZZ1a xoN9aK6tRsyGNXUAU2FwrDB1vNsJ3uOW+VilMzE+6f98UuBIw/tWmlgvcxZl2J8+qNo8 ylChK2lpj+IGNt38nuM3O+SDiYm0nvVu8Ypjni78R3HimJI7jTXeE97dzpLRxs3xvFsn iPg4/cEQt2QaWJ52TkqvzEPxQYi358o0URtVbNuUZhdCY0XiFIjgeprDf4w4uPyRLn1M ENLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to; bh=zcuKUPBKSXN8CgLBeRj1/UOXl5m5Ij3Wk1U/A3hX4eo=; b=b+J9Y90J2Z9jJp57xn53Rp2cn/BUb9aTRXe5+ykA3TJGTVzeax/VNwrZsVcw3Na+QH 3WIgawh83Nv3wwNmVjM+6cWM76yeYjWlb58Z+DFUM3Imvbn+SHGL7hEXVSmtvVhkUNFs AtljUM/FC616pHLyt9uHkS2wqEsFPaPPO4MfgOeirijR/viFuXBhkYEr7zA2J9Kvx+9V zk4Y9jQ+E+gHSgPFLkWTgQBQJftZCqD6gPv47b6LBYUCnm2XT+XWT/qWcMR+5OadGAJW bwtaF5ICKbiw1UnrWYPcsNQrqQ3aPG9F0YPIDnIg2Q1nBqgfuqCo0bZlU33HfhHm7MQb x8mw== X-Gm-Message-State: AOAM533b/EB+eZWT7xjH4jzX8PwiHCZXUxBgyOG2MXWEZaHoQhta/Ce8 KJMlOu9dzH31GLKc7l8dVTs= X-Google-Smtp-Source: ABdhPJyGfUmL9AheJNBKRyYF3FACZbrrv1udoaK4TT++1PU93vc+V3Uhgcvht2cRBYI/N/99MU+LLQ== X-Received: by 2002:a17:90a:c682:b0:1df:c4a8:5db6 with SMTP id n2-20020a17090ac68200b001dfc4a85db6mr41660pjt.43.1653326363119; Mon, 23 May 2022 10:19:23 -0700 (PDT) Received: from [10.128.71.194] ([155.98.131.2]) by smtp.gmail.com with ESMTPSA id o10-20020a62f90a000000b0050dc76281a5sm7329027pfh.127.2022.05.23.10.19.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 May 2022 10:19:22 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------LhKBhrAINBhGhdRuOWIMZNQs" Message-ID: <66d925ce-5a4e-e3e0-583a-f1c2574948dc@gmail.com> Date: Mon, 23 May 2022 11:19:21 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: list tablespaces named in custom format dump Content-Language: en-CA To: Adrian Klaver , "pgsql-generallists.postgresql.org" References: <29112dbe-b1bd-afe9-63d3-f7ba50ece939@gmail.com> <9013c93e-3f01-f40a-4e14-7b1c9d7b065d@aklaver.com> <55cf2ca7-b431-b5bc-1b86-b6c8726ac4c5@aklaver.com> <2904d7b9-3bf0-fee0-f043-c8f904fc6c1d@gmail.com> <78db98f0-0e1b-d744-25fd-5390d720e2b8@aklaver.com> From: Rob Sargent In-Reply-To: <78db98f0-0e1b-d744-25fd-5390d720e2b8@aklaver.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------LhKBhrAINBhGhdRuOWIMZNQs Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 5/23/22 11:07, Adrian Klaver wrote: > On 5/23/22 10:01 AM, Rob Sargent wrote: >> On 5/23/22 11:00, Adrian Klaver wrote: >>> On 5/23/22 9:54 AM, Rob Sargent wrote: >>>> On 5/23/22 10:50, Adrian Klaver 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? >>>> >>> >>> >>> https://www.postgresql.org/docs/14/app-pgrestore.html >>> >>> "--no-tablespaces >>> >>>     Do not output commands to select tablespaces. With this option, >>> all objects will be created in whichever tablespace is the default >>> during restore. >>> " >>> >>> Would indicate it does. I don't have cluster set up with tablespaces >>> to test, but I would try: >>> >>> pg_restore -l >>> >>> This will produce a Table of Contents for the file. >>> >> Ah, missed that. Thanks. >> (Now I'll have to find the version used to dump the db...) > > If you have it just use the Postgres 14 version of pg_restore it will > be able to read older files from older versions of pg_dump. > > This is great news.  I do have pg14.  I thought you had to dump with the save version as restore. --------------LhKBhrAINBhGhdRuOWIMZNQs Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 5/23/22 11:07, Adrian Klaver wrote:
On 5/23/22 10:01 AM, Rob Sargent wrote:
On 5/23/22 11:00, Adrian Klaver wrote:
On 5/23/22 9:54 AM, Rob Sargent wrote:
On 5/23/22 10:50, Adrian Klaver 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?



https://www.postgresql.org/docs/14/app-pgrestore.html

"--no-tablespaces

    Do not output commands to select tablespaces. With this option, all objects will be created in whichever tablespace is the default during restore.
"

Would indicate it does. I don't have cluster set up with tablespaces to test, but I would try:

pg_restore -l <custom_format_file>

This will produce a Table of Contents for the file.

Ah, missed that. Thanks.
(Now I'll have to find the version used to dump the db...)

If you have it just use the Postgres 14 version of pg_restore it will be able to read older files from older versions of pg_dump.


This is great news.  I do have pg14.  I thought you had to dump with the save version as restore.
--------------LhKBhrAINBhGhdRuOWIMZNQs--