From 7097a32851721b532630599d36b5218108dc44a7 Mon Sep 17 00:00:00 2001 From: Anastasia Alexadrova Date: Fri, 28 Jan 2022 08:48:48 +0200 Subject: [PATCH 1/3] Set MkDocs and mike version Fixed link to DR deployment doc --- docs/solutions/backup-recovery.md | 4 ++-- requirements.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/solutions/backup-recovery.md b/docs/solutions/backup-recovery.md index 718565b22..72060ca38 100644 --- a/docs/solutions/backup-recovery.md +++ b/docs/solutions/backup-recovery.md @@ -41,7 +41,7 @@ A Disaster Recovery (DR) solution ensures that a system can be quickly restored To achieve a production grade PostgreSQL disaster recovery solution, you need something that can take full or incremental database backups from a running instance, and restore from those backups at any point in time. Percona Distribution for PostgreSQL is supplied with [pgBackRest](#pgbackrest): a reliable, open-source backup and recovery solution for PostgreSQL. -This document focuses on the Disaster recovery solution in Percona Distribution for PostgreSQL. The [Deploying backup and disaster recovery solution in Percona Distribution for PostgreSQL](dr-pg-backrestsetup.md) tutorial provides guidelines of how to set up and test this solution. +This document focuses on the Disaster recovery solution in Percona Distribution for PostgreSQL. The [Deploying backup and disaster recovery solution in Percona Distribution for PostgreSQL](dr-pgbackrest-setup.md) tutorial provides guidelines of how to set up and test this solution. ### pgBackRest @@ -61,7 +61,7 @@ Finally, `pgBackRest` also supports restoring PostgreSQL databases to a differen ## Setup overview -This section describes the architecture of the backup and disaster recovery solution. For the configuration steps, refer to the [Deploying backup and disaster recovery solution in Percona Distribution for PostgreSQL](dr-pg-backrestsetup.md). +This section describes the architecture of the backup and disaster recovery solution. For the configuration steps, refer to the [Deploying backup and disaster recovery solution in Percona Distribution for PostgreSQL](dr-pgbackrest-setup.md). ### System architecture diff --git a/requirements.txt b/requirements.txt index 7b54767ae..6f7e18a62 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ Markdown -mkdocs +mkdocs == 3.2.1 mkdocs-versioning mkdocs-macros-plugin mkdocs-exclude @@ -12,4 +12,4 @@ mkdocs-material-extensions mkdocs-bootstrap-tables-plugin mkdocs-section-index mkdocs-htmlproofer-plugin -mike +mike == 1.1.2 From 74356405cafe2c0fb44311de665fd13fcc4016c9 Mon Sep 17 00:00:00 2001 From: Anastasia Alexadrova Date: Fri, 28 Jan 2022 08:57:16 +0200 Subject: [PATCH 2/3] Added code highlighting to pg_stat_monitor --- docs/pg-stat-monitor.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/pg-stat-monitor.md b/docs/pg-stat-monitor.md index ed3727830..320f129e8 100644 --- a/docs/pg-stat-monitor.md +++ b/docs/pg-stat-monitor.md @@ -85,7 +85,7 @@ To install `pg_stat_monitor`, run the following command: The recommended way to modify PostgreSQL configuration file is using the [ALTER SYSTEM](https://www.postgresql.org/docs/13/sql-altersystem.html) command. [Connect to psql](installing.md#connect-to-the-server) and use the following command: - ``` + ```sql $ ALTER SYSTEM SET shared_preload_libraries = 'pg_stat_monitor'; ``` @@ -106,21 +106,21 @@ To install `pg_stat_monitor`, run the following command: * On Debian and Ubuntu: - ``` + ```sh $ sudo systemctl restart postgresql.service ``` * On Red Hat Enterprise Linux and CentOS: - ``` + ```sh $ sudo systemctl restart postgresql-13 ``` 3. Create the extension. Connect to `psql` and use the following command: -``` +```sql $ CREATE EXTENSION pg_stat_monitor; ``` @@ -140,7 +140,7 @@ $ CREATE EXTENSION pg_stat_monitor; For example, to view the IP address of the client application that made the query, run the following command: -``` +```sql SELECT DISTINCT userid::regrole, pg_stat_monitor.datname, substr(query,0, 50) AS query, calls, bucket, bucket_start_time, queryid, client_ip FROM pg_stat_monitor, pg_database WHERE pg_database.oid = oid; @@ -161,7 +161,7 @@ Find more usage examples in [pg_stat_monitor User Guide](https://github.com/perc Run the following query to list available configuration parameters. -``` +```sql $ SELECT name,description FROM pg_stat_monitor_settings; ``` @@ -190,7 +190,7 @@ You can change a parameter by setting a new value in the configuration file. Som As an example, let’s set the bucket lifetime from default 60 seconds to 100 seconds. Use the **ALTER SYSTEM** command: -``` +```sql $ ALTER SYSTEM set pg_stat_monitor.pgsm_bucket_time = 100; ``` @@ -199,20 +199,20 @@ Restart the server to apply the change: * On Debian and Ubuntu -``` +```sh $ sudo systemctl restart restart postgresql.service ``` * On Red Hat Enterprise Linux and CentOS: -``` +```bash $ sudo systemctl restart postgresql-13 ``` Verify the updated parameter: -``` +```sql $ SELECT name, value FROM pg_stat_monitor_settings WHERE name = 'pg_stat_monitor.pgsm_bucket_time'; From 5baf8d96d2d8ef0f1e179ab223a1b0841433459f Mon Sep 17 00:00:00 2001 From: Anastasia Alexadrova Date: Fri, 28 Jan 2022 08:57:16 +0200 Subject: [PATCH 3/3] Added code highlighting to pg_stat_monitor --- docs/pg-stat-monitor.md | 20 ++++++++++---------- requirements.txt | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/pg-stat-monitor.md b/docs/pg-stat-monitor.md index ed3727830..320f129e8 100644 --- a/docs/pg-stat-monitor.md +++ b/docs/pg-stat-monitor.md @@ -85,7 +85,7 @@ To install `pg_stat_monitor`, run the following command: The recommended way to modify PostgreSQL configuration file is using the [ALTER SYSTEM](https://www.postgresql.org/docs/13/sql-altersystem.html) command. [Connect to psql](installing.md#connect-to-the-server) and use the following command: - ``` + ```sql $ ALTER SYSTEM SET shared_preload_libraries = 'pg_stat_monitor'; ``` @@ -106,21 +106,21 @@ To install `pg_stat_monitor`, run the following command: * On Debian and Ubuntu: - ``` + ```sh $ sudo systemctl restart postgresql.service ``` * On Red Hat Enterprise Linux and CentOS: - ``` + ```sh $ sudo systemctl restart postgresql-13 ``` 3. Create the extension. Connect to `psql` and use the following command: -``` +```sql $ CREATE EXTENSION pg_stat_monitor; ``` @@ -140,7 +140,7 @@ $ CREATE EXTENSION pg_stat_monitor; For example, to view the IP address of the client application that made the query, run the following command: -``` +```sql SELECT DISTINCT userid::regrole, pg_stat_monitor.datname, substr(query,0, 50) AS query, calls, bucket, bucket_start_time, queryid, client_ip FROM pg_stat_monitor, pg_database WHERE pg_database.oid = oid; @@ -161,7 +161,7 @@ Find more usage examples in [pg_stat_monitor User Guide](https://github.com/perc Run the following query to list available configuration parameters. -``` +```sql $ SELECT name,description FROM pg_stat_monitor_settings; ``` @@ -190,7 +190,7 @@ You can change a parameter by setting a new value in the configuration file. Som As an example, let’s set the bucket lifetime from default 60 seconds to 100 seconds. Use the **ALTER SYSTEM** command: -``` +```sql $ ALTER SYSTEM set pg_stat_monitor.pgsm_bucket_time = 100; ``` @@ -199,20 +199,20 @@ Restart the server to apply the change: * On Debian and Ubuntu -``` +```sh $ sudo systemctl restart restart postgresql.service ``` * On Red Hat Enterprise Linux and CentOS: -``` +```bash $ sudo systemctl restart postgresql-13 ``` Verify the updated parameter: -``` +```sql $ SELECT name, value FROM pg_stat_monitor_settings WHERE name = 'pg_stat_monitor.pgsm_bucket_time'; diff --git a/requirements.txt b/requirements.txt index 6f7e18a62..1c5f64f6f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ Markdown -mkdocs == 3.2.1 +mkdocs == 1.2.3 mkdocs-versioning mkdocs-macros-plugin mkdocs-exclude