set enable_partitionwise_join to on;

select  
  1 
from fkpart5.fk as ref_1
     inner join fkpart5.pk31 as sample_0 tablesample system (4.1) on (ref_1.a = sample_0.a )
     inner join public.pagg_tab_para_p2 as ref_3 on (ref_1.a > 0.3)
     inner join fkpart5.pk2 as ref_4 
     right join regress_indexing.pk as ref_5 on (ref_4.a = ref_5.a )
on (false)
        
