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 1iDMgZ-0005BO-ML for pgsql-general@arkaria.postgresql.org; Thu, 26 Sep 2019 05:51:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iDMgY-0002oB-Ho for pgsql-general@arkaria.postgresql.org; Thu, 26 Sep 2019 05:51:26 +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 1iDMgX-0002jT-V7 for pgsql-general@lists.postgresql.org; Thu, 26 Sep 2019 05:51:26 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iDMgS-0001y7-Ts for pgsql-general@lists.postgresql.org; Thu, 26 Sep 2019 05:51:24 +0000 Received: by mail-wm1-x344.google.com with SMTP id p7so1116016wmp.4 for ; Wed, 25 Sep 2019 22:51:19 -0700 (PDT) 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=VBETCipuwL5qCdmkklD4Y6zxwWDPzswdusRAF/aH7TU=; b=uXUOWrlYfz2vsxOWyKP5goIQIw3BjL+3ZE/5EcvgQvFsStTeiJhRQVf21Sx6lksFB4 SZWIsQ9llDNdfzygxHxkgUlUSH/utcQndtiTACb0n7RGGWy8ruPfQ3cu+aoFr4BeIbqE BR4ulAUFLvgNx5ANlnFbq/WLfe+qG5kBmJQ0otU1FoVk3KK2K3vRi2cVPlrmxqDo7iIk 0feDu1lrGKxGArHBsOpbbCsrL31wiJvnsZP+ma4aYQ8ZYM3kklbuASwujqPnPMtfUDy/ lqrgOECqt+Ih6CABjiyGWOZmGYbS9YHtubLoXLanRqDlNF7/HO4sfOxCJIh1hVAPzHAq WQIQ== 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=VBETCipuwL5qCdmkklD4Y6zxwWDPzswdusRAF/aH7TU=; b=pQINiU8Z45bERlXufDxXDduShAhMeKc7YsTp1R2t/AMiFUiP6xYMh31MbJ5jJZ4nB0 FBlMsYxVo1wOaiFRGzkCZn73/OTOuukNvkSbrEoXD8r4sFlNGroulQWWfb78vio50Kkv BcYWM9oI7GiUakgMwnrTiLBf55k0uoDOWzZB+4XwNTxlucZuQPvqMs2fWA8XaIZYgCXD tHl33uCrl6/ldYgexN9x2Qq4hVdyOMHMyvmOYkf6bjxBHeNJERua0sQZTTu7btdO265v 0ySLZ4dVwP584/65c1ehES6bm9Lo85oTIsjxvQhPNNjbyWIdl3oGup9SU7YAaBZUwryI yHxw== X-Gm-Message-State: APjAAAWVEfAWNqMEf1fut8uVF9P9EcxpbbD1/QG8nvep+QyB0o0liyuX jBjC2enLPc4jfTEN/UaaYAarkdvvLUU= X-Google-Smtp-Source: APXvYqxqP651UG2A7RPMC8qTG+4g1DjZAFohtD8+jGECIzhnnBT05fDA6a8OzQpyjf+bZ7W02zMI7w== X-Received: by 2002:a1c:a853:: with SMTP id r80mr1335193wme.140.1569477077900; Wed, 25 Sep 2019 22:51:17 -0700 (PDT) Received: from [192.168.3.150] ([176.222.91.85]) by smtp.gmail.com with ESMTPSA id a18sm2067358wrh.25.2019.09.25.22.51.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Sep 2019 22:51:17 -0700 (PDT) Subject: Re: Upgrading old server To: pgsql-general@lists.postgresql.org References: <8818b028-bd2d-412e-d4e3-e29c49ffee17@zunibal.com> <20190925142933.GH6888@msg.df7cb.de> <18538.1569427239@sss.pgh.pa.us> From: Ekaterina Amez Message-ID: Date: Thu, 26 Sep 2019 07:51:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------32C4B96C5C9B29AEAC9DB27A" 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. --------------32C4B96C5C9B29AEAC9DB27A Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit El 25/9/19 a las 20:21, Adrian Klaver escribió: > On 9/25/19 9:00 AM, Tom Lane wrote: >> Ron writes: >>> On 9/25/19 9:29 AM, Christoph Berg wrote: >>>> Re: Ekaterina Amez 2019-09-25 >>>> <8818b028-bd2d-412e-d4e3-e29c49ffee17@zunibal.com> >>>>> We've decided to upgrade our PostgreSQL production servers. First >>>>> task is >>>>> remove an old v7.14 version. It was supposed to be upgraded to a v8.4 >>>>> server. The server was installed, several databases where released >>>>> here but >>>>> v7.4 was never migrated. The plan is pg_dump this database and >>>>> psql it to >>>>> existing 8.4 server. After this, we'll pg_upgrade. >> >>>> If you doing dump-restore anyway, why not restore into v11 rightaway? I won't use v11 because the existing server where de DB is going to be re-allocated is v8.4. Our Postgres servers are "a bit" out-dated. >> >>> Since it's recommend to run the newer pg_dump on the older database, >>> I've >>> got to wonder if v11 pg_dump can read the v7.4 on-disk structures. >> >> We dropped support for pre-8.0 source servers in pg_dump sometime >> recently, though I forget if v11 is affected by that or not. > > Version 10.0: > > https://www.postgresql.org/docs/10/release-10.html > > Ok, v10 release notes says it explicitly: * Remove pg_dump/pg_dumpall support for dumping from pre-8.0 servers (Tom Lane) Users needing to dump from pre-8.0 servers will need to use dump programs from PostgreSQL 9.6 or earlier. The resulting output should still load successfully into newer servers. >> You could try just dumping with 7.4's pg_dump and seeing if the >> output will load into v11 --- ideally it would, but I'd not be >> surprised if there are issues that have to be resolved manually. >> Or, if you have 8.4's pg_dump at hand, try using that. Yes, that's what I have for my tests: 8.4's pg_dump. >> >> 7.4 to 11 is a big jump to be doing in one step.  There's definitely >> something to be said for porting to an intermediate release, just to >> break down the work into smaller chunks.  But I'd go for halfway >> between, >> which if I counted releases correctly would be about 9.1, not 8.4. >> >>             regards, tom lane >> v8.4 is mandatory middle step, because we'd like to remove v7.14 ASAP and the only available server is 8.4. After that upgrade is what I'm talking about. I was thinking as you, Tom: upgrading to v11 is really a big jump. v10 is also a big jump that scares me less, but maybe going first to 9.6 (which gives us a couple of years) would be a better solution that could let us experiment with some of the new performance features we're interested in. --------------32C4B96C5C9B29AEAC9DB27A Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit


