Re: Issue: Creating Symlink for data directory of postgresql in CentOS7 - Mailing list pgsql-general

From Luca Ferrari
Subject Re: Issue: Creating Symlink for data directory of postgresql in CentOS7
Date
Msg-id CAKoxK+4yyiOSTXtJiqahPL9j-GN97eNC6NsFJ127Fnj66x6guw@mail.gmail.com
Whole thread Raw
In response to RE: Issue: Creating Symlink for data directory of postgresql inCentOS7  ("Chatterjee, Shibayan" <shibayan.chatterjee@centurylink.com>)
List pgsql-general
On Sat, Jul 13, 2019 at 5:12 AM Chatterjee, Shibayan
<shibayan.chatterjee@centurylink.com> wrote:
> For sure there's all the necessary files in '/data/postgresql/data'. The startup process cannot read it, because of
symlink.
 
> 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



pgsql-general by date:

Previous
From: Ian Barwick
Date:
Subject: Re: Testing an extension against multiple versions of Postgresql
Next
From: Luca Ferrari
Date:
Subject: Re: Testing an extension against multiple versions of Postgresql