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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "eric(dot)meygret(at)free(dot)fr" <eric(dot)meygret(at)free(dot)fr>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17333: pgdg postgresql-common pg_upgradecluster duplicate data_directory in configuration file
Date: 2021-12-10 18:56:04
Message-ID: CAKFQuwb=dp3ycnRHF3P1YktOeQ=9HURvcpnwwZz2ZY_WOAMWqw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Friday, December 10, 2021, PG Bug reporting form <noreply(at)postgresql(dot)org>
wrote:

> The following bug has been logged on the website:
>
> Bug reference: 17333
> Logged by: Eric Meygret
> Email address: eric(dot)meygret(at)free(dot)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.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Eric Meygret 2021-12-10 19:55:21 Re: BUG #17333: pgdg postgresql-common pg_upgradecluster duplicate data_directory in configuration file
Previous Message PG Bug reporting form 2021-12-10 16:41:18 BUG #17333: pgdg postgresql-common pg_upgradecluster duplicate data_directory in configuration file