Skip to content

Commit b23f515

Browse files
authored
Merge pull request #6210 from EnterpriseDB/DOCS-1076-documenting-pgd-5-6-1-5-next
DOCS-1076 - Documenting PGD 5.6.1
2 parents 845f6a8 + 2cb24b6 commit b23f515

20 files changed

+949
-542
lines changed

product_docs/docs/pgd/5.6/commit-scopes/commit-scope-rules.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ If you're familiar with PostgreSQL's `synchronous_standby_names` feature, be awa
6161

6262
Currently, there are four commit scope kinds. The following is a summary, with links to more details.
6363

64-
### `SYNCHRONOUS_COMMIT`
64+
### `SYNCHRONOUS COMMIT`
6565

66-
Synchronous Commit is a commit scope option that's designed to behave like the native Postgres `synchronous_commit` option, but is usable from within the commit scope environment. Unlike `GROUP COMMIT`, it's a synchronous non-two-phase commit operation. Like `GROUP COMMIT`, it supports an optional `DEGRADE ON` clause. The commit scope group that comes before this option controls the groups and confirmation requirements the `SYNCHRONOUS_COMMIT` uses.
66+
Synchronous Commit is a commit scope option that's designed to behave like the native Postgres `synchronous_commit` option, but is usable from within the commit scope environment. Unlike `GROUP COMMIT`, it's a synchronous non-two-phase commit operation. Like `GROUP COMMIT`, it supports an optional `DEGRADE ON` clause. The commit scope group that comes before this option controls the groups and confirmation requirements the `SYNCHRONOUS COMMIT` uses.
6767

68-
For more details, see [`SYNCHRONOUS_COMMIT`](synchronous_commit).
68+
For more details, see [`SYNCHRONOUS COMMIT`](synchronous_commit).
6969

7070
### `GROUP COMMIT`
7171

@@ -94,7 +94,7 @@ For more details, see [`LAG CONTROL`](lag-control).
9494
Commit scope rules are composed of one or more operations that work in combination. Use an AND to form a single rule. For example:
9595

9696
```
97-
MAJORITY (Region_A) SYNCHRONOUS_COMMIT AND ANY 1 (Region_A) LAG CONTROL (MAX_LAG_SIZE = '50MB')
97+
MAJORITY (Region_A) SYNCHRONOUS COMMIT AND ANY 1 (Region_A) LAG CONTROL (MAX_LAG_SIZE = '50MB')
9898
```
9999

100100
The first operation sets up a synchronous commit against a majority of `Region_A`. The second operation adds lag control that starts pushing the commit delay up when any one of the nodes in `Region_A` has more than 50MB of lag. This combination of operations allows the lag control to operate when any node is lagging.

product_docs/docs/pgd/5.6/commit-scopes/degrading.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ navTitle: Degrading
44
deepToC: true
55
---
66

7-
`SYNCHRONOUS_COMMIT`, `GROUP COMMIT`, and `CAMO` each have the optional capability of degrading the requirements for transactions when particular performance thresholds are crossed.
7+
`SYNCHRONOUS COMMIT`, `GROUP COMMIT`, and `CAMO` each have the optional capability of degrading the requirements for transactions when particular performance thresholds are crossed.
88

99
When a node is applying a transaction and that transaction times out, it can be useful to trigger a process of degrading the requirements of the transaction to be completed, rather than just rolling back.
1010

@@ -24,31 +24,31 @@ This mechanism alone is insufficient for the intended behavior, as this alone wo
2424

