PostgrSQL创建扩展时间表

时间:2020-03-18 20:16:51

标签: postgresql timescaledb

嗨,我只是无法在PostgreSQL中安装timescaledb Extension。

CREATE EXTENSION timescaledb
    VERSION "1.6.0";

保存后;消息"Connection to Server has been lost"

Google没有帮助;已经尝试了数小时...帮助!!!!

== Saving changes to: C:\Program Files\PostgreSQL\11\data\postgresql.conf
2020/03/18 21:39:26 Installing TimescaleDB library files...
2020/03/18 21:39:26 Success!
2020/03/18 21:39:26 Installing TimescaleDB control file...
2020/03/18 21:39:26 Success!
2020/03/18 21:39:26 Installing TimescaleDB SQL files...
2020/03/18 21:39:26 Success!
TimescaleDB installation completed successfully.

尝试在命令行管理程序中创建扩展程序给了我:

localdb=# CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;
FATAL:  extension "timescaledb" must be preloaded
TIP:  Please preload the timescaledb library via shared_preload_libraries.

This can be done by editing the config file at: C:/Program Files/PostgreSQL/11/data/postgresql.conf
and adding 'timescaledb' to the list in the shared_preload_libraries config.
        # Modify postgresql.conf:
        shared_preload_libraries = 'timescaledb'

Another way to do this, if not preloading other libraries, is with the command:
        echo "shared_preload_libraries = 'timescaledb'" >> C:/Program Files/PostgreSQL/11/data/postgresql.conf

(Will require a database restart.)

但是shared_preload_libraries = 'timescaledb'已添加到列表中……

postgresql.conf文件:

# - Shared Library Preloading -

shared_preload_libraries = 'timescaledb'    

#local_preload_libraries = 'timescaledb'
#session_preload_libraries = 'timescaledb'
#jit_provider = 'llvmjit'       # JIT library to use

# - Other Defaults -

#dynamic_library_path = '$libdir'

我在这里做错了什么??

1 个答案:

答案 0 :(得分:1)

需要更多信息。您如何/在何处安装了TimescaleDB?省略版本字符串会怎样?例如,

CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;

您是否在日志中看到任何内容?