PostgreSQL 插件介绍
插件
Pgpoll:PostgreSQL 连接池,有负载均衡的作用timescaleDB:时序插件,用于处理时序数据(timescale的改进)- timescaleDB 是自动切片的,对用户无感知,在数据量非常庞大的时候,写入性能不衰减。
PostGIS:空间插件,用于处理空间数据- PostGIS 支持所有的空间数据类型,这些类型包括:点(POINT)、线(LINESTRING)、面(POLYGON)、多点(MULTIPOINT)、多线(MULTILINESTRING)、多面(MULTIPOLYGON)和几何集合(GEOMETRYCOLLECTION)等
timescaleDB+PostGIS: 时间+空间,时空数据库
扩展:
- https://github.com/digoal/blog 有大量 PostgreSQL 相关的文档
PostGIS 安装
apt install postgistimescaleDB 安装
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;最近更新
最新评论