Re: BUG #17333: pgdg postgresql-common pg_upgradecluster duplicate data_directory in configuration file - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: BUG #17333: pgdg postgresql-common pg_upgradecluster duplicate data_directory in configuration file
Date
Msg-id CAKFQuwb=dp3ycnRHF3P1YktOeQ=9HURvcpnwwZz2ZY_WOAMWqw@mail.gmail.com
Whole thread Raw
In response to BUG #17333: pgdg postgresql-common pg_upgradecluster duplicate data_directory in configuration file  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #17333: pgdg postgresql-common pg_upgradecluster duplicate data_directory in configuration file  (Eric Meygret <eric.meygret@free.fr>)
List pgsql-bugs
On Friday, December 10, 2021, PG Bug reporting form <noreply@postgresql.org> wrote:
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:       

postgresql ignore first value.

As documented
 

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

That script isn’t part of the core project so this list may not be the best place to report complaints.

 

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/' 

Yep, you’ve gone and done some manual edits that the supplied tools do not account for.
 
and now all data are lost. (thanks to backup before upgrade :) ) 

Doing testing on in a test environment first is another useful exercise.
 

hope that my explanation is correct and understandable.

If you are going to go do customizations the fact that the scripts that are built without those customizations in mind fail to work properly isn’t a bug.  I’d suggest you simply use the pg_upgrade tool directly if you don’t like (or adhere to) the assumptions built into the distro-specific scripts.

David J.

pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #17333: pgdg postgresql-common pg_upgradecluster duplicate data_directory in configuration file
Next
From: Eric Meygret
Date:
Subject: Re: BUG #17333: pgdg postgresql-common pg_upgradecluster duplicate data_directory in configuration file