clickhouse_fdw icon indicating copy to clipboard operation
clickhouse_fdw copied to clipboard

clickhouse fdw has high memory consumption

Open fantom0005 opened this issue 3 years ago • 1 comments

Hello!

We are moving part of our data from Postgres to Clickhouse database and for backward capability with our code we use Clickhouse FDW.

But on simple queries (like COPY (SELECT * FROM big_clickhouse_fdw_table) TO STDOUT) Postgres consumes too much memory. Memory consumption depends on the size of selected data.

It seems that Clickhouse FDW caches whole query results in memory. Are we right? How to limit memory consumption? Are there any settings that can help with it (cache size, spill results to disk, etc)?

fantom0005 avatar Aug 24 '21 14:08 fantom0005

Hi, unfortunately, there are no such options. The main purpose was to support aggregation queries with the limited amount of data in the result.

ildus avatar Aug 24 '21 19:08 ildus