Stop the Artifactory service.
Edit the
system.yaml
file to update the following values.Note
Because Artifactory uses multiple drivers and you need to configure the connection strings for these separately.
The
url
field under theshared
database section in the following format.jdbc:postgresql://<PostgreSQL Database 1 URL>,..., <PostgreSQL Database N URL>/artifactory?targetServerType=primary
The
url
field under themetadata
database section in the following format.jdbc:postgresql://<PostgreSQL Database 1 URL>,..., <PostgreSQL Database N URL>/artifactory?target_session_attrs=read-write"
The following sample shows an example
system.yaml
file configuration.systemYaml: shared: logging: ... database: type: postgresql url: "jdbc:postgresql://17.21.0.2:5432,17.21.0.3:5432/artifactory?targetServerType=primary" driver: org.postgresql.Driver username: "artifactory" password: "password" artifactory: Database: ... frontend: ... access: ... metadata: database: type: postgresql url: "jdbc:postgresql://17.21.0.2:5432,17.21.0.3:5432/artifactory?target_session_attrs=read-write" driver: org.postgresql.Driver username: "artifactory" password: "password" ...
Start the Artifactory service.