返回首页

gbase数据、南大通用产品文档:GBase8c

更新日期:2024年09月11日

log_rotation_age
参数说明:logging_collector 设置为on 时,log_rotation_age 决定创建一个新日志文件的
时间间隔。当现在的时间减去上次创建一个服务器日志的时间超过了log_rotation_age 的值

GBase 8c V5 开发者手册
南大通用数据技术股份有限公司
1275
时,将生成一个新的日志文件。
该参数属于SIGHUP 类型参数,请参考表15-1 中对应设置方法进行设置。
取值范围:整型,0 ~ 35791394,单位为min。其中0 表示关闭基于时间的新日志文件
的创建。
默认值:1440(min)

前提条件

可以正常连接GBase 8c 数据库。

在进行还原时,需要保证各节点备份目录中存在备份文件。

需以操作系统用户gbase 执行gs_backup 命令。

查看数据

使用系统表pg_tables 查询数据库所有表的信息。
postgres=# SELECT * FROM pg_tables;

使用gsql 的\d+命令查询表的属性。
postgres=# \d+ customer_t1;

执行如下命令查询表customer_t1 的数据量。
postgres=# SELECT count(*) FROM customer_t1;

执行如下命令查询表customer_t1 的所有数据。
postgres=# SELECT * FROM customer_t1;

执行如下命令只查询字段c_customer_sk 的数据。
postgres=# SELECT c_customer_sk FROM customer_t1;

执行如下命令过滤字段c_customer_sk 的重复数据。
postgres=# SELECT DISTINCT( c_customer_sk ) FROM customer_t1;

GBase 8c V5 开发者手册
南大通用数据技术股份有限公司
29

执行如下命令查询字段c_customer_sk 为3869 的所有数据。
postgres=# SELECT * FROM customer_t1 WHERE c_customer_sk = 3869;

执行如下命令按照字段c_customer_sk 进行排序。
postgres=# SELECT * FROM customer_t1 ORDER BY c_customer_sk;