How to set postgres cursor.itersize from peewee?
You can try overriding the `cursor()` method used by Peewee to create the db-api 2 cursor:

```python

class PGDatabase(PostgresqlExtDatabase):
    def cursor(self, commit=None):
        cursor = super(PGDatabase, self).cursor(commit=commit)
        cursor.itersize = 50000
        return cursor

db = PGDatabase('dbname', ...)
```

Please let me know if this does not work, as I didn't test it myself. Just writing in to confirm that @coleifer's advice above does work.  In my pgAdmin4 console, I'm seeing peewee clients execute statements like:

    FETCH FORWARD 500000 FROM "dfb9d910-7187-11eb-9f92-ac220bbe7188"

This has helped me to drastically reduce memory consumed by multiple processes retrieving half a billion rows each. :+1: 
I am using Peewee with PostgreSQL and server side cursors as per [the documentation](http://docs.peewee-orm.com/en/latest/peewee/playhouse.html#server-side-cursors) and realise that the default row fetch size is 2000.  I've verified this by looking at the queries being sent to the server.

It works really well, my code is receiving around 200,000 rows per second. However, I am reading hundreds of millions of rows and am aware that the default psycopg2 cursor itersize is 2000 records. I'd like to experiment with changing this default to see if I get a higher throughput of records.

Is there a way to set the psycopg2 server side itersize value from Peewee?

Can I do this?

```
db = PostgresqlExtDatabase('dbname', user='user', password='pass', host='localhost', port=5432, server_side_cursors=True)
db.cursor().itersize = 50000
data = Record.raw("SELECT ...").dicts().iterator(database=db)
```

Looking at the queries sent to the server, I'm still seeing 

```
FETCH FORWARD 2000 FROM "64a756a8-61f1-11eb-9154-ac220bbe7188"
```

Any assistance would be greatly appreciated.