From: pgsql-hackers-ow...@postgresql.org
> [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Andres Freund
> I think we should seriously consider doing a larger refactoring of this
> soon.  I've some ideas about what to do, but I'd welcome some thoughts on
> whether others consider this a serious problem or not, and what they think
> we should do about this, first.

Thank you for raising this.  I think so, too.  Some other things that quickly 
come to mind are:

* The signal handlers are similar in many processes and redundant.  It's not 
easy to see how the processes respond to a particular signal and what signal 
can be used for new things such as dumping the stack trace in the server log.  
Maybe we can have an array of process attributes that specify the signal 
handlers, startup/shutdown order, etc.  Then the common process management code 
handles processes based on the information in the array.

* postmaster.c is very large (more than 6,000 lines) and hard to read.

* It may be easy to forget adding initialization code in the Windows-specific 
path (SubPostmasterMaain).

* It's confusing to find out which process counts toward max_connections, 
MaxBackends, the count of auxiliary processes.  As a user, I'm sometimes 
confused about the relationship between max_connections, 
autovacuum_max_workers, max_wal_senders, max_worker_processes.

Regards
Takayuki Tsunakawa
 




-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to