[postgres@rhel73 global]$ pwd/usr/local/pgsql/data/global[postgres@rhel73 global]$ ps -ef | grep -i postroot 2220 1 0 03:43 ? 00:00:00 /usr/libexec/postfix/master -wpostfix 2222 2220 0 03:43 ? 00:00:00 qmgr -l -t unix -uroot 2549 2501 0 03:48 pts/0 00:00:00 su - postgrespostgres 2550 2549 0 03:48 pts/0 00:00:00 -bashpostgres 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 -efpostgres 7256 2550 0 12:03 pts/0 00:00:00 grep --color=auto -i post[postgres@rhel73 global]$ ps -ef | grep mastroot 2220 1 0 03:43 ? 00:00:00 /usr/libexec/postfix/master -wpostgres 7638 2550 0 12:46 pts/0 00:00:00 grep --color=auto mast[postgres@rhel73 global]$ ps -ef | grep masterroot 2220 1 0 03:43 ? 00:00:00 /usr/libexec/postfix/master -wpostgres 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 -lrttotal 56-rw-------. 1 postgres postgres 4 Feb 28 07:57 PG_VERSIONdrwx------. 2 postgres postgres 6 Feb 28 07:57 pg_twophasedrwx------. 2 postgres postgres 6 Feb 28 07:57 pg_tblspcdrwx------. 2 postgres postgres 6 Feb 28 07:57 pg_statdrwx------. 2 postgres postgres 6 Feb 28 07:57 pg_snapshotsdrwx------. 2 postgres postgres 6 Feb 28 07:57 pg_serialdrwx------. 2 postgres postgres 6 Feb 28 07:57 pg_replslotdrwx------. 4 postgres postgres 36 Feb 28 07:57 pg_multixactdrwx------. 4 postgres postgres 39 Feb 28 07:57 pg_logicaldrwx------. 2 postgres postgres 6 Feb 28 07:57 pg_dynshmemdrwx------. 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.confdrwx------. 3 postgres postgres 60 Feb 28 07:57 pg_xlogdrwx------. 2 postgres postgres 18 Feb 28 07:57 pg_subtransdrwx------. 2 postgres postgres 18 Feb 28 07:57 pg_clogdrwx------. 6 postgres postgres 54 Feb 28 08:02 base-rw-------. 1 postgres postgres 78 Mar 2 03:51 postmaster.piddrwx------. 2 postgres postgres 18 Mar 2 03:51 pg_notify-rw-------. 1 postgres postgres 59 Mar 2 03:51 postmaster.optsdrwx------. 2 postgres postgres 4096 Mar 2 03:51 globaldrwx------. 2 postgres postgres 25 Mar 2 12:56 pg_stat_tmp[postgres@rhel73 data]$ pwd/usr/local/pgsql/data[postgres@rhel73 data]$ cat postmaster.pid2632/usr/local/pgsql/data14884446645432/tmplocalhost 5432001 0[postgres@rhel73 data]$ ps -ef | grep 5432postgres 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中有记录.
新闻热点
疑难解答