Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fhefe-0005hO-Rk for pgsql-admin@arkaria.postgresql.org; Mon, 23 Jul 2018 17:30:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fhefc-0005ik-QH for pgsql-admin@arkaria.postgresql.org; Mon, 23 Jul 2018 17:30:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fhefc-0005ic-It for pgsql-admin@lists.postgresql.org; Mon, 23 Jul 2018 17:30:52 +0000 Received: from asil.comp.uvic.ca ([142.104.177.225]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fhefY-0007BA-8p for pgsql-admin@lists.postgresql.org; Mon, 23 Jul 2018 17:30:52 +0000 Received: from strike.comp.uvic.ca (strike.comp.uvic.ca [142.104.191.240]) by asil.comp.uvic.ca (8.14.4/8.14.3) with ESMTP id w6NHUg8L050857 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Mon, 23 Jul 2018 10:30:42 -0700 Subject: Re: Moving the data directory for systemd service startup To: pgsql-admin@lists.postgresql.org References: <56130215-3c42-69cd-2d01-6f8aea6da46a@uvic.ca> <20180723172652.slykd5awgpx7qx6i@vault.lan> From: Evan Rempel Message-ID: <89787ab2-f7a6-9a15-ba29-1e7dc6b9befb@uvic.ca> Date: Mon, 23 Jul 2018 10:29:52 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180723172652.slykd5awgpx7qx6i@vault.lan> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-MW X-UVic-Virus-Scanned: OK - Passed virus scan by ClamAV (clamd) on asil X-UVic-Virus-Scanned: OK - Passed virus scan by Sophos (sophie) on asil X-UVic-Scan: asil.comp.uvic.ca filter_version 3.7.9 X-Scanned-By: MIMEDefang 2.78 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Except that the systemd file comes from the postgresql10-server RPM produced by the PostgreSQL community. I was trying to figure out how the PostgreSQL systemd service file authors intended users to configure a different data directory than the default. On 07/23/2018 10:26 AM, Johannes Truschnigg wrote: > Hi Evan, > > On Mon, Jul 23, 2018 at 10:19:31AM -0700, Evan Rempel wrote: >> [...] >> Am I missing something, or is the configuration of the systemd unit file an oversight? > That's not really a question related to PostgreSQL, but to systemd, and how to > "override" (parts of) your systems' unit files. > > Since you appear to be on EL7, you best check out the docs your distro > provides on the matter: > > https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/sect-managing_services_with_systemd-unit_files#sect-Managing_Services_with_systemd-Unit_File_Modify > > (Spoiler alert: All systemd-using distros are pretty much the same in these > regards, which is one of the benefits of converging towards this service > manager in the GNU/Linux ecosystem.) > > Hth. > -- Evan Rempel erempel@uvic.ca Senior Systems Administrator 250.721.7691 Data Centre Services, University Systems, University of Victoria