Tuning

PostgreSQL comes out of the box with extremely low default settings. For some quick suggestions on sizing, check out
pgtune

PostgreSQL on OpenSolaris

Note: replace _64bit with _32bit if using the 32bit PostgreSQL version

Installing PostgreSQL

pkg install SUNWpostgr-84-server SUNWpostgr-84-client

Changing the data directory location for PostgreSQL

svccfg -s postgresql_84:default_64bit setprop postgresql_84/data=/data/postgres/data
svcadm refresh postgresql_84:default_64bit
svcadm enable postgresql_84:default_64bit


Note: If you had previous enabled PostgreSQL and need to change the data location, you will need to
tell the service it is not initialized:
svccfg -s postgresql_84:default_64bit setprop postgresql_84/initialized = false
svcadm refresh postgresql_84:default_64bit
svcadm enable postgresql_84:default_64bit


Changing the log file name

If you are using the Solaris SMF service to control your PostgreSQL instances, bear in mind that the log file name is
controlled by the SMF service and pased to the pg_ctl command line. This will override any value you set in postgresql.conf, which can get very confusing since all your other logging parameters will take effect. If you want to change the log file name you will need to either change the SMF property using something like:
svccfg -s postgresql_84:default_64bit setprop postgresql_84/log = 'postgresql-%Y-%m-%d_%H%M%S.log'
svcadm refresh postgresql_84:default_64bit
svcadm restart postgresql_84:default_64bit


or you can edit /lib/svc/method/postgres_84
and change:
$PGBIN/pg_ctl -D $PGDATA -l $PGDATA/$PGLOG start
to
$PGBIN/pg_ctl -D $PGDATA start


There are 4 comments on this page. [Display comments]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki Install WikkaWiki web hosting