Skip to content

Commit

Permalink
Merge pull request #4603 from EnterpriseDB/release/2023-08-09
Browse files Browse the repository at this point in the history
Production Release: 2023-08-09
  • Loading branch information
ccestes authored Aug 9, 2023
2 parents f29d25d + 7320ab5 commit c06ecff
Show file tree
Hide file tree
Showing 99 changed files with 1,119 additions and 1,063 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ search_path = '"$user", public'
shared_buffers = 128MB
```

## Types of parameter values

Parameter values are specified as one of five types:

- **Boolean** — Acceptable values are `on`, `off`, `true`, `false`, `yes`, `no`, `1`, `0`, or any unambiguous prefix of these.
Expand All @@ -34,7 +36,7 @@ Parameter values are specified as one of five types:
- **String** — Text value enclosed in single quotes if the value isn't a simple identifier or number, that is, the value contains special characters such as spaces or other punctuation marks.
- **Enum** — Specific set of string values. The allowed values can be found in the system view `pg_settings.enumvals`. Enum values are not case sensitive.

Some settings specify a memory or time value. Each of these has an implicit unit, which is kilobytes, blocks (typically 8 kilobytes), milliseconds, seconds, or minutes. You can find default units by referencing the system view `pg_settings.unit`. You can specify a different explicitly.
Some settings specify a memory or time value. Each of these has an implicit unit, which is kilobytes, blocks (typically 8 kilobytes), milliseconds, seconds, or minutes. You can find default units by referencing the system view `pg_settings.unit`. You can specify a different unit explicitly.

Valid memory units are:
- `kB` (kilobytes)
Expand All @@ -50,23 +52,23 @@ Valid time units are:

The multiplier for memory units is 1024.

You can set the configuration parameter settings in a number of different ways:
## Specifying configuration parameter settings

- A number of parameter settings are set when the EDB Postgres Advanced Server database product is built. These are read-only parameters, and you can't change their values. A couple of parameters are also permanently set for each database when the database is created. These parameters are read-only and you can't later change them for the database.
A number of parameter settings are set when the EDB Postgres Advanced Server database product is built. These are read-only parameters, and you can't change their values. A couple of parameters are also permanently set for each database when the database is created. These parameters are read-only and you can't later change them for the database. However, there are a number of ways to specify the configuration parameter settings:

- The initial settings for almost all configurable parameters across the entire database cluster are listed in the configuration file `postgresql.conf`. These settings are put into effect upon database server start or restart. You can override some of these initial parameter settings. All configuration parameters have built-in default settings that are in effect if not explicitly overridden.
- The initial settings for almost all configurable parameters across the entire database cluster are listed **in the `postgresql.conf`** configuration file. These settings are put into effect upon database server start or restart. You can override some of these initial parameter settings. All configuration parameters have built-in default settings that are in effect unless they are explicitly overridden.

- Configuration parameters in the `postgresql.conf` file are overridden when the same parameters are included in the `postgresql.auto.conf` file. The `ALTER SYSTEM` command is used to manage the configuration parameters in the `postgresql.auto.conf` file.
- Configuration parameters in the `postgresql.conf` file are overridden when the same parameters are included **in the `postgresql.auto.conf` file**. The `ALTER SYSTEM` command is used to manage the configuration parameters in the `postgresql.auto.conf` file.

- You can modify parameter settings in the configuration file while the database server is running. If the configuration file is then reloaded (meaning a SIGHUP signal is issued), for certain parameter types, the changed parameters settings immediately take effect. For some of these parameter types, the new settings are available in a currently running session immediately after the reload. For other of these parameter types, you must start a new session to use the new settings. And yet for other parameter types, modified settings don't take effect until the database server is stopped and restarted. See the [PostgreSQL core documentation](https://www.postgresql.org/docs/current/config-setting.html) for information on how to reload the configuration file:
- You can modify parameter settings **in the configuration file while the database server is running**. If the configuration file is then reloaded (meaning a SIGHUP signal is issued), for certain parameter types, the changed parameters settings immediately take effect. For some of these parameter types, the new settings are available in a currently running session immediately after the reload. For other of these parameter types, you must start a new session to use the new settings. And yet for other parameter types, modified settings don't take effect until the database server is stopped and restarted. See the [PostgreSQL core documentation](https://www.postgresql.org/docs/current/config-setting.html) for information on how to reload the configuration file:

- You can use the SQL commands `ALTER DATABASE`, `ALTER ROLE`, or `ALTER ROLE IN DATABASE` to modify certain parameter settings. The modified parameter settings take effect for new sessions after you execute the command. `ALTER DATABASE` affects new sessions connecting to the specified database. `ALTER ROLE` affects new sessions started by the specified role. `ALTER ROLE IN DATABASE` affects new sessions started by the specified role connecting to the specified database. Parameter settings established by these SQL commands remain in effect indefinitely, across database server restarts, overriding settings established by the other methods. Parameter settings established using the `ALTER DATABASE`, `ALTER ROLE`, or `ALTER ROLE IN DATABASE` commands can be changed only by either:
- You can **use the SQL commands** `ALTER DATABASE`, `ALTER ROLE`, or `ALTER ROLE IN DATABASE` to modify certain parameter settings. The modified parameter settings take effect for new sessions after you execute the command. `ALTER DATABASE` affects new sessions connecting to the specified database. `ALTER ROLE` affects new sessions started by the specified role. `ALTER ROLE IN DATABASE` affects new sessions started by the specified role connecting to the specified database. Parameter settings established by these SQL commands remain in effect indefinitely, across database server restarts, overriding settings established by the other methods. Parameter settings established using the `ALTER DATABASE`, `ALTER ROLE`, or `ALTER ROLE IN DATABASE` commands can be changed only by either:

- Reissuing these commands with a different parameter value.

- Issuing these commands using either of the `SET parameter TO DEFAULT` clause or the `RESET parameter` clause. These clauses change the parameter back to using the setting set by the other methods. See the [PostgreSQL core documentation](https://www.postgresql.org/docs/current/sql-commands.html) for the exact syntax of these SQL commands.

- You can make changes for certain parameter settings for the duration of individual sessions using the `PGOPTIONS` environment variable or by using the `SET` command in the EDB-PSQL or PSQL command-line programs. Parameter settings made this way override settings established using any of the methods descussed earlier, but only during that session.
- You can make changes for certain parameter settings for the duration of individual sessions **using the `PGOPTIONS` environment variable** or by **using the `SET` command in the EDB-PSQL or PSQL command-line programs**. Parameter settings made this way override settings established using any of the methods descussed earlier, but only during that session.

## Modifying the postgresql.conf file

Expand All @@ -86,9 +88,7 @@ SELECT name FROM pg_settings WHERE context = 'postmaster';

Appropriate authentication methods provide protection and security. Entries in the `pg_hba.conf` file specify the authentication methods that the server uses with connecting clients. Before connecting to the server, you might need to modify the authentication properties specified in the `pg_hba.conf` file.

When you invoke the initdb utility to create a cluster, the utility creates a `pg_hba.conf` file for that cluster that specifies the type of authentication required from connecting clients. You can modify this file. After modifying the authentication settings in the `pg_hba.conf` file, restart the server and apply the changes.

For more information about authentication and modifying the `pg_hba.conf` file, see the [PostgreSQL core documentation](https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html).
When you invoke the `initdb` utility to create a cluster, the utility creates a `pg_hba.conf` file for that cluster that specifies the type of authentication required from connecting clients. You can modify this file. After modifying the authentication settings in the `pg_hba.conf` file, restart the server and apply the changes. For more information about authentication and modifying the `pg_hba.conf` file, see the [PostgreSQL core documentation](https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html).

When the server receives a connection request, it verifies the credentials provided against the authentication settings in the `pg_hba.conf` file before allowing a connection to a database. To log the `pg_hba.conf` file entry to authenticate a connection to the server, set the `log_connections` parameter to `ON` in the `postgresql.conf` file.

Expand All @@ -104,7 +104,7 @@ application_name=psql
"local all all md5"
```

