You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/enterprise_edition/control_plane/self-hosting.md
+19-12Lines changed: 19 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ The following values should be set in `values.yaml`:
34
34
|-|-|
35
35
|`image.tag`| The Docker tag for the control plane image. |
36
36
|`ingress.host`| The DNS host for the control plane, e.g., `pgdog.database.internal`. |
37
-
|`env`| A key/value mapping of [environment varialbes](#configuration) passed to the control plane application. |
37
+
|`env`| A key/value mapping of [environment variables](#configuration) passed to the control plane application. |
38
38
39
39
For example:
40
40
@@ -44,26 +44,26 @@ image:
44
44
ingress:
45
45
host: pgdog.database.internal
46
46
env:
47
-
SESSION_KEY: 1b80a3cc1640a3[...]
47
+
DATABASE_URL: postgres://user:password@[...]
48
48
```
49
49
50
50
### Configuration
51
51
52
52
The control plane is configured via environment variables. The following variables are required for it to work correctly:
53
53
54
-
| Environment variable | Description |
55
-
|-|-|
56
-
| `DATABASE_URL` | URL pointing to the Postgres database used for storing control plane data. |
57
-
| `SESSION_KEY` | Secret key used to encrypt user session cookies. Can be any value, as long as it's at least 64 bytes. |
58
-
| `REDIS_URL` | URL pointing to the Redis database used for synchronization. |
59
-
| `FRONTEND_URL` | The URL where the frontend application is hosted. This defaults to `ingress.host` if you're using the Helm chart. |
54
+
| Environment variable | Description | Example |
55
+
|-|-|-|
56
+
| `DATABASE_URL` | URL pointing to the Postgres database used for storing control plane data. | `postgres://user:password@host:5432/db` |
57
+
| `SESSION_KEY` | Secret key used to encrypt user session cookies. Can be any value, as long as it's at least 64 bytes. | `abcsf32a[...]` |
58
+
| `REDIS_URL` | URL pointing to the Redis database used for synchronization. | `redis://127.0.0.1/0` |
59
+
| `FRONTEND_URL` | The URL where the frontend application is hosted. This defaults to `ingress.host` if you're using the Helm chart. | `http://pgdog.internal` |
60
60
61
61
!!! note "Helm chart"
62
-
If you're using the [Helm chart](#kubernetes), these are generated from settings in `values.yaml` and don't need to be configured manually.
62
+
If you're using the [Helm chart](#kubernetes), all variables except `DATABASE_URL` are generated from settings in `values.yaml` and don't need to be configured manually.
63
63
64
64
#### Session key
65
65
66
-
The control plane requires a 64 bytes randomly generated session key to encrypt user session cookies. You can generate one with just one line of Python:
66
+
The control plane requires a 64 bytes randomly generated session key to encrypt user session cookies. If you're not using our Helm chart, you can generate one with just one line of Python:
67
67
68
68
=== "Command"
69
69
```bash
@@ -76,14 +76,14 @@ The control plane requires a 64 bytes randomly generated session key to encrypt
76
76
77
77
### Authentication
78
78
79
-
The control plane web UI suppors two authentication methods:
79
+
The control plane web UI supports two authentication methods:
80
80
81
81
1. Email and password
82
82
2. OAuth2
83
83
84
84
Password authentication works out of the box and requires no additional setup beyond creating users via the [CLI](cli.md).
85
85
86
-
For OAuth2, you need to configure each provider, and depending on which provider you choose, different environment variables need to be set as well:
86
+
For OAuth2, you need to configure each provider, and depending on which provider you choose, different environment variables need to be set:
87
87
88
88
=== "Google"
89
89
| Environment variable | Description |
@@ -98,3 +98,10 @@ For OAuth2, you need to configure each provider, and depending on which provider
98
98
| `GITHUB_CLIENT_ID` | GitHub OAuth2 client identifier. You can obtain one by creating an OAuth application in the [Developer Settings](https://github.com/settings/developers) in your GitHub account. |
| `GITHUB_REDIRECT_URL` | OAuth redirect URL. It should be set to the following: `${FRONTEND_URL}/github/oauth/callback`. |
101
+
102
+
!!! note "OAuth2 redirect"
103
+
The redirect URL (e.g., `GOOGLE_REDIRECT_URL`) is set automatically by the Helm chart. You only need to set it if you're self-hosting using a different orchestration mechanism.
104
+
105
+
#### Creating users
106
+
107
+
You can create a user using the [CLI](cli.md) [`onboard`](cli.md#onboarding) command. It works for both password-based and OAuth2 authentication mechanisms.
This feature is still on the [roadmap](index.md#roadmap) and
9
+
hasn't been built yet.
10
+
11
+
Queries that create or update rows on multiple shards should be using [two-phase](../features/sharding/2pc.md) transactions. This ensures that table changes are atomic in all databases. The open source edition of PgDog supports this feature out of the box.
12
+
13
+
The Enterprise edition provides crash protection, in case PgDog itself is restarted or the hardware its running on fails, while in between phase one and phase two of the exchange. This guarantees all two-phase transactions are either committed or rolled back.
14
+
15
+
## How it works
16
+
17
+
Two-phase transactions are durable database objects. Once prepared, a 2pc transaction needs to be either committed or rolled back. If this doesn't happen, PostgreSQL won't be able to vacuum affected tables. If left unattended for a long period of time, this will cause a database shutdown.
18
+
19
+
### Durable two-phase
20
+
21
+
PgDog Enterprise nodes register each two-phase transaction with the [control plane](control_plane/index.md). When a PgDog process boots up, it will fetch all of its abandoned transactions from the control plane storage, and proceed to clean them up before serving query traffic.
The transaction identifiers and their state are saved in a separate PostgreSQL database. This provides a safety guarantee against control plane crashes as well.
28
+
29
+
## Status
30
+
31
+
This feature isn't built yet. We're planning on shipping it in Q2 2026.
Copy file name to clipboardExpand all lines: docs/enterprise_edition/index.md
+39-1Lines changed: 39 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,14 @@ icon: material/office-building
6
6
7
7
PgDog Enterprise is a version of PgDog that contains additional features for large-scale monitoring and deployment of sharded (and unsharded) PostgreSQL databases.
8
8
9
-
Unlike PgDog itself, PgDog Enterprise is closed source and available upon the purchase of a license. It comes with a control plane which provides real-time visibility into PgDog's operations and enterprise features.
9
+
Unlike PgDog itself, PgDog Enterprise is closed source and available upon the purchase of a license. It comes with a control plane which provides real-time visibility into PgDog's operations and enterprise features and dedicated support from the team that built PgDog.
10
10
11
11
## Features
12
12
13
13
| Feature | Description |
14
14
|-|-|
15
15
|[Control plane](control_plane/index.md)| Synchronize and monitor multiple PgDog processes. |
|[Active queries](insights/active_queries.md)| Real-time view into queries running through PgDog. |
17
18
|[Query plans](insights/query_plans.md)| Root cause slow queries and execution anomalies with real-time Postgres query plans, collected in the background. |
18
19
|[Real-time metrics](metrics.md)| All PgDog metrics, delivered with second-precision through a dedicated connection. |
@@ -40,6 +41,42 @@ The demo comes with the control plane, the web UI and PgDog configured as follow
40
41
41
42
For questions about the demo, PgDog Enterprise features, or pricing, [contact us](https://calendly.com/lev-pgdog/30min). PgDog can be deployed on-prem, in your cloud account, or entirely managed by us.
42
43
44
+
## Getting PgDog Enterprise
45
+
46
+
The Enterprise edition is available from two sources:
47
+
48
+
1. Our Docker repository
49
+
2. From source
50
+
51
+
### Docker repository
52
+
53
+
!!! note "Enterprise license"
54
+
Before deploying these images to production, make sure you purchased our Enterprise Edition license. You're welcome to use these for evaluation purposes, e.g., demo deployment or in a staging environment.
55
+
56
+
Both PgDog and the control plane are available as Docker images:
57
+
58
+
| Application | Repository |
59
+
|-|-|
60
+
| PgDog |`ghcr.io/pgdogdev/pgdog-enterprise`|
61
+
| Control plane |`ghcr.io/pgdogdev/pgdog-enterprise/control`|
62
+
63
+
If you're using our [Helm chart](../installation.md#kubernetes), you just need to change the `image.repository` and `image.tag` variables, for example:
64
+
65
+
```yaml
66
+
image:
67
+
repository: ghcr.io/pgdogdev/pgdog-enterprise
68
+
tag: 87a6bcae
69
+
```
70
+
71
+
For deploying the [control plane](control_plane/index.md), you have two options:
72
+
73
+
1. Use our managed deployment ([contact us](https://calendly.com/lev-pgdog/30min))
74
+
2. [Self-hosting](control_plane/self-hosting.md)
75
+
76
+
### From source
77
+
78
+
If you want to manage all aspects of deploying PgDog Enterprise, [get in touch](https://calendly.com/lev-pgdog/30min) and we'll provide you access to the source code via a GitHub deployment key. You'll receive updates at the same frequency as the Docker repository.
79
+
43
80
## Roadmap
44
81
45
82
PgDog Enterprise is new and in active development. A lot of the features we want aren't built yet:
@@ -49,3 +86,4 @@ PgDog Enterprise is new and in active development. A lot of the features we want
49
86
| QoS | Quality of service guarantees, incl. throttling on a per-user/database/query level. |
50
87
| AWS RDS integration | Deploy PgDog on top of AWS RDS, without the hassle of Kubernetes or manual configuration. |
51
88
| Automatic resharding | Detect hot shards and re-shard data without operator intervention. |
PgDog inspects the database schema in order to automatically detect sharded and [omnisharded](../features/sharding/omnishards.md) tables. When new tables are added or existing tables are changed, PgDog's snapshot of the schema needs to be refreshed.
8
+
9
+
The open source edition supports refreshing the schema for single-node deployments only. The Enterprise edition takes care of synchronizing schema updates across multiple PgDog nodes, ensuring consistent configuration.
10
+
11
+
## How it works
12
+
13
+
When a client executes a DDL command, e.g. `CREATE TABLE`, PgDog will send a notification to the [control plane](control_plane/index.md). The control plane will then trigger a schema reload across all registered PgDog nodes.
This process takes place in the background, so the schema snapshot across nodes is eventually consistent. This is sufficient for most applications, since migrations run as a separate process and application traffic doesn't use new tables for a considerable amount of time after the schema is changed. This gives PgDog ample time to refresh its schema snapshot.
20
+
21
+
### Configuration
22
+
23
+
Schema reloading on DDL is enabled by default. This is configurable in [`pgdog.toml`](../configuration/pgdog.toml/general.md#reload_schema_on_ddl):
24
+
25
+
```toml
26
+
[general]
27
+
reload_schema_on_ddl = true
28
+
```
29
+
30
+
In the open source edition, this reloads the schema on the same node only, while in the Enterprise edition, this triggers a schema reload on all PgDog nodes part of the same deployment.
0 commit comments