Skip to content

Commit

Permalink
Merge pull request #1606 from EnterpriseDB/release/2021-07-26
Browse files Browse the repository at this point in the history
Release: 2021-07-26
Former-commit-id: a96d6b7
  • Loading branch information
josh-heyer authored Jul 26, 2021
2 parents 478603f + cc964a4 commit 491c1f4
Show file tree
Hide file tree
Showing 5,468 changed files with 676 additions and 27,786 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
17 changes: 4 additions & 13 deletions product_docs/docs/efm/4.2/efm_pgpool_ha_guide/02_architecture.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
title: "Supported architectures for HA with Failover Manager"
---

![A typical EFM and Pgpool configuration](images/edb_ha_architecture.png)

For ensuring the high availability of your database, you can use the
core features of Failover Manager, or you can use Failover Manager along
with Postgres connection libraries (client connect failover) or
connection poolers.
For ensuring the high availability of your database, core features of Failover Manager can be combined with the Postgres connection libraries (client connect failover) and/or connection poolers.

With the capabilities of Failover Manager, EDB has designed four basic
architectures to run a High availability environment:
Expand All @@ -16,7 +11,7 @@ architectures to run a High availability environment:
capability to manage VIP addresses out of the box. VIP addresses
allow applications to connect to a single IP address, which is being
routed to the Primary database server. This architecture is the most
basic solution to run if VIP addresses are available in your
basic solution to run when VIP addresses are available in your
environment.

2. [Failover Manager using client connect failover](04_efm_client_connect_failover):
Expand All @@ -30,18 +25,14 @@ switchover. This solution does not rely on Virtual IP addresses and
can be used in every environment where such client configurations
can be set.

3. [Failover Manager with PgBouncer](05_efm_pgbouncer): PgBouncer
is used as a proxy between the Client and the Postgres Database
Server and adds a lot of capabilities such as connection pooling and
the option to halt traffic. By leveraging integration options in
Failover Manager to run reconfiguration of PgBouncer during a
3. [Failover Manager with PgBouncer](05_efm_pgbouncer): PgBouncer adds a lot of capabilities such as connection pooling and the option to halt traffic. It can additionally be used as a proxy between the Client and the Postgres Database Server. By leveraging the integration options in Failover Manager to run reconfiguration of PgBouncer during a
Failover, PgBouncer can be used to route the traffic to the correct
primary database server.

4. [Failover Manager with Pgpool](06_efm_pgpool): Pgpool-II is
another tool that is used as a proxy between the Client and the
Postgres Database Server. Pgpool-II adds a lot of capabilities such
as running in cluster mode with a Watchdog, managing VIP\'s, and
as running in cluster mode with a Watchdog, managing VIP's, and
Read-Only scalability. Failover Manager has native capabilities to
integrate with Pgpool-II to redirect traffic to another primary
during Database failover overations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@ title: "Failover Manager with client connect failover"

Most of the PostgreSQL connection libraries support
client connection failover. These libraries support connection strings
with more than one database server. On first connection attempt or
during a failure scenario (after the connection is lost), the client
driver will connect to the supplied hosts one by one, until they find a
read-write connection. Do note that the speed on reconnecting to the new
with more than one database server. On first connection attempt or when the connection is lost (which also occurs during a failover), the client driver will connect to the supplied hosts one by one, until it finds a read-write connection. Do note that the time for reconnecting to the new
master is highly dependent on the connection timeouts as configured in
the driver and tcp layer.

![Failover Manager traffic routing diagram for client connect failover](images/architecture diagram.png)
![Failover Manager traffic routing diagram for client connect failover](images/efm_with_client_connection_failover.png)

<div style="text-align: center">Figure 2: Failover Manager's traffic routing using client connect failover</div>

Expand All @@ -20,7 +17,7 @@ Using Failover Manager with Client Connection Failover

### Installing

Install and configure Advanced Server database and Failover Manager on 3 servers as following:
Install and configure Advanced Server and Failover Manager on three servers as following:

Systems | Components
-------------------------------------------|-----------------------------------------------------------------------------
Expand Down
74 changes: 37 additions & 37 deletions product_docs/docs/efm/4.2/efm_pgpool_ha_guide/05_efm_pgbouncer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,12 @@ availability by using a connection string with multiple hosts.
Failover Manager with PgBouncer in Cloud
----------------------------------------

For a cloud setup, you can use NLB (Network Load Balancer) in place of
VIP to provide high availability.
For a cloud setup, use a NLB (Network Load Balancer) to balance the traffic on both instances of PgBouncer.

