Re: postgres_fdw: Fix costing of remote sorts without remote estimates

From: "Jelte Fennema-Nio" <postgres(at)jeltef(dot)nl>
To: "Rui Zhao" <zhaorui126(at)gmail(dot)com>
Cc: "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>, "Etsuro Fujita" <etsuro(dot)fujita(at)gmail(dot)com>, "Robert Haas" <robertmhaas(at)gmail(dot)com>, "Ashutosh Bapat" <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, "Narayanan Venkateswaran" <narayananvpostgres(at)gmail(dot)com>
Subject: Re: postgres_fdw: Fix costing of remote sorts without remote estimates
Date: 2026-11-04 22:35:10
Message-ID: DMMS9RAQOT0Y.28E2MC9GWPYTY@jeltef.nl
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 8 Oct 2026 at 18:13, Rui Zhao <zhaorui126(at)gmail(dot)com> wrote:
> I found two remaining aggregate-costing cases in 0003.

Both are real inaccuracies, but the planner costs a local Agg the same
way (see create_agg_path()), so fixing them only in postgres_fdw would
make the plans worse. Attached v3 adds 0005 with comments explaining
that.

Also they are pre-existing inaccuracies, they are not introduced by this
patchset.

Attachment Content-Type Size
v3-0001-postgres_fdw-Track-run-cost-instead-of-total-cost.patch text/x-patch 9.2 KB
v3-0002-postgres_fdw-Add-tests-for-costing-local-work-bel.patch text/x-patch 6.4 KB
v3-0003-postgres_fdw-Separate-remote-transfer-and-local-c.patch text/x-patch 17.5 KB
v3-0004-postgres_fdw-Fix-costing-of-remote-sorts-without-.patch text/x-patch 34.8 KB
v3-0005-postgres_fdw-Explain-where-remote-tlist-costing-d.patch text/x-patch 2.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2026-11-04 22:45:25 Re: enhancing pg_basebackup speeds up to ~23Gbps (small fixes + io_uring/Direct I/O)
Previous Message Michael Paquier 2026-11-04 22:22:03 Re: Fix cumulative WAL statistics double-counting from parallel workers