Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc4a8812

Browse files
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

3 files changed

+138
-352
lines changed

‎src/backend/utils/mb/conversion_procs/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ $(SQLSCRIPT): Makefile
181181
echo"DROP CONVERSION pg_catalog.$$name;";\
182182
echo"CREATE DEFAULT CONVERSION pg_catalog.$$name FOR '$$se' TO '$$de' FROM$$func;";\
183183
echo"COMMENT ON CONVERSION pg_catalog.$$name IS 'conversion for$$se to$$de';";\
184+
echo;\
184185
done>$@
185186

186187
$(REGRESSION_SCRIPT): Makefile

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp