Re: Why is DEFAULT_FDW_TUPLE_COST so insanely low?

David Rowley <dgrowleyml@gmail.com>

From: David Rowley <dgrowleyml@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Bruce Momjian <bruce@momjian.us>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2023-11-02T07:19:35Z
Lists: pgsql-hackers
On Thu, 2 Nov 2023 at 18:39, Michael Paquier <michael@paquier.xyz> wrote:
> The CI has been telling me that the plans of the tests introduced by
> this patch are not that stable when building with 32b.  See:
> diff -U3 /tmp/cirrus-ci-build/contrib/postgres_fdw/expected/postgres_fdw.out /tmp/cirrus-ci-build/build-32/testrun/postgres_fdw/regress/results/postgres_fdw.out
> --- /tmp/cirrus-ci-build/contrib/postgres_fdw/expected/postgres_fdw.out 2023-11-02 05:25:47.290268511 +0000
> +++ /tmp/cirrus-ci-build/build-32/testrun/postgres_fdw/regress/results/postgres_fdw.out 2023-11-02 05:30:45.242316423 +0000
> @@ -4026,13 +4026,13 @@
>   Sort
>     Output: t1.c1, t1.c2, t1.c3, t1.c4, t1.c5, t1.c6, t1.c7, t1.c8
>     Sort Key: t1.c1
> -   ->  Nested Loop Semi Join
> +   ->  Hash Semi Join
>           Output: t1.c1, t1.c2, t1.c3, t1.c4, t1.c5, t1.c6, t1.c7, t1.c8
> -         Join Filter: (t2.c3 = t1.c3)
> +         Hash Cond: (t1.c3 = t2.c3)
>           ->  Foreign Scan on public.ft1 t1
>                 Output: t1.c1, t1.c2, t1.c3, t1.c4, t1.c5, t1.c6, t1.c7, t1.c8
>                 Remote SQL: SELECT "C 1", c2, c3, c4, c5, c6, c7, c8 FROM "S 1"."T 1" WHERE (("C 1" < 20))
> -         ->  Materialize
> +         ->  Hash
>                 Output: t2.c3
>                 ->  Foreign Scan on public.ft2 t2
>                       Output: t2.c3

No tests were introduced.  Is this the only existing one that's
unstable as far as you saw?

I'm not yet seeing any failures in the buildfarm, so don't really want
to push a fix for this one if there are going to be a few more
unstable ones to fix.  I may just hold off a while to see.

Thanks for letting me know about this.

David



Commits

  1. Stabilize postgres_fdw tests on 32-bit machines

  2. Attempt to stabilize postgres_fdw tests

  3. Increase DEFAULT_FDW_TUPLE_COST from 0.01 to 0.2

  4. Add postgres_fdw contrib module.