Skip site navigation (1) Skip section navigation (2)

Re: postmaster segfaults when pg_hba.cof is missing

From: Neil Conway <neilc(at)samurai(dot)com>
To: Rudy Lippan <rlippan(at)remotelinux(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: postmaster segfaults when pg_hba.cof is missing
Date: 2002-12-12 22:54:22
Message-ID: 1039733662.354.32.camel@tokyo (view raw, whole thread or download thread mbox)
Lists: pgsql-bugspgsql-patches
On Thu, 2002-12-12 at 13:13, Rudy Lippan wrote:
> I know this is a broken install, but postmaster should not segfault when 
> it can't find a file.
> postgres(at)war PGDATA $ ../pgsql7.3/bin/postmaster
> LOG:  load_hba: Unable to open authentication config file 
> "/usr/local/PGDATA/pgsql7.3/pg_hba.conf": No such file or directory
> Segmentation fault (core dumped)

Good catch. Here's a patch against CVS HEAD that fixes the problem.

The actual segfault was caused by a double pfree(), but ISTM that
failing to find pg_hba.conf should be a fatal error anyway, so I
increased the priority of the elog() from LOG to FATAL and refactored
the code a little bit.

Bruce: unless anyone has an objection, please apply.

Thanks for the report.



Attachment: missing-hba-1.patch
Description: text/x-patch (974 bytes)

In response to


pgsql-bugs by date

Next:From: Neil ConwayDate: 2002-12-12 22:59:55
Subject: Re: Bug #847: plpgsql 'raise notice' > 4000 chars
Previous:From: Bruce MomjianDate: 2002-12-12 22:44:14
Subject: Re: Bug #838: SSL problems in 7.3

pgsql-patches by date

Next:From: Bruce MomjianDate: 2002-12-13 05:48:38
Subject: Re: pgsql ALTER command tab completion
Previous:From: Bruce MomjianDate: 2002-12-12 22:49:53
Subject: Re: PyGreSQL, suggestion for DB wrapper class

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group