Search Postgresql Archives

partitioning : replicate_partition doesn't seem to be working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux