firebird icon indicating copy to clipboard operation
firebird copied to clipboard

Add replication journal cleanup when drop database

Open XaBbl4 opened this issue 6 months ago • 0 comments

Problem: when deleting a DB, log segment files remain, which break replication in the future

First fix - when deleting a DB using DBMS query (drop database), add deleting segments

  1. There is a DB with replication, create a backup
  2. One of two options: 2.1. Execute the drop database command 2.2. Restore via gbak with the -recreate_database overwrite or -replace_database option, without deleting the DB and without clearing the journal directory
  3. Old segments will be deleted as unnecessary

Second fix - add a unique GUID of the DB to the segment filename pattern

  1. There is a DB with replication, create a backup
  2. Delete the DB file via the file system
  3. Restore via gbak, without clearing the journal directory
  4. Old segments will remain in the file system, but will not interfere with replication, since the names of the new ones will be different

XaBbl4 avatar Jun 25 '25 06:06 XaBbl4