上一页 1 ··· 61 62 63 64 65 66 67 68 69 ··· 104 下一页
摘要: 开始[作者:技术者高健@博客园 mail:luckyjackgao@gmail.com][root@localhost test]# cat teststr.c#include<stdio.h>#include<stdlib.h>int main(){ struct person { char name[8]; int age; char sex[4]; char depart[20]; }; struct person student; struct person class[]= { { ... 阅读全文
posted @ 2012-11-02 08:57 健哥的数据花园 阅读(186) 评论(0) 推荐(0)
摘要: 开始首先log 相关的内容如下:#------------------------------------------------------------------------------# ERROR REPORTING AND LOGGING#------------------------------------------------------------------------------# - Where to Log -log_destination = 'csvlog' # Valid values are combinations of ... 阅读全文
posted @ 2012-11-01 16:40 健哥的数据花园 阅读(366) 评论(0) 推荐(0)
摘要: 开始bufmgr.c 中,对strategy_passes 与 next_passes 有判断处理的逻辑, if ((int32) (next_passes - strategy_passes) > 0) { /* we're one pass ahead of the strategy point */ bufs_to_lap = strategy_buf_id - next_to_clean;#ifdef BGW_DEBUG elog(DEBUG2, "bgwriter ahead: bgw %u... 阅读全文
posted @ 2012-11-01 10:05 健哥的数据花园 阅读(443) 评论(0) 推荐(0)
摘要: [作者:技术者高健@博客园 mail:luckyjackgao@gmail.com]Postmaster 作为父进程,要对很多子进程进行监控,当遇到各种信号的时候,也要适当地进行传达。/* * pmdie -- signal handler for processing various postmaster signals. */ static void ... 阅读全文
posted @ 2012-10-31 16:15 健哥的数据花园 阅读(573) 评论(0) 推荐(0)
摘要: 上代码学习网络上的文章,http://blog.sina.com.cn/s/blog_602a39250100xfxx.html 非常感谢但是和我的环境有点不一样,我简单改了改程序: [root@localhost wait]# cat waittest.c#include <sys/types.h>#include <sys/wait.h>#include <unistd.h>#include <stdio.h>#include<stdlib.h>main(){ pid_t pc, pr; pc=fork(); if(pc<0 阅读全文
posted @ 2012-10-31 13:29 健哥的数据花园 阅读(189) 评论(0) 推荐(0)
摘要: 如果 我直接 kill 掉 bgwriter 的进程,会发生什么呢?[root@localhost postgresql-9.2.0]# ps -ef|grep postroot 2928 2897 0 10:34 pts/1 00:00:00 su - postgrespostgres 2929 2928 0 10:34 pts/1 00:00:00 -bashpostgres 3101 2929 0 11:09 pts/1 00:00:00 ./postgres -D /usr/local/pgsql/datapostgres 3103 31... 阅读全文
posted @ 2012-10-31 11:16 健哥的数据花园 阅读(288) 评论(0) 推荐(0)
摘要: bgwriter.c 的代码中有如下部分: pqsignal(SIGQUIT, bg_quickdie); /* hard crash time */[作者:技术者高健@博客园 mail:luckyjackgao@gmail.com]还有:/* * bg_quickdie() occurs when signalled SIGQUIT by the postmaster. * * Some backend has bought the farm, * so we need to stop what we're doing and exit. */static voidbg_... 阅读全文
posted @ 2012-10-31 11:07 健哥的数据花园 阅读(530) 评论(0) 推荐(0)
摘要: 上例子 [作者:技术者高健@博客园 mail:luckyjackgao@gmail.com][root@localhost test]# cat exem.c#include <unistd.h>#include <stdio.h>#include <stdlib.h>int main(){ pid_t mpid; mpid=fork(); if( mpid<0) { } else if (mpid==0) { //the child itself ... 阅读全文
posted @ 2012-10-31 09:39 健哥的数据花园 阅读(197) 评论(0) 推荐(0)
摘要: 我用例子来说明:只是一个模拟,我自己做的 假的 bgwriter.c[root@localhost test]# cat bgwriter.c#include<stdio.h>#include<stdlib.h>#include<signal.h>#include "bgwriter.h"#include "guc.h"//some conditions make it change, eg:signalint BgWriterDelay=100;void sighandler(int sig);int main(){ 阅读全文
posted @ 2012-10-31 08:45 健哥的数据花园 阅读(301) 评论(0) 推荐(0)
摘要: /usr/include/bits/types.h:typedef int __pid_t;/usr/include/unistd.h:typedef __pid_t pid_t; 阅读全文
posted @ 2012-10-31 08:39 健哥的数据花园 阅读(333) 评论(0) 推荐(0)
上一页 1 ··· 61 62 63 64 65 66 67 68 69 ··· 104 下一页