PipelineDB is a high-performance PostgreSQL extension built to run SQL queries continuously on time-series data. The output of these continuous queries is stored in regular tables which can be queried like any other table or view. Thus continuous queries can be thought of as very high-throughput, incrementally updated materialized views. As with any data processing system, PipelineDB is built to shine under particular workloads, and simply not intended for others.
PipelineDB is designed to excel at SQL queries that reduce the cardinality of time-series datasets.
PipelineDB aims to eliminate the necessity of an ETL stage for many common data pipelines.
PipelineDB is designed with pragmatism as a first-class consideration.
-- 摘自官网
环境:Cent OS 7 + PG 10
官网介绍中,使用自动安装脚本。两步完成。
官网安装介绍:http://docs.pipelinedb.com/installation.html
curl -s http://download.pipelinedb.com/yum.sh | sudo bash
sudo yum install pipelinedb-postgresql-10
But 我的环境中总是出问题,所以不得不使用另一种方式,下载安装包手动安装。
先安装PG 10,使用yum安装即可。这里不再赘述。
之后我们根据自己的环境下载pipelinedb包。
# wget https://github.com/pipelinedb/pipelinedb/releases/download/1.0.0rev4/pipelinedb-postgresql-10-1.0.0-4.centos7.x86_64.rpm
安装,会出现一系列提示。
# rpm -ivh pipelinedb-postgresql-10-1.0.0-4.centos7.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:pipelinedb-postgresql-10-1.0.0-4 ################################# [100%]
____ _ ___ ____ ____
/ __ \(_)___ ___ / (_)___ ___ / __ \/ __ )
/ /_/ / / __ \/ _ \/ / / __ \/ _ \/ / / / __ |
/ ____/ / /_/ / __/ / / / / / __/ /_/ / /_/ /
/_/ /_/ .___/\___/_/_/_/ /_/\___/_____/_____/
/_/
PipelineDB successfully installed. To get started, initialize a
PostgreSQL database directory:
initdb -D
where is a nonexistent directory where you'd
like all of your database files to live.
Next, edit /postgresql.conf and set:
shared_preload_libraries = 'pipelinedb'
max_worker_processes = 128
Once your database is running, create the pipelinedb extension:
psql -c 'CREATE EXTENSION pipelinedb'
我们来到data目录。如果是yum安装,默认目录在 /var/lib/pgsql/10/data/,我已经给这个目录做了软连接,连接到 /usr/local/pgsql/data
修改这两个参数。
shared_preload_libraries = 'pipelinedb'
max_worker_processes = 128
重启数据库
psql -U postgres
postgres=# create user mytest superuser;
CREATE ROLE
postgres=# create database mytest;
CREATE DATABASE
postgres=# \c mytest mytest
You are now connected to database "mytest" as user "mytest".
mytest=# create extension pipelinedb;
CREATE EXTENSION
安装完成。