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 1kfR21-00012E-7E for pgsql-general@arkaria.postgresql.org; Wed, 18 Nov 2020 17:14:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kfR1z-0003zH-Ke for pgsql-general@arkaria.postgresql.org; Wed, 18 Nov 2020 17:14:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kfR1z-0003zA-AU for pgsql-general@lists.postgresql.org; Wed, 18 Nov 2020 17:14:07 +0000 Received: from mail-ot1-x32d.google.com ([2607:f8b0:4864:20::32d]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kfR1x-0002xo-2V for pgsql-general@lists.postgresql.org; Wed, 18 Nov 2020 17:14:06 +0000 Received: by mail-ot1-x32d.google.com with SMTP id f16so2450617otl.11 for ; Wed, 18 Nov 2020 09:14:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=VKDyGZ9Ty4yiTDInG0uFhgul6izZpjaTwqEgIon2PRQ=; b=SQl8NXyINTdwtDJxRUjmAO+2xFsghOmIOugKCuYQ3osUSA5BfE6MYURjsBe1fDPcvP 5/XaORpqWMFTf4CjcTpRDJBVm+8ro5YOXwXfOoHZZS9M+BYO9QfZNNgpDmOo2g3bb8sP dPrjUuGlLS2GuK2+TDIHxMYYm4v9S017c/u6WNVGACQ6ydknAJjuuRiSrnotnt+16kUx HukQQm7uaZeq9rXoqXAOZuz9sQWDrc4rku8PXLJewoqAVCxSvrZSqbSytq0BAkw67nVI yND5nHl1putafPf2rQDod7ChKoh7bulcZlNmW2bUqmaZNrhGQp3Rir0dNkKf7rzc8QkT p2PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=VKDyGZ9Ty4yiTDInG0uFhgul6izZpjaTwqEgIon2PRQ=; b=kzUemocW6BKuZhjBYB4CSXZk/wb7+XkYj5jBdNIq220aX9TXXFhQkx8tbDGKLjiBnL yHMreZD/9AU8bqLQ66YltQKUBJWMQoF5xh6G+OxSwF4mc2EtGlbLgaXUzREMoz0f1Ma9 Ao4qqWWrUAEQZiEwgJy2JowWpQbbXGjBcQ7Skul+5SWxr52VVKIyUZgnC6UUO1zhYV+G sRu6HdYp9uzkro1IKb14Yt3yOsjizJKSelk16W2FpQkPDQtM7XziDdsKUW4iiTP1ZFgN s8q/Dpfa/0xHp9ATkHwYYDOPSZwo1OKvRt0kla4LuHf/X/G358z9AH+Bl0cnju0dBP7F JJgA== X-Gm-Message-State: AOAM531WmQHF0Vn9pamSNfoXpIkj35els/oahyR4PZJKwHd3sHSHJD6S Tzv9Ddo+gLyrambRiwYeuSINff/Zl3h3gA== X-Google-Smtp-Source: ABdhPJzyUlWt72S3LMA7mwvoE8dHMa8Q6unKPzi52MiyoPn02azqR9pfnixRSHO3WZUDP83hjzcPMQ== X-Received: by 2002:a9d:3b43:: with SMTP id z61mr7027680otb.178.1605719644020; Wed, 18 Nov 2020 09:14:04 -0800 (PST) Received: from [192.168.1.10] (ip174-67-141-204.no.no.cox.net. [174.67.141.204]) by smtp.googlemail.com with ESMTPSA id w3sm8073473oov.48.2020.11.18.09.14.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Nov 2020 09:14:03 -0800 (PST) Subject: Re: psql backward compatibility To: pgsql-general@lists.postgresql.org References: <60428523-c916-9962-3875-d9cca1644f8f@aklaver.com> From: Ron Message-ID: <6177b328-279b-2b96-9305-3f366bed6a96@gmail.com> Date: Wed, 18 Nov 2020 11:14:02 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <60428523-c916-9962-3875-d9cca1644f8f@aklaver.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 11/18/20 10:13 AM, Adrian Klaver wrote: > On 11/18/20 8:05 AM, Stephen Haddock wrote: >> Hello, >> >> When upgrading an older version of postgres, version 8.4 for example, to >> a newer version such as 9.6, does the data have to be migrated immediately? >> >> It looks like the recommended method is to dump the data, upgrade, >> initialize a new cluster, and then restore the dumped data into the newer >> version. My question is whether the data dump and restore must be done >> immediately. It appears that 9.6 is able to run against the older cluster >> (DB service starts, queries work, etc), and the data could be migrated >> days or weeks later. I don't know if that is asking for issues down the >> line though such as 9.6 corrupting the data due to incompatibilities >> between the two versions. > > https://www.postgresql.org/docs/9.6/app-pgdump.html > > "Because pg_dump is used to transfer data to newer versions of PostgreSQL, > the output of pg_dump can be expected to load into PostgreSQL server > versions newer than pg_dump's version. pg_dump can also dump from > PostgreSQL servers older than its own version. (Currently, servers back to > version 7.0 are supported.) " > > > The above is for Postgres 9.6 version of pg_dump. Newer versions(10+) go > back to Postgres 8.0.  You can dump the old server at anytime. The > important thing to remember is to dump the old server using the new > servers version of pg_dump. So in your case pg_dump(9.6) against server(8.4). This is especially useful, since the 9.6 pg_dump is able to do parallel operations against 8.4. -- Angular momentum makes the world go 'round.