I have a table with a TEXT field not null that contains logs.
After updating all records older than X to an empty string ``, when I compare select pg_size_pretty(pg_relation_size('my_table')); before and after the update, the table size actually increased a bit.
PS: the table have 880k rows and 511k rows were updated to "". Also, this field isn't part of index.
NULLinstead, or even try deleting them? You'll have to change your schema definition.NULLshould be better or maybe even creating a separate table only to hold this column and making aFK(then I could delete these instances). But shouldn't updating to an empty string reduce size as well?