Re: Scans are offloaded to SeqScan instead of CustomScan when there are multiple relations in the same query

Поиск
Список
Период
Сортировка
От Amin
Тема Re: Scans are offloaded to SeqScan instead of CustomScan when there are multiple relations in the same query
Дата
Msg-id CAF-KA88U1G3rLCSkvQ=yg9Gfa_9Dq91H2tBKw=MDH5gYEFd0bQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Scans are offloaded to SeqScan instead of CustomScan when there are multiple relations in the same query  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Scans are offloaded to SeqScan instead of CustomScan when there are multiple relations in the same query  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi Tom,

I made sure EXPLAIN returns CustomScan for all scans in the query. But still, ExecCustomScan is only called once while the rest of the functions are called for each scan separately. Is this expected behavior? How to work around this?

Thank you!

On Mon, Apr 17, 2023 at 3:45 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Amin <amin.fallahi@gmail.com> writes:
> To simplify: Can CustomScan scan multiple relations in the same query or it
> will always be assigned to one or zero relations?

There's barely any code in the core planner that is specific to custom
scans.  Almost certainly this misbehavior is the fault of your
custom-path-creation code.  Maybe you're labeling the paths with the
wrong parent relation, or forgetting to submit them to add_path,
or assigning them costs that are high enough to get them rejected?

                        regards, tom lane

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: check_strxfrm_bug()
Следующее
От: David Rowley
Дата:
Сообщение: Re: Fix typos and inconsistencies for v16