Hi, I have a Master of Engineering degree and a lot of experience with Postgres and importing datasets.
One question, are you getting the "ERROR: row is too big: size xxxxxx maximum size 8160" error or something similar?
There are alternatives to the solution but we should discuss it further. For instance, it can depend on the method for insertion, the columns type and size, and the restrictions of the problem, whether the schema can be changed.
Recompiling Postgres might be the most direct solution, but since you are using Amazon, that's not an option.
So, how about we chat and see what can be done?
Regards.