ac = 0, normProcMode = 0, postEnv = 1
?t1 | t2
----+----
? 1 | a
? 2 | b
(2 rows)
?
postgres=# execute direct on (datanode2) $$ select * from test $$;
?t1 | t2
----+----
(0 rows)
?
postgres=# insert into test values (3,'c');
INSERT 0 1
postgres=# execute direct on (datanode2) $$ select * from test $$;
?t1 | t2
----+----
? 3 | c
(1 row)
?
postgres=# select * from test ;
?t1 | t2
----+----
? 1 | a
? 2 | b
? 3 | c
(3 rows)
?
postgres=#
?
node1:
postgres=# select * from test ;
?t1 | t2
----+----
? 1 | a
? 2 | b
? 3 | c
(3 rows)
?
postgres=# execute direct on (datanode1) $$ select * from test $$;
?t1 | t2
----+----
? 1 | a
? 2 | b
(2 rows)
?
postgres=# execute direct on (datanode2) $$ select * from test $$;
?t1 | t2
----+----
? 3 | c
(1 row)
?
postgres=#
发现bug(最新代码没有,官网发布的tar包有bug,通过git下载暂时没有问题):
postgres=# alter node datanode2 with(TYPE='datanode', HOST='localhost', PORT=15432);
The connection to the server was lost. Attempting reset: LOG:? server process (PID 14999) was terminated by signal 11: Segmentation fault
DETAIL:? Failed process was running: alter node datanode2 with(TYPE='datanode', HOST='localhost', PORT=15432);
LOG:? terminating any other active server processes
WARNING:? terminating connection because of crash of another server process
DETAIL:? The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
HINT:? In a moment you should be able to reconnect to the database and repeat your command.
FATAL:? the database system is in recovery mode
Failed.
!> LOG:? all server processes terminated; reinitializing
LOG:? database system was interrupted; last known up at 2015-06-10 20:09:24 PDT
LOG:? database system was not properly shut down; automatic recovery in progress
LOG:? record with zero length at 0/18A6C40
LOG:? redo is not required
LOG:? autovacuum launcher started
LOG:? database system is ready to accept connections
?
!>
!>
!>
!>
------------------------------------华丽丽的分割线------------------------------------
------------------------------------华丽丽的分割线------------------------------------