Re: Howto tell pg_ctl to use a non-default directory for config files

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Howto tell pg_ctl to use a non-default directory for config files
Date: 2026-06-04 20:15:11
Message-ID: 3442636.1780604111@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Ron Johnson <ronljohnsonjr(at)gmail(dot)com> writes:
> On Thu, Jun 4, 2026 at 4:02 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Typically you would say "pg_ctl -D /usr/local/etc/postgres" to point
>> it at the config file. Then you would need the config file to include
>> data_directory and perhaps other settings pointing to wherever the
>> actual data files are.

> Is it standard to point PGDATA to an etc directory instead of to the "data"
> directory?

It is if you want the server's configuration files to be separate from
the data.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jorge Daniel 2026-06-04 21:13:45 Pg14 replication issue , recovery stucks in a random file without advancing while streaming from primary
Previous Message Ron Johnson 2026-06-04 20:09:11 Re: Howto tell pg_ctl to use a non-default directory for config files