PostgreSQL Installation and Configuration
Also referred to as Postgres, PostgreSQL is an object-relational database management system with emphasis on extensibility and standards compliance.
PostgreSQL can handle workloads ranging from small single-machine applications to large Internet-facing applications, or for data warehousing, with many concurrent users. PostgreSQL is ACID-compliant and transactional. PostgreSQL has updatable views and materialized views, triggers, foreign keys, supports functions and stored procedures, and offers other expandability.
PostgreSQL is developed by the PostgreSQL Global Development Group, a diverse group of many companies and individual contributors. It is free and open-source, released under the terms of the PostgreSQL License, a permissive software license. For more information, visit https://www.postgresql.org/.
Prerequisites
System Requirements
Platform | 64 Bit | 32 Bit |
---|---|---|
Windows Version | 2022, 2019 |
PostgreSQL Installer
Use the following installer to set up PostgreSQL: postgresql-16.2.1-1-windows-x64.exe or later version. The PostgreSQL executable is installed as part of the HyperMesh software installation. You will see another installer along with Altair HyperWorks products for installing PostGresDB.
Install PostgreSQL
In this section you will learn how to install PostgreSQL.
It is recommended to perform the installation using the values and options as detailed below. Also, when prompted for a Windows admin password, create a new password.
- Open a command prompt in admin mode.
-
Launch the installer (postgresql-16.2.1-1-windows-x64.exe)
from the command prompt.
Note: You should launch the installer from the command prompt only. This will auto-resolve the path to Windows native utilities needed for PostgreSQL to install and work correctly.
-
Launch the pgAdmin 4 tool (included with the installation) in admin mode, and
add one user with full rights:
-
Create a customized pg_hba.conf file:
- Using Windows Explorer, locate the pg_hba.conf file that you created in the previous step and move it to the <PostGres_INSTALLATION_DIR>/data folder to replace the file already there.
- Open the Windows Task Manager, Services tab, and locate the postgresql-x64 service.
-
Restart the postgresql-x64 service by right-clicking on the service name and
selecting Restart from the context menu.
Note: This allows all users to connect without authentication.
- Reconnect to the server by clicking on the username, hweuser, and selecting Yes when prompted to reconnect.
- Optional:
If you need to locate the port number for the server connection, click on the
name of the server and then click the Properties
tab.
The Port number is listed under Connection, as displayed in the image above. Knowing the Port number allows you to share the connection with other users.
Connect to Shared Library
In this task you will learn how to connect to the PostgreSQL Shared Library.
-
To create a shared library:
-
To add an existing library: