3

I have a Spring Boot application with a REST service. I'm using PorstgreSQL as my database with TimescaleDB. I'm trying to set plan_cache_mode to force_custom_plan because I don't want it to switch to generic plan. I'm using Hikari to manage the datasource. How do I set it in the HikariDataSource?

TheStranger
  • 1,387
  • 1
  • 13
  • 35

1 Answers1

3

You can set the parameter on the database or user level:

CREATE ROLE|DATABASE somename SET plan_cache_mode = force_custom_plan;

Then all new connections as that user or to that database get that setting.

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263