Uhm,
Ok, I'll write some even though there may not surface any updates.
9.3.17: Forcing the log worked, it started after that, but the other problems remain.
8.0.x contained a lot of goodies, but it's not possible to install it ( 9.1 and earlier ) as there are problems with \ (back slash) and libc?
9.3.17 and onward
(1. initdb) Define -U MyNewUser during initialization of the db folder and skip (3. createuser) allow one to connect to the server as MyNewUser.
(3. createuser) Fail as one add a superuser, (2. start server) then abort and doesn't end recovery during the next start to accept connections.
(4. create database) fail.
Created tables dissappear, as one use
pg_resetxlog -f D:\Path2\DBFolder
if the server abort, or else the database is unreachable.
9.6.6 output a lot of problems with poll() as well
Steps I've used in the past within a rexx script to fully initialize and install PostgreSQL database for use:
initdb -U postgres -D D:\Path2\DBFolder --encoding=UTF8 --locale=sv_SE.UTF8 /* 1. To initialize and prepare path for databases */
pg_ctl -D D:\Path2\DBFolder -l logfile start /* 2. To start the server with that path */
createuser -U postgres -a -d -E -P MyNewUser /* 3. Only the superuser "postgres" exists from start, one has to add to use MyNewUser */
createdb -O MyNewUser -U MyNewUser MyNewDB /* 4. Create the actual database as the Owner and User of the new db. */
pgsql -U MyNewUser MyNewDB < D:\Path2\db_init.sql /* 5. Run SQL script to add tables, views, data etc. */
vacuumdb -U MyNewUser -a -z /* 6. To shrink, analyze and find possible optimizations */
createlang plpgsql MyNewDB -U MyNewUser /* 7. To add programming language PL/pgSQL to database */
pg_ctl -D D:\Path2\DBFolder stop /* 8. To close the server gracefully */
Step 5 and 7 may be skipped, while the others are crutial to verify that the database engine and additions work as expected.