postgresql的端口port

pg的端口port

[postgres@gp1 ~]$ pg_ctl start -o "-p 54321

postgres 11560     1  0 10:34 pts/0    00:00:00 /usr/local/pgsql/bin/postgres -p 54321

postgres 11561 11560  0 10:34 ?        00:00:00 postgres: logger process             

postgres 11563 11560  0 10:34 ?        00:00:00 postgres: checkpointer process       

postgres 11564 11560  0 10:34 ?        00:00:00 postgres: writer process             

postgres 11565 11560  0 10:34 ?        00:00:00 postgres: wal writer process         

postgres 11566 11560  0 10:34 ?        00:00:00 postgres: autovacuum launcher process  

postgres 11567 11560  0 10:34 ?        00:00:00 postgres: stats collector process    

[postgres@gp1 ~]$ pg_ctl -D /data/pgsql/data start -o "-p 54321"

postgres 11678     1  0 10:35 pts/0    00:00:00 /usr/local/pgsql/bin/postgres -D /data/pgsql/data -p 54321

postgres 11679 11678  0 10:35 ?        00:00:00 postgres: logger process                                 

postgres 11681 11678  0 10:35 ?        00:00:00 postgres: checkpointer process                           

postgres 11682 11678  0 10:35 ?        00:00:00 postgres: writer process                                 

postgres 11683 11678  0 10:35 ?        00:00:00 postgres: wal writer process                              

postgres 11684 11678  0 10:35 ?        00:00:00 postgres: autovacuum launcher process                    

postgres 11685 11678  0 10:35 ?        00:00:00 postgres: stats collector process                      

 

a.      pg服务器端口是可以有命令参数指定的,如上例;而postgresql.confport设置作为默认启动的端口参数;

b.      pg启动时必须使用-D选项指定PGDATA目录,也可以设置环境变量$PGDATA作为默认值;

c.      postgres命令也可以启动pg服务器进程,如postgres -D /data/pgsql/data -p 5666,同时也可以指定port参数

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/16976507/viewspace-2133008/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/16976507/viewspace-2133008/

你可能感兴趣的:(postgresql的端口port)