Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZMeYE-0005nQ-Ub for pgsql-admin@arkaria.postgresql.org; Tue, 04 Aug 2015 15:54:51 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZMeYE-0003z8-GH for pgsql-admin@arkaria.postgresql.org; Tue, 04 Aug 2015 15:54:50 +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.84) (envelope-from ) id 1ZMeYD-0003w2-Ho for pgsql-admin@postgresql.org; Tue, 04 Aug 2015 15:54:49 +0000 Received: from resqmta-ch2-12v.sys.comcast.net ([2001:558:fe21:29:69:252:207:44]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZMeY9-0005sb-Li for pgsql-admin@postgresql.org; Tue, 04 Aug 2015 15:54:48 +0000 Received: from resomta-ch2-09v.sys.comcast.net ([69.252.207.105]) by resqmta-ch2-12v.sys.comcast.net with comcast id 0fu41r0082GyhjZ01fufep; Tue, 04 Aug 2015 15:54:39 +0000 Received: from jerry.enova.com ([12.30.159.20]) by resomta-ch2-09v.sys.comcast.net with comcast id 0fuU1r00Q0ShjPw01fuXbW; Tue, 04 Aug 2015 15:54:37 +0000 Received: by jerry.enova.com (Postfix, from userid 1001) id C2C027401EA; Tue, 4 Aug 2015 10:54:28 -0500 (CDT) From: Jerry Sievers To: jkilborn Cc: pgsql-admin@postgresql.org Subject: Re: postgres not deleting trigger file References: <1438692397419-5860795.post@n5.nabble.com> <1438694927835-5860802.post@n5.nabble.com> Date: Tue, 04 Aug 2015 10:54:28 -0500 In-Reply-To: <1438694927835-5860802.post@n5.nabble.com> (jkilborn's message of "Tue, 4 Aug 2015 06:28:47 -0700 (MST)") Message-ID: <86d1z3hwwb.fsf@jerry.enova.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1438703679; bh=4VshqfqYYrrTZShAMyzRDBOgqOQ45wio4T0FvhpdEd4=; h=Received:Received:Received:From:To:Subject:Date:Message-ID: MIME-Version:Content-Type; b=XxSHdkbPK5PC2F3ugUl857v3lRYmgefR1pq7mc0copdH5O5UqQUvLiKFFHLW1VCN+ emh8Zynnd4XJsv/2FbYZt0bGJ2noqwkrz4cyD/L1gfY/OKMg66yNQtkDgKaM4jZYRA qiRhUhdV/fhmPD+O5ggHNI3NNqZ6hibctsYTKvFmjX3Kd0ucDBmWegUGv7siWHEa5T wYMySgFgWfjd5TtmnHCx9GJ6FhRpHInmE8YUDZjVpWwkjyqH46Zxyd8ZeqhpDq+xdf QxP0LY/OMvTqAlQCCgOvriskv3b6bMFWHA1cccD+EuLM//LRl2BeE3xbQcASxot35X WSFACeKRUwDdw== X-Pg-Spam-Score: -1.6 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org jkilborn 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