RPI3 上出现 USE_FLOAT8_BYVAL 的 Dockerized PostgreSQL 错误

问题描述 投票:0回答:1

我尝试使用官方映像重新安装 PostgreSQL:postgres:11.4-alpine。 之前,该映像可以工作,但我必须在 Raspberry PI 3 上重新安装主机操作系统(Alpine 3.16),而现在,我的数据库无法工作。

我以无盘模式安装了Alpine 3.16(RPI版本)(之前没有)。

PG 容器显示此错误:

PostgreSQL Database directory appears to contain a database; Skipping initialization

2022-06-12 09:00:46.256 UTC [1] FATAL:  database files are incompatible with server
2022-06-12 09:00:46.256 UTC [1] DETAIL:  The database cluster was initialized with USE_FLOAT8_BYVAL but the server was compiled without USE_FLOAT8_BYVAL.
2022-06-12 09:00:46.256 UTC [1] HINT:  It looks like you need to recompile or initdb.
2022-06-12 09:00:46.257 UTC [1] LOG:  database system is shut down

附加信息:

uname -a
Linux srv-rp3 5.15.41-0-rpi2 #1-Alpine SMP Sat May 21 06:57:56 UTC 2022 armv7l Linux

我尝试从 RPI 重建图像,但它没有改变任何东西(https://github.com/docker-library/postgres/blob/899a216e56e49ca7ab1aaae937f1220caace7ce4/11/alpine/Dockerfile

我尝试将

--disable-float8-byval \
--enable-float8-byval \
添加到
./configure
命令(第 88 行),但它没有改变任何内容...

https://github.com/docker-library/postgres/blob/899a216e56e49ca7ab1aaae937f1220caace7ce4/11/alpine/Dockerfile#L81

非常感谢

postgresql docker alpine-linux armv7
1个回答
0
投票

您需要在 64 位系统上使用

image: arm32v7/postgres:11.4-alpine
,因为您之前在 32 位系统上创建了数据库。

在您的案例中使用完全相同的 postgres 版本 11.4 也很重要。

© www.soinside.com 2019 - 2024. All rights reserved.