Closed CanYellow closed 9 months ago
https://github.com/amutu/zhparser/issues/41 filed a similar problem. But it seemed the patch was merged to master branch. I am still courious about the problem , and wish help from you. Thank you.
I tested some example in my local server. I thought I got the root cause, but the solution is beyond my ability.
As I tested on my local server. I create my database in a user defined tablespace, not in default space, maybe it's why zhparser could not find file.
here is some info for you to analysis.
the error info:
wikidb=# CREATE EXTENSION zhparser;
ERROR: could not open file "/var/lib/postgresql/14/main/base/16387/zhprs_dict_wikidb.txt" for writing: No such file or directory
the defalut postgresql data directory tree:
postgres@brighthserver:~$ ls /var/lib/postgresql/14/main/base/
1 13760 13761
the directory tree in my ext disk(where tablespace defined)
postgres@brighthserver:~$ ls /mnt/filedisk/postgresql/PG_14_202107181/
16387
Could anybody get some solution for that, I am very appreciate for you help.
我自己修改了两个文件里的内容,加入了我的数据库的实际路径,让zhparser在我的情况下安装完成了,但是好像不具有普适性。希望大佬们看看是不是需要更新下版本,解决类似的问题。谢谢啦、
我修改了 zhparser--2.1.sql 与 zhparser--2.0--2.1.sql,将里面
的data_dir || '/base/'
改成了我的实际数据库路径'/mnt/filedisk/postgresql/PG_14_202107181/'
fixed at f9381aba2c16f0bedb3e17f840c2e774108b7430
Problem
When in my wikidb database. I already
ALTER USER wikijs WITH SUPERUSER;
and double enter the psql console. But I runCREATE EXTENSION zhparser;
, it throw error as:What I tried
https://github.com/amutu/zhparser/issues/33 said it is a user permission problem. but my folder in in the postgres folder. i checked the permission with
ls -a -l
, permission result is OK in my opinion.My question
I thought there was no permission problem in my database folder, But why psql still said 'could not open file'? May anyone professional know what's wrong with my process, or give my some suggestion?
thank you very much!