Skip to content

Commit 5ddf8f7

Browse files
committed
Merge branch 'master' into dle-4-0
2 parents 7488b93 + 2a45ae3 commit 5ddf8f7

File tree

150 files changed

+9553
-6351
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+9553
-6351
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ci_access:
2+
projects:
3+
- id: postgres-ai/database-lab

README.md

Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ Try it yourself right now:
6464
- [Pricing](https://postgres.ai/pricing) (starting at $62/month)
6565
- [Doc: How to install DBLab SE](https://postgres.ai/docs/how-to-guides/administration/install-dle-from-postgres-ai)
6666
- Demo: https://demo.aws.postgres.ai (use the token `demo-token` to access)
67-
- if you are looking for DBLab 4.0, with branching and snapshotting support in API/CLI/UI, check out this demo instance: https://branching.aws.postgres.ai:446/instance, use the token `demo-token` to enter
67+
- Looking for a free version? Install DBLab Community Edition by [following this tutorial](https://postgres.ai/docs/tutorials/database-lab-tutorial)
6868

6969
## How it works
70-
Thin cloning is fast because it uses [Copy-on-Write (CoW)](https://en.wikipedia.org/wiki/Copy-on-write#In_computer_storage). DBLab supports two technologies to enable CoW and thin cloning: [ZFS](https://en.wikipedia.org/wiki/ZFS) (default) and [LVM](https://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux)).
70+
Thin cloning is fast because it is based on [Copy-on-Write (CoW)](https://en.wikipedia.org/wiki/Copy-on-write#In_computer_storage). DBLab employs two technologies for enabling thin cloning: [ZFS](https://en.wikipedia.org/wiki/ZFS) (default) and [LVM](https://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux)).
7171

7272
Using ZFS, DBLab routinely takes new snapshots of the data directory, managing a collection of them and removing old or unused ones. When requesting a fresh clone, users have the option to select their preferred snapshot.
7373

@@ -87,33 +87,39 @@ Read more:
8787
- GitLab: [How GitLab iterates on SQL performance optimization workflow to reduce downtime risks](https://postgres.ai/resources/case-studies/gitlab)
8888

8989
## Features
90-
- Blazing-fast cloning of Postgres databases – a few seconds to create a new clone ready to accept connections and queries, regardless of database size.
91-
- The theoretical maximum number of snapshots and clones is 2<sup>64</sup> ([ZFS](https://en.wikipedia.org/wiki/ZFS), default).
92-
- The theoretical maximum size of PostgreSQL data directory: 256 quadrillion zebibytes, or 2<sup>128</sup> bytes ([ZFS](https://en.wikipedia.org/wiki/ZFS), default).
93-
- PostgreSQL major versions supported: 9.6–14.
94-
- Two technologies are supported to enable thin cloning ([CoW](https://en.wikipedia.org/wiki/Copy-on-write)): [ZFS](https://en.wikipedia.org/wiki/ZFS) and [LVM](https://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux)).
95-
- All components are packaged in Docker containers.
96-
- UI to make manual work more convenient.
97-
- API and CLI to automate the work with DBLab snapshots, branches, and clones (Postgres endpoints).
98-
- By default, PostgreSQL containers include many popular extensions ([docs](https://postgres.ai/docs/database-lab/supported-databases#extensions-included-by-default)).
99-
- PostgreSQL containers can be customized ([docs](https://postgres.ai/docs/database-lab/supported-databases#how-to-add-more-extensions)).
100-
- Source database can be located anywhere (self-managed Postgres, AWS RDS, GCP CloudSQL, Azure, Timescale Cloud, and so on) and does NOT require any adjustments. There are NO requirements to install ZFS or Docker to the source (production) databases.
101-
- Initial data provisioning can be done at either the physical (pg_basebackup, backup / archiving tools such as WAL-G or pgBackRest) or logical (dump/restore directly from the source or from files stored at AWS S3) level.
102-
- For logical mode, partial data retrieval is supported (specific databases, specific tables).
103-
- For physical mode, a continuously updated state is supported ("sync container"), making DBLab a specialized version of standby Postgres.
104-
- For logical mode, periodic full refresh is supported, automated, and controlled by DBLab. It is possible to use multiple disks containing different versions of the database, so full refresh won't require downtime.
105-
- Fast Point in Time Recovery (PITR) to the points available in DBLab snapshots.
106-
- Unused clones are automatically deleted.
107-
- "Deletion protection" flag can be used to block automatic or manual deletion of clones.
108-
- Snapshot retention policies supported in DBLab configuration.
109-
- Persistent clones: clones survive DBLab restarts (including full VM reboots).
110-
- The "reset" command can be used to switch to a different version of data.
111-
- DB Migration Checker component collects various artifacts useful for DB testing in CI ([docs](https://postgres.ai/docs/db-migration-checker)).
112-
- SSH port forwarding for API and Postgres connections.
113-
- Docker container config parameters can be specified in the DBLab config.
114-
- Resource usage quotas for clones: CPU, RAM (container quotas, supported by Docker)
115-
- Postgres config parameters can be specified in the DBLab config (separately for clones, the "sync" container, and the "promote" container).
116-
- Monitoring: auth-free `/healthz` API endpoint, extended `/status` (requires auth), [Netdata module](https://gitlab.com/postgres-ai/netdata_for_dle).
90+
- Speed & scale
91+
- Blazing-fast cloning of Postgres databases – clone in seconds, irrespective of database size
92+
- Theoretical max of snapshots/clones: 2<sup>64</sup> ([ZFS](https://en.wikipedia.org/wiki/ZFS), default)
93+
- Maximum size of PostgreSQL data directory: 256 quadrillion zebibytes, or 2<sup>128</sup> bytes ([ZFS](https://en.wikipedia.org/wiki/ZFS), default)
94+
- Support & technologies
95+
- Supported PostgreSQL versions: 9.6–17
96+
- Thin cloning ([CoW](https://en.wikipedia.org/wiki/Copy-on-write)) technologies: [ZFS](https://en.wikipedia.org/wiki/ZFS) and [LVM](https://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux))
97+
- UI for manual tasks and API & CLI for automation
98+
- Packaged in Docker containers for all components
99+
- Postgres containers
100+
- Popular extensions including contrib modules, pgvector, HypoPG and many others ([docs](https://postgres.ai/docs/database-lab/supported-databases#extensions-included-by-default))
101+
- Customization capabilities for containers ([docs](https://postgres.ai/docs/database-lab/supported-databases#how-to-add-more-extensions))
102+
- Docker container and Postgres config parameters in DBLab config
103+
- Source database requirements
104+
- Location flexibility: self-managed Postgres, AWS RDS, GCP CloudSQL, Azure, etc. No source adjustments needed
105+
- No ZFS or Docker requirements for source databases
106+
- Data provisioning & retrieval
107+
- Physical (pg_basebackup, WAL-G, pgBackRest) and logical (dump/restore) provisioning
108+
- Partial data retrieval in logical mode (specific databases/tables)
109+
- Continuous update in physical mode
110+
- Periodic full refresh in logical mode without downtime
111+
- Recovery & management
112+
- Fast Point in Time Recovery (PITR) for physical mode
113+
- Auto-deletion of unused clones
114+
- Snapshot retention policies in DBLab configuration
115+
- Clones
116+
- "Deletion protection" for preventing clone deletion
117+
- Persistent clones withstand DBLab restarts
118+
- "Reset" command for data version switching
119+
- Resource quotas: CPU, RAM
120+
- Monitoring & security
121+
- `/healthz` API endpoint (no auth), extended `/status` endpoint ([API docs](https://api.dblab.dev))
122+
- Netdata module for insights
117123

118124
## How to contribute
119125
### Support us on GitHub/GitLab
@@ -182,7 +188,7 @@ More you can find in [the "How-to guides" section](https://postgres.ai/docs/how-
182188
## License
183189
DBLab source code is licensed under the OSI-approved open source license [Apache 2.0](https://opensource.org/license/apache-2-0/).
184190

185-
Reach out to the Postgres.ai team if you use or want to start using DBLab Standard Edition (DBLab SE) or Enterprise Edition (DBLab EE): [Contact page](https://postgres.ai/contact).
191+
Reach out to the Postgres.ai team if you want a trial or commercial license that does not contain the GPL clauses: [Contact page](https://postgres.ai/contact).
186192

187193
## Community & Support
188194
- ["Database Lab Engine Community Covenant Code of Conduct"](./CODE_OF_CONDUCT.md)

engine/.gitlab-ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,12 @@ bash-test-15:
467467
bash-test-16:
468468
<<: *bash_test
469469
variables:
470-
POSTGRES_VERSION: 16rc1
470+
POSTGRES_VERSION: 16
471+
472+
bash-test-17:
473+
<<: *bash_test
474+
variables:
475+
POSTGRES_VERSION: 17rc1
471476

472477
integration-test:
473478
services:

engine/api/swagger-spec/dblab_server_swagger.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ externalDocs:
2121
url: https://gitlab.com/postgres-ai/docs/tree/master/docs/database-lab
2222

2323
servers:
24-
- url: "https://demo.aws.postgres.ai:446"
24+
- url: "https://demo.aws.postgres.ai/api"
2525
description: "DBLab 3.x demo server; token: 'demo-token'"
2626
x-examples:
2727
Verification-Token: "demo-token"

engine/configs/config.example.logical_generic.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,13 @@ databaseContainer: &db_container
9898
# We need to specify which Postgres Docker image is to be used for that.
9999
# The default is the extended Postgres image built on top of the official Postgres image
100100
# (See https://postgres.ai/docs/database-lab/supported_databases).
101-
# It is possible to choose any custom or official Docker image that runs Postgres. Our Dockerfile
102-
# (See https://gitlab.com/postgres-ai/custom-images/-/tree/master/extended)
103-
# is recommended in case if customization is needed.
104-
dockerImage: "postgresai/extended-postgres:15-0.4.1"
101+
#
102+
# For paid customers, Postgres.AI maintains a set of images compatible with
103+
# RDS and RDS Aurora, GCP CloudSQL, Heroku, Timescale Cloud, Supabase, PostGIS.
104+
#
105+
# IMPORTANT: Postgres version of this image should match the source's Postgres version.
106+
# For logical mode, it is a recommendation. For physical mode, it is a *requirement*.
107+
dockerImage: "postgresai/extended-postgres:16-0.5.0"
105108

106109
# Container parameters, see
107110
# https://docs.docker.com/engine/reference/run/#runtime-constraints-on-resources

engine/configs/config.example.logical_rds_iam.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,13 @@ databaseContainer: &db_container
9797
# We need to specify which Postgres Docker image is to be used for that.
9898
# The default is the extended Postgres image built on top of the official Postgres image
9999
# (See https://postgres.ai/docs/database-lab/supported_databases).
100-
# It is possible to choose any custom or official Docker image that runs Postgres. Our Dockerfile
101-
# (See https://gitlab.com/postgres-ai/custom-images/-/tree/master/extended)
102-
# is recommended in case if customization is needed.
103-
dockerImage: "postgresai/extended-postgres:15-0.4.1"
100+
#
101+
# For paid customers, Postgres.AI maintains a set of images compatible with
102+
# RDS and RDS Aurora, GCP CloudSQL, Heroku, Timescale Cloud, Supabase, PostGIS.
103+
#
104+
# IMPORTANT: Postgres version of this image should match the source's Postgres version.
105+
# For logical mode, it is a recommendation. For physical mode, it is a *requirement*.
106+
dockerImage: "postgresai/extended-postgres:16-0.5.0"
104107

105108
# Custom parameters for containers with PostgreSQL, see
106109
# https://docs.docker.com/engine/reference/run/#runtime-constraints-on-resources

engine/configs/config.example.physical_generic.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,13 @@ databaseContainer: &db_container
9797
# We need to specify which Postgres Docker image is to be used for that.
9898
# The default is the extended Postgres image built on top of the official Postgres image
9999
# (See https://postgres.ai/docs/database-lab/supported_databases).
100-
# Any custom or official Docker image that runs Postgres. Our Dockerfile
101-
# (See https://gitlab.com/postgres-ai/custom-images/-/tree/master/extended)
102-
# is recommended in case if customization is needed.
103-
dockerImage: "postgresai/extended-postgres:15-0.4.1"
100+
#
101+
# For paid customers, Postgres.AI maintains a set of images compatible with
102+
# RDS and RDS Aurora, GCP CloudSQL, Heroku, Timescale Cloud, Supabase, PostGIS.
103+
#
104+
# IMPORTANT: Postgres version of this image should match the source's Postgres version.
105+
# For logical mode, it is a recommendation. For physical mode, it is a *requirement*.
106+
dockerImage: "postgresai/extended-postgres:16-0.5.0"
104107

105108
# Custom parameters for containers with PostgreSQL, see
106109
# https://docs.docker.com/engine/reference/run/#runtime-constraints-on-resources

engine/configs/config.example.physical_pgbackrest.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,13 @@ databaseContainer: &db_container
9797
# We need to specify which Postgres Docker image is to be used for that.
9898
# The default is the extended Postgres image built on top of the official Postgres image
9999
# (See https://postgres.ai/docs/database-lab/supported_databases).
100-
# Any custom or official Docker image that runs Postgres. Our Dockerfile
101-
# (See https://gitlab.com/postgres-ai/custom-images/-/tree/master/extended)
102-
# is recommended in case if customization is needed.
103-
dockerImage: "postgresai/extended-postgres:15-0.4.1"
100+
#
101+
# For paid customers, Postgres.AI additionally maintains a set of images compatible with
102+
# RDS and RDS Aurora, GCP CloudSQL, Heroku, Timescale Cloud, Supabase, PostGIS.
103+
#
104+
# IMPORTANT: Postgres version of this image should match the source's Postgres version.
105+
# For logical mode, it is a recommendation. For physical mode, it is a *requirement*.
106+
dockerImage: "postgresai/extended-postgres:16-0.5.0"
104107

105108
# Custom parameters for containers with PostgreSQL, see
106109
# https://docs.docker.com/engine/reference/run/#runtime-constraints-on-resources

engine/configs/config.example.physical_walg.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,13 @@ databaseContainer: &db_container
9797
# We need to specify which Postgres Docker image is to be used for that.
9898
# The default is the extended Postgres image built on top of the official Postgres image
9999
# (See https://postgres.ai/docs/database-lab/supported_databases).
100-
# Any custom or official Docker image that runs Postgres. Our Dockerfile
101-
# (See https://gitlab.com/postgres-ai/custom-images/-/tree/master/extended)
102-
# is recommended in case if customization is needed.
103-
dockerImage: "postgresai/extended-postgres:15-0.4.1"
100+
#
101+
# For paid customers, Postgres.AI additionally maintains a set of images compatible with
102+
# RDS and RDS Aurora, GCP CloudSQL, Heroku, Timescale Cloud, Supabase, PostGIS.
103+
#
104+
# IMPORTANT: Postgres version of this image should match the source's Postgres version.
105+
# For logical mode, it is a recommendation. For physical mode, it is a *requirement*.
106+
dockerImage: "postgresai/extended-postgres:16-0.5.0"
104107

105108
# Custom parameters for containers with PostgreSQL, see
106109
# https://docs.docker.com/engine/reference/run/#runtime-constraints-on-resources
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# PostgreSQL Client Authentication Configuration File
2+
# ===================================================
3+
#
4+
# Refer to the "Client Authentication" section in the PostgreSQL
5+
# documentation for a complete description of this file. A short
6+
# synopsis follows.
7+
#
8+
# ----------------------
9+
# Authentication Records
10+
# ----------------------
11+
#
12+
# This file controls: which hosts are allowed to connect, how clients
13+
# are authenticated, which PostgreSQL user names they can use, which
14+
# databases they can access. Records take one of these forms:
15+
#
16+
# local DATABASE USER METHOD [OPTIONS]
17+
# host DATABASE USER ADDRESS METHOD [OPTIONS]
18+
# hostssl DATABASE USER ADDRESS METHOD [OPTIONS]
19+
# hostnossl DATABASE USER ADDRESS METHOD [OPTIONS]
20+
# hostgssenc DATABASE USER ADDRESS METHOD [OPTIONS]
21+
# hostnogssenc DATABASE USER ADDRESS METHOD [OPTIONS]
22+
#
23+
# (The uppercase items must be replaced by actual values.)
24+
#
25+
# The first field is the connection type:
26+
# - "local" is a Unix-domain socket
27+
# - "host" is a TCP/IP socket (encrypted or not)
28+
# - "hostssl" is a TCP/IP socket that is SSL-encrypted
29+
# - "hostnossl" is a TCP/IP socket that is not SSL-encrypted
30+
# - "hostgssenc" is a TCP/IP socket that is GSSAPI-encrypted
31+
# - "hostnogssenc" is a TCP/IP socket that is not GSSAPI-encrypted
32+
#
33+
# DATABASE can be "all", "sameuser", "samerole", "replication", a
34+
# database name, a regular expression (if it starts with a slash (/))
35+
# or a comma-separated list thereof. The "all" keyword does not match
36+
# "replication". Access to replication must be enabled in a separate
37+
# record (see example below).
38+
#
39+
# USER can be "all", a user name, a group name prefixed with "+", a
40+
# regular expression (if it starts with a slash (/)) or a comma-separated
41+
# list thereof. In both the DATABASE and USER fields you can also write
42+
# a file name prefixed with "@" to include names from a separate file.
43+
#
44+
# ADDRESS specifies the set of hosts the record matches. It can be a
45+
# host name, or it is made up of an IP address and a CIDR mask that is
46+
# an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that
47+
# specifies the number of significant bits in the mask. A host name
48+
# that starts with a dot (.) matches a suffix of the actual host name.
49+
# Alternatively, you can write an IP address and netmask in separate
50+
# columns to specify the set of hosts. Instead of a CIDR-address, you
51+
# can write "samehost" to match any of the server's own IP addresses,
52+
# or "samenet" to match any address in any subnet that the server is
53+
# directly connected to.
54+
#
55+
# METHOD can be "trust", "reject", "md5", "password", "scram-sha-256",
56+
# "gss", "sspi", "ident", "peer", "pam", "ldap", "radius" or "cert".
57+
# Note that "password" sends passwords in clear text; "md5" or
58+
# "scram-sha-256" are preferred since they send encrypted passwords.
59+
#
60+
# OPTIONS are a set of options for the authentication in the format
61+
# NAME=VALUE. The available options depend on the different
62+
# authentication methods -- refer to the "Client Authentication"
63+
# section in the documentation for a list of which options are
64+
# available for which authentication methods.
65+
#
66+
# Database and user names containing spaces, commas, quotes and other
67+
# special characters must be quoted. Quoting one of the keywords
68+
# "all", "sameuser", "samerole" or "replication" makes the name lose
69+
# its special character, and just match a database or username with
70+
# that name.
71+
#
72+
# ---------------
73+
# Include Records
74+
# ---------------
75+
#
76+
# This file allows the inclusion of external files or directories holding
77+
# more records, using the following keywords:
78+
#
79+
# include FILE
80+
# include_if_exists FILE
81+
# include_dir DIRECTORY
82+
#
83+
# FILE is the file name to include, and DIR is the directory name containing
84+
# the file(s) to include. Any file in a directory will be loaded if suffixed
85+
# with ".conf". The files of a directory are ordered by name.
86+
# include_if_exists ignores missing files. FILE and DIRECTORY can be
87+
# specified as a relative or an absolute path, and can be double-quoted if
88+
# they contain spaces.
89+
#
90+
# -------------
91+
# Miscellaneous
92+
# -------------
93+
#
94+
# This file is read on server startup and when the server receives a
95+
# SIGHUP signal. If you edit the file on a running system, you have to
96+
# SIGHUP the server for the changes to take effect, run "pg_ctl reload",
97+
# or execute "SELECT pg_reload_conf()".
98+
#
99+
# ----------------------------------
100+
# Put your actual configuration here
101+
# ----------------------------------
102+
#
103+
# If you want to allow non-local connections, you need to add more
104+
# "host" records. In that case you will also need to make PostgreSQL
105+
# listen on a non-local interface via the listen_addresses
106+
# configuration parameter, or via the -i or -h command line switches.
107+
108+
# CAUTION: Configuring the system for local "trust" authentication
109+
# allows any local user to connect as any PostgreSQL user, including
110+
# the database superuser. If you do not trust all your local users,
111+
# use another authentication method.
112+
113+
114+
# TYPE DATABASE USER ADDRESS METHOD
115+
116+
# "local" is for Unix domain socket connections only
117+
local all all trust
118+
# IPv4 local connections:
119+
host all all 127.0.0.1/32 trust
120+
# IPv6 local connections:
121+
host all all ::1/128 trust
122+
# Allow replication connections from localhost, by a user with the
123+
# replication privilege.
124+
local replication all trust
125+
host replication all 127.0.0.1/32 trust
126+
host replication all ::1/128 trust
127+
128+
host all all all scram-sha-256

0 commit comments

Comments
 (0)