How to enable pg_stat_statements on container Postgres?

Hi,

We want to add the following to postgresql.conf file on a container database:

shared_preload_libraries = ‘pg_stat_statements’
pg_stat_statements.track = all

Is there a way to do this?

Hi @prki ,

Good question. I’d recommend 2 options here:

Option 1

You use a Postgres container DB (like the one provided by Bitnami), and you tweak the parameters via the environment variables.

Option 2

You stick to the Postgres container DB provided by Qovery, and you use a lifecycle job to change this parameter once your Postgres DB is running.

Both are valid options. It’s up to you.

Romaric.

We would prefer option 2, but how can we modify this using a lifecycle job? Is it possible to enable this via SQL statement?

I’ve got the feeling that this option is not configurable dynamically. So Option 1 is the only one possible.