PostgreSQL Database Creation - OpenShift(4.2)
The creation of the database must be made by the postgres UNIX user, or another UNIX user with the same privileges, on the machine where PostgreSQL is installed or on a machine with a network connection to PostgreSQL. The postgres UNIX user is assumed in this installation.
- Configure the PostgreSQL database to allow a remote client connection to the database. The working directory is $PGDATA
Edit the
When the files have been configured, the PostgreSQL database needs to be restartedpg_hba.conf
file to match the settings in install.xml. See Appendix A - PostgreSQL HBA Settings - OpenShift(4.2) for an example..
Create the PostgreSQL database instance. The working directory is postgres.
$ source ./postgre_create_instance.sh <PostgreSQL Admin username, default is postgres>
If no error occurred, the database creation will now be completed and the rest of this section can be ignored.
Hint!
When the instance creation script has been executed, there is a log file in the
/tmp
directory that can be used for troubleshooting. Themz_db.log fil
e
contains PostgreSQL responses from the database creationÂÂ Â
- If the script fails:Â
Cleanup the system before the next try: - Start PSQL:
$ psql
- Remove the Database and Users:
postgres=# DROP DATABASE mz;
postgres=# DROP USER mzowner;
postgres=# DROP USER mzadmin;postgres=# \q