Skip to content

Commit bb0a17b

Browse files
djw-mJagdish-Kewat-EDBgithub-actions[bot]ibarwick
committed
Docs 1464 pgd installation updates (#6800)
* Reorganise and genericise Signed-off-by: Dj Walker-Morgan <[email protected]> * Added essential durability Signed-off-by: Dj Walker-Morgan <[email protected]> * misc fixes Signed-off-by: Dj Walker-Morgan <[email protected]> * Tidy up Signed-off-by: Dj Walker-Morgan <[email protected]> * First draft of uuid docs Signed-off-by: Dj Walker-Morgan <[email protected]> * Fix from review Signed-off-by: Dj Walker-Morgan <[email protected]> * DOCS-1532-pgd-6-0-release-notes (#6766) * First draft Signed-off-by: Dj Walker-Morgan <[email protected]> * Fixups on list Signed-off-by: Dj Walker-Morgan <[email protected]> * Add the release notes for PGD CLI changes * update generated release notes * Add the release note for sorted output for cli * update generated release notes * Address review comments * update generated release notes * Add missing relnotes These had not yet been carried over from the BDR source. * update generated release notes * Add BDR-5401 Signed-off-by: Dj Walker-Morgan <[email protected]> * update generated release notes * Vadim's notes added Signed-off-by: Dj Walker-Morgan <[email protected]> --------- Signed-off-by: Dj Walker-Morgan <[email protected]> Co-authored-by: Jagdish Kewat <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ian Barwick <[email protected]> * Review fixes regroups Signed-off-by: Dj Walker-Morgan <[email protected]> * Tidy essential architecture languages Signed-off-by: Dj Walker-Morgan <[email protected]> * SOP placeholders Signed-off-by: Dj Walker-Morgan <[email protected]> * Reference fixes and explanded intro Signed-off-by: Dj Walker-Morgan <[email protected]> * Reorganise and genericise Signed-off-by: Dj Walker-Morgan <[email protected]> * First draft of uuid docs Signed-off-by: Dj Walker-Morgan <[email protected]> * SOP placeholders Signed-off-by: Dj Walker-Morgan <[email protected]> * Reorganise and genericise Signed-off-by: Dj Walker-Morgan <[email protected]> --------- Signed-off-by: Dj Walker-Morgan <[email protected]> Co-authored-by: Jagdish Kewat <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ian Barwick <[email protected]>
1 parent 73dd19b commit bb0a17b

22 files changed

+378
-186
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: Standard PGD Architectures
3-
navTitle: Standard Architectures
2+
title: Standard PGD Architecture
3+
navTitle: Standard Architecture
44
navigation:
5-
- manual-deployments
65
---
76

87

98

9+
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
title: Durability in PGD Essential
3+
navTitle: Durability
4+
---
5+
6+
By default PGD Essential uses asynchronous replication between its nodes, but it can be configured to use synchronous replication as well. This allows for a high degree of flexibility in terms of data durability and availability. Asynchronous replication offers lower latency and higher throughput, while synchronous replication provides stronger consistency guarantees at the cost of performance. PGD Essential allows you to choose the replication strategy through the use of commit scopes.
7+
8+
## Commit Scopes
9+
10+
Commit scopes are a powerful feature of PGD Essential that allow you to control the durability and availability of your data. They enable you to specify the level of durability required for each transaction, allowing you to balance performance and consistency based on your application's needs. PGD Essential has four pre-defined commit scopes that you can use to control the durability of your transactions, among other things.
11+
12+
- local protect
13+
- lag protect
14+
- majority protect
15+
- adaptive protect
16+
17+
The predefined commit scopes in PGD Essential are designed to provide a balance between performance and data safety. You cannot add, remove or modify a PGD Essential commit scope. In PGD Expanded, you can create and manage your own commit scopes, allowing for more flexibility and control over the durability guarantees.
18+
19+
### `local protect`
20+
21+
This is the default commit scope for PGD Essential. It provides asynchronous commit with no durability guarantees. This means that transactions are considered committed as soon as they are written to the local node's WAL, without waiting for any confirmation from other nodes in the cluster.
22+
23+
### `lag protect`
24+
25+
This commit scope ensures that transactions are considered committed only when the lag time is within a specified limit (30 seconds in this case) and the commit delay is also within a specified limit (10 seconds in this case). This helps to prevent data loss in case of network issues or node failures.
26+
27+
### `majority protect`
28+
29+
This commit scope provides a durability guarantee based on the majority origin group. It ensures that transactions are considered committed only when they are confirmed by the majority of nodes in the origin group. This helps to ensure data consistency and durability in case of node failures or network issues.
30+
31+
### `adaptive protect`
32+
33+
This commit scope provides a more flexible durability guarantee. It allows transactions to be considered committed based on the majority origin group synchronous commit, but it can degrade to asynchronous commit if the transaction cannot be confirmed within a specified timeout (10 seconds in this case). This is useful in scenarios where network latency or node failures may cause delays in confirming transactions.
34+
35+
For more information on commit scopes, see the [Commit Scopes](/pgd/latest/reference/commit-scopes/) reference section and the [Predefined Commit Scopes](/pgd/latest/reference/commit-scopes/predefined-commit-scopes/) reference page.
36+
37+
## Using Commit Scopes
38+
39+
To use commit scopes in PGD Essential, you can specify the desired commit scope when executing a transaction. This allows you to control the durability and availability of your data based on your application's needs. For example, you can use the `lag protect` commit scope for transactions that require a higher level of durability, while using the `local protect` commit scope for transactions that prioritize performance over durability.
40+
41+
### Within a transaction
42+
43+
You can specify the commit scope for a transaction using the `SET LOCAL` command. For example, to use the `lag protect` commit scope for a transaction, you can execute the following commands:
44+
45+
```sql
46+
BEGIN;
47+
SET LOCAL bdr.commit_scope = 'lag protect';
48+
-- Your transaction statements here
49+
COMMIT;
50+
```
51+
52+
This will ensure that the transaction is committed with the specified commit scope, providing the desired level of durability and availability.
53+
54+
### For a session
55+
56+
You can also set the commit scope for the entire session using the `SET` command. For example, to set the `majority protect` commit scope for the entire session, you can execute the following command:
57+
58+
```sql
59+
SET bdr.commit_scope = 'majority protect';
60+
```
61+
62+
This will ensure that all transactions executed in the session will use the specified commit scope, providing the desired level of durability and availability.
63+
64+
### For a group
65+
66+
You can also set the default commit scope for a PGD group using the bdr.alter_node_group_option()` function. For example, to set the `adaptive protect` commit scope for a PGD group, you can execute the following command:
67+
68+
```sql
69+
SELECT bdr.alter_node_group_option(
70+
node_group_name:='mygroup',
71+
config_key:='default_commit_scope',
72+
config_value:='adaptive protect');
73+
```
74+
75+
This will ensure that all transactions executed in the specified PGD group will use the specified commit scope, providing the desired level of durability and availability, unless overridden by a session or transaction-level setting.
76+

product_docs/docs/pgd/6/essential-how-to/durability/index.mdx

Lines changed: 0 additions & 5 deletions
This file was deleted.

product_docs/docs/pgd/6/essential-how-to/index.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ navTitle: Essential How-To
44
navigation:
55
- architectures
66
- install
7+
- pgd-cli
78
- durability
89
- autopartition
910
- production-best-practices
10-
- sop
11+
- standard-operating-procedures
1112
description: Essential how-to guides for deploying and managing your PGD cluster.
1213
---
1314

product_docs/docs/pgd/6/essential-how-to/install/01-prerequisites.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Prerequisites for manual deployment
2+
title: 1 - Prerequisites for installation
33
navTitle: Prerequisites
44
---
55

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
title: Step 2 - Configure repositories
3+
navTitle: Configure repositories
4+
description: Configuring the repositories for the database and pgd software on each host.
5+
deepToC: true
6+
---
7+
8+
On each host which you want to use as a PGD data node, you need to install the database and the PGD software.
9+
10+
## Configure repositories
11+
12+
Set the following environment variables:
13+
14+
### `EDB_SUBSCRIPTION_TOKEN`
15+
16+
This is the token you received when you registered for the EDB subscription. It is used to authenticate your access to the EDB repository.
17+
18+
```bash
19+
export EDB_SUBSCRIPTION_TOKEN=<your-token>
20+
```
21+
22+
### `EDB_SUBSCRIPTION_PLAN`
23+
24+
This is the plan you subscribed to. It is used to determine which packages are available for installation. This is typically either `standard` or `enterprise`.
25+
26+
```bash
27+
# Set the EDB subscription plan
28+
export EDB_SUBSCRIPTION_PLAN=<your-plan>
29+
```
30+
31+
### `EDB_REPO_TYPE`
32+
33+
This is the type of package manager you use, which informs the installer which type of package you need. This can be `deb` for Ubuntu/Debian or `rpm` for CentOS/RHEL.
34+
35+
```bash
36+
export EDB_REPO_TYPE=<your-repo-type>
37+
```
38+
39+
## Install the repository/repositories
40+
41+
For PGD Essential, there is just one repository to install. For PGD Extended, there are two repositories to install.
42+
43+
<TabContainer>
44+
45+
<Tab title="PGD Essential" active>
46+
47+
Run the following command to install the EDB repository. This will add the EDB repository to your system's package manager, allowing you to install EDB packages.
48+
49+
```bash
50+
curl -1sSLf "https://downloads.enterprisedb.com/$EDB_SUBSCRIPTION_TOKEN/$EDB_SUBSCRIPTION_PLAN/setup.$EDB_REPO_TYPE.sh" | sudo -E bash
51+
```
52+
53+
</Tab>
54+
55+
<Tab title="Expanded">
56+
57+
```bash
58+
curl -1sSLf "https://downloads.enterprisedb.com/$EDB_SUBSCRIPTION_TOKEN/$EDB_SUBSCRIPTION_PLAN/setup.$EDB_REPO_TYPE.sh" | sudo -E bash
59+
curl -1sSLf "https://downloads.enterprisedb.com/$EDB_SUBSCRIPTION_TOKEN/$EDB_SUBSCRIPTION_PLAN/postgres_distributed/setup.$EDB_REPO_TYPE.sh" | sudo -E bash
60+
```
61+
62+
</Tab>
63+
64+
</TabContainer>
65+
66+
This command will download and run a script that configures your package manager to use the EDB repository. It will also install any necessary dependencies.
67+
68+
69+
## Worked example
70+
71+
In this example, we will configure the repositories on a CentOS/RHEL system that will allow us to install EDB Postgres Extended Server 17 with PGD Essential using an enterprise subscription.
72+
73+
### Set the environment variables
74+
75+
```bash
76+
export EDB_SUBSCRIPTION_TOKEN=XXXXXXXXXXXXXX
77+
export EDB_SUBSCRIPTION_PLAN=enterprise
78+
export EDB_REPO_TYPE=rpm
79+
curl -1sSLf " https://downloads.enterprisedb.com/$EDB_SUBSCRIPTION_TOKEN/$EDB_SUBSCRIPTION_PLAN/setup.$EDB_REPO_TYPE.sh" | sudo -E bash
80+
```
81+
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,15 @@
11
---
2-
title: Installing the database and pgd
2+
title: Step 3 - Installing the database and pgd
33
navTitle: Installing
44
description: Installing the database and pgd software on each host.
55
deepToC: true
66
---
77

88
On each host which you want to use as a PGD data node, you need to install the database and the PGD software.
99

10-
## Configure repositories
10+
After you have [configured the EDB repository](02-configure-repository), you can install the database and PGD software using your package manager.
1111

12-
Set the following environment variables:
13-
14-
### `EDB_SUBSCRIPTION_TOKEN`
15-
16-
This is the token you received when you registered for the EDB subscription. It is used to authenticate your access to the EDB repository.
17-
18-
```bash
19-
export EDB_SUBSCRIPTION_TOKEN=<your-token>
20-
```
21-
22-
### `EDB_SUBSCRIPTION_PLAN`
23-
24-
This is the plan you subscribed to. It is used to determine which packages are available for installation. This is typically either `standard` or `enterprise`.
25-
26-
```bash
27-
# Set the EDB subscription plan
28-
export EDB_SUBSCRIPTION_PLAN=<your-plan>
29-
```
30-
31-
### `EDB_REPO_TYPE`
32-
33-
This is the type of package manager you use, which informs the installer which type of package you need. This can be `deb` for Ubuntu/Debian or `rpm` for CentOS/RHEL.
34-
35-
```bash
36-
export EDB_REPO_TYPE=<your-repo-type>
37-
```
38-
39-
## Install the repository
40-
41-
Run the following command to install the EDB repository. This will add the EDB repository to your system's package manager, allowing you to install EDB packages.
42-
43-
```bash
44-
curl -1sSLf "https://downloads.enterprisedb.com/$EDB_SUBSCRIPTION_TOKEN/$EDB_SUBSCRIPTION_PLAN/setup.$EDB_REPO_TYPE.sh" | sudo -E bash
45-
```
46-
47-
Or for dev:
48-
49-
```bash
50-
curl -1sSLf "https://downloads.enterprisedb.com/$EDB_SUBSCRIPTION_TOKEN/dev/setup.$EDB_REPO_TYPE.sh" | sudo -E bash
51-
curl -1sSLf "https://downloads.enterprisedb.com/$EDB_SUBSCRIPTION_TOKEN/dev_postgres_distributed/setup.$EDB_REPO_TYPE.sh" | sudo -E bash
52-
```
53-
54-
This command will download and run a script that configures your package manager to use the EDB repository. It will also install any necessary dependencies.
55-
56-
## Install the database and PGD
57-
58-
After you have installed the EDB repository, you can install the database and PGD software using your package manager.
12+
## Install the database and PGD software
5913

6014
### Set the Postgres version
6115

@@ -75,33 +29,41 @@ export PGD_EDITION=essential
7529

7630
### Set the package names
7731

78-
#### EDB Postgres Advanced Server
32+
Set an environment variable to specify the package names for the database and PGD software. The package names will vary depending on the database you are using and the platform you are on.
33+
34+
<TabContainer>
7935

80-
<br/>
36+
<Tab title="EDB Postgres Advanced Server" active>
37+
<br/><br/><br/>
38+
39+
#### EDB Postgres Advanced Server
8140

8241
<TabContainer syncKey="platform">
8342

8443
<Tab title="Debian/Ubuntu" active>
8544

86-
```bash
87-
export EDB_PACKAGES="edb-as$PG_VERSION-server edb-pgd6-$PGD_EDITION-epas$PG_VERSION"
88-
```
45+
```shell
46+
export EDB_PACKAGES="edb-as$PG_VERSION-server edb-pgd6-$PGD_EDITION-epas$PG_VERSION"
47+
```
8948

9049
</Tab>
9150

9251
<Tab title="CentOS/RHEL">
9352

94-
```bash
95-
export EDB_PACKAGES="edb-as$PG_VERSION-server edb-pgd6-$PGD_EDITION-epas$PG_VERSION"
96-
```
53+
```shell
54+
export EDB_PACKAGES="edb-as$PG_VERSION-server edb-pgd6-$PGD_EDITION-epas$PG_VERSION"
55+
```
9756

9857
</Tab>
9958
</TabContainer>
10059

60+
</Tab>
61+
62+
<Tab title="EDB Postgres Extended">
63+
<br/><br/><br/>
64+
10165
#### EDB Postgres Extended
10266

103-
<br/>
104-
10567
<TabContainer syncKey="platform">
10668

10769
<Tab title="Debian/Ubuntu" active>
@@ -120,12 +82,12 @@ export PGD_EDITION=essential
12082

12183
</Tab>
12284
</TabContainer>
85+
</Tab>
12386

124-
#### Community PostgreSQL
125-
126-
127-
<br/>
87+
<Tab title="Community PostgreSQL">
88+
<br/><br/><br/>
12889

90+
#### Community PostgreSQL
12991

13092
<TabContainer syncKey="platform">
13193

@@ -143,27 +105,35 @@ export PGD_EDITION=essential
143105
```
144106

145107
</Tab>
146-
</TabContainer>
147108

148109
!!! Note
149110
Only PGD Expanded is available for Community PostgreSQL.
150111
!!!
151112

152-
### Install the database and PGD packages
113+
</TabContainer>
114+
115+
</Tab>
116+
117+
</TabContainer>
118+
119+
<br/><br/><br/>
120+
121+
### Run the installation command
122+
Run the installation command appropriate for your platform.
153123

154124
<TabContainer syncKey="platform">
155125

156126
<Tab title="Debian/Ubuntu" active>
157127

158-
```bash
128+
```shell
159129
sudo apt install -y $EDB_PACKAGES
160130
```
161131

162132
</Tab>
163133

164134
<Tab title="CentOS/RHEL">
165135

166-
```bash
136+
```shell
167137
sudo dnf install -y $EDB_PACKAGES
168138
```
169139

@@ -176,18 +146,11 @@ This command will install the specified packages and any dependencies they requi
176146

177147
## Worked example
178148

179-
In this example, we will install EDB Postgres Extended Server 17 with PGD Essential on a CentOS/RHEL system using an enterprise subscription.
180-
181-
### Set the environment variables
149+
In this example, we will install EDB Postgres Extended Server 17 with PGD Essential on a CentOS/RHEL system using an enterprise subscription using the repository confiuguration we set up in the [previous step's worked example](02-configure-repository#worked-example).
182150

183151
```bash
184-
export EDB_SUBSCRIPTION_TOKEN=XXXXXXXXXXXXXX
185-
export EDB_SUBSCRIPTION_PLAN=enterprise
186-
export EDB_REPO_TYPE=rpm
187152
export PG_VERSION=17
188153
export PGD_EDITION=essential
189154
export EDB_PACKAGES="edb-as$PG_VERSION edb-pgd6-$PGD_EDITION-epas$PG_VERSION"
190-
curl -1sSLf " https://downloads.enterprisedb.com/$EDB_SUBSCRIPTION_TOKEN/$EDB_SUBSCRIPTION_PLAN/setup.$EDB_REPO_TYPE.sh" | sudo -E bash
191155
sudo dnf install -y $EDB_PACKAGES
192156
```
193-

0 commit comments

Comments
 (0)