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: Changing the data directory path before the initial configuration of PostgreSQL 10.7.1
Date: 2020-12-24 13:35:28
Message-ID: CAFWoy7Ek12pR_9a2F3TxgEOZCMKMR5z5Y7rxyp2dYgn5R045uA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Postgres friends,

Using Postgres 10.7.1 on Fedora core 28. Admittedly not the latest
but am helping a colleague with a production system who needs a
PostgreSQL instance on this machine.

The default /var/lib/pgsql/data directory needs to go on another
partition with more space, let's call it /xyz, so the desired data
path during configuration is /xyz/var/lib/pgsql/data.

Is it possible to edit one of the conf files and replace
/var/lib/pgsql/data with /xyz/var/lib/pgsql/data before the
/usr/bin/postgresql-setup --initdb command is run?

Or, does /usr/bin/postgresql-setup --initdb have a command line option
to configure /xyz/var/lib/pgsql/data as the desired data directory?

Thanks.

Responses

Browse pgsql-general by date

  From Date Subject
Next 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
Previous Message Devrim Gündüz 2020-12-24 10:41:58 Re: FATAL: could not load library "/usr/pgsql-13/lib/libpqwalreceiver.so" during replication