OpenGauss is an open source relational database management system with enterprise-class features such as multi-core high performance, full-link security, and intelligent operations and maintenance. iPortal supports using the OpenGauss database for storing portal data, and supports versions 3.0.3 and above.

Install and configure the OpenGauss database

Please refer to the official help documentation to install the Gauss database. After the installation is complete, perform database configuration. First create tablespaces, then create users and associate them with tablespaces, and then start OpenGauss installation and configuration after authorizing the created users.

Portal data storage configuration

The database configuration of the iPortal portal data store is recommended to be configured before iPortal starts (before creating the initialized administrator account), and the configuration information is in the iportal.xml configuration file under the installation directory (%SuperMap iPortal_HOME%\webapps\iportal\WEB-INF). For more information, see: iPortal Configuration File Description. When using OpenGauss database, you only need to comment out or delete the default SQLite database connection pooling configuration information, and remove the comment symbols of the following OpenGauss database connection pooling configuration information, as shown in the following example configuration:

<dbType>GaussDB</dbType>

<driverClass>com.huawei.opengauss.jdbc.Driver</driverClass>

<jdbcUrl>jdbc:opengauss://localhost:15432/iportal</jdbcUrl>

<maxPoolSize>30</maxPoolSize>

<initialPoolSize>5</initialPoolSize>

<minPoolSize>5</minPoolSize>

<maxIdleTime>3000</maxIdleTime>

<maxWait>300000</maxWait>

<username>gaussdb</username>

<password>secret@123</password>

  • <dbType>: database type, characters need to be capitalized.
  • <driverClass>: full name of the class of the database driver.
  • <jdbcUrl>: url to connect to the driver, if your SuperMap iPortal and OpenGauss are on the same machine, the IP will be localhost, if not, the IP should be the IP address of the machine where OpenGauss is located. the example port of OpenGauss is 15432, you can configure it according to the actual situation of OpenGauss. iportal and OpenGauss are on the same machine. The default port of PostgreSQL is 5432, you can configure it according to the actual situation of your OpenGauss installation. iportal is the name of the database, it just needs to be the same as the name of the database you created.
  • <maxPoolSize>: the maximum number of active connections that the connection pool can provide at any one time.
  • <initialPoolSize>: Initialize the connection pool size.
  • <minPoolSize>: the minimum number of active connections provided by the pool at any one time.
  • <maxIdleTime>: Maximum idle time, if the connection is not used within maxIdleTime seconds, the connection will be dropped. If it is 0, then the connection will never be dropped, default value: 0.
  • <maxWait>: Maximum number of milliseconds the database waits when an exception occurs (when there are no available connections).
  • <username>: user name. You can configure it according to your actual OpenGauss installation.
  • <password>: Password. You can configure it according to the password you set when you actually install OpenGauss.

Note:

  • If you connect to Gauss, the error is as follows: terminating connection due to adminstrator command, the reason is that Gauss has session timeout by default, if you want the session to be maintained, you need to modify the configuration item:

First query

SELECT * FROM pg_settings;

If session_timeout is not 0, it reports an error as above after a period of time, modify the configuration item:

ALTER DATABASE postgres SET session_timeout TO 0;

If you don't have permission to execute it in navicat, you can modify it by connecting directly to Gauss in the virtual machine.

su omm

source ${BIGDATA_HOME}/mppdb/.mppdbgs_profile

 gsql -d postgres -p 25308

  • Error when inserting data: concurrent upadte under Stream mode is not yet supported

Check the official documentation, first check the configuration:

If the configuration item is off, change it to on

ALTER DATABASE postgres SET enable_stream_concurrent_update TO on;