pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Brent Bates <BBates@langleyfcu.org>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: First Time Starting Up PostgreSQL and Having Problems
Date: Wed, 19 Jun 2019 15:51:25 -0400
Message-ID: <21255.1560973885@sss.pgh.pa.us> (raw)
In-Reply-To: <CY4PR1301MB22001D3FAAB3499C5D41DE23A9E50@CY4PR1301MB2200.namprd13.prod.outlook.com>
References: <CY4PR1301MB22001D3FAAB3499C5D41DE23A9E50@CY4PR1301MB2200.namprd13.prod.outlook.com>

Brent Bates <BBates@langleyfcu.org> writes:
>      This is a first time install of PostgreSQL version 11.3 on a CentOS server running release 7.6.1810.  I've just finished setting up the postgresql.conf and pg_hba.conf files and am trying to start up PostgreSQL for the first time.  I'm getting errors no matter what I try.  My first attempt resulted in errors that look like the following:

>         syntax error in file "/var/lib/pgsql/11/data/pg_hba.conf" line 84, near token "all"

Hm ... could we see exactly what you have in pg_hba.conf?

> I received this error for every configuration line that wasn't a comment.  The "all" is in the USER column.  No matter what I put in the USER column, I get the same error, but listing whatever string is in that column.  I wandered if this error was just a result of a different error someplace else, so I commented out all lines in this file.  That resulted in the following error:
>         FATAL:  exceeded maxAllocatedDescs (16) while trying to open file "/var/lib/pgsql/11/data/pg_hba.conf"

That's just weird.  Zero entries in pg_hba.conf isn't a useful situation
(since the postmaster wouldn't allow any connections), but if I try it
I get a failure like this:

2019-06-19 15:43:24.257 EDT [20959] LOG:  starting PostgreSQL 12beta2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23), 64-bit
2019-06-19 15:43:24.281 EDT [20959] LOG:  listening on IPv4 address "0.0.0.0", port 5440
2019-06-19 15:43:24.281 EDT [20959] LOG:  listening on IPv6 address "::", port 5440
2019-06-19 15:43:24.282 EDT [20959] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5440"
2019-06-19 15:43:24.303 EDT [20959] LOG:  configuration file "/home/postgres/testversion/data/pg_hba.conf" contains no entries
2019-06-19 15:43:24.303 EDT [20959] FATAL:  could not load pg_hba.conf
2019-06-19 15:43:24.305 EDT [20959] LOG:  database system is shut down

Reading between the lines suggests that something might be trying to
recursively read pg_hba.conf if it's empty, but it's hard to say what that
something could be.  Are you sure this is a stock build of Postgres?
Where did you get it from?

Another question is what non-default (not-commented) entries you have in
postgresql.conf.  One idea that came to me while thinking about the syntax
error is that maybe you have one of the other configuration-file-name
variables pointing to pg_hba.conf.  That error message tells us that the
server is trying to read pg_hba.conf, right enough, but it doesn't
actually say what it's expecting to find in that file ...

			regards, tom lane





view thread (13+ messages)  latest in thread

Message-ID: <21255.1560973885@sss.pgh.pa.us>
Permalink:  ../21255.1560973885@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21255.1560973885@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, BBates@langleyfcu.org
  Subject: Re: First Time Starting Up PostgreSQL and Having Problems
  In-Reply-To: <21255.1560973885@sss.pgh.pa.us>
  References: <CY4PR1301MB22001D3FAAB3499C5D41DE23A9E50@CY4PR1301MB2200.namprd13.prod.outlook.com> <21255.1560973885@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox