dbTalk Databases Forums  

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

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss Can't edit pg_hba.conf; and, How do I restart postmaster? in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Daniel Lerch
 
Posts: n/a

Default Can't edit pg_hba.conf; and, How do I restart postmaster? - 10-27-2004 , 01:57 PM






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:

Quote:
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

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly



Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: Can't edit pg_hba.conf; and, How do I restart postmaster? - 10-27-2004 , 04:24 PM






Daniel Lerch <daniel (AT) mountainmeasurement (DOT) com> writes:
Quote:
I successfully edited pg_hba.conf a few weeks ago (which means I don't
remember where the file I edited was, now).
It'll be under $PGDATA, which according to our prior discussion was
probably /var/lib/pgsql/data.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.