When deleting old entries for a feed, order entries according to their published, created_at and id fields, in that order of importance.

This means that if two entries share the same published value, the one with the oldest created_at value is considered the oldest entry. If two entries share the same published and created_at values, the one with the smallest id is considered the oldest. It is guaranteed that different entries will have different id values. Older entries are deleted before newer entries, until the feed has the maximum number of entries allowed.