Are "column names" optimized in PostgreSQL JSONB jsonb_agg(*)?
It is not optimized.  Each column name, as a JSON key, is sent in full, multiple times.  You could try connecting over SSL and turning on compression, but for security reasons that is disabled by default in most systems, and is getting increasingly difficult to turn on.


  If the column names are really reapeated once per row, we would spend more bandwith for them, then for the values.


If that is the highest cost you have to pay for gratuitous use of JSON, then consider yourself lucky.