Utility method to call the serialization and then set the PgSQL varsize header appropriately with the serialized size.