gleu / pgstats

Collects PostgreSQL statistics, and either saves them in CSV files or print them on the stdout

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Non default values

yhuelf opened this issue · comments

#define SETTINGS_NOTCONFIGFILE_NOTDEFAULTVALUE_SQL "SELECT source, name, setting, unit FROM pg_settings WHERE source NOT IN ('configuration file', 'default') ORDER BY source, name"

Do we want that instead?

SELECT source, name, setting, unit FROM pg_settings WHERE source NOT IN ('configuration file', 'default') OR (boot_val != reset_val) ORDER BY source, name;

I think both are right. Do you have an example where adding the OR clause changes the results?

For example, if you set shared_buffers to a non default value in the postgresql.conf file.

I just checked and I think you're right. Do you care to do a PR? otherwise, I'll fix it tomorrow. I have to go back to my hotel now. Need some sleep :-)

Done. Good night :)

Thank you, the PR is merged.