Re: Issue: Creating Symlink for data directory of postgresql in CentOS7

From: Luca Ferrari <fluca1978(at)gmail(dot)com>
To: "Chatterjee, Shibayan" <shibayan(dot)chatterjee(at)centurylink(dot)com>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Issue: Creating Symlink for data directory of postgresql in CentOS7
Date: 2019-07-13 08:12:31
Message-ID: CAKoxK+4yyiOSTXtJiqahPL9j-GN97eNC6NsFJ127Fnj66x6guw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Jul 13, 2019 at 5:12 AM Chatterjee, Shibayan
<shibayan(dot)chatterjee(at)centurylink(dot)com> wrote:
> For sure there's all the necessary files in '/data/postgresql/data'. The startup process cannot read it, because of sym link.
> Executing init-db return the below message:
>

I suspect this could be a systemd problem. What if you try to manually
start the postgres instance?

pg_ctl -D /data/postgresql/data start

What happens then?

> >>>> # sudo postgresql-setup initdb
> Data directory is not empty!

This is of course to prevent you to destroy your system.
I would remove the link, create it to an empty directory and then
initdb such directory as if it is your new database. I imagine that
would start, in such case your data directory is wrong. Can you show
us the content of /data/postgresql/data?

Luca

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Luca Ferrari 2019-07-13 08:15:14 Re: Testing an extension against multiple versions of Postgresql
Previous Message Ian Barwick 2019-07-13 06:03:17 Re: Testing an extension against multiple versions of Postgresql