消失的postmaster进程

,
之前看<<PostgreSQL数据库内核分析>>这本书,提到了postmaster进程,
于是在我安装的PG 9.6.0中,ps -ef了一把,结果没找到,如下:
[postgres@rhel73 global]$ pwd
/usr/local/pgsql/data/global
[postgres@rhel73 global]$ ps -ef | grep -i  post
root      2220     1  0 03:43 ?        00:00:00 /usr/libexec/postfix/master -w
postfix   2222  2220  0 03:43 ?        00:00:00 qmgr -l -t unix -u
root      2549  2501  0 03:48 pts/0    00:00:00 su - postgres
postgres  2550  2549  0 03:48 pts/0    00:00:00 -bash
postgres  2632     1  0 03:51 pts/0    00:00:00 /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data--->>>只有这个.
postgres  2634  2632  0 03:51 ?        00:00:00 postgres: checkpointer process   
postgres  2635  2632  0 03:51 ?        00:00:00 postgres: writer process   
postgres  2636  2632  0 03:51 ?        00:00:00 postgres: wal writer process   
postgres  2637  2632  0 03:51 ?        00:00:00 postgres: autovacuum launcher process   
postgres  2638  2632  0 03:51 ?        00:00:00 postgres: stats collector process   
postgres  7255  2550  0 12:03 pts/0    00:00:00 ps -ef
postgres  7256  2550  0 12:03 pts/0    00:00:00 grep --color=auto -i post
[postgres@rhel73 global]$ ps -ef | grep mast
root      2220     1  0 03:43 ?        00:00:00 /usr/libexec/postfix/master -w
postgres  7638  2550  0 12:46 pts/0    00:00:00 grep --color=auto mast
[postgres@rhel73 global]$ ps -ef | grep master
root      2220     1  0 03:43 ?        00:00:00 /usr/libexec/postfix/master -w
postgres  7640  2550  0 12:46 pts/0    00:00:00 grep --color=auto master
[postgres@rhel73 global]$ 
[postgres@rhel73 global]$ 
[postgres@rhel73 global]$ 
[postgres@rhel73 global]$ which postmaster
/usr/local/pgsql/bin/postmaster
[postgres@rhel73 global]$ 
[postgres@rhel73 global]$ 
[postgres@rhel73 global]$ cd ..
[postgres@rhel73 data]$ ls -lrt
total 56
-rw-------. 1 postgres postgres     4 Feb 28 07:57 PG_VERSION
drwx------. 2 postgres postgres     6 Feb 28 07:57 pg_twophase
drwx------. 2 postgres postgres     6 Feb 28 07:57 pg_tblspc
drwx------. 2 postgres postgres     6 Feb 28 07:57 pg_stat
drwx------. 2 postgres postgres     6 Feb 28 07:57 pg_snapshots
drwx------. 2 postgres postgres     6 Feb 28 07:57 pg_serial
drwx------. 2 postgres postgres     6 Feb 28 07:57 pg_replslot
drwx------. 4 postgres postgres    36 Feb 28 07:57 pg_multixact
drwx------. 4 postgres postgres    39 Feb 28 07:57 pg_logical
drwx------. 2 postgres postgres     6 Feb 28 07:57 pg_dynshmem
drwx------. 2 postgres postgres     6 Feb 28 07:57 pg_commit_ts
-rw-------. 1 postgres postgres 22282 Feb 28 07:57 postgresql.conf
-rw-------. 1 postgres postgres    88 Feb 28 07:57 postgresql.auto.conf
-rw-------. 1 postgres postgres  1636 Feb 28 07:57 pg_ident.conf
-rw-------. 1 postgres postgres  4468 Feb 28 07:57 pg_hba.conf
drwx------. 3 postgres postgres    60 Feb 28 07:57 pg_xlog
drwx------. 2 postgres postgres    18 Feb 28 07:57 pg_subtrans
drwx------. 2 postgres postgres    18 Feb 28 07:57 pg_clog
drwx------. 6 postgres postgres    54 Feb 28 08:02 base
-rw-------. 1 postgres postgres    78 Mar  2 03:51 postmaster.pid
drwx------. 2 postgres postgres    18 Mar  2 03:51 pg_notify
-rw-------. 1 postgres postgres    59 Mar  2 03:51 postmaster.opts
drwx------. 2 postgres postgres  4096 Mar  2 03:51 global
drwx------. 2 postgres postgres    25 Mar  2 12:56 pg_stat_tmp
[postgres@rhel73 data]$ pwd
/usr/local/pgsql/data
[postgres@rhel73 data]$ cat postmaster.pid
2632
/usr/local/pgsql/data
1488444664
5432
/tmp
localhost
  5432001         0
[postgres@rhel73 data]$ ps -ef | grep 5432
postgres  7746  2550  0 12:57 pts/0    00:00:00 grep --color=auto 5432
[postgres@rhel73 data]$ 
[postgres@rhel73 data]$ 
[postgres@rhel73 data]$ 
[postgres@rhel73 data]$ cat postmaster.opts
/usr/local/pgsql/bin/postgres "-D" "/usr/local/pgsql/data"
[postgres@rhel73 data]$ pwd
/usr/local/pgsql/data
[postgres@rhel73 data]$ 


问了问公司的技术总监,结果是这样的:
postmaster is a deprecated alias of postgres.
如上来自:
https://www.postgresql.org/docs/9.5/static/app-postmaster.html


结论是这样的:
PG9.5之前的postmaster进程实际上就是PG9.5及其以后版本中第一个启动的postgres进程,该进程的ospid(操作系统进程的进程号)在$PGDATA/下的postmaster.pid中有记录.
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值