[pgpool-general: 3103] Re: Pgpool Partion rules with geometry columns
Muhammad Usama
m.usama at gmail.com
Fri Aug 15 20:23:55 JST 2014
Hello
Did you created the distribution rule and yet the tuples were not getting
properly routed? Distribution rule is used by the pgpool-II to route the
new row to the appropriate node. And the rule can be created by inserting a
row into "pgpool_catalog.dist_def' table.
Distribution rule for the province table can be created like
insert into pgpool_catalog.dist_def values
('postgres','public','province','province_code',ARRAY['province_code','eco_zone_code','name'],ARRAY['integer','integer','text'],
'pgpool_catalog.dis_def_province');
please refer to the following tutorial for more details on configuring the
replication
http://www.pgpool.net/docs/pgpool-II-2.3/tutorial-en.html#replication-config
Thanks and Regards
Usama
On Mon, Jul 14, 2014 at 1:30 PM, Thao Nguyen Duy <ndt1983 at gmail.com> wrote:
> Hi all,
> Could you help me on this error.
> I have setup pgpool-II with 3 servers (192.168.1.131: database node0,
> 192.168.1.132: pgpool, 192.168.1.133:database node 1) with parallel mode.
> In the partition rules I defined rule to partition a table into (province
> table) 2 database node (node0 and node1). The structure of province is
>
> - province_code: integer
> - eco_zone_code :integer
> - name: character
> - geom:pgpool-general at pgpool.net.
>
> The definition of partition is :
>
> CREATE OR REPLACE FUNCTION pgpool_catalog.dis_def_province(anyelement)
> RETURNS integer AS
> $BODY$
> SELECT CASE WHEN $1 > 0 AND $1 <= 35 THEN 0
>
> ELSE 1
> END;
> $BODY$
> LANGUAGE sql VOLATILE
> COST 100;
> ALTER FUNCTION pgpool_catalog.dis_def_province(anyelement)
> OWNER TO postgres;
>
> As I expected all provinces have province_code > 35 will be stored on the
> node1.
> But the rule does not affected.
> Thank you so much!
>
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20140815/23b63ac4/attachment.htm>
More information about the pgpool-general
mailing list