上一页 1 ··· 39 40 41 42 43 44 45 46 47 ··· 104 下一页
摘要: 继续分析: /* Bootstrap template1 */ bootstrap_template1();展开:我这里读入的文件是:/home/pgsql/project/share/postgres.bki/* * run the BKI script in bootstrap mode to create template1 */static voidbootstrap_template1(void){ PG_CMD_DECL; char **line; char *talkargs = ""; char **bki_l... 阅读全文
posted @ 2013-07-08 15:44 健哥的数据花园 阅读(2028) 评论(0) 推荐(0)
摘要: 继续分析 /* Now create all the text config files */ setup_config();将其展开:实质就是,确定各种参数,分别写入 postgresql.conf 、pg_hba.conf、pg_indent.conf 文件。/* * set up all the config files */static voidsetup_config(void){ char **conflines; char repltok[100]; char path[MAXPGPATH]; fputs(... 阅读全文
posted @ 2013-07-08 13:45 健哥的数据花园 阅读(569) 评论(0) 推荐(0)
摘要: 继续分析: /* Top level PG_VERSION is checked by bootstrapper, so make it first */ write_version_file(NULL);就是建立了一个 PG_VERSION的文件在我系统里,可以看到:[pgsql@localhost DemoDir]$ cat PG_VERSION9.1[pgsql@localhost DemoDir]$ 接下来:我先看看 set_null_conf 函数 /* Select suitable configuration settings */ set_null_co... 阅读全文
posted @ 2013-07-08 13:29 健哥的数据花园 阅读(528) 评论(0) 推荐(0)
摘要: 继续分析,如下这段,因为条件不成立,被跳过: /* Create transaction log symlink, if required */ if (strcmp(xlog_dir, "") != 0) { fprintf(stderr,"In main function -----------------190\n"); char *linkloc; /* clean up xlog directory name, check it's absolute */ canonicalize_path(xlo... 阅读全文
posted @ 2013-07-08 09:16 健哥的数据花园 阅读(672) 评论(0) 推荐(0)
摘要: 继续:下面的是定义信号处理函数。 /* * 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, trapsig);#endif#ifdef SIGINT pqsignal(SIGINT, trapsig);#endif#ifdef SIGQUIT pqsignal(SIGQUIT, trapsig);#endi... 阅读全文
posted @ 2013-07-08 08:07 健哥的数据花园 阅读(632) 评论(0) 推荐(0)
摘要: [pgsql@localhost tst]$ cat sig01.c#include #include static voidtrapsigterm(int signum){ fprintf(stderr,"+++++++++++Got SIGTERM with %d\n",signum);}static voidtrapsigquit(int signum){ fprintf(stderr,"+++++++++++Got SIGQUIT with %d\n",signum);}int main(){ signal(SIGTERM,trapsigterm 阅读全文
posted @ 2013-07-07 19:48 健哥的数据花园 阅读(1780) 评论(0) 推荐(0)
摘要: 继续分析由于 我并未进行特殊的参数设置,所以(strlen(default_text_search_config) == 0) 成立。故 调用 default_text_search_config = find_matching_ts_config(lc_ctype)最后输出:The default text search configuration will be set to "english". if (strlen(default_text_search_config) == 0) { default_text_search_config = find_mat... 阅读全文
posted @ 2013-07-07 16:56 健哥的数据花园 阅读(599) 评论(0) 推荐(0)
摘要: 继续分析:由于我使用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 must also own the server process.\n\n"), effective_user); if (strcmp(lc_ctype, lc_collate) == 阅读全文
posted @ 2013-07-07 15:33 健哥的数据花园 阅读(430) 评论(0) 推荐(0)
摘要: 继续分析下面的是获取运行此程序的用户名称,主要还是为了防止在linux下用root来运行的情形。 effective_user = get_id(); if (strlen(username) == 0) username = effective_user;接下来,是准备好一写预备生成的文件的名称变量: set_input(&bki_file, "postgres.bki"); set_input(&desc_file, "postgres.description"); set_input(&shdesc_file, " 阅读全文
posted @ 2013-07-05 17:33 健哥的数据花园 阅读(768) 评论(0) 推荐(0)
摘要: 接前面,继续分析:putenv("TZ=GMT") 设置了时区信息。find_other_exec(argv[0], "postgres", PG_BACKEND_VERSIONSTR, backend_exec))就是要找到同目录下、同版本的postgres备用。initdb 执行后期,很多事情要依赖 postgres来处理的。 /* * Also ensure that TZ is set, so that we don't waste time identifying the * system timezone each of the ma 阅读全文
posted @ 2013-07-05 17:07 健哥的数据花园 阅读(869) 评论(0) 推荐(0)
上一页 1 ··· 39 40 41 42 43 44 45 46 47 ··· 104 下一页