pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Urgent help neede - Important - Tks
2+ messages / 2 participants
[nested] [flat]

* Urgent help neede - Important - Tks
@ 2002-01-26 17:17 Mr OCP <mr_ocp@yahoo.com>
  2002-02-01 20:27 ` Re: Urgent help neede - Important - Tks Stephan Szabo <sszabo@megazone23.bigpanda.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Mr OCP @ 2002-01-26 17:17 UTC (permalink / raw)
  To: pgsql-admin

Hi all

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

Thanks
Mike

http://my.yahoo.com.au - My Yahoo!
- It's My Yahoo! Get your own!



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Urgent help neede - Important - Tks
  2002-01-26 17:17 Urgent help neede - Important - Tks Mr OCP <mr_ocp@yahoo.com>
@ 2002-02-01 20:27 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Stephan Szabo @ 2002-02-01 20:27 UTC (permalink / raw)
  To: Mr OCP <mr_ocp@yahoo.com>; +Cc: 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.





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2002-02-01 20:27 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-01-26 17:17 Urgent help neede - Important - Tks Mr OCP <mr_ocp@yahoo.com>
2002-02-01 20:27 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>

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