Re: BUG #17497: Data directory has been changed to default

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: ss398439(at)gmail(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17497: Data directory has been changed to default
Date: 2022-05-25 16:41:14
Message-ID: CA+TgmoaGNs8Fk3L6_SMT+h6EviiyHGn1mzLRB1AEeBAkvTAz7w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, May 25, 2022 at 3:23 AM PG Bug reporting form
<noreply(at)postgresql(dot)org> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 17497
> Logged by: Sam Singh
> Email address: ss398439(at)gmail(dot)com
> PostgreSQL version: 11.0
> Operating system: RHEL 7.7
> Description:
>
> Hi all,
>
> Consumer had installed postgresql 11.0 version on RHEL 7.7 and we are
> supporting the OS , we had a patching schedule last week and after that data
> directory which consumer had set for the postgresql has been changed to
> default and directory in which they had initialised the DB was empty ? Can
> someone help in this regards? Is there anything we should check on the
> server ? After looking into logs we are getting error like this role is not
> found .
> Consumers are claiming that data directory was there before patching , even
> I can see in history like db has been initialised on that path , what could
> be the reason behind this ?
> Can someone please help me out with this like what should I check and from
> where I can get the root cause of this issue

This does not sound like a bug in PostgreSQL. It could be a problem
with the RPM, but I would guess it is more likely to be some
misunderstanding on your part about exactly what happened during the
RPM upgrade.

You could look at what RPM was installed and maybe see what pre and
post install scripts it runs, and try to figure it out that way. I
find it pretty hard to believe that an RPM install would have removed
the entire contents of the data directory, though. It might have done
things like move a modified config file out of the way and replace it
with a new version, which could lead you to an incorrect conclusion
about where the data directory used to be, but I doubt it just nuked
it from orbit.

As a side note, the current version of PostgreSQL 11 is PostgreSQL
11.16. That's about four years worth of bug fixes that you're missing.
Hopefully once you get the upgrade procedure sorted out you'll make a
point of upgrading more regularly, because we do fix quite a few bugs.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2022-05-25 16:43:22 Re: BUG #17485: Records missing from Primary Key index when doing REINDEX INDEX CONCURRENTLY
Previous Message Färber 2022-05-25 12:55:36 Extension pg_trgm, permissions and pg_dump order