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 1fhepN-00069o-Mu for pgsql-admin@arkaria.postgresql.org; Mon, 23 Jul 2018 17:40:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fhepL-0003lf-Sj for pgsql-admin@arkaria.postgresql.org; Mon, 23 Jul 2018 17:40:55 +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 1fhepL-0003lY-Gz for pgsql-admin@lists.postgresql.org; Mon, 23 Jul 2018 17:40:55 +0000 Received: from truschnigg.info ([78.46.103.228]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fhepI-0007P4-Cw for pgsql-admin@lists.postgresql.org; Mon, 23 Jul 2018 17:40:55 +0000 Received: from vault.lan (84-112-34-152.cable.dynamic.surfer.at [84.112.34.152]) (Authenticated sender: colo) by truschnigg.info (Postfix) with ESMTPSA id 6F8AA402C0; Mon, 23 Jul 2018 19:40:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=truschnigg.info; s=mail; t=1532367651; bh=Owqlt7373zedCkIg2Qz387F5zr7YpehNZqlTjcOwSfA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UR+/JRGZkGKKskVSbanjZK5JhFj7jpsKNyvc7YZgO2ycArT7PbdmF6qqmouEOAYhn X9zSGJ0gZEdiBwr9HcYpHoEFyMMbvGOdlg3FZ/i0MlDiJAWi00dcLzTZ2yrmdZ4r2H L/uOiL4wkv9TRiNGzkkU4kLl3FuVtq1QITyz9MjQ= Date: Mon, 23 Jul 2018 19:40:49 +0200 From: Johannes Truschnigg To: Evan Rempel Cc: pgsql-admin@lists.postgresql.org Subject: Re: Moving the data directory for systemd service startup Message-ID: <20180723174049.c6zs3kg5cra52npt@vault.lan> References: <56130215-3c42-69cd-2d01-6f8aea6da46a@uvic.ca> <20180723172652.slykd5awgpx7qx6i@vault.lan> <89787ab2-f7a6-9a15-ba29-1e7dc6b9befb@uvic.ca> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ptbwtp26aixh4cun" Content-Disposition: inline In-Reply-To: <89787ab2-f7a6-9a15-ba29-1e7dc6b9befb@uvic.ca> User-Agent: NeoMutt/20170113 (1.7.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --ptbwtp26aixh4cun Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Evan, On Mon, Jul 23, 2018 at 10:29:52AM -0700, Evan Rempel wrote: > Except that the systemd file comes from the postgresql10-server RPM produ= ced by the PostgreSQL community. The origin of your unit file doesn't matter to systemd on your EL7 host. You can run # systemctl edit and (recent releases of) systemd will drop you into your $EDITOR in an appropriately created drop-in unit extension file, or you can run # mkdir /etc/systemd/system/.service.d/ # $EDITOR /etc/systemd/system/.service.d/environment.conf and put your "Environment=3DPGDATA=3D/var/lib/pgsql/9.6/data/" stanza (take= care to get the INI-style section right!) into the resulting editor buffer. Once you save that and `systemctl daemon-reload` your unit configuration, y= ou can use # systemctl cat to see what systemd makes of your changes, and then restart the service with the changes applied. The delta you introduced that way will survive package upgrades (but you'll have to re-apply these changes to postgres service units with new/different unit names, i. e. different major versions, in the same manner). --=20 with best regards: - Johannes Truschnigg ( johannes@truschnigg.info ) www: https://johannes.truschnigg.info/ phone: +43 650 2 133337 xmpp: johannes@truschnigg.info Please do not bother me with HTML-email or attachments. Thank you. --ptbwtp26aixh4cun Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEGu9IhkI+7/aKLUWF95W3jMsYfLUFAltWEyEACgkQ95W3jMsY fLXprxAAjQGqQ6+q0YcZT97wqtdux30eD1mbDz4QUe7KMeDgov9sWK2Due9pbd9O 2NwBjSmIW9DwyjtMCI6osocOKycHHLd6C4r6Ie7hdIk6g9eFeMmk3A4kWKiok+Cu KU9oL9shCH2X2giofEfYN8/xTTHijMQ9wk/IjG0q9yjqcAvCliL1bMNxSEDFc4qm y9gM/1udwWwlyyQMIib7nmKtMgqNmOmj/rERCcS1e0PBDuEgdGmBxTePOF1H3sTj Uih2AD3mHqulqEpl61cTExYfyWbZtCxd6/9Ft0DFbCp67K/BlV2xEDwh8kQs1cLn IMlZV+OF1nHtafdIrJyR/OcpdLOT6i8Kb1r/GJGvH71ddGruZC/ZuyPah3X7M/gu uLyqnpQ59Tc6o25rnhHPWdMvMD/n7F1+PSt/YpndQv19KbCK3Gluk72lLgqCZunM 1isDoxFxpJ6aHbn7E4h3iY4WDSogaodvRSl/jRiGmisH1OFE7hZzP+alONzSYMHt 7gkGNMHVeda5dNObe+lygSj7lDND+XnGhsHN+/wKDbhkQhWIx444xb5FM9HtXPzx 1NvjRnW/xdG35E/EocwLv/cYaKCoxyClDo/wxJJW5oGe1sXfJVmTRAmTB+0gfUI1 kZpZ0ch73EYSVqGb4FZanzyZ9qrPywOpqmC0KjK0ZBr5Z5Z4mjU= =LTY/ -----END PGP SIGNATURE----- --ptbwtp26aixh4cun--