**Describe the bug**
In certain circumstances it can happen that backup *.tail and *.theap files were present and remained in the BACKUP directory.  During a (low level) commit, these files should have been removed as part of the commit process, but they weren't.  This does not affect a running server, but it does affect a restart (for whatever reason) of the server.

**To Reproduce**
In order to reproduce this, you probably need to set the VM size to some lower value, create tables with some, but not too much, content, perhaps we need a WAL rotation at this point, then add data to the tables.  This latter part needs to be done with memory somewhat tight so that the bats get flushed to disk (including creation of the backup).  A subsequent low level commit will then not remove those backup files.

**Software versions**
 - Dec2023-SP2

files remain in backup causing problems at restart
This is a GitHub Issue
repo:MonetDB
owner:MonetDB
Title : files remain in backup causing problems at restart
Issue date:

--- start body ---
**Describe the bug**
In certain circumstances it can happen that backup *.tail and *.theap files were present and remained in the BACKUP directory.  During a (low level) commit, these files should have been removed as part of the commit process, but they weren't.  This does not affect a running server, but it does affect a restart (for whatever reason) of the server.

**To Reproduce**
In order to reproduce this, you probably need to set the VM size to some lower value, create tables with some, but not too much, content, perhaps we need a WAL rotation at this point, then add data to the tables.  This latter part needs to be done with memory somewhat tight so that the bats get flushed to disk (including creation of the backup).  A subsequent low level commit will then not remove those backup files.

**Software versions**
 - Dec2023-SP2

--- end body ---
