Correct format config parsing logic
Use fewer sql statements to format tiles
Execute all sql simultaneously with thread pool
Perform filtering outside of threads
Pool postgresql connections