Re: Should vacuum process config file reload more often

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: Should vacuum process config file reload more often
Date: 2023-03-01 19:54:05
Message-ID: CAAKRu_aAdJOkViwh0gzf12TKsU2sSGhQsyNbn2vznbWah=xL1A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks for the feedback and questions, Pavel!

On Fri, Feb 24, 2023 at 3:43 AM Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com> wrote:
> I have a couple of small questions:
> Can this patch also read the current GUC value if it's modified by the
> SET command, without editing config file?

If a user sets a guc like vacuum_cost_limit with SET, this only modifies
the value for that session. That wouldn't affect the in-progress vacuum
you initiated from that session because you would have to wait for the
vacuum to complete before issuing the SET command.

> What will be if we modify config file with mistakes? (When we try to
> start the cluster with an erroneous config file it will fail to start,
> not sure about re-read config)

If you manually add an invalid valid to your postgresql.conf, when it is
reloaded, the existing value will remain unchanged and an error will be
logged. If you attempt to change the guc value to an invalid value with
ALTER SYSTEM, the ALTER SYSTEM command will fail and the existing value
will remain unchanged.

- Melanie

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark (as CFM) 2023-03-01 19:54:16 Re: Generate pg_stat_get_xact*() functions with Macros
Previous Message Gregory Stark (as CFM) 2023-03-01 19:50:45 Re: [EXTERNAL] Re: Add non-blocking version of PQcancel