|
From: Michael P. <mic...@gm...> - 2013-01-30 18:12:18
|
On Wed, Jan 30, 2013 at 8:01 PM, Christophe Le Roux < chr...@fr...> wrote: > Can we distribute and replicate a table ? (A table > distributed on 3 datanodes (for performance) and replicated on 3 others > datanode(for availability without down time) – I’m not talking about hot > standby or streaming replication included in standard postgresql) > This is not supported directly, but you could try something like that, perhaps it will work that's just an idea. This idea uses as a base the internal Postgres partitioning mechanism: CREATE TABLE tab (col1 int, col2 int) DISTRIBUTE BY REPLICATION; CREATE TABLE tab1 (CHECK col1 >= 100 AND CHECK col1 < 200) INHERITS (tab) *DISTRIBUTE BY HASH(col1);* CREATE TABLE tab2 (CHECK col1 >= 200 AND CHECK col1 < 300) INHERITS (tab) *DISTRIBUTE BY REPLICATION;* Putting an index on column col1 would be good also. Here the secret is to have the parent table replicated. -- Michael Paquier http://michael.otacoo.com |