[ha@localhost pgdb]$ ps -ef | grep post
root 2124 1 0 04:47 ? 00:00:00 /usr/libexec/postfix/master
postfix 2147 2124 0 04:47 ? 00:00:00 qmgr -l -t fifo -u
postfix 10385 2124 0 11:27 ? 00:00:00 pickup -l -t fifo -u
ha 10691 1 0 12:33 pts/3 00:00:00 /home/ha/pgdb/bin/postgres_ora
ha 10693 10691 0 12:33 ? 00:00:00 postgres: checkpointer process
ha 10694 10691 0 12:33 ? 00:00:00 postgres: writer process
ha 10695 10691 0 12:33 ? 00:00:00 postgres: wal writer process
ha 10696 10691 0 12:33 ? 00:00:00 postgres: autovacuum launcher process
ha 10697 10691 0 12:33 ? 00:00:00 postgres: stats collector process
ha 10717 4087 0 12:37 pts/3 00:00:00 grep post
5.备库启动后
a.主库进程
[ha@localhost pgdb]$ ps -ef | grep post
root 2124 1 0 04:47 ? 00:00:00 /usr/libexec/postfix/master
postfix 2147 2124 0 04:47 ? 00:00:00 qmgr -l -t fifo -u
postfix 10385 2124 0 11:27 ? 00:00:00 pickup -l -t fifo -u
ha 10691 1 0 12:33 pts/3 00:00:00 /home/ha/pgdb/bin/postgres_ora
ha 10693 10691 0 12:33 ? 00:00:00 postgres: checkpointer process
ha 10694 10691 0 12:33 ? 00:00:00 postgres: writer process
ha 10695 10691 0 12:33 ? 00:00:00 postgres: wal writer process
ha 10696 10691 0 12:33 ? 00:00:00 postgres: autovacuum launcher process
ha 10697 10691 0 12:33 ? 00:00:00 postgres: stats collector process
ha 10718 10691 0 12:37 ? 00:00:00 postgres: wal sender process rep 192.168.238.131(59195) streaming 0/3000060
ha 10720 4087 0 12:37 pts/3 00:00:00 grep post
b.备库进程
[ha@localhost data]$ ps -ef | grep post
root 2086 1 0 04:48 ? 00:00:00 /usr/libexec/postfix/master
postfix 2108 2086 0 04:48 ? 00:00:00 qmgr -l -t fifo -u
postfix 9657 2086 0 11:27 ? 00:00:00 pickup -l -t fifo -u
ha 9782 1 0 12:36 pts/2 00:00:00 /home/ha/pgdb/bin/postgres
ha 9783 9782 0 12:36 ? 00:00:00 postgres: startup process recovering 000000010000000000000003
ha 9784 9782 0 12:36 ? 00:00:00 postgres: checkpointer process
ha 9785 9782 0 12:36 ? 00:00:00 postgres: writer process
ha 9786 9782 0 12:36 ? 00:00:00 postgres: stats collector process
ha 9787 9782 0 12:36 ? 00:00:00 postgres: wal receiver process streaming 0/3000060
ha 9792 3744 0 12:37 pts/2 00:00:00 grep post
6.实验效果
a.主库
[ha@localhost pgdb]$ psql postgres
psql (9.4.5)
Type "help" for help.
postgres=# create table test(id int);
CREATE TABLE
postgres=# insert into test values (1),(2);
INSERT 0 2
postgres=# select * from test ;
id
----
1
2
(2 rows)
postgres=#
b.备库