-* On the db server, create an ssh key for postgres:
-{{{
- sudo -H -u postgres ssh-keygen -C "postgres@`hostname` (`date +%Y%m%d`)"
-}}}
-* clone dsa-misc:
-{{{
- cd /usr/local && git clone https://db.debian.org/git/dsa-misc.git &&
- cd bin && ln -s ../dsa-misc/scripts/pg-backup/pg* .
-}}}
-* Add these to /etc/postgresql/9.1/main/postgresql.conf
+== server config ==
+
+(2018-02 - This documentation has not really been tested since it was written -- weasel)
+
+There are two possible ways to configure the server.
+
+=== Single cluster on a host ===
+
+If there is only one cluster on the host, we can use puppet's
+{{{postgresql::server}}} to configure the cluster and any databases on it, see
+{{{modules/salsa/manifests/database.pp}}} for an example. In particular, you
+want to set {{{archive_command}}} and the ssl options in {{{pg.conf}}}, as well
+as set {{{listen_address}}} correctly.
+
+Add a {{{postgres::backup_cluster}}} stanza to get it backed up.
+
+=== Multiple clusters/compatibility mode ===
+
+Since we often have more than one cluster, we cannot use the puppet
+{{{postgresql::server}}} class for most things.
+
+* Add the server to the roles::postgresql::server class role in hiera.
+ This will cause some scripts to be installed on the host, as well as an ssh
+ key to be created for the postgres user.
+
+* Add these to {{{/etc/postgresql/9.6/main/postgresql.conf}}} or equivalent