Query progress estimation for PostgreSQL