The Postgresql driver included is based on ODBC and has serious performance issues for big data (it works ok on small sets).
There are two operations modes for the ODBC driver. 1) is when the ODBC driver has to load ALL DATA from the query into its own memory, before delivering results. If you query many million rows, that makes a huge impact on the server memory consumption, and can even exhaust it. 2) Alternatively, it can use enable Declare/fetch in the driver, which makes the driver import chunks of data instead. It solves the memory exhaustion problem, but it slows the loading of data significantly, especially because when declare/fetch is enabled, the database uses cursors to deliver the data, and cursors do prevent Postgresql from using parallel processing. For big data or queries that needs to scan tables, no parallel operations makes the load significantly slower.
The solution to this is to implement a native Postgresql driver like https://www.npgsql.org/ into the distribution, instead of the ODBC currently in use.