Thread: postgresql.conf

postgresql.conf

From
"Campbell, Lance"
Date:

Postgresql 9.4.x

 

What is the proper way to set configuration values?

 

Within postresql there is a file postgresql.conf.  Traditionally I go into this file directly and make configuration changes.  That of course is the wrong way to do it.  A person could easily have a typo and not know it.  When I upgrade to 9.5 I want to make sure I am doing this the proper way.

 

Ideally I know you should not change postgresql.conf directly.  One way of making configuration changes is using the SET command.  I have no issue with that.  But what is the proper way to change configuration setting that cannot be made with SET?

 

Thanks,

 

Lance Campbell

Re: postgresql.conf

From
"Jan-Peter Seifert"
Date:
> Gesendet: Donnerstag, 19. November 2015 um 15:11 Uhr
> Von: "Campbell, Lance" <lance@illinois.edu>
>
> What is the proper way to set configuration values?

Well - until 9.4 you had to edit the postgresql.conf file. As of 9.4 you can use the 'ALTER SYSTEM' command:
http://www.postgresql.org/docs/current/static/sql-altersystem.html
 
example:
ALTER SYSTEM SET log_min_duration_statement = '6s';