Re: pgbench to the MAXINT

From: Euler Taveira de Oliveira <euler(at)timbira(dot)com>
To: Greg Smith <greg(at)2ndquadrant(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgbench to the MAXINT
Date: 2011-01-11 21:34:17
Message-ID: 4D2CCCD9.802@timbira.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

Em 10-01-2011 05:25, Greg Smith escreveu:
> Euler Taveira de Oliveira wrote:
>> Em 07-01-2011 22:59, Greg Smith escreveu:
>>> setrandom: invalid maximum number -2147467296
>>>
>> It is failing at atoi() circa pgbench.c:1036. But it just the first
>> one. There are some variables and constants that need to be converted
>> to int64 and some functions that must speak 64-bit such as getrand().
>> Are you working on a patch?
>
> http://archives.postgresql.org/pgsql-hackers/2010-01/msg02868.php
> http://archives.postgresql.org/message-id/4C326F46.4050801@2ndquadrant.com
>
Greg, I just improved your patch. I tried to work around the problems pointed
out in the above threads. Also, I want to raise some points:

(i) If we want to support and scale factor greater than 21474 we have to
convert some columns to bigint; it will change the test. From the portability
point it is a pity but as we have never supported it I'm not too worried about
it. Why? Because it will use bigint columns only if the scale factor is
greater than 21474. Is it a problem? I don't think so because generally people
compare tests with the same scale factor.

(ii) From the performance perspective, we need to test if the modifications
don't impact performance. I don't create another code path for 64-bit
modifications (it is too ugly) and I'm afraid some modifications affect the
32-bit performance. I'm in a position to test it though because I don't have a
big machine ATM. Greg, could you lead these tests?

(iii) I decided to copy scanint8() (called strtoint64 there) from backend
(Robert suggestion [1]) because Tom pointed out that strtoll() has portability
issues. I replaced atoi() with strtoint64() but didn't do any performance tests.

Comments?

[1] http://archives.postgresql.org/pgsql-hackers/2010-07/msg00173.php

--
Euler Taveira de Oliveira
http://www.timbira.com/

Attachment Content-Type Size
pgbench-110111.diff text/x-patch 11.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2011-01-11 21:51:45 Re: Allowing multiple concurrent base backups
Previous Message Peter Eisentraut 2011-01-11 21:05:11 Re: Add function dependencies

Browse pgsql-performance by date

  From Date Subject
Next Message Jignesh Shah 2011-01-12 01:43:32 Re: Performance of PostgreSQL over NFS
Previous Message Rauan Maemirov 2011-01-11 08:16:10 Re: Problems with FTS