Re: pg_upgrade 13.6 to 15.1?

Поиск
Список
Период
Сортировка
От pf@pfortin.com
Тема Re: pg_upgrade 13.6 to 15.1?
Дата
Msg-id 20230115163808.22072dfc@pfortin.com
обсуждение исходный текст
Ответ на Re: pg_upgrade 13.6 to 15.1?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pg_upgrade 13.6 to 15.1?  (pf@pfortin.com)
Список pgsql-general
On Sun, 15 Jan 2023 15:59:20 -0500 Tom Lane wrote:

>pf@pfortin.com writes:
>> On Sun, 15 Jan 2023 14:47:35 -0500 Tom Lane wrote:  
>>> I think you misunderstand how this is supposed to work.  The -D
>>> argument should point at an *empty* data directory that has been
>>> freshly initialized with the new version's initdb.  pg_upgrade then
>>> transfers data into that from the old database (-d argument).  
>
>> I was hoping to avoid the hours worth of copying to the NVMe SSD. 
>> The instructions refer to upgrading with --link; would that save the copy
>> time?  
>
>Yes, but to use --link you must have both data directories on the
>same filesystem, so this is still the wrong thing.
>
>Try something like

My understanding:
>    mv /mnt/work/var/lib/pgsql/data /mnt/work/var/lib/pgsql/data13
- renames the DB

>    initdb /mnt/work/var/lib/pgsql/data
- creates new DB

>    pg_upgrade ... -d /mnt/work/var/lib/pgsql/data13 -D /mnt/work/var/lib/pgsql/data --link ...
- if this only creates hard links; then this should do what I want.  
  My big concern was due to the DB being about 65% of /mnt/work; so doing
  it on the same file system absolutely requires hard links vs copying...

Looks like this is what I was trying to be certain of...   Thanks!!
Pierre

>            regards, tom lane
>
>
>



В списке pgsql-general по дате отправления:

Предыдущее
От: pf@pfortin.com
Дата:
Сообщение: Re: pg_upgrade 13.6 to 15.1?
Следующее
От: HECTOR INGERTO
Дата:
Сообщение: RE: Are ZFS snapshots unsafe when PGSQL is spreading through multiple zpools?