Liferay is unable to find a PostgreSQL database after restoring it from a dump or backup

Issue

  • Liferay is unable to find a PostgreSQL database after restoring it from a dump or backup
  • Liferay appears to be creating new data when connected to the restored PostgreSQL database
  • A blank (i.e., default Liferay) site is being displayed after starting up the server.

Environment

  • Liferay 6.x EE, Liferay DXP 7.x
  • All supported PostgreSQL versions

Resolution

  • Ensure that the PostgreSQL schema is set to the correct one. You can check by going into psql, connecting to your database and querying for the search_path:
    SHOW search_path;
  • PostgreSQL uses the public schema by default. If you have created a different schema to house Liferay data. To check the available schemas, you can connect to your database via psql, and execute \dn  or in the alternative, select nspname from pg_catalog.pg_namespace;. Once you identify the correct schema name, you will need to alter the search_path to ensure that the role or database uses the correct schema. More information on how to execute this can be found on PostgreSQL's official documentation on schema usage: PostgreSQL 11 / 10 / 9.6 / 9.5.

 

这篇文章有帮助吗?
0 人中有 0 人觉得有帮助