Re: Configuration Parameter/GUC value validation hook

2022-05-09 Thread Robert Haas
On Mon, May 9, 2022 at 3:44 AM Bharath Rupireddy wrote: > Thanks for providing thoughts. I'm personally not in favour of adding > any new syntax, as the new syntax would require some education and > changes to other layers. I see some downsides with new syntax: > 1) It will be a bit difficult to

Re: Configuration Parameter/GUC value validation hook

2022-05-09 Thread Bharath Rupireddy
On Sat, May 7, 2022 at 12:11 AM Euler Taveira wrote: > > On Wed, May 4, 2022, at 8:12 AM, Bharath Rupireddy wrote: > > How about we provide a sample extension (limiting some important > parameters say shared_buffers, work_mem and so on to some > "reasonable/recommended" limits) in the core along

Re: Configuration Parameter/GUC value validation hook

2022-05-06 Thread Euler Taveira
On Wed, May 4, 2022, at 8:12 AM, Bharath Rupireddy wrote: > How about we provide a sample extension (limiting some important > parameters say shared_buffers, work_mem and so on to some > "reasonable/recommended" limits) in the core along with the > set_config_option_hook? This way, all the people

Re: Configuration Parameter/GUC value validation hook

2022-05-06 Thread Robert Haas
On Wed, May 4, 2022 at 7:12 AM Bharath Rupireddy wrote: > Thanks Tom and Robert for your responses. > > How about we provide a sample extension (limiting some important > parameters say shared_buffers, work_mem and so on to some > "reasonable/recommended" limits) in the core along with the >

Re: Configuration Parameter/GUC value validation hook

2022-05-04 Thread Bharath Rupireddy
On Tue, May 3, 2022 at 10:43 PM Robert Haas wrote: > > On Tue, May 3, 2022 at 11:45 AM Tom Lane wrote: > > Robert Haas writes: > > > I have some desire here to see us solve this problem not just for > > > service providers, but for users in general. You don't have to be a > > > service provider

Re: Configuration Parameter/GUC value validation hook

2022-05-03 Thread Robert Haas
On Tue, May 3, 2022 at 11:45 AM Tom Lane wrote: > Robert Haas writes: > > I have some desire here to see us solve this problem not just for > > service providers, but for users in general. You don't have to be a > > service provider to want to disallow SET work_mem = '1TB' -- you just > > need

Re: Configuration Parameter/GUC value validation hook

2022-05-03 Thread Tom Lane
Robert Haas writes: > I have some desire here to see us solve this problem not just for > service providers, but for users in general. You don't have to be a > service provider to want to disallow SET work_mem = '1TB' -- you just > need to be a DBA on a system where such a setting will cause bad

Re: Configuration Parameter/GUC value validation hook

2022-05-03 Thread Robert Haas
On Mon, May 2, 2022 at 10:54 AM Tom Lane wrote: > Bharath Rupireddy writes: > > I propose to add a simple new hook in set_config_option (void > > set_config_option_hook(struct config_generic *record);) and the > > vendors can implement their own platform-dependent extensions to > > accept or

Re: Configuration Parameter/GUC value validation hook

2022-05-02 Thread Tom Lane
Bharath Rupireddy writes: > I propose to add a simple new hook in set_config_option (void > set_config_option_hook(struct config_generic *record);) and the > vendors can implement their own platform-dependent extensions to > accept or reject certain parameters (based on platform/VM >

Configuration Parameter/GUC value validation hook

2022-05-02 Thread Bharath Rupireddy
Hi, Right now postgres can't prevent users setting certain configuration parameters or GUCs (like shared_buffers, temp_buffers, work_mem, maintenance_work_mem, max_stack_depth, temp_file_limit, max_worker_processes, other worker processes settings, effective_io_concurrency and so on) to