Configuring EDB Postgres Advanced Server v15

You can easily update parameters that determine the behavior of EDB Postgres Advanced Server and supporting components by modifying the following configuration files:

  • The postgresql.conf file determines the initial values of EDB Postgres Advanced Server configuration parameters.
  • The pg_hba.conf file specifies your preferences for network authentication and authorization.
  • The pg_ident.conf file maps operating system identities (user names) to EDB Postgres Advanced Server identities (roles) when using ident-based authentication.

For more information about Modifying the postgresql.conf file and Modifying the pg_hba.conf file, see Setting parameters.

You can use your editor of choice to open a configuration file, or on Windows navigate through the EDB Postgres menu to open a file.

Accessing the configuration files through the Windows system menu

Fig. 1: Accessing the configuration files through the Windows system menu

Setting EDB Postgres Advanced Server environment variables

The graphical installer provides a script that simplifies the task of setting environment variables for Windows users. The script sets the environment variables for your current shell session; when your shell session ends, the environment variables are destroyed. You may wish to invoke pgplus_env.bat from your system-wide shell startup script, so that environment variables are automatically defined for each shell session.

The pgplus_env script is created during the EDB Postgres Advanced Server installation process and reflects the choices made during installation. To invoke the script, open a command line and enter:

C:\Program Files\edb\as14\pgplus_env.bat

As the pgplus_env.bat script executes, it sets the following environment variables:

PATH="C:\Program Files\edb\as14\bin";%PATH%
EDBHOME=C:\Program Files\edb\as14
PGDATA=C:\Program Files\edb\as14\data
PGDATABASE=edb
REM @SET PGUSER=enterprisedb
PGPORT=5444
PGLOCALEDIR=C:\Program Files\edb\as14\share\locale

If you have used an installer created by EDB to install PostgreSQL, the pg_env script performs the same function:

C:\Progra~1\PostgreSQL\14\pg_env.bat

As the pg_env.bat script executes on PostgreSQL, it sets the following environment variables:

PATH="C:\Program Files\PostgreSQL\14\bin";%PATH%
PGDATA=C:\Program Files\PostgreSQL\14\data
PGDATABASE=postgres
PGUSER=postgres
PGPORT=5432
PGLOCALEDIR=C:\Program Files\PostgreSQL\14\share\locale

Connecting to EDB Postgres Advanced Server with edb-psql

edb-psql is a command line client application that allows you to execute SQL commands and view the results. To open the edb-psql client, the client must be in your search path. The executable resides in the bin directory, under your EDB Postgres Advanced Server installation.

Use the following command and options to start the edb-psql client:

psql -d edb -U enterprisedb

Connecting to the server

Fig. 2: Connecting to the server

Where:

-d specifies the database to which edb-psql will connect.

-U specifies the identity of the database user that will be used for the session.

If you have performed an installation with the interactive installer, you can access the edb-psql client by selecting EDB-PSQL from the EDB Postgres menu. When the client opens, provide connection information for your session.

edb-psql is a symbolic link to a binary called psql, a modified version of the PostgreSQL community psql, with added support for Advanced Server features. For more information about using the command line client, see the PostgreSQL Core Documentation at:

https://www.postgresql.org/docs/current/static/app-psql.html

Connecting to EDB Postgres Advanced Server with the pgAdmin 4 client

pgAdmin 4 provides an interactive graphical interface that you can use to manage your database and database objects. Easy-to-use dialogs and online help simplify tasks such as object creation, role management, and granting or revoking privileges. The tabbed browser panel provides quick access to information about the object currently selected in the pgAdmin tree control.

The client is distributed with the graphical installer. To open pgAdmin, select pgAdmin4 from the EDB Postgres menu. The client opens in your default browser.

The pgAdmin 4 client Dashboard

Fig. 1: The pgAdmin 4 client Dashboard

To connect to the EDB Postgres Advanced Server database server, expand the Servers node of the Browser tree control, and right click on the EDB Postgres Advanced Server node. When the context menu opens, select Connect Server. The Connect to Server dialog opens.

The Connect to Server dialog

Fig. 2: The Connect to Server dialog

Provide the password associated with the database superuser in the Password field, and click OK to connect.

Connecting to an EDB Postgres Advanced Server database

Fig. 3: Connecting to an EDB Postgres Advanced Server database

When the client connects, you can use the Browser tree control to retrieve information about existing database objects, or to create new objects. For more information about using the pgAdmin client, use the Help drop-down menu to access the online help files.