Re: Statistics Import and Export - Mailing list pgsql-hackers

From Alexander Lakhin
Subject Re: Statistics Import and Export
Date
Msg-id 57988cee-5cc8-44f9-981e-8d62e556f5c8@gmail.com
Whole thread Raw
In response to Re: Statistics Import and Export  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Statistics Import and Export
List pgsql-hackers
Hello Jeff,

26.02.2025 04:00, Jeff Davis wrote:
I plan to commit the patches soon.

It looks like 8f427187d broke pg_dump on Cygwin:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=fairywren&dt=2025-02-26%2010%3A03%3A07

As far as I can see, it exits prematurely here:
               float           reltuples = strtof(PQgetvalue(res, i, i_reltuples), NULL);

because of:
/*
 * Cygwin has a strtof() which is literally just (float)strtod(), which means
 * we get misrounding _and_ silent over/underflow. Using our wrapper doesn't
 * fix the misrounding but does fix the error checks, which cuts down on the
 * number of test variant files needed.
 */
#define HAVE_BUGGY_STRTOF 1
...
#ifdef HAVE_BUGGY_STRTOF
extern float pg_strtof(const char *nptr, char **endptr);
#define strtof(a,b) (pg_strtof((a),(b)))
#endif

and:
float
pg_strtof(const char *nptr, char **endptr)
{
...
    if (errno)
    {
        /* On error, just return the error to the caller. */
        return fresult;
    }
    else if ((*endptr == nptr) || isnan(fresult) ||
...

Best regards,
Alexander Lakhin
Neon (https://neon.tech)

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: access numeric data in module
Next
From: Nathan Bossart
Date:
Subject: Re: Trigger more frequent autovacuums of heavy insert tables