citusdata / citus

Distributed PostgreSQL as an extension
https://www.citusdata.com
GNU Affero General Public License v3.0
10.61k stars 671 forks source link

pgsql_job_cache folder size grows unusually large #7691

Open nguoingoai opened 1 month ago

nguoingoai commented 1 month ago

My Coordinator node have a folder pgsql_job_cache , recently size grows unusually large , this size is larger than folder data on this node . So what is the reason and how to fix this ?

emelsimsek commented 1 month ago

Citus keeps intermediate result files in pgsql_job_cache folders. It may grow depending on your intermediate result sizes but should be cleaned-up after the queries are done. So when there is no running query it should not have anything in it. Do you observe otherwise?

nguoingoai commented 1 month ago

I thinks some query was kill when it running, Can I delete these files without effecting the data ?

emelsimsek commented 1 month ago

There was a few intermediate result file leak bugs, it is possible that you have run into them. What citus version are you on? And what are your schema/queries like?

As a workaround, If there is no query running at the moment, it should be fine to empty pgsql_job_cache folder.