pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: pf@pfortin.com
To: pgsql-general@lists.postgresql.org
Subject: Re: pg_upgrade 13.6 to 15.1?
Date: Sun, 15 Jan 2023 16:27:50 -0500
Message-ID: <20230115162750.24141c47@pfortin.com> (raw)
In-Reply-To: <0276c684-7091-08c0-5854-0899111a0b19@aklaver.com>
References: <20230115142732.0ec38e2a.pfortin@pfortin.com>
	<9a8899f2-211f-ae2a-1071-c1567d7ae988@aklaver.com>
	<20230115154139.5a60b4dd@pfortin.com>
	<0276c684-7091-08c0-5854-0899111a0b19@aklaver.com>

On Sun, 15 Jan 2023 13:00:58 -0800 Adrian Klaver wrote:

>On 1/15/23 12:41, pf@pfortin.com wrote:
>> On Sun, 15 Jan 2023 12:23:10 -0800 Adrian Klaver wrote:
>>   
>>> On 1/15/23 11:27, pf@pfortin.com wrote:  
>>>> Hi,
>>>>
>>>> I'm fairly new to postgres; but have databases with about 2TB of data.
>>>>
>>>> Trying to upgrade from 13.6 to 15.1, pg_upgrade complains with:
>>>> [postgres@pf ~]$ /usr/bin/pg_upgrade -b /usr/local/pgsql/bin -B /usr/bin \
>>>>     -d /mnt/db/var/lib/pgsql/data -D /mnt/work/var/lib/pgsql/data \
>>>>     -s /tmp -U postgres  
>>>  
>>>> Nothing I read implies the need to upgrade to 14.x first...  Right?  
>>>
>>> In addition to Tom Lane's comments I would recommend reading this:
>>>
>>> https://www.postgresql.org/docs/current/pgupgrade.html
>>>
>>> multiple times. There is a lot going on there and it will take a couple
>>> of reads at least to begin to understand it all.  
>> 
>> Yup...  that's what I've been working from...  See my reply to Tom re
>> --link...  
>
>1) Working from and understanding are two different things. For instance 
>further on in the docs there is:
>
>--clone
>
>     Use efficient file cloning (also known as “reflinks” on some 
>systems) instead of copying files to the new cluster. This can result in 
>near-instantaneous copying of the data files, giving the speed 
>advantages of -k/--link while leaving the old cluster untouched.
>
>     File cloning is only supported on some operating systems and file 
>systems. If it is selected but not supported, the pg_upgrade run will 
>error. At present, it is supported on Linux (kernel 4.5 or later) with 
>Btrfs and XFS (on file systems created with reflink support), and on 
 ^^^^^^^^^^^^^

Unless there's an update to pg_upgrade that's still undocumented; this is
not an option since like so many Linux users, my file system is ext4.

>macOS with APFS.
>
>2) From the docs:
>
>Run pg_upgrade
>
>Always run the pg_upgrade binary of the new server, not the old one. 
>pg_upgrade requires the specification of the old and new cluster's data 
>and executable (bin) directories. You can also specify user and port 
>values, and whether you want the data files linked or cloned instead of 
>the default copy behavior.
>
>
>3) Again, read the docs multiple times there is a lot to understand.

Agreed. But they could be a little clearer...  :)

>> Thanks!
>>   
>>>>
>>>> Thanks
>>>> Pierre
>>>>
>>>>
>>>>      
>>>  
>> 
>>   
>





view thread (15+ messages)  latest in thread

Message-ID: <20230115162750.24141c47@pfortin.com>
Permalink:  ../20230115162750.24141c47@pfortin.com/
Also on:    postgresql.org/message-id/20230115162750.24141c47@pfortin.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: pf@pfortin.com
  Subject: Re: pg_upgrade 13.6 to 15.1?
  In-Reply-To: <20230115162750.24141c47@pfortin.com>
  References: <20230115142732.0ec38e2a.pfortin@pfortin.com> <9a8899f2-211f-ae2a-1071-c1567d7ae988@aklaver.com> <20230115154139.5a60b4dd@pfortin.com> <0276c684-7091-08c0-5854-0899111a0b19@aklaver.com> <20230115162750.24141c47@pfortin.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox