[Postgres-xl-developers] Addition of datanode master fails

Ramanuj Hari hari.ramanuj at gmail.com
Mon Jan 19 02:50:53 PST 2015


Hi Pavan,

Thank you for clarification.

Would like to understand what is difference between below two command,
assuming 'datanode1' is existing datanode, and have added 'datanode2' via
'add datanode master .. ' command, and want to redistribute table, given
that af_device_l1 was initially created with 'DISTRIBUTE BY ROUNDROBIN':

[1] ALTER TABLE af_device_l1 ADD NODE (datanode2);
[2] ALTER TABLE af_device_l1 TO NODE (datanode1, datanode2), DISTRIBUTE BY
ROUNDROBIN;

Both seems to work same.

Thanks,
Ramanuj


On Mon, Jan 19, 2015 at 11:19 AM, Pavan Deolasee <pavan.deolasee at gmail.com>
wrote:

>
>
> On Sun, Jan 18, 2015 at 1:23 PM, Ramanuj Hari <hari.ramanuj at gmail.com>
> wrote:
>
>> Hi,
>>
>> On further test, for Behaviour 3, I have perform below command for each
>> table:
>>
>> ALTER TABLE af_device_l2 TO NODE (datanode1, datanode2), DISTRIBUTE BY
>> ROUNDROBIN;
>>
>> after that it seems its working. Now data is redistributed properly and
>> inserts are happing to both datanode.
>>
>>
> I'm glad you found that.
>
>
>> Wondering why 'add datanode master ..." command should have included
>> above 'alter table ..' in it's steps.
>>
>>
> The decision to not automatically redistribute existing tables to include
> new node is because we allow tables to be distributed on only a subset of
> nodes. So the system would not know if the new node is to be used for
> existing tables, at least not for the tables which are distributed on a
> subset of nodes. Another important reason is that redistribution is an
> expensive operation. In fact, in the current XL release it will grab an
> exclusive lock on the table under redistribution, thus cutting access to
> all other sessions. So we would want the DBA to control that activity.
>
>
>> Also was looking at :
>> http://files.postgres-xl.org/documentation/add-node-datanode.html
>>
>> last step is mentioned as 'Redistribute existing data by using ALTER
>> TABLE REDISTRIBUTE. The new datanode is now ready.' I didn't find any
>> command called 'ALTER TABLE REDISTRIBUTE', could you please help if I am
>> missing something.
>>
>
> Yes. I think thats a typo or leftover from some previous implementation.
> Thanks for pointing that out. Will take care of that in the docs.
>
> Thanks,
> Pavan
>
> --
> Pavan Deolasee
> http://www.linkedin.com/in/pavandeolasee
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.postgres-xl.org/private.cgi/postgres-xl-developers-postgres-xl.org/attachments/20150119/2db537cd/attachment.htm>


More information about the Postgres-xl-developers mailing list