PostgreSQL® in a Distributed System
If PostgreSQL® is used in a distributed system, the same database username must be used on each of these systems. When multiple distributed WinCC OA projects share a single database instance (DB schema), the projects must use the same database connection and the same database username.
-
Specify the address of the host that needs to access the database in the
pg_hba.conf file
. - For Windows: C:/Program Files/PostgreSQL/13/data/pg_hba.conf
- For Linux: /var/lib/pgsql/data/pg_hba.conf. Fore more information, see the C:/Program Files/PostgreSQL/13/data/pg_hba.conf file.
-
Set the entry
listen_addresses = '*'
in the postgresql.conf file to enable connections from remote hosts to the PostgreSQL® database. - For Windows: C:/Program Files/PostgreSQL/13/data/postgresql.conf
-
For Linux: /var/lib/pgsql/data/postgresql.conf
CAUTION: After changing the
pg_hba.conf file
, use the commandpg_ctl reload
in the command line to apply the changed configuration! After changing the entrylisten_addresses
in thepostgresql.conf
, restart the database.