title: How do I configure HikariCP for postgresql?
body: <p>I'm trying to use HikariCP in postgresql and I can't find anywhere the configuration for postgresql. </p>
  
  <p>Please point me to any example for postgresql with HikariCP or any configurations tutorial for the same. </p>
  
  <p>I tried to use it like below but it didn't work and then I realized it was meant for MySQL </p>
  
  <pre><code>public static DataSource getDataSource()
  
      {
  
              if(datasource == null)
  
              {
  
                      HikariConfig config = new HikariConfig();
  
  
              config.setJdbcUrl("jdbc:mysql://localhost/test");
  
              config.setUsername("root");
  
              config.setPassword("password");
  
  
  
              config.setMaximumPoolSize(10);
  
              config.setAutoCommit(false);
  
              config.addDataSourceProperty("cachePrepStmts", "true");
  
              config.addDataSourceProperty("prepStmtCacheSize", "250");
              config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
  
  
  
              datasource = new HikariDataSource(config);
  
              }
  
             return datasource;
  
      }
  </code></pre>