X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4B2238B9CCC; Wed, 16 Feb 2005 20:28:34 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 45778-01; Wed, 16 Feb 2005 20:28:03 +0000 (GMT) Received: from mail.deg.cc (mail.deg.cc [64.139.134.201]) by svr1.postgresql.org (Postfix) with ESMTP id 8D6388BA032; Wed, 16 Feb 2005 20:15:05 +0000 (GMT) Received: from deg.cc (kyle.deg.cc [198.70.16.205]) by mail.deg.cc (Postfix) with ESMTP id 6490B56073; Wed, 16 Feb 2005 15:15:00 -0500 (EST) Message-ID: <4213A9C7.2010404@deg.cc> Date: Wed, 16 Feb 2005 15:15:03 -0500 From: Pallav Kalva User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040308 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: pgsql-bugs@postgresql.org, pgsql-admin@postgresql.org Subject: Re: Postgres crashed on invalid IP entry in pg_hba.conf References: <1108578986.421392aad28bd@mail.deg.cc> <26829.1108584317@sss.pgh.pa.us> In-Reply-To: <26829.1108584317@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.056 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200502/149 X-Sequence-Number: 16317 Hi Tom, Thanks! for the quick reply actually i forgot to attach the log file in my first email, the next email has the attachment, anyways here is the output from the log file. as you can see i have 5 numbers in the ip address which was a typo and postgres crashes when it reads the hba file with this entry. do you think this problem is specific to the 7.4.2 version . Feb 15 17:30:55 prod postgres[2322]: [702-1] LOG: invalid IP address "100.1.100.1.50" in pg_hba.conf file: Name or service not known Feb 15 17:30:55 prod postgres[13585]: [702-1] LOG: server process (PID 2322) was terminated by signal 11 Feb 15 17:30:55 prod postgres[13585]: [703-1] LOG: terminating any other active server processes Feb 15 17:30:55 prod postgres[13585]: [704-1] LOG: all server processes terminated; reinitializing Feb 15 17:30:55 prod postgres[2323]: [705-1] LOG: database system was interrupted at 2005-02-15 17:30:51 EST Feb 15 17:30:55 prod postgres[2323]: [706-1] LOG: checkpoint record is at D5/796387A8 Feb 15 17:30:55 prod postgres[2323]: [707-1] LOG: redo record is at D5/796387A8; undo record is at 0/0; shutdown TRUE Feb 15 17:30:55 prod postgres[2323]: [708-1] LOG: next transaction ID: 146738745; next OID: 565698175 Feb 15 17:30:55 prod postgres[2323]: [709-1] LOG: database system was not properly shut down; automatic recovery in progress Feb 15 17:30:55 prod postgres[2323]: [710-1] LOG: record with zero length at D5/796387E8 Feb 15 17:30:55 prod postgres[2323]: [711-1] LOG: redo is not required Feb 15 17:30:55 prod postgres[2324]: [705-1] FATAL: the database system is starting up Feb 15 17:30:57 prod postgres[2323]: [712-1] LOG: database system is ready Feb 15 17:30:59 prod postgres[2329]: [705-1] LOG: invalid IP address "100.1.100.1.50" in pg_hba.conf file: Name or service not known Feb 15 17:30:59 prod postgres[2329]: [706-1] LOG: invalid entry in pg_hba.conf file at line 206, token "100.1.100.1.50" Feb 15 17:30:59 prod postgres[2329]: [707-1] FATAL: missing or erroneous pg_hba.conf file Feb 15 17:30:59 prod postgres[2329]: [707-2] HINT: See server log for details. Feb 15 17:30:59 prod postgres[13585]: [705-1] LOG: server process (PID 2329) was terminated by signal 11 Feb 15 17:30:59 prod postgres[13585]: [706-1] LOG: terminating any other active server processes Tom Lane wrote: >pkalva@deg.cc writes: > > >> Yesterday, our production database was crashed as soon as we added an invlid >>entry in the pg_hba.conf file. Immediately, after the SIGHUP it tried to read >>the pg_hba.conf file and it couldnt validate the IP address and restarted the >>postgres server, as soon as we change the pg_hba.conf with the right entry >>everything was back to normal. Attached you will see the postgres log file at >>the time of the crash. Postgres version we are using is 7.4.2. >> >> > >Works fine for me in 7.4.7 ... I get log entries like this: > >LOG: invalid IP address "1727.0.0.1" in pg_hba.conf file: Unknown server error >LOG: invalid entry in pg_hba.conf file at line 56, token "1727.0.0.1" >FATAL: missing or erroneous pg_hba.conf file >HINT: See server log for details. > >and after I fix the pg_hba.conf file it lets me in again. I see no crash. > > regards, tom lane > > >