Can't edit pg_hba.conf; and, How do I restart postmaster?

From: Daniel Lerch <daniel(at)mountainmeasurement(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Can't edit pg_hba.conf; and, How do I restart postmaster?
Date: 2004-10-27 17:57:17
Message-ID: 417FE17D.2020904@mountainmeasurement.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi folks,

I successfully edited pg_hba.conf a few weeks ago (which means I don't
remember where the file I edited was, now). Today I'm needing to re-edit
it as the addresses of our computers have changed. But the two
pg_hba.conf files I now find:

/etc/postgresql/pg_hba.conf
/usr/lib/postgresql/share/pg_hba.conf.sample

are both read-only; AND when I tried to copy /etc/postgresql/pg_hba.conf
(which I'd edited before), it wouldn't let me, and said 'cannot create
regular file: Permission denied'. So I'm at a loss - how do I edit
pg_hba.conf now? Our user accounts haven't changed, and I'm not logging
in any differently than before. Plus, which is the right pg_hba.conf
file, and where should it be?

Also, once I get that set up, I need to know how to restart the
postmaster (whatever that is). I tried running pg_ctl from within its
own directory, even, but it didn't like it as a command. And I couldn't
locate any comman named "service" or "sighup" or "SIGHUP" (per his
instructions below). So, what do I do?

(BTW- Thanks for everyone's assistance so far - this forum has been
enormously helpful. And please do continue making your explanations as
simple as possible. I don't know any Linux commands other than 'whereis'
and 'ls', I can barely edit files with 'vi'. My new Linux and
PostgreSQL books are helping a little, but not much.)

Thanks!
-d

Tom Lane wrote:

> Most likely PGDATA is /var/lib/pgsql/data ... to make sure, look at the
> init script (probably /etc/init.d/postgresql). Or you could try
> ps auxww | grep postmaster
> and see whether the data directory was specified with a -D switch on the
> postmaster's command line.
>
> Don't forget you need to SIGHUP or restart the postmaster after editing
> its configuration files. ("pg_ctl reload" or "service postgresql
> reload" usually work for sending SIGHUP conveniently.)
>
> regards, tom lane

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2004-10-27 20:24:40 Re: Can't edit pg_hba.conf; and, How do I restart postmaster?
Previous Message Tom Lane 2004-10-27 15:27:35 Re: [NOVICE] ABRUPT CLOSURE OF POSTGRESQL SOCKET