title: Connect session in PostgreSQL with SailsJS
body: <p>I have a personal project in SailsJS, Passport-Local and PostgreSQL. I managed to get connection and save users in PostgreSQL DB. But I have big problem with session storing. From what I know SailsJS is using Connect to get it done.</p>
  
  <p>Previous working code for MongoDB:</p>
  
  <pre><code>connections: {
      prodMongodbServer: {
          adapter: 'sails-mongo',
          host: 'localhost',
          port: 27017,
          //user: '',
          //password: '',
          database: 'sails-auth'
      }
  },
  
  session: {
      adapter: 'mongo',
      host: 'localhost',
      port: 27017,
      db: 'sails-auth',
      collection: 'sessions'
  }
  </code></pre>
  
  <p>My (working) connection to PostgreSQL:</p>
  
  <pre><code>connections: {
      somePostgresqlServer: {
        adapter: 'sails-postgresql',
        host: 'localhost',
        port: 5432,
        user: 'postgres',
        password: 'Password1',
        database: 'sails-auth'
      }
  },
  </code></pre>
  
  <p>And the code I have problem with:</p>
  
  <pre><code>session: {
      adapter: 'connect-pg-simple',
      host: 'localhost',
      port: 5432,
      user: 'postgres',
      password: 'Password1',
      db: 'sails-auth'
  }
  </code></pre>
  
  <p>I've installed <a href="https://github.com/voxpelli/node-connect-pg-simple" rel="nofollow">connect-pg-simple</a>, executed SQL code but when I am starting sails app I get an error:</p>
  
  <pre><code>$ sails lift
  
  info: Starting app...
  
  Init Express midleware
  Failed to prune sessions: password authentication failed for user "myPcUser"
  info:
  info:                .-..-.
  info:
  info:    Sails              &lt;|    .-..-.
  info:    v0.11.3             |\
  info:                       /|.\
  info:                      / || \
  info:                    ,'  |'  \
  info:                 .-'.-==|/_--'
  info:                 `--'-------'
  info:    __---___--___---___--___---___--___
  info:  ____---___--___---___--___---___--___-__
  info:
  </code></pre>
  
  <p>I thought that it may be beetter to use <a href="https://github.com/jebas/connect-pg" rel="nofollow">connect-pg</a>, but it requires so many dependecy that I stayed with simple version. Anyone know what this problem is about? Im on windows so its weird that it have problem with my PC User...</p>
  
  <p>Or maybe someone have some solution for using PostgreSQL for users, etc and Mongo for sessions. For what I've tested Passport doesnt allow to do that (user can sign up but can't sign in)</p>