Skip to content

Commit

Permalink
Merge pull request #5630 from EnterpriseDB/extensions-wal2json-system…
Browse files Browse the repository at this point in the history
…stats-051624

add extensions:  wal2json, system_stats
  • Loading branch information
piano35-edb authored May 17, 2024
2 parents 3dae4c5 + 4ceab50 commit 477e19d
Show file tree
Hide file tree
Showing 12 changed files with 236 additions and 1 deletion.
4 changes: 3 additions & 1 deletion advocacy_docs/pg_extensions/extensionrefs.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,7 @@
"bdr_5.x":"https://www.enterprisedb.com/docs/pgd/5/",
"pg_cron":"https://github.com/citusdata/pg_cron",
"sql_profiler":"https://www.enterprisedb.com/docs/pem/latest/profiling_workloads/using_sql_profiler/",
"pg_squeeze":"https://www.enterprisedb.com/docs/pg_extensions/pg_squeeze/"
"pg_squeeze":"https://www.enterprisedb.com/docs/pg_extensions/pg_squeeze/",
"wal2json":"https://www.enterprisedb.com/docs/pg_extensions/wal2json/",
"system_stats":"https://www.enterprisedb.com/docs/pg_extensions/system_stats/"
}
3 changes: 3 additions & 0 deletions advocacy_docs/pg_extensions/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ navigation:
- wait_states
- pg_failover_slots
- pg_squeeze
- system_stats
- wal2json
- "#EDB Postgres Advanced Server only"
- spl_check
- edb_job_scheduler
Expand Down Expand Up @@ -118,6 +120,7 @@ Categories of extensions:
<tr><td style="border-left: solid 1px; border-right: none; middle-align: middle; border-top: none; border-bottom: none; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; "><a href="https://www.postgresql.org/docs/current/pltcl-overview.html">&nbsp;&nbsp;&nbsp;&nbsp;pltclu</a></td><td style="border-left: solid 1px; border-right: solid 1px; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">Yes</td><td style="font-weight: bold; border-left: solid 1px; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; "><span style="color:green">✓</span></td><td style="font-weight: bold; border-left: none; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; "><span style="color:green">✓</span></td><td style="font-weight: bold; border-left: none; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; "><span style="color:green">✓</span></td><td style="font-weight: bold; border-left: solid 1px; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td><td style="font-weight: bold; border-left: none; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td><td style="font-weight: bold; border-left: solid 1px; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; "><span style="color:green">✓</span></td><td style="font-weight: bold; border-left: none; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; "><span style="color:green">✓</span></td><td style="font-weight: bold; border-left: none; border-right: solid 1px; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; "><span style="color:green">✓</span></td></tr>
<tr><td style="border-left: solid 1px; border-right: none; middle-align: middle; border-top: none; border-bottom: none; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; "><a href="https://github.com/pgaudit/set_user">set_user</a></td><td style="border-left: solid 1px; border-right: solid 1px; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; "></td><td style="font-weight: bold; border-left: solid 1px; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; "><span style="color:green">✓</span></td><td style="font-weight: bold; border-left: none; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td><td style="font-weight: bold; border-left: none; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td><td style="font-weight: bold; border-left: solid 1px; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td><td style="font-weight: bold; border-left: none; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td><td style="font-weight: bold; border-left: solid 1px; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td><td style="font-weight: bold; border-left: none; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td><td style="font-weight: bold; border-left: none; border-right: solid 1px; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td></tr>
<tr><td style="border-left: solid 1px; border-right: none; middle-align: middle; border-top: none; border-bottom: none; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; "><a href="https://github.com/EnterpriseDB/sslutils">sslutils</a></td><td style="border-left: solid 1px; border-right: solid 1px; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; "></td><td style="font-weight: bold; border-left: solid 1px; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; "><span style="color:green">✓</span></td><td style="font-weight: bold; border-left: none; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; "><span style="color:green">✓</span></td><td style="font-weight: bold; border-left: none; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; "><span style="color:green">✓</span></td><td style="font-weight: bold; border-left: solid 1px; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td><td style="font-weight: bold; border-left: none; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td><td style="font-weight: bold; border-left: solid 1px; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td><td style="font-weight: bold; border-left: none; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td><td style="font-weight: bold; border-left: none; border-right: solid 1px; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td></tr>
<tr><td style="border-left: solid 1px; border-right: none; middle-align: middle; border-top: none; border-bottom: none; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; "><a href="https://www.enterprisedb.com/docs/pg_extensions/system_stats/">system_stats</a></td><td style="border-left: solid 1px; border-right: solid 1px; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; "></td><td style="font-weight: bold; border-left: solid 1px; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; "><span style="color:green">✓</span></td><td style="font-weight: bold; border-left: none; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; "><span style="color:green">✓</span></td><td style="font-weight: bold; border-left: none; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; "><span style="color:green">✓</span></td><td style="font-weight: bold; border-left: solid 1px; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td><td style="font-weight: bold; border-left: none; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td><td style="font-weight: bold; border-left: solid 1px; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td><td style="font-weight: bold; border-left: none; border-right: none; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td><td style="font-weight: bold; border-left: none; border-right: solid 1px; middle-align: middle; border-top: none; border-bottom: none; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td></tr>
<tr><td style="border-left: solid 1px; border-right: none; middle-align: middle; border-top: none; border-bottom: solid 1px; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; "><a href="https://github.com/timescale/timescaledb">timescaledb</a></td><td style="border-left: solid 1px; border-right: solid 1px; middle-align: middle; border-top: none; border-bottom: solid 1px; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; "></td><td style="font-weight: bold; border-left: solid 1px; border-right: none; middle-align: middle; border-top: none; border-bottom: solid 1px; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; "><span style="color:green">✓</span></td><td style="font-weight: bold; border-left: none; border-right: none; middle-align: middle; border-top: none; border-bottom: solid 1px; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td><td style="font-weight: bold; border-left: none; border-right: none; middle-align: middle; border-top: none; border-bottom: solid 1px; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td><td style="font-weight: bold; border-left: solid 1px; border-right: none; middle-align: middle; border-top: none; border-bottom: solid 1px; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td><td style="font-weight: bold; border-left: none; border-right: none; middle-align: middle; border-top: none; border-bottom: solid 1px; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td><td style="font-weight: bold; border-left: solid 1px; border-right: none; middle-align: middle; border-top: none; border-bottom: solid 1px; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td><td style="font-weight: bold; border-left: none; border-right: none; middle-align: middle; border-top: none; border-bottom: solid 1px; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td><td style="font-weight: bold; border-left: none; border-right: solid 1px; middle-align: middle; border-top: none; border-bottom: solid 1px; text-align: center; padding-left: 3px; padding-right: 3px;padding-top: 2px; padding-bottom: 2px; ">–</td></tr>
</tbody></table>

