From: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net> |
Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Michael Banck <michael(dot)banck(at)credativ(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Greg Stark <stark(at)mit(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru> |
Subject: | Re: Online enabling of checksums |
Date: | 2018-03-27 12:23:55 |
Message-ID: | e517ddc7-06a2-a78a-4656-aaf5c1ce4a3a@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 03/27/2018 08:56 AM, Magnus Hagander wrote:
> On Mon, Mar 26, 2018 at 10:09 PM, Tomas Vondra
> <tomas(dot)vondra(at)2ndquadrant(dot)com <mailto:tomas(dot)vondra(at)2ndquadrant(dot)com>> wrote:
>
> Hi,
>
> I see enable_data_checksums() does this:
>
> if (cost_limit <= 0)
> ereport(ERROR,
> (errmsg("cost limit must be a positive value")));
>
> Is there a reason not to allow -1 (no limit), just like for vacuum_cost?
>
>
> Eh. vaccum_cost_limit cannot be set to -1 (1 is the lowest). Neither can
> vacuum_cost_delay -- it is set to *0* to disable it (which is how the
> cost_delay parameter is handled here as well).
>
> Are you thinking autovacuum_vacuum_cost_limit where -1 means "use
> vacuum_cost_limit"?
>
> The reason to disallow cost_limit=0 is to avoid divide-by-zero. We could
> allow -1 and have it mean "use vacuum_cost_limit", but I'm not sure how
> relevant that really would be in this context?
>
D'oh! You're right, of course.
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Teodor Sigaev | 2018-03-27 12:44:48 | Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index |
Previous Message | Arthur Zakirov | 2018-03-27 12:19:55 | Re: [PROPOSAL] Shared Ispell dictionaries |