Re: pg_upgrade and extra_float_digits

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_upgrade and extra_float_digits
Date: 2010-05-16 03:05:11
Message-ID: 4BEF60E7.1090609@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>
>> Bruce Momjian wrote:
>>
>>> FYI, I test pg_upgrade by loading the old cluster's regression database
>>> from a pg_dump output file, then after the upgrade, I dump the
>>> regression database of the new cluster and diff the changes.
>>>
>>> The problem I just encountered is that pg_dump uses
>>> extra_float_digits=-3 for 9.0, while previous releases used '2'. I had
>>> to do hack each server version to get a dump output that would match
>>> without rounding errors --- it did eventually work and validated.
>>>
>
>
>> That sounds like a disaster waiting to happen. The server version is
>> going to affect much more than just this behaviour, surely. Wouldn't it
>> be better to provide a pg_dump option to provide the extra_float_digits
>> setting?
>>
>
> What disaster? That's only for test purposes, it has nothing to do with
> actual data transfer.
>
>
>

Maybe I have misunderstood. How exactly is the server version being
hacked here? I know it's only for testing, but it still seems to me that
lying to a program as heavily version dependant as pg_dump is in general
a bad idea.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2010-05-16 03:12:15 Re: pg_upgrade and extra_float_digits
Previous Message Jaime Casanova 2010-05-16 03:02:35 Re: Performance problem in textanycat/anytextcat