From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Mr OCP <mr_ocp@yahoo.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Urgent help neede - Important - Tks
Date: Fri, 1 Feb 2002 12:27:27 -0800 (PST)
Message-ID: <20020201122431.W28658-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <20020126171717.25342.qmail@web20601.mail.yahoo.com>
On Sun, 27 Jan 2002, [iso-8859-1] Mr OCP wrote:
> We are trying to implement replication on postgres 7.2
> with java and to effectively run it we need to drop
> all RI triggers from the slave database, but in case
> when master database fails, we will be using Slave as
> the master and would need to restore all these RI
> triggers back on.
>
> Therefore, what I need to know: is there a way to
> place these RI triggers back on, please let me have
> all your ideas, one way is to extract those RI
> creation scripts from the dump but I need some ideas
> how to do that, or if you have any other ideas,
> scripts, anything would be greatly appreciated
Getting the RI creation from a dump should be pretty easy, it should
be the only things using CREATE CONSTRAINT TRIGGER.
If you don't mind losing all triggers on the tables in question, you
could also set reltriggers to 0 on the pg_class row for the tables
and then set it back to the correct value (the number of triggers)
when you want to re-enable them. An example of the reset sql can
be found in a data only pg_dump.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: sszabo@megazone23.bigpanda.com, mr_ocp@yahoo.com
Subject: Re: Urgent help neede - Important - Tks
In-Reply-To: <20020201122431.W28658-100000@megazone23.bigpanda.com>
References: <20020126171717.25342.qmail@web20601.mail.yahoo.com> <20020201122431.W28658-100000@megazone23.bigpanda.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