正如the official docs 中所述,我将Timescale PPA存储库添加到apt
。然后我通过sudo apt install timescaledb-postgresql-9.6
安装了它。一切都很好。
最近一次sudo apt upgrade
时间尺度包从 0.8.0~ubuntu16.04 更新为 0.9.1~ubuntu16.04 。< / p>
当运行我的Python脚本以插入一些新数据时,我现在收到以下错误(并且没有插入任何内容):
2018-04-12 09:42:06,279 ERROR Postgres: could not access file "timescaledb-0.8.0": No such file or directory
似乎旧版本的共享库仍然被引用。 其中吗
我已经尝试过:
/etc/postgresql/9.6/main/postgresql.conf
仍然包含shared_preload_libraries = 'timescaledb'
。sudo service postgresql restart
重新启动postgres服务。sudo apt purge timescaledb-postgresql-9.6
,然后重启,重新安装,重启服务。psql -U postgres -h localhost -W
执行\dx
命令连接到 psql 时,不将timescaledb显示为已安装的扩展名;因此upgrade docs建议执行ALTER EXTENSION timescaledb UPDATE;
不成功答案 0 :(得分:8)
知道了。 ALTER EXTENSION timescaledb UPDATE;
已关闭 - 但必须在您连接到的数据库上执行,而不是在登录psql后全局执行。并且建议也传递-X
参数来禁用读取启动文件(〜/ .psqlrc)。
psql -X -U postgres -h localhost -W
\c your-timescale-extended-database-name
ALTER EXTENSION timescaledb UPDATE;
\dx
输出:
List of installed extensions
Name | Version | Schema | Description
-------------+---------+------------+-------------------------------------------------------------------
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
timescaledb | 0.9.1 | public | Enables scalable inserts and complex queries for time-series data
(2 rows)
\q
退出psql