PostgreSQL: How to reload config settings without restarting database
If you are making modifications to the Postgres configuration file postgresql.conf (or similar), and you want to new settings to take effect without needing to restart the entire database, there are two ways to accomplish this.
Option 1: From the command-line shell
su - postgres
Option 2: Using SQL
Using either option will not interrupt any active queries or connections to the database, thus applying these changes seemlessly.
Or using SQL (by a superuser):
Thanks Frank for that suggestion. I will update the article accordingly!
This does not work for all settings. See the postgres docs. Some parameters state: “This parameter can only be set at server start.”
I’m new to PostgreSQL and things like this makes life easier for me 🙂
Well it should be ….
pg_ctl reload -D /datafile-location
Thanks, very helpful.
As others have stated, be sure your configuration changes don’t require a restart!
Saved my homework. Thnks!
Thank you very much
thanks, you saved my day