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 1haEUZ-00086B-9R for pgsql-general@arkaria.postgresql.org; Mon, 10 Jun 2019 07:13:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1haEUY-0002KZ-6O for pgsql-general@arkaria.postgresql.org; Mon, 10 Jun 2019 07:13:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1haEUX-0002Jo-Ph for pgsql-general@lists.postgresql.org; Mon, 10 Jun 2019 07:13:17 +0000 Received: from hermes.gatewaynet.com ([193.92.121.98]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1haEUU-0002nF-8P for pgsql-general@lists.postgresql.org; Mon, 10 Jun 2019 07:13:16 +0000 Received: from smadev.internal.net (pc131.internal.net [10.9.200.131]) by hermes.gatewaynet.com (8.15.2/8.15.2/Debian-8) with ESMTPS id x5A7D6Qi002396 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 10 Jun 2019 10:13:11 +0300 Received: from smadev.internal.net (smadev [10.9.200.131]) by smadev.internal.net (8.15.2/8.15.2) with ESMTP id x5A7D6Gv039138 for ; Mon, 10 Jun 2019 10:13:06 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) Subject: Re: Upgrade from PostgreSQL 9.6 to 11 To: pgsql-general@lists.postgresql.org References: <04565a9e-fc52-f07b-e3d6-f3a877c1e81f@matrix.gatewaynet.com> <20190610063650.GF2199@paquier.xyz> From: Achilleas Mantzios Message-ID: Date: Mon, 10 Jun 2019 10:13:06 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.3.2 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------20F76D91402E3F761C9C5FE8" Content-Language: en-US X-Virus-Scanned: clamav-milter 0.100.3 at hermes X-Virus-Status: Clean X-Spam-Status: No, score=-28.0 required=5.0 tests=ALL_TRUSTED,DYN_HAM_COORD, DYN_HAM_IT,DYN_HAM_NAUTICAL,HTML_MESSAGE autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hermes.gatewaynet.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------20F76D91402E3F761C9C5FE8 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 10/6/19 9:52 π.μ., Pawan Sharma wrote: > Thanks all, > > Is pg_upgrade is the best method if I am doing upgrade on same server or different server. > > Same server means: source and Target on same server > > Different: source and Target are different server. A traditional upgrade by definition is on the same server, (if we are not talking about logical replication or any other equivalent technology). So yes pg_upgrade is what would be best, along with -k (--link) for maximum speed. > > > On Mon, Jun 10, 2019, 12:07 PM Michael Paquier > wrote: > > On Mon, Jun 10, 2019 at 09:00:38AM +0300, Achilleas Mantzios wrote: > > On 10/6/19 7:36 π.μ., Pawan Sharma wrote: > >> What is the best way to upgrade from PostgreSQL 9.6 to PostgreSQL > >> 11 instead of pg_upgrade. > > > > why not pg_upgrade ? If the size is near the 3TB mark as you say, > > pg_upgrade is the fastest IMHO. > > When it comes to upgrades, you could also look at logical > replication.  Unfortunately your origin version cannot do that.  Have > you looked at things like BDR or Slony?  They are logical-based, > meaning a lower downtime than pg_upgrade, but they take longer. > > For 3TB pg_upgrade can also be very fast if you use --link. Be wary > of having backups though, all the time. > -- > Michael > -- Achilleas Mantzios IT DEV Lead IT DEPT Dynacom Tankers Mgmt --------------20F76D91402E3F761C9C5FE8 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
On 10/6/19 9:52 π.μ., Pawan Sharma wrote:
Thanks all,

Is pg_upgrade is the best method if I am doing upgrade on same server or different server.

Same server means: source and Target on same server

Different: source and Target are different server.
A traditional upgrade by definition is on the same server, (if we are not talking about logical replication or any other equivalent technology).
So yes pg_upgrade is what would be best, along with -k (--link) for maximum speed.


On Mon, Jun 10, 2019, 12:07 PM Michael Paquier <michael@paquier.xyz> wrote:
On Mon, Jun 10, 2019 at 09:00:38AM +0300, Achilleas Mantzios wrote:
> On 10/6/19 7:36 π.μ., Pawan Sharma wrote:
>> What is the best way to upgrade from PostgreSQL 9.6 to PostgreSQL
>> 11 instead of pg_upgrade.
>
> why not pg_upgrade ? If the size is near the 3TB mark as you say,
> pg_upgrade is the fastest IMHO.

When it comes to upgrades, you could also look at logical
replication.  Unfortunately your origin version cannot do that.  Have
you looked at things like BDR or Slony?  They are logical-based,
meaning a lower downtime than pg_upgrade, but they take longer.

For 3TB pg_upgrade can also be very fast if you use --link.  Be wary
of having backups though, all the time.
--
Michael


-- 
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt
--------------20F76D91402E3F761C9C5FE8--