Sighery commented on issue #32657:
URL: https://github.com/apache/airflow/issues/32657#issuecomment-1638962775

   > Do you refer to 
[airflow/models/connection.py](https://github.com/apache/airflow/blob/main/airflow/models/connection.py#L94)
 ? I am not sure if this can be generally be extended as there might be 
limitations in the supported DB engines about maximum tuple sizes supported. 
But I am not 100% sure.
   
   Yep, exactly
   
   > MS SQL can extend DB Pages, MySQL is limited to maximum 64KB but the data 
storage is based on the DB block size. For Postgres I see a hard limit 
following the documentation in 
https://www.postgresql.org/docs/current/limits.html: `The maximum number of 
columns for a table is further reduced as the tuple being stored must fit in a 
single 8192-byte heap page.`
   > 
   > So a login length of 1000 might still work but bumping the limit to 5000 
chars (don't forget there is Unicode!) might produce DB errors.
   
   I see what you mean, `password` is already 5000, plus another 5000 of 
`extra`. Assuming worst case scenario of 4 bytes per Unicode character, that'd 
be 20KB for each of those two columns. So 40 of 64. That being said, on the 
PostgreSQL documentation you link, on the next line, they mention:
   
   > Variable-length fields of types such as text, varchar, and char can have 
their values stored out of line in the table's TOAST table when the values are 
large enough to require it. Only an 18-byte pointer must remain inside the 
tuple in the table's heap. For shorter length variable-length fields, either a 
4-byte or 1-byte field header is used and the value is stored inside the heap 
tuple.
   
   So potentially variable length columns don't count against the 64KB limit?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to