From: Jerry Sievers <gsievers19@comcast.net>
To: jkilborn <jim.kilborn@swri.org>
Cc: pgsql-admin@postgresql.org
Subject: Re: postgres not deleting trigger file
Date: Tue, 04 Aug 2015 10:54:28 -0500
Message-ID: <86d1z3hwwb.fsf@jerry.enova.com> (raw)
In-Reply-To: <1438694927835-5860802.post@n5.nabble.com>
References: <1438692397419-5860795.post@n5.nabble.com>
<CABzCKRC=yFbM0rwvBWBaF+ePunHcwhgK7F3tAeppKES-nLAyaA@mail.gmail.com>
<1438694927835-5860802.post@n5.nabble.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
jkilborn <jim.kilborn@swri.org> writes:
> Thanks for the reply.
>
> I think the problem is permissions. The fact that the pgpool runs as root
> user, its likely that postgres can’t remove the created trigger file.
Right /tmp usually has sticky bit set and thus though the directory is
world writeable, one user can't remove a file owned by another as is
the case here.
And IMO having trigger file be in tmp isn't a great idea since anyone on
the box could create the file and have your standby server come out of recovery.
> I ended up doing two things in my pgp failover_stream.sh script, which
> creates the file:
> /bin/ssh -T $new_master /bin/touch $trigger_file
> /bin/ssh -T $new_master chown postgres $trigger_file
>
> Seems with changing the ownership of the trigger file, postgres can now
> delete the file. Not sure why I’m having to do this, as I haven’t seen
> anyone else encounter this issue.
>
> Anyway, with these changes, it appears to be working correctly.
>
> Thanks for the response.
>
> -Jim
>
>
>
>
> --
> View this message in context: http://postgresql.nabble.com/postgres-not-deleting-trigger-file-tp5860795p5860802.html
> Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net
p: 312.241.7800
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: gsievers19@comcast.net, jim.kilborn@swri.org
Subject: Re: postgres not deleting trigger file
In-Reply-To: <86d1z3hwwb.fsf@jerry.enova.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox