[Postgres-xl-general] ALTER TABLE - ADD NODE

Koichi Suzuki koichi.dbms at gmail.com
Wed Oct 1 21:12:04 PDT 2014


There's a document "Pgxc_ctl Primer" available at

https://sourceforge.net/projects/postgres-xc/files/Pgxc_ctl_primer/

Although it is for Postgres-XC, I hope most of the description can apply to XL.

I uploaded the latest version with document license description today.

Enjoy;
---
Koichi Suzuki


2014-09-23 1:22 GMT+09:00 Aaron Jackson <ajackson at revionics.com>:
> Also, it would probably help if we have some examples of adding nodes with pgxc_ctl.  I know that I've tripped on this on at least a couple of occasions.  When I do, I go back to the documentation to gain clarity on how this should be done... as such, with pgxl, I land here.
>
> http://files.postgres-xl.org/documentation/add-node-datanode.html
>
> And there's no mention of pgxc_ctl in here (I believe pgxc doesn't have a page like this).  I'm certain that what pgxc_ctl does under the covers is similar and more streamlined, but an example would be greatly appreciated.
>
> Aaron
> ________________________________________
> From: Aaron Jackson
> Sent: Monday, September 22, 2014 8:52 AM
> To: Koichi Suzuki
> Cc: postgres-xl-general at lists.sourceforge.net
> Subject: RE: [Postgres-xl-general] ALTER TABLE - ADD NODE
>
> Completely agree with you Koichi.  However, for reasons unknown, pgxc_ctl has been regularly core dumping on one specific datanode in my configuration.  As such, I can't use it for anything with this node, not even a simple init.
>
> I expect to throw it under a debugger later today to see what is going wrong, but it almost appears as if it segv's after invoking ssh on the remote host.  Anyway, this was the reason why I had not used pgxc_ctl for this instance.
>
> Aaron
>
> ________________________________________
> From: Koichi Suzuki [koichi.dbms at gmail.com]
> Sent: Monday, September 22, 2014 4:51 AM
> To: Aaron Jackson
> Cc: postgres-xl-general at lists.sourceforge.net
> Subject: Re: [Postgres-xl-general] ALTER TABLE - ADD NODE
>
> You should have added datanode4 with pgxc_ctl, if the whole cluster
> was configured with it.   Pgxc_ctl will cross-check conflict resource
> to avoid such case.   Even though you're successful in adding a node
> manually, you may have to maintain your cluster manually afterwords.
>
> Regards;
> ---
> Koichi Suzuki
>
>
> 2014-09-19 13:35 GMT+09:00 Aaron Jackson <ajackson at revionics.com>:
>> For many reasons, you should ignore my previous email.  Obviously what I
>> tried to do was add a datanode to a cluster in a live fashion - and the
>> documentation clearly doesn't recommend doing that for adding a new
>> datanode.
>>
>> The bigger kicker here is that I actually added datanode4 with the same port
>> as datanode1 - they're one digit off.  My mistake.
>>
>> Aaron
>> ________________________________
>> From: Aaron Jackson
>> Sent: Thursday, September 18, 2014 11:06 PM
>> To: postgres-xl-general at lists.sourceforge.net
>> Subject: ALTER TABLE - ADD NODE
>>
>> So I added a datanode to my cluster this evening (more or less by hand for
>> fear of it going sideways with pgxc_ctl).  The datanode was added to all
>> coordinators and then to all other datanodes without any incident.  Then I
>> did the following:
>>
>> ALTER TABLE client.foo ADD NODE (datanode4);
>>
>>
>> Well, client.foo has about 60M rows in it so this took a while.  When I came
>> back, I saw the following error on my screen.
>>
>> ERROR:  tuple already updated by self
>>
>>
>> So, I decided to see if the table sizes on each node via an execute direct
>> with each node.
>>
>> devanalysis57=# execute direct on (datanode1) 'select count(*) from
>> client.foo';
>>   count
>> ----------
>>  21541902
>>
>> devanalysis57=# execute direct on (datanode2) 'select count(*) from
>> client.foo';
>>   count
>> ----------
>>  21051824
>>
>> devanalysis57=# execute direct on (datanode3) 'select count(*) from
>> client.foo';
>>   count
>> ----------
>>  17412700
>>
>> devanalysis57=# execute direct on (datanode4) 'select count(*) from
>> client.foo';
>>   count
>> ----------
>>  21541902
>>
>> I think it's a little too coincidental that datanode4 and datanode1 have the
>> same number of entries.  I ran pgxc_pool_reload() on all nodes, so they
>> should all be aware but to be sure, I checked pg_catalog.pgxc_node to be
>> sure.
>>
>> So, I then tried to drop datanode4 from client.foo which it didn't like very
>> much.
>>
>> ALTER TABLE client.foo delete node (datanode4);
>> ERROR:  PGXC Node datanode4: object not in relation node list
>>
>>
>> Aaron
>>
>> ------------------------------------------------------------------------------
>> Slashdot TV.  Video for Nerds.  Stuff that Matters.
>> http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Postgres-xl-general mailing list
>> Postgres-xl-general at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/postgres-xl-general
>>




More information about the postgres-xl-general mailing list