El 25/9/19 a las 20:21, Adrian Klaver escribió:
On 9/25/19 9:00 AM, Tom Lane wrote:
Ron <ronljohnsonjr@gmail.com> writes:
On 9/25/19 9:29 AM, Christoph Berg wrote:
Re: Ekaterina Amez 2019-09-25 <8818b028-bd2d-412e-d4e3-e29c49ffee17@zunibal.com>
We've decided to upgrade our PostgreSQL production servers. First task is
remove an old v7.14 version. It was supposed to be upgraded to a v8.4
server. The server was installed, several databases where released here but
v7.4 was never migrated. The plan is pg_dump this database and psql it to
existing 8.4 server. After this, we'll pg_upgrade.

If you doing dump-restore anyway, why not restore into v11 rightaway?
I won't use v11 because the existing server where de DB is going to be re-allocated is v8.4. Our Postgres servers are "a bit" out-dated.

Since it's recommend to run the newer pg_dump on the older database, I've
got to wonder if v11 pg_dump can read the v7.4 on-disk structures.

We dropped support for pre-8.0 source servers in pg_dump sometime
recently, though I forget if v11 is affected by that or not.

Version 10.0:

https://www.postgresql.org/docs/10/release-10.html


Ok, v10 release notes says it explicitly:

  • Remove pg_dump/pg_dumpall support for dumping from pre-8.0 servers (Tom Lane)

    Users needing to dump from pre-8.0 servers will need to use dump programs from PostgreSQL 9.6 or earlier. The resulting output should still load successfully into newer servers.

You could try just dumping with 7.4's pg_dump and seeing if the
output will load into v11 --- ideally it would, but I'd not be
surprised if there are issues that have to be resolved manually.
Or, if you have 8.4's pg_dump at hand, try using that.
Yes, that's what I have for my tests: 8.4's pg_dump.

7.4 to 11 is a big jump to be doing in one step.  There's definitely
something to be said for porting to an intermediate release, just to
break down the work into smaller chunks.  But I'd go for halfway between,
which if I counted releases correctly would be about 9.1, not 8.4.

            regards, tom lane

v8.4 is mandatory middle step, because we'd like to remove v7.14 ASAP and the only available server is 8.4. After that upgrade is what I'm talking about. I was thinking as you, Tom: upgrading to v11 is really a big jump. v10 is also a big jump that scares me less, but maybe going first to 9.6 (which gives us a couple of years) would be a better solution that could let us experiment with some of the new performance features we're interested in.
--------------32C4B96C5C9B29AEAC9DB27A--