Re: postgres not deleting trigger file

From: Jerry Sievers <gsievers19(at)comcast(dot)net>
To: jkilborn <jim(dot)kilborn(at)swri(dot)org>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: postgres not deleting trigger file
Date: 2015-08-04 15:54:28
Message-ID: 86d1z3hwwb.fsf@jerry.enova.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

jkilborn <jim(dot)kilborn(at)swri(dot)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(dot)consulting(at)comcast(dot)net
p: 312.241.7800

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Yurk 2015-08-04 18:40:44 pgpool2 "invalid byte sequence for encoding "UTF8": 0xe5 0x02"
Previous Message John Scalia 2015-08-04 13:46:35 Re: postgres not deleting trigger file