我在 Circleci 上使用 docker-compose 来启动一个 postgres 容器,其中安装了一堆 sql 文件/docker-entrypoint-initdb.d/。我正在使用 ubuntu 机器映像:ubuntu-2004:202010-01,但收到错误:
popen failure: Cannot allocate memory
initdb: error: program "postgres" is needed by initdb but was not found in the same directory as "/usr/lib/postgresql/15/bin/initdb"
Run Code Online (Sandbox Code Playgroud)
它一直在醒来,但在某个时候它停止了这样做。对我可以尝试什么有什么建议吗?我已经尝试过一些更大的resource_type(即从中型到大型)和其他一些 ubuntu 机器映像。
当我尝试使用 init[db] 调用 pg_ctl 时,无法识别设置编码的选项:
pg_ctl init -D=D:\testdata -E=UTF8 -U=postgres
pg_ctl: illegal option -- E
Run Code Online (Sandbox Code Playgroud)
这有改变吗?我使用最新的 PostgreSQL 9.6(zip 下载,x64)。当我不使用 -E 开关时,一切正常,但数据库集群使用错误的编码进行初始化。