Re: Online enabling of checksums

Tomas Vondra <tomas.vondra@2ndquadrant.com>

From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Magnus Hagander <magnus@hagander.net>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>, Daniel Gustafsson <daniel@yesql.se>, Michael Banck <michael.banck@credativ.de>, Robert Haas <robertmhaas@gmail.com>, Greg Stark <stark@mit.edu>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Andrey Borodin <x4mmm@yandex-team.ru>
Date: 2018-03-27T12:23:55Z
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.vondra@2ndquadrant.com <mailto:tomas.vondra@2ndquadrant.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


Commits

  1. Online enabling and disabling of data checksums

  2. Deactive flapping checksum isolation tests.

  3. Add support for coordinating record typmods among parallel workers.