This patch looks good to me. I have two very minor nits: The inflation of the sample size by 10% is arbitrary but it doesn't seem unreasonable or concerning. It just makes me curious if there are any known cases that motivated adding this logic. Secondly, if the earliest non-deprecated version of PostgreSQL supports sampling, then you could optionally remove the logic that tests for that. The affected lines should be unreachable.
- Re: postgres_fdw: using TABLESAMPLE to collect remote sampl... James Finnerty
- Re: postgres_fdw: using TABLESAMPLE to collect remote ... Tom Lane
- Re: postgres_fdw: using TABLESAMPLE to collect rem... Tomas Vondra
- Re: postgres_fdw: using TABLESAMPLE to collect... Tomas Vondra
- Re: postgres_fdw: using TABLESAMPLE to col... Tom Lane
- Re: postgres_fdw: using TABLESAMPLE t... Tomas Vondra
- Re: postgres_fdw: using TABLESAMP... Tom Lane
- Re: postgres_fdw: using TABLE... Tomas Vondra
- Re: postgres_fdw: using TABLE... Tomas Vondra
- Re: postgres_fdw: using TABLE... Tom Lane
- Re: postgres_fdw: using TABLE... Tomas Vondra