Cleanup rendering jobs in the main thread (fixes a crash in sequential job)
Added connection pool for postgres