2525
To avoid this, the PGD manager process also periodically (every 5s) checks the connectivity and apply rate (the one in [bdr.node_replication_rates](/pgd/latest/reference/catalogs-visible/#bdrnode_replication_rates)) and if there are commit scopes that would degrade at that point based on the current state of replication, they will be automatically degraded—such that any transaction using that commit scope when processing after that uses the degraded rule instead of waiting for timeout—until the manager process detects that replication is moving swiftly enough again.
2626

27-
## SYNCHRONOUS_COMMIT and GROUP COMMIT
27+
## SYNCHRONOUS COMMIT and GROUP COMMIT
2828

29-
Both `SYNCHRONOUS_COMMIT` and `GROUP COMMIT` have `timeout` and `require_write_lead` parameters, with defaults of `0` and `false` respectively. You should probably always set the `timeout`, as the default of `0` causes an instant degrade. You can also require that the write leader be the originator of the transaction in order to switch to degraded mode (again, default is `false`).
29+
Both `SYNCHRONOUS COMMIT` and `GROUP COMMIT` have `timeout` and `require_write_lead` parameters, with defaults of `0` and `false` respectively. You should probably always set the `timeout`, as the default of `0` causes an instant degrade. You can also require that the write leader be the originator of the transaction in order to switch to degraded mode (again, default is `false`).
3030

31-
Both `SYNCHRONOUS_COMMIT` and `GROUP COMMIT` also have options regarding which rule you can degrade to—which depends on which rule you are degrading from.
31+
Both `SYNCHRONOUS COMMIT` and `GROUP COMMIT` also have options regarding which rule you can degrade to—which depends on which rule you are degrading from.
3232

3333
First of all, you can degrade to asynchronous operation:
3434

3535
```sql
36-
ALL (left_dc) SYNCHRONOUS_COMMIT DEGRADE ON (timeout=20s) TO ASYNC
36+
ALL (left_dc) SYNCHRONOUS COMMIT DEGRADE ON (timeout=20s) TO ASYNC
3737
```
3838

3939
You can also degrade to a less restrictive commit group with the same commit scope kind (again as long as the kind is either `SYNCHRONOUS_COMMIT` or `GROUP COMMIT`). For instance, you can degrade as follows:
4040

4141
```sql
42-
ALL (left_dc) SYNCHRONOUS_COMMIT DEGRADE ON (timeout=20s) TO MAJORITY (left_dc) SYNCHRONOUS_COMMIT
42+
ALL (left_dc) SYNCHRONOUS COMMIT DEGRADE ON (timeout=20s) TO MAJORITY (left_dc) SYNCHRONOUS COMMIT
4343
```
4444

4545
or as follows:
4646

4747
```sql
48-
ANY 3 (left_dc) SYNCHRONOUS_COMMIT DEGRADE ON (timeout=20s) TO ANY 2 (left_dc) SYNCHRONOUS_COMMIT
48+
ANY 3 (left_dc) SYNCHRONOUS COMMIT DEGRADE ON (timeout=20s) TO ANY 2 (left_dc) SYNCHRONOUS COMMIT
4949
```
5050

51-
But you cannot degrade from `SYNCHRONOUS_COMMIT` to `GROUP COMMIT` or the other way around.
51+
But you cannot degrade from `SYNCHRONOUS COMMIT` to `GROUP COMMIT` or the other way around.
5252

5353
## CAMO
5454

product_docs/docs/pgd/5.6/commit-scopes/synchronous_commit.mdx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,30 @@ title: Synchronous Commit
33
deepToC: true
44
---
55

6-
Commit scope kind: `SYNCHRONOUS_COMMIT`
7-
alias: `SYNCHRONOUS COMMIT`
6+
Commit scope kind: `SYNCHRONOUS COMMIT`
87

98
## Overview
109

11-
PGD's `SYNCHRONOUS_COMMIT` is a commit scope kind that works in a way that's more like PostgreSQL's [`synchronous_commit`](https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-SYNCHRONOUS-COMMIT) option in its underlying operation. Unlike the PostgreSQL option, though, it's configured as a commit scope and is easier to configure and interact with in PGD.
10+
PGD's `SYNCHRONOUS COMMIT` is a commit scope kind that works in a way that's more like PostgreSQL's [`synchronous_commit`](https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-SYNCHRONOUS-COMMIT) option in its underlying operation. Unlike the PostgreSQL option, though, it's configured as a commit scope and is easier to configure and interact with in PGD.
1211

13-
Unlike other commit scope kinds, such as `GROUP COMMIT` and `CAMO`, the transactions in a `SYNCHRONOUS_COMMIT` operation aren't transformed into a two-phase commit (2PC) transaction. They work more like a Postgres `synchronous_commit`.
12+
Unlike other commit scope kinds, such as `GROUP COMMIT` and `CAMO`, the transactions in a `SYNCHRONOUS COMMIT` operation aren't transformed into a two-phase commit (2PC) transaction. They work more like a Postgres `synchronous_commit`.
1413

1514
## Example
1615

17-
In this example, when this commit scope is in use, any node in the `left_dc` group uses `SYNCHRONOUS_COMMIT` to replicate changes to the other nodes in the `left_dc` group. It looks for a majority of nodes in the `left_dc` group to confirm that they committed the transaction.
16+
In this example, when this commit scope is in use, any node in the `left_dc` group uses `SYNCHRONOUS COMMIT` to replicate changes to the other nodes in the `left_dc` group. It looks for a majority of nodes in the `left_dc` group to confirm that they committed the transaction.
1817

1918
```
2019
SELECT bdr.create_commit_scope(
2120
commit_scope_name := 'example_sc_scope',
2221
origin_node_group := 'left_dc',
23-
rule := 'MAJORITY (left_dc) SYNCHRONOUS_COMMIT',
22+
rule := 'MAJORITY (left_dc) SYNCHRONOUS COMMIT',
2423
wait_for_ready := true
2524
);
2625
```
2726

2827
## Configuration
2928

30-
`SYNCHRONOUS_COMMIT` supports the optional `DEGRADE ON` clause. See the [`SYNCHRONOUS_COMMIT`](/pgd/latest/reference/commit-scopes/#synchronous_commit) commit scope reference for specific configuration parameters or see [this section](degrading) regarding Degrade on options.
29+
`SYNCHRONOUS COMMIT` supports the optional `DEGRADE ON` clause. See the [`SYNCHRONOUS COMMIT`](/pgd/latest/reference/commit-scopes/#synchronous-commit) commit scope reference for specific configuration parameters or see [this section](degrading) regarding Degrade on options.
3130

3231
## Confirmation
3332

@@ -40,4 +39,7 @@ SELECT bdr.create_commit_scope(
4039

4140
## Details
4241

43-
Currently `SYNCHRONOUS_COMMIT` doesn't use the confirmation levels of the commit scope rule syntax.
42+
Currently `SYNCHRONOUS COMMIT` doesn't use the confirmation levels of the commit scope rule syntax.
43+
44+
In commit scope rules, the original keyword `SYNCHRONOUS_COMMIT` is now aliased to `SYNCHRONOUS COMMIT`. The use of a space instead of an underscore helps distinguish it from Postgres's native `SYNCHRONOUS_COMMIT`.
45+
Lines changed: 46 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,55 @@
11
---
2-
title: PGD compatibility by PostgreSQL version
2+
title: PGD compatibility
33
navTitle: Compatibility
44
description: Compatibility of EDB Postgres Distributed with different versions of PostgreSQL
5+
deepToC: true
56
---
67

7-
The following table shows the major versions of PostgreSQL and each version of EDB Postgres Distributed (PGD) they are compatible with.
8+
## PGD compatibility with PostgreSQL versions
89

9-
| Postgres<br/>Version | PGD 5 | PGD 4 | PGD 3.7 | PGD 3.6 |
10-
|----------------------|--------------|--------------|------------------|------------------|
11-
| 16 | [5.3+](/pgd/latest/) | | | |
12-
| 15 | [5](/pgd/latest/) | | | |
13-
| 14 | [5](/pgd/latest/) | [4](/pgd/4/) | | |
14-
| 13 | [5](/pgd/latest/) | [4](/pgd/4/) | [3.7](/pgd/3.7/) | |
15-
| 12 | [5](/pgd/latest/) | [4](/pgd/4/) | [3.7](/pgd/3.7/) | |
16-
| 11 | | | [3.7](/pgd/3.7/) | [3.6](/pgd/3.6/) |
17-
| 10 | | | | [3.6](/pgd/3.6/) |
10+
The following table shows the major versions of PostgreSQL and each version of EDB Postgres Distributed (PGD) they are compatible with.
1811

12+
| Postgres Version | PGD 5 | PGD 4 |
13+
|----------------------|------------------------|--------------|
14+
| 17 | [5.6.1+](/pgd/latest/) | |
15+
| 16 | [5.3+](/pgd/latest/) | |
16+
| 15 | [5](/pgd/latest/) | |
17+
| 14 | [5](/pgd/latest/) | [4](/pgd/4/) |
18+
| 13 | [5](/pgd/latest/) | [4](/pgd/4/) |
19+
| 12 | [5](/pgd/latest/) | [4](/pgd/4/) |
1920

2021

22+
23+
## PGD compatibility with operating systems and architectures
24+
25+
The following tables show the versions of EDB Postgres Distributed and their compatibility with various operating systems and architectures.
26+
27+
### Linux x86_64 (amd64)
28+
29+
| Operating System | PGD 5 | PGD 4 |
30+
|------------------------------------|-------|-------|
31+
| RHEL 8/9 | Yes | Yes |
32+
| Oracle Linux 8/9 | Yes | Yes |
33+
| Rocky Linux/AlmaLinux | Yes | Yes |
34+
| SUSE Linux Enterprise Server 15SP5 | Yes | Yes |
35+
| Ubuntu 20.04/22.04/24.04 | Yes | Yes |
36+
| Debian 11/12 | Yes | Yes |
37+
38+
### Linux ppc64le
39+
40+
| Operating System | PGD 5 | PGD 4 |
41+
|------------------|-------|-------|
42+
| RHEL 8/9 | Yes | No |
43+
44+
45+
### Linux arm64/aarch64
46+
47+
| Operating System | PGD 5&sup1; | PGD 4 |
48+
|------------------|-------|-------|
49+
| Debian 12 | Yes | No |
50+
| RHEL 9&sup2; | Yes | No |
51+
52+
&sup1; From PGD 5.6.1 onwards
53+
54+
&sup2; Postgres 12 is not supported on RHEL 9 on arm64/aarch64
55+

product_docs/docs/pgd/5.6/conflict-management/conflicts/02_types_of_conflict.mdx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,22 @@ To resolve this conflict type, you can also use column-level conflict resolution
3131

3232
You can effectively eliminate this type of conflict by using [global sequences](../../sequences/#pgd-global-sequences).
3333

34-
### INSERT operations that violate multiple UNIQUE constraints
34+
### INSERT operations that violate UNIQUE or EXCLUDE constraints
3535

36-
An `INSERT`/`INSERT` conflict can violate more than one `UNIQUE` constraint, of which one might be the `PRIMARY KEY`. If a new row violates more than one `UNIQUE` constraint and that results in a conflict against more than one other row, then applying the replication change produces a `multiple_unique_conflicts` conflict.
36+
An `INSERT`/`INSERT` conflict can violate more than one `UNIQUE` constraint, of which one might be the `PRIMARY KEY`.
37+
With the addition of `EXCLUDE` constraint support in PGD 5.6, an `INSERT`/`INSERT`conflict can also violate one or more `EXCLUDE` constraints.
3738

38-
In case of such a conflict, you must remove some rows for replication to continue. Depending on the resolver setting for `multiple_unique_conflicts`, the apply process either exits with error, skips the incoming row, or deletes some of the rows. The deletion tries to preserve the row with the correct `PRIMARY KEY` and delete the others.
39+
If a new row violates more than one `UNIQUE` constraint and that results in a conflict against more than one other row, or a new row violates more than one `EXCLUDE` constraint or a single `EXCLUDE` constraint, either of which results in a conflict against more than one other row, then applying the replication change produces a `multiple_unique_conflicts` conflict.
40+
41+
In case of such a conflict, you must remove some rows for replication to continue.
42+
Depending on the resolver setting for `multiple_unique_conflicts`, the apply process either exits with error, skips the incoming row, or deletes some of the rows.
43+
The deletion tries to preserve the row with the correct `PRIMARY KEY` and delete the others.
3944

4045
!!! Warning
41-
In case of multiple rows conflicting this way, if the result of conflict resolution is to proceed with the insert operation, some of the data is always deleted.
46+
In case of multiple rows conflicting this way, if the result of conflict resolution is to proceed with the insert operation, some of the data is always deleted.
47+
!!!
4248

43-
You can also define a different behavior using a conflict trigger.
49+
You can also define a different behavior using a [conflict trigger](/pgd/latest/striggers/#conflict-triggers).
4450

4551
### UPDATE/UPDATE conflicts
4652

@@ -165,9 +171,9 @@ changes, make those changes using Eager Replication.
165171
!!! Warning
166172
In case the conflict resolution of `update_pkey_exists` conflict results in update, one of the rows is always deleted.
167173

168-
### UPDATE operations that violate multiple UNIQUE constraints
174+
### UPDATE operations that violate UNIQUE or EXCLUDE constraints
169175

170-
Like [INSERT operations that violate multiple UNIQUE constraints](#insert-operations-that-violate-multiple-unique-constraints), when an incoming `UPDATE` violates more than one `UNIQUE` index (or the `PRIMARY KEY`), PGD raises a `multiple_unique_conflicts` conflict.
176+
Like [INSERT operations that violate multiple UNIQUE/EXLUDE constraints](#insert-operations-that-violate-unique-or-exclude-constraints), when an incoming `UPDATE` violates more than one `UNIQUE`/`EXCLUDE index (including the `PRIMARY KEY`) or violates a single `EXCLUDE` index such that more than one row is in conflict, PGD raises a `multiple_unique_conflicts` conflict.
171177

172178
PGD supports deferred unique constraints. If a transaction can commit on the source, then it applies cleanly on target, unless it sees conflicts. However, you can't use a deferred primary key as a REPLICA IDENTITY, so the use cases are already limited by that and the warning about using multiple unique constraints.
173179

product_docs/docs/pgd/5.6/ddl/ddl-command-handling.mdx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ under the following table.
118118
| CREATE STATISTICS | Y | Y | DDL |
119119
| CREATE SUBSCRIPTION | Y | Y | DDL |
120120
| CREATE SYNONYM | Y | Y | DDL |
121-
| CREATE TABLE | [Details](#bdr_ddl_allowed_CreateStmt) | Y | DDL |
121+
| CREATE TABLE | Y | Y | DDL |
122122
| CREATE TABLE AS | [Details](#bdr_ddl_allowed_CreateTableAsStmt) | Y | DDL |
123123
| CREATE TABLESPACE | Y | N | N |
124124
| CREATE TEXT SEARCH CONFIGURATION | Y | Y | DDL |
@@ -253,10 +253,12 @@ Some variants of `ALTER TABLE` currently aren't allowed on a PGD node:
253253
- `ADD COLUMN ... DEFAULT (non-immutable expression)` &mdash; This is not allowed because
254254
it currently results in different data on different nodes. See
255255
[Adding a column](ddl-workarounds/#adding-a-column) for a suggested workaround.
256-
- `ALTER TABLE ... SET WITH[OUT] OIDS` &mdash; Isn't supported for the same reasons
257-
as in `CREATE TABLE`.
256+
This can be overriden using `bdr.permit_unsafe_commands` if user is sure the command is
257+
safe.
258258
- `ALTER COLUMN ... SET STORAGE external` &mdash; Is rejected if the column is
259259
one of the columns of the replica identity for the table.
260+
This can be overriden using `bdr.permit_unsafe_commands` if user is sure the command is
261+
safe.
260262
- `RENAME` &mdash; Can't rename an Autopartitioned table.
261263
- `SET SCHEMA` &mdash; Can't set the schema of an Autopartitioned table.
262264
- `ALTER COLUMN ... TYPE` &mdash; Changing a column's type isn't supported if the
@@ -272,6 +274,8 @@ Some variants of `ALTER TABLE` currently aren't allowed on a PGD node:
272274
AccessExclusiveLock for extended periods on larger tables, so such commands
273275
are likely to be infeasible on highly available databases in any case.
274276
See [Changing a column's type](ddl-workarounds/#changing-a-columns-type) for a suggested workaround.
277+
This can be overriden using `bdr.permit_unsafe_commands` if user is sure the command is
278+
safe.
275279
- `ALTER TABLE ... ADD FOREIGN KEY` &mdash; Isn't supported if current user doesn't have
276280
permission to read the referenced table or if the referenced table
277281
has RLS restrictions enabled that the current user can't bypass.
@@ -500,13 +504,6 @@ break the replication due to the `writer` worker throwing the error: `cannot cha
500504
Generally `CREATE SEQUENCE` is supported, but when using global
501505
sequences, some options have no effect.
502506

503-
<div id='bdr_ddl_allowed_CreateStmt'></div>
504-
505-
### CREATE TABLE
506-
507-
Generally `CREATE TABLE` is supported, but `CREATE TABLE WITH OIDS` isn't
508-
allowed on a PGD node.
509-
510507
<div id='bdr_ddl_allowed_CreateTableAsStmt'></div>
511508

512509
### CREATE TABLE AS and SELECT INTO

product_docs/docs/pgd/5.6/decoding_worker.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Decoding worker
3+
description: Decoding worker in PGD reduces CPU overhead and increases replication throughput by enabling a optimized decoding worker process.
34
---
45

56
PGD provides an option to enable a decoding worker process that performs

0 commit comments

Comments
 (0)