Thu Aug 28 09:03:19 PDT 2008
- Previous message: [Slony1-general] Partition Tables - How does slony replicate it
- Next message: [Slony1-general] How to define clusters - please help
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Ow Mun Heng <Ow.Mun.Heng at wdc.com> writes: > Considering doing partitioning/table inheritance on a master/slave Db > replicated by slony. > > I'm not sure how it handles the table inheritance. > Do I need to manually add the tables to be inherited? what about > removing it from inheritance? > Is there an automated way? > > Can anyone shed some light into how slony deals with this? There is a test in the test suite that uses inheritance-based partitioning: http://main.slony.info/viewcvs/viewvc.cgi/slony1-engine/tests/testpartition/?pathrev=REL_1_2_STABLE It sets up 3 monthly partitions, and adds them to replication. There are stored procedures in version 1.2 for this: add_empty_table_to_replication() which adds an empty table to a replication set (this is a general "tool") replicate_partition() which uses the above function to replicate an inherited partition, validating that it is a child of a replicated parent table You can run replicate_partition() (passing in the appropriate parameters) in a Slonik script; this will add a fresh, empty partition to replication, in the same replication set as its parent. -- "cbbrowne","@","cbbrowne.com" http://www3.sympatico.ca/cbbrowne/x.html Rules of the Evil Overlord #214. "If a malignant being demands a sacrificial victim have a particular quality, I will check to make sure said victim has this quality immediately before the sacrifice and not rely on earlier results. (Especially if the quality is virginity and the victim is the hero's girlfriend.)" <http://www.eviloverlord.com/>
- Previous message: [Slony1-general] Partition Tables - How does slony replicate it
- Next message: [Slony1-general] How to define clusters - please help
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list