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 1ieI6t-00035T-Uh for pgsql-general@arkaria.postgresql.org; Mon, 09 Dec 2019 12:25:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ieI6s-0003zm-Ma for pgsql-general@arkaria.postgresql.org; Mon, 09 Dec 2019 12:25:54 +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 1ieI6s-0003zD-8v for pgsql-general@lists.postgresql.org; Mon, 09 Dec 2019 12:25:54 +0000 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ieI6q-0002fr-BJ for pgsql-general@lists.postgresql.org; Mon, 09 Dec 2019 12:25:53 +0000 Received: by mail-wr1-x42a.google.com with SMTP id y17so15988455wrh.5 for ; Mon, 09 Dec 2019 04:25:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zunibal-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=LPr0ICUc76S1Jn7U9/J2SJmmXooM61Hnaxfd9nT3nCw=; b=gYmAlrVOPVdhOPKV50Dxp3mKj0dzCd9KhGtbGE0fsRJSQWSTiao4Q8OTsmwefLOy9W M2/cIMlJxz0WD14OCgBkM7flwFdG6bCymfJkynRKekPdhE+mTxPz1w5jcwtH5AcUjsE9 r4lUWawcxIKc1FM1nB7+RVrzcJyJbxO+4tiRD6K8tvem4pGwgYc3IoQzCOB/Ouk3W80p +wwMto4+RmrUVyLj6z0/Yv9/hznX2q6bfo+tOBkrSIjjoF+9xTAf+tJDY5fyPzgpfhjG GU/r/EEZV8qT/DW+ffXsi+BLRI8VQ+7HilAgZl7t+AOJDMPnQVqM3yn0PIqL5mCHK7GT mxjg== 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=LPr0ICUc76S1Jn7U9/J2SJmmXooM61Hnaxfd9nT3nCw=; b=eJ2ZiSa5av2fmOhqm37xI6KQ7alp17Din6hiMSQZnCExtNq4qXljxsSNfGoEoHOJKI GVwVvagfbCRmaazq2Z0EDNS0i3gaxUoG/Fae/XUBn8yAWrDTcQV0XMarrPjT/mwZ3AcW nsC9XEs4qnMUKoPJgXu36Y4IErNTjJ/9myVmbecG/T4LdTBzkMun8BG3ENdXDNgwJxhr IWOiCTDlT2CACOirZEKDWutqiVp6YpEbfByrS/hcst9oSbRzAJmp3YeRQw4KTBPc1wO/ MyyEczmFZywX5sZR6YEcRe4OCUDf+md+3RdqOYoLbtJ5+3fJ02s9/oGgUjKXmzJgaZMH tEtA== X-Gm-Message-State: APjAAAWqvdtDxojaPPxqtYDIVlxjN2HKMbv7zPWzsKd7R0xJgSBhNM9b tEHzlLXAWnBol7s3HBycyo8LDkkY0gE= X-Google-Smtp-Source: APXvYqweuhlrIaKU4vxKydUjj4/qI9Udf5cj+N17iP32ueYLGZG0Y/4ljIK3pHB1aGp/B99QnUkJ3g== X-Received: by 2002:adf:dfd2:: with SMTP id q18mr1921172wrn.152.1575894346705; Mon, 09 Dec 2019 04:25:46 -0800 (PST) Received: from [192.168.3.150] ([176.222.91.85]) by smtp.gmail.com with ESMTPSA id f16sm13943016wrm.65.2019.12.09.04.25.45 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Dec 2019 04:25:45 -0800 (PST) Subject: Re: migration from 9.4 to 9.6 To: pgsql-general@lists.postgresql.org References: <66e388daa59b07b49e53f00d2a9d05f6ca330501.camel@lists.simkin.ca> From: Ekaterina Amez Message-ID: Date: Mon, 9 Dec 2019 13:25:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 In-Reply-To: <66e388daa59b07b49e53f00d2a9d05f6ca330501.camel@lists.simkin.ca> Content-Type: multipart/alternative; boundary="------------389867C09EF212AD996E7F48" 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. --------------389867C09EF212AD996E7F48 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit El 6/12/19 a las 23:07, Alan Hodgson escribió: > On Fri, 2019-12-06 at 21:38 +0000, Julie Nishimura wrote: >> I'd like to copy one single database from 9.4 cluster to a new 9.6 >> cluster (migration with the upgrade), to the different host >> > > Put 9.4 on the new server. Replicate the db to it. When you're ready > to switch, shut down the master, promote the new db, and then shut it > down and pg_upgrade -k it to 9.6. > > That does require the binaries from both versions to be on the new > server for a while, but it'll give you the least downtime and it's a > very simple replication setup. This is the plan we're going to follow to migrate from 9.2 to 9.6, as this is the only way to achieve almost zero downtime. The cons are, despite what Alan has mentioned, that you need double space because you have to create a slave replica. --------------389867C09EF212AD996E7F48 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit


El 6/12/19 a las 23:07, Alan Hodgson escribió:
On Fri, 2019-12-06 at 21:38 +0000, Julie Nishimura wrote:
I'd like to copy one single database from 9.4 cluster to a new 9.6 cluster (migration with the upgrade), to the different host


Put 9.4 on the new server. Replicate the db to it. When you're ready to switch, shut down the master, promote the new db, and then shut it down and pg_upgrade -k it to 9.6.

That does require the binaries from both versions to be on the new server for a while, but it'll give you the least downtime and it's a very simple replication setup.


This is the plan we're going to follow to migrate from 9.2 to 9.6, as this is the only way to achieve almost zero downtime. The cons are, despite what Alan has mentioned, that you need double space because you have to create a slave replica.

--------------389867C09EF212AD996E7F48--