Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ivu7H-0005oJ-CM for pgsql-general@arkaria.postgresql.org; Mon, 27 Jan 2020 02:27:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ivu7G-00085F-3v for pgsql-general@arkaria.postgresql.org; Mon, 27 Jan 2020 02:27:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ivu7F-000858-Oa for pgsql-general@lists.postgresql.org; Mon, 27 Jan 2020 02:27:05 +0000 Received: from mail-oi1-x22e.google.com ([2607:f8b0:4864:20::22e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ivu7D-0000Mn-LG for pgsql-general@lists.postgresql.org; Mon, 27 Jan 2020 02:27:05 +0000 Received: by mail-oi1-x22e.google.com with SMTP id i1so5294622oie.8 for ; Sun, 26 Jan 2020 18:27:03 -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-language; bh=UT61EnK96tLJ7NYjdxneagn4ZfqT9Q5SRGG+kG63rUw=; b=IigyXzh6ssCI3HpdQEAgWnAm1Dt4YQ1DA4IFl3Y0tt8m9N2Yyh71dE3B7sRlrRfCwj DLMOQX0eVJQPVI71jv5Y8BeQ5zL87ZVoCuSj9YkCVtNNYMU8U+J3MeSta8/GUFBHn/22 n422bafgyD216ASGS23vnmN/IRXfI/BPYAvL+D7BmcDWY4vQ+Lbzt/7gaZr+3GX4zJPI 26MPAxKlvvcAWHSZnziaRHEbBqITkwoMO2i0yKDc4/gvPVWUWQug5A83Tuk6YawHX8fc 6bHTgnoyIdiqomlAB/qsalsGIcaoMYbjQvtuOcwvBotmV+YrawI813XRRm49xtyXKdKC Wdeg== 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-language; bh=UT61EnK96tLJ7NYjdxneagn4ZfqT9Q5SRGG+kG63rUw=; b=kuEw1orLPHOq3PCP+VYJjXYxCFKfGtuNBzbNHVwF1yBlDEsTMOetW8AyhF8Fn0WKLh eXTz/QnT5T7eiyg405FWaIJ8uSqxSNxeBaN/L33I1LBvIsvoTiXC3fVcS/wafwH1ZjDo 4qjKcepsbO8NIVLCtT3r9Bgdjp4ZZS9Du3rf6iNTQJfC10Di+BZej5y/eSGMjkGpWiO2 8taiIqqJB/eZVuqdzbXLsQkrAZIuAAGvoqNIFA/gXzaKyMNywLlazJGw7lYCiP6Drs6m Hlg0rYSS1d4PLVV2yrpJWvHSw0w0E2e7Mw8KptyHrhhM+gVzmvJY0JGNEtJFYAasN87t tVdA== X-Gm-Message-State: APjAAAWpHdWy46txBfKK4R/Jkbif2np36uDnM+OHF5L2WpEt3TU3RgTx 04G6tGxNL7BOsJNFtwAGPbDEjowHXzc= X-Google-Smtp-Source: APXvYqz62YVE8MT/yiLGTFE9j5U5EDUjDvFON1NXNFSajWQrI1HW9kFFWmQEPsnHwXe8FaWS4h4krw== X-Received: by 2002:aca:c646:: with SMTP id w67mr6061854oif.171.1580092021064; Sun, 26 Jan 2020 18:27:01 -0800 (PST) Received: from [192.168.1.10] (ip70-186-126-197.no.no.cox.net. [70.186.126.197]) by smtp.googlemail.com with ESMTPSA id s145sm4357000oie.44.2020.01.26.18.27.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 26 Jan 2020 18:27:00 -0800 (PST) Subject: Re: How to transfer databases form one server to other To: pgsql-general@lists.postgresql.org References: <157139E4A01D436A859FB6612AE6BBD7@dell2> <1102fee1-eebe-dbe2-63a2-2120380bb2f8@aklaver.com> <111D51B7C5C64419810F09C229E1D917@dell2> <23417975-69b8-e273-2a58-c65beb16decf@aklaver.com> From: Ron Message-ID: Date: Sun, 26 Jan 2020 20:26:59 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <23417975-69b8-e273-2a58-c65beb16decf@aklaver.com> Content-Type: multipart/alternative; boundary="------------CF3E89CC80A9F1EAB70E196A" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------CF3E89CC80A9F1EAB70E196A Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 1/26/20 7:30 PM, Adrian Klaver wrote: > On 1/26/20 2:47 PM, Andrus wrote: >> Hi! >> >>> Before you do any of this I would check the Release Notes for the first >>> release of each major release. Prior to version 10 that would be X.X.x >>> where X is a major release. For 10+ that is X.x.  I would also test the >>> upgrade before doing it on your production setup. >> >> I want to create test transfer first, check applications work and after >> that final transfer. >> >>> Best practice if you are going the dump/restore route is to use the >>> pg_dump binary from the new server(12) to dump the old server(9.1) >> >> Postgres version 12 pg_dump probably cannot installed in old server >> (Debian Squeeze 9). >> Running pg_dump in new server probably takes much more time since data is >> read from uncompressed form and dumping is time-consuming process. >> (internet connection between those server is fast, SSH copy speed was 800 >> Mbit (not 100 Mbit as I wrote), it took 5 minutes to copy 37 GB). > > Test it and see how slow/fast it is. I ran *uncompressed* pg_dump on multiple TB+ sized databases from v8.4 servers across the LAN using 9.6 binaries on the remote server.  It was quite fast.  Threading was key. -- Angular momentum makes the world go 'round. --------------CF3E89CC80A9F1EAB70E196A Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit On 1/26/20 7:30 PM, Adrian Klaver wrote:
On 1/26/20 2:47 PM, Andrus wrote:
Hi!

Before you do any of this I would check the Release Notes for the first release of each major release. Prior to version 10 that would be X.X.x where X is a major release. For 10+ that is X.x.  I would also test the upgrade before doing it on your production setup.

I want to create test transfer first, check applications work and after that final transfer.

Best practice if you are going the dump/restore route is to use the pg_dump binary from the new server(12) to dump the old server(9.1)

Postgres version 12 pg_dump probably cannot installed in old server (Debian Squeeze 9).
Running pg_dump in new server probably takes much more time since data is read from uncompressed form and dumping is time-consuming process.
(internet connection between those server is fast, SSH copy speed was 800 Mbit (not 100 Mbit as I wrote), it took 5 minutes to copy 37 GB).

Test it and see how slow/fast it is.

I ran uncompressed pg_dump on multiple TB+ sized databases from v8.4 servers across the LAN using 9.6 binaries on the remote server.  It was quite fast.  Threading was key.

--
Angular momentum makes the world go 'round.
--------------CF3E89CC80A9F1EAB70E196A--