firebird icon indicating copy to clipboard operation
firebird copied to clipboard

Fix #7269: Restore deferred primary key indexes

Open GeF0rs opened this issue 1 year ago • 5 comments

Fixed database recovery aborting on the first failure of the first problematic deferred index gbak (#7269)

I took the database to check from #7269 Previously, recovery was interrupted when trying to activate PK_A3. image

Now the recovery continues, which allows you to smoothly restore PK_A2. image

The foreign key, however, is still not restored because requires an active primary key, but this still allows you to greatly reduce the number of non-activated indexes (on our industrial base, 3000+ indexes were not activated due to one non-activated one)

GeF0rs avatar Jul 03 '24 12:07 GeF0rs

?

GeF0rs avatar Aug 09 '24 12:08 GeF0rs

What about extracting code, copied from "creating FK" block below, into separate routine to avoid duplication ?

hvlad avatar Aug 09 '24 12:08 hvlad

I moved the activation of indexes into a separate function, please take a look

GeF0rs avatar Sep 02 '24 08:09 GeF0rs

?

GeF0rs avatar Sep 24 '24 13:09 GeF0rs

Please, be patient and wait a bit, I'll return to it when time permits.

hvlad avatar Sep 29 '24 21:09 hvlad

I will add some additional fix after merge.

hvlad avatar Oct 24 '24 11:10 hvlad

JFYI: You can create a pull request to a pull request improving it before merging.

aafemt avatar Oct 24 '24 11:10 aafemt

JFYI: You can create a pull request to a pull request improving it before merging.

Yes. But it is too much bureaucracy and not needed in this case.

hvlad avatar Oct 24 '24 11:10 hvlad

Thank you for accepting my fix. I have studied your additions and taken them into account for future use.

GeF0rs avatar Oct 25 '24 06:10 GeF0rs