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

From: Keith Christian <keith1christian(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Changing the data directory path before the initial configuration of PostgreSQL 10.7.1
Date: 2020-12-24 15:21:51
Message-ID: CAFWoy7GO_gXyjAyFAX_OPqc19U3HiBtVcOH76hgP2R=RmrQPow@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2020-12-24 16:52:47 Re: Missing rows after migrating from postgres 11 to 12 with logical replication
Previous Message Devrim Gündüz 2020-12-24 15:10:25 Re: Changing the data directory path before the initial configuration of PostgreSQL 10.7.1