Skip to content

Commit 59d339e

Browse files
committed
pg_stat_monitor logging backend
1 parent c447a3c commit 59d339e

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

ansible/files/postgresql_config/postgresql.conf.j2

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -776,9 +776,11 @@ include = '/etc/postgresql-custom/read-replica.conf'
776776
# Add settings for extensions here
777777
auto_explain.log_min_duration = 10s
778778
cron.database_name = 'postgres'
779-
pg_stat_monitor.pgsm_max = 256
780-
pg_stat_monitor.pgsm_query_shared_buffer = 20
779+
# pg_stat_monitor configuration with JSON logging and minimal memory usage
780+
pg_stat_monitor.pgsm_enable_json_log = true
781+
pg_stat_monitor.pgsm_max_buckets = 2
781782
pg_stat_monitor.pgsm_bucket_time = 3600
782-
pg_stat_monitor.pgsm_max_buckets = 12
783+
pg_stat_monitor.pgsm_max = 3
784+
pg_stat_monitor.pgsm_query_shared_buffer = 2
783785
pg_stat_monitor.pgsm_enable_overflow = false
784-
pg_stat_monitor.pgsm_query_max_len = 1024
786+
pg_stat_monitor.pgsm_query_max_len = 1200

nix/ext/pg_stat_monitor.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ stdenv.mkDerivation rec {
1212
buildInputs = [ postgresql ];
1313

1414
src = fetchFromGitHub {
15-
owner = "percona";
15+
owner = "olirice";
1616
repo = pname;
17-
rev = "refs/tags/${version}";
18-
hash = "sha256-STJVvvrLVLe1JevNu6u6EftzAWv+X+J8lu66su7Or2s=";
17+
rev = "or/logs2";
18+
hash = "sha256-9vCtDseZ783pVXo/Grvi4rygVxnDZXavw9+zuHXr+0A=";
1919
};
2020

2121
makeFlags = [ "USE_PGXS=1" ];

0 commit comments

Comments
 (0)