postgres 之 initdb 源码分析 七
来源:互联网 发布:mba智库百科 知乎 编辑:程序博客网 时间:2024/06/05 03:51
2.17 函数 setup_text_search
voidsetup_text_search(void){if (strlen(default_text_search_config) == 0){default_text_search_config = find_matching_ts_config(lc_ctype);if (default_text_search_config == NULL){printf(_("%s: could not find suitable text search configuration for locale \"%s\"\n"), progname, lc_ctype);default_text_search_config = "simple";}}else{const char *checkmatch = find_matching_ts_config(lc_ctype);if (checkmatch == NULL){printf(_("%s: warning: suitable text search configuration for locale \"%s\" is unknown\n"), progname, lc_ctype);}else if (strcmp(checkmatch, default_text_search_config) != 0){printf(_("%s: warning: specified text search configuration \"%s\" might not match locale \"%s\"\n"), progname, default_text_search_config, lc_ctype);}}printf(_("The default text search configuration will be set to \"%s\".\n"), default_text_search_config);}
2.17.1 initdb 第三行输出
initdb: could not find suitable text search configuration for locale "zh_CN.UTF-8"The default text search configuration will be set to "simple".
2.18 initdb 是否指定-k
if (data_checksums)printf(_("Data page checksums are enabled.\n"));elseprintf(_("Data page checksums are disabled.\n"));
-k, --data-checksums use data page checksums
2.18.1 initdb第四行输出
Data page checksums are disabled.
2.19 函数initialize_data_directory()
voidinitialize_data_directory(void){inti;setup_signals();umask(S_IRWXG | S_IRWXO);create_data_directory();create_xlog_symlink();/* Create required subdirectories */printf(_("creating subdirectories ... "));fflush(stdout);for (i = 0; i < (sizeof(subdirs) / sizeof(char *)); i++){if (!mkdatadir(subdirs[i]))exit_nicely();}check_ok();/* Top level PG_VERSION is checked by bootstrapper, so make it first */write_version_file(NULL);/* Select suitable configuration settings */set_null_conf();test_config_settings();/* Now create all the text config files */setup_config();/* Bootstrap template1 */bootstrap_template1();/* * Make the per-database PG_VERSION for template1 only after init'ing it */write_version_file("base/1");/* Create the stuff we don't need to use bootstrap mode for */setup_auth();if (pwprompt || pwfilename)get_set_pwd();setup_depend();setup_sysviews();setup_description();setup_collation();setup_conversion();setup_dictionary();setup_privileges();setup_schema();load_plpgsql();vacuum_db();make_template0();make_postgres();}
2.19.1 initdb 第五行输出
creating directory ./data ... okcreating subdirectories ... okselecting default max_connections ... 100selecting default shared_buffers ... 128MBcreating configuration files ... okcreating template1 database in ./data/base/1 ... okinitializing pg_authid ... okinitializing dependencies ... okcreating system views ... okloading system objects' descriptions ... okcreating collations ... okcreating conversions ... okcreating dictionaries ... oksetting privileges on built-in objects ... okcreating information schema ... okloading PL/pgSQL server-side language ... okvacuuming database template1 ... okcopying template1 to template0 ... okcopying template1 to postgres ... ok
2.19.2 initdb 第六行输出
执行函数perform_fsync()
syncing data to disk ... ok
2.19.3 initdb第七行输出
若认证方式为trust,则initdb输出
WARNING: enabling "trust" authentication for local connectionsYou can change this by editing pg_hba.conf or using the option -A, or--auth-local and --auth-host, the next time you run initdb.
2.19.3 initdb第八行输出
printf(_("\nSuccess. You can now start the database server using:\n\n" " %s%s%spostgres%s -D %s%s%s\n" "or\n" " %s%s%spg_ctl%s -D %s%s%s -l logfile start\n\n"), QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH, QUOTE_PATH, pgdata_native, QUOTE_PATH, QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH, QUOTE_PATH, pgdata_native, QUOTE_PATH);
Success. You can now start the database server using: postgres -D ./dataor pg_ctl -D ./data -l logfile start
--initdb分析结束
0 0
- postgres 之 initdb 源码分析 七
- postgres 之 initdb 源码分析 一
- postgres 之 initdb 源码分析 三
- postgres 之 initdb 源码分析 二
- postgres 之 initdb 源码分析 四
- postgres 之 initdb 源码分析 五
- postgres 之 initdb 源码分析 六
- postgres 之 initdb 源码分析 八
- postgres创建数据库(initdb)
- postgres 源码分析 之 insert (1)
- postgres 源码解读之 toast
- 每天一点点-ext源码分析之七
- OpenStack Cinder源码分析之七
- netty源码分析 之七 transport(Unsafe)
- elasticsearch源码分析之discovery(七)
- elasticsearch源码分析之discovery(七)
- kubenetes源码分析之DNS(七)
- LevelDB源码分析之七:Random
- 经典算法大全一
- poj1466--Girls and Boys
- 上拉电阻的作用【图文】
- 实现斐波那契数列的几种方法
- navicate:navicate.exe 无法找到入口
- postgres 之 initdb 源码分析 七
- tomcat启动startup.bat一闪而过
- 经典算法大全二
- abbrev 单词缩写
- SQL Server 2008使用链接服务器访问Oracle 10g,查询速度超级慢的解决方案
- setTimeout() 实现程序每隔一段时间自动执行
- c# listview 排序
- zoj 1109 Language of FatMouse
- RMAN全备份脚本