-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restructure to generate backend data from pg_catalog.pg_settings
#3
Labels
enhancement
New feature or request
Milestone
Comments
CREATE SCHEMA pgconfig;
DROP VIEW IF EXISTS pgconfig.settings;
CREATE VIEW pgconfig.settings AS
SELECT name, setting, context, source, reset_val, boot_val,
unit, category,
name || ' = ' || setting AS postgresconf_line,
name || ' = ' || boot_val AS default_config_line,
short_desc,
CASE WHEN name LIKE 'lc%'
THEN True
WHEN name IN ('application_name', 'TimeZone')
THEN True
ELSE False
END AS frequent_override,
CASE WHEN boot_val = reset_val THEN True
ELSE False
END AS system_default,
CASE WHEN reset_val = setting THEN False
ELSE True
END AS session_override,
pending_restart
FROM pg_catalog.pg_settings
;
SELECT postgresconf_line, *
FROM pgconfig.settings
WHERE default_config_line IS NOT NULL
AND NOT frequent_override
; |
rustprooflabs
added a commit
that referenced
this issue
Jul 1, 2021
…Manually updated most of Pg13 for minor differences in format. #3
rustprooflabs
added a commit
that referenced
this issue
Jan 6, 2024
…Manually updated most of Pg13 for minor differences in format. #3
Done via #17 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Details
The current method to add a new version directly uses
postgresql.conf
to determine defaults. This was a bit awkward from the beginning and has a number drawbacks with maintainability and accuracy. This change should set the stage for a number of subsequent improvements.Planned approach
Use a query against
pg_catalog.pg_settings
similar to this example. Create a Python script to dump to csv/json/something to parse back in. This calculates thepostgresconf_line
for matching current expectations, not sure that will make it to the final version. Also calculating a few bool indicators that may be helpful.Possible future improvements
postgresql.conf
) & user config (SET TimeZone = 'America/Denver';
)category='Customized Options'
The text was updated successfully, but these errors were encountered: