initdb.c::main() too large
Bruce Momjian <bruce@momjian.us>
From: Bruce Momjian <bruce@momjian.us>
To: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Date: 2012-11-30T04:12:23Z
Lists: pgsql-hackers
Attachments
- initdb.diff (text/x-diff) patch
In looking to add an fsync-only option to initdb, I found its main() function to be 743 lines long, and very hard to understand. The attached patch moves much of that code into separate functions, which will make initdb.c easier to understand, and easier to add an fsync-only option. The original initdb.c author, Andrew Dunstan, has accepted the restructuring, in principle. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +