Tell me more ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Recently, I made changes to my Postgres 8.3 database - added a couple new users and added these roles to the pg_hba.conf file. However, after running pg_ctl reload -D [DB directory], the changes didn't appear to take affect. After about an hour, the changes finally appeared.

Checking the logs, the server was sent to SIGHUP signal to reload the config files immediately after running pg_ctl. All log output afterwards was errors from my failed connection attempts (i.e. trying to connect with the new usernames I added).

I've been trying to find some documentation suggesting that there is a delay when the pg_ctl tool is used... Or, something to explain why there was such a long delay. Could it have been from either 1) the addition of the roles within the database or 2) the updating of the pg_hba.conf file??

share|improve this question
I could think of only one reason - you have issued restart instead of reload, and then the DB waited for all existing clients to disconnect before shutting down and starting anew. – Milen A. Radev Oct 29 '11 at 14:54
This makes more sense than what the OP describes. Adding roles doesn't even require a sighup, so there should be no delay. Perhaps the OP can post the ERROR he was receiving? – xzilla Oct 29 '11 at 15:24
The error was printed when a script attempted to connect to the database with the new username/role - 'FATAL: role "my_user" does not exist'. I verified that "pg_ctl reload -D [db_directory]" was executed, and the server received the SIGHUP signal. Obviously, this was done before running the script. That's a good thought about the restart versus reload, but I'm certain that reload was used. – Jmoney38 Oct 29 '11 at 18:07
Also, that's a good point that adding a user doesn't require a config reload... There are definitely two different error messages to handle a) non-existent username/role versus b) lack of permission to connect. So this issue must be related to something other than the pg_ctl call... Any other thoughts? – Jmoney38 Oct 29 '11 at 18:10
Any chance of making anew account, and seeing how long it takes to show up to a psql followed by \d? I'm wondering if some kind of idle in transaction issue caused the accounts to not show up or something like that. – Scott Marlowe Oct 29 '11 at 20:37
show 1 more comment

closed as too localized by Jack Douglas Aug 8 '12 at 20:00

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.