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 1ou69V-0007Mm-4b for pgsql-general@arkaria.postgresql.org; Sun, 13 Nov 2022 06:07:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ou69T-0005QX-86 for pgsql-general@arkaria.postgresql.org; Sun, 13 Nov 2022 06:07:31 +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 1ou69S-0005QO-Sr for pgsql-general@lists.postgresql.org; Sun, 13 Nov 2022 06:07:30 +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 1ou69Q-0004mA-6d for pgsql-general@lists.postgresql.org; Sun, 13 Nov 2022 06:07:30 +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 2AD67PV3292801; Sun, 13 Nov 2022 01:07:25 -0500 From: Tom Lane To: Ron cc: pgsql-general@lists.postgresql.org Subject: Re: Upgrading to v12 In-reply-to: <5bdec7a2-bfec-b0f3-2e23-09ea7c9303cf@gmail.com> References: <9aa1a829-3367-74cf-1630-a91a4d67d41d@aklaver.com> <5bdec7a2-bfec-b0f3-2e23-09ea7c9303cf@gmail.com> Comments: In-reply-to Ron message dated "Sat, 12 Nov 2022 23:30:50 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <292799.1668319645.1@sss.pgh.pa.us> Date: Sun, 13 Nov 2022 01:07:25 -0500 Message-ID: <292800.1668319645@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Ron writes: > On 11/11/22 23:09, Adrian Klaver wrote: >> 2) For your explanation above, pg_dump from 9.4(5432) to pg_restore >> 12(5433) the issue would be ...\9.4\bin\pg_dump.exe of 9.4 and pg_restore >> of said dump file to version 12. When moving up in version you need to use >> the newer version of pg_dump(...\12\bin\pg_dump.exe) to dump the 9.4 >> instance and then the version 12 pg_restore to the 12 instance. Both >> programs are backwards compatible, not forwards compatible. > Unless there's some bug (you're running a /really/ old version of 9.4), you > might be able to get away with using the 9.4 binary. Yeah. The recommendation to use the later version's pg_dump for a migration is in the nature of "this is best practice", not "this is the only way that will work". The argument for it is that the older pg_dump might have bugs that are fixed in the newer version. But such bugs are rare, so usually it'll work fine to use the older one. We do endeavor to make sure that older dump output will load into newer versions, because in disaster-recovery scenarios an older dump might be all you have. regards, tom lane