Closed dasong2410 closed 5 years ago
I think this is is the issue described here: https://github.com/citusdata/citus/issues/2420 , which is fixed as of 8.0.
I think this is is the issue described here: #2420 , which is fixed as of 8.0.
I think this is is the issue described here: #2420 , which is fixed as of 8.0.
thanks, it's the same issue.
Hey, we encountered a problem about citus pgsql_job_cache on our production database resently, there were too many files in this directory (exceed 32000 links per inode limit of ext3). Following is the steps to repeat the situation.
env
sql
Create a table clm_biz_exception_log_aimp with 2 columns, insert 100000000 records into it, and then index its 2 columns respectively.
shell script
Detele 2 records per time, and loop it.
run shell script
Execute this shell script in background.
monitor worker's pgsql_job_cache directory
You will see the result number keeps increasing until it reaches 31999.
Those files' name are in format of %u_%u_%u:
When pgsql_job_cache's links reach 32000, it begins to show errors in nohup.out.
Those %u_%u_%u files will not be deleted until I restart PostgreSQL manaully.
other test cases
Delete one single record using "where id=xx", the number of those files in directory pgsql_job_cache doesn't increase.
Detele a bunch of records using "where id in(xx,xx,xx)", the number of those files in directory pgsql_job_cache doesn't increase.
Detele a bunch of records using "where id in(sub-query)", the number of those files in directory pgsql_job_cache increases.
Detele one single record using "where id in(sub-query)", the number of those files in pgsql_job_cache increases.
When the table in the sub-query is distributed table, the number of those files in directory pgsql_job_cache doesn't increase.
question
I wonder if it's a bug that those files will not be deleted in pgsql_job_cache even after the related process has done all it needs to do and exited? When are those files supposed to be cleaned? Is there any method I can use to delete those files safely except restarting PostgreSQL? Thanks.