Skip to main content

Database Version Upgrades & Maintenance

Okustera Database-as-a-Service (DBaaS) provides declarative, self-service version upgrades and automated maintenance for tenant database clusters.

Whether applying security patches, upgrading minor versions with zero downtime, or transitioning between major versions, Okustera protects your workloads with automated pre-flight health checks, orchestrated rolling or blue-green execution, and automatic rollback safeguards.


1. Upgrade Categorization & Strategy Matrix​

Database engine upgrades fall into two operational tiers based on data compatibility and downtime impact:

Upgrade TierDescription & ScopeSupported EnginesApplication ImpactUpgrade Mechanism
Minor / Patch UpgradeBug fixes, security patches, and backward-compatible updates (e.g., PostgreSQL 16.2 → 16.5, ClickHouse 24.3.18 → 24.3.20, Qdrant 1.9.0 → 1.10.0, Valkey 7.2.4 → 7.2.5).PostgreSQL, DocumentDB, ClickHouse, Valkey, Qdrant, MySQLZero Downtime (< 1s graceful leader switchover for writes, 0s read drop)Automated in-place rolling update across cluster replicas.
Major Version UpgradeBreaking storage format changes and major feature releases (e.g., PostgreSQL 15 → 16 → 17, MySQL 8.0 → 8.4).PostgreSQL, DocumentDB, MySQLNear-Zero Downtime (< 5s cutover window)Declarative Blue-Green cluster provisioning with automated data synchronization.

2. Automated Pre-Flight Health Checks​

Before any upgrade begins, Okustera automatically evaluates mandatory pre-flight safety checks against your cluster. If any check fails, the upgrade is blocked before any instance is modified:

  • Quorum & Node Health: The primary instance and all standby replicas must be healthy and ready so rolling restarts never risk quorum loss.
  • Replication Lag: Streaming replication lag to standby replicas must be caught up so promoting a standby never drops committed transactions.
  • Storage Headroom: Sufficient free storage capacity (≥ 20% headroom) must be available to accommodate write-ahead logs, temporary sort files, and upgrade journaling.
  • Recent Verified Backup: A recent backup snapshot must exist as an instant fallback recovery point.
  • Concurrency Lock: No conflicting maintenance, volume expansion, or restore operation may be running concurrently on the cluster.

[!TIP] Emergency Override If an urgent security patch must be applied to an instance experiencing non-critical warnings, tenant administrators can pass skip_preflight=true via the API or toggle Emergency Override in the Cloud Portal. All overrides are recorded in the tenant audit log.


3. Upgrade Lifecycle & Automatic Rollback​

Every upgrade job follows a guarded, auditable lifecycle with real-time progress telemetry and automatic rollback protection:

  1. Pre-Flight Checks & Pre-Upgrade Snapshot: Validates cluster health, replication status, and storage headroom, then takes a pre-upgrade snapshot.
  2. Orchestrated Rollout: Patches standby replicas sequentially for minor upgrades, or provisions and synchronizes a parallel target cluster for major blue-green upgrades.
  3. Health Verification & Graceful Cutover: Verifies query health and replication parity, drains in-flight writes briefly, and promotes the upgraded primary.
  4. Automatic Rollback: If auto_rollback=true (enabled by default) and any verification check fails prior to completion, Okustera automatically reverts the cluster to its previous version and restores healthy replication.

4. How to Upgrade Your Database​

Method A: Cloud Portal UI​

  1. Navigate to Databases in the Okustera Cloud Portal.
  2. When a certified update is available for your cluster, an Upgrade Available badge appears next to the current version (e.g., current: v16.2, available: v16.5).
  3. Click Upgrade to open the upgrade wizard:
    • Target Version: Select from certified versions available for your engine.
    • Upgrade Tier: Review whether the upgrade uses Minor Rolling (zero downtime) or Major Migration (blue-green).
    • Pre-Flight Health Inspection: Review real-time pre-flight status.
    • Auto-Rollback Protection: Keep enabled (default) to automatically revert on health-check failure.
  4. Click Confirm Upgrade and monitor live rollout progress and logs in the Upgrade Jobs tab. You can also trigger a 1-Click Rollback if application regressions are detected.

Method B: DBaaS REST API​

Step 1: Discover Available Upgrade Candidates​

curl -X GET \
-H "Authorization: Bearer ${OKUSTERA_API_TOKEN}" \
https://portal.okustera.com/api/v1/dbaas/clusters/postgres/production/my-db/upgrade-candidates

Response:

{
"current_version": "16.2",
"candidates": [
{
"version": "16.5",
"tier": "minor_rolling",
"is_recommended": true,
"requires_downtime": false,
"breaking_changes": null,
"release_notes_url": "https://www.postgresql.org/docs/release/16.5/"
},
{
"version": "17.0",
"tier": "major_migration",
"is_recommended": false,
"requires_downtime": true,
"breaking_changes": "PostgreSQL 17 requires Blue-Green migration due to on-disk catalog changes.",
"release_notes_url": "https://www.postgresql.org/docs/release/17.0/"
}
]
}

