Re: Range checks of pg_test_fsync --secs-per-test and pg_test_timing --duration

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Range checks of pg_test_fsync --secs-per-test and pg_test_timing --duration
Date: 2020-09-18 08:22:15
Message-ID: 20200918082215.GA9826@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 15, 2020 at 02:39:08PM +0200, Peter Eisentraut wrote:
> I didn't mean use strtol() to be able to process larger values, but for the
> error checking. atoi() cannot detect any errors other than ERANGE. So if
> you are spending effort on making the option value parsing more robust,
> relying on atoi() will result in an incomplete solution.

Okay, after looking at that, here is v3. This includes range checks
as well as errno checks based on strtol(). What do you think?
--
Michael

Attachment Content-Type Size
pgtest-fix-range-v3.patch text/x-diff 6.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2020-09-18 08:23:36 Re: pgbench calculates summary numbers a wrong way.
Previous Message Masahiko Sawada 2020-09-18 08:00:00 Re: Transactions involving multiple postgres foreign servers, take 2