PostgreSQL 插件介绍

发布时间: 更新时间: 总字数:383 阅读时间:1m 作者: 分享 复制网址

PostgreSQL 插件介绍

插件

  • Pgpoll:PostgreSQL连接池,有负载均衡的作用
  • timescaleDB:时序插件,用于处理时序数据(timescale的改进)
    • timescaleDB是自动切片的,对用户无感知,在数据量非常庞大的时候,写入性能不衰减。
  • PostGIS:空间插件,用于处理空间数据
    • PostGIS支持所有的空间数据类型,这些类型包括:点(POINT)、线(LINESTRING)、面(POLYGON)、多点(MULTIPOINT)、多线(MULTILINESTRING)、多面(MULTIPOLYGON)和几何集合(GEOMETRYCOLLECTION)等
  • timescaleDB+PostGIS: 时间+空间,时空数据库

扩展:

PostGIS 安装

apt install postgis

timescaleDB 安装

参考

echo "deb https://packagecloud.io/timescale/timescaledb/debian/ $(lsb_release -c -s) main" | sudo tee /etc/apt/sources.list.d/timescaledb.list
wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo apt-key add -
apt update
apt install timescaledb-2-postgresql-14
  • 配置
$ vim /etc/postgresql/14/main/postgresql.conf
# 添加
shared_preload_libraries = 'timescaledb'
  • 重启
pg_ctl restart -m fast
  • 创建插件
su - postgres
psql
postgres=# create extension timescaledb ;

# 查看参数
show timescaledb.constraint_aware_append;
show timescaledb.disable_optimizations;
show timescaledb.optimize_non_hypertables;
show timescaledb.restoring;
Home Archives Categories Tags Statistics
本文总阅读量 次 本站总访问量 次 本站总访客数