I modified the parameter maintenance_work_mem in postgresql.conf in my production environment. I'd like to know if I send a SIGHUP to the postgres process it will reload that variable, and if it's safe for such environment.


From the manpage:

The SIGHUP signal will reload the server configuration files. It is also possible to send SIGHUP to an individual server process, but that is usually not sensible.

So it should work. In general you can use the reload command of a service's initscript in order to trigger a reload (which may or may not use SIGHUP as the mechanism). If the service doesn't support this the initscript should report an error, so this is fairly safe to try.

  • I believe you can change maintenace_work_mem with a reload (SIGHUP) - After you reload the server connect to it and execute SHOW maintenance_work_mem ;-- If the value reflects your change you're good to go. If not you will need to do a full restart. – voretaq7 Jul 30 '12 at 2:28

You can also use a SQL statement to reload the configuration:

SELECT pg_reload_conf();

You need superuser permissions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.