Expand Down
2 changes: 2 additions & 0 deletions advocacy_docs/pg_extensions/index.mdx.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ navigation:
- wait_states
- pg_failover_slots
- pg_squeeze
- system_stats
- wal2json
- "#EDB Postgres Advanced Server only"
- spl_check
- edb_job_scheduler
Expand Down
12 changes: 12 additions & 0 deletions advocacy_docs/pg_extensions/system_stats/configuring.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Configuring system_stats
navTitle: Configuring
---
1. Create the `system_stats` extension in your database:

```shell
CREATE EXTENSION system_stats;
```

No other configuration steps are required.

17 changes: 17 additions & 0 deletions advocacy_docs/pg_extensions/system_stats/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: 'system_stats'
indexCards: none
directoryDefaults:
product: system_stats
navigation:
- installing
- configuring
- using
---
system_stats (`system_stats`) is a Postgres extension that provides functions to access system level statistics that can be used for monitoring. It supports Linux, macOS and Windows.

For more information about `system_stats`, see:

- [Installing system_stats](installing.mdx)
- [Configuring system_stats](configuring.mdx)
- [Using system_stats](using.mdx)
71 changes: 71 additions & 0 deletions advocacy_docs/pg_extensions/system_stats/installing.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
title: Installing system_stats
navTitle: Installing
---

