Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 7612EB5DC71 for ; Wed, 13 Jul 2011 07:32:28 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 32464-09 for ; Wed, 13 Jul 2011 10:32:22 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from noida.interrasystems.com (mail.noida.interrasystems.com [59.163.195.140]) by mail.postgresql.org (Postfix) with ESMTP id C727EB5DBFD for ; Wed, 13 Jul 2011 07:32:21 -0300 (ADT) Received: from [192.168.4.167] ([192.168.4.167]) by noida.interrasystems.com (8.13.8/8.13.8) with ESMTP id p6DAVgFp020335 for ; Wed, 13 Jul 2011 16:01:43 +0530 Message-ID: <4E1D740E.6020000@noida.interrasystems.com> Date: Wed, 13 Jul 2011 16:01:42 +0530 From: Sanjay Rao Reply-To: srao@interrasystems.com Organization: Interra Systems User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: How to auto switch the roles of master and standby References: <1309678517759-4546630.post@n5.nabble.com> In-Reply-To: <1309678517759-4546630.post@n5.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Interrasystems-MailScanner-Information: Please contact the ISP for more information X-Interrasystems-MailScanner: Found to be clean X-Interrasystems-MailScanner-From: srao@noida.interrasystems.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.011 tagged_above=-10 required=5 tests=BAYES_20=-0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201107/80 X-Sequence-Number: 37859 Hi All, I am using postgres 9.0 with streaming replication(master/standby). I want to use pacemaker/corosync to create trigger file to indicate the standby to take over. ho can I execute a script using pacemaker whenever a failure happens. Regards, Sanjay Rao