create extension timescaledb;
ERROR: extension "timescaledb" has no installation script nor update path for version "2.11.1"
解决方案
运行以下命令,安装timescaledb-2-postgresql-12
yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-$(rpm -E %{rhel})-x86_64/pgdg-redhat-repo-latest.noarch.rpm
tee /etc/yum.repos.d/timescale_timescaledb.repo <<EOL
[timescale_timescaledb]
name=timescale_timescaledb
baseurl=https://packagecloud.io/timescale/timescaledb/el/$(rpm -E %{rhel})/\$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/timescale/timescaledb/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
EOL
yum update -y
yum install timescaledb-2-postgresql-12
/usr/pgsql-12/bin/postgresql-12-setup initdb
如果安装过pgsql,大概率会报错 Data directory is not empty!
删除掉pgsql的初始化后的数据目录即可
rm -rf /var/lib/pgsql/12/data
然后重新运行
/usr/pgsql-12/bin/postgresql-12-setup initdb
重启pgsql:
systemctl start postgresql-12.service
验证: