- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitc4a8812
committed
Use just one standalone-backend session for initdb's post-bootstrap steps.
Previously, each subroutine in initdb fired up its own standalone backendsession. Over time we'd grown as many as fifteen of these sessions,and the cumulative startup and shutdown work for them was getting prettynoticeable. Combining things so that all these steps share a singlebackend session cuts a good 10% off the total runtime of initdb, moreif you're not fsync'ing.The main stumbling block to doing this before was that some of the sessionswere run with -j and some not. The improved definition of -j modeimplemented by my previous commit makes it possible to fix that by runningall the post-bootstrap steps with -j; we just have to use double instead ofsingle newlines to end command strings. (This is only absolutely necessaryaround the VACUUM and CREATE DATABASE steps, since those can't be run in atransaction block. But it seems best to make them all use double newlinesso that the commands remain separate for error-reporting purposes.)A minor disadvantage is that since initdb can't tell how much of itsoutput the backend has executed, we can no longer have the per-stepprogress reporting initdb used to print. But things are fast enoughnowadays that that's not really all that useful anyway.In passing, add more const decoration to some of the static arrays ininitdb.c.1 parent66d947b commitc4a8812
File tree
3 files changed
+138
-352
lines changed- src
- backend/utils/mb/conversion_procs
- bin/initdb
- tools/msvc
3 files changed
+138
-352
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
181 | 181 |
| |
182 | 182 |
| |
183 | 183 |
| |
| 184 | + | |
184 | 185 |
| |
185 | 186 |
| |
186 | 187 |
| |
|
0 commit comments
Comments
(0)