Skip to Content
Menu
This question has been flagged

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


Avatar
Discard
Best Answer

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)

Avatar
Discard
Author

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 :)

Related Posts Replies Views Activity
1
Dec 21
2822
2
Aug 24
18989
3
Apr 24
1497
2
May 23
2772
5
Nov 22
2037