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 1ntCQ8-0003D6-DM for pgsql-general@arkaria.postgresql.org; Mon, 23 May 2022 18:04:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ntCQ6-0007xM-UT for pgsql-general@arkaria.postgresql.org; Mon, 23 May 2022 18:04:42 +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 1ntCQ6-0007xD-Gb for pgsql-general@lists.postgresql.org; Mon, 23 May 2022 18:04:42 +0000 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ntCQ0-0007rG-35 for pgsql-general@lists.postgresql.org; Mon, 23 May 2022 18:04:42 +0000 Received: by mail-pj1-x102c.google.com with SMTP id t11-20020a17090a6a0b00b001df6f318a8bso18167098pjj.4 for ; Mon, 23 May 2022 11:04:35 -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=JM54/dgHfKZMqLVxhvjETHuw5zmDaZyoNvMStdc3cZY=; b=fnfqberK8EyzrI88YzdTrVdWYA1sVVP4Gfzu/ZLFOC6h1ksbE0pxp5HP9nyNLfqza2 AQ0J78P1/4kUEvpskrQGPzq+UU2VBfxY63Q29lHSD4q+ocBRWB1+c7Rbi+7FBTi/dpz9 bd76V1Iy6/QHSKKs0+b6Gzt7IzyPEzCgy2sjrKcsudgB8LauLXkMt5tCroo4eiWKHUEP v8I5ok0bjgQwUF+2bmFLDTDKyIkX4Nb0iP7vEd2+Uoo/uk4zmA46j1LX3F0qdb0GCLa+ MQ7FBqV3jm/upHTTBEPMMCIzjaUp9tbjHCWZEAie0Hx352h0+LXNpfm3UHUol/12bxja tzkQ== 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=JM54/dgHfKZMqLVxhvjETHuw5zmDaZyoNvMStdc3cZY=; b=bWpzX40FgtnW1e8Nh8RpBB9JjYqfjca0ptre7T4frjvCM07wPFtpmiW4nNb4KRVla+ D3GBBER8Bm3hKM0WDXV2hUAWnQoopZ/od8DYxCep1JXo2eSw6G2vtCzDN8P5LfpeLSYO DvNSB2zJ0YVqnGvciD5r0TcSRXbfwjDz35Sq0VZ6bz1fiJv6WY3aFksLOkQd7P0wNZfp ZeZwCkMzPU6N90Kv5NEOrzXHyBV7IYiksFf0PtabRP3PSjPPl8u4rXpJl4vrZTYlJywY sR/hTvMvCR9DZMB1gUVxZu7ZEfmmWaeRJtQMSxt99KSKvLSMuq8PSCM2A4xXkis2PV8c 8Dww== X-Gm-Message-State: AOAM533bc6dUKPvWi+EKP3houkqI6tC2KB5/kQ/5HmQydEzzAQDdAof4 jrasfHsrDZD2gw7Bah09nkU= X-Google-Smtp-Source: ABdhPJyiqPINmAK+aWmD10aIrtTyOtyuTKYQYY/szgLVWkyVOhhOV864PFK6mqICDQm72zIZ/K3m5Q== X-Received: by 2002:a17:903:1210:b0:15e:8373:d4b8 with SMTP id l16-20020a170903121000b0015e8373d4b8mr23997760plh.11.1653329073630; Mon, 23 May 2022 11:04:33 -0700 (PDT) Received: from [10.128.71.194] ([155.98.131.2]) by smtp.gmail.com with ESMTPSA id i62-20020a636d41000000b003c14af505f6sm4990311pgc.14.2022.05.23.11.04.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 May 2022 11:04:32 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------e0rDIzzOLWgl0Jswd3yF4lBZ" Message-ID: Date: Mon, 23 May 2022 12:04:30 -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> <66d925ce-5a4e-e3e0-583a-f1c2574948dc@gmail.com> <6272f0ac-4faa-d86e-3f05-7736a4010b54@aklaver.com> From: Rob Sargent In-Reply-To: <6272f0ac-4faa-d86e-3f05-7736a4010b54@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. --------------e0rDIzzOLWgl0Jswd3yF4lBZ Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 5/23/22 11:51, Adrian Klaver wrote: > On 5/23/22 10:19 AM, Rob Sargent wrote: >> 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: >>>>> > >>> >> This is great news.  I do have pg14.  I thought you had to dump with >> the save version as restore > > pg_dump and pg_restore are backwards compatible. The recommendation is > to use the same version of pg_dump as the server you are dumping if > the plan is use it as backup to restore to same version of server. If > you are planning on restoring to newer version then use the newer > version of pg_dump to dump the older server version e.g. version 14 > pg_dump dumps version 12 Postgres server. Then use the newer version > of pg_restore(14 in this case) to restore to the Postgres 14 server. > > For the purposes of this question using the 14 version of pg_restore > is acceptable to get the information. Actually doing a restore to a 14 > version of the server with 12 version of a dump file may create > problems as the 12 version of pg_dump may not include information > needed by the newer server. > > Thanks Adrian.  There's enough wiggle room in there for me to at least try the restore. Linus file command tells me db.dump: PostgreSQL custom database dump - v1.13-0 That dump was from a version 10 server.  Any guess at how that "v1.13-0" relates to the server version?  Dumps from the current pg14 server  say "v1.14-0" so it looks to me like the dumps were done with v13 pg-restore.  This surprises me, but I do not manage the server.  Maybe my dump file doesn't have anything pg14 restore can't handle.. we'll see Thanks again, all. --------------e0rDIzzOLWgl0Jswd3yF4lBZ Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 5/23/22 11:51, Adrian Klaver wrote:
On 5/23/22 10:19 AM, Rob Sargent wrote:
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:



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

pg_dump and pg_restore are backwards compatible. The recommendation is to use the same version of pg_dump as the server you are dumping if the plan is use it as backup to restore to same version of server. If you are planning on restoring to newer version then use the newer version of pg_dump to dump the older server version e.g. version 14 pg_dump dumps version 12 Postgres server. Then use the newer version of pg_restore(14 in this case) to restore to the Postgres 14 server.

For the purposes of this question using the 14 version of pg_restore is acceptable to get the information. Actually doing a restore to a 14 version of the server with 12 version of a dump file may create problems as the 12 version of pg_dump may not include information needed by the newer server.


Thanks Adrian.  There's enough wiggle room in there for me to at least try the restore.  Linus file command tells me
db.dump: PostgreSQL custom database dump - v1.13-0
That dump was from a version 10 server.  Any guess at how that "v1.13-0" relates to the server version?  Dumps from the current pg14 server  say "v1.14-0" so it looks to me like the dumps were done with v13 pg-restore.  This surprises me, but I do not manage the server.  Maybe my dump file doesn't have anything pg14 restore can't handle.. we'll see

Thanks again, all.
--------------e0rDIzzOLWgl0Jswd3yF4lBZ--