Search code examples
postgresqlload-balancingrdspgpool

Pgpool prints "unable to parse query" to certain more complex queries


I'm using one pgpool server and 2 RDS servers in load-balance master-slave mode. It's all going well but I have this one problem i can't find a solution. I have one query that does only SELECTs with a some joins and etc. However, when I execute this query and then look in pgpool log, it prints the message : " Unable to parse the query:". The query then is executed in the backend 0 (master) with no problem. Thing is, This is a heavy query and i want it to be balanced as well.

The query has : "INNER JOIN; INNER JOIN LATERAL; COUNT(); GROUP BY; COALESCE(); MAX(); EXTRACT(); EPOCH(); NOW()"

Searching I did only find questions, but no solution at all. Hope any of you guys can help me. Thanks


Solution

  • By taking a look at the LATERAL JOIN (Table Expressions). It's only available after Postgresql 9.3. So maybe you're using an older pgpool version. That's why pgpool can't parse your query.