• Tomas Vondra's avatar
    Reduce overhead of pg_mcv_list (de)serialization · c50b3158
    Tomas Vondra authored
    Commit ea4e1c0e resolved issues with memory alignment in serialized
    pg_mcv_list values, but it required copying data to/from the varlena
    buffer during serialization and deserialization.  As the MCV lits may
    be fairly large, the overhead (memory consumption, CPU usage) can get
    rather significant too.
    
    This change tweaks the serialization format so that the alignment is
    correct with respect to the varlena value, and so the parts may be
    accessed directly without copying the data.
    
    Catversion bump, as it affects existing pg_statistic_ext data.
    c50b3158
mcv.c 50.3 KB