Step 2: Validate Pre-Flight Safety Checks​

curl -X GET \
-H "Authorization: Bearer ${OKUSTERA_API_TOKEN}" \
"https://portal.okustera.com/api/v1/dbaas/clusters/postgres/production/my-db/preflight?target_version=16.5"

Step 3: Trigger the Upgrade​

curl -X POST \
-H "Authorization: Bearer ${OKUSTERA_API_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"target_version": "16.5",
"auto_rollback": true,
"skip_preflight": false
}' \
https://portal.okustera.com/api/v1/dbaas/clusters/postgres/production/my-db/upgrade

Step 4: Track Upgrade Progress​

# List recent upgrade jobs across all clusters
curl -X GET \
-H "Authorization: Bearer ${OKUSTERA_API_TOKEN}" \
https://portal.okustera.com/api/v1/dbaas/jobs

# Inspect a specific upgrade job
curl -X GET \
-H "Authorization: Bearer ${OKUSTERA_API_TOKEN}" \
https://portal.okustera.com/api/v1/dbaas/jobs/job-upgrade-pg165-001

Step 5: (Optional) Initiate Manual Rollback​

If application compatibility issues arise post-upgrade:

curl -X POST \
-H "Authorization: Bearer ${OKUSTERA_API_TOKEN}" \
https://portal.okustera.com/api/v1/dbaas/jobs/job-upgrade-pg165-001/rollback

Method C: Infrastructure as Code (Terraform)​

Manage database versions declaratively using the Okustera Terraform provider:

resource "okustera_database_postgresql" "production_db" {
name = "production-core-db"
namespace = "production"
instances = 3
storage_size = "100Gi"
database_name = "app"
username = "app_user"
}

When upgrading via the Okustera Portal, REST API, or Terraform, pre-flight checks are executed automatically before modifying cluster instances.


5. Supported Upgrades & Expected Downtime by Engine​

Database EngineMinor / Patch UpgradesMajor Version UpgradesExpected Write ImpactExpected Read Impact
PostgreSQLAutomated standby-first rolling upgrade with graceful switchoverAutomated Blue-Green cluster migration with endpoint cutover< 1s (minor) / < 5s (major)0s (served by healthy standbys)
DocumentDBAutomated rolling upgrade preserving :27017 wire connectivityAutomated Blue-Green migration with atomic endpoint cutover< 1s (minor) / < 5s (major)0s
MySQLSequential node drain, patch, and incremental state resyncAutomated Blue-Green migration< 1s (minor) / < 5s (major)0s (routed to healthy peers)
ValkeyRolling replica patch followed by automated Sentinel failoverPlanned blue-green cluster replacement< 2s (Sentinel failover)0s
QdrantRolling multi-node update with readiness-gated traffic routingSnapshot-backed cluster upgrade< 2s (HA clusters)0s (HA clusters)
ClickHouseRolling replica update coordinated across shards with ClickHouse KeeperPlanned blue-green migration0s–2s (replicated tables)0s (routed to ready replicas)

6. Disaster Recovery & Rollback Protocols​

In addition to automated rolling rollback, Okustera provides Point-in-Time Recovery safety nets:

Point-in-Time Recovery (PITR)​

If an application incompatibility is discovered hours after a completed major or minor upgrade:

  • Continuous Write-Ahead Log (WAL) streaming guarantees an RPO < 1 minute.
  • Launch an isolated PITR recovery clone pointing to the exact timestamp prior to the upgrade via the Okustera Cloud Portal or DBaaS REST API:
curl -s -X POST \
-H "Authorization: Bearer ${OKUSTERA_API_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"target_cluster_name": "production-core-db-recovered",
"target_time": "2026-09-28 14:29:00"
}' \
https://api.okustera.com/api/v1/dbaas/clusters/postgresql/production/production-core-db/pitr-restore

Instantaneous Storage Snapshots​

Prior to scheduled maintenance, automated pre-upgrade block volume snapshots are captured so clusters can be restored rapidly without lengthy data transfers if unexpected application-level corruption occurs.


7. Service Level Agreements (SLA) & Commitments​

Operational MetricSLA CommitmentHow It Is Enforced
Minor Upgrade Write Disruption< 1 secondSub-second graceful leader switchover.
Minor Upgrade Read Disruption0 secondsHealthy standby load balancing via read-only endpoints.
Major Upgrade Cutover Window< 5 secondsAtomic endpoint cutover upon verified blue-green sync.
Recovery Point Objective (RPO)< 1 minuteContinuous WAL archiving streamed directly to encrypted S3 storage.
Recovery Time Objective (RTO)< 10 minutesAutomated restore from encrypted S3 backup archives.
Regulatory Compliance StandardsISO 22301, ISO 27001, NIS2Business continuity, immutable audit trails, and GDPR Article 17 crypto-shredding.