コンテンツへスキップ

[root@localhost system]# systemctl status postgresql-13.service
● postgresql-13.service - PostgreSQL 13 database server
   Loaded: loaded (/usr/lib/systemd/system/postgresql-13.service; enabled; vendor preset: disabled)
   Active: active (running) since 水 2021-06-23 05:57:55 JST; 1h 9min ago
     Docs: https://www.postgresql.org/docs/13/static/
  Process: 2260 ExecStartPre=/usr/pgsql-13/bin/postgresql-13-check-db-dir ${PGDATA} (code=exited, status=0/SUCCESS)
 Main PID: 2265 (postmaster)
   CGroup: /system.slice/postgresql-13.service
           tq2265 /usr/pgsql-13/bin/postmaster -D /var/lib/pgsql/data
           tq2269 postgres: checkpointer
           tq2270 postgres: background writer
           tq2271 postgres: walwriter
           tq2272 postgres: autovacuum launcher
           tq2273 postgres: stats collector
           mq2274 postgres: logical replication launcher

 6月 23 05:57:54 localhost.localdomain systemd[1]: Starting PostgreSQL 13 database server...
 6月 23 05:57:55 localhost.localdomain postmaster[2265]: 2021-06-23 05:57:55.031 JST [2265] LOG:  PostgreSQL 13.3 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.…しています
 6月 23 05:57:55 localhost.localdomain postmaster[2265]: 2021-06-23 05:57:55.034 JST [2265] LOG:  IPv6アドレス"::1"、ポート5432で待ち受けています
 6月 23 05:57:55 localhost.localdomain postmaster[2265]: 2021-06-23 05:57:55.034 JST [2265] LOG:  IPv4アドレス"127.0.0.1"、ポート5432で待ち受けています
 6月 23 05:57:55 localhost.localdomain postmaster[2265]: 2021-06-23 05:57:55.035 JST [2265] LOG:  Unixソケット"/var/run/postgresql/.s.PGSQL.5432"で待ち受けています
 6月 23 05:57:55 localhost.localdomain postmaster[2265]: 2021-06-23 05:57:55.037 JST [2265] LOG:  Unixソケット"/tmp/.s.PGSQL.5432"で待ち受けています
 6月 23 05:57:55 localhost.localdomain postmaster[2265]: 2021-06-23 05:57:55.041 JST [2268] LOG:  データベースシステムは 2021-06-23 05:57:44 JST にシャットダウンしました
 6月 23 05:57:55 localhost.localdomain postmaster[2265]: 2021-06-23 05:57:55.045 JST [2265] LOG:  データベースシステムの接続受け付け準備が整いました
 6月 23 05:57:55 localhost.localdomain systemd[1]: Started PostgreSQL 13 database server.
Hint: Some lines were ellipsized, use -l to show in full.
# It's not recommended to modify this file in-place, because it will be
# overwritten during package upgrades.  It is recommended to use systemd
# "dropin" feature;  i.e. create file with suffix .conf under
# /etc/systemd/system/postgresql-13.service.d directory overriding the
# unit's defaults. You can also use "systemctl edit postgresql-13"
# Look at systemd.unit(5) manual page for more info.

# Note: changing PGDATA will typically require adjusting SELinux
# configuration as well.

# Note: do not use a PGDATA pathname containing spaces, or you will
# break postgresql-13-setup.
[Unit]
Description=PostgreSQL 13 database server
Documentation=https://www.postgresql.org/docs/13/static/
After=syslog.target
After=network.target

[Service]
Type=notify

User=postgres
Group=postgres

# Note: avoid inserting whitespace in these Environment= lines, or you may
# break postgresql-setup.

# Location of database directory
#Environment=PGDATA=/var/lib/pgsql/13/data/
Environment=PGDATA=/var/lib/pgsql/data

# Where to send early-startup messages from the server (before the logging
# options of postgresql.conf take effect)
# This is normally controlled by the global default set by systemd
# StandardOutput=syslog

# Disable OOM kill on the postmaster
OOMScoreAdjust=-1000
Environment=PG_OOM_ADJUST_FILE=/proc/self/oom_score_adj
Environment=PG_OOM_ADJUST_VALUE=0

ExecStartPre=/usr/pgsql-13/bin/postgresql-13-check-db-dir ${PGDATA}
ExecStart=/usr/pgsql-13/bin/postmaster -D ${PGDATA}
ExecReload=/bin/kill -HUP $MAINPID
KillMode=mixed
KillSignal=SIGINT


# Do not set any timeout value, so that systemd will not kill postmaster
# during crash recovery.
TimeoutSec=0

[Install]
WantedBy=multi-user.target