Search Postgresql Archives

Re: Changing the data directory path before the initial configuration of PostgreSQL 10.7.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux