PostgreSQL 设计为易于扩展。加载到数据库的扩展程序可以像内置功能一样运行。TimescaleDB 为时序数据扩展了 PostgreSQL,为 PostgreSQL 提供了现代数据密集型应用程序所需的高性能、可扩展性和分析能力。如果您使用 Homebrew 或 MacPorts 安装了 TimescaleDB,则可以卸载它,而无需卸载 PostgreSQL。

  1. psql 提示符下,删除 TimescaleDB 扩展

    DROP EXTENSION timescaledb;
  2. 在命令提示符下,从 postgresql.conf 配置文件中的 shared_preload_libraries 中删除 timescaledb

    nano /opt/homebrew/var/postgresql@14/postgresql.conf
    shared_preload_libraries = ''
  3. 将更改保存到 postgresql.conf 文件。

  4. 重启 PostgreSQL

    brew services restart postgresql
  5. 通过在 psql 提示符下使用 \dx 命令,检查 TimescaleDB 扩展是否已卸载。输出类似于

    tsdb-# \dx
    List of installed extensions
    Name | Version | Schema | Description
    -------------+---------+------------+-------------------------------------------------------------------
    plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
    (1 row)
  6. 卸载 TimescaleDB

    brew uninstall timescaledb
  7. 删除所有依赖项和相关文件

    brew remove timescaledb
  1. psql 提示符下,删除 TimescaleDB 扩展

    DROP EXTENSION timescaledb;
  2. 在命令提示符下,从 postgresql.conf 配置文件中的 shared_preload_libraries 中删除 timescaledb

    nano /opt/homebrew/var/postgresql@14/postgresql.conf
    shared_preload_libraries = ''
  3. 将更改保存到 postgresql.conf 文件。

  4. 重启 PostgreSQL

    port reload postgresql
  5. 通过在 psql 提示符下使用 \dx 命令,检查 TimescaleDB 扩展是否已卸载。输出类似于

    tsdb-# \dx
    List of installed extensions
    Name | Version | Schema | Description
    -------------+---------+------------+-------------------------------------------------------------------
    plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
    (1 row)
  6. 卸载 TimescaleDB 和相关的依赖项

    port uninstall timescaledb --follow-dependencies

关键词

在此页面上发现问题?报告问题 或 在 GitHub 上编辑此页