Large revisions table size

Created on 19 December 2017, over 7 years ago
Updated 10 February 2025, about 2 months ago

Problem/Motivation

Drupal's node_revision__body table seems excessively large given the amount of content on the site.
The problem seems to be occurring across multiple sites at different scales (seemingly down to the age of the site and amount of content).

The table size is causing issues where Backup Migrate fails to backup the site correctly (even excluding some tables - cache_ etc).
If this is by design is there an agreed upon way to prevent this or work around it as purposefully ignoring/not backing up large portions of the site (relating to content Revisions) seems to go against the idea of Revisions and the ability to revert to older versions of content entirely.

Possibly linked to incorrect file 'Used In' reports whereby some files are reportedly used in tens of thousands of locations when in reality they are used just a handful of times.

Steps to reproduce

  1. Install Drupal core ( mine was ^8.0 at the creation of the website website)
  2. Set the "body" field of the default content type to "Long formatted text" , enable translation for this content type
  3. Create a content type and its translations , edit it a few times
  4. Install node revision delete module , set it to delete every revision
  5. Node revision delete nor any other means can detect that the "node_revision__body" table is filling up with outdated revisions
🐛 Bug report
Status

Active

Version

8.4 ⚰️

Component

node system

Created by

🇬🇧United Kingdom thecraighammond

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Hi ,

    I'm encountering the same issue on my website which was built on 8+ ( now 10.3) ,
    there's no need to hurry , my 'node_revision__body' table is less than 2Gigs

    I included steps to reproduce , these are assumed from my website's history and specs,

    I didnt reproduce them myself, this note is mainly a lead to the core problem,
    I may try once I've got more time or if my table size exponentially increases,

    Many thanks

  • The essential complaint here is that Core doesn't have a feature for managing revisions at scale. For an issue like this to be actionable it should be recreated as a feature request, and it would need a plan, a design and so on.

    @marelpup: Open a bug report for Node Revision Delete regarding translations. If that module gets to a certain stage of maturity it could be considered for integration into Core.

  • Fair enough , I remove the steps to reproduce part

Production build 0.71.5 2024