Modification to GEQO (Genetic Query Optimization) of PostgreSQL
One way you can do this without the need to mess around with GEKO is by using CTE.

CTE are optimisation barriers, hence you could wrap the joins inside CTEs in the order you want and PG will be forced to do so.

For example if we want to force the DB to first join t1 with t2 and only then with t4 we could run something like:

explain 
with j1 as (select *,t1.c4 as t1c4 from t1 join t2 on (t1.c2=t2.id))
    ,j2 as (select * from j1 join t4 on (t1c4=t4.id))
select * from j2;


This will result in:

                                  QUERY PLAN                                   
-------------------------------------------------------------------------------
CTE Scan on j2  (cost=51485.00..67785.00 rows=815000 width=64)
CTE j1
 -&gt;  Hash Join  (cost=3473.00..14521.00 rows=815000 width=40)
       Hash Cond: (t2.id = t1.c2)
       -&gt;  Seq Scan on t2  (cost=0.00..26.30 rows=1630 width=20)
       -&gt;  Hash  (cost=1637.00..1637.00 rows=100000 width=20)
             -&gt;  Seq Scan on t1  (cost=0.00..1637.00 rows=100000 width=20)
CTE j2
 -&gt;  Hash Join  (cost=289.00..36964.00 rows=815000 width=64)
       Hash Cond: (j1.t1c4 = t4.id)
       -&gt;  CTE Scan on j1  (cost=0.00..16300.00 rows=815000 width=44)
       -&gt;  Hash  (cost=164.00..164.00 rows=10000 width=20)
             -&gt;  Seq Scan on t4  (cost=0.00..164.00 rows=10000 width=20)
(13 rows)


This is just an example, you can change it around as needed - in any case PG can't change the order between the different CTEs.

Hope it helps :)