Skip to content

property_device value field length issue and usage of column type TEXT

i had a specific issue with the tango database and the device server: https://github.com/scadawire/tango-canopen/ This device server expects the full canopen eds file content in one property value. Canopen eds files can get quite long and while testing with one eds file this did yield an issue with the tango database, since the column "value" in the "property_device" table is of "TEXT" type.

problem resolved with: ALTER TABLE tango.property_device MODIFY `value` LONGTEXT NULL;

From my experience "TEXT" type database columns are a quite unfortunate choice for columns which may hold a "longer" string, since columns of "TEXT" type are only 64KB in size. In comparison the "LONGTEXT" column type can hold up to 4GB of data and comes with only 2-bytes per row overhead compared to text columns and otherwise same runtime behaviour/performance.

suggestions: a: migrate the tango.property_device value field from TEXT TO LONGTEXT b: migrate all TEXT columns to LONGTEXT columns

Let me know what you think. I can also help in writing the needed migration.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information