HeatWare.net header image
HeatWare.net
TwitterRSSEmail
  • Home
  • Windows
    • Windows 8
    • Windows 7
    • Windows Vista
    • Windows XP
  • Linux/Unix
  • Mac
  • Mobile
    • Android
    • iOS
    • Phones (Help / Resources)
  • Software / Programming
    • Free Software
    • Programming – General
    • PHP
    • Ruby/Rails
    • Quality Assurance (QA)
    • Software – General
    • Software Help
    • Databases
  • Cool Websites
  • Other
    • Deals & Bargains
    • News
    • Video Games
    • Hardware
    • Electronics
  • About

10 comments / January 12, 2011 / sood / Databases

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
/usr/bin/pg_ctl reload

Option 2: Using SQL

SELECT pg_reload_conf();

Using either option will not interrupt any active queries or connections to the database, thus applying these changes seemlessly.

Related Posts

  • Find PostgreSQL database size using SQL 'Select'
  • How to backup/dump a PostgreSQL database using pg_dump
  • pgAdmin - PostgreSQL GUI Management Tool
  • How to install PostgreSQL 8.4 on CentOS 5.5
  • PostgreSQL: How to reset the pg_stat statistics tables?

Postgres PostgreSQL

10 comments… add one
  1. Frank January 13, 2011, 3:14 am

    Or using SQL (by a superuser):

    SELECT pg_reload_conf();

  2. sood January 13, 2011, 9:18 am

    Thanks Frank for that suggestion. I will update the article accordingly!

  3. Maarten Verwijs November 28, 2014, 6:09 am

    This does not work for all settings. See the postgres docs. Some parameters state: “This parameter can only be set at server start.”

  4. Rouge December 18, 2014, 4:32 am

    Thanks.

    I’m new to PostgreSQL and things like this makes life easier for me 🙂

  5. Aleasha February 10, 2016, 12:46 am

    Well it should be ….
    pg_ctl reload -D /datafile-location

  6. Bob Smith June 15, 2016, 5:03 pm

    Thanks, very helpful.

  7. Matthew February 14, 2017, 10:47 am

    SELECT pg_reload_conf();
    Worked perfectly.

    As others have stated, be sure your configuration changes don’t require a restart!

    Cheers

  8. Foo January 23, 2019, 10:44 am

    Saved my homework. Thnks!

  9. Spartacus July 2, 2019, 7:54 pm

    Thank you very much

  10. syarif October 11, 2019, 12:21 am

    thanks, you saved my day

Cancel reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • Why You Should Consider Diving Apps
  • How to Buy a Smartphone that Fits Your Budget
  • How to Overcome Frustrating PDF Stress
  • Convert PDF to Word: Easy, Reliable and Quality Conversion
  • PDF to Excel App ­ – A New Way of Handling Tricky Documents

Recent Comments

  • Valarie Walter on Basic Troubleshooting Steps for your Cell Phone
  • John Mists on A Brief History of Android OS
  • syarif on PostgreSQL: How to reload config settings without restarting database
  • Raghu on How to SSH to a server using Ruby – Part I
  • francisco clemente on Basic Troubleshooting Steps for your Cell Phone

Tags

ACSLS Android Bargain Cell Phones Cool Software Cool Websites Databases Deals Ebooks Facebook Free Software G2x Galaxy S5 iOS iPhone Kindle LG Linux Linux/Unix Mac Mobile mysql Office OpenStack OS X PHP Postgres PostgreSQL ruby Samsung Galaxy S6 Shell Smartphones Sun T-Mobile Tips Tips & Tricks Ubuntu Unix Virtualization VMWare Windows Windows 7 Windows 8 Windows Vista Windows XP

Latest Tweet

Follow @HeatwaredotNet

SP
@HeatwaredotNet

  • Why You Should Consider Diving Apps https://t.co/Is41cdUv2I #diving-apps
    about 6 years ago

All Categories

Other Links

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Copyright © 2015 — HeatWare