472,779 Members | 1,824 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,779 software developers and data experts.

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 8212
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Angel Todorov | last post by:
Hello, sometimes I get a strange error from postgresql when I try to connect using ssl to the server: LOG: parse_hba: invalid syntax in pg_hba.conf file at line 46, token "hostssl" FATAL: ...
3
by: Seum-Lim Gan | last post by:
Hi, In 7.4, I noticed there is this ::1 and ffff: (x8 of them) for IPv6. I looked at the documentation and there is nothing that says what the ::1 is for. Commenting out that line will...
6
by: David Nedrow | last post by:
I'm trying to set up the cyrus imap server using PostgreSQL as the authentication backend. Currently, the issue I'm having is that I'm unable to connect via psql on the loopback address...
5
by: Jean-Max Reymond | last post by:
I want to have the date in french format for my postgres 7.4 database. reading the documentation, three ways to get it. 1. set datestyle to 'postgres,european'; for each session, it works OK 2....
4
by: Anony Mous | last post by:
Hi, Is there a function that would allow me to set the local time while the server is running? I can't seem to find anything on this... Thanks, Peter ---------------------------(end of...
2
by: Liza | last post by:
Hi, I've just setup postgreSQL on my Fedora Core1 box. I installed postgresql from rpm files. When I try to connect to the postgresql server in pgmanage, or through an ODBC from other windows...
0
by: Tom Allison | last post by:
pg_hba.conf entry: host all all 192.168.0/24 md5 I get the error 2004-06-14 20:51:48 LOG: invalid entry in pg_hba.conf file at line 89, token...
5
by: Raymond O'Donnell | last post by:
Hello all, I've installed the new Win32 version of 8.0-beta1, running as a service. When I connect to it using pgAdmin III and attempt to list databases, I get an error: 'Column "datpath" does...
1
by: David Parker | last post by:
We ran into a problem with pg_hba processing recently when we upgraded from 7.3.2 to 7.4.5. We use postgres as part of a network appliance that runs on Solaris 9/intel boxes. 7.4.5 runs fine in our...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.