Le 11/08/2010 01:14, Tatsuo Ishii a écrit : >>>> I had to fix my patch because I didn't take care the backend id. Right >>>> now, it only looks at backend 0. Not sure this is a sensible thing to >>>> do, but it would be easy to fix if it's not. >>> >>> Can you be more specific? >>> >> >> Sure. In the function processes_reporting() (file >> pool_process_reporting.c), there is this code: >> >> for (pool = 0; pool < pool_config->max_pool; pool++) >> { >> poolBE = pool*MAX_NUM_BACKENDS; >> >> pool is multiplied by MAX_NUM_BACKENDS to get the right pool id for the >> backend 0. If I didn't use this operation, I would access pool of >> inexisting backends. > > poolBE = pool*MAX_NUM_BACKENDS points to info for backend 0. > poolBE+1 points to info for backend 1. So you would want to have inner > loop something like: > > for (i = 0; i< NUM_BACKENDS;i++) > poolBE = pool*MAX_NUM_BACKENDS + i; > > Or you could use pool_coninfo_pid(proc_id, pool, i) to get the pointer > to ConnectionInfo structure. See around line 474 in pcp_child.c for > example.
Thanks. I commited a change to take care of the backend ID. Be careful that I changed the documentation to talk about the new column, you'll have to update the japanese one. -- Guillaume http://www.postgresql.fr http://dalibo.com _______________________________________________ Pgpool-hackers mailing list Pgpool-hackers@pgfoundry.org http://pgfoundry.org/mailman/listinfo/pgpool-hackers