Scans are offloaded to SeqScan instead of CustomScan when there are multiple relations in the same query - Mailing list pgsql-hackers

From Amin
Subject Scans are offloaded to SeqScan instead of CustomScan when there are multiple relations in the same query
Date
Msg-id CAF-KA8-6=3KiP0wa0=9V0_NeL=Evcv5zTC2DWGFP0mtoMiivJw@mail.gmail.com
Whole thread Raw
Responses Re: Scans are offloaded to SeqScan instead of CustomScan when there are multiple relations in the same query
List pgsql-hackers
Hi there,

In my implementation of CustomScan, when I have a query that scans multiple tables (select c from t1,t2,t3), the planner always picks one table to be scanned by CustomScan and offloads the rest to SeqScan. I tried assigning a cost of 0 to the CustomScan path, but still not working. BeginCustomScan gets executed, ExecCustomScan is skipped, and then EndCustomScan is executed for all the tables that are offloaded to Seq Scan. EXPLAIN shows that always only one table is picked to be executed by CustomScan. Any idea what I might be doing wrong? Like a value in a struct I might be setting incorrectly?

Thanks!

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Direct I/O
Next
From: David Rowley
Date:
Subject: Re: v16dev: invalid memory alloc request size 8488348128