This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
setupguide:postgresqloptimization [2015/10/01 10:20] 193.48.0.3 |
setupguide:postgresqloptimization [2016/06/13 10:38] (current) 193.48.0.3 |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== PostgreSQL optimization ====== | + | ====== PostgreSQL optimization and authorizations ====== |
- | PostgreSQL 9.1.x documentation (English): http://www.postgresql.org/docs/9.1/interactive/runtime-config-resource.html#RUNTIME-CONFIG-RESOURCE-MEMORY | + | PostgreSQL 9.3.x documentation (English): https://www.postgresql.org/docs/9.3/static/runtime-config-resource.html#RUNTIME-CONFIG-RESOURCE-MEMORY |
Main configuration file is ''postgresql.conf'' located in PostgreSQL instance data directory. | Main configuration file is ''postgresql.conf'' located in PostgreSQL instance data directory. | ||
- | * [[#Optimization using graphical interface ProlineAdmin GUI|Use ProlineAdmin GUI]] | + | * [[#PostgreSQL configuration using the graphical interface ProlineAdmin GUI|Use ProlineAdmin GUI]] |
* [[#Most useful tuneable parameters in postgresql.conf|Parameters description and optimization]] | * [[#Most useful tuneable parameters in postgresql.conf|Parameters description and optimization]] | ||
- | ===== Optimization using graphical interface ProlineAdmin GUI ===== | + | ===== PostgreSQL configuration using the graphical interface ProlineAdmin GUI ===== |
=== Launch ProlineAdmin GUI === | === Launch ProlineAdmin GUI === | ||
Line 23: | Line 23: | ||
=== ProlineAdmin GUI usage === | === ProlineAdmin GUI usage === | ||
- | The first step is to select your PostgreSQL instance data directory using the dedicated menu: | + | == Locate the data directory == |
- | {{ :setupguide:select_pg_data_dir.png?nolink&1000 |}} | + | Click the //Configuration// button on the application main page. This opens the configuration window. Its first tab (//Configuration files//) has a section to reference the PostgreSQL data directory. This field must be filled to configure PostgreSQL. Click //Apply// to save changes and go on in this window.\\ |
+ | \\ | ||
+ | __Note:__ The data directory is defined when installing PostgreSQL on the machine. This is the folder in which you will find the "postgresql.conf" and the "pg_hba.conf" files. | ||
+ | |||
+ | {{ :setupguide:open_pgsql_config.png?nolink&900 |}} | ||
You can then edit two major files in PostgreSQL configuration. | You can then edit two major files in PostgreSQL configuration. | ||
**Warning: Many changes will be effective only after a restart of the PostgreSQL service, which is not yet handled by ProlineAdmin GUI (needs to be done manually).** | **Warning: Many changes will be effective only after a restart of the PostgreSQL service, which is not yet handled by ProlineAdmin GUI (needs to be done manually).** | ||
+ | |||
+ | ---- | ||
== Edit connections : pg_hba.conf == | == Edit connections : pg_hba.conf == | ||
Line 35: | Line 41: | ||
The pg_hba.conf file lists the IP addresses that are allowed to connect to your databases. You will often have to edit this file to first set up Proline. For example, you may have to allow your own machine to establish connection, or a set of machines working together... | The pg_hba.conf file lists the IP addresses that are allowed to connect to your databases. You will often have to edit this file to first set up Proline. For example, you may have to allow your own machine to establish connection, or a set of machines working together... | ||
- | Click 'Edit pg_hba.conf' to easily edit this file. | + | Select the //PostgreSQL authorizations// tab to easily edit this file. |
- | {{ :setupguide:pg_hba_tooltip.png?nolink&1000|}} | + | {{ :setupguide:pgsql_authorizations.png?nolink&600 |}} |
+ | The first section allows you to change the PostreSQL data directory. It is synchronized with the //Configuration files// and the //PostreSQL optimization// tabs. | ||
+ | |||
+ | {{ :setupguide:pgsql_authorizations_edit_popup.png?nolink&250|}} | ||
The icon near the 'Database' field opens a window to help you design the database name. | The icon near the 'Database' field opens a window to help you design the database name. | ||
As shown in the screenshot above, keeping the mouse over a column name for a few seconds will display a tooltip to help you understand how to create a new connection. | As shown in the screenshot above, keeping the mouse over a column name for a few seconds will display a tooltip to help you understand how to create a new connection. | ||
Line 46: | Line 55: | ||
Note: for advanced users, there is more documentation inside the pg_hba.conf file (located in the PostgreSQL data directory). | Note: for advanced users, there is more documentation inside the pg_hba.conf file (located in the PostgreSQL data directory). | ||
+ | Click //Apply// to save changes and go on in this window ; click //OK// to save changes and go back to the main view ; or just go to another tab without saving changes for now. | ||
+ | |||
+ | ---- | ||
== Optimize PostgreSQL performances for Proline : postgresql.conf == | == Optimize PostgreSQL performances for Proline : postgresql.conf == | ||
- | Click 'Edit postgresl.conf' to easily edit this file. The easiest way to use it is to simply click on 'Set all to optimized value', then 'Apply'. | + | Click 'Edit postgresl.conf' to easily edit this file. The easiest way to use it is to simply click on //Set all to optimized value//, then //Apply//. |
+ | |||
+ | {{ :setupguide:pgsql_optimization.png?nolink&600 |}} | ||
- | {{ :setupguide:edit_postgresql_conf_tooltip.png?nolink&1000|}} | + | The first section allows you to change the PostreSQL data directory. It is synchronized with the //Configuration files// and the //PostreSQL authorizations// tabs. |
- | Each line corresponds to a tuneable parameter. If the first box of the line isn't checked, then it will be commented in the configuration file (not taken into account). | + | Each line under this block corresponds to a tuneable parameter. If the first box of the line isn't checked, then it will be commented in the configuration file (not taken into account). |
You can use either the sliders or the fields and boxes to change the values. | You can use either the sliders or the fields and boxes to change the values. | ||
Keeping the mouse over a parameter name for a few seconds will display a tooltip to help you understand what is this parameter about. | Keeping the mouse over a parameter name for a few seconds will display a tooltip to help you understand what is this parameter about. | ||
Line 61: | Line 76: | ||
* 'Set all to default value': set default value (compute it if needed) for each parameter. | * 'Set all to default value': set default value (compute it if needed) for each parameter. | ||
+ | Click //Apply// to save changes and go on in this window ; click //OK// to save changes and go back to the main view ; or just go to another tab without saving changes for now. | ||
+ | ---- | ||
===== Most useful tuneable parameters in postgresql.conf ===== | ===== Most useful tuneable parameters in postgresql.conf ===== |