Fix fetch size issue with PostgreSQL