mirror of
https://github.com/percona/pg_stat_monitor.git
synced 2026-02-04 05:56:21 +00:00
Fix integer overflow (#435)
* Fix MAX_BUCKETS_MEM overflow * Fix MAX_QUERY_BUF overflow * Fix int overflow in IsBucketValid function * Add missing newline * Remove test for max value of pgsm_query_shared_buffer parameter * Tune tests * Cleanup * Use int64 type instead of long long
This commit is contained in:
@@ -19,7 +19,7 @@ my $pgdata = $node->data_dir;
|
||||
# UPDATE postgresql.conf to include/load pg_stat_monitor library
|
||||
open my $conf, '>>', "$pgdata/postgresql.conf";
|
||||
print $conf "shared_preload_libraries = 'pg_stat_monitor'\n";
|
||||
print $conf "pg_stat_monitor.pgsm_max = 1000\n";
|
||||
print $conf "pg_stat_monitor.pgsm_max = 2048\n";
|
||||
close $conf;
|
||||
|
||||
# Start server
|
||||
@@ -62,7 +62,7 @@ PGSM::append_to_file($stdout);
|
||||
ok($cmdret == 0, "Print PGSM EXTENSION Settings");
|
||||
PGSM::append_to_file($stdout);
|
||||
|
||||
$node->append_conf('postgresql.conf', "pg_stat_monitor.pgsm_max = 10\n");
|
||||
$node->append_conf('postgresql.conf', "pg_stat_monitor.pgsm_max = 10\n"); # Min possible value
|
||||
$node->restart();
|
||||
|
||||
($cmdret, $stdout, $stderr) = $node->psql('postgres', 'SELECT pg_stat_monitor_reset();', extra_params => ['-a', '-Pformat=aligned','-Ptuples_only=off']);
|
||||
|
||||
Reference in New Issue
Block a user