Re: BUG #17713: Assert with postgres_fdw in v12

Richard Guo <guofenglinux@gmail.com>

From: Richard Guo <guofenglinux@gmail.com>
To: tharakan@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2022-12-13T03:20:42Z
Lists: pgsql-bugs
On Mon, Dec 12, 2022 at 7:10 PM PG Bug reporting form <
noreply@postgresql.org> wrote:

> This is a repro that triggers an assert (only) in REL_12_STABLE. In
> particular the issue seems to have begun after this commit -
> 08d2d58a2a1c8ef8d39e8132d39ee14a1d029500. The foreign table
> is empty so am unsure if Assert()'s expectations are valid.
>
> Since all versions v13+ seem to work okay, it is possible that a future
> bug-fix was not backpatched far enough to v12.


Yes, I think it is 5e7fa189e, which should be back-patched to v12.

Thanks
Richard

Commits

  1. postgres_fdw: Fix assertion in estimate_path_cost_size().

  2. postgres_fdw: Fix costing of pre-sorted foreign paths with local stats.