mfenniak / pg8000

A Pure-Python PostgreSQL Driver
http://pythonhosted.org/pg8000/
Other
222 stars 55 forks source link

Error: unpack_from requires a buffer of at least 5 bytes #150

Closed emirot closed 5 years ago

emirot commented 6 years ago

Any idea why we have this issue : error: unpack_from requires a buffer of at least 5 bytes

It's related to : https://github.com/awslabs/amazon-redshift-utils/issues/239

tlocke commented 5 years ago

Hi @emirot, this happens when the 5 bytes that pg8000 is expecting aren't available to be read from the socket. Usually this is because there's a network problem and a partial message is received. However, I suppose it could be bug in pg8000 caused by it not fully reading the previous message somehow.