DCM4CHEE will work with PostgreSQL 8.x. You may download the database software from http://www.postgresql.org/
To use PostgreSQL 9.x - it is necessary to upgrade your Postgres driver in <DCM4CHEE_HOME>/server/default/lib to the 9.0 version:
|
Setup PostgreSQL following instructions for your operating system.
Set permissions on Postgres database. The following setting will trust only connections from the localhost, which is reasonable for a development machine, but may need to be changed for production.
$PGDATA/pg_hba.conf: # IPv4 local connections: host all all 127.0.0.1/32 trust |
Initiate the archive database instance: pacsdb using create DDL script dcm4chee-psql-2.13.6/sql/create.psql
> export PGUSER=postgres > createdb pacsdb > psql pacsdb -f dcm4chee-psql-2.13.6/sql/create.psql |
postgres
, and install as a Windows Service.postgres
, with a password of your choice.pacsdb
(right click on Databases, and select New Database). Ensure the owner is the postgres user. Be sure to specify UTF8 encoding for the database./sql/create.psql
within the dcm4chee installation directory. Highlight all of the SQL statements, and click on the Execute Query button ( ). This should execute without any errors.server/default/deploy/pacs-postgres-ds.xml
, and server/default/deploy/arr-psql-ds.xml
. These files control the dcm4chee connections to the database. pacs-postgres-ds.xml
is for the main archive application, and arr-psql-ds.xml
is for the Audit Record Repository (ARR). Note that if you opted to install the ARR on a separate machine or as a separate process, this file will not be in your dcm4chee installation directory. Ensure the connection information, including the user name and password, are correct.Sometimes it is desirable to set up a specific user in postgres to handle the database interaction. This may be a situation where the database is shared by multiple applications, or you do not want to use the DB super user account within dcm4chee. In this case, you will need to create a new user in postgres. When creating the database ensure that the desired user is selected as the database owner (see step 7 above), and make the necessary changes in the datasource config files (see step 10 above).
Postgres will by default store all of the dcm4chee data in a subdirectory the postgres installation directory. This is the default tablespace. As you can imagine there are many scenarios where this is not desirable; you may have a specific mount point or file system that you want to store the database on. The two main use cases for this are:
In this case, before you create the database (in step 7 above), create a tablespace.
Ensure that the postgres Service User has full control of the created directory, with regards to Windows (or other operating system) Security/Permissions for the folder. |
dcm4chee
.See How to configure secure DB password
Your mileage may vary on this, as every installation is different. I have had success with these parameters in some installations. Again, keep in mind that tuning is very specific to the usage of the archive.
The following table lists some modifications that may be made to the default Postgres settings.
VERSION: 8.3.1
Property |
Default |
dcm4chee |
---|---|---|
autovacuum |
on |
on |
max_connections |
100 |
100 |
shared_buffers |
32MB |
512MB |
temp_buffers |
8MB |
32MB |
work_mem |
1MB |
4MB |
maintenance_work_mem |
16MB |
64MB |
wal_buffers |
64kB |
256kB |
checkpoint_segments |
3 |
10 |
effective_cache_size |
128MB |
512MB |
port |
5432 |
5432 |
Related Content: