我注意到需要先停止数据容器:
这是我停止两个容器后运行 tail -f shared/data/log/var-log/postgres/current 得到的输出:
2021-06-06 16:38:37.411 UTC [113] HINT: The server must be started by the user that owns the data directory.
2021-06-06 16:38:38.424 GMT [114] LOG: skipping missing configuration file "/shared/postgres_data/postgresql.auto.conf"
2021-06-06 16:38:38.424 UTC [114] FATAL: data directory "/shared/postgres_data" has wrong ownership
2021-06-06 16:38:38.424 UTC [114] HINT: The server must be started by the user that owns the data directory.
2021-06-06 16:38:39.439 GMT [115] LOG: skipping missing configuration file "/shared/postgres_data/postgresql.auto.conf"
2021-06-06 16:38:39.439 UTC [115] FATAL: data directory "/shared/postgres_data" has wrong ownership
2021-06-06 16:38:39.439 UTC [115] HINT: The server must be started by the user that owns the data directory.
2021-06-06 16:38:40.461 GMT [116] LOG: skipping missing configuration file "/shared/postgres_data/postgresql.auto.conf"
2021-06-06 16:38:40.461 UTC [116] FATAL: data directory "/shared/postgres_data" has wrong ownership
2021-06-06 16:38:40.461 UTC [116] HINT: The server must be started by the user that owns the data directory.
这很可能就是问题的根源,我该如何修复?