Comment 1 for bug 853612

Revision history for this message
Ian Beardslee (ibeardslee) wrote :

And now for some further complications .. the above fix is than ideal. Because 'template1' are used as a template for new databases, it has been recommended to us that connecting to the 'postgres' database would be preferred to connecting to the 'template1' (or 'template0') databases. Once again this is likely to only be an issue in a shared/managed environment.

A change to '/usr/share/pyshared/openerp-server/service/web_services.py' fixes that (patch to come).

 sed -i s/db_connect\(\'template1\'\)/db_connect\(\'postgres\'\)/ /usr/share/pyshared/openerp-server/service/web_services.py

But now to make that more complicated, creating a new database requires access to the template0 .. and of course the new database would need to be enabled in the pg_hba.conf once it is created. But remember that this is bug is probably isolated to a shared environment where creating databases is a controlled process where the DBA would be working with the OpenERP user to create required databases.