编辑:我知道如果你通过自制软件安装了postgres,使用国产Postgress.app会更容易,但出于其他原因,我想保留我的设置。
你是如何在苹果的Sillicone M1芯片上安装时间升级的?
我收到了这个错误
tsdb=# CREATE EXTENSION IF NOT EXISTS timescaledb;
ERROR: could not open extension control file "/Applications/Postgres.app/Contents/Versions/14/share/postgresql/extension/timescaledb.control": No such file or directory在遵循以下说明之后
发布于 2022-08-05 10:11:47
这个问题没有堆叠溢出,所以我决定问并回答它。
步骤1:确保安装了最新的postgress.app
您至少需要使用postgres v14 of postgress.app,如果您不这样做,就会得到这个错误。
ld: can't link with a main executable file '/Applications/Postgres.app/Contents/Versions/13/bin/postgres' for architecture arm64因为旧版本只使用英特尔
第2步:按照自制的说明操作
使用说明这里
但是当你走到这一步的时候,timescaledb-tune --quiet --yes,你开始遵循我的命令
第三步:我的指示
步骤3.1
由于homebrew方法希望使用homebrew,所以您必须通过运行以下命令将running命令指向postgress.app配置文件
timescaledb-tune --yes --conf-path=/Users/tawanda/Library/Application Support/Postgres/var-14/postgresql.conf
如果以后用postgres的版本替换var-14
步骤3.2
手动运行您自己的安装程序,如下所示,因为随时间刻度的脚本不适用于您的posgresss.app用例
/usr/bin/install -c -m 755 $(find /opt/homebrew/Cellar/timescaledb/2.7.2/lib/timescaledb/postgresql/ -name "timescaledb*.so") /Applications/Postgres.app/Contents/Versions/14/lib/postgresql
/usr/bin/install -c -m 644 /opt/homebrew/Cellar/timescaledb/2.7.2/share/timescaledb/* /Applications/Postgres.app/Contents/Versions/14/share/postgresql/extension/将版本14和版本2.7.2分别替换为后置版本和时间刻度版本。
step3.3
初始化扩展
tawanda=# CREATE database tsdb;
tawanda=# \c tsdb;
tsdb=# CREATE EXTENSION IF NOT EXISTS timescaledb;
WARNING:
WELCOME TO
_____ _ _ ____________
|_ _(_) | | | _ \ ___ \
| | _ _ __ ___ ___ ___ ___ __ _| | ___| | | | |_/ /
| | | | _ ` _ \ / _ \/ __|/ __/ _` | |/ _ \ | | | ___ \
| | | | | | | | | __/\__ \ (_| (_| | | __/ |/ /| |_/ /
|_| |_|_| |_| |_|\___||___/\___\__,_|_|\___|___/ \____/
Running version 2.7.2
For more information on TimescaleDB, please visit the following links:
1. Getting started: https://docs.timescale.com/timescaledb/latest/getting-started
2. API reference documentation: https://docs.timescale.com/api/latest
3. How TimescaleDB is designed: https://docs.timescale.com/timescaledb/latest/overview/core-concepts
Note: TimescaleDB collects anonymous reports to better understand and assist our users.
For more information and how to disable, please see our docs https://docs.timescale.com/timescaledb/latest/how-to-guides/configuration/telemetry.
CREATE EXTENSION发布于 2022-10-22 18:47:53
我使用的一个简单的解决方案是在docker中运行timescaledb,特别是使用docker组合。这允许您将所有数据保存在一个停靠卷中,这样您就可以将数据库从计算机移动到计算机,并从docker-compose.yml文件中设置端口、密码等。
下面是我用来运行本地timescaledb实例的docker-compose.yml文件:
version: "3"
# special port for timescaledb: 5445
services:
timescaledb:
image: timescale/timescaledb:latest-pg14
ports:
- "5445:5432"
environment:
- POSTGRES_PASSWORD=XXXXXXXXXXXXXX
restart: always
volumes:
- type: bind
source: ./timescaledb-data
target: /var/lib/postgresql/data
logging:
driver: "json-file"
options:
max-size: "1000k"
max-file: "5"
compress: "true"注意到:我将timescaledb端口映射到5445,因为我的系统上也运行了postgres。这使我可以让postgres运行到其他需要它的应用程序,同时仍然访问timescaledb。
https://stackoverflow.com/questions/73248119
复制相似问题