REVIEW proposal: a validator for configuration files

From: Andy Colson <andy(at)squeakycode(dot)net>
To: Alexey Klyukin <alexk(at)commandprompt(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: REVIEW proposal: a validator for configuration files
Date: 2011-09-07 03:40:08
Message-ID: 4E66E798.7030401@squeakycode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Alexey, I was taking a quick look at this patch, and have a question for ya.

I have a default config from initdb, there is a new setting at the end but its commented out.

root(at)storm: /db/pg92
# /etc/rc.d/postgresql start
Starting PostgreSQL:

root(at)storm: /db/pg92
# more serverlog
LOG: database system was shut down at 2011-09-06 22:30:17 CDT
LOG: database system is ready to accept connections
LOG: autovacuum launcher started

root(at)storm: /db/pg92
# /etc/rc.d/postgresql reload
Reload PostgreSQL: No directory, logging in with HOME=/

root(at)storm: /db/pg92
# more serverlog
LOG: database system was shut down at 2011-09-06 22:30:17 CDT
LOG: database system is ready to accept connections
LOG: autovacuum launcher started
LOG: received SIGHUP, reloading configuration files
WARNING: errors detected while parsing configuration files
WARNING: errors detected while parsing configuration files
WARNING: errors detected while parsing configuration files
WARNING: errors detected while parsing configuration files
WARNING: errors detected while parsing configuration files

I didn't edit the config, it was fine at startup, so why does reload upset it so? Also, what line is the warning for?

If I edit postgresql.conf and just add bob at the last line, then reload:

LOG: received SIGHUP, reloading configuration files
LOG: syntax error in file "/db/pg92/postgresql.conf" line 570, near end of line
FATAL: errors detected while parsing configuration files

Where did the other warnings go? Its right though, line 570 is bad. It also seems to have killed the server. I have not gotten through the history of messages regarding this patch, but is it supposed to kill the server if there is a syntax error in the config file?

-Andy

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavan Deolasee 2011-09-07 07:05:07 Re: REVIEW Single pass vacuum - take 2
Previous Message Fujii Masao 2011-09-07 03:10:09 Re: regular logging of checkpoint progress