Stop the Artifactory service.
Edit the
system.yamlfile to update the following values.Note
Because Artifactory uses multiple drivers and you need to configure the connection strings for these separately.
The
urlfield under theshareddatabase section in the following format.jdbc:postgresql://<PostgreSQL Database 1 URL>,..., <PostgreSQL Database N URL>/artifactory?targetServerType=primary
The
urlfield under themetadatadatabase 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.yamlfile 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.