Commit Graph

5 Commits

Author SHA1 Message Date
Matt Bostock 98ba566322 Use the pg_settings view to retrieve runtime variable
Adds all bool/integer/real runtime variables that can be retrieved ths way.

Use the `pg_settings` view to retrieve runtime variables:
https://www.postgresql.org/docs/current/static/view-pg-settings.html

Replaces the use of `SHOW` to retrieve runtime variables.

Only runtime variables with a `vartype` of `bool`, `real`, or `integer`
are currently supported. Uses the `short_desc` field as a description.

This commit deprecates the following metric names:
```
pg_runtime_variable_max_connections
pg_runtime_variable_max_files_per_process
pg_runtime_variable_max_function_args
pg_runtime_variable_max_identifier_length
pg_runtime_variable_max_index_keys
pg_runtime_variable_max_locks_per_transaction
pg_runtime_variable_max_pred_locks_per_transaction
pg_runtime_variable_max_prepared_transactions
pg_runtime_variable_max_standby_archive_delay_milliseconds
pg_runtime_variable_max_standby_streaming_delay_milliseconds
pg_runtime_variable_max_wal_senders
```

They are replaced by equivalent names under `pg_settings` with the exception of
```
pg_runtime_variable_max_standby_archive_delay_milliseconds
pg_runtime_variable_max_standby_streaming_delay_milliseconds
```
which are replaced with
```
pg_settings_max_standby_archive_delay_seconds
pg_settings_max_standby_streaming_delay_seconds
```

Adds approximately 195 new metrics, when considered across all supported
PostgreSQL versions.
2017-04-14 02:09:44 +10:00
Will Rouesnel 5211415ebe Gofmt the code. 2017-02-25 01:18:27 +11:00
Will Rouesnel 98d26cb9c7 Update the integration test. 2016-11-18 03:52:58 +11:00
Will Rouesnel be1a76b167 Tests passing for PostgreSQL 9.1. Set semantic version in filename. 2016-11-18 02:26:33 +11:00
Will Rouesnel 045ae96430 Implement the compileable source code of the basic integration test suite.
This is the first step in moving the integration test suite to a more
reliable Golang based one.
2016-11-17 03:09:20 +11:00