[Bucardo-general] FW: removing a sync and triggers - help

Markova, Nina Nina.Markova at NRCan-RNCan.gc.ca
Wed Sep 18 15:45:45 UTC 2013


Hello again,

I found the triggers related to the deleted  sync ***sta_sync_Ms3_So2_s2***   but can't delete them. They were on the other master. 

Triggers:
 "bucardo_note_trunc_sta_sync_Ms3_So2_s2" AFTER TRUNCATE ON site FOR EACH STATEMENT EXECUTE PROCEDURE bucardo_note_truncation('sta_sync_Ms3_So2_s2')

 "bucardo_kick_sta_sync_Ms3_So2_s2" AFTER INSERT OR DELETE OR UPDATE OR TRUNCATE ON site FOR EACH STATEMENT EXECUTE PROCEDURE  "bucardo_kick_sta_sync_Ms3_So2_s2"()

Commands:
   drop trigger bucardo_kick_sta_sync_Ms3_So2_s2 on site \g
ERROR:  trigger "bucardo_kick_sta_sync_ms3_so2_s2" for table "site" does not exist

   drop trigger bucardo_note_trunc_sta_sync_Ms3_So2_s2 on site \g
ERROR:  trigger "bucardo_note_trunc_sta_sync_ms3_so2_s2" for table "site" does not exist

I tried as user 'postgres' and user 'bucardo'.

Any help will be appreciated,
Nina

P.P

Full list of triggers:

Indexes:
    "site_pkey" PRIMARY KEY, btree (sta, ondate)
Triggers:
    bucardo_delta AFTER INSERT OR DELETE OR UPDATE ON site FOR EACH ROW EXECUTE PROCEDURE delta_public_site()
    bucardo_note_trunc_sta_sync AFTER TRUNCATE ON site FOR EACH STATEMENT EXECUTE PROCEDURE bucardo_note_truncation('sta_sync')
    "bucardo_note_trunc_sta_sync_Ms3_So2" AFTER TRUNCATE ON site FOR EACH STATEMENT EXECUTE PROCEDURE bucardo_note_truncation('sta_sync_Ms3_So2')
    "bucardo_note_trunc_sta_sync_Ms3_So2_s2" AFTER TRUNCATE ON site FOR EACH STATEMENT EXECUTE PROCEDURE bucardo_note_truncation('sta_sync_Ms3_So2_s2')
    "bucardo_note_trunc_sta_sync_Ms3_Ss2" AFTER TRUNCATE ON site FOR EACH STATEMENT EXECUTE PROCEDURE bucardo_note_truncation('sta_sync_Ms3_Ss2')

Triggers firing always:
    bucardo_kick_sta_sync AFTER INSERT OR DELETE OR UPDATE OR TRUNCATE ON site FOR EACH STATEMENT EXECUTE PROCEDURE bucardo_kick_sta_sync()
    "bucardo_kick_sta_sync_Ms3_So2" AFTER INSERT OR DELETE OR UPDATE OR TRUNCATE ON site FOR  EACH STATEMENT EXECUTE PROCEDURE "bucardo_kick_sta_sync_Ms3_So2"()
    "bucardo_kick_sta_sync_Ms3_So2_s2" AFTER INSERT OR DELETE OR UPDATE OR TRUNCATE ON site FOR EACH STATEMENT EXECUTE PROCEDURE "bucardo_kick_sta_sync_Ms3_So2_s2"()
    "bucardo_kick_sta_sync_Ms3_Ss2" AFTER INSERT OR DELETE OR UPDATE OR TRUNCATE ON site FOR  EACH STATEMENT EXECUTE PROCEDURE "bucardo_kick_sta_sync_Ms3_Ss2"()

-----Original Message-----
From: bucardo-general-bounces at bucardo.org [mailto:bucardo-general-bounces at bucardo.org] On Behalf Of Markova, Nina
Sent: September-13-13 16:31
To: Alex Balashov; bucardo-general at bucardo.org
Subject: Re: [Bucardo-general] removing a sync and triggers - help

Definitely don't want to drop schema bucardo, as I would like to preserve the other syncs.

doing: \d <table name>
Yes, I did that but didn't see anything for the sync I deleted.
  bucardo delete sync sta_sync_Ms3_So2_s2
    Removed sync "sta_sync_Ms3_So2_s2"
    Note: table triggers (if any) are not automatically removed!

As you can see sta_sync_Ms3_So2_s2 is not there. Should I assume all is OK then?


Indexes:
    "site_pkey" PRIMARY KEY, btree (sta, ondate)
Triggers:
    bucardo_delta AFTER INSERT OR DELETE OR UPDATE ON site FOR EACH ROW EXECUTE PROCEDURE bucardo.delta_public_site()
    bucardo_note_trunc_sta_sync AFTER TRUNCATE ON site FOR EACH STATEMENT EXECUTE PROCEDURE bucardo.bucardo_note_truncation('sta_sync')
    "bucardo_note_trunc_sta_sync_Mo3_So2" AFTER TRUNCATE ON site FOR EACH STATEMENT EXECUTE PROCEDURE bucardo.bucardo_note_truncation('
    "bucardo_note_trunc_sta_sync_Mo3_Ss2" AFTER TRUNCATE ON site FOR EACH STATEMENT EXECUTE PROCEDURE bucardo.bucardo_note_truncation('
Triggers firing always:
    bucardo_kick_sta_sync AFTER INSERT OR DELETE OR UPDATE OR TRUNCATE ON site FOR EACH STATEMENT EXECUTE PROCEDURE bucardo.bucardo_kic
    "bucardo_kick_sta_sync_Mo3_So2" AFTER INSERT OR DELETE OR UPDATE OR TRUNCATE ON site FOR EACH STATEMENT EXECUTE PROCEDURE bucardo.")
    "bucardo_kick_sta_sync_Mo3_Ss2" AFTER INSERT OR DELETE OR UPDATE OR TRUNCATE ON site FOR EACH STATEMENT EXECUTE PROCEDURE bucardo.")

Thanks,
Nina

-----Original Message-----
From: bucardo-general-bounces at bucardo.org [mailto:bucardo-general-bounces at bucardo.org] On Behalf Of Alex Balashov
Sent: September-13-13 16:09
To: bucardo-general at bucardo.org
Subject: Re: [Bucardo-general] removing a sync and triggers - help

On 09/13/2013 03:08 PM, Markova, Nina wrote:

>     Note: table triggers (if any) are not automatically removed!
> Do I need to do anything else? I have sync1 and sync3 doing the same 
> job as sync5, but independently .
> Do I need to remove any triggers? Which? How to find them?

You can see the bucardo triggers on each table in the Postgres CLI by
doing: \d <table name>

The easiest way to get rid of them all at once is:

    DROP SCHEMA bucardo CASCADE;

-- Alex

--
Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/ _______________________________________________
Bucardo-general mailing list
Bucardo-general at bucardo.org
https://mail.endcrypt.com/mailman/listinfo/bucardo-general
_______________________________________________
Bucardo-general mailing list
Bucardo-general at bucardo.org
https://mail.endcrypt.com/mailman/listinfo/bucardo-general


More information about the Bucardo-general mailing list