[pgpool-hackers: 203] Re: Ideas for code cleanup

Tatsuo Ishii ishii at postgresql.org
Fri Apr 12 00:32:10 JST 2013


> On Wed, Apr 10, 2013 at 10:18:34PM -0400, Bruce Momjian wrote:
>> On Thu, Apr 11, 2013 at 10:42:24AM +0900, Tatsuo Ishii wrote:
>> > >> Sounds like a good idea.
>> > > 
>> > > OK, how should I proceed?  I have a github account to which I have
>> > > already pushed some branches:
>> > > 
>> > > 	https://github.com/bmomjian/pgpool2/branches
>> > 
>> > I think you'd better to follow PostgreSQL way: first you propose how
>> > you want to break C files and adding subdirectores. Using github
>> > itself seems a godd idea.
>> 
>> OK, I will send that as a separate email.
> 
> Looking at the code, there are 42 C files at the top level.  It seems
> moving these to subdirctories would help --- suggestions:
> 
> proto - for libpq protocol handling
> ipc - for shared memory, semaphores, and signals
> rewrite - for query walking and rewriting
> config - for config file handling
> socket - for network handling

Let me think this.

> Also, it seems main.c should be broken into several files for config
> file, ipc, and child process handling.  

In addition to this health checking part should be a separate process
like pool_worker_child.c.

> The goal is to allow the code to be more easily understood by new
> developers.  Would you like to see a patch?

Yes, please. Maybe you want to start from breaking main.c into several
files?
--
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