群晖无法安装moments

通过查看系统日志/var/log/messages,得知错误与pgsql数据库有关,需要重建。

1
2
3
4
5
6
7
8
网络方法(失效):
curl -s https://ftp.synology.com/support_web/Tools/script/pgsql_analyzer.sh | sh -s -- -r

最终方法:
wget https://www.moewah.com/source/pgsql_analyzer.sh --no-check-certificate
chmod a+x pgsql_analyzer.sh
./pgsql_analyzer.sh -r
reboot

重新安装后发现moments无法开启共享照片库,查看日志:

1
2
3
4
5
6
7
8
9
10
11
PL/pgSQL function create_user_schema_func() line 40 at EXECUTE statement
SQL statement "INSERT INTO user_info (name, config, enable) VALUES ('/volume3/photo', '{"version": 57}', true) RETURNING id"
PL/pgSQL function create_delete_team_user_trigger_func() line 9 at EXECUTE statement
2022-05-08T01:52:36+08:00 DS918 synoscgi_SYNO.Photo.Setting.Admin_1_set[23154]: ExceptionTag::kDB exception [/source/synophoto/src/lib/db/model/create_ability.hpp:49 insert error: Cannot execute query. ERROR: circular inheritance not allowed
DETAIL: "unit" is already a child of "unit".
CONTEXT: SQL statement "ALTER TABLE unit INHERIT public.unit"
PL/pgSQL function create_user_schema_func() line 40 at EXECUTE statement
SQL statement "INSERT INTO user_info (name, config, enable) VALUES ('/volume3/photo', '{"version": 57}', true) RETURNING id"
PL/pgSQL function create_delete_team_user_trigger_func() line 9 at EXECUTE statement
]

应该是数据库还有问题。直接把moments和drive全部卸载重装(勾选删除数据库)后恢复。