|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
some questions about postgresql.conf
###Sorry for the double post, my browser is acting weird
I've been considering modifying this file according to the server that it is installed on to make better use of the system resources. The machine is a dedicated postgres server, so I think that changing memory allocation and so forth should be for the better. However, I'm not sure about some of the parameters. For instance, the Optimizer Parameters portion that has enable_seqscan enable_indexscan and so forth, these options are commented out. So by default are they set to the value shown in the file, the same as the enable_tcpip option? My main other question involves the shared_buffers parameter in the Shared Memory Size section. This value has a comment that says "2xmax_connections, min 16". However, in the document that I'm reading about such configurations by Bruce Momjian, he says, "The default POSTGRESQL configuration allocates 1000 shared buffers." but the number in my postgresql.conf file is something like 64. So, which is it? Should I change this to 100, which would be 2x50 max_connections? or should it be 1000 or something, as I belive is indicated by Bruce? The article by him that I am referring to is this one Thanks in advance for any recommendations! Last edited by metaBarf : January 16th, 2004 at 02:39 PM. |
|
#2
|
||||
|
||||
|
The default of 64 shared buffers was changed to 1000 in recent versions of Postgres. For the best settings of how to calculate shared buffers check the varlena links (written by Josh Berkus and Shridhar Daithankar sp?) that rycamor posted at the top of this PG forum for postgres performance tweaking. Those are the most comprehensive and up to date documents regarding postgres performance tweaking as of this post.
Also you should not change the values for enable_seqscan or enable_indexscan, these should both be enabled by default. Basically if you turn off enable_seqscan then queries will always try to use indexes which is NOT always the best query plan in the case of small tables and result sets. Also, if you do have to disable these options, you can do so per query, and not on a global scale via the .conf. Also, if you are getting poor query plans it probably means you might need to adjust the settings in the postgresql.conf to give better hints to the query planner instead of using measures like disabling sequence scans or adjust your actual query instead. HTH, -b
__________________
PostgreSQL, it's what's for dinner... Last edited by bcyde : January 16th, 2004 at 03:59 PM. |
|
#3
|
|||
|
|||
|
thank you sir
|
![]() |
| Viewing: Dev Shed Forums > Databases > PostgreSQL Help > some questions about postgresql.conf |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|