Re: Issues with systemd unit file for repmgr

From: Simon Oxwell <soxwell(at)funnelback(dot)com>
To: Devrim GÜNDÜZ <devrim(at)gunduz(dot)org>, pgsql-pkg-yum(at)postgresql(dot)org
Cc: saas <saas(at)funnelback(dot)com>
Subject: Re: Issues with systemd unit file for repmgr
Date: 2015-07-14 06:04:17
Message-ID: 55A4A661.1080204@funnelback.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-pkg-yum

On 6/07/2015 12:56 am, Devrim GÜNDÜZ wrote:
>> After a bit of hacking, I've got a version that's working and is a
>> little more flexible with some some of the extra command line options
>> of repmgrd. What's the best way of sharing it back to team? As a
>> patch file or as a pull request?
> You can do both, I personally prefer the patch in the mailing list.
>
>
Hi Devrim,

I also ran into problems with repmgrd running as the repmgr user that
gets created in the specfile. It was unable to promote the standby
database to a master, because it wasn't running at the postgres user.
All the of the examples that are part of the documentation for repmgr
specify running them as the postgres user.

As a result my unit file runs repmgrd as postgres. I did have to chown
/var/log/repmgr to be owned by postgres:postgres as the specfile creates
it as repmgr:repmgr.

Other changes:

* moved most of the environment variables out to a sysconfig file
(/etc/sysconfig/repmgr94). This let me change options as well,
rather than having to edit the unit file. Much easier to be able to
manipulate with something like puppet, and can be sourced by the
SysV init script as well.
* used a PIDFile directive. This unfortunately required hardcoding the
location of the PID file twice in the unit file, as PIDFile only
takes an absolute pathname or it throws an error. Without this,
systemd can't seem to guess the PID correctly when it comes to
shutting down.

Hope this is of use.

The other issue I have is that repmgr can't actually parse the sample
config file that the package makes the default config file, but I'm
working on a patch to submit to 2nd Quadrant for that.

(Just for reference, I'm using the repmgr94 package with Postgresql94)

Thanks,

Simon

Attachment Content-Type Size
repmgr94 text/plain 260 bytes
repmgr94.service text/plain 1.2 KB

In response to

Browse pgsql-pkg-yum by date

  From Date Subject
Next Message Mark Wong 2015-07-21 15:22:50 Re: adding a new platform
Previous Message Devrim GÜNDÜZ 2015-07-13 11:35:34 Re: 2.1.8 Update?