TooManyColumns unhandled error when creating fields
When creating new table fields in FieldHandler.create_field
we have a check about a maximum number of Baserow fields as follows that uses env variable MAX_FIELD_LIMIT
:
num_fields = table.field_set.count()
if (num_fields + 1) > settings.MAX_FIELD_LIMIT:
raise MaxFieldLimitExceeded(
f"Fields count exceeds the limit of {settings.MAX_FIELD_LIMIT}"
)
This check is insufficient as we create other background PostgreSQL columns on behalf of the user.
It seems like some users run into this problem according to Sentry:
https://baserow.sentry.io/issues/5288334504/?project=5203159 https://baserow.sentry.io/issues/5278499780
The same problem in FieldHandler().duplicate_field
: https://baserow.sentry.io/issues/5302790825/?project=5203159
Edited by Petr Stribny