[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    Re: Changing the data directory path before the initial configuration of PostgreSQL 10.7.1
From:       Keith Christian <keith1christian () gmail ! com>
Date:       2020-12-24 15:21:51
Message-ID: CAFWoy7GO_gXyjAyFAX_OPqc19U3HiBtVcOH76hgP2R=RmrQPow () mail ! gmail ! com
[Download RAW message or body]

> The easiest way is moving /var/lib/pgsql/data under /xyz directory
> (when the db is not running) and create a symlink in the original
> location:
>
> chown postgres: /xyz
> su - postgres
> mv /var/lib/pgsql/data /xyz/10-data
> ln -s /xyz/10-data /var/lib/pgsql/data
>
> Then you can use setup script as usual.
>
> Another alternative is creating a copy of the unit file under
> /etc/systemd/system, changing $PGDATA inside that file and run the
> setup script. This should be documented on the top of the unit file.
>

Devrim,

Appreciate your quick reply and complete insructions, I'm certain that will
work!

Thank you.

[Attachment #3 (text/html)]

<div dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr" \
class="gmail_attr"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"> The easiest way is moving \
/var/lib/pgsql/data under /xyz directory<br> (when the db is not running) and create \
a symlink in the original<br> location:<br>
<br>
chown postgres: /xyz<br>
su - postgres<br>
mv /var/lib/pgsql/data /xyz/10-data<br>
ln -s /xyz/10-data /var/lib/pgsql/data<br>
<br>
Then you can use setup script as usual.<br>
<br>
Another alternative is creating a copy of the unit file under<br>
/etc/systemd/system, changing $PGDATA inside that file and run the<br>
setup script. This should be documented on the top of the unit \
file.<br></blockquote></div><div dir="auto"><br></div><div \
dir="auto">Devrim,</div><div dir="auto"><br></div><div dir="auto">Appreciate your \
quick reply and complete insructions, I&#39;m certain that will work!</div><div \
dir="auto"><br></div><div dir="auto">Thank you.</div><div dir="auto"><br></div><div \
dir="auto"><br></div><div class="gmail_quote" dir="auto"><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> </blockquote></div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic