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

Ramanuj Hari hari.ramanuj at gmail.com
Sat Jan 17 23:53:19 PST 2015


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.

Wondering why 'add datanode master ..." command should have included above
'alter table ..' in it's steps.

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.


Thanks,
Ramanuj


On Sat, Jan 17, 2015 at 3:27 PM, Ramanuj Hari <hari.ramanuj at gmail.com>
wrote:

> Hi,
>
> I tried with
> http://sourceforge.net/p/postgres-xl/postgres-xl/ci/master/tarball Commit
> [14f8b1] master(latest as of now), observed below behaviour:
>
> Behaviour 1, steps:
> [1] Initialise single VM having (GTM, coordinator, datanode).
> [2] Add datanode master (placed on another VM).
> [3] Start my application, which creates a db, and tables/index in that db.
> Use copy command to insert data, select command to retrieve data.
> [4] Checked both datanode, data getting distributed properly.
>
> Behaviour 2, steps:
> [1] Initialise single VM having (GTM, coordinator, datanode).
> [2] Start my application, which creates a db, and tables/index in that db.
> Use copy command to insert data, select command to retrieve data.
> [3] Add datanode master (placed on another VM), while application is
> running and normal copy, selects commands are running.
> [4] Checked both datanode, data getting inserted in only previous
> datanode. Newly added datanode doesn't have any data inserted.
>
>
> Behaviour 3, steps:
> [1] Initialise single VM having (GTM, coordinator, datanode).
> [2] Start my application, which creates a db named appdb, database users,
> and tables/index in appdb. Use copy command to insert data, select command
> to retrieve data.
> [3] After about 30 min. of my application running which has initialized
> appdb and inserted data. Stopped my application.
> [4] Add datanode master (placed on another VM).
> [5] Stop DB cluster, using pgxc_ctl 'stop all' command.
> [6] Start DB cluster, using pgxc_ctl 'start all' command.
> [7] Start my application.
> [4] Checked both datanode, data getting inserted in only previous
> datanode. Newly added datanode doesn't have any data inserted.
>
>
> May be I am missing something. Is there any suggested way on how to
> properly add datanode.
>
> Appreciate any help.
>
> Thanks,
> Ramanuj
>
>
> On Fri, Jan 9, 2015 at 5:29 PM, Ramanuj Kumar <hari.ramanuj at gmail.com>
> wrote:
>
>> Hi Pavan,
>>
>> I am using postgres-xl-v9.2-src.tar.gz. Sure, let me try it. Thanks for
>> help.
>>
>> Regards,
>> Ramanuj
>>
>> On 09-Jan-2015, at 12:28 pm, Pavan Deolasee <pavan.deolasee at gmail.com>
>> wrote:
>>
>>
>>
>> On Fri, Jan 9, 2015 at 4:06 AM, Ramanuj Hari <hari.ramanuj at gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I am trying to add datanode to PGXL running system(having configuration
>>> 1 gtm, 1 coordinator, 1 datanode on same host), but it fails with below
>>> message.
>>> -----
>>> PGXC$ ERROR:  PGXC Node datanode2: object not defined
>>> ---
>>>
>>
>> Hi Ramanuj,
>>
>> Which version are you working with? May I request to try the master
>> branch from the GIT repository, current as of now (commit id:
>> d4136935a1d741c61a) ? There had been bunch of bug fixes and enhancements to
>> the pgxc_ctl utility since we last made the release.
>>
>> The "add" command has changed a bit and the following works for me.
>>
>> add datanode master datanode_3 localhost 40003 40103
>> ~/DATA/pgxl/nodes/dn_master.3 datanode_1 none none
>>
>> Thanks,
>> Pavan
>>
>>
>>> datanode2 is added to pgxc_node table, and it is started as well. Table
>>> created with replication by roundrobin are not getting distributed, like
>>> subsequent inserts are not inserting row in datanode2. All insert are going
>>> to datanode1(previous node).
>>>
>>> Appreciate any help.
>>>
>>> Thanks,
>>> Ramanuj
>>>
>>> ----Log--
>>> PGXC$ add datanode master datanode2 10.102.103.131 12921 16921
>>> /var/mps/db_pgxl/data/auto/nodes/dn_master datanode1
>>> do_shell.c:doImmediate(219) Actual Command: ssh pgxl at 10.102.103.131 "(
>>> initdb -D /var/mps/db_pgxl/data/auto/nodes/dn_master --nodename datanode2 )
>>> > /tmp/Ramanuj8_STDOUT_97912_0 2>&1" < /dev/null > /dev/null 2>&1
>>> do_shell.c:doImmediate(224) Bring remote stdout: scp pgxl at 10.102.103.131:/tmp/Ramanuj8_STDOUT_97912_0
>>> /tmp/STDOUT_97912_1 > /dev/null 2>&1
>>> The files belonging to this database system will be owned by user "pgxl".
>>> This user must also own the server process.
>>>
>>> The database cluster will be initialized with locale "C".
>>> The default database encoding has accordingly been set to "SQL_ASCII".
>>> The default text search configuration will be set to "english".
>>>
>>> creating directory /var/mps/db_pgxl/data/auto/nodes/dn_master ... ok
>>> creating subdirectories ... ok
>>> selecting default max_connections ... 100
>>> selecting default shared_buffers ... 32MB
>>> creating configuration files ... ok
>>> creating template1 database in
>>> /var/mps/db_pgxl/data/auto/nodes/dn_master/base/1 ... ok
>>> initializing pg_authid ... ok
>>> initializing dependencies ... ok
>>> creating system views ... ok
>>> creating cluster information ... ok
>>> loading system objects' descriptions ... ok
>>> creating collations ... not supported on this platform
>>> creating conversions ... ok
>>> creating dictionaries ... ok
>>> setting privileges on built-in objects ... ok
>>> creating information schema ... ok
>>> loading PL/pgSQL server-side language ... ok
>>> creating storm catalog... ok
>>> vacuuming database template1 ... ok
>>> copying template1 to template0 ... ok
>>> copying template1 to postgres ... ok
>>> freezing database template0 ... ok
>>> freezing database template1 ... ok
>>> freezing database postgres ... ok
>>>
>>> WARNING: enabling "trust" authentication for local connections
>>> You can change this by editing pg_hba.conf or using the option -A, or
>>> --auth-local and --auth-host, the next time you run initdb.
>>>
>>> Success.
>>>  You can now start the database server of the Postgres-XL coordinator
>>> using:
>>>
>>>     postgres --coordinator -D /var/mps/db_pgxl/data/auto/nodes/dn_master
>>> or
>>>     pg_ctl start -D /var/mps/db_pgxl/data/auto/nodes/dn_master -Z
>>> coordinator -l logfile
>>>
>>>  You can now start the database server of the Postgres-XL datanode using:
>>>
>>>     postgres --datanode -D /var/mps/db_pgxl/data/auto/nodes/dn_master
>>> or
>>>     pg_ctl start -D /var/mps/db_pgxl/data/auto/nodes/dn_master -Z
>>> datanode -l logfile
>>>
>>> INFO:  please do not close this session until you are done adding the
>>> new node
>>>  pgxc_lock_for_backup
>>> ----------------------
>>>  t
>>> (1 row)
>>>
>>> do_shell.c:doImmediate(219) Actual Command: ssh pgxl at 10.102.103.131 "(
>>> pg_ctl start -Z restoremode -D /var/mps/db_pgxl/data/auto/nodes/dn_master
>>> -o -i ) > /tmp/Ramanuj8_STDOUT_97912_3 2>&1" < /dev/null > /dev/null 2>&1
>>> do_shell.c:doImmediate(224) Bring remote stdout: scp pgxl at 10.102.103.131:/tmp/Ramanuj8_STDOUT_97912_3
>>> /tmp/STDOUT_97912_4 > /dev/null 2>&1
>>> SET
>>> SET
>>> CREATE ROLE
>>> ALTER ROLE
>>> CREATE ROLE
>>> ALTER ROLE
>>> psql:/tmp/GENERAL_97912_2:16: ERROR:  role "pgxl" already exists
>>> ALTER ROLE
>>> CREATE ROLE
>>> ALTER ROLE
>>> CREATE DATABASE
>>> CREATE DATABASE
>>> REVOKE
>>> REVOKE
>>> GRANT
>>> GRANT
>>> CREATE DATABASE
>>> CREATE NODE
>>> CREATE NODE
>>> You are now connected to database "mpsdb" as user "pgxl".
>>> SET
>>> SET
>>> SET
>>> SET
>>> SET
>>> CREATE EXTENSION
>>> COMMENT
>>> SET
>>> SET
>>> SET
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> CREATE TABLE
>>> ALTER TABLE
>>> ALTER TABLE
>>> ALTER TABLE
>>> ALTER TABLE
>>> ALTER TABLE
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> CREATE INDEX
>>> REVOKE
>>> REVOKE
>>> GRANT
>>> GRANT
>>> You are now connected to database "mpstest" as user "pgxl".
>>> SET
>>> SET
>>> SET
>>> SET
>>> SET
>>> CREATE EXTENSION
>>> COMMENT
>>> REVOKE
>>> REVOKE
>>> GRANT
>>> GRANT
>>> You are now connected to database "postgres" as user "pgxl".
>>> SET
>>> SET
>>> SET
>>> SET
>>> SET
>>> COMMENT
>>> CREATE EXTENSION
>>> COMMENT
>>> REVOKE
>>> REVOKE
>>> GRANT
>>> GRANT
>>> You are now connected to database "template1" as user "pgxl".
>>> SET
>>> SET
>>> SET
>>> SET
>>> SET
>>> COMMENT
>>> CREATE EXTENSION
>>> COMMENT
>>> REVOKE
>>> REVOKE
>>> GRANT
>>> GRANT
>>> You are now connected to database "test" as user "pgxl".
>>> SET
>>> SET
>>> SET
>>> SET
>>> SET
>>> CREATE EXTENSION
>>> COMMENT
>>> REVOKE
>>> REVOKE
>>> GRANT
>>> GRANT
>>> do_shell.c:doImmediate(219) Actual Command: ssh pgxl at 10.102.103.131 "(
>>> pg_ctl stop -Z restoremode -D /var/mps/db_pgxl/data/auto/nodes/dn_master )
>>> > /tmp/Ramanuj8_STDOUT_97912_5 2>&1" < /dev/null > /dev/null 2>&1
>>> do_shell.c:doImmediate(224) Bring remote stdout: scp pgxl at 10.102.103.131:/tmp/Ramanuj8_STDOUT_97912_5
>>> /tmp/STDOUT_97912_6 > /dev/null 2>&1
>>> datanode_cmd.c:start_datanode_master(396) Starting datanode master
>>> datanode2.
>>> do_shell.c:dump_cmdList(700) *** cmdList Dump
>>> *******************************
>>> allocated = 2, used = 1
>>> do_shell.c:dump_cmdList(710) === CMD: 0 ===
>>> do_shell.c:dump_cmdList(714)    --- CMD-EL: 0:host="10.102.103.131",
>>> command="pg_ctl start -Z datanode -D
>>> /var/mps/db_pgxl/data/auto/nodes/dn_master -o -i", localStdin="NULL",
>>> localStdout="NULL"
>>> do_shell.c:doCmdEl(336) Remote command: "pg_ctl start -Z datanode -D
>>> /var/mps/db_pgxl/data/auto/nodes/dn_master -o -i", actual: "ssh
>>> pgxl at 10.102.103.131 "( pg_ctl start -Z datanode -D
>>> /var/mps/db_pgxl/data/auto/nodes/dn_master -o -i ) >
>>> /tmp/Ramanuj8_STDOUT_97912_8 2>&1" < /dev/null > /dev/null 2>&1"
>>> datanode_cmd.c:start_datanode_master(403) Done.
>>> PGXC$ ERROR:  PGXC Node datanode2: object not defined
>>> CREATE NODE
>>> EXECUTE DIRECT
>>>
>>> PGXC$
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Dive into the World of Parallel Programming! The Go Parallel Website,
>>> sponsored by Intel and developed in partnership with Slashdot Media, is
>>> your
>>> hub for all things parallel software development, from weekly thought
>>> leadership blogs to news, videos, case studies, tutorials and more. Take
>>> a
>>> look and join the conversation now. http://goparallel.sourceforge.net
>>> _______________________________________________
>>> Postgres-xl-developers mailing list
>>> Postgres-xl-developers at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/postgres-xl-developers
>>>
>>>
>>
>>
>> --
>> 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/20150118/30260763/attachment.htm>


More information about the Postgres-xl-developers mailing list