![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
postgresql
文章平均质量分 56
pg_edb
Dataware House,ETL,BI,PostgreSQL,EnterpriseDB,MongoDB,Zabbix,AWS
展开
-
PostgreSQL表/索引膨胀检测SQL
SELECT current_database(), schemaname, tablename, /reltuples::bigint, relpages::bigint, otta,/ ROUND((CASE WHEN otta=0 THEN 0.0 ELSE sml.relpages::FLOAT/otta END)::NUMERIC,1) AS tbloat, CASE WHEN relpages < otta THEN 0 ELSE bs*(sml.原创 2021-05-07 14:32:54 · 411 阅读 · 1 评论 -
centos8安装PostgreSQL13
1.安装PostgreSQL13dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpmdnf -qy module disable postgresqldnf install -y postgresql13-server/usr/pgsql-13/bin/postgresql-13-setup initdb安装后bin目录原创 2021-04-26 10:54:22 · 759 阅读 · 0 评论 -
centos7上安装postgresql11 Beta2版
1.下载安装包https://ftp.postgresql.org/pub/source/v11beta2/postgresql-11beta2.tar.gz2.解压编译tar -zxvf postgresql-11beta2.tar.gzconfiguremakemake install3.生成postgres组和用户[root@localhost usr]# g...原创 2018-08-07 10:35:32 · 1134 阅读 · 0 评论 -
在zabbix中使用使用pg_monz模板日常监控postgresql的log文件
导入模板后,zabbix监控画面显示postgresql没启动,其实服务器已经启动。查看zabbix-sever.log,发现有以下错误提示。psql.active_connections[{PGHOST},{PGHOST},{PGHOST},{PGPORT},{PGROLE},{PGROLE},{PGROLE},{PGDATABASE}]” became not supported: Rec...原创 2018-08-09 19:25:03 · 663 阅读 · 0 评论 -
在zabbix中使用使用pg_monz模板日常监控postgresql发生sh: psql: command not found错误
导入pg_monz模板,监控显示postgresql服务没有启动,查看agent端postgresql服务已经启动。查看zabbix-server.log查看到以下错误。 10784:20180809:183958.229 item “agent1:psql.active_connections[{PGHOST},{PGHOST},{PGHOST},{PGPORT},{PGROLE},{PGR...原创 2018-08-09 19:37:01 · 3549 阅读 · 0 评论 -
centos7上安装postgresql10.0 Beta2版
1.下载安装包https://ftp.postgresql.org/pub/source/v10beta2/postgresql-10beta2.tar.gz2.解压编译tar zxvf postgresql-10beta2.tar.gzconfigureconfigure: creating ./config.statusconfig.status: creating GNUmake...原创 2019-02-09 12:02:21 · 200 阅读 · 0 评论 -
postgresql10 启动log追加监听ip和port
[postgres@localhost bin]$ ./pg_ctl start -D /usr/pgdata/waiting for server to start…2017-08-11 09:26:19.444 CST [4890] LOG: listening on IPv4 address “0.0.0.0”, port 54322017-08-11 09:26:19.444 CST...原创 2019-02-09 12:01:17 · 570 阅读 · 0 评论 -
pg_rewind发生int型溢出(bug)
pg_rewind 9.5以及9.6版本,在file的size大于2G以上时,会发生int型溢出。unexpected result while sending file list: ERROR: value “2148022000” is out of range for type integer /* * First create a te...原创 2019-02-09 11:57:46 · 540 阅读 · 0 评论 -
postgresql10新增加分区表PARTITION BY
postgresql10以前版本的分区表是通过继承追加制约实现的,postgresql10新追加PARTITION BY可以直接定义list和range分区,检证如下:postgres=# CREATE TABLE test(id integer,name text) PARTITION BY LIST (id);postgres=# CREATE TABLE test_p1 PARTITIO...原创 2019-02-09 11:56:40 · 10344 阅读 · 0 评论 -
docker环境下搭建使用postgresql10
1.查看镜像库中postgres镜像[root@localhost ~]# docker search postgresNAME DESCRIPTION STARS OFFICIAL AUTOMATED...原创 2019-02-09 11:55:06 · 3696 阅读 · 0 评论