hi,all hackers of postgres

    when postmaster start as a service . another two processes(collector & buffer ) start their work at the same time.

   I have read the code and I am wondering why we need two processes to do the work. I think one process can work as well. Are there something special you considered when you developed this feature?

  Best wishes!

  William






---------------------------------
Do You Yahoo!?
"IBM锟脚惠硷拷锟斤拷权锟斤拷谁锟斤拷锟斤拷谁锟饺得ｏ拷"
hi,all hackers of postgres
    when postmaster start as a service . another two processes(collector & buffer ) start their work at the same time.
   I have read the code and I am wondering why we need two processes to do the work. I think one process can work as well. Are there something special you considered when you developed this feature?
  Best wishes!
  William
Do You Yahoo!?
"IBM锟脚惠硷拷锟斤拷权锟斤拷谁锟斤拷锟斤拷谁锟饺得ｏ拷"
Wed, 25 Dec 2002 15:15:07 +0800 (CST)
"=?gb2312?q?William.Jiang?=" <jiang_sir@yahoo.com.cn>
why we need both the collector & buffer process 
=?gb2312?q?William.Jiang?= wrote:
> 
> hi,all hackers of postgres
> 
>     when postmaster start as a service . another two
>     processes(collector & buffer ) start their work at the same
>     time.
> 
>    I have read the code and I am wondering why we need two
>    processes to do the work. I think one process can work as
>    well. Are there something special you considered when you
>    developed this feature?

One collects statistics for the pg_stat tables, and the other does
checkpoints.  They are different functions.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Wed, 25 Dec 2002 11:58:05 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: why we need both the collector & buffer process
"=?gb2312?q?William.Jiang?=" <jiang_sir@yahoo.com.cn> writes:
>    I have read the code and I am wondering why we need two processes to do the work. I think one process can work as well. Are there something special you considered when you developed this feature?

It's a buffering issue.  Read the discussion in the pghackers archives
for details.

			regards, tom lane

Wed, 25 Dec 2002 16:56:53 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: why we need both the collector & buffer process 
Sorry to say that I cannot see which process is used to do checkpoints. I just see two main functions. 
 pgstat_recvbuffer(): this function is to receive the information from the postgres .this function is the main body of buffer process 
pgstat_min():this function is to do the job of  getting information from the buffer process and writing them to the file . and this is the main body of collector process. 
Any function else to do the checkpoint job? 
Best Wishes! 
William 
   Bruce Momjian <pgman@candle.pha.pa.us> wrote:
=?gb2312?q?William.Jiang?= wrote:
> 
> hi,all hackers of postgres
> 
> when postmaster start as a service . another two
> processes(collector & buffer ) start their work at the same
> time.
> 
> I have read the code and I am wondering why we need two
> processes to do the work. I think one process can work as
> well. Are there something special you considered when you
> developed this feature?

One collects statistics for the pg_stat tables, and the other does
checkpoints. They are different functions.

--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


---------------------------------
Do You Yahoo!?
"IBM锟脚惠硷拷锟斤拷权锟斤拷谁锟斤拷锟斤拷谁锟饺得ｏ拷"
Sorry to say that I cannot see which process is used to do checkpoints. I just see two main functions. 
 pgstat_recvbuffer(): this function is to receive the information from the postgres .this function is the main body of buffer process 
pgstat_min():this function is to do the job of  getting information from the buffer process and writing them to the file . and this is the main body of collector process. 
Any function else to do the checkpoint job? 
Best Wishes! 
William 
   Bruce Momjian <pgman@candle.pha.pa.us> wrote:
=?gb2312?q?William.Jiang?= wrote:> > hi,all hackers of postgres> > when postmaster start as a service . another two> processes(collector & buffer ) start their work at the same> time.> > I have read the code and I am wondering why we need two> processes to do the work. I think one process can work as> well. Are there something special you considered when you> developed this feature?One collects statistics for the pg_stat tables, and the other doescheckpoints. They are different functions.--Bruce Momjian | http://candle.pha.pa.uspgman@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road+ Christ can be your backup. | Newtown Square, Pennsylvania 19073Do You Yahoo!?
"IBM锟脚惠硷拷锟斤拷权锟斤拷谁锟斤拷锟斤拷谁锟饺得ｏ拷"
Thu, 26 Dec 2002 11:45:45 +0800 (CST)
"=?gb2312?q?William.Jiang?=" <jiang_sir@yahoo.com.cn>
Re: why we need both the collector & buffer process