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.