Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eISqk-0005Se-Oz for pgsql-admin@arkaria.postgresql.org; Sat, 25 Nov 2017 05:17:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eISqk-00059b-1s for pgsql-admin@arkaria.postgresql.org; Sat, 25 Nov 2017 05:17:58 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eISqj-00059O-Ox for pgsql-admin@lists.postgresql.org; Sat, 25 Nov 2017 05:17:57 +0000 Received: from mail-yw0-x232.google.com ([2607:f8b0:4002:c05::232]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eISqe-0004bh-JP for pgsql-admin@postgresql.org; Sat, 25 Nov 2017 05:17:56 +0000 Received: by mail-yw0-x232.google.com with SMTP id z125so8757782ywb.0 for ; Fri, 24 Nov 2017 21:17:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=9Mxp0orv+O7MWVtakUFTmcPjZqoCA4hw/ek2333y11U=; b=rk6EvkGp7JLfyHoq1pwRaqisSypTHWsp57JFFMfBS02pVFj6QMrevENpWyGCPrr17Y 2lLG5OMh9O8EIltm2vr7aDLVhjAfyRMyqRqzx1zNP1vvKansjzAG4X4//1ZrtoIaQqSx RavA5wRyXQ+AnS9q0DipVSIB1FYfOfgoXyLaz0Xxb2aA7JvrCqRRolcU0uh1ZHVemaUY 5bL5zMlKFifhG/LmdRmbqdrwJGcBf8+iPL7JZnKf8p5cggnOmEDAIEOMUIoVHUetjx4d dAHkBRZ8uB7ghGEW7PG1+2O7CQkWJugRWGp5iicBEiokqUHiKlJxCZimgp4OagmiHxa3 VIQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=9Mxp0orv+O7MWVtakUFTmcPjZqoCA4hw/ek2333y11U=; b=SUeRlTUWySLfwr8Nrhs+g/5FiFHeOWkcTElUsoJqLEyk2FG8x20rJAe9YwayRjUjdL 4qJv+NLHQcqYGU6bybcI2AItAWxWZB+2irlcFcjuuKBsnTfD5hz1bdAf7+ICUHQxC3N+ OREOji1hXCtqd0gHdvfg8IdSEjjiGNZtkcEC46fbYSYZ3la07yUN2ddcVstBkhzThC0G Cturerg5MJNjN/zQyBwJDr7jik2SdKKfRcm+cPcgKGQz/yO6UNVm9adV5DdW7AuaaIBJ K0LTFjcs44LjILaf1gwTkVTVAlK3aacjxRrMzecFRSAAp1WHBHzxhsUBdBDa/BgiKi7C pVig== X-Gm-Message-State: AJaThX7i0ncFrXEMCs2PRWnmr3kQyLTpBlGY8Qd7Idarc1Px8go+f0m8 bbOjqF4yVKW8va4WuVHATUz1Uci2AqCNqfiWxn4= X-Google-Smtp-Source: AGs4zMZC7wNpgs0/18jq6ODwsY9D6a9jOKK1whicOe6b5yco0gvmIdhEh+Tliz7Ih1z0k7FMQEdvf+tnNDU9ri7UKR8= X-Received: by 10.129.39.200 with SMTP id n191mr21075505ywn.388.1511587070284; Fri, 24 Nov 2017 21:17:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.122.148 with HTTP; Fri, 24 Nov 2017 21:17:49 -0800 (PST) Received: by 10.129.122.148 with HTTP; Fri, 24 Nov 2017 21:17:49 -0800 (PST) In-Reply-To: References: From: Debraj Manna Date: Sat, 25 Nov 2017 10:47:49 +0530 Message-ID: Subject: RE: Faster way of upgrading postgresql to 10 from 9.5 To: Alvaro Aguayo Garcia-Rada Cc: pgsql-admin Content-Type: multipart/alternative; boundary="001a1141826a5f187a055ec7ca68" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --001a1141826a5f187a055ec7ca68 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ok. Is there any other approach by which I can do the migration without doubling the disk space? I can bear small downtime. Sent from GMail on Android On Nov 25, 2017 10:40 AM, "Alvaro Aguayo Garcia-Rada" < aaguayo@opensysperu.com> wrote: Yes, but only during the migration. After fi ishing and checking your data, you can stop & destroy the old instance Of course, this is only needed if you want a zero or little downtime migration, specially on production environment. Regards, Alvaro Aguayo Jefe de Operaciones Open Comb Systems E.I.R.L. Oficina: (+51-1) 3377813 | RPM: #034252 / (+51) 995540103 | RPC: (+51) 954183248 Website: www.ocs.pe Sent from my Sony Xperia=E2=84=A2 smartphone ---- Debraj Manna wrote ---- I am using one node postgres. So if I am setting up pglogical then I guess disk space will double up? Sent from GMail on Android On Nov 25, 2017 9:34 AM, "Alvaro Aguayo Garcia-Rada" < aaguayo@opensysperu.com> wrote: > You can do an (almost) zero downtime migration between any postgres > version starting with 9.2 using pglogical. > > Basically, you first set up your new instance as a full replica of the ol= d > one. Then, you change whatever configuration your app has, changing the > connection parameters so they point to the new instance, reboot your app(= s) > if needed, and that's all. As pglogical does not blocks changes on slaves= , > your app will run normally even with pglogical installed and active, > letting you a time frame where you can have some connections still > pointing to your old instance, with changes made on such connections bein= g > reflected on your new instance(warning: the opposite way will not happen. > > Regards, > > Alvaro Aguayo > Jefe de Operaciones > Open Comb Systems E.I.R.L. > > Oficina: (+51-1) 3377813 | RPM: #034252 / (+51) 995540103 | RPC: (+51) > 954183248 > Website: www.ocs.pe > > Sent from my Sony Xperia=E2=84=A2 smartphone > > ---- Debraj Manna wrote ---- > > > Cross posting from stack-exchange > > > *I am trying to test the migration of postgres to 10 from 9.5* > > *On trying in a test DB of size 490 GB in one postgres node it is taking > about 18 mins. The command I used* > > *sudo -H -u postgres /usr/lib/postgresql/10/bin/pg_upgrade \* > * -b /usr/lib/postgresql/9.5/bin \* > * -B /usr/lib/postgresql/10/bin \* > * -d /var/lib/postgresql/data/postgresql0 \* > * -D /var/lib/postgresql/10/data/postgresql0 \* > * -o ' -c config_file=3D/etc/postgresql/9.5/main/postgresql.conf' \* > * -O ' -c config_file=3D/etc/postgresql/10/main/postgresql.conf' -k * > > *Is there any faster way of doing this?* > --001a1141826a5f187a055ec7ca68 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Ok.=C2=A0

Is there any other approach by which I can do the migration witho= ut doubling the disk space?

I can bear small downtime.

Sent from GMail on Android

On Nov 25, = 2017 10:40 AM, "Alvaro Aguayo Garcia-Rada" <aaguayo@opensysperu.com> wrote:
Yes, but only during the mi= gration. After fi ishing and checking your data, you can stop & destroy= the old instance

Of course, this is only needed if you want a zero = or little downtime migration, specially on production environment.


Regards,

Alvaro Aguayo
Jefe de Operacio= nes
Open Comb Systems E.I.R.L.

Oficina: (+51-1)=C2=A03= 377813=C2=A0| RPM: #034252 / (+51)=C2=A0995540103=C2=A0 | RPC: (+51)=C2=A0954183248
Website:=C2=A0www.ocs.pe

Sent from my Sony Xperia=E2= =84=A2 smartphone

---- Debraj Manna wrote ----


I am using one node pos= tgres.=C2=A0

So if I am settin= g up pglogical then I guess disk space will double up?

Sent from GMail on Android

On Nov 2= 5, 2017 9:34 AM, "Alvaro Aguayo Garcia-Rada" <aaguayo@opensysperu.com>= ; wrote:
Y= ou can do an (almost) zero downtime migration between any postgres version = starting with 9.2 using pglogical.

Basically, you first set up your = new instance as a full replica of the old one. Then, you change whatever co= nfiguration your app has, changing the connection parameters so they point = to the new instance, reboot your app(s) if needed, and that's all. As p= glogical does not blocks changes on slaves, your app will run normally even= with pglogical installed and active, letting you a time frame where you ca= n=C2=A0 have some connections still pointing to your old instance, with cha= nges made on such connections being reflected on your new instance(warning:= the opposite way will not happen.

Regards,

Alvaro Aguayo
= Jefe de Operaciones
Open Comb Systems E.I.R.L.

Oficina: (+51-1)=C2=A03377813=C2=A0| RPM: #034252 / (+51)=C2=A0995540103=C2=A0 | RPC: (+51)=C2=A0954183248
Website:=C2=A0www.ocs.pe

Sent from my= Sony Xperia=E2=84=A2 smartphone

---- Debraj Manna wrote ----

Cross posting from stack-exchange

I am tr= ying to test the migration of postgres to 10 from 9.5

=
On trying in a test DB of size 490 GB in one postgres nod= e it is taking about 18 mins. The command I used

<= /div>
sudo -H -u postgres /usr/l= ib/postgresql/10/bin/pg_upgrade \
=C2=A0 =C2=A0-b /usr/lib/postgresql/9.5/bin \
=C2=A0 =C2=A0-B /usr= /lib/postgresql/10/bin \
=C2=A0 =C2=A0-d /var/lib/postgresql/data/postgresql0 \
=C2=A0 =C2=A0-D /var= /lib/postgresql/10/data/postgresql0 \
=C2=A0 =C2=A0-o ' -c config_file=3D/etc/po= stgresql/9.5/main/postgresql.conf' \
=C2=A0 =C2=A0-O ' -c config_file=3D/etc/= postgresql/10/main/postgresql.conf' -k=C2=A0
=
Is there any faster way of doing this?=

--001a1141826a5f187a055ec7ca68--