added async_filter to db query
added smallint type
pgsql detection for amazon ami
pool fixes