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

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
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-23 06:11:59
Message-ID: 436d42e9-c59d-6eee-cd42-5902979a749f@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-09-23 03:50, Michael Paquier wrote:
> On Tue, Sep 22, 2020 at 11:45:14PM +0200, Peter Eisentraut wrote:
>> However, I still think the integer type use is a bit inconsistent. In both
>> cases, using strtoul() and dealing with unsigned integer types between
>> parsing and final use would be more consistent.
>
> No objections to that either, so changed this way. I kept those
> variables signed because applying values of 2B~4B is not really going
> to matter much here ;p

This patch mixes up unsigned int and uint32 in random ways. The
variable is uint32, but the format is %u and the max constant is UINT_MAX.

I think just use unsigned int as the variable type. There is no need to
use the bit-exact types. Note that the argument of alarm() is of type
unsigned int.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message tsunakawa.takay@fujitsu.com 2020-09-23 06:30:52 RE: [Patch] Optimize dropping of relation buffers using dlist
Previous Message Peter Eisentraut 2020-09-23 06:07:10 Re: Keep elog(ERROR) and ereport(ERROR) calls in the cold path