文章 2019-01-04 来自:开发者社区

PostgreSQL 11 新特性解读 : Initdb/Pg_resetwal支持修改WAL文件大小

PostgreSQL 11 版本的一个重要调整是支持 initdb 和 pg_resetwal 修改 WAL 文件大小,而 11 版本之前只能在编译安装 PostgreSQL 时设置 WAL 文件大小。这一特性能够方便 WAL 文件的管理。 Release 的说明 Allow the WAL file size to be set via initdb (Beena Emerson)Previo....

文章 2017-12-27 来自:开发者社区

PostgreSQL的 initdb 源代码分析之一

开始第一段: int main(int argc, char *argv[]) { /* * options with no short version return a low integer, the rest return * their short version value */ static struct option long_option...

文章 2017-12-27 来自:开发者社区

PostgreSQL的 initdb 源代码分析之四

继续分析: if (pwprompt && pwfilename) { fprintf(stderr, _("%s: password prompt and password file cannot be specified together\n"), progname); exit(1); } if (aut...

文章 2017-12-21 来自:开发者社区

PostgreSQL的 initdb 源代码分析之七

继续分析:由于我使用initdb的时候,没有指定 locale,所以会使用OS的缺省locale,这里是 en_US.UTF-8 printf(_("The files belonging to this database system will be owned " "by user \"%s\".\n" "This user m...

文章 2017-12-19 来自:开发者社区

PostgreSQL的 initdb 源代码分析之二

继续分析 下面这一段,当 initdb --version 或者  initdb --help 才有意义。 if (argc > 1) { if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0) { usage(progname); ...

文章 2017-12-19 来自:开发者社区

PostgreSQL的 initdb 源代码分析之三

继续 其实接前面,整个while循环是这样的: while ((c = getopt_long(argc, argv, "dD:E:L:nU:WA:sT:X:", long_options, &option_index)) != -1) { switch (c) { ...... ...

文章 2017-12-19 来自:开发者社区

PostgreSQL的initdb 源代码分析之五

接前面,继续分析: putenv("TZ=GMT") 设置了时区信息。 find_other_exec(argv[0], "postgres", PG_BACKEND_VERSIONSTR, backend_exec)) 就是要找到同目录下、同版本的postgres备用。initdb 执行后期,很多事情要依赖 postgres来处理的。 /* * Also ensure t...

文章 2017-12-19 来自:开发者社区

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...

文章 2017-12-19 来自:开发者社区

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...

文章 2017-12-19 来自:开发者社区

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...

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

产品推荐

数据库

数据库领域前沿技术分享与交流

+关注
相关镜像
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等