`system_stats` is supported on the same platforms as the Postgres distribution you're using. Support for `system_stats` starts with Postgres 12. For details, see:

- [EDB Postgres Advanced Server Product Compatibility](https://www.enterprisedb.com/platform-compatibility#epas)
- [PostgreSQL Product Compatibility](https://www.enterprisedb.com/resources/platform-compatibility#pg)
- [EDB Postgres Extended Server Product Compatibility](https://www.enterprisedb.com/resources/platform-compatibility#epas_extended)

## Installation

Before you begin the installation process:

- Install Postgres. See:

- [Installing EDB Postgres Advanced Server](/epas/latest/installing/)

- [Installing PostgreSQL](https://www.postgresql.org/download/)

- [Installing EDB Postgres Extended Server](/pge/latest/installing/)

- Set up the repository.

Setting up the repository is a one-time task. If you've already set up your repository, you don't need to perform this step.

To set up the repository, go to [EDB repositories](https://www.enterprisedb.com/repos-downloads) and follow the instructions provided there.

## Install the package

The syntax for the package install command is:

```shell
# For SLES, CentOS, RHEL and its derivatives
sudo <package-manager> -y install edb-<postgres><postgres_version>-system-stats2

# For Debian and Ubuntu
sudo <package-manager> -y install edb-<postgres><postgres_version>-system-stats2
```

Where:
- `<package-manager>`is the package manager used with your operating system:

| Package manager | Operating system |
| --------------- | -------------------------------- |
| dnf | RHEL 8/9 and derivatives |
| yum | RHEL 7 and derivatives, CentOS 7 |
| zypper | SLES |
| apt-get | Debian and derivatives |

- `<postgres>` is the distribution of Postgres you're using:

| Postgres distribution | Value |
| ---------------------------- | ---------- |
| PostgreSQL | pg |
| EDB Postgres Advanced Server | as |
| EDB Postgres Extended Server | postgresextended |

- `<postgres_version>` is the version of Postgres you're using.

For example, to install system_stats for EDB Postgres Advanced Server 15 on a RHEL 8 platform:

```shell
sudo dnf -y install edb-as15-system-stats2
```





6 changes: 6 additions & 0 deletions advocacy_docs/pg_extensions/system_stats/using.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Using system_stats
navTitle: Using
---

For more information about using `system_stats`, see the [Github repository](https://github.com/EnterpriseDB/system_stats/blob/master/README.md).
12 changes: 12 additions & 0 deletions advocacy_docs/pg_extensions/wal2json/configuring.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Configuring wal2json
navTitle: Configuring
---
1. Add these changes to `postgresql.conf`:

```shell
wal_level = logical
```

No other configuration steps are required.

25 changes: 25 additions & 0 deletions advocacy_docs/pg_extensions/wal2json/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: 'wal2json'
indexCards: none
directoryDefaults:
product: wal2json
navigation:
- installing
- configuring
- using
---

wal2json (`wal2json`) is an extension released as open source software under the PostgreSQL License.

`wal2json` is an output plugin for logical decoding. It has access to the following:

- Tuples produced by INSERT and UPDATE.
- UPDATE/DELETE old row versions *(depending on the configured replica identity)*.

Changes can be consumed using the streaming protocol (logical replication slots) or by a SQL API.

For more information about `wal2json`, see:

- [Installing wal2json](installing.mdx)
- [Configuring wal2json](configuring.mdx)
- [Using wal2json](using.mdx)
Loading

1 comment on commit 477e19d

@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.