Re: Urgent help neede - Important - Tks

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Mr OCP <mr_ocp(at)yahoo(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Urgent help neede - Important - Tks
Date: 2002-02-01 20:27:27
Message-ID: 20020201122431.W28658-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Oliver Elphick 2002-02-01 21:19:03 Re: Sample database for testing?
Previous Message bangh 2002-02-01 20:26:57 Re: Sample database for testing?