Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wWrMA-002u0p-2k for pgsql-admin@arkaria.postgresql.org; Tue, 09 Jun 2026 07:58:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wWrLA-005pLv-1v for pgsql-admin@arkaria.postgresql.org; Tue, 09 Jun 2026 07:57:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wVEYM-008fdd-2O for pgsql-admin@lists.postgresql.org; Thu, 04 Jun 2026 20:20:34 +0000 Received: from mr-2001j-snip4-5.eps.apple.com ([57.103.68.118] helo=outbound.mr.icloud.com) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wVEYK-000000017tK-1aHm for pgsql-admin@lists.postgresql.org; Thu, 04 Jun 2026 20:20:33 +0000 Received: from outbound.mr.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-west-2a-100-percent-3 (Postfix) with ESMTPS id 4EF7E1800101; Thu, 04 Jun 2026 20:20:27 +0000 (UTC) X-ICL-Out-Info: HUtFAUMEWwJACUgBTUQeDx5WFlZNRAJCTQxIHVwFXhxJDFYBXgNLVxQEGUEEUVsFQgA4Wg5bBEcUFxtcABcNVk1QG18CQg8cE1YVEx9UVgFQUR1fAgoERwRbF0YDU0VfAhcRUAFYHlZeWhdeTUcfQE1iSQFaGVscQBdKbk1TDw8ZWhRcGFNFUR9UWF4EU1YOQg88cC8HWXRdD08DXhpfcUQPVQpfdCkfMghNcF0FKHFGDz11LV4IXh9MHB0OWAYMUE0BQwgKAlEcVg1X Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1780604430; x=1783196430; bh=POfKvV1N4ZioAxTHgx58I90tACgEPFslthiL93UOu1c=; h=Content-Type:Mime-Version:Subject:From:Date:Message-Id:To:x-icloud-hme; b=akI64XchNpPHfb62VCw4szyOhuRWjeyWKBJZJRNNFiKK5Gila76adZsv+Igw567ZbKUCu47RwhSRE8oLowtuholeWTzsr5/1XdmWk7w5Sse1MkkkYGzfjjnAiiGixKJbOQaQkjSmSUmbqL+Qtou/D4yFMfN06nzlw//2GaAwGZMk9TCm5b4xaSK+CrZS2HinhWzuRpTZIAMDMf3l6zrfqpGx2adgQ/bVKRASy/Yd69B18Ezg9ngGy74xFrYTvQDsHiTli2aEbu5AmnbC/Yl+OFlYcDbqD2UHX4DcSS3IYJfTb4OWnSsP1JHBiQHwHKbNwyhA1ePSfi+MoOZdDVecmA== mail-alias-created-date: 1390853265000 Received: from smtpclient.apple (unknown [17.57.152.38]) by p00-icloudmta-asmtp-us-west-2a-100-percent-3 (Postfix) with ESMTPSA id 407FD1800A71; Thu, 04 Jun 2026 20:20:26 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.600.51.1.1\)) Subject: Re: Howto tell pg_ctl to use a non-default directory for config files From: arif rahman In-Reply-To: <3441657.1780603341@sss.pgh.pa.us> Date: Thu, 4 Jun 2026 13:20:15 -0700 Cc: Michael Grimm , pgsql-admin@lists.postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <26DCB02F-6703-4C46-92CB-B15C02CC66EF@icloud.com> References: <3441657.1780603341@sss.pgh.pa.us> To: Tom Lane X-Mailer: Apple Mail (2.3864.600.51.1.1) X-Authority-Info-Out: v=2.4 cv=VJzQXtPX c=1 sm=1 tr=0 ts=6a21de0b cx=c_apl:c_pps:t_out a=9OgfyREA4BUYbbCgc0Y0oA==:117 a=9OgfyREA4BUYbbCgc0Y0oA==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=x7bEGLp0ZPQA:10 a=l1mA5Xt646AA:10 a=VkNPw1HP01LnGYTKEx00:22 a=epTmVMiNAAAA:8 a=T_YFPyFoAAAA:8 a=Anf4i8JyGgFg16bPgAUA:9 a=QEXdDO2ut3YA:10 a=fKaBkT6cBtmegwcwHIDe:22 X-Proofpoint-GUID: 3VPGp4PpfZ4cVC8nJscUBZ6vqLcXhfFM X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjA0MDE5OSBTYWx0ZWRfX/LLwr7+Z024a 6coLX9ieoYcxRtn2ZOScqhB71zRnesba2Ho+0nSWAQx3EzjZB0fMT68RB4zuf7ZCG+SaKoOOvV4 DR0kCtJtnGDgqlipdanwE2UlPcVVRbp3oq9Cr6cAYLPFYgfj/CKkLowTVEWn094WlQIzaDEemUd HqbORs8W3ZHMNtkQM/DUwDXZOBfG53s0WjStr/vkRjPf8n4WCwanAC2HkTwDucMFNqLYqJVOgbq AUC5xWrIvp9XhHSPAgsXRab06DfmZNTh6UjnBt3cyIS8DcyuG2s4XtVHe2LPJOB8cEsdlK5B3nd 0By4iBf+iE2fTAx0ZJa8Kp0IT2ykyS6WUNsA4+2U1Wfh1wHD19RwywFHgtj06A= X-Proofpoint-ORIG-GUID: 3VPGp4PpfZ4cVC8nJscUBZ6vqLcXhfFM List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk In PostgreSQL, the configuration files do not have to live inside the = data directory. You can place them elsewhere and tell PostgreSQL where = to find them. # Set postgresql.conf outside the data directory hba_file =3D '/usr/local/etc/postgres/pg_hba.conf=E2=80=99 # pg_hba.conf For Patroni or pg_auto_failover Use scram-sha-256 local all all peer host all all 127.0.0.1/32 scram-sha-256 host all all ::1/128 scram-sha-256 Then start=20 postgres -D /var/db/postgres/data \ -c config_file=3D/usr/local/etc/postgres/postgresql.conf > On Jun 4, 2026, at 1:02=E2=80=AFPM, Tom Lane = wrote: >=20 > Michael Grimm writes: >> Question:=20 >> Is there a way to tell PostgreSQL to look for config files in e.g. = /usr/local/etc/postgres, where normally all config files reside in = FreeBSD? [2] >=20 > 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. See >=20 > = https://www.postgresql.org/docs/current/runtime-config-file-locations.html= >=20 > regards, tom lane >=20 >=20