Re: [HACKERS] Runtime Partition Pruning - Mailing list pgsql-hackers

From David Rowley
Subject Re: [HACKERS] Runtime Partition Pruning
Date
Msg-id CAKJS1f-7HrcvzDtEC8cCB-8FbmSWT-21AEzsXhvq0N-wzvAVvQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Runtime Partition Pruning  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: [HACKERS] Runtime Partition Pruning
List pgsql-hackers
On 5 January 2018 at 05:37, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> I tried this patch (applying it on Amit's last current version on top of
> 4e2970f8807f which is the latest it applies to) and regression tests
> fail with the attached diff; in all cases it appears to be an off-by-one
> in row count.  Would you please give it a look?

Looks like it's down to ExplainPropertyFloat() having
machine-dependent behaviour.

On the machine that I was working with when testing this the following
code outputs "1"

#include <stdio.h>

double nfiltered = 1.0;
double nloops = 2.0;

int main(void)
{
printf("%.*f", 0, nfiltered / nloops);
return 0;
}

but on your machine it must be outputting "0"?

I'm not sure if I should just try to have even row numbers in the
tests, or if we should be fixing EXPLAIN so it is consistent.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Jing Wang
Date:
Subject: Re: Libpq support to connect to standby server as priority
Next
From: David Rowley
Date:
Subject: Re: [HACKERS] Runtime Partition Pruning