日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Postgres主进程文件—postmaster.pid

發(fā)布時(shí)間:2023/12/20 编程问答 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Postgres主进程文件—postmaster.pid 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

postmaster內(nèi)容

使用cat -n?命令可以查看postmaster.pid文件內(nèi)容:

)

根據(jù)每一行進(jìn)行解釋,并給出對應(yīng)的源代碼說明

  • 13795: 代表Postgres主進(jìn)程的PID
  • /usr/local/pgsql/data: 代表數(shù)據(jù)目錄

  • 1529235109: 代表postmaster文件的創(chuàng)建時(shí)間。

  • 5432: 代表數(shù)據(jù)庫監(jiān)聽端口,在postgresql.conf中對應(yīng)port = 5432

  • 來自源代碼說明:

    /* The socket number we are listening for connections on */ int PostPortNumber;
    • 1
    • 2
  • /tmp: 代表是unix socket的監(jiān)聽目錄,在postgresql.conf中對應(yīng)?unix_socket_directory = '/tmp'
  • 來自源代碼說明:

    /* The directory names for Unix socket(s) */ char *Unix_socket_directories;
    • 1
    • 2
  • *** **: 代表數(shù)據(jù)庫監(jiān)聽地址,對應(yīng)postgresql.conf的listen_addresses = '\* '
  • 來自源代碼說明:

    /* The TCP listen address(es) */ char *ListenAddresses;
    • 1
    • 2
  • 5432001 163840:代表的是共享內(nèi)存的地址(shared memory segments中的key和shmid)。
  • 輸入ipcs可以查看:

    注:?postmaster.pid顯示的是key轉(zhuǎn)成10進(jìn)制后的數(shù)字。

  • ready?代表主進(jìn)程狀態(tài)
  • typedef enum {PM_INIT, /* postmaster starting */PM_STARTUP, /* waiting for startup subprocess */PM_RECOVERY, /* in archive recovery mode */PM_HOT_STANDBY, /* in hot standby mode */PM_RUN, /* normal "database is alive" state */PM_WAIT_BACKUP, /* waiting for online backup mode to end */PM_WAIT_READONLY, /* waiting for read only backends to exit */PM_WAIT_BACKENDS, /* waiting for live backends to exit */PM_SHUTDOWN, /* waiting for checkpointer to do shutdown* ckpt */PM_SHUTDOWN_2, /* waiting for archiver and walsenders to* finish */PM_WAIT_DEAD_END, /* waiting for dead_end children to exit */PM_NO_CHILDREN /* all important children have exited */ } PMState;

    總結(jié)

    以上是生活随笔為你收集整理的Postgres主进程文件—postmaster.pid的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。