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

Bruce Momjian bruce at momjian.us
Thu Apr 11 23:20:29 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

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

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

-- 
  Bruce Momjian  <bruce at momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +


More information about the pgpool-hackers mailing list