[Bucardo-general] modifying a table in bucardo, including PK
Nina.Markova at NRCan-RNCan.gc.ca
Mon Apr 14 17:59:38 UTC 2014
If I remove TABLE1 from herd and db, wouldn't these delta_* tables be dropped by bucardo itself, so I don't have to drop them manually?
My idea is to remove table from bucardo herd and db, modify the base table on both - primary(masters) and secondary servers (slaves), and then
Add it again in bucardo, this time with new structure and new PK.
1) remove TABLE1 from db, herd, sync
2) modify TABLE1 (incl.PK) - alter table ...command (on masters and secondary servers)
3) add modified TABLE1 to bucardo in db, herd, sync
4) validate sync, start bucardo
From: Greg Sabino Mullane [mailto:greg at endpoint.com]
Sent: April-11-14 14:39
To: Markova, Nina
Cc: bucardo-general at bucardo.org
Subject: Re: [Bucardo-general] modifying a table in bucardo, including PK
On Fri, Apr 11, 2014 at 05:21:31PM +0000, Markova, Nina wrote:
> Hi all,
> I have a table TABLE1 that is being replicated in bucardo.
> I need to change the table structure - will add more fields, some of which will be part of PK (i.e. PK will change too).
> What is the best approach doing that? I wasn't able to find a blog for that.
I think the support table (delta_*) may need to be dropped/recreated as well, as it will have the old pk. May have to drop the function too. I will test it out at some point.
Greg Sabino Mullane greg at endpoint.com
End Point Corporation
PGP Key: 0x14964AC8
More information about the Bucardo-general