文章 2022-02-16 来自:开发者社区

PostgreSQL的 initdb 源代码分析之八

继续分析 由于 我并未进行特殊的参数设置,所以 (strlen(default_text_search_config) == 0) 成立。 故 调用   default_text_search_config = find_matching_ts_config(lc_ctype) 最后输出:The default text search configuration wi...

文章 2022-02-16 来自:开发者社区

PostgreSQL的 initdb 源代码分析之九

继续:下面的是定义信号处理函数。 /* * now we are starting to do real work, trap signals so we can clean up */ /* some of these are not valid on Windows */ #ifdef SIGHUP pqsignal(SIGHUP, trap...

文章 2022-02-16 来自:开发者社区

PostgreSQL的 initdb 源代码分析之十

继续分析, 如下这段,因为条件不成立,被跳过: /* Create transaction log symlink, if required */ if (strcmp(xlog_dir, "") != 0) { fprintf(stderr,"In main function -----------------190\n"); c...

文章 2022-02-16 来自:开发者社区

PostgreSQL的 initdb 源代码分析之十一

继续分析: /* Top level PG_VERSION is checked by bootstrapper, so make it first */ write_version_file(NULL); 就是建立了一个 PG_VERSION的文件 在我系统里,可以看到: [pgsql@localhost DemoDir]$ cat PG_VERSION 9.1 [pgsql@...

文章 2022-02-16 来自:开发者社区

PostgreSQL的 initdb 源代码分析之十三

继续分析: /* Bootstrap template1 */ bootstrap_template1(); 展开: 我这里读入的文件是:/home/pgsql/project/share/postgres.bki  /* * run the BKI script in bootstrap mode to create template1 */ static void b...

文章 2022-02-16 来自:开发者社区

PostgreSQL的 initdb 源代码分析之十二

继续分析 /* Now create all the text config files */ setup_config(); 将其展开: 实质就是,确定各种参数,分别写入 postgresql.conf 、pg_hba.conf、pg_indent.conf 文件。  /* * set up all the config files */ static void set...

文章 2022-02-16 来自:开发者社区

PostgreSQL的 initdb 源代码分析之十四

继续分析: /* * Make the per-database PG_VERSION for template1 only after init'ing it */ write_version_file("base/1"); 就是在base/1目录下,生成一个  PG_VERSION 文件。 [pgsql@localhost 1]$ pwd /home/pg...

文章 2022-02-16 来自:开发者社区

PostgreSQL的 initdb 源代码分析之十五

继续分析: if (pwprompt || pwfilename) get_set_pwd(); 由于我启动initdb的时候,没有设置口令相关的选项,故此略过。 接下来: setup_depend(); 展开: 就是一组sql问,送给 postgres 执行: cmd的值是:  "/home/pgsql/project/bin/postgres" --singl...

文章 2022-02-16 来自:开发者社区

PostgreSQL的 initdb 源代码分析之十六

继续分析 setup_description(); 展开后: 就是要把 share/postgres.description 文件的内容读入到 pg_description 和 pg_shdescription /* * load description data */ static void setup_description(void) { PG_CMD_DECL; ...

文章 2022-02-16 来自:开发者社区

PostgreSQL的 initdb 源代码分析之十七

继续分析: setup_collation()  展开: /* * populate pg_collation */ static void setup_collation(void) { #if defined(HAVE_LOCALE_T) && !defined(WIN32) int i; FILE *loca...

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

产品推荐

相关镜像