PostgreSQL View current log
发布时间:2020-12-13 17:36:12 所属栏目:百科 来源:网络整理
导读:[postgres@zwc pg_xlog]$ psql -h 192.168.1.13 -p 1521 -U zwc -d testdbPassword for user zwc: psql (9.2.4)Type "help" for help.testdb= select pg_current_xlog_location(); pg_current_xlog_location -------------------------- 0/8000000(1 row)tes
[postgres@zwc pg_xlog]$ psql -h 192.168.1.13 -p 1521 -U zwc -d testdb Password for user zwc: psql (9.2.4) Type "help" for help. testdb=> select pg_current_xlog_location(); pg_current_xlog_location -------------------------- 0/8000000 (1 row) testdb=> select pg_xlogfile_name(pg_current_xlog_location()); pg_xlogfile_name -------------------------- 000000010000000000000001 (1 row) testdb=> testdb=> testdb=> dt List of relations Schema | Name | Type | Owner --------+-----------+-------+------- public | orderinfo | table | zwc (1 row) testdb=> create table t01(id integer,name varchar(30)); CREATE TABLE testdb=> dt List of relations Schema | Name | Type | Owner --------+-----------+-------+------- public | orderinfo | table | zwc public | t01 | table | zwc (2 rows) testdb=> insert into t01 values(1,'aaa'); INSERT 0 1
[postgres@zwc pg_xlog]$ psql psql (9.2.4) Type "help" for help. postgres=# select pg_switch_xlog(); pg_switch_xlog ---------------- 0/80151D0 (1 row) postgres=# select pg_xlogfile_name(pg_current_xlog_location()); pg_xlogfile_name -------------------------- 000000010000000000000002 (1 row) postgres=# !! ls -l total 131312 -rw------- 1 postgres postgres 67108864 Sep 2 14:28 000000010000000000000001 -rw------- 1 postgres postgres 67108864 Sep 2 14:30 000000010000000000000002 drwx------ 2 postgres postgres 4096 Aug 28 12:56 archive_status -rw-rw-r-- 1 postgres postgres 96147 Sep 2 14:30 gmon.out postgres=# (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |