inkling/puppet-postgresql — pull request #16 by bjoernalbers (2012-10-16 21:37:39+00:00)
Title: Add sample usage for postgresql::server class.

I had some issues trying to connect to the server, managed with
defaults:

```
vagrant@precise32:~$ psql
psql: FATAL: role "vagrant" does not exist
vagrant@precise32:~$ psql -U postgres
psql: FATAL: Peer authentication failed for user "postgres"
vagrant@precise32:~$ psql -U postgres -h 127.0.0.1
psql: FATAL: pg_hba.conf rejects connection for host "127.0.0.1", user
"postgres", database "postgres", SSL on
FATAL: pg_hba.conf rejects connection for host "127.0.0.1", user
"postgres", database "postgres", SSL off
vagrant@precise32:~$ psql -U postgres -h /var/run/postgresql
psql: FATAL: Peer authentication failed for user "postgres"
```

After some trial and error I found out that the reason for this was a
restrictive permission on the unix socket (which isn't bad at all):

```
vagrant@precise32:~$ ls -l /var/run/postgresql/
total 4
-rw------- 1 postgres postgres 5 Oct 16 20:16 9.1-main.pid
```

So I though I send some usage examples to help noops like myself to a
quicker start with your module :-)