Re: replicating DDL statements

From: "Ed L(dot)" <pgsql(at)bluepolka(dot)net>
To: "Eric B(dot) Ridge" <ebr(at)tcdi(dot)com>
Cc: Andrew Sullivan <andrew(at)libertyrms(dot)info>, PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: replicating DDL statements
Date: 2003-03-07 00:42:46
Message-ID: 200303061742.46498.pgsql@bluepolka.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thursday March 6 2003 4:53, Eric B. Ridge wrote:
> >>> And in the absence of a SET TRIGGERS='off' command, anyone see any
> >>> concerns with the following?
> >>>
> >>> UPDATE pg_trigger
> >>> SET tgenabled = 'f'
> >>> WHERE tgname LIKE '%whatever%';
> >>
> ... Why not do what pg_dump (in 7.3 anyways) does:
>
> OFF:
> update pg_class set reltriggers = 0 where relname = 'TABLE_NAME';
>
> ON:
> update pg_class set reltriggers = (select count(*) from pg_trigger
> where pg_class.oid = tgrelid) where relname = 'TABLE_NAME';

That works, thanks. Maybe a minor variant of that could be the
implementation of

SET TRIGGERS="off/on"

if it did not already exist, but I defer to the source code gurus. Now if I
could just figure out how to reliably replicate DDL statements
asyncronously via triggers, or some other way compatible with a trigger
approach.

Ed

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ed L. 2003-03-07 01:08:27 Re: replicating DDL statements
Previous Message Eric B.Ridge 2003-03-06 23:53:38 Re: replicating DDL statements