diff --git a/docs/src/database_import.md b/docs/src/database_import.md index f8bba32c4a..3308b5f6f1 100644 --- a/docs/src/database_import.md +++ b/docs/src/database_import.md @@ -267,3 +267,21 @@ topic is beyond the scope of CloudNativePG, we recommend that you reduce unnecessary writes in the checkpoint area by tuning Postgres GUCs like `shared_buffers`, `max_wal_size`, `checkpoint_timeout` directly in the `Cluster` configuration. + +## Online Import and Upgrades + +Logical replication offers a powerful way to import any PostgreSQL database +accessible over the network using the following approach: + +- **Import Bootstrap with Schema-Only Option**: Initialize the schema in the + target database before replication begins. +- **`Subscription` Resource**: Set up continuous replication to synchronize + data changes. + +This technique can also be leveraged for performing major PostgreSQL upgrades +with minimal downtime, making it ideal for seamless migrations and system +upgrades. + +For more details, including limitations and best practices, refer to the +[Logical Replication](logical_replication.md) section in the documentation. + diff --git a/docs/src/index.md b/docs/src/index.md index 815dc0af85..06dec9712e 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -96,12 +96,15 @@ Additionally, the community provides images for the [PostGIS extension](postgis. * In-place or rolling updates for operator upgrades * TLS connections and client certificate authentication * Support for custom TLS certificates (including integration with cert-manager) -* Continuous WAL archiving to an object store (AWS S3 and S3-compatible, Azure Blob Storage, and Google Cloud Storage) +* Continuous WAL archiving to an object store (AWS S3 and S3-compatible, Azure + Blob Storage, and Google Cloud Storage) * Backups on volume snapshots (where supported by the underlying storage classes) * Backups on object stores (AWS S3 and S3-compatible, Azure Blob Storage, and Google Cloud Storage) * Full recovery and Point-In-Time recovery from an existing backup on volume snapshots or object stores * Offline import of existing PostgreSQL databases, including major upgrades of PostgreSQL -* Online import of existing PostgreSQL databases, including major upgrades of PostgreSQL, through PostgreSQL native logical replication (imperative, via the `cnpg` plugin) +* Online import of existing PostgreSQL databases, including major upgrades of + PostgreSQL, through PostgreSQL native logical replication (declarative, via + the `Subscription` resource) * Fencing of an entire PostgreSQL cluster, or a subset of the instances in a declarative way * Hibernation of a PostgreSQL cluster in a declarative way * Support for quorum-based and priority-based Synchronous Replication diff --git a/docs/src/operator_capability_levels.md b/docs/src/operator_capability_levels.md index 3ef8b0f5d8..5008d33b8c 100644 --- a/docs/src/operator_capability_levels.md +++ b/docs/src/operator_capability_levels.md @@ -590,6 +590,15 @@ and makes the use of the underlying PostgreSQL resources more efficient. Instead of connecting directly to a PostgreSQL service, applications can now connect to the PgBouncer service and start reusing any existing connection. +### Logical Replication + +CloudNativePG supports PostgreSQL's logical replication in a declarative manner +using `Publication` and `Subscription` custom resource definitions. + +Logical replication is particularly useful together with the import facility +for online data migrations (even from public DBaaS solutions) and major +PostgreSQL upgrades. + ## Level 4: Deep insights Capability level 4 is about *observability*: monitoring,