packet length exploit
any connection can send any arbitrary length, and because of the way pggat currently handles packets, pggat will allocate that much. This means you can send a packet header requesting a 4gb packet and pggat will try to allocate it, run out of memory, and crash horribly.
this happens especially common when you try to connect to pggat over http, because pggat will read garbage and try to allocate many bytes.
packets should not be byte arrays. They should be io.Readers that read up to the end of the packet then EOF. This will also reduce memory usage and reduce the number of copies from 2 -> 1