![Failover Manager with PgBouncer cloud architecture diagram](images/efm_with_pgbouncer_on_cloud.png)

<div style="text-align: center">Figure 4: Failover Manager's traffic routing using PgBouncer in cloud</div>


Using Failover Manager with PgBouncer
-------------------------------------

### Installing

Install and configure Advanced Server database, Failover Manager, and PgBouncer on AWS Virtual Machines as following:


Systems | Components
--------------------| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PgDB srv 1, 2, 3 | Primary / standby node running Advanced Server 13 and Failover Manager 4.2
PgBouncer srv 1, 2 | PgBouncer node running PgBouncer 1.15. These 2 nodes should be registered as targets in the Target Group. Note that there could be more, but 2 is the minimum, and is sufficient for most cases.


Note that for multiple reasons EDB does not support this architecture
with PgBouncer and Failover Manager/PostgreSQL running on the same
machines:
Expand All @@ -62,6 +46,21 @@ machines:
- A master failure would impact both routing (PgBouncer) and Database
when these two components are combined on the same machines.


Using Failover Manager with PgBouncer
-------------------------------------

### Installing

Install and configure Advanced Server database, Failover Manager, and PgBouncer on AWS Virtual Machines as following:


Systems | Components
--------------------| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PgDB srv 1, 2, 3 | Primary / standby node running Advanced Server 13 and Failover Manager 4.2
PgBouncer srv 1, 2 | PgBouncer node running PgBouncer 1.15. These 2 nodes should be registered as targets in the Target Group. Note that there could be more, but 2 is the minimum, and is sufficient for most cases.


### Configuring Failover Manager

