[root@ip-172-31-38-38 data]# systemctl enable postgresql.service
Created symlink from /etc/systemd/system/multi-user.target.wants/postgresql.service to /usr/lib/systemd/system/postgresql.service.
[root@ip-172-31-38-38 data]#
[root@ip-172-31-38-38 data]# systemctl status postgresql.service ● postgresql.service – PostgreSQL database server
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; vendor preset: disabled)
Active: active (running) since Sat 2018-11-17 03:42:45 UTC; 56s ago
Process: 15218 ExecStart=/usr/bin/pg_ctl start -D ${PGDATA} -s -o -p ${PGPORT} -w -t 300 (code=exited, status=0/SUCCESS)
Process: 15213 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGDATA} (code=exited, status=0/SUCCESS)
Main PID: 15221 (postgres)
CGroup: /system.slice/postgresql.service
tq15221 /usr/bin/postgres -D /var/lib/pgsql/data -p 5432
tq15222 postgres: logger process
tq15224 postgres: checkpointer process
tq15225 postgres: writer process
tq15226 postgres: wal writer process
tq15227 postgres: autovacuum launcher process
mq15228 postgres: stats collector process
Nov 17 03:42:43 ip-172-31-38-38.ap-northeast-1.compute.internal systemd[1]: S…
Nov 17 03:42:45 ip-172-31-38-38.ap-northeast-1.compute.internal systemd[1]: S…
Hint: Some lines were ellipsized, use -l to show in full.
[root@ip-172-31-38-38 data]#
PostgreSQL プロセスを起動しようとした際に以下のように「PANIC: could not locate a valid checkpoint record」が出力された場合です。
[2018-11-15 09:31:55 JST][0][00000]LOG: database system was interrupted; last known up at 2018-11-07 01:51:08 JST
[2018-11-15 09:31:55 JST][0][00000]LOG: invalid primary checkpoint record
[2018-11-15 09:31:55 JST][0][00000]LOG: invalid secondary checkpoint record
[2018-11-15 09:31:55 JST][0][XX000]PANIC: could not locate a valid checkpoint record
[2018-11-15 09:32:00 JST][0][00000]LOG: startup process (PID 4723) was terminated by signal 6: Aborted
[2018-11-15 09:32:00 JST][0][00000]LOG: aborting startup due to startup process failure
コメント