Skip to content

Commit 5aacdf2

Browse files
authored
Merge pull request #5088 from EnterpriseDB/docs/wait-states/add-pg-and-pge
Adding support for PostgreSQL and PGE to Wait States
2 parents 5b2d50c + f6e13db commit 5aacdf2

File tree

2 files changed

+84
-11
lines changed

2 files changed

+84
-11
lines changed

advocacy_docs/pg_extensions/wait_states/index.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ title: EDB Wait States
33
indexCards: none
44
directoryDefaults:
55
product: EDB Wait States
6-
6+
navigation:
7+
- installing
8+
- using
79
---
810

911
EDB Wait States is a tool for analyzing performance and tuning by allowing the collection and querying of wait event data. Wait events, introduced in PostgreSQL 9.6, are recorded alongside other session activity and provide a snapshot of whether a session is waiting for I/O, CPU, IPC, locks, or timeouts. Snapshots of this information are gathered by the EDB Wait States background worker (BGW) at regular intervals.

advocacy_docs/pg_extensions/wait_states/installing.mdx

Lines changed: 81 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,41 @@ title: Installing EDB Wait States
33
navTitle: Installing
44
---
55

6-
## On Linux
6+
## On all Linux systems except Debian and Ubuntu
77

8-
To install EDB Wait States on a Linux system:
8+
To install EDB Wait States on any Linux operating system except Debian or Ubuntu:
99

10-
1. Install EDB Wait States with the `edb-asxx-server-edb_wait_states` RPM package, where `xx` is the EDB Postgres Advanced Server version number.
10+
1. Enter the following command:
1111

12+
```shell
13+
sudo <package-manager> -y install <install-package-name>
14+
```
15+
16+
Where:
17+
18+
- `<package-manager>`is the package manager used with your operating system:
19+
20+
| Package manager | Operating system |
21+
| --------------- | -------------------------------- |
22+
| dnf | RHEL 8/9 and derivatives |
23+
| yum | RHEL 7 and derivatives, CentOS 7 |
24+
| zypper | SLES |
25+
26+
- `<install-package-name>` is the name of the Postgres distribution you're using. In the package names `<version>` is the version of the Postgres distribution.
27+
28+
| Type of Postgres distribution | Install command |
29+
| ----------------------------- | ------------------------------------------- |
30+
| PostgreSQL | postgresql`<version>`-edb_wait_states |
31+
| EDB Postgres Advanced Server | edb-as`<version>`-server-edb_wait_states |
32+
| EDB Postgres Extended Server | edb-postgresextended`<version>`-wait-states |
33+
34+
35+
For example, to install EDB Wait States for EDB Postgres Advanced Server 16 on a RHEL 9 platform:
36+
37+
```shell
38+
sudo dnf -y install edb-as16-server-edb_wait_states
39+
```
40+
1241
1. To launch the worker, register it in the `postgresql.conf` file using the `shared_preload_libraries` parameter. For example:
1342

1443
```ini
@@ -23,13 +52,51 @@ To install EDB Wait States on a Linux system:
2352
CREATE EXTENSION edb_wait_states;
2453
```
2554

26-
1. To terminate the EDB Wait States worker, remove `$libdir/edb_wait_states` from the `shared_preload_libraries` parameter, and restart the database server.
55+
## On Debian and Ubuntu
2756

28-
## On Windows
57+
To install EDB Wait States on Debian or Ubuntu:
58+
59+
1. Enter the following command:
60+
61+
```shell
62+
sudo apt-get -y install <install-package-name>
63+
```
64+
65+
Where:
66+
67+
`<install-package-name>` is the name of the Postgres distribution you're using. In the package names `<version>` is the version of the Postgres distribution.
68+
69+
| Type of Postgres distribution | Install command |
70+
| ----------------------------- | -------------------------------------------- |
71+
| PostgreSQL | postgresql`<version>`-edb-wait-states |
72+
| EDB Postgres Advanced Server | edb-as`<version>`-server-edb-wait-states |
73+
| EDB Postgres Extended Server | edb-postgresextended-wait-states-`<version>` |
74+
75+
For example, to install EDB Wait States for EDB Postgres Advanced Server 16 on a Debian 11 platform:
76+
77+
```shell
78+
sudo apt-get -y install edb-as16-server-edb-wait-states
79+
```
80+
81+
82+
1. To launch the worker, register it in the `postgresql.conf` file using the `shared_preload_libraries` parameter. For example:
83+
84+
```ini
85+
shared_preload_libraries = '$libdir/edb_wait_states'
86+
```
87+
88+
1. Restart the database server. After a successful restart, the background worker begins collecting data.
2989

30-
To install EDB Wait States on a Windows system:
90+
1. To review the data, create the following extension:
3191

32-
1. To install the EDB Wait States module with the `EDB Modules` installer, invoke the StackBuilder Plus utility. Follow the onscreen instructions to finish installing the `EDB Modules`.
92+
```sql
93+
CREATE EXTENSION edb_wait_states;
94+
```
95+
96+
97+
## On Windows
98+
99+
An EDB Postgres Advanced Server installation includes support for EDB Wait States. After installing EDB Postgres Advanced Server, some additional steps are necessary to activate EDB Wait States.
33100

34101
1. To register the worker, modify the `postgresql.conf` file to include the EDB Wait States library in the `shared_preload_libraries` configuration parameter. The parameter value must include:
35102

@@ -40,9 +107,11 @@ To install EDB Wait States on a Windows system:
40107
The EDB Wait States installation places the `edb_wait_states.dll` library file in the following path:
41108

42109
```text
43-
C:\Program Files\edb\as14\lib\
110+
C:\Program Files\edb\as<xx>\lib\
44111
```
45112

113+
where `<xx>` is the EDB Postgres Advanced Server version, such as `as16`.
114+
46115
1. Restart the database server to make the changes take effect. After a successful restart, the background worker starts and begins collecting the data.
47116

48117
1. To view the data, create the following extension:
@@ -62,5 +131,7 @@ C:\Program Files\edb\as14\share\extension
62131
To uninstall EDB Wait States:
63132

64133
1. Use the `DROP EXTENSION` command to drop the `edb_wait_states` extension.
65-
1. Modify the `postgresql.conf` file, removing `$libdir/edb_wait_states.dll` from the `shared_preload_libraries` parameter.
66-
1. To apply your changes, restart the database server.
134+
1. Modify the `postgresql.conf` file, removing `$libdir/edb_wait_states` (for Linux) or `$libdir/edb_wait_states.dll` (for Windows) from the `shared_preload_libraries` parameter.
135+
1. To apply your changes, restart the database server.
136+
137+

0 commit comments

Comments
 (0)