Use the instructions provided in the *[EFM documentation](https://www.enterprisedb.com/docs/efm/latest/efm_user/)*
Expand Down Expand Up @@ -98,9 +97,11 @@ executable by the `efm` user, and should have the following contents:
``` text
script.load.balancer.attach=/usr/edb/efm-4.2/bin/efm_pgbouncer_functions attach %h <pgbs1>,<pgbs2>
```
Where *pgbs1* is the hostname or IP address for PgBouncer server 1, and *pgbs2* is the hostname or IP address for PgBouncer server 2.
Where `<pgbs1>` is the hostname or IP address for PgBouncer server 1, and `<pgbs2>` is the hostname or IP address for PgBouncer server 2.

### Configuring PostgreSQL

During normal operation, traffic is balanced across both PgBouncer instances, and both will open connections to PostgreSQL. Therefore make sure that in PostgreSQL the max_connections parameter is compensated to accept enough connections from both instances.

### Configuring PgBouncer

Expand Down Expand Up @@ -156,45 +157,44 @@ user/group/other (0755). The script should have the following content:

### Configuring passwordless ssh

For the PgBouncer integration, passwordless `ssh` access is required.
There are multiple ways to configure this setting. Follow your
organization's recommended process to configure the passwordless `ssh`.
The following is an example of the process to configure passwordless `ssh`.
For the PgBouncer integration, passwordless `ssh` access is required. There are multiple ways to configure `ssh`. We recommend that you follow your organization's recommended process to configure the passwordless `ssh`. For a quick start, you can also follow this example for configuring passwordless `ssh`.


#### Configuring on PgBouncer hosts

1. On every PgBouncer host, temporarily set a password for the enterprisedb user. As root, run `passwd enterprisedb` and enter
the temporary password twice.

2. Make sure that Passwordless `ssh` is enabled. You can check with the following command:
``` text
grep ^PasswordAuthentication /etc/ssh/sshd_config
```
``` text
grep ^PasswordAuthentication /etc/ssh/sshd_config
```

Make sure it is set to `yes`. If needed, change and restart `ssh`.

#### Configuring on Failover Manager/PostgreSQL hosts

On every Failover Manager/postgres host, as the efm user:

1. Run the following command:
``` text
ssh-keygen -P "" -f ~/.ssh/id_rsa
```
``` text
ssh-keygen -P "" -f ~/.ssh/id_rsa
```
2. For every PgBouncer host, copy the `ssh` key with the following command:
``` text
ssh-copy-id enterprisedb@pgbouncerhost
```
Note:- The default home directory for the `enterprisedb` user is `/var/lib/edb`. If this directory is not already present, create the
``` text
ssh-copy-id enterprisedb@<pgbouncerhost>
```
Note that the default home directory for the `enterprisedb` user is `/var/lib/edb`. If this directory is not already present, create the
directory manually. As a `sudo` user, run the following commands on each PgBouncer host:
``` text
mkdir -p /var/lib/edb
chown -R enterprisedb:enterprisedb /var/lib/edb
```
``` text
mkdir -p /var/lib/edb
chown -R enterprisedb:enterprisedb /var/lib/edb
```

#### Resetting temporary passwords on PgBouncer hosts

You can reset the temporary password for the enterprisedb user on every
PgBouncer host by running the following command as root:
PgBouncer host by running the following command as `root`:
``` text
passwd -d enterprisedb
```
Expand Down
26 changes: 10 additions & 16 deletions product_docs/docs/efm/4.2/efm_pgpool_ha_guide/06_efm_pgpool.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@
title: "Failover Manager with Pgpool"
---

You can use Failover Manager and Pgpool-II together to achieve high
availability and horizontal read scalability in an on-premises setup as
well as a cloud setup.
Pgpool-II is a popular connection pooler which can provide many functionalities, like read-only traffic load balancing, connection pooling and running as a clustered proxy. With Failover Manager to manage availability and reconfiguring Pgpool-II to proxy to the correct primary the setup can deliver high availability in an on-premises setup as well as a cloud setup.


Failover Manager with Pgpool On-premises
-----------------------------------------

For an on-premises setup, use VIP to provide high availability. Disable
the automatic failover of Pgpool and configure settings for Failover
Manager and Pgpool.
For an on-premises setup, you can use a VIP to route the traffic to an available Pgpool-II instance. In this setup, the automatic failover of Pgpool-II is disabled, and Failover Manager is configured to manage Pgpool-II.


![Failover Manager with Pgpool on-premises](images/efm_with_pgpool_on_premises.png)
Expand All @@ -22,8 +18,7 @@ Manager and Pgpool.
Failover Manager with Pgpool in Cloud
--------------------------------------

For a cloud setup, you can use NLB (Network Load Balancer) in place of
VIP to provide high availability.
For environments with Network Load Balancers (e.a. cloud environments), you can use an NLB (Network Load Balancer) to balance the traffic over all available Pgpool-II instances without requiring a VIP.

![Failover Manager with Pgpool in cloud](images/efm_with_pgpool_on_cloud.png)

Expand Down Expand Up @@ -67,17 +62,17 @@ Manager for high availability using Pgpool, you must set the following
properties in the cluster properties file:

``` text
pgpool.enable = `true/false`
pgpool.enable = true
pcp.user = `User that would be invoking PCP commands`
pcp.user = User that would be invoking PCP commands
pcp.host = `Virtual IP that would be used by pgpool. Same as pgpool parameter 'delegate_IP'`
pcp.host = Virtual IP of PgPool or IP of NLB
pcp.port = `The port on which pgpool listens for pcp commands`
pcp.port = 9898
pcp.pass.file = `Absolute path of PCPPASSFILE`
pcp.pass.file = Absolute path of PCPPASSFILE
pgpool.bin = `Absolute path of pgpool bin directory`
pgpool.bin = Absolute path of pgpool bin directory
```
### Configuring Pgpool

Expand Down Expand Up @@ -168,8 +163,7 @@ file:

- The properties `backend_hostname0`, `backend_hostname1`,
`backend_hostname2`, and so on are shared properties (in EFM terms)
and should hold the same value for all the nodes in the `pgpool.conf`
file.
and should hold the same value in the pgpool.conf file on all the Pgpool-II nodes.

- Update the correct interface value in `if_ *` and `arping` cmd props
in the `pgpool.conf` file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ edb=# TRUNCATE edb_tbl;
TRUNCATE TABLE
```

Continuation of the audit log file now appears as follows. The last two entries representing the second case show only the ``SELECT * FROM edb_tbl` and `TRUNCATE edb_tbl` statements. The `CREATE TABLE edb_tbl` and `INSERT INTO edb_tbl statements` were not audited.
Continuation of the audit log file now appears as follows. The last two entries representing the second case show only the `SELECT * FROM edb_tbl` and `TRUNCATE edb_tbl` statements. The `CREATE TABLE edb_tbl` and `INSERT INTO edb_tbl` statements were not audited.

```text
2017-07-13 15:26:17.426 EDT,"enterprisedb","auditdb",4024,"[local]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ edb=# SELECT * FROM collate_tbl ORDER BY c2 COLLATE

The following query sorts on column `c2` using collation `icu_collate_ignore_white_sp`. The `AS` and `T0020` attributes of the collation cause variable characters with code points less than or equal to hexadecimal `0020` to be ignored while variable characters with code points greater than hexadecimal `0020` are included in the sort.

The row with `id` value of `11`, which starts with a space character (hexadecimal `0020`) sorts with the letter `B`. The rows with id values of `9` and `10`, which start with visible punctuation marks greater than hexadecimal `0020`, appear at the beginning of the sort list as these particular variable characters are included in the sort order at the same level when comparing base characters.
The row with `id` value of `11`, which starts with a space character (hexadecimal `0020`) sorts with the letter `B`. The rows with `id` values of `9` and `10`, which start with visible punctuation marks greater than hexadecimal `0020`, appear at the beginning of the sort list as these particular variable characters are included in the sort order at the same level when comparing base characters.

```text
edb=# SELECT * FROM collate_tbl ORDER BY c2 COLLATE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ edb=# TRUNCATE edb_tbl;
TRUNCATE TABLE
```

Continuation of the audit log file now appears as follows. The last two entries representing the second case show only the `SET default_with_rowids TO TRUE`, `SELECT * FROM edb_tbl` and `TRUNCATE edb_tbl` statements. The `CREATE TABLE edb_tbl` and `INSERT INTO edb_tbl statements` were not audited.
Continuation of the audit log file now appears as follows. The last two entries representing the second case show only the `SET default_with_rowids TO TRUE`, `SELECT * FROM edb_tbl` and `TRUNCATE edb_tbl` statements. The `CREATE TABLE edb_tbl` and `INSERT INTO edb_tbl` statements were not audited.

```text
2020-05-25 15:59:12.332 IST,"enterprisedb","auditdb",41837,"[local]",5ecb9dee.a36d,2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ edb=# SELECT * FROM collate_tbl ORDER BY c2 COLLATE

The following query sorts on column `c2` using collation `icu_collate_ignore_white_sp`. The `AS` and `T0020` attributes of the collation cause variable characters with code points less than or equal to hexadecimal `0020` to be ignored while variable characters with code points greater than hexadecimal `0020` are included in the sort.

The row with `id` value of `11`, which starts with a space character (hexadecimal `0020`) sorts with the letter `B`. The rows with id values of `9` and `10`, which start with visible punctuation marks greater than hexadecimal `0020`, appear at the beginning of the sort list as these particular variable characters are included in the sort order at the same level when comparing base characters.
The row with `id` value of `11`, which starts with a space character (hexadecimal `0020`) sorts with the letter `B`. The rows with `id` values of `9` and `10`, which start with visible punctuation marks greater than hexadecimal `0020`, appear at the beginning of the sort list as these particular variable characters are included in the sort order at the same level when comparing base characters.

```text
edb=# SELECT * FROM collate_tbl ORDER BY c2 COLLATE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,12 @@ $ java -jar edb-repcli.jar -confschedulemmr 6 -pubname emp_pub \
> -daily 8 00
Configuring scheduler ...
Job is successfully scheduled.
<<<<<<< Updated upstream
```

In the following example, the schedule is removed from publication `emp_pub`.

```text
$ java -jar edb-repcli.jar -confscheduleMMR 6 -pubname emp_pub \
=======
In the following example, the schedule is removed from publication emp_pub.
$ java -jar edb-repcli.jar -confschedulemmr 6 -pubname emp_pub \
>>>>>>> Stashed changes
> -repsvrfile ~/pubsvrfile.prop \
> -remove
Configuring scheduler ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Please contact your EnterpriseDB Account Manager or [sales@enterprisedb.com](mai

**Supported Operating Systems Versions**

- Centos or RHEL or OEL 7 and 8
- Centos or RHEL or OL 7 and 8
- CentOS or RHEL PPCLE 7
- SLES 12 SP5
- Debian 9 and 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,13 +442,13 @@ If you are using StackBuilder Plus to add Migration Toolkit to your EDB Postgres
!!! Note
If you are using Stack Builder to add Migration Toolkit to your PostgreSQL installation, expand the `EnterpriseDB Tools` node of the tree control (`located under the Registration-required and trial productsnode`), and select `Migration Toolkit` checkbox. Click `Next` to continue.

![The Stack Builder application selection window.](images/installing_mtk_sbp_categories_55.png)
![The Stack Builder application selection window.](images/installing_mtk_sbp_categories_3.png)

*The Stack Builder application selection window*

Confirm that Migration Toolkit is included in the `Selected Packages` list and that the `Download directory` field contains an acceptable download location.

![The Stack Builder selection confirmation window.](images/installing_mtk_sbp_selected_packages_55.png)
![The Stack Builder selection confirmation window.](images/installing_mtk_sbp_selected_packages_2.png)

*The Stack Builder selection confirmation window*

Expand Down
Loading

0 comments on commit 491c1f4

Please sign in to comment.