Skip to content

Add the Firebird 5 service parameter constants for parallel workers and in-place ODS upgrade - #8

Open
mariuz wants to merge 2 commits into
MWASoftware:mainfrom
mariuz:add-parallel-workers-spb
Open

Add the Firebird 5 service parameter constants for parallel workers and in-place ODS upgrade#8
mariuz wants to merge 2 commits into
MWASoftware:mainfrom
mariuz:add-parallel-workers-spb

Conversation

@mariuz

@mariuz mariuz commented Jul 26, 2026

Copy link
Copy Markdown

gbak -par / gfix style parallel workers cannot be requested through this
library, because the service parameter block constants for it are missing.

Firebird's own firebird/impl/consts_pub.h has:

#define isc_spb_bkp_parallel_workers	 21
#define isc_spb_res_parallel_workers	isc_spb_bkp_parallel_workers

client/include/consts_pub.inc predates Firebird 5 and carries neither, so
there is no way to add the parameter to a backup or restore request.

This adds both, with the values taken from the header shipped with Firebird
6.0.0 rather than transcribed from documentation.

Verified

Against a live Firebird 6.0.0 server, by adding the parameter to a backup
request through TIBXBackupService (an ibx4lazarus change that depends on
this one):

  • with one worker the parameter is not sent, and the backup behaves as before
  • with four, isc_spb_bkp_parallel_workers = 4 is sent, the server accepts it,
    and the resulting file restores to a working database

The constants alone change no behaviour — nothing in this library sends them
yet — so this is safe on its own and is split out from the ibx4lazarus side
deliberately.

isc_spb_bkp_parallel_workers (21) and isc_spb_res_parallel_workers,
which is the same code, are what gbak -par passes to run a backup or
restore with several workers. They are in Firebird's own
firebird/impl/consts_pub.h but not in this copy, which predates
Firebird 5, so a caller cannot request parallel workers at all.

Values taken from the shipped Firebird 6.0.0 header. Verified by sending
the parameter through a backup service against a live Firebird 6 server:
the server accepts it, and the resulting file restores to a working
database.
isc_spb_rpr_upgrade_db (0x1000) is what gfix -upgrade passes to upgrade a
database's on-disk structure in place rather than by backup and restore.
It is in Firebird's own firebird/impl/consts_pub.h but not in this copy,
which predates Firebird 5.

Value taken from the shipped Firebird 6.0.0 header. Verified by sending
the option through a repair service against a live Firebird 6 server and
confirming the assembled parameter is 0x1000 and the request completes.
@mariuz mariuz changed the title Add the Firebird 5 parallel workers service parameter constants Add the Firebird 5 service parameter constants for parallel workers and in-place ODS upgrade Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant