Migration failure for Postgres Database with a blank space in it
- \ManageEngine\ServiceDesk\Patch\AdventNet_ManageEngine_ServiceDesk_Plus-14.2.0-SP-1.0.0\SERVICEDESK\PreInstall\pg_migrate\pgsql_old\bin\pg_dumpall.exe", -U, postgres, -p, 65433, -h, 127.0.0.1, -r, -w, |, "D:\ManageEngine\ServiceDesk\pgsql\bin\psql.exe", -U, postgres, -p, 65432, -h, 127.0.0.1, -w, servicedesk new]
- Jul 11, 2023 2:16:28 AM [com.zoho.postgres.migrate.DumpMigration] [INFO] : psql: warning: extra command-line argument "new" ignored
- Jul 11, 2023 2:16:28 AM [com.zoho.postgres.migrate.DumpMigration] [WARNING] : Error :::: psql: FATAL: database "servicedesk" does not exist
In the Build version 14300(SDP) and 7000 (AE), PostgreSQL is upgraded to 11.17 from 10.21. During this upgrade, data migration will be taken place. In the process of migrating the data, above command will be executed. since the <database name> has a blank space in between, breaks into two arguments when we execute this in the command prompt.
Workaround : Rename the database to a name without space.
- Shut Down the Application service.
- Navigate to <Application_home_directory>\bin directory and execute "startDB.bat or startDB.sh"
- Navigate to <Application_home_directory>\pgsql\bin directory and connect as "postgres" user with the below command (Refer this KB) without entering the database name.
- psql.exe -U <username> -p <port> -h <server address>
- ./psql -U <username> -p <port> -h <server address>
- Execute the below command to rename the database,
Do not connect the database that you are going to rename
- ALTER DATABASE "<current database name>" RENAME TO "<database_name_without_space>";
- Update the modified name into the application, by executing "changeDBServer.bat or changeDBServer.sh"
- Stop the Database server by executing "stopDB.sh or stopDB.bat"
After these steps, invoke the upgrade.
New to ADSelfService Plus?
Upgrade failure when migrating privileges for removed functions
LOG Trace : 03.08.2023 12:50:35 [com.zoho.postgres.migrate.DumpMigration] [WARNUNG] : Error :::: psql:E:/ManageEngine/ServiceDesk/_pgupgrade/PRE_DATA.sql:15493: ERROR: function pg_catalog.range_gist_compress(internal) does not exist 03.08.2023 ...
How to Connect External Postgres
Install a External Postgres such that the version of that postgres is currently in the series of inbuilt postgres of our Application. Say for example, In Servicedeskplus Application version 14010, which has postgres version 10.21, then you should ...
Query Executor Tool for PostGres
This tool is designed to execute queries in the customer environment by connecting the database by reading the database configuration file. We need to enter the query that we require to execute in queryToExecute.txt file. We can enter multiple ...
su: cannot open session: Module is unknown
The upgrade issue arises in several linux editions such as RHEL and CentOS when the bundled postgres database needs to be upgraded in that particular patch and the upgrade is triggered by the root user. The highlighted line in the traces below (su: ...
Remote read only access to database for Postgres customers
Frequently customers want to connect some reporting / dashboard application like PowerBI or Tableau with our Postgres database server. By default, the bundled Postgres is configured to only listen to the local machine. We can configure to allow ...