Re: Urgent help neede - Important - Tks - Mailing list pgsql-admin

From Stephan Szabo
Subject Re: Urgent help neede - Important - Tks
Date
Msg-id 20020201122431.W28658-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Urgent help neede - Important - Tks  (Mr OCP <mr_ocp@yahoo.com>)
List pgsql-admin
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.



pgsql-admin by date:

Previous
From: "Chris Dircks"
Date:
Subject: Re: OT: Decent GUI-based reportwriter for Linux?
Next
From: bangh
Date:
Subject: Re: Sample database for testing?