跳至內容
選單
此問題已被標幟

Hi All , i am using odoo 14 CE, here i am facing an issue when i try to restore my database into my development pc from server , i am getting error like postgresql error i am attaching the image below, how do i fix this


頭像
捨棄
最佳答案

Hi, this common problem is caused by your Odoo instance that has no permission to connect to your postgresql so it cannot write data into it.

If you have access to your server backend (linux) you can try to go to login to root and then go to the /etc/odoo/odoo.conf and see the username that used for connection by looking for the db_user as picture below

at example above, the db_user use "odoo" username to connect to postgresql. Now, you can try to access postgresql by exiting this code editor by pressing ctrl + x + y, then switch your user to postgres user by typing in 

su - postgres

later on you can type in psql to access the postgres. Now, type this line by line to grant access to that odoo user

ALTER USER odoo WITH SUPERUSER;
ALTER USER odoo WITH CREATEROLE;
ALTER USER odoo WITH CREATEDB;
ALTER ROLE odoo VALID UNTIL 'infinity';

After that restart your server and see if its able to restore

Best regards,

Altela (altelasoftware.com)

頭像
捨棄
作者

Thank you, This helped .
Actually error i was facing is because i didnt set limit_time_cpu and limit_time_real in odoo.conf file once i set it to 600 and 1200 it solved.

Glad it help! if you have large database (more than 10gb) you can increase limit_time_real as much as 100,000 second to let the cron run until restoring process are done :)

相關帖文 回覆 瀏覽次數 活動
1
12月 21
3778
2
8月 24
21236
3
4月 24
3344
1
5月 25
4459
5
11月 22
3744