[Pgpool-hackers] pcp_proc_info not working in HEAD
Tatsuo Ishii
ishii at sraoss.co.jp
Sun Jul 25 02:14:41 UTC 2010
> I was working on my patch when I noticed that pcp_proc_info doesn't work
> anymore on HEAD. I mean on a vanilla HEAD (ie, without any patchs, clear
> as it could come from CVS).
>
> See this example:
>
> guillaume at laptop:/opt/pgpool-head$ ps -ef | grep pgpool
> 1000 11350 13641 0 17:25 pts/1 00:00:00 bin/pgpool -f
> etc/pgpool.conf -n
> 1000 11351 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11352 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11353 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11354 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11355 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11356 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11357 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11358 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11359 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11360 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11361 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11362 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11363 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11364 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11365 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11366 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11367 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11368 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11369 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11370 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11371 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11372 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11373 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11374 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11375 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11376 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11377 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11378 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11379 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11380 11350 0 17:25 pts/1 00:00:00 pgpool: wait for
> connection request
> 1000 11381 11350 0 17:25 pts/1 00:00:00 pgpool: guillaume
> postgres [local] idle
> 1000 11382 11350 0 17:25 pts/1 00:00:00 pgpool: guillaume b1
> 127.0.0.1(37793) idle
> 1000 11383 11350 0 17:25 pts/1 00:00:00 pgpool: PCP: wait for
> connection request
> 1000 11384 11350 0 17:25 pts/1 00:00:00 pgpool: worker process
>
> 1000 11728 14734 0 17:41 pts/2 00:00:00 grep --color=auto pgpool
>
> So, I have two psql connected to PostgreSQL via pgpool. Let's try to get
> info from pid 11381 and 11382:
>
> guillaume at laptop:/opt/pgpool-head$ bin/pcp_proc_info 10 localhost 9898
> postgres toto 11382
> guillaume at laptop:/opt/pgpool-head$ bin/pcp_proc_info 10 localhost 9898
> postgres toto 11381
>
> Nothing at all. That's already weird. If I look at all processes, I
> finally found the pid:
>
> guillaume at laptop:/opt/pgpool-head$ bin/pcp_proc_info 10 localhost 9898
> postgres toto 11351
> b1 guillaume 1279985121 1279985142 3 0 1
>
> But if I look at my ps output, 11351 is waiting for a connection.
>
> I tried to figure what was going one, but failed. If anyone has any
> ideas, I'm open to hear them :)
>
> PS: tried on V2_3_STABLE, works great.
I suspect that in your build pgpool is not linked against shared
memory staffs. The info pcp_proc_info looking into is placed on the
shared_memory handled by pool_config.l. What does nm pool_config.o
show? Mine is like below, which contains the reference to
pool_shared_memory_create. How about yours?
]$ nm pool_config.o
00001154 b Lineno
U _IO_getc
U __errno_location
U atof
U atoi
U atol
00005a45 t clear_host_entry
U clearerr
00000004 d default_reset_query_list
0000593a T eval_logical
U exit
00005700 t extract_string
00005980 t extract_string_tokens
U fclose
U ferror
U fopen
U fprintf
U fread
U free
U fwrite
U gethostname
U getpid
00000b95 t input
00000040 b localhostname.0
U malloc
U memset
U mypid
00005765 t parse_bool_with_len
00000004 C pool_config
U pool_debug
U pool_error
00001af1 T pool_get_config
0000165c T pool_init_config
U pool_log
U pool_memset_system_db_info
U pool_query_cache_table_exists
U pool_shared_memory_create <-- this one
[snip]
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp
More information about the Pgpool-hackers
mailing list