-- Configuration nécessaire au démarrage
ALTER SYSTEM SET shared_preload_libraries = 'pg_stat_statements';
ALTER SYSTEM SET compute_query_id = on;

CREATE EXTENSION IF NOT EXISTS pg_stat_statements;

-- Paramètres de l'extension
ALTER SYSTEM SET pg_stat_statements.max = 10000;
ALTER SYSTEM SET pg_stat_statements.track = 'all';
ALTER SYSTEM SET pg_stat_statements.save = 'on';

-- Rechargement de la configuration
SELECT pg_reload_conf();