How to safely delete relation entity endpoint revisions (field_revision_endpoints) I would like to safely clean duplicate field revision data. This field_revision_(field_name) data not associated with nodes, but the relation entities.

I'm using the relation module. I'm bumping up against the problem outlined here: https://www.drupal.org/node/1530164

I have a lot of relations on my site linking different entities. My field_revision_endpoints table is growing quite large. The issue mentions as a work around, he uses a sql script to clear out the old revisions. I did some googling on info for deleting revisions, but I'll I have come up with is results relating to deleting node revisions.

Is it safe to simply delete rows out of field_revision_endpoints?
The answer is no. I eventually had to circle back to this question and come up with a solution myself. The relation_revision table contains the relation + revision ids that match up to the field_revision_endpoints rows. Simply deleting rows from relation_revision would orphan the revision field data in field_revision_endpoint.

After poking around the relations issue queue, I found this patch which adds support for the Entity API's revision deletion mechanism.

Instead of patching the relations module, I used hook_entity_info_alter to register my own 'revision deletion callback' on the relation entity, which I based on the above patch and node_revision_delete(). I can now use the Entity API's entity_revision_delete() to cleanly remove the excess revisions in batches.