Re: Import Statistics in postgres_fdw before resorting to sampling.
| От | Ashutosh Bapat |
|---|---|
| Тема | Re: Import Statistics in postgres_fdw before resorting to sampling. |
| Дата | |
| Msg-id | CAExHW5sV1tKES6A=T-auzHtoOMKO-wurUqEHFbOgZJ-jBnxuxw@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Import Statistics in postgres_fdw before resorting to sampling. (Corey Huinker <corey.huinker@gmail.com>) |
| Ответы |
Re: Import Statistics in postgres_fdw before resorting to sampling.
|
| Список | pgsql-hackers |
On Wed, Jan 7, 2026 at 11:34 AM Corey Huinker <corey.huinker@gmail.com> wrote: > > Anyway, here's v8, incorporating the documentation feedback and Matheus's notes. I went through the patches. I have one question: The column names of the foreign table on the local server are sorted using qsort, which uses C sorting. The column names the result obtained from the foreign server are sorted using ORDER BY clause. If the default collation on the foreign server is different from the one used by qsort(), the merge sort in import_fetched_statistics() may fail. Shouldn't these two sorts use the same collation? Some minor comments /* avoid including explain_state.h here */ typedef struct ExplainState ExplainState; - unintended line deletion? fetch_remote_statistics() fetches the statistics twice if the first attempt fails. I think we need same check after the second attempt as well. The second attempt should not fail, but I think we need some safety checks and Assert at least, in case the foreign server misbehaves. -- Best Wishes, Ashutosh Bapat
В списке pgsql-hackers по дате отправления: