partitioning : replicate_partition doesn't seem to be working

From: "Ow Mun Heng" <ow(dot)mun(dot)heng(at)wdc(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: partitioning : replicate_partition doesn't seem to be working
Date: 2008-10-18 08:07:00
Message-ID: 88C32A5D9FC71B4BB1B911B7B210496913D9CFF2@wdmyexbe03.my.asia.wdc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Quoted from
http://www.nabble.com/Group-Sets-For-Replication-w--Partition-d19369646.html

> Basically, what you would need to do, weekly, is to run a slonik
> "execute script" script where the SQL script consists of something
> similar to what's in tests/testpartition/gen_ddl_sql.sh:

> -> create the new table, with indication of inheritace from the parent;

> -> create a rule to indicate when data gets inserted into the new
   table, assuming you're using rules to control this;

> -> run replicate_partition() on this newly-created table.

I've created the 2 tables w/ inheritance info into both the master and the
slave.

Then I've run the following

/*select
_hmxmms_my_cluster.replicate_partition(200810,'xmms'::text,'2replicate_test'
::text,NULL::text,'Replicate test partition 2'::text)*/

select
_hmxmms_my_cluster.add_empty_table_to_replication(10,200810,'xmms'::text,'2r
eplicate_test'::text,NULL::text,'Replicate test partition 2'::text)

This successfully adds the table into the set #10, put it as a tab_id of
200810 in sl_table. However, in sl_table, the tab_altered column/state will
still be marked as false.

In addition to that, the triggers are not even created.

If I do execute this directly

select
_hmxmms_my_cluster.setaddtable_int(10,200810,'xmms.2replicate_test','2replic
ate_test_pkey','')

Then the tab_altered state/column will be marked as true and the trigger
will appear

select * from pg_catalog.pg_trigger where tgname =
'_hmxmms_my_cluster_logtrigger_200810'

I've tried to debug the scripts but thus far, has not been able to pinpoint
the location in which it is failing.

Thanks

Browse pgsql-general by date

  From Date Subject
Next Message Ow Mun Heng 2008-10-18 08:19:19 Re: partitioning : replicate_partition doesn't seem to be working
Previous Message Josh Williams 2008-10-18 02:09:12 Re: schema and roles