Indefinitely growing homepage.sr_index_docs table and forgotten search nodes

The last weeks I had twice the issue of a huge homepage database with HCL Connections. Both systems weren’t installed by me, but I reviewed them. So I know this issues quite well since I faced it the first time years ago. This always happens when you migrate Connections environments side-by-side, and you forget to remove the old search nodes. sr_index_docs is used to make all search nodes indexing newly upload files. When each search node has indexed the file, the entry gets removed from the database. As the old nodes are no longer running, they can’t index, and so these entries never get deleted. In larger environments the table grows to millions of documents and the database size grows from some GB into the hundreds of GB. You see this growth mainly during database backup, or when you want to move the data to a new machine. So often nobody recognizes the huge waste of space.
This is a companion discussion topic for the original entry at https://stoeps.de/posts/2025/growing_srindexdocs_table/