pgcat icon indicating copy to clipboard operation
pgcat copied to clipboard

Implement Strict Config Parsing

Open AndrewJackson2020 opened this issue 5 months ago • 1 comments

Currently when pgcat passes toml config files upon encountering any misspelled or unknown fields they are simply ignored. This is not ideal as a user could simply misspell a field, pgcat seemingly runs normally, and it could take a bit of debugging unknown behavior before the user realized they misspelled a field. Contrast that scenario with the behavior of this PR where a misspelled field will not allow pgbouncer to run until the config is fixed, much more explicit and causes problems to be caught earlier.

Some potential issues:

  • This is a breaking change, there could be pgcat instances in the wild with misspelled or erroneous config fields that run fine with older versions but would not work with this patch until said fields are fixed/removed
  • reload functionality will have to handle errors differently from startup functionality. Ideally on reload a log line is generated and if being run from the admin console a notify message is sent to the user but no change is made to the running process.

AndrewJackson2020 avatar Sep 08 '24 15:09 AndrewJackson2020