TL;DR
Install Postgres 9.5, and then:
sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main
public class ExodusWriter { | |
private JdbcTemplate jdbcTemplate; | |
private TransactionTemplate transactionTemplate; | |
public ExodusWriter(DataSource dataSource) { | |
DataSourceTransactionManager transactionManager = new DataSourceTransactionManager(dataSource); | |
jdbcTemplate = new JdbcTemplate(transactionManager.getDataSource()); | |
transactionTemplate = new TransactionTemplate(transactionManager); | |
} |
1) see re: increasing shmmax http://stackoverflow.com/a/10629164/1283020 | |
2) add to postgresql.conf: | |
shared_preload_libraries = 'pg_stat_statements' # (change requires restart) | |
136 pg_stat_statements.max = 1000 | |
137 pg_stat_statements.track = all | |
3) restart postgres | |
4) check it out in psql |
public interface StoreRepository extends PagingAndSortingRepository<Store, String>, | |
QueryDslPredicateExecutor<Store>, QuerydslBinderCustomizer<QStore> { | |
@RestResource(rel = "by-location") | |
Page<Store> findByAddressLocationNear(Point location, Distance distance, Pageable pageable); | |
default void customize(QuerydslBindings bindings, QStore store) { | |
bindings.bind(store.address.city).single((path, value) -> path.startsWith(value)); | |
bindings.bind(String.class).single((StringPath path, String value) -> path.contains(value)); | |
} |
TL;DR
Install Postgres 9.5, and then:
sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main
Connection connection = null; | |
CallableStatement call = null; | |
try { | |
connection = dataSource.getConnection(); | |
call = connection.prepareCall("{? = call get_entity2 (?)}"); | |
call.registerOutParameter(1, Types.VARCHAR); | |
call.setString(2, tableName); | |
call.executeUpdate(); | |
return call.getString(1); | |
} catch (SQLException e) { |
input { | |
file { | |
path => /tmp/application.log | |
codec => multiline { | |
pattern => "^(%{TIMESTAMP_ISO8601})" | |
negate => true | |
what => "previous" | |
} | |
} | |
} |