postgres_fdw: Add Assert to estimate_path_cost_size(). When estimating the cost/size of a pre-sorted path for a given upper relation using local stats, this function dereferences the passed-in PgFdwPathExtraData pointer without checking that it is not NULL. But that is not a bug as the pointer is guaranteed to be non-NULL in that case; to avoid confusion, add an Assert to ensure that it is not NULL before dereferencing it.
Reported-by: Ranier Vilela <ranier...@gmail.com> Author: Etsuro Fujita <etsuro.fuj...@gmail.com> Reviewed-by: Ranier Vilela <ranier...@gmail.com> Discussion: https://postgr.es/m/CAEudQArgiALbV1akQpeZOgim7XP05n%3DbDP1%3DTcOYLA43nRX_vA%40mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/21c9756db6458f859e6579a6754c78154321cb39 Modified Files -------------- contrib/postgres_fdw/postgres_fdw.c | 7 +++++++ 1 file changed, 7 insertions(+)