### Obfuscating the LDAP password
## Obfuscating the LDAP password

When using [LDAP](https://www.postgresql.org/docs/15/auth-ldap.html) for authentication, the LDAP password used to connect to the LDAP server, (the ldapbindpasswd password) is stored in the pg_hba.conf file. You can store the password there in an obfuscated form, which can then be de-obfuscated by a loadable module which you supply. The loadable module supplies a hook function that performs the de-obfuscation.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ redirects:

**When value changes take effect:** Restart

**Required authorization to activate:** EPAS service account
**Required authorization to activate:** EDB Postgres Advanced Server service account

Sets the amount of memory the database server uses for shared memory buffers. The default is typically 32MB but might be less if your kernel settings don't support it, as determined during `initdb`. This setting must be at least 128kB. (Nondefault values of `BLCKSZ` change the minimum.) However, you usually need settings significantly higher than the minimum for good performance.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ redirects:

**When value changes take effect:** Restart

**Required authorization to activate:** EPAS service account
**Required authorization to activate:** EDB Postgres Advanced Server service account

The amount of memory used in shared memory for WAL data. Because the data is written out to disk at every transaction commit, the setting must be large enough only to hold the amount of WAL data generated by one typical transaction.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ redirects:

**When value changes take effect:** Reload

**Required authorization to activate:** EPAS service account
**Required authorization to activate:** EDB Postgres Advanced Server service account

Specifies the target of checkpoint completion as a fraction of total time between checkpoints. This parameter spreads out the checkpoint writes while the system starts working toward the next checkpoint.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ redirects:

**When value changes take effect:** Reload

**Required authorization to activate:** EPAS service account
**Required authorization to activate:** EDB Postgres Advanced Server service account

Maximum time between automatic WAL checkpoints, in seconds. Increasing this parameter can increase the amount of time needed for crash recovery.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ redirects:

**When value changes take effect:** Reload

**Required authorization to activate:** EPAS service account
**Required authorization to activate:** EDB Postgres Advanced Server service account

`max_wal_size` specifies the maximum size for the WAL to reach between automatic WAL checkpoints. This is a soft limit. WAL size can exceed `max_wal_size` under special circumstances, such as when under a heavy load, with a failing archive_command, or with a high `wal_keep_segments` setting.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ redirects:

**When value changes take effect:** Reload

**Required authorization to activate:** EPAS service account
**Required authorization to activate:** EDB Postgres Advanced Server service account

If WAL disk usage stays below the value specified by `min_wal_size`, old WAL files are recycled for future use at a checkpoint rather than removed. This feature ensures that enough WAL space is reserved to handle spikes in WAL usage, like when running large batch jobs. You can set this parameter in the `postgresql.conf` file or on the server command line.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ redirects:

**When value changes take effect:** Reload

**Required authorization to activate:** EPAS service account
**Required authorization to activate:** EDB Postgres Advanced Server service account

Specifies the delay between activity rounds for the background writer. In each round, the writer issues writes for some number of dirty buffers. (You can control the number of dirty buffers using the `bgwriter_lru_maxpages` and `bgwriter_lru_multiplier` parameters.) It then sleeps for `bgwriter_delay` milliseconds, and repeats.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ redirects:

**When value changes take effect:** Restart

**Required authorization to activate:** EPAS service account
**Required authorization to activate:** EDB Postgres Advanced Server service account

Specifies the maximum number of times that a session spins while waiting for a spin lock. If a lock isn't acquired, the session sleeps.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ redirects:

**When value changes take effect:** Restart

**Required authorization to activate:** EPAS service account
**Required authorization to activate:** EDB Postgres Advanced Server service account

Controls whether the database server runs `autoprewarm`, a background worker process that dumps shared buffers to disk before a shutdown. It then *prewarms* the shared buffers the next time the server is started, meaning it loads blocks from the disk back into the buffer pool.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ redirects:

**When value changes take effect:** Reload

**Required authorization to activate:** EPAS service account
**Required authorization to activate:** EDB Postgres Advanced Server service account

The minimum number of seconds after which the `autoprewarm` background worker dumps shared buffers to disk. If set to 0, shared buffers aren't dumped at regular intervals. They're dumped only when you shut down the server.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: "Top performance-related parameters"
indexCards: simple
legacyRedirectsGenerated:
# This list is generated by a script. If you need add entries, use the `legacyRedirects` key.
- "/edb-docs/d/edb-postgres-advanced-server/user-guides/user-guide/9.6/EDB_Postgres_Advanced_Server_Guide.1.12.html"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ These configuration parameters control resource use pertaining to memory.

**When value changes take effect:** Restart

**Required authorization to activate:** EPAS service account
**Required authorization to activate:** EDB Postgres Advanced Server service account

Determines how much of the host system’s resources for the database server to use based on the host machine’s total available resources and the intended use of the host machine.

Expand Down Expand Up @@ -52,7 +52,7 @@ After you select a value for `edb_dynatune`, you can further fine-tune database

**When value changes take effect:** Restart

**Required authorization to activate:** EPAS service account
**Required authorization to activate:** EDB Postgres Advanced Server service account

Controls tuning aspects based on the expected workload profile on the database server.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ redirects:

<div id="resource_usage_edb_resource_manager" class="registered_link"></div>

These configuration parameters control resource use through EDB Resource Manager.
These configuration parameters control resource use through [EDB Resource Manager](../../10_edb_resource_manager/).

## edb_max_resource_groups

Expand All @@ -20,7 +20,7 @@ These configuration parameters control resource use through EDB Resource Manager

**When value changes take effect:** Restart

**Required authorization to activate:** EPAS service account
**Required authorization to activate:** EDB Postgres Advanced Server service account

Controls the maximum number of resource groups that EDB Resource Manager can use simultaneously. You can create more resource groups than the value specified by `edb_max_resource_groups`. However, the number of resource groups in active use by processes in these groups can't exceed this value.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ redirects:

<div id="query_tuning" class="registered_link"></div>

These configuration parameters are used for optimizer hints.
These configuration parameters are used for [optimizer hints](../../../application_programming/optimizing_code/05_optimizer_hints/).

## enable_hints

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ redirects:

**When value changes take effect:** Reload

**Required authorization to activate:** EPAS service account
**Required authorization to activate:** EDB Postgres Advanced Server service account

Enables or disables database auditing. The values `xml` or `csv` enable database auditing. These values determine the file format in which to capture auditing information. `none` disables database auditing.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ redirects:

**When value changes take effect:** Reload

**Required authorization to activate:** EPAS service account
**Required authorization to activate:** EDB Postgres Advanced Server service account

Specifies the directory where the audit log files are created. Specify either an absolute path or a path relative to the EDB Postgres Advanced Server `data` directory.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ redirects:

**When value changes take effect:** Reload

**Required authorization to activate:** EPAS service account
**Required authorization to activate:** EDB Postgres Advanced Server service account

Specifies the file name of the audit file where the auditing information is stored. The default file name is `audit-%Y%m%d_%H%M%S`. The escape sequences, such as `%Y` and `%m`, are replaced by the appropriate current values of the system date and time.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ redirects:

**When value changes take effect:** Reload

**Required authorization to activate:** EPAS service account
**Required authorization to activate:** EDB Postgres Advanced Server service account

Specifies the day of the week on which to rotate the audit files. Valid values are `sun`, `mon`, `tue`, `wed`, `thu`, `fri`, `sat`, `every`, and `none`. To disable rotation, set the value to `none`. To rotate the file every day, set the `edb_audit_rotation_day` value to `every`. To rotate the file on a specific day of the week, set the value to the desired day of the week.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ redirects:

**When value changes take effect:** Reload

**Required authorization to activate:** EPAS service account
**Required authorization to activate:** EDB Postgres Advanced Server service account

Specifies a file size threshold in megabytes when file rotation occurs. If the parameter is commented out or set to 0, rotating the file based on size doesn't occur.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ redirects:

**When value changes take effect:** Reload

**Required authorization to activate:** EPAS service account
**Required authorization to activate:** EDB Postgres Advanced Server service account

Specifies the rotation time in seconds when a new log file is created. To disable this feature, leave this parameter set to 0.
Loading

2 comments on commit c06ecff

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸŽ‰ Published on https://edb-docs.netlify.app as production
πŸš€ Deployed on https://64d4083d92215b0dd2db1fa7--edb-docs.netlify.app

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.