暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

PostgreSQL基础 log 查看数据库的启停日志

CentOS 7.6.1810
postgresql 14.4

log 查看数据库的启停日志

[postgres@localhost data]$ pwd /var/lib/pgsql/14/data [postgres@localhost data]$ ls base log pg_hba.conf pg_multixact pg_serial pg_stat_tmp pg_twophase pg_xact postmaster.opts current_logfiles pg_commit_ts pg_ident.conf pg_notify pg_snapshots pg_subtrans PG_VERSION postgresql.auto.conf postmaster.pid global pg_dynshmem pg_logical pg_replslot pg_stat pg_tblspc pg_wal postgresql.conf [postgres@localhost data]$ cd log/ [postgres@localhost log]$ ll total 8 -rw-------. 1 postgres postgres 1425 Jul 12 23:26 postgresql-Tue.log -rw-------. 1 postgres postgres 2921 Jul 13 16:26 postgresql-Wed.log [postgres@localhost log]$ cat postgresql-Wed.log 2022-07-13 16:03:50.322 CST [9373] LOG: starting PostgreSQL 14.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit 2022-07-13 16:03:50.337 CST [9373] LOG: listening on IPv6 address "::1", port 5432 2022-07-13 16:03:50.338 CST [9373] LOG: listening on IPv4 address "127.0.0.1", port 5432 2022-07-13 16:03:50.345 CST [9373] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2022-07-13 16:03:50.347 CST [9373] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432" 2022-07-13 16:03:50.380 CST [9450] LOG: database system was shut down at 2022-07-12 23:26:23 CST 2022-07-13 16:03:50.401 CST [9373] LOG: database system is ready to accept connections 2022-07-13 16:14:58.649 CST [9373] LOG: received fast shutdown request 2022-07-13 16:14:58.651 CST [9373] LOG: aborting any active transactions 2022-07-13 16:14:58.654 CST [9373] LOG: background worker "logical replication launcher" (PID 9462) exited with exit code 1 2022-07-13 16:14:58.654 CST [9457] LOG: shutting down 2022-07-13 16:14:58.662 CST [9373] LOG: database system is shut down 2022-07-13 16:14:58.780 CST [10664] LOG: starting PostgreSQL 14.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit 2022-07-13 16:14:58.782 CST [10664] LOG: listening on IPv6 address "::1", port 5432 2022-07-13 16:14:58.782 CST [10664] LOG: listening on IPv4 address "127.0.0.1", port 5432 2022-07-13 16:14:58.784 CST [10664] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2022-07-13 16:14:58.785 CST [10664] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432" 2022-07-13 16:14:58.790 CST [10666] LOG: database system was shut down at 2022-07-13 16:14:58 CST 2022-07-13 16:14:58.793 CST [10664] LOG: database system is ready to accept connections 2022-07-13 16:26:00.070 CST [10664] LOG: received fast shutdown request 2022-07-13 16:26:00.070 CST [10664] LOG: aborting any active transactions 2022-07-13 16:26:00.072 CST [10664] LOG: background worker "logical replication launcher" (PID 10672) exited with exit code 1 2022-07-13 16:26:00.072 CST [10667] LOG: shutting down 2022-07-13 16:26:00.081 CST [10664] LOG: database system is shut down 2022-07-13 16:26:03.960 CST [10797] LOG: starting PostgreSQL 14.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit 2022-07-13 16:26:03.963 CST [10797] LOG: listening on IPv6 address "::1", port 5432 2022-07-13 16:26:03.963 CST [10797] LOG: listening on IPv4 address "127.0.0.1", port 5432 2022-07-13 16:26:03.964 CST [10797] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2022-07-13 16:26:03.966 CST [10797] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432" 2022-07-13 16:26:03.968 CST [10799] LOG: database system was shut down at 2022-07-13 16:26:00 CST 2022-07-13 16:26:03.971 CST [10797] LOG: database system is ready to accept connections [postgres@localhost log]$

学习资料


欢迎各位同学一起来交流学习心得!

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

文章被以下合辑收录

评论