469,572 Members | 1,605 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,572 developers. It's quick & easy.

pg_hba.conf changes without restarting postmaster

Hello.

It seems that every time I make a change to pg_hba.conf, I have to
restart the database server for the new authentication to take effect.
Is there a way to have the server use the new pg_hba.conf authentication
without restarting the production server.

Thanks,

Si
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #1
3 7987
Si Chen <sc***@graciousstyle.com> wrote:

Hello.

It seems that every time I make a change to pg_hba.conf, I have to
restart the database server for the new authentication to take effect.
Is there a way to have the server use the new pg_hba.conf authentication
without restarting the production server.


The documentation is your friend.

Excerpt from $PGDATA/pg_hba.conf:
....
# This file is read on server startup and when the postmaster receives
# a SIGHUP signal. If you edit the file on a running system, you have
# to SIGHUP the postmaster for the changes to take effect, or use
# "pg_ctl reload".
....

And...

$ man pg_ctl
....
reload mode simply sends the postmaster process a SIGHUP
signal, causing it to reread its configuration files
(postgresql.conf, pg_hba.conf, etc.). This allows changing
of configuration-file options that do not require a complete
restart to take effect.
....

Jim

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 23 '05 #2
After a long battle with technology, sc***@graciousstyle.com (Si Chen), an earthling, wrote:
It seems that every time I make a change to pg_hba.conf, I have to
restart the database server for the new authentication to take effect.
Is there a way to have the server use the new pg_hba.conf
authentication without restarting the production server.


You NEVER need to restart the database server to reflect pg_hba.conf
changes.

The command "pg_ctl -D $PGDATA reload" will cause the server to reload
the contents of pg_hba.conf, assuming PGDATA is appropriately set.
Several other methods are possible, all of which ultimately amount to
sending the signal SIGHUP to the postmaster.
--
(format nil "~S@~S" "cbbrowne" "ntlug.org")
http://www3.sympatico.ca/cbbrowne/linux.html
I found out why cats drink out of the toilet. My mother told me it's
because it's cold in there. And I'm like: How did my mother know THAT?
--Wendy Liebman
Nov 23 '05 #3
If you launch your progress server at startup (in init.d),
you only have to type :
# service postgresql reload
It works fine.
Luc

----- Original Message -----
From: "Christopher Browne" <cb******@acm.org>
To: <pg***********@postgresql.org>
Sent: Saturday, July 31, 2004 3:09 AM
Subject: Re: [GENERAL] pg_hba.conf changes without restarting postmaster

After a long battle with technology, sc***@graciousstyle.com (Si Chen), an

earthling, wrote:
It seems that every time I make a change to pg_hba.conf, I have to
restart the database server for the new authentication to take effect.
Is there a way to have the server use the new pg_hba.conf
authentication without restarting the production server.


You NEVER need to restart the database server to reflect pg_hba.conf
changes.

The command "pg_ctl -D $PGDATA reload" will cause the server to reload
the contents of pg_hba.conf, assuming PGDATA is appropriately set.
Several other methods are possible, all of which ultimately amount to
sending the signal SIGHUP to the postmaster.
--
(format nil "~S@~S" "cbbrowne" "ntlug.org")
http://www3.sympatico.ca/cbbrowne/linux.html
I found out why cats drink out of the toilet. My mother told me it's
because it's cold in there. And I'm like: How did my mother know THAT?
--Wendy Liebman

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Angel Todorov | last post: by
3 posts views Thread by Seum-Lim Gan | last post: by
6 posts views Thread by David Nedrow | last post: by
5 posts views Thread by Jean-Max Reymond | last post: by
reply views Thread by Tom Allison | last post: by
5 posts views Thread by Raymond O'Donnell | last post: by
1 post views Thread by David Parker | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.