BUG #17333: pgdg postgresql-common pg_upgradecluster duplicate data_directory in configuration file

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #17333: pgdg postgresql-common pg_upgradecluster duplicate data_directory in configuration file
Дата
Msg-id 17333-a00bcda4fab7c6d4@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #17333: pgdg postgresql-common pg_upgradecluster duplicate data_directory in configuration file  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      17333
Logged by:          Eric Meygret
Email address:      eric.meygret@free.fr
PostgreSQL version: 14.1
Operating system:   Ubuntu 20.04
Description:

Hello,
first I want to say that this bug could delete all data, and second sorry
for my bad English.

I tried to upgrade a database from 9.6 to 14(but I think it is the same for
any migrations). 
in /etc/postgresql/9.6/main/postgresql.conf I have to times data_directory
first default value:
data_directory = '/var/lib/postgresql/9.6/main' 
and at the end of file
data_directory = '/postgresql/9.6/main/' 

postgresql ignore first value.

when I launch upgrade with 
pg_upgradecluster -v 14 --method=link --link 9.6 main /postgresql/14/main/

upgrade copy /etc/postgresql/9.6/main/postgresql.conf  to
/etc/postgresql/14/main/postgresql.conf 
and replace first occurrence  so I have :
data_directory = '/postgresql/14/main/' 
and at then end of the configuration file : 
data_directory = '/postgresql/9.6/main/' 

the upgrade failed and start a pg_dropcluster 14 main and this one use the
last occurrence so delete /postgresql/9.6/main/

and now all data are lost. (thanks to backup before upgrade :) ) 

hope that my explanation is correct and understandable.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17330: EXPLAIN hangs and very long query plans
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #17333: pgdg postgresql-common pg_upgradecluster duplicate data_directory in configuration file