In Postgresql, is it possible to change the maximum number of columns a table can have?
There's no run-time configuration option that will let you have more than about 1600 columns in a table.  You can redefine values and compile PostgreSQL from source. That might turn out to be harder than it sounds in your case.

A quick look at the source code seems to say the number of columns depends on the values of MaxTupleAttributeNumber and MaxHeapAttributeNumber. These are defined in src/include/access/htup_details.h. 

So you might be able to increase the number of columns by 


redefining those values, while 
paying close attention to how their current values have been determined, then
recompiling.


Details are in source code comments.  Search for htup_details.h in the search dialog there. 

I suggest you try building from source without making any changes first. After you can do that well, then try making the changes above. Consider digging around in the source code to determine whether there are any other dependencies that are not as well documented as these two.