Reduced generation of dead tuples in postgres.
Background: In the old version, the fields latest and live
revisions were updated always via two separate dmlDML statements.
Every update causes in PostgreSQL (tested to pg 9.6) one more dead
tuple, such that on busy systems, we see 30k + dead tuples per
hour. These dead tuples in turn cause more auto vacuum operations
and can lead to abandoned query plans.
This change can reduce the number of dead tuples on cr_items into
half, by allowing both fields to be set in one operation (namely
content_item__set_live_revision). This function has an optional 4th
argument that can cause this optimization. For legacy applications,
nothing changes.
Btw: since all commonly used applications use the live revision, the
fallback of the latest_revision is unused. One can consider to
remove the cr_revision_latest_tr, at least on on certain
installations.
bump revision to 5.1.9d23