<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    >
<channel>
    <title>MariaDB.org-Planet-Feed</title>
    <atom:link href="https://mariadb.org/planet-rss" rel="self" type="application/rss+xml"/>
    <link>https://mariadb.org/planet/</link>
    <description>Supporting continuity and open collaboration</description>
    <lastBuildDate>Fri, 13 Nov 2026 11:47:17 +0000</lastBuildDate>
    <language></language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
        <item>
        <title>PostgreSQL + ClickHouse Recovery: Test the Whole Data Service</title>
        <link>https://severalnines.com/blog/postgresql-clickhouse-recovery-test-the-whole-data-service/</link>
        <pubDate>Fri, 13 Nov 2026 11:47:17 +0000</pubDate>
        <dc:creator>Jessie Baynas</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/postgresql-clickhouse-recovery-test-the-whole-data-service/</guid>
        <source url="https://severalnines.com/">Severalnines</source>
        <description><![CDATA[<p>A successful restore does not prove that an analytics service is delivering correct data. This PostgreSQL + ClickHouse walkthrough uses Debezium and Kafka to test backup restoration, offset replay, updates, deletes, and application-level reconciliation—including a negative test that catches a seemingly healthy but incomplete recovery.<br />
The post PostgreSQL + ClickHouse Recovery: Test the Whole Data Service appeared first on Severalnines.</p>
<p><a href="https://severalnines.com/blog/postgresql-clickhouse-recovery-test-the-whole-data-service/">PostgreSQL + ClickHouse Recovery: Test the Whole Data Service</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>A restore job finishes green. PostgreSQL is taking orders, ClickHouse is answering queries, and the revenue dashboard loads without errors. Then someone from finance asks why January 15 shows 12,750 in revenue when the order system says 12,350.</p>
<p>Nothing is down and no alert has fired. The numbers are simply wrong.</p>
<p>This post walks through a recovery exercise for one specific architecture. PostgreSQL is the system of record for a fictional order service. Debezium captures its changes (change data capture, or CDC) and streams them through Apache Kafka, and ClickHouse serves the revenue dashboards. In the scenario, the ClickHouse tier is lost while PostgreSQL keeps accepting writes, and the question is what evidence you need before telling the business that the analytics service is back.</p>
<p>Not every PostgreSQL + ClickHouse deployment fails like this, and this post doesn’t try to cover every pattern. For the broader catalog, read <a href="https://severalnines.com/blog/postgres-clickhouse-architectural-patterns/">PostgreSQL + ClickHouse architectural patterns</a>. This post is narrower: it builds a recovery test that fails when the data is wrong.</p>
<h2 class="wp-block-heading">Define what “recovered” means before you break anything</h2>
<p>“Recovered” covers at least five different claims, and each has its own evidence:</p>
<figure class="wp-block-table">
<table class="has-fixed-layout">
<tbody>
<tr>
<td><strong>Dimension</strong></td>
<td><strong>Question it answers</strong></td>
<td><strong>Evidence in this walkthrough</strong></td>
</tr>
<tr>
<td>Availability</td>
<td>Do the databases accept connections and queries?</td>
<td>ClickHouse responds after the restore job; PostgreSQL never stopped</td>
</tr>
<tr>
<td>Recovery point</td>
<td>What is the newest state the restored copy contains?</td>
<td>Highest Kafka offset present in the restored ClickHouse table</td>
</tr>
<tr>
<td>Elapsed recovery time</td>
<td>How long from failure to accepted service?</td>
<td>Timestamps T3 to T10 in the recovery timeline, not T3 to “restore finished” (T7)</td>
</tr>
<tr>
<td>Freshness</td>
<td>Has the analytical tier caught up with the source at an agreed boundary?</td>
<td>Writer paused, topic end offset stable, consumer lag zero</td>
</tr>
<tr>
<td>Correctness</td>
<td>Do users see the right answer?</td>
<td>Key-level diff and the business query match an independent expected-results file</td>
</tr>
</tbody>
</table>
</figure>
<p>Most recovery runbooks stop at availability. Some add a row count. The failure this walkthrough looks for sits further down the table, where both databases are available and the counts can even look plausible, but an update or delete never made it across.</p>
<p>Agree on authority before you start. In this walkthrough:</p>
<ul class="wp-block-list">
<li><strong>Current orders:</strong> PostgreSQL is authoritative. If ClickHouse and PostgreSQL disagree about an order that still exists in PostgreSQL, PostgreSQL wins.</li>
<li><strong>Historical orders:</strong> here PostgreSQL keeps every row, so it is authoritative for history too. Many production deployments purge PostgreSQL after a retention window and keep the long tail only in ClickHouse. That changes what a recovery can bring back, as covered later in this post.</li>
<li><strong>Expected results:</strong> a file generated from the dataset specification, not exported from either database. If you derive “expected” from one of the systems under test, you lose the ability to detect that the system itself is wrong.</li>
</ul>
<p>The acceptance query is the one the dashboard runs: daily order count and revenue by order date. The application owner, not the DBA, signs off that its output matches the expected file. The DBA can prove that the databases work. Only the application owner can confirm the numbers are what the business expects.</p>
<h2 class="wp-block-heading">Map backup and CDC dependencies</h2>
<p>Before writing a runbook, list every place that holds state the recovery depends on. In this architecture there are more of them than “two databases.”</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://severalnines.com/wp-content/uploads/2026/10/postgresql-cdc-kafka-clickhouse-recovery-dependencies-architecture-1024x576.jpeg" alt="End-to-end system architecture diagram showing disaster recovery dependencies, component ownership, and restore pathways across PostgreSQL, Debezium, Kafka, ClickHouse, and ClusterControl." class="wp-image-45760"></figure>
<p><em>Figure 1. Recovery dependencies across PostgreSQL, CDC state and ClickHouse history. Solid arrows carry change events, dashed arrows carry backups, and the numbered arrows show the recovery steps in order.</em></p>
<figure class="wp-block-table">
<table class="has-fixed-layout">
<tbody>
<tr>
<td><strong>State</strong></td>
<td><strong>Where it lives</strong></td>
<td><strong>Retention</strong></td>
<td><strong>Credentials</strong></td>
<td><strong>Owner / restored by</strong></td>
<td><strong>Network path</strong></td>
</tr>
<tr>
<td>PostgreSQL data and write-ahead log (WAL) archive</td>
<td>pgBackRest repository</td>
<td>Backup policy in ClusterControl</td>
<td>Repo access on DB nodes</td>
<td>DBA, using ClusterControl</td>
<td>Controller → PostgreSQL (SSH); PostgreSQL → repo</td>
</tr>
<tr>
<td>Logical replication slot <code>debezium_orders</code></td>
<td>PostgreSQL primary</td>
<td>Until consumed; capped by <code>max_slot_wal_keep_size</code></td>
<td>Replication role</td>
<td>DBA with CDC team; <em>not</em> in physical backups</td>
<td>Kafka Connect → PostgreSQL 5432</td>
</tr>
<tr>
<td>Debezium source offsets</td>
<td>Kafka Connect <code>connect-offsets</code> topic</td>
<td>Compacted topic</td>
<td>Connect worker</td>
<td>CDC team</td>
<td>Kafka Connect → Kafka</td>
</tr>
<tr>
<td>Change events <code>shop.public.orders</code></td>
<td>Kafka</td>
<td><code>retention.ms</code> (seven days here)</td>
<td>Kafka ACLs</td>
<td>Streaming team</td>
<td>ClickHouse → Kafka 9092</td>
</tr>
<tr>
<td>ClickHouse consumer offsets <code>ch_orders</code></td>
<td>Kafka __consumer_offsets</td>
<td>Broker <code>offsets.retention.minutes</code></td>
<td>Kafka ACLs</td>
<td>Streaming team, on request from analytics</td>
<td>Admin host → Kafka</td>
</tr>
<tr>
<td>ClickHouse <code>analytics</code> database</td>
<td>ClickHouse native backup on the node’s <code>backups</code> disk or S3-compatible storage</td>
<td>Backup policy in ClusterControl</td>
<td>ClusterControl-managed</td>
<td>DBA, using ClusterControl</td>
<td>Controller → ClickHouse (SSH); node → object store</td>
</tr>
<tr>
<td>Ingest DDL (Kafka engine table, materialized view)</td>
<td>Git</td>
<td>Versioned</td>
<td>Repo access</td>
<td>Analytics engineering</td>
<td>Admin host → ClickHouse</td>
</tr>
<tr>
<td>Acceptance query and expected results</td>
<td>Git</td>
<td>Versioned</td>
<td>Repo access</td>
<td>Application owner</td>
<td>n/a</td>
</tr>
</tbody>
</table>
</figure>
<p>Two rows in that table cause most of the surprises.</p>
<p>First, <strong>the replication slot isn’t something you get back from a backup.</strong> A physical backup or point-in-time recovery of PostgreSQL brings back the data, but a logical slot on the restored server isn’t a continuation of the one Debezium was reading. Restoring PostgreSQL means re-establishing CDC, usually with a new snapshot. That’s a separate scenario from the one covered here. See the <a href="https://www.postgresql.org/docs/17/continuous-archiving.html">PostgreSQL 17 continuous archiving and PITR documentation</a> and the <a href="https://debezium.io/documentation/reference/stable/connectors/postgresql.html">Debezium PostgreSQL connector documentation</a> for the details. Pin both to the versions you actually run.</p>
<p>Second, <strong>the ClickHouse consumer’s position lives in Kafka, not in ClickHouse.</strong> If you restore ClickHouse from a backup taken an hour ago, Kafka still remembers that the consumer group read everything up to the moment of failure. If you restart ingestion without dealing with that, ClickHouse resumes from the current position and silently skips the hour between the backup and the failure. Most of this walkthrough is about handling that gap.</p>
<figure class="wp-block-table">
<table class="has-fixed-layout">
<tbody>
<tr>
<td><strong>What ClusterControl does and doesn’t do here.</strong> ClusterControl deploys, monitors, backs up and restores PostgreSQL and ClickHouse (ClickHouse 24.8 and 25.3, standalone or replicated; see<a href="https://docs.severalnines.com/clustercontrol/latest/getting-started/overview/supported-databases/"> supported databases</a>). ClickHouse backups use ClickHouse’s native <code>BACKUP/RESTORE</code>, full or incremental, with optional upload to S3-compatible storage and<a href="https://docs.severalnines.com/clustercontrol/latest/user-guide/backup-restore/backup-verification/"> backup verification</a> on a separate host. ClickHouse backups are snapshot-based, with no point-in-time recovery. ClusterControl doesn’t manage Debezium, Kafka Connect, Kafka topics or consumer offsets. In this exercise those steps are manual and belong to the CDC and streaming owners.</td>
</tr>
</tbody>
</table>
</figure>
<p>In a restricted or air-gapped network, add two more rows: where the backup repository physically lives, and where packages come from if a node has to be rebuilt. A restore that needs to pull a ClickHouse package from the internet isn’t a restore plan for a disconnected site. Keep an S3-compatible store and package mirrors inside the boundary.</p>
<h2 class="wp-block-heading">Build a deterministic test dataset</h2>
<p>A recovery test only means something if you know the right answer in advance. Copying some production data and comparing doesn’t give you that. Use a dataset small enough to reason about by hand, where every change is identifiable.</p>
<p>The exercise uses a single <code>orders</code> table with three batches of synthetic data.</p>
<figure class="wp-block-table">
<table class="has-fixed-layout">
<tbody>
<tr>
<td><strong>Batch</strong></td>
<td><strong>When</strong></td>
<td><strong>Change</strong></td>
<td><strong>Order dates</strong></td>
</tr>
<tr>
<td>A</td>
<td>Before the backup</td>
<td>Insert order IDs 1–100, <code>amount = id × 10.00, customer_id = (id mod 10) + 1</code></td>
<td>IDs 1–50: 2026-01-15; IDs 51–100: 2026-01-16</td>
</tr>
<tr>
<td>B</td>
<td>After the backup, before the failure</td>
<td>Update ID 10 to 150.00; update ID 20 to 50.00; physically delete ID 30</td>
<td>unchanged</td>
</tr>
<tr>
<td>C</td>
<td>While ClickHouse is down</td>
<td>Insert order IDs 101–110, <code>amount = id × 10.00</code></td>
<td>2026-01-17</td>
</tr>
</tbody>
</table>
</figure>
<p>Deletes are physical <code>DELETE</code> statements in PostgreSQL. On the ClickHouse side they arrive as Debezium delete events and are stored as a row version with <code>is_deleted = 1</code>. The schema sets <code>REPLICA IDENTITY FULL</code> on <code>orders</code> so delete events carry the whole old row, not just the primary key. Without it, the non-key columns of a delete event arrive empty, and ClickHouse either rejects the row or stores defaults.</p>
<pre class="wp-block-code"><code>-- PostgreSQL: schema (database "shop")
CREATE TABLE orders (
    order_id    bigint PRIMARY KEY,
    customer_id integer       NOT NULL,
    amount      numeric(12,2) NOT NULL,
    status      text          NOT NULL,
    order_date  date          NOT NULL
);
ALTER TABLE orders REPLICA IDENTITY FULL;
CREATE PUBLICATION dbz_orders FOR TABLE orders;
 
-- Batch A
INSERT INTO orders
SELECT g, (g % 10) + 1, g * 10.00, 'paid',
       CASE WHEN g &lt;= 50 THEN DATE &#039;2026-01-15&#039; ELSE DATE &#039;2026-01-16&#039; END
FROM generate_series(1, 100) AS g;
 
-- Batch B
BEGIN;
UPDATE orders SET amount = 150.00 WHERE order_id = 10;
UPDATE orders SET amount = 50.00  WHERE order_id = 20;
DELETE FROM orders WHERE order_id = 30;
COMMIT;
 
-- Batch C (run while ClickHouse is unavailable)
INSERT INTO orders
SELECT g, (g % 10) + 1, g * 10.00, &#039;paid&#039;, DATE &#039;2026-01-17&#039;
FROM generate_series(101, 110) AS g;</code></pre>
<p>The expected-results file is generated from the specification by a separate script that never touches either database:</p>
<pre class="wp-block-code"><code>awk 'BEGIN{
  for (i = 1; i &lt;= 110; i++) {
    if (i == 30) continue                      # deleted in batch B
    amt = i * 10
    if (i == 10) amt = 150                     # updated in batch B
    if (i == 20) amt = 50                      # updated in batch B
    d = (i &lt;= 50) ? &quot;2026-01-15&quot; : ((i  expected_orders.tsv</code></pre>
<p>That produces 109 rows. The expected business result after all three batches:</p>
<figure class="wp-block-table">
<table class="has-fixed-layout">
<tbody>
<tr>
<td><strong>order_date</strong></td>
<td><strong>orders</strong></td>
<td><strong>revenue</strong></td>
</tr>
<tr>
<td>2026-01-15</td>
<td>49</td>
<td>12350.00</td>
</tr>
<tr>
<td>2026-01-16</td>
<td>50</td>
<td>37750.00</td>
</tr>
<tr>
<td>2026-01-17</td>
<td>10</td>
<td>10550.00</td>
</tr>
<tr>
<td><strong>Total</strong></td>
<td><strong>109</strong></td>
<td><strong>60650.00</strong></td>
</tr>
</tbody>
</table>
</figure>
<h3 class="wp-block-heading">Agree on a comparison boundary</h3>
<p>Comparing two databases while data is still flowing produces noise. A row inserted a moment ago exists in PostgreSQL and not yet in ClickHouse, and that looks exactly like a lost row. Analysts end up either chasing phantom differences or learning to ignore real ones.</p>
<p>This walkthrough uses a quiesced boundary, defined by conditions that must all hold:</p>
<ol class="wp-block-list">
<li>The synthetic writer is stopped and batch C is committed. Record pg_current_wal_lsn() right after the commit.</li>
<li>The source side has published batch C: the replication slot’s confirmed_flush_lsn has reached the LSN recorded in step 1, and the topic’s end offset equals the known event count (100 snapshot events + 3 from batch B + 10 from batch C = 113), with order 110 as the last event.</li>
<li>The end offset of shop.public.orders doesn’t change across two checks 30 seconds apart.</li>
<li>Consumer group ch_orders reports a lag of zero on that partition.</li>
</ol>
<p>Conditions 3 and 4 on their own aren’t enough. A stalled connector also leaves the topic quiet, and zero lag only means the consumer has caught up with what Kafka holds. Condition 2 ties the boundary to the source. Because this dataset is deterministic, the known event count is a practical way to do that; a production system that can’t stop writing needs a watermark instead, such as a marker table whose rows travel through the same pipeline. Either way, the key and value reconciliation that follows is the correctness check.</p>
<h2 class="wp-block-heading">Run the failure and recovery sequence</h2>
<p>The commands and sample output below come from a working run of this exercise. Hostnames are replaced with placeholders such as <code></code>.</p>
<h3 class="wp-block-heading">Environment</h3>
<figure class="wp-block-table">
<table class="has-fixed-layout">
<tbody>
<tr>
<td><strong>Component</strong></td>
<td><strong>Version</strong></td>
<td><strong>Managed by</strong></td>
</tr>
<tr>
<td>ClusterControl</td>
<td>2.5.0</td>
<td>n/a</td>
</tr>
<tr>
<td>PostgreSQL</td>
<td>17.11, standalone</td>
<td>ClusterControl</td>
</tr>
<tr>
<td>ClickHouse</td>
<td>24.8.14.39, standalone, TLS on port 9440</td>
<td>ClusterControl</td>
</tr>
<tr>
<td>Kafka (KRaft, one broker) + Kafka Connect</td>
<td>3.9.2</td>
<td>Manual (streaming team)</td>
</tr>
<tr>
<td>Debezium PostgreSQL connector, <code>pgoutput</code></td>
<td>3.6.3.Final on OpenJDK 21</td>
<td>Manual (CDC team)</td>
</tr>
</tbody>
</table>
</figure>
<p><strong>Prerequisites</strong>: On PostgreSQL, set <code>wal_level = logical</code> and leave enough <code>max_replication_slots</code> and <code>max_wal_senders</code> for the connector. With ClusterControl, change the setting and restart the node:</p>
<pre class="wp-block-code"><code>s9s node --change-config --cluster-id= 
  --nodes=:5432 --opt-name=wal_level --opt-value=logical --log
 
s9s node --restart --cluster-id= 
  --nodes=:5432 --wait --log</code></pre>
<p><code>wal_level</code> only takes effect after the restart, so run <code>SHOW wal_level</code> afterwards to confirm it reads <code>logical</code>.</p>
<p>Set <code>max_slot_wal_keep_size</code> deliberately. Without a cap, a stalled connector can fill the primary’s disk. With a cap, a long outage invalidates the slot and forces a re-snapshot. Choose which failure you prefer and write it down.</p>
<p>Create a replication role for Debezium with <code>SELECT</code> on orders, and add a <code>pg_hba.conf</code> rule that lets it reach the <code>shop</code> database from the Kafka Connect host. Logical replication connections match the database name, not the <code>replication</code> keyword. Use the cluster’s existing authentication method. This example uses <code>md5</code>; prefer <code>scram-sha-256</code> where the cluster supports it:</p>
<pre class="wp-block-code"><code>host    shop    cdc_user    /32    md5</code></pre>
<p>Then pre-create the topic with an explicit retention:</p>
<pre class="wp-block-code"><code>kafka-topics.sh --bootstrap-server :9092 --create 
  --topic shop.public.orders --partitions 1 --replication-factor 1 
  --config retention.ms=604800000</code></pre>
<figure class="wp-block-table">
<table class="has-fixed-layout">
<tbody>
<tr>
<td><strong>Test your exact Kafka and ClickHouse versions together.</strong> In this exercise, the Kafka engine in ClickHouse 24.8.14.39 connected to a Kafka 4.1.2 broker, but every read failed with <code>Local: Required feature not supported by broker</code>, and no rows reached the table. The same setup worked with Kafka 3.9.2. Other version pairs weren’t tested, so check yours before upgrading either side.</td>
</tr>
</tbody>
</table>
</figure>
<p>The connector unwraps Debezium’s envelope into flat rows, adds the log sequence number (LSN) of each change, and rewrites deletes into rows with <code>__deleted = "true"</code>:</p>
<pre class="wp-block-code"><code>{
  "name": "orders-cdc",
  "config": {
    "connector.class": "io.debezium.connector.postgresql.PostgresConnector",
    "database.hostname": "",
    "database.port": "5432",
    "database.user": "",
    "database.password": "",
    "database.dbname": "shop",
    "topic.prefix": "shop",
    "plugin.name": "pgoutput",
    "slot.name": "debezium_orders",
    "publication.name": "dbz_orders",
    "publication.autocreate.mode": "disabled",
    "table.include.list": "public.orders",
    "snapshot.mode": "initial",
    "decimal.handling.mode": "string",
    "heartbeat.interval.ms": "10000",
    "transforms": "unwrap",
    "transforms.unwrap.type": "io.debezium.transforms.ExtractNewRecordState",
    "transforms.unwrap.add.fields": "op,lsn",
    "transforms.unwrap.delete.tombstone.handling.mode": "rewrite",
    "key.converter": "org.apache.kafka.connect.json.JsonConverter",
    "key.converter.schemas.enable": "false",
    "value.converter": "org.apache.kafka.connect.json.JsonConverter",
    "value.converter.schemas.enable": "false"
  }
}</code></pre>
<p>A snapshot message on the topic looks like this:</p>
<pre class="wp-block-code"><code>{"order_id":1,"customer_id":2,"amount":"10.00","status":"paid","order_date":20468,"__deleted":"false","__op":"r","__lsn":766930280}</code></pre>
<p><code>order_date</code> arrives as days since 1970-01-01 (20468 is 2026-01-15), which is why the materialized view below converts it with <code>addDays</code>.</p>
<p>On ClickHouse, keep the data and the consumer in <strong>separate databases.</strong> <code>analytics</code> holds the data you back up. <code>ingest</code> holds the Kafka consumer, which is recreated from Git. A restored Kafka engine table starts consuming immediately, from whatever offset Kafka remembers, before you have a chance to rewind. In this walkthrough the ClusterControl backup includes <code>ingest</code>, so the recovery rewinds the consumer group before restoring. Keeping <code>ingest.sql</code> in Git still matters: it’s how you rebuild the consumer if you restore <code>analytics</code> on its own.</p>
<pre class="wp-block-code"><code>-- analytics.sql (backed up)
CREATE DATABASE analytics;
CREATE TABLE analytics.orders
(
    order_id        UInt64,
    customer_id     UInt32,
    amount          Decimal(18, 2),
    status          LowCardinality(String),
    order_date      Date,
    lsn             UInt64,
    is_deleted      UInt8,
    kafka_partition UInt32,
    kafka_offset    UInt64
)
ENGINE = ReplacingMergeTree(lsn, is_deleted)
ORDER BY order_id;
 
-- ingest.sql (also kept in Git)
CREATE DATABASE ingest;
CREATE TABLE ingest.orders_queue
(
    order_id UInt64, customer_id UInt32, amount String, status String,
    order_date Int32, __op String, __lsn UInt64, __deleted String
)
ENGINE = Kafka
SETTINGS kafka_broker_list = ':9092',
         kafka_topic_list  = 'shop.public.orders',
         kafka_group_name  = 'ch_orders',
         kafka_format      = 'JSONEachRow',
         kafka_num_consumers = 1;
 
CREATE MATERIALIZED VIEW ingest.orders_mv TO analytics.orders AS
SELECT order_id, customer_id,
       toDecimal64(amount, 2)                      AS amount,
       status,
       addDays(toDate('1970-01-01'), order_date)   AS order_date,
       __lsn                                       AS lsn,
       toUInt8(__deleted = 'true')                 AS is_deleted,
       _partition                                  AS kafka_partition,
       _offset                                     AS kafka_offset
FROM ingest.orders_queue;</code></pre>
<p><code>Storing _partition</code> and <code>_offset</code> next to every row is what makes a precise rewind possible later, at the cost of two extra columns.</p>
<h3 class="wp-block-heading">The sequence</h3>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://severalnines.com/wp-content/uploads/2026/10/clickhouse-database-vs-service-recovery-timeline-1024x576.jpeg" alt="Step-by-step disaster recovery timeline comparing the moment a database becomes available (T7) to when service is fully accepted after data validation (T10)." class="wp-image-45762"></figure>
<p><em>Figure 2. Recovery stages from failure to accepted service, using the ClusterControl restore path. The database is available at T7; the service is accepted at T10.</em></p>
<p><strong>T0: Baseline.</strong> Load batch A, register the connector, create both ClickHouse databases, and wait for the snapshot to land. Run the acceptance query and confirm 2026-01-15 = 50 orders / 12750.00 and 2026-01-16 = 50 orders / 37750.00, with consumer lag zero. Then record the slot’s position. <code>restart_lsn</code> marks the oldest WAL the slot still holds on the primary, and <code>confirmed_flush_lsn</code> marks how far Debezium has confirmed, so report both:</p>
<pre class="wp-block-code"><code>SELECT slot_name, active, restart_lsn, confirmed_flush_lsn,
       pg_size_pretty(pg_wal_lsn_diff(pg_current_wal_lsn(), restart_lsn))         AS retained_wal,
       pg_size_pretty(pg_wal_lsn_diff(pg_current_wal_lsn(), confirmed_flush_lsn)) AS unconfirmed_wal
FROM pg_replication_slots
WHERE slot_name = 'debezium_orders';


    slot_name    | active | restart_lsn | confirmed_flush_lsn | retained_wal | unconfirmed_wal
-----------------+--------+-------------+---------------------+--------------+-----------------
 debezium_orders | t      | 0/2DB66D30  | 0/2DB66D68          | 152 bytes    | 96 bytes</code></pre>
<p><strong>T1: Back up ClickHouse.</strong> Take a native backup through ClusterControl, then confirm you can find it with the credentials the on-call engineer will actually have:</p>
<pre class="wp-block-code"><code>s9s backup --create 
  --cluster-id= 
  --nodes=":9440" 
  --backup-method=clickhouse-native 
  --wait --log
 
s9s backup --list --cluster-id= --long</code></pre>
<pre class="wp-block-code"><code>ID PI CID V I STATE     OWNER HOSTNAME  CREATED  SIZE EXPIRES             TITLE
17  -   6 - F COMPLETED admin  13:12:43 6690 2026-11-27 13:12:43 backup_20261027T131243</code></pre>
<figure class="wp-block-table">
<table class="has-fixed-layout">
<tbody>
<tr>
<td><strong>Check what the backup contains.</strong> The job log shows the exact statement on its <code>Issuing</code>: line. Here it was <code>BACKUP ALL EXCEPT DATABASES system</code>, <code>information_schema,</code> <code>...</code>, so <code>ingest</code> was backed up along with <code>analytics</code>. That’s why the recovery below rewinds the consumer group before restoring.</td>
</tr>
</tbody>
</table>
</figure>
<p>Record the last Kafka offset the backup contains, so you know where replay has to start. The query reads the live table:</p>
<pre class="wp-block-code"><code>SELECT kafka_partition, max(kafka_offset) AS last_applied
FROM analytics.orders
GROUP BY kafka_partition;</code></pre>
<p>By default the backup is written to the ClickHouse node’s own <code>backups</code> disk. That survives a dropped database. It doesn’t survive losing the node. To survive node loss, enable upload to S3-compatible storage and restore from there.</p>
<p><strong>T2: Batch B.</strong> Run the updates and the delete. Confirm ClickHouse reflects them (ID 30 absent from the <code>FINAL</code> query, IDs 10 and 20 at their new amounts). This is the data the backup doesn’t contain. The topic now ends at offset 103, and the consumer group has read all of it. Thanks to <code>REPLICA IDENTITY FULL</code>, the delete event carries the full row:</p>
<pre class="wp-block-code"><code>{"order_id":30,"customer_id":1,"amount":"300.00","status":"paid","order_date":20468,"__deleted":"true","__op":"d","__lsn":766934960}</code></pre>
<p><strong>T3: Inject the failure.</strong> On a disposable ClickHouse test node only, after a second engineer has reviewed the exact command and the target host:</p>
<pre class="wp-block-code"><code>DROP DATABASE ingest SYNC;     -- stop the consumer first
DROP DATABASE analytics SYNC;</code></pre>
<figure class="wp-block-table">
<table class="has-fixed-layout">
<tbody>
<tr>
<td><strong>Warning:</strong> run this only against a disposable test node, never production. Confirm the hostname in the client prompt before you press Enter.</td>
</tr>
</tbody>
</table>
</figure>
<p><strong>T4: Batch C during the outage.</strong> Insert IDs 101–110 in PostgreSQL and record <code>pg_current_wal_lsn()</code> after the commit. Debezium keeps running because Kafka is up. Check that the connector stays <code>RUNNING</code>, the topic end offset reaches 113, and the slot’s <code>confirmed_flush_lsn</code> reaches the LSN you recorded:</p>
<pre class="wp-block-code"><code>curl -s http://:8083/connectors/orders-cdc/status
kafka-get-offsets.sh --bootstrap-server :9092 --topic shop.public.orders</code></pre>
<p>In this run, the LSN after the commit was <code>0/2DB686A8</code>, and the slot’s <code>confirmed_flush_lsn</code> matched it. The topic ended at 113, its last event was order 110, and <code>ch_orders</code> still pointed at 103, a lag of 10. If Kafka were down too, the slot would hold WAL on the primary instead; that’s when <code>max_slot_wal_keep_size</code> starts to matter. Keep three positions apart from here on:</p>
<figure class="wp-block-table">
<table class="has-fixed-layout">
<tbody>
<tr>
<td><strong>Position</strong></td>
<td><strong>Value</strong></td>
<td><strong>Meaning</strong></td>
</tr>
<tr>
<td>Last event in the backup</td>
<td>99</td>
<td>Recorded after T1</td>
</tr>
<tr>
<td>Consumer group’s next offset</td>
<td>103</td>
<td>Where ClickHouse would resume if nothing changed</td>
</tr>
<tr>
<td>Topic end offset</td>
<td>113</td>
<td>Everything Debezium has published</td>
</tr>
</tbody>
</table>
</figure>
<p><strong>T5: Rewind the consumer group.</strong> Do this before the restore, while ClickHouse is down and the group has no active members. First confirm that Kafka still retains the first event the backup is missing (offset 100), then move the group back from 103 to 100:</p>
<pre class="wp-block-code"><code># earliest offset still retained (must be &lt;= 100)
kafka-get-offsets.sh --bootstrap-server :9092 
  --topic shop.public.orders --time -2
 
kafka-consumer-groups.sh --bootstrap-server :9092 
  --group ch_orders --topic shop.public.orders:0 
  --reset-offsets --to-offset 100 --dry-run
 
# same command with --execute after the dry run is reviewed</code></pre>
<p>Here the earliest retained offset was 0, so the reset went ahead. If the earliest retained offset had been above 100, Kafka would already have discarded events that the backup doesn’t contain, and replay couldn’t close that gap. The fallback is a Debezium re-snapshot, which this walkthrough didn’t test. A snapshot loaded into the restored table isn’t enough on its own: rows deleted in PostgreSQL after the backup aren’t in the snapshot, so they’d stay in ClickHouse. Either rebuild into an empty table, or follow the snapshot with a reconciliation step that removes keys no longer in PostgreSQL. Either way, record the recovery point as failed.</p>
<p><strong>T6–T7: Restore through ClusterControl.</strong> ClickHouse restores always target the node the backup was taken from.</p>
<pre class="wp-block-code"><code>s9s backup --restore 
  --cluster-id= 
  --backup-id= 
  --wait --log</code></pre>
<p>The job ran <code>RESTORE ALL EXCEPT DATABASES system, …</code> and finished six seconds after it started. ClickHouse was answering queries again, but that only proves the database is available. The restored <code>ingest</code> table started consuming straight away, from offset 100.</p>
<p><strong>T8: Reach the boundary.</strong> Wait for the consumer to catch up, then confirm the boundary conditions: writer stopped, source evidence from T4, end offset stable across two checks, and group lag zero.</p>
<pre class="wp-block-code"><code>kafka-consumer-groups.sh --bootstrap-server :9092 
  --group ch_orders --describe</code></pre>
<pre class="wp-block-code"><code>GROUP     TOPIC              PARTITION CURRENT-OFFSET LOG-END-OFFSET LAG
ch_orders shop.public.orders 0         113            113            0</code></pre>
<p><strong>T9–T10: Reconcile and accept.</strong> Covered in the next section. The application owner signs off only after every check passes.</p>
<p>Here is where the time went in this run, measured from the failure:</p>
<figure class="wp-block-table">
<table class="has-fixed-layout">
<tbody>
<tr>
<td><strong>Interval</strong></td>
<td><strong>From failure</strong></td>
<td><strong>Elapsed</strong></td>
<td><strong>What happened</strong></td>
</tr>
<tr>
<td>T3 → T5</td>
<td>0 → +48 s</td>
<td>48 s</td>
<td>Simulated outage: batch C written and confirmed in Kafka</td>
</tr>
<tr>
<td>T5 rewind</td>
<td>+48 → +52 s</td>
<td>4 s</td>
<td>Dry run and reset of ch_orders</td>
</tr>
<tr>
<td>T5 → T6</td>
<td>+52 → +55 s</td>
<td>3 s</td>
<td>Switch to ClusterControl and submit the restore job</td>
</tr>
<tr>
<td>T6 → T7</td>
<td>+55 → +61 s</td>
<td>6 s</td>
<td>ClusterControl restore job</td>
</tr>
<tr>
<td>T7 → T8</td>
<td>+61 → +66 s</td>
<td>5 s</td>
<td>Consumer replayed offsets 100–112 and reached lag 0</td>
</tr>
<tr>
<td>T8 → T9</td>
<td>+66 → +114 s</td>
<td>48 s</td>
<td>Deliberate 30-second stability check, then the exports for R1/R2</td>
</tr>
<tr>
<td>T9 → T10</td>
<td>+114 → +118 s</td>
<td>4 s</td>
<td>Checks R1–R6 and sign-off</td>
</tr>
<tr>
<td><strong>Total</strong></td>
<td><strong>0 → +118 s</strong></td>
<td><strong>118 s</strong></td>
<td></td>
</tr>
</tbody>
</table>
</figure>
<p>ClickHouse was available 61 seconds after the failure, and the service was accepted at 118 seconds. The gap between those two numbers is the point of this exercise. These timings describe this small lab run, not a production recovery target. Measure the complete sequence in your own environment.</p>
<figure class="wp-block-table">
<table class="has-fixed-layout">
<tbody>
<tr>
<td><strong>Alternative: restore analytics only.</strong> If the backup holds only <code>analytics</code>, or you restore just that database with ClickHouse’s native <code>RESTORE DATABASE analytics FROM Disk('backups', '')</code>, the order changes: restore first, read <code>max(kafka_offset)</code> from the restored table, reset the group to that value plus one, then recreate <code>ingest</code> from <code>ingest.sql</code>. That order was also exercised while preparing this walkthrough and produced the same reconciliation results, but the timings above come from the ClusterControl path only.</td>
</tr>
</tbody>
</table>
</figure>
<h3 class="wp-block-heading">What happens if you skip the rewind</h3>
<p>To show the mistake, the run was repeated without T5: ClickHouse was dropped again, the consumer group was set back to 103 (its position at the moment of failure), and the same backup was restored through ClusterControl. This is an easy mistake to make: restore, see data flowing, and move on. Because Kafka still held offset 103 for the group, ClickHouse picked up at batch C and never saw batch B.</p>
<p>The result:</p>
<figure class="wp-block-table">
<table class="has-fixed-layout">
<tbody>
<tr>
<td><strong>Check</strong></td>
<td><strong>Expected</strong></td>
<td><strong>Observed without rewind</strong></td>
<td><strong>Verdict</strong></td>
</tr>
<tr>
<td>Consumer lag</td>
<td>0</td>
<td>0</td>
<td><strong>pass</strong></td>
</tr>
<tr>
<td>Live rows</td>
<td>109</td>
<td>110 (ID 30 still present)</td>
<td><strong>FAIL</strong></td>
</tr>
<tr>
<td>ID 10 / ID 20 amount</td>
<td>150.00 / 50.00</td>
<td>100.00 / 200.00</td>
<td><strong>FAIL</strong></td>
</tr>
<tr>
<td>2026-01-15 revenue</td>
<td>49 / 12350.00</td>
<td>50 / 12750.00</td>
<td><strong>FAIL</strong></td>
</tr>
<tr>
<td>2026-01-17 revenue</td>
<td>10 / 10550.00</td>
<td>10 / 10550.00</td>
<td><strong>pass</strong></td>
</tr>
</tbody>
</table>
</figure>
<p>Look at the rows that pass. Consumer lag is zero, so a freshness check is satisfied, and a spot check of the orders written during the outage looks correct. The damage is in data that existed before the outage.</p>
<p><strong>Not covered here:</strong> loss of the PostgreSQL primary (needs slot re-creation and a CDC re-snapshot), loss of Kafka, node loss with backups stored only on the node, and replicated ClickHouse clusters. Each of these needs its own test.</p>
<h2 class="wp-block-heading">Reconcile the data, not just the jobs</h2>
<p>Every check compares against expected_orders.tsv. PostgreSQL is checked too, because a test that only validates ClickHouse against PostgreSQL can’t tell you whether PostgreSQL itself is right.</p>
<h3 class="wp-block-heading">Account for the table engine</h3>
<p><code>ReplacingMergeTree</code> deduplicates during background merges, not at insert time. Until a merge runs, ID 10 exists as two physical rows, the original and the update, and ID 30 exists as an insert plus a delete marker. A plain <code>SELECT count()</code> counts every version, so it’s wrong in both directions depending on merge timing. Reconciliation queries must use <code>FINAL</code> (or <code>argMax</code> by version) and filter <code>is_deleted = 0</code>.</p>
<p>The version column is the PostgreSQL LSN of each change, and that’s what makes replay safe. If you rewind further than necessary, the replayed events carry the same LSNs as rows already in the table and collapse into them. In an earlier run, replaying all 113 events onto an already-recovered table left 223 physical rows, and the <code>FINAL</code> results still matched the expected file exactly. An older event arriving late can’t overwrite a newer one, because a lower version always loses. </p>
<p><strong>One caveat:</strong> rows from a Debezium snapshot all carry the snapshot’s LSN, and a snapshot doesn’t contain rows deleted before it ran. So a re-snapshot can’t remove stale rows from ClickHouse on its own.</p>
<h3 class="wp-block-heading">The checks</h3>
<pre class="wp-block-code"><code># R1 + R2: keys and values, three-way
psql -h  -d shop -c "copy (SELECT order_id, customer_id, amount, status, order_date FROM orders ORDER BY order_id) TO STDOUT" &gt; pg_orders.tsv
 
clickhouse-client --host  --port 9440 --secure -q "
  SELECT order_id, customer_id, amount, status, order_date
  FROM analytics.orders FINAL
  WHERE is_deleted = 0
  ORDER BY order_id
  SETTINGS output_format_decimal_trailing_zeros = 1
  FORMAT TSV" &gt; ch_orders.tsv
 
diff expected_orders.tsv pg_orders.tsv &amp;&amp; echo "R1/R2 PostgreSQL: PASS"
diff expected_orders.tsv ch_orders.tsv &amp;&amp; echo "R1/R2 ClickHouse: PASS"</code></pre>
<p>Two details matter. First, ClickHouse prints <code>Decimal</code> values without trailing zeros by default (<code>10</code>, not <code>10.00</code>). Without the <code>SETTINGS</code> line, the diff flags all 109 rows as different and buries the ones that really are wrong. Second, ClickHouse deployed by ClusterControl listens on the TLS port 9440, hence <code>--port 9440 --secure</code>. If the node uses a self-signed certificate, configure the client to trust that certificate or the CA that issued it (see the ClickHouse client SSL settings). The <code>--accept-invalid-certificate</code> flag skips verification entirely; it was used on the disposable test node for this exercise, and it doesn’t belong in a maintained environment.</p>
<pre class="wp-block-code"><code>-- R3: updated and deleted keys, explicitly
SELECT order_id,
       argMax(amount, lsn)     AS current_amount,
       argMax(is_deleted, lsn) AS deleted
FROM analytics.orders
WHERE order_id IN (10, 20, 30)
GROUP BY order_id
ORDER BY order_id;
-- expected: 10 → 150.00, 0 | 20 → 50.00, 0 | 30 → deleted = 1
 
-- R4: outage-window batch present
SELECT count() FROM analytics.orders FINAL
WHERE is_deleted = 0 AND order_id BETWEEN 101 AND 110;   -- expected 10
 
-- R5: the business query the dashboard runs
SELECT order_date, count() AS orders, sum(amount) AS revenue
FROM analytics.orders FINAL
WHERE is_deleted = 0
GROUP BY order_date
ORDER BY order_date;</code></pre>
<p>R6 is freshness: the boundary conditions from the previous section, recorded with timestamps. Record each check in the same shape so a reviewer can scan the outcome without rerunning anything. Here is the record from the successful recovery:</p>
<figure class="wp-block-table">
<table class="has-fixed-layout">
<tbody>
<tr>
<td><strong>Check</strong></td>
<td><strong>Expected</strong></td>
<td><strong>Observed</strong></td>
<td><strong>Status</strong></td>
<td><strong>Evidence</strong></td>
</tr>
<tr>
<td>R1 keys</td>
<td>109 keys, none missing/extra</td>
<td>109 / 109 / 109 (expected, PostgreSQL, ClickHouse)</td>
<td><strong>PASS</strong></td>
<td>diff output</td>
</tr>
<tr>
<td>R2 values</td>
<td>0 mismatched rows</td>
<td>0</td>
<td><strong>PASS</strong></td>
<td>diff output</td>
</tr>
<tr>
<td>R3 updates/deletes</td>
<td>10=150.00, 20=50.00, 30 deleted</td>
<td>10=150, 20=50, 30 deleted=1</td>
<td><strong>PASS</strong></td>
<td>query result</td>
</tr>
<tr>
<td>R4 outage batch</td>
<td>10</td>
<td>10</td>
<td><strong>PASS</strong></td>
<td>query result</td>
</tr>
<tr>
<td>R5 business query</td>
<td>49/12350.00, 50/37750.00, 10/10550.00</td>
<td>49/12350, 50/37750, 10/10550</td>
<td><strong>PASS</strong></td>
<td>query result + owner sign-off</td>
</tr>
<tr>
<td>R6 freshness</td>
<td>source confirmed, end offset stable, lag 0</td>
<td>slot confirmed past the batch C commit; end offset 113 on two checks 30 s apart; lag 0</td>
<td><strong>PASS</strong></td>
<td>consumer group describe</td>
</tr>
</tbody>
</table>
</figure>
<p>A row-level <code>diff</code> is fine for 109 rows. At production scale, compare per-partition aggregates (count, sum and a hash of the key/value tuple per day) and drill into a partition only when its fingerprint differs. In both cases, compare against a fixed boundary and an independent set of expected results.</p>
<h2 class="wp-block-heading">Identify what cannot be reconstructed</h2>
<p>This walkthrough is the easy case: PostgreSQL still has every row, so in the worst case you can rebuild ClickHouse from a fresh Debezium snapshot. Many real deployments are built differently. A common hot/cold design keeps 30 days in PostgreSQL and years of history in ClickHouse. Rows are purged from PostgreSQL once they’re safely replicated.</p>
<p>In that design, PostgreSQL can’t rebuild ClickHouse. A re-snapshot gives you the last 30 days, and a dashboard that quietly begins a month ago. If older months render as zero rather than “no data,” nobody may notice for a while. The only sources for the purged history are the ClickHouse backups and whatever Kafka still retains, so their retention and restore tests carry the whole recovery point for historical data.</p>
<p>Two design details decide whether that history survives at all:</p>
<ul class="wp-block-list">
<li><strong>The purge must not look like a delete.</strong> If PostgreSQL purges with <code>DELETE</code>, Debezium emits delete events and ClickHouse removes the history it was meant to keep. Purge by dropping or detaching partitions, filter purge deletes out of the stream, or route history to a table that ignores deletes. Note also that Debezium skips <code>TRUNCATE</code> events by default (<code>skipped.operations</code>); verify that against your version rather than relying on it.</li>
<li><strong>Backups and retained events must cover the history.</strong> The age of a backup isn’t the test; a recent backup can still hold years of rows. What matters is whether a valid backup or backup chain, together with any events Kafka still retains, contains the history you need.</li>
</ul>
<p><strong>What this walkthrough doesn’t cover:</strong> retained history. A follow-up test should add a batch H of old-dated orders, replicate them, and purge them from PostgreSQL by partition drop. Then remove every other source for H: let its events age out of Kafka (a short topic retention makes this quick) and restore a ClickHouse backup that doesn’t contain H. With no remaining source, the acceptance check for H’s dates must fail, and the runbook must name exactly which history can’t be recovered and why.</p>
<h2 class="wp-block-heading">Publish the recovery contract</h2>
<p>A recovery procedure that only one engineer knows isn’t much use when that engineer is out of the office. Write the outcome down as a short contract that each owner has agreed to.</p>
<figure class="wp-block-table">
<table class="has-fixed-layout">
<tbody>
<tr>
<td><strong>#</strong></td>
<td><strong>Step</strong></td>
<td><strong>Owner</strong></td>
<td><strong>Tool</strong></td>
<td><strong>Evidence</strong></td>
</tr>
<tr>
<td>1</td>
<td>Declare incident, stop analytics consumers</td>
<td>On-call SRE</td>
<td>Runbook</td>
<td>Incident timestamp (T3)</td>
</tr>
<tr>
<td>2</td>
<td>Confirm CDC source healthy: connector running, slot confirmed past the last commit, end offset as expected</td>
<td>CDC team</td>
<td>Connect REST, <code>pg_replication_slots</code>, Kafka CLI</td>
<td>Connector status, LSNs, offsets</td>
</tr>
<tr>
<td>3</td>
<td>Check retention, then rewind the consumer group to the first offset missing from the backup</td>
<td>Streaming team</td>
<td>Kafka CLI</td>
<td>Dry-run and execute output</td>
</tr>
<tr>
<td>4</td>
<td>Restore from the newest valid backup</td>
<td>DBA</td>
<td>ClusterControl</td>
<td>Job ID, backup ID, job log</td>
</tr>
<tr>
<td>5</td>
<td>Reach the comparison boundary</td>
<td>Streaming + app team</td>
<td>Kafka CLI</td>
<td>Lag zero, stable end offset</td>
</tr>
<tr>
<td>6</td>
<td>Run R1–R6</td>
<td>DBA</td>
<td>SQL, diff</td>
<td>Reconciliation record</td>
</tr>
<tr>
<td>7</td>
<td>Accept service</td>
<td>Application owner</td>
<td>Business query</td>
<td>Sign-off (T10)</td>
</tr>
</tbody>
</table>
</figure>
<p>Add the measured timings, with context. In the example run, the rewind took four seconds, the ClusterControl restore six seconds and the consumer catch-up five seconds, and the service was accepted 118 seconds after the failure, for 110 orders. A measurement on a tiny dataset tells you the order of the steps and where the waits are. It isn’t a production SLA, and it shouldn’t be presented as one.</p>
<p>List the unresolved gaps by name. For this architecture, at minimum: PostgreSQL primary loss and slot re-creation, Kafka loss, retained-history recovery, and node loss with on-node backups. Give each an owner and a date. Then schedule the next run: after any major version change to PostgreSQL, ClickHouse, Debezium or Kafka, and at a fixed interval otherwise. Run it with a different engineer each time, using the runbook as written, and treat any question they have to ask the original author as a gap in the runbook.</p>
<h2 class="wp-block-heading">FAQ</h2>
<h3 class="wp-block-heading"><strong>Is CDC a backup?</strong> </h3>
<p>No. CDC copies changes, including mistakes, deletes and truncations if they aren’t filtered, and only as far back as Kafka retains them. In this architecture it complements the ClickHouse backup by covering the gap between backup time and failure. It can’t replace a backup.</p>
<h3 class="wp-block-heading"><strong>Can PostgreSQL rebuild all of ClickHouse?</strong> </h3>
<p>Only if PostgreSQL still holds every row ClickHouse needs. In this walkthrough it does. In a hot/cold design that purges PostgreSQL, a re-snapshot rebuilds only the retained window. History older than that has to come from ClickHouse backups, plus any events Kafka still retains.</p>
<h3 class="wp-block-heading"><strong>Why can row counts match while results remain wrong?</strong> </h3>
<p>Updates don’t change counts. In the run without the rewind, IDs 10 and 20 keep their old amounts, and no count changes. Counts on <code>ReplacingMergeTree</code> without <code>FINAL</code> also include superseded versions. In the example, a plain <code>count()</code> returned 113 physical rows for 109 live orders. Compare keys, values and the business query at a fixed boundary.</p>
<p><strong>Know which recovery steps nobody owns.</strong> ClusterControl covers backup, restore and verification for the PostgreSQL and ClickHouse tiers. The CDC connector, Kafka and application acceptance stay with your teams, and the gaps between those owners are where recoveries fail.</p>
<p><a href="https://severalnines.com/clustercontrol/solutions/database-fleet-management/">Review the recovery responsibilities and gaps in your database estate →</a></p>
<h2 class="wp-block-heading">Appendix: Further reading</h2>
<ul class="wp-block-list">
<li><a href="https://severalnines.com/blog/postgres-clickhouse-architectural-patterns/">PostgreSQL + ClickHouse architectural patterns</a></li>
<li><a href="https://docs.severalnines.com/clustercontrol/latest/getting-started/overview/supported-databases/">ClusterControl supported databases</a></li>
<li><a href="https://docs.severalnines.com/clustercontrol/latest/user-guide/backup-restore/overview/">ClusterControl backup and restore overview</a></li>
<li><a href="https://clickhouse.com/docs/concepts/features/backup-restore/overview">ClickHouse backup and restore</a></li>
</ul>
<p>The post <a href="https://severalnines.com/blog/postgresql-clickhouse-recovery-test-the-whole-data-service/">PostgreSQL + ClickHouse Recovery: Test the Whole Data Service</a> appeared first on <a href="https://severalnines.com/">Severalnines</a>.</p>
<p><a href="https://severalnines.com/blog/postgresql-clickhouse-recovery-test-the-whole-data-service/">PostgreSQL + ClickHouse Recovery: Test the Whole Data Service</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Multi-Region Active-Active with MariaDB: A Conflict Resolution Use Case</title>
        <link>https://mariadb.com/resources/blog/multi-region-active-active-with-mariadb-a-conflict-resolution-use-case/</link>
        <pubDate>Thu, 12 Nov 2026 20:14:01 +0000</pubDate>
        <dc:creator>Aijaz Fatima</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/multi-region-active-active-with-mariadb-a-conflict-resolution-use-case/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>MariaDB Enterprise Server 12.3 addresses this with Conflict Detection and Resolution (CD&#38;R). MariaDB detects conflicts and invokes SQL triggers containing your resolution rules so you can decide which changes to retain or merge without manual intervention.</p>
<p><a href="https://mariadb.com/resources/blog/multi-region-active-active-with-mariadb-a-conflict-resolution-use-case/">Multi-Region Active-Active with MariaDB: A Conflict Resolution Use Case</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>The link between your London and Singapore data centers goes down. Mary reports her phone stolen, so London suspends her line. Meanwhile, Singapore updates her location, still showing her line as active. When the sites reconnect, which changes should they keep? Both sites kept serving customers, but now hold different versions of Mary’s record. Without conflict handling…</p>
<p><a href="https://mariadb.com/resources/blog/multi-region-active-active-with-mariadb-a-conflict-resolution-use-case/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/multi-region-active-active-with-mariadb-a-conflict-resolution-use-case/">Multi-Region Active-Active with MariaDB: A Conflict Resolution Use Case</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Introducing Percona Database Service (PDS): What Happens When an Engineer Just Wants to Try Something</title>
        <link>https://www.percona.com/blog/percona-database-service-pds/</link>
        <pubDate>Thu, 12 Nov 2026 16:43:13 +0000</pubDate>
        <dc:creator>Andrey Glazkov</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/introducing-percona-database-service-pds-what-happens-when-an-engineer-just-wants-to-try-something/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>It’s Thursday afternoon, and a developer has an idea. Nothing complicated. They are working on a new application feature and want to test an idea before committing to a larger implementation. A quick prototype is already running locally. So far, so good. Next, they want to deploy the application to a shared environment so their … Continued<br />
The post Introducing Percona Database Service (PDS): What Happens When an Engineer Just Wants to Try Something appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/percona-database-service-pds/">Introducing Percona Database Service (PDS): What Happens When an Engineer Just Wants to Try Something</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>It’s Thursday afternoon, and a developer has an idea.</p>
<p>Nothing complicated. They are working on a new application feature and want to test an idea before committing to a larger implementation. A quick prototype is already running locally. So far, so good. Next, they want to deploy the application to a shared environment so their colleagues can try it out. The application needs a database too, but it needs to be accessible from the shared environment, not just their laptop. And that’s where things get more complicated.</p>
<p>Now they need to submit a request to the infrastructure team, wait for an environment to be provisioned, or spend the afternoon working through Kubernetes configurations. What should have been a quick experiment becomes another task on somebody else’s backlog.</p>
<p>This is a common problem for engineering teams. Getting a database running in a shared environment shouldn’t require extensive coordination or infrastructure expertise. But there is another issue: when an application moves to staging or production, the requirements grow. The challenge isn’t just making provisioning easier, but finding a consistent way to manage databases as applications evolve, without requiring developers and infrastructure teams to go over the same things all over again.</p>
<p>Even when the underlying infrastructure is in place, creating a database with the right configuration, access controls, and operational settings can require several manual steps. And provisioning is only the beginning. Someone still needs to manage backups, monitor resource utilization, handle scaling, and maintain the database throughout its lifecycle.</p>
<p>At Percona, we’ve been exploring how to simplify these workflows while allowing organizations to retain control over their infrastructure. The result is <strong>Percona Database Service (PDS)</strong>, a platform for provisioning and managing databases. We’re starting with MySQL and PostgreSQL on Kubernetes, and we’re making the initial implementation available for users to explore and provide feedback.</p>
<p>The idea is straightforward: bring the simplicity of a managed database experience to infrastructure you control, without the usual vendor lock-in.</p>
<h2>How PDS works</h2>
<p>PDS follows a relatively simple model: Kubernetes environments connect to a centralized control plane, allowing databases to be deployed and managed within the customer’s infrastructure.</p>
<p>Using Amazon Elastic Kubernetes Service (EKS), PDS provisions databases directly within your AWS account, rather than moving them into a Percona-hosted environment. This allows you to retain ownership of your infrastructure and databases while using PDS as a centralized management platform.</p>
<p>The PDS approach to database creation is intentionally opinionated. PDS provides standardized starting points for common workloads, yet still allows customization when needed. The goal isn’t to hide every technical detail. It’s to simplify and standardize routine database operations while keeping the underlying systems accessible to the teams that operate them.</p>
<h2>Connecting an environment is a command, not a form</h2>
<p>It starts with a name, which doubles as the EKS cluster name, and one generated command, run locally on a machine that already has <code>aws</code>, <code>eksctl</code>, <code>kubectl</code>, <code>helm</code>, and <code>python3</code>. Nothing gets pasted or copied into a web form; the command does the work, and the environment reports itself in once it is up and running.</p>
<p>That command asks which AWS region to use. Leave it blank, and it uses your AWS CLI’s configured region, or <code>us-west-2</code> if you haven’t set one. Then it creates an EKS cluster with four <code>t3.2xlarge</code> nodes and an S3 bucket, installs PDS onto it, and registers it. If you point the command at a cluster that’s already running PDS, it reuses that install instead of stacking a second one on top, and turns off that cluster’s own sign-in page in the process.</p>
<h2>A database as a profile, not a spec sheet</h2>
<p>Creating a database means picking a profile, not filling in a resource calculator: <strong>Dev</strong>, <strong>Staging</strong>, or <strong>Prod</strong>.</p>
<p>Each profile comes with configurations and operational defaults established by Percona’s experts, bringing best practices into the provisioning process. High availability (HA) is the default from Staging up, so it’s not a box you have to know to check. You retain control over your databases and infrastructure, while PDS helps ensure they’re configured according to proven operational standards.</p>
<p>Access is <strong>Private</strong> or <strong>Public</strong>. Public adds a load balancer in your own cloud account, billed by your provider, and an allowlist of IPs or CIDR ranges.</p>
<h2>Your AI agent can drive it</h2>
<p>It is really easy to connect an AI assistant to PDS. PDS provides setup instructions for supported clients, such as Cursor and Claude, enabling you to integrate database management into your existing workflows.</p>
<p>Authentication happens separately from the AI client configuration. Sign in through a browser-based flow, without storing passwords in configuration files or sharing credentials with the assistant. Once authenticated, the agent can start operating. The agent’s actions are recorded, so nothing goes unnoticed.</p>
<p>And then there are permissions you control. Grant read-only access to database information, allow operational tasks such as provisioning, scaling, and backups, or separately authorize actions such as deleting or restoring databases. Allowing an agent to modify databases does not automatically give it permission to delete them.</p>
<h2>Managing databases after deployment</h2>
<p>Creating a database is only one part of its lifecycle.</p>
<p>PDS provides a database management interface where users can inspect deployment status, review resource metrics, access connection information, and perform supported operational tasks. For example, users can scale database resources, configure scheduled backups, or initiate an on-demand backup. Backup schedules include configurable frequency, execution time, and retention settings. PDS also provides an activity history to help track operations performed through the platform. The interface currently exposes basic operational metrics, including CPU utilization, disk usage, and database connections.</p>
<p>These capabilities are intended to cover common management tasks without requiring users to interact directly with Kubernetes resources for every operation.</p>
<h2>Supporting teams and shared environments</h2>
<p>In most organizations, the people requesting databases are not necessarily the people responsible for operating the underlying infrastructure.</p>
<p>A development team may need a PostgreSQL instance for an application, while platform or DBA teams remain responsible for infrastructure, security, and operational standards. PDS supports this separation through organizations, teams, and user management. Users can register, create teams, and invite colleagues. Database environments can be organized around teams, creating a foundation for shared management and controlled access.</p>
<p>This is an area we’re developing based on customer feedback. One recurring requirement is to give application teams more independence without losing centralized oversight. That includes questions around permissions, resource limits, and which operations should require additional authorization.</p>
<p>The current implementation provides the initial team and user management capabilities. More granular governance and operational controls are areas we’re continuing to explore.</p>
<h2>Integration with Percona Monitoring and Management (PMM)</h2>
<p>PDS also integrates with <a href="https://www.percona.com/software/database-tools/percona-monitoring-and-management">Percona Monitoring and Management (PMM)</a>. This gives teams access to deeper database performance monitoring and diagnostics. PMM enables more detailed analysis of query performance, database activity, and potential bottlenecks for PDS users.</p>
<p>Together, they combine simplified database management with the monitoring capabilities Percona users already know and trust.</p>
<h2>Try PDS and tell us what you think</h2>
<p>We’re making PDS available to learn more about how it fits into real database workflows.</p>
<p>Visit <a href="https://pds.percona.com/" target="_blank" rel="noopener">pds.percona.com</a>, create an account, and connect an Amazon EKS environment in your AWS account. From there, you can provision MySQL or PostgreSQL databases, create teams, invite users, configure backups, and explore integrations. We look forward to receiving your feedback:</p>
<ul>
<li>Which provisioning steps create too much work?</li>
<li>What should a standardized configuration include?</li>
<li>Which operational tasks should be automated?</li>
<li>Where should the boundaries between developer self-service and managed database be?</li>
</ul>
<p>This is an early preview, and some functionality will change as development continues. Our goal is to build a practical, open source approach to database management that gives teams more control over their infrastructure, not less.</p>
<p><strong><a href="https://pds.percona.com/">Try PDS Today</a></strong></p>
<p>The post <a href="https://www.percona.com/blog/percona-database-service-pds/">Introducing Percona Database Service (PDS): What Happens When an Engineer Just Wants to Try Something</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/percona-database-service-pds/">Introducing Percona Database Service (PDS): What Happens When an Engineer Just Wants to Try Something</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Built for your most demanding workloads: performance and scaling in MariaDB Enterprise Platform 2027</title>
        <link>https://mariadb.com/resources/blog/built-for-your-most-demanding-workloads-performance-and-scaling-in-mariadb-enterprise-platform-2027/</link>
        <pubDate>Thu, 12 Nov 2026 16:41:10 +0000</pubDate>
        <dc:creator>Fermi Fang</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/built-for-your-most-demanding-workloads-performance-and-scaling-in-mariadb-enterprise-platform-2027/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>Demanding database workloads ask two things of the database underneath them. Each server has to turn the hardware it runs […]</p>
<p><a href="https://mariadb.com/resources/blog/built-for-your-most-demanding-workloads-performance-and-scaling-in-mariadb-enterprise-platform-2027/">Built for your most demanding workloads: performance and scaling in MariaDB Enterprise Platform 2027</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Demanding database workloads ask two things of the database underneath them. Each server has to turn the hardware it runs on into as many transactions as possible, and the system has to keep growing once a single server is no longer enough. MariaDB Enterprise Platform 2027 moves forward on both. In this blog, we’ll walk you through what’s new, starting with raw performance on a single server…</p>
<p><a href="https://mariadb.com/resources/blog/built-for-your-most-demanding-workloads-performance-and-scaling-in-mariadb-enterprise-platform-2027/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/built-for-your-most-demanding-workloads-performance-and-scaling-in-mariadb-enterprise-platform-2027/">Built for your most demanding workloads: performance and scaling in MariaDB Enterprise Platform 2027</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>PostgreSQL restores: preserve ownership and grants, or remap them deliberately</title>
        <link>https://percona.community/blog/2026/11/12/postgresql-restore-ownership-acls-default-privileges/</link>
        <pubDate>Thu, 12 Nov 2026 10:30:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/postgresql-restores-preserve-ownership-and-grants-or-remap-them-deliberately/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>A PostgreSQL restore can recover every row and still leave the application unable to insert the next one. To understand why, we need to look at ownership, table permissions and sequence permissions separately. Default privileges add a further question: who will create the next table?</p>
<p><a href="https://percona.community/blog/2026/11/12/postgresql-restore-ownership-acls-default-privileges/">PostgreSQL restores: preserve ownership and grants, or remap them deliberately</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>A PostgreSQL restore can recover every row and still leave the application unable to insert the next one. To understand why, we need to look at ownership, table permissions and sequence permissions separately. Default privileges add a further question: who will create the next table?</p>
<p>This article follows two ways of restoring the same custom-format backup. The first preserves the source ownership and access control lists (ACLs), which record grants to roles. The second gives restored objects a new owner and explicitly grants the intended application permissions. The distinction matters because <code>pg_restore --no-owner</code> does not translate all references to old roles into new ones.</p>
<p>The examples use synthetic data in disposable local containers. AI/model assistance was used to develop the text and lab scripts; execution and checks were performed through automated tools. This is a lab exercise, not a production case study.</p>
<h2>Choose the restore policy</h2>
<h3>Preserve ownership and ACLs</h3>
<ul>
<li><strong>Restored objects:</strong> Keep the source owners; create the required roles first.</li>
<li><strong>Existing application access:</strong> Replay the source grants.</li>
<li><strong>Future objects:</strong> Check the original creator’s default privileges.</li>
</ul>
<h3>Remap deliberately</h3>
<ul>
<li><strong>Restored objects:</strong> Use <code>--no-owner --no-acl --role=target_owner</code>.</li>
<li><strong>Existing application access:</strong> Grant the target application’s schema, table and sequence privileges explicitly.</li>
<li><strong>Future objects:</strong> Set defaults for the role that actually creates the objects.</li>
</ul>
<p><code>--no-owner</code> alone is not the second policy: it changes ownership without translating role names in the archived grants. The diagnostic branch below shows the difference.</p>
<h2>What the lab controls</h2>
<p>The lab pins PostgreSQL <strong>18.4</strong>, using the <code>linux/amd64</code> image:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">postgres:18.4-bookworm@sha256:882236b897e39051d2368c5ccc6cda944904723506b2dfc97f2a8f5bc9afa382</span></span></code></pre>
</div>
</div>
</div>
<p>Docker is version <strong>28.4.0</strong>. The server and tools reported <strong>18.4 (Debian 18.4-1.pgdg12+1)</strong>. The digest identifies the tested image so that the environment can be reproduced; it is not a claim that 18.4 is the latest release.</p>
<p>The version-specific references are PostgreSQL’s <code>REL_18_4</code> documentation for <a href="https://raw.githubusercontent.com/postgres/postgres/REL_18_4/doc/src/sgml/ref/pg_restore.sgml" target="_blank" rel="noopener noreferrer">restore options</a> and <a href="https://raw.githubusercontent.com/postgres/postgres/REL_18_4/doc/src/sgml/ref/alter_default_privileges.sgml" target="_blank" rel="noopener noreferrer">default privileges</a>. Further references are listed in the <a href="https://percona.community/blog/2026/10/postgresql-restore-permissions/references/source-notes.md">source notes</a>.</p>
<p>The recorded verification run completed on <strong>13 October 2026 at 08:10:20 UTC: PASS, 70 checks, no unexpected failures</strong>. The 70 comprise <strong>57 positive/state checks</strong>, <strong>12 expected permission failures with SQLSTATE 42501</strong>, and <strong>one expected missing-role restore failure</strong>. Its <a href="https://percona.community/blog/2026/10/postgresql-restore-permissions/outputs/run-03/results.json">results</a>, <a href="https://percona.community/blog/2026/10/postgresql-restore-permissions/outputs/run-03/transcript.log">transcript</a> and <a href="https://percona.community/blog/2026/10/postgresql-restore-permissions/outputs/run-03/checklist.tsv">checklist</a> include the expected failures and cleanup.</p>
<p>Download and extract the <a href="https://percona.community/blog/2026/10/postgresql-restore-permissions/haifeng-cheng-postgresql-restore-permissions-reproducibility.zip">original reproducibility bundle</a>. It contains the unchanged scripts, raw outputs, checksums and limitations from the recorded lab. The <a href="https://percona.community/blog/2026/10/postgresql-restore-permissions/SHA256SUMS">bundle SHA-256</a> identifies the download. The results below refer to the recorded 13 October run.</p>
<p>Use a local Docker engine for this disposable lab, not a production or shared remote daemon. Restore only archives from trusted sources: a restore can execute code chosen by the source superusers.</p>
<p>To reproduce from the companion directory, with Python 3, Docker and the pinned image available, choose a new output directory:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sh</span><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">python3 scripts/run_lab.py --output outputs/my-fresh-run</span></span></code></pre>
</div>
</div>
</div>
<p>The source and target are separate disposable PostgreSQL instances, with their data held in temporary memory-backed filesystems. Containers use no network and publish no ports; PostgreSQL accepts only local socket connections.</p>
<p>The owner, application and migration roles are synthetic and <code>NOLOGIN</code>. Checks connect locally as the bootstrap administrator, then use <code>SET ROLE</code> to exercise a non-superuser application’s effective privileges. The remapped application is also checked for owner-role membership and elevated attributes. This tests what the role can do after the switch. It does not test application authentication, passwords, connection pooling or connection-time <code>CONNECT</code> permission.</p>
<p>The source database contains an <code>app</code> schema owned by <code>legacy_owner</code>, an application role called <code>legacy_app</code>, and a small table:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-2" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SET</span><span class="w"> </span><span class="k">ROLE</span><span class="w"> </span><span class="n">legacy_owner</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">CREATE</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">app</span><span class="p">.</span><span class="n">widgets</span><span class="w"> </span><span class="p">(</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">id</span><span class="w"> </span><span class="n">bigserial</span><span class="w"> </span><span class="k">PRIMARY</span><span class="w"> </span><span class="k">KEY</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">payload</span><span class="w"> </span><span class="nb">text</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="p">);</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">GRANT</span><span class="w"> </span><span class="k">USAGE</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="k">SCHEMA</span><span class="w"> </span><span class="n">app</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="n">legacy_app</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">GRANT</span><span class="w"> </span><span class="k">SELECT</span><span class="p">,</span><span class="w"> </span><span class="k">INSERT</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">app</span><span class="p">.</span><span class="n">widgets</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="n">legacy_app</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">GRANT</span><span class="w"> </span><span class="k">USAGE</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="n">SEQUENCE</span><span class="w"> </span><span class="n">app</span><span class="p">.</span><span class="n">widgets_id_seq</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="n">legacy_app</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">ALTER</span><span class="w"> </span><span class="k">DEFAULT</span><span class="w"> </span><span class="k">PRIVILEGES</span><span class="w"> </span><span class="k">FOR</span><span class="w"> </span><span class="k">ROLE</span><span class="w"> </span><span class="n">legacy_owner</span><span class="w"> </span><span class="k">IN</span><span class="w"> </span><span class="k">SCHEMA</span><span class="w"> </span><span class="n">app</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">GRANT</span><span class="w"> </span><span class="k">SELECT</span><span class="p">,</span><span class="w"> </span><span class="k">INSERT</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="n">TABLES</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="n">legacy_app</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">ALTER</span><span class="w"> </span><span class="k">DEFAULT</span><span class="w"> </span><span class="k">PRIVILEGES</span><span class="w"> </span><span class="k">FOR</span><span class="w"> </span><span class="k">ROLE</span><span class="w"> </span><span class="n">legacy_owner</span><span class="w"> </span><span class="k">IN</span><span class="w"> </span><span class="k">SCHEMA</span><span class="w"> </span><span class="n">app</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">GRANT</span><span class="w"> </span><span class="k">USAGE</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="n">SEQUENCES</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="n">legacy_app</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>The explicit grants cover the existing table and sequence. The defaults set the policy for subsequent objects created by <code>legacy_owner</code> in this schema. We need both: default privileges do not change existing objects. <a href="https://www.postgresql.org/docs/18/sql-alterdefaultprivileges.html" target="_blank" rel="noopener noreferrer">PostgreSQL documents that separation explicitly.</a></p>
<p><code>bigserial</code> supplies a sequence-backed default, so an insert can expose a missing sequence permission. Table <code>INSERT</code> alone does not grant the right to call that sequence’s <code>nextval</code>. Sequence <code>USAGE</code> is sufficient for ordinary ID allocation; the application does not need sequence <code>UPDATE</code>, which would also allow <code>setval</code>. <a href="https://www.postgresql.org/docs/18/functions-sequence.html" target="_blank" rel="noopener noreferrer">See sequence manipulation functions.</a></p>
<h2>Keep one complete archive</h2>
<p>The source is dumped once using <code>pg_dump --format=custom</code>. Both policies use that same archive, and its transfer to the target is verified by SHA-256. Below are the PostgreSQL portions of the commands, executed inside the relevant container. The companion runner records the complete <code>docker exec</code> commands:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sh</span><button class="code-block__copy" type="button" data-copy-target="codeblock-3" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">pg_dump -h /lab/socket -U postgres --format<span class="o">=</span>custom <span class="se">
</span></span></span><span class="line"><span class="cl"> --file<span class="o">=</span>/lab/source.dump lab_source
</span></span><span class="line"><span class="cl">pg_restore --list /lab/source.dump</span></span></code></pre>
</div>
</div>
</div>
<p>Keep the ACLs in the dump so that you can choose whether to preserve or replace them later. For ownership, <code>pg_dump --no-owner</code> is ignored for non-text archives: with a custom archive, you make that choice at restore time. <a href="https://www.postgresql.org/docs/18/app-pgdump.html" target="_blank" rel="noopener noreferrer">The <code>pg_dump</code> manual describes this behaviour.</a></p>
<p>The archive also has a clear limit: <code>pg_dump</code> exports one database, not definitions of cluster-wide roles. Our script creates the required synthetic roles separately. A real migration needs a reviewed policy for those roles, their memberships and any authentication configuration. The database archive does not provision them. <a href="https://www.postgresql.org/docs/18/app-pgdump.html" target="_blank" rel="noopener noreferrer">See the scope of <code>pg_dump</code>.</a></p>
<p>Each target database starts from <code>template0</code>. Restores use <code>--single-transaction</code>, which also implies exit-on-error, so a failed restore does not leave half of the archive installed.</p>
<p>These commands do not use <code>--create</code>: target database creation and ownership are chosen separately, and restoring the source database creation, ownership and database-level ACL policy is outside this comparison. Database privileges need a separate review. <a href="https://www.postgresql.org/docs/18/app-pgrestore.html" target="_blank" rel="noopener noreferrer">These restore options are documented here.</a></p>
<h2>Policy 1: preserve the source identities</h2>
<p>The preserving command has no ownership or ACL suppression flags:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sh</span><button class="code-block__copy" type="button" data-copy-target="codeblock-4" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">pg_restore -h /lab/socket -U postgres --dbname lab_preserved <span class="se">
</span></span></span><span class="line"><span class="cl"> --single-transaction --exit-on-error /lab/source.dump</span></span></code></pre>
</div>
</div>
</div>
<p>First, try the restore on a target that has neither <code>legacy_owner</code> nor <code>legacy_app</code>. The lab captures this expected failure with its exit status and PostgreSQL error, then checks that the single transaction left no restored schema behind. To preserve the original ownership and grants, create the original roles and repeat the restore:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-5" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">CREATE</span><span class="w"> </span><span class="k">ROLE</span><span class="w"> </span><span class="n">legacy_owner</span><span class="w"> </span><span class="n">NOLOGIN</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">CREATE</span><span class="w"> </span><span class="k">ROLE</span><span class="w"> </span><span class="n">legacy_app</span><span class="w"> </span><span class="n">NOLOGIN</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>These role definitions are enough for this synthetic test; they are not a recipe for copying a production role hierarchy.</p>
<p>The first restore exited <strong>1</strong>, with this recorded error:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-6" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">pg_restore: error: could not execute query: ERROR: role "legacy_owner" does not exist
</span></span><span class="line"><span class="cl">Command was: ALTER SCHEMA app OWNER TO legacy_owner;</span></span></code></pre>
</div>
</div>
</div>
<p>The schema-absence assertion returned <code>t</code>, confirming rollback. After role creation, the restore exited <strong>0</strong>; the ownership, default-ACL and application-operation checks passed.</p>
<p>After the successful restore, inspect object ownership, ACLs and <code>pg_default_acl</code>. A row count alone cannot show whether the application has the access it needs. <code>legacy_owner</code> should own the restored schema, table and sequence; <code>legacy_app</code> should have the source grants. Test both reads and generated-ID inserts under the application role:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-7" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SET</span><span class="w"> </span><span class="k">ROLE</span><span class="w"> </span><span class="n">legacy_app</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">SELECT</span><span class="w"> </span><span class="k">count</span><span class="p">(</span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="o">&gt;=</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">app</span><span class="p">.</span><span class="n">widgets</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">BEGIN</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">INSERT</span><span class="w"> </span><span class="k">INTO</span><span class="w"> </span><span class="n">app</span><span class="p">.</span><span class="n">widgets</span><span class="w"> </span><span class="p">(</span><span class="n">payload</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">VALUES</span><span class="w"> </span><span class="p">(</span><span class="s1">'synthetic-probe'</span><span class="p">)</span><span class="w"> </span><span class="n">RETURNING</span><span class="w"> </span><span class="n">id</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">ROLLBACK</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">RESET</span><span class="w"> </span><span class="k">ROLE</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p><code>RETURNING id &gt; 0</code> also requires <code>SELECT</code> on <code>id</code>; our table-level <code>SELECT</code> grant covers that requirement. Successful insert probes are rolled back, and the runner checks that the original two synthetic rows remain unchanged. Rollback does not reclaim the sequence values consumed by those successful inserts.</p>
<p>When isolating a missing sequence permission, use a plain insert first. Otherwise, a missing <code>RETURNING</code> privilege could confuse the result. <a href="https://www.postgresql.org/docs/18/sql-insert.html" target="_blank" rel="noopener noreferrer">See <code>INSERT</code> privileges.</a></p>
<p>Next, create a new sequence-backed table while the effective role is <code>legacy_owner</code>. The restored default privileges should give <code>legacy_app</code> the intended access to the new table and its sequence. This checks the source’s future-object policy, which a test of the restored table alone cannot establish.</p>
<h2>Why <code>--no-owner</code> alone is not a role map</h2>
<p>For a diagnostic restore, keep the source roles available and change only the ownership policy:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sh</span><button class="code-block__copy" type="button" data-copy-target="codeblock-8" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">pg_restore -h /lab/socket -U postgres --dbname lab_owner_only <span class="se">
</span></span></span><span class="line"><span class="cl"> --single-transaction --exit-on-error --no-owner /lab/source.dump</span></span></code></pre>
</div>
</div>
</div>
<p>In this branch, the restore runs as the bootstrap administrator. Suppressing ownership commands makes the restoring role own newly created objects. It does not replace the archive’s <code>legacy_app</code> grantee with <code>target_app</code>.</p>
<p>The same limit applies to default privileges. An entry belonging to <code>legacy_owner</code> does not become an entry for the new object owner. The original ACL statements are still eligible for restoration. <a href="https://www.postgresql.org/docs/18/app-pgrestore.html" target="_blank" rel="noopener noreferrer">This follows from the separate <code>--no-owner</code> and <code>--no-acl</code> options.</a></p>
<p>The catalogue checks found <code>postgres</code> ownership, retained <code>legacy_app</code> access and two default-ACL entries belonging to <code>legacy_owner</code>. <code>legacy_app</code> could still read and insert into the restored table; <code>target_app</code> failed at schema access.</p>
<p>The future-table check exposed the other consequence. A new <code>app.owner_only_future</code> table created as <code>postgres</code> gave <code>legacy_app</code> neither table access nor sequence <code>USAGE</code>: the retained defaults belonged to a different creator.</p>
<p>Ownership has changed, but the old role names remain in the permission policy. On a target lacking those roles, retained ACL statements can also cause restore errors. Treat <code>--no-owner</code> as an ownership switch, not a general role-renaming mechanism.</p>
<h2>Policy 2: rebuild the intended permissions</h2>
<p>The second policy introduces <code>target_owner</code> and <code>target_app</code>. It restores into a fresh database owned by <code>target_owner</code>:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sh</span><button class="code-block__copy" type="button" data-copy-target="codeblock-9" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">pg_restore -h /lab/socket -U postgres --dbname lab_remapped <span class="se">
</span></span></span><span class="line"><span class="cl"> --single-transaction --exit-on-error --no-owner --no-acl <span class="se">
</span></span></span><span class="line"><span class="cl"> --role<span class="o">=</span>target_owner /lab/source.dump</span></span></code></pre>
</div>
</div>
</div>
<p>Here, <code>--role</code> performs <code>SET ROLE</code> after connection. Combined with <code>--no-owner</code>, that makes <code>target_owner</code> the role creating and owning the restored objects.</p>
<p>The separate <code>--no-acl</code> option suppresses the archived privilege restoration, including default-privilege grants. It does not revoke built-in defaults or privileges already present on the target. We still need to grant the application its intended access through explicit SQL after the restore. <a href="https://www.postgresql.org/docs/18/app-pgrestore.html" target="_blank" rel="noopener noreferrer">See <code>pg_restore</code>.</a></p>
<p>Start by attempting a read as <code>target_app</code>. It should fail at the schema, before reaching the table. Capture that expected failure, then grant lookup access to the schema:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-10" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">GRANT</span><span class="w"> </span><span class="k">USAGE</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="k">SCHEMA</span><span class="w"> </span><span class="n">app</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="n">target_app</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>The next read should reach the table and fail there. Now grant the application the two table privileges it needs:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-11" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">GRANT</span><span class="w"> </span><span class="k">SELECT</span><span class="p">,</span><span class="w"> </span><span class="k">INSERT</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">app</span><span class="p">.</span><span class="n">widgets</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="n">target_app</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>The read should now pass, but an insert using the default ID should still fail on <code>widgets_id_seq</code>. Grant access to that sequence:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-12" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">GRANT</span><span class="w"> </span><span class="k">USAGE</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="n">SEQUENCE</span><span class="w"> </span><span class="n">app</span><span class="p">.</span><span class="n">widgets_id_seq</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="n">target_app</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>The recorded failures, in order, were:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-13" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">ERROR: 42501: permission denied for schema app
</span></span><span class="line"><span class="cl">ERROR: 42501: permission denied for table widgets
</span></span><span class="line"><span class="cl">ERROR: 42501: permission denied for sequence widgets_id_seq</span></span></code></pre>
</div>
</div>
</div>
<p>The runner uses non-interactive SQL execution with <code>ON_ERROR_STOP=1</code>, under which these errors returned psql exit <strong>3</strong>; their SQLSTATE was <strong>42501</strong>. After the sequence grant, both application <code>SELECT</code> and generated-ID <code>INSERT ... RETURNING</code> checks returned <code>t</code>, with exit <strong>0</strong>.</p>
<p>Each failure identifies a separate permission: looking up an object in a schema, operating on a table, or allocating an ID from a sequence. Granting <code>ALL PRIVILEGES</code> would hide these boundaries and give the application powers it does not need. <a href="https://www.postgresql.org/docs/18/ddl-priv.html" target="_blank" rel="noopener noreferrer">PostgreSQL treats these privileges separately.</a></p>
<p>The repair must also leave unrelated operations blocked. The application must still fail to create a table in <code>app</code>, update or delete the test rows, and call <code>setval</code> on the sequence. These negative checks show that the grants stayed within this example’s requirements.</p>
<h2>Default privileges apply only to future objects</h2>
<p>Suppose a migration has already created <code>app.early_widgets</code> before you install replacement defaults. Configure the intended future policy under <code>target_owner</code>:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-14" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">ALTER</span><span class="w"> </span><span class="k">DEFAULT</span><span class="w"> </span><span class="k">PRIVILEGES</span><span class="w"> </span><span class="k">FOR</span><span class="w"> </span><span class="k">ROLE</span><span class="w"> </span><span class="n">target_owner</span><span class="w"> </span><span class="k">IN</span><span class="w"> </span><span class="k">SCHEMA</span><span class="w"> </span><span class="n">app</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">GRANT</span><span class="w"> </span><span class="k">SELECT</span><span class="p">,</span><span class="w"> </span><span class="k">INSERT</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="n">TABLES</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="n">target_app</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">ALTER</span><span class="w"> </span><span class="k">DEFAULT</span><span class="w"> </span><span class="k">PRIVILEGES</span><span class="w"> </span><span class="k">FOR</span><span class="w"> </span><span class="k">ROLE</span><span class="w"> </span><span class="n">target_owner</span><span class="w"> </span><span class="k">IN</span><span class="w"> </span><span class="k">SCHEMA</span><span class="w"> </span><span class="n">app</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">GRANT</span><span class="w"> </span><span class="k">USAGE</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="n">SEQUENCES</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="n">target_app</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>The previously created table still needs its own grants:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-15" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">GRANT</span><span class="w"> </span><span class="k">SELECT</span><span class="p">,</span><span class="w"> </span><span class="k">INSERT</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">app</span><span class="p">.</span><span class="n">early_widgets</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="n">target_app</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">GRANT</span><span class="w"> </span><span class="k">USAGE</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="n">SEQUENCE</span><span class="w"> </span><span class="n">app</span><span class="p">.</span><span class="n">early_widgets_id_seq</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="n">target_app</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>Check the early table before applying its explicit repair: it should remain inaccessible even after the defaults are installed. Then repair it with the named grants above.</p>
<p>Create <code>app.future_widgets</code> <em>after</em> the defaults, with <code>target_owner</code> as the current role. The application should now be able to read and insert without additional object grants.</p>
<p>This policy covers every future table and sequence created by that owner in <code>app</code>. That scope is intentional. If some future tables should remain private, use a different schema or a more selective provisioning policy. Defaults are convenient, but they still grant access. <a href="https://www.postgresql.org/docs/18/sql-alterdefaultprivileges.html" target="_blank" rel="noopener noreferrer">See schema-specific default privileges.</a></p>
<p>Role membership introduces another trap. The lab grants <code>target_owner</code> to <code>migration_role</code>, then creates <code>app.migration_widgets</code> while <code>current_user</code> is still <code>migration_role</code>. The membership configuration must allow the intended inherited schema privilege for this DDL and the later <code>SET ROLE target_owner</code>.</p>
<p>Membership provides schema access in this lab, but the new table belongs to <code>migration_role</code>. PostgreSQL applies the current creator’s defaults, not defaults inherited from roles of which it is a member. Consequently, <code>target_owner</code>’s defaults do not grant <code>target_app</code> access to that table. <a href="https://www.postgresql.org/docs/18/sql-alterdefaultprivileges.html" target="_blank" rel="noopener noreferrer">This creator-role rule is explicit in the manual.</a></p>
<p>To follow the lab’s ownership policy, the migration changes its effective role before creating subsequent objects. The test first sets the session authorisation to <code>migration_role</code>. This means that successful <code>SET ROLE</code> depends on that role’s membership, rather than the bootstrap administrator’s superuser power:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-16" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SET</span><span class="w"> </span><span class="k">SESSION</span><span class="w"> </span><span class="k">AUTHORIZATION</span><span class="w"> </span><span class="n">migration_role</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">SET</span><span class="w"> </span><span class="k">ROLE</span><span class="w"> </span><span class="n">target_owner</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">CREATE</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">app</span><span class="p">.</span><span class="n">migration_fixed_widgets</span><span class="w"> </span><span class="p">(</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">id</span><span class="w"> </span><span class="n">bigserial</span><span class="w"> </span><span class="k">PRIMARY</span><span class="w"> </span><span class="k">KEY</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">payload</span><span class="w"> </span><span class="nb">text</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="p">);</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">RESET</span><span class="w"> </span><span class="k">ROLE</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>The resulting table and sequence belong to <code>target_owner</code>, so its defaults apply.</p>
<p>The earlier object created as <code>migration_role</code> does not change retroactively. The lab repairs its application access with a separate named table-and-sequence grant, while its owner remains <code>migration_role</code>. Whether to change that existing object’s owner is a separate decision.</p>
<p>The recorded results show both traps: <code>early_widgets</code> still produced <code>permission denied for table early_widgets</code> after the defaults, and the member-created table produced <code>permission denied for table migration_widgets</code>. Both had SQLSTATE <strong>42501</strong>.</p>
<p>The explicitly repaired early table, the future owner-created table and <code>migration_fixed_widgets</code> all passed their application <code>SELECT</code>, generated-ID <code>INSERT</code> and privilege checks.</p>
<h2>A restore is complete when the chosen policy passes</h2>
<p>The companion checklist records the required result for each operation, the actual exit status and the associated log. An expected failure must match the intended PostgreSQL error as well as return a non-zero status. An unrelated connection error does not count as a passing permissions test. The recorded final run recreated both disposable instances from scratch and repeated the checks.</p>
<p>For preservation, check that the source owners, existing ACLs and original creator’s future-object defaults all work.</p>
<p>For remapping, verify the new owner, grant the intended application permissions explicitly, repair existing objects separately from future defaults, and run migration DDL as the intended creator. In either policy, test both the application operation and the powers it must not have.</p>
<p>The scope is deliberately small: ordinary tables, <code>bigserial</code> sequences, one application schema and synthetic roles. It does not establish behaviour for identity columns, extensions, row-level security, large objects, security-definer functions, partitioning, tablespaces, production authentication or cross-version migrations.</p>
<p>Sequence values may have gaps after failed statements and after successful inserts whose transactions are rolled back, so the checks do not demand consecutive IDs.</p>
<p><em>This post is part of the <a href="https://percona.community/blog/write-for-percona-community/">Percona Community Writers Program</a>.</em></p>
<p><a href="https://percona.community/blog/2026/11/12/postgresql-restore-ownership-acls-default-privileges/">PostgreSQL restores: preserve ownership and grants, or remap them deliberately</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Deploying OpenEverest on a 3-Node K3s Cluster</title>
        <link>https://www.percona.com/blog/deploying-openeverest-on-a-3-node-k3s-cluster/</link>
        <pubDate>Thu, 12 Nov 2026 03:52:56 +0000</pubDate>
        <dc:creator>Arunjith Aravindan</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/deploying-openeverest-on-a-3-node-k3s-cluster/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Part 1 of 2: From bare Ubuntu servers to a running MySQL cluster OpenEverest is an open source platform for running databases such as MySQL, PostgreSQL and MongoDB on Kubernetes. You get a web console and an API, and Kubernetes operators handle provisioning, scaling, backups and failover behind the scenes. This post builds a small … Continued<br />
The post Deploying OpenEverest on a 3-Node K3s Cluster appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/deploying-openeverest-on-a-3-node-k3s-cluster/">Deploying OpenEverest on a 3-Node K3s Cluster</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><i><span>Part 1 of 2: From bare Ubuntu servers to a running MySQL cluster</span></i></p>
<p><span>OpenEverest is an open source platform for running databases such as MySQL, PostgreSQL and MongoDB on Kubernetes. You get a web console and an API, and Kubernetes operators handle provisioning, scaling, backups and failover behind the scenes.</span></p>
<p><span>This post builds a small but realistic lab from scratch: a 3-node K3s Kubernetes cluster on Ubuntu 26.04, OpenEverest on top of it, and a 3-node Percona XtraDB Cluster (PXC) for MySQL that you can connect to from your laptop. Every step explains what the command does and why it is needed</span><span>.</span></p>
<p><b>Part 2</b> <span>of this series looks inside the MySQL cluster: how to read Galera’s health indicators, and a live failover test where we kill the primary database pod while writes keep running.</span></p>
<h2><b>What You Will Build</b></h2>
<ul>
<li><b>K3s</b><span>:</span><span> a lightweight, CNCF-certified Kubernetes distribution. A single binary includes containerd (the container runtime), Flannel (pod networking), CoreDNS (service discovery) and the local-path storage provisioner.</span></li>
<li><b>Helm</b><span>:</span><span> the Kubernetes package manager, used to install OpenEverest.</span></li>
<li><b>OpenEverest</b><span>:</span><span> the control plane (everest-server for the UI/API, everest-operator for reconciling database clusters).</span></li>
<li><b>Percona XtraDB Cluster</b><span>:</span><span> a 3-node, synchronously replicated MySQL cluster with HAProxy in front of it, created from the OpenEverest UI.</span></li>
</ul>
<h2><b>Server Inventory</b></h2>
<p><span>Each node needs a</span> <b>unique hostname and a unique IP address</b><span>. Kubernetes identifies nodes by hostname, so two VMs cloned from the same image with the same hostname will conflict</span><span>.</span></p>
<table border="1" cellspacing="0" cellpadding="8">
<thead>
<tr>
<th>Role</th>
<th>Hostname</th>
<th>IP address</th>
</tr>
</thead>
<tbody>
<tr>
<td><span>Control plane</span></td>
<td><span>arunopeneverestcontrolplanenode</span></td>
<td><span>10.50.55.155</span></td>
</tr>
<tr>
<td><span>Worker node 1</span></td>
<td><span>arunjithopeneverestworkernode1</span></td>
<td><span>10.50.55.156</span></td>
</tr>
<tr>
<td><span>Worker node 2</span></td>
<td><span>arunjithopeneverestworkernode2</span></td>
<td><span>10.50.55.157</span></td>
</tr>
</tbody>
</table>
<p><span>The nodes must be able to reach each other on these ports:</span></p>
<table border="1" cellspacing="0" cellpadding="8">
<thead>
<tr>
<th>Port</th>
<th>Protocol</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td><span>6443</span></td>
<td><span>TCP</span></td>
<td><span>Kubernetes API server (workers to control plane)</span></td>
</tr>
<tr>
<td><span>8472</span></td>
<td><span>UDP</span></td>
<td><span>Flannel VXLAN overlay: pod-to-pod traffic between nodes</span></td>
</tr>
<tr>
<td><span>10250</span></td>
<td><span>TCP</span></td>
<td><span>Kubelet API (logs, exec, metrics)</span></td>
</tr>
</tbody>
</table>
<h2></h2>
<h2><b>Phase 1: Prepare All Three Nodes</b></h2>
<p><b>Where to run:</b> <span>all three servers. Open three terminal windows and SSH into each one.</span></p>
<h4><b>Step 1.1: Connect to Each Server</b></h4>
<p><span>Open one SSH session per server so you can run the preparation commands side by side.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag"># Terminal 1 - Control plane
ssh @

# Terminal 2 - Worker node 1
ssh @

# Terminal 3 - Worker node 2
ssh @</pre>
</p>
<h3><b>Step 1.2: Install Packages and Disable Swap</b></h3>
<p><span>This refreshes the package index and installs the tools the rest of the guide needs:</span></p>
<ul>
<li><span>curl and wget download the K3s and Helm installers.</span></li>
<li><span>open-iscsi and nfs-common are not needed by local-path storage, but they are prerequisites for replicated storage such as Longhorn or NFS volumes. Installing them now makes it easy to switch storage later.</span></li>
</ul>
<p><span>Swap is turned off because the kubelet expects it to be disabled by default. With swap on, memory limits on database pods become unpredictable. The sed command comments out the swap line in /etc/fstab so swap stays off after a reboot.</span></p>
<div>$ Command <span>(all three nodes)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">sudo apt-get update &amp;&amp; sudo apt-get install -y curl wget apt-transport-https open-iscsi nfs-common
sudo swapoff -a
sudo sed -i '/ swap / s/^/#/g' /etc/fstab</pre>
</p>
<h4><b>Step 1.3: Enable Kernel Modules and IP Forwarding</b></h4>
<p><span>Kubernetes networking relies on two kernel modules and three kernel settings:</span></p>
<ul>
<li><span>overlay: the filesystem driver containerd uses to stack container image layers.</span></li>
<li><span>br_netfilter: lets iptables see traffic crossing the Linux bridge, which is how Kubernetes Services and network policies work.</span></li>
<li><span>net.bridge.bridge-nf-call-iptables and ip6tables: send bridged IPv4/IPv6 traffic through iptables.</span></li>
<li><span>net.ipv4.ip_forward: allows the node to route packets between pods on different nodes.</span></li>
</ul>
<p><span>modprobe loads the modules now. The file in /etc/modules-load.d/ loads them again on every boot, and the file in /etc/sysctl.d/ does the same for the kernel settings.</span></p>
<div>$ Command <span>(all three nodes)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">sudo modprobe overlay
sudo modprobe br_netfilter

sudo tee /etc/modules-load.d/k8s.conf &lt;&lt;EOF
overlay
br_netfilter
EOF

sudo tee /etc/sysctl.d/kubernetes.conf &lt;&lt;EOF
net.bridge.bridge-nf-call-iptables  = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.ipv4.ip_forward                 = 1
EOF

sudo sysctl --system</pre>
</p>
<h2><b>Phase 2: Install the K3s Control Plane</b></h2>
<p><b>Where to run:</b><span> control plane only (10.50.55.155).</span></p>
<h4><b>Step 2.1: Install the K3s Server</b></h4>
<p><span>The official install script downloads K3s, installs it as a systemd service named k3s, and starts the Kubernetes control plane. INSTALL_K3S_EXEC passes extra flags to the server:</span></p>
<ul>
<li><span>–disable traefik: K3s ships with the Traefik ingress controller. This lab doesn’t use ingress, so we skip it to save resources.</span></li>
<li><span>–node-ip 10.50.55.155: pins the address Kubernetes advertises for this node. This matters on servers with more than one network interface.</span></li>
<li><span>–flannel-backend=vxlan: pod traffic between nodes is wrapped in VXLAN over UDP 8472. This is already the default; it is set explicitly for clarity.</span></li>
</ul>
<div>$ Command <span>(control plane)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--disable traefik --node-ip 10.50.55.155 --flannel-backend=vxlan" sh -</pre>
</p>
<h4><b>Step 2.2: Let Your User Run kubectl</b></h4>
<p><span>K3s writes its admin kubeconfig to /etc/rancher/k3s/k3s.yaml, which only root can read. These commands copy it to your home directory, make you the owner, and point KUBECONFIG at it, now and in every future shell.</span></p>
<div>$ Command <span>(control plane)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">mkdir -p $HOME/.kube
sudo cp /etc/rancher/k3s/k3s.yaml $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
export KUBECONFIG=$HOME/.kube/config
echo "export KUBECONFIG=$HOME/.kube/config" &gt;&gt; ~/.bashrc</pre>
</p>
<div><b><img decoding="async" src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4dd.png" alt="&#x1f4dd;" class="wp-smiley"> Note:</b> This is the only server where <code>kubectl</code> is configured. All later <code>kubectl</code> and <code>helm</code> commands in this series run on the control plane.</div>
<h4></h4>
<h4><b>Step 2.3: Get the Node Join Token</b></h4>
<p><span>Worker nodes need a shared secret to join the cluster. K3s stores it in node-token.</span></p>
<div>$ Command <span>(control plane)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">sudo cat /var/lib/rancher/k3s/server/node-token</pre>
<p><b>Output (format)</b></p>
<pre class="urvanov-syntax-highlighter-plain-tag">K10::server:</pre>
<p><span>The token has two parts. K10 lets the joining node verify the server’s TLS certificate. The part after ::server: is the actual password.</span></p>
<p><b>Security: </b><span>Treat the whole token as a credential. Never publish the part after </span><span>::server:</span><span>. Anyone who has it can join a machine to your cluster.</span></p>
<h2><b>Phase 3: Join the Worker Nodes</b></h2>
<p><b>Where to run:</b> <span>each worker, in its own terminal. Replace  with the full token from Step 2.3.</span></p>
<p><span>When K3S_URL is set, the same install script runs in agent mode. The node connects to the API server at https://10.50.55.155:6443, authenticates with the token, and starts running pods. –node-ip again pins the address each node advertises.</span></p>
<h4><b>Step 3.1: Join Worker Node 1</b></h4>
<div>$ Command <span>(worker node 1: 10.50.55.156)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">curl -sfL https://get.k3s.io | K3S_URL=https://10.50.55.155:6443 
  K3S_TOKEN="" 
  INSTALL_K3S_EXEC="--node-ip=10.50.55.156" sh -</pre>
</p>
<h4><b>Step 3.2: Join Worker Node 2</b></h4>
<div>$ Command <span>(worker node 2: 10.50.55.157)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">curl -sfL https://get.k3s.io | K3S_URL=https://10.50.55.155:6443 
  K3S_TOKEN="" 
  INSTALL_K3S_EXEC="--node-ip=10.50.55.157" sh -</pre>
</p>
<h2><b>Phase 4: Install OpenEverest</b></h2>
<p><b>Where to run:</b><span> control plane only (10.50.55.155).</span></p>
<h4><b>Step 4.1: Verify All Nodes Are Ready</b></h4>
<p><span>Ready means the kubelet on that node is healthy and has working pod networking. Workers show  under ROLES; that is normal for K3s agents.</span></p>
<div>$ Command <span>(control plane)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">kubectl get nodes</pre>
<p><b>Output</b></p>
<pre class="urvanov-syntax-highlighter-plain-tag">NAME                              STATUS   ROLES           AGE     VERSION
arunjithopeneverestworkernode1    Ready              4m6s    v1.36.5+k3s1
arunjithopeneverestworkernode2    Ready              3m18s   v1.36.5+k3s1
arunopeneverestcontrolplanenode   Ready    control-plane   9m3s    v1.36.5+k3s1</pre>
</p>
<div><b><img decoding="async" src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4dd.png" alt="&#x1f4dd;" class="wp-smiley"> Note:</b> In K3s, the control plane node also runs normal pods, including one of the database pods. This is fine for a test lab. In production, it is better to run database pods only on worker nodes.</div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">kubectl get pods -n everest -o wide | grep pxc
mysql-vjg-pxc-0                                    1/1     Running   0               75m   10.42.2.17   arunjithopeneverestworkernode2               
mysql-vjg-pxc-1                                    1/1     Running   0               10d   10.42.1.7    arunjithopeneverestworkernode1               
mysql-vjg-pxc-2                                    1/1     Running   0               10d   10.42.0.10   arunopeneverestcontrolplanenode              </pre>
</p>
<h4><b>Step 4.2: Install Helm</b></h4>
<p><span>Helm installs applications from versioned packages called charts. This script detects your OS and architecture and installs the helm binary to /usr/local/bin.</span></p>
<div>$ Command <span>(control plane)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash</pre>
</p>
<div><b><img decoding="async" src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4dd.png" alt="&#x1f4dd;" class="wp-smiley"> Note:</b> Piping a script from the internet into bash is convenient for a lab. For repeatable builds, pin a specific Helm release instead.</div>
<h4><b>Step 4.3: Confirm the Default StorageClass</b></h4>
<p><span>Databases need persistent volumes. When OpenEverest creates a database, it requests storage from the default StorageClass, which on K3s is local-path.</span></p>
<div>$ Command <span>(control plane)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">kubectl get storageclass</pre>
<p><b>Output</b></p>
<pre class="urvanov-syntax-highlighter-plain-tag">NAME                   PROVISIONER             RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
local-path (default)   rancher.io/local-path   Delete          WaitForFirstConsumer   false                  11m</pre>
<p><span>What these columns mean for a database:</span></p>
<ul>
<li><span>WaitForFirstConsumer: the volume is created only after the pod is scheduled, so the data directory lands on the same node as the pod.</span></li>
<li><span>Node-local data: each volume is a directory on one node’s disk. The pod is pinned to that node for its whole life. If the node is lost, the pod cannot move; Galera rebuilds the data on a new node from the surviving replicas.</span></li>
<li><span>ALLOWVOLUMEEXPANSION false: you cannot grow these volumes later, so size them generously.</span></li>
<li><span>RECLAIMPOLICY Delete: deleting the volume claim deletes the data.</span></li>
</ul>
<p><span>If local-path is not marked (default), set it:</span></p>
<div>$ Command <span>(control plane)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">kubectl annotate storageclass local-path storageclass.kubernetes.io/is-default-class=true --overwrite</pre>
</p>
<h4><b>Step 4.4: Install OpenEverest with Helm</b></h4>
<p><span>helm repo add registers the OpenEverest chart repository, and helm repo update downloads its index. helm install creates a release named everest in a new namespace, everest-system, which holds the OpenEverest control plane.</span></p>
<div>$ Command <span>(control plane)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">helm repo add openeverest https://openeverest.github.io/helm-charts/
helm repo update

helm install everest openeverest/openeverest 
  --namespace everest-system 
  --create-namespace</pre>
</p>
<h4><b>Step 4.5: Verify the OpenEverest Pods</b></h4>
<p><span>Two pods should reach Running within 1 to 2 minutes:</span></p>
<ul>
<li><span>everest-server: serves the web console and REST API.</span></li>
<li><span>everest-operator: watches OpenEverest resources and turns them into database clusters by driving the Percona operators.</span></li>
</ul>
<div>$ Command <span>(control plane)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">kubectl get pods -n everest-system</pre>
<p><b>Output</b></p>
<pre class="urvanov-syntax-highlighter-plain-tag">NAME                                READY   STATUS    RESTARTS   AGE
everest-operator-589d68c4cf-4hbss   1/1     Running   0          115s
everest-server-846b99fcd-2jtd9      1/1     Running   0          115s</pre>
</p>
<h4><b>Step 4.6: Retrieve the Admin Password</b></h4>
<p><span>OpenEverest stores its user accounts in a Kubernetes Secret. Secret values are base64-encoded, so the command extracts the users.yaml key and decodes it. The output contains the admin user’s initial password.</span></p>
<div>$ Command <span>(control plane)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">kubectl get secret everest-accounts -n everest-system -o jsonpath='{.data.users.yaml}' | baseCommand (on your laptop)
ssh -L 8080:127.0.0.1:8080 arunjith.aravindan@10.50.55.155</pre>
</p>
<h2><b>Phase 5: Open the OpenEverest Web Console</b></h2>
<p><span>The everest Service is only reachable inside the cluster. To use it from your laptop, chain two forwards: an SSH tunnel from your laptop to the control plane, and a kubectl port-forward from the control plane into the cluster.</span></p>
<h4><b>Step 5.1: Open an SSH Tunnel from Your Laptop</b></h4>
<p><span>-L 8080:127.0.0.1:8080 means: anything that connects to port 8080 on my laptop is sent through SSH to port 8080 on the control plane’s loopback interface.</span></p>
<div>$ Command <span>(on your laptop)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">ssh -L 8080:127.0.0.1:8080 arunjith.aravindan@10.50.55.155</pre>
</p>
<h4><b>Step 5.2: Port-Forward the UI Service</b></h4>
<p><span>In the SSH session you just opened, forward local port 8080 on the control plane to the everest Service. Leave this running.</span></p>
<div>$ Command <span>(control plane, inside the tunnel session)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">kubectl port-forward svc/everest 8080:8080 -n everest-system</pre>
<p><b>Security: </b><span>kubectl port-forward</span><span> listens on 127.0.0.1 by default, which is exactly where the SSH tunnel delivers traffic. Avoid </span><span>–address 0.0.0.0</span><span>: it exposes the UI to every host that can reach the control plane.</span></p>
<h4><b>Step 5.3: Log In</b></h4>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">Open http://localhost:8080 in your browser and log in as admin with the password from Step 4.6.</pre>
</p>
<h4><b>Step 5.4: Create a MySQL Database</b></h4>
<p><span>In the console, create a new MySQL database with 3 nodes. OpenEverest creates a Percona XtraDB Cluster with three PXC pods and HAProxy in front of them, in the everest namespace. It generates a name for the cluster; in this lab it is mysql-vjg, so substitute your own cluster name in the commands that follow.</span></p>
<h2><b>Phase 6: Connect to MySQL</b></h2>
<h4><b>Step 6.1: Understand the Kubernetes Services</b></h4>
<p><span>Before connecting, look at what OpenEverest created. Each Service is a stable network endpoint in front of a group of pods.</span></p>
<div>$ Command <span>(control plane)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">kubectl get svc -n everest | grep mysql-vjg</pre>
<p><b>Output</b></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql-vjg-haproxy            ClusterIP   10.43.69.73      3306/TCP,3309/TCP,33062/TCP,33060/TCP,8404/TCP   44m
mysql-vjg-haproxy-replicas   ClusterIP   10.43.2.25       3306/TCP                                         44m
mysql-vjg-pxc                ClusterIP   None             3306/TCP,33062/TCP,33060/TCP                     44m
mysql-vjg-pxc-unready        ClusterIP   None             3306/TCP,33062/TCP,33060/TCP                     44m</pre>
</p>
<table border="1" cellspacing="0" cellpadding="8">
<thead>
<tr>
<th>Service</th>
<th>What it is for</th>
</tr>
</thead>
<tbody>
<tr>
<td><span>mysql-vjg-haproxy</span></td>
<td><span>The main application endpoint. Port </span><b>3306</b><span> sends every connection to a single writer node. </span><b>3309</b><span> is the same routing with the PROXY protocol (preserves the client IP). </span><b>33062</b><span> is the MySQL admin port, </span><b>33060</b><span> is the X Protocol, and </span><b>8404</b><span> serves HAProxy statistics.</span></td>
</tr>
<tr>
<td><span>mysql-vjg-haproxy-replicas</span></td>
<td><span>Port 3306 round-robins connections across </span><b>all</b><span> healthy nodes. Use it to spread read traffic.</span></td>
</tr>
<tr>
<td><span>mysql-vjg-pxc</span></td>
<td><span>A </span><b>headless</b><span> Service (</span><span>ClusterIP: None</span><span>). Instead of one virtual IP, it gives every pod a stable DNS name such as </span><span>mysql-vjg-pxc-0.mysql-vjg-pxc.everest.svc.cluster.local</span><span>.</span></td>
</tr>
<tr>
<td><span>mysql-vjg-pxc-unready</span></td>
<td><span>Also headless, but it publishes pods </span><b>before</b><span> they pass their readiness check. Galera nodes use it to find each other while the cluster is still forming.</span></td>
</tr>
</tbody>
</table>
<p><span>Inside the cluster, CoreDNS resolves </span><span>mysql-vjg-haproxy</span><span> (or the full form </span><span>mysql-vjg-haproxy.everest.svc.cluster.local</span><span>) to the Service. That name does not resolve from your laptop, which is why the next steps use port forwarding.</span></p>
<h4><b>Step 6.2: Get the MySQL Root Password</b></h4>
<p><span>OpenEverest stores the database credentials in a Secret named </span><span>everest-secrets-</span><span>. This command decodes the </span><span>root</span><span> key into a shell variable, so the password never appears on screen or in your shell history.</span></p>
<div>$ Command <span>(control plane)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">export ROOT_PW=$(kubectl get secret everest-secrets-mysql-vjg -n everest -o jsonpath='{.data.root}' | base64 --decode)

echo "$ROOT_PW"   # print it once if you need to type it on your laptop</pre>
</p>
<h4><b>Step 6.3: Port-Forward HAProxy on the Control Plane</b></h4>
<p><span>This forwards port 3306 on the control plane’s loopback interface to the HAProxy Service. Keep this terminal open.</span></p>
<div>$ Command <span>(control plane)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">kubectl port-forward svc/mysql-vjg-haproxy 3306:3306 -n everest</pre>
<p><b>Output</b></p>
<pre class="urvanov-syntax-highlighter-plain-tag">Forwarding from 127.0.0.1:3306 -&gt; 3306
Forwarding from [::1]:3306 -&gt; 3306
Handling connection for 3306</pre>
</p>
<h4><b>Step 6.4: Tunnel from Your Laptop</b></h4>
<p><span>Port 3307 here is just a </span><b>local port on your laptop</b><span>, chosen so it doesn’t clash with a MySQL server you may already run on 3306. The tunnel sends it to port 3306 on the control plane, where the port-forward from Step 6.3 picks it up.</span></p>
<div>$ Command <span>(on your laptop)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">ssh -L 3307:127.0.0.1:3306 arunjith.aravindan@10.50.55.155</pre>
</p>
<h4><b>Step 6.5: Connect with the MySQL Client</b></h4>
<p><span>In another laptop terminal, connect to the local end of the tunnel. </span><span>-p</span><span> with no value makes the client prompt for the password, so it is not saved in your shell history.</span></p>
<div>$ Command <span>(on your laptop)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql -h 127.0.0.1 -P 3307 -u root -p</pre>
<p><span>The full path of the connection is: laptop port 3307, then SSH, then control plane port 3306, then </span><span>kubectl port-forward</span><span>, then HAProxy, then the current writer pod.</span></p>
<h4><b>Step 6.6: Check the Cluster Status</b></h4>
<p><span>These queries show Galera’s replication status. Part 2 explains every value; for now, look for </span><span>Synced</span><span>, </span><span>Primary</span><span> and a cluster size of </span><span>3</span><span>.</span></p>
<p><b>SQL</b></p>
<pre class="urvanov-syntax-highlighter-plain-tag">SHOW STATUS LIKE '%wsrep%stat%';

SHOW STATUS LIKE '%wsrep%siz%';</pre>
<p><b>Output</b></p>
<pre class="urvanov-syntax-highlighter-plain-tag">+------------------------------+--------------------------------------+
| Variable_name                | Value                                |
+------------------------------+--------------------------------------+
| wsrep_local_state_uuid       | c1319eb6-d354-11f1-8a79-0ff80b37e565 |
| wsrep_monitor_status (L/A/C) | [ (20, 20), (44, 44), (44, 44) ]     |
| wsrep_flow_control_status    | OFF                                  |
| wsrep_local_state            | 4                                    |
| wsrep_local_state_comment    | Synced                               |
| wsrep_ist_receive_status     |                                      |
| wsrep_evs_state              | OPERATIONAL                          |
| wsrep_cluster_state_uuid     | c1319eb6-d354-11f1-8a79-0ff80b37e565 |
| wsrep_cluster_status         | Primary                              |
+------------------------------+--------------------------------------+</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| wsrep_cert_index_size  | 1     |
| wsrep_gcache_pool_size | 15624 |
| wsrep_cluster_size     | 3     |
+------------------------+-------+</pre>
</p>
<h4><b>Step 6.7: See Which Node You Are Connected To</b></h4>
<p><span>@@hostname</span><span> and </span><span>@@wsrep_node_name</span><span> show which PXC pod HAProxy picked for this connection.</span></p>
<p><b>SQL</b></p>
<pre class="urvanov-syntax-highlighter-plain-tag">SELECT @@hostname, @@wsrep_node_name, @@read_only;</pre>
<p><b>Output</b></p>
<pre class="urvanov-syntax-highlighter-plain-tag">+-----------------+-------------------+-------------+
| @@hostname      | @@wsrep_node_name | @@read_only |
+-----------------+-------------------+-------------+
| mysql-vjg-pxc-0 | mysql-vjg-pxc-0   |           0 |
+-----------------+-------------------+-------------+</pre>
<p><span>Notice </span><span>@@read_only = 0</span><span>. In Percona XtraDB Cluster </span><b>every node accepts writes</b><span>; there are no read-only replicas as in asynchronous replication. So why does HAProxy send all writes to one node?</span></p>
<p><span>Galera checks each transaction for conflicts at commit time (</span><b>certification</b><span>). If two nodes change the same row at the same moment, one of the transactions fails certification and the application gets </span><span>ERROR 1213 (40001): Deadlock found when trying to get lock</span><span>, even though no real lock wait happened. Sending all writes to a single node avoids these conflicts. The </span><span>-replicas</span><span> endpoint is meant for reads only by convention, not because the nodes are read-only.</span></p>
<h4><b>Step 6.8: Open a MySQL Shell Inside a Specific Pod</b></h4>
<p><span>To talk to one particular node without HAProxy, run the MySQL client inside that pod. A PXC pod has more than one container, so </span><span>-c pxc</span><span> selects the database container. </span><span>-it</span><span> gives you an interactive terminal, and the client prompts for the root password.</span></p>
<div>$ Command <span>(control plane)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">percona@arunopeneverestcontrolplanenode:~$ kubectl exec -it mysql-vjg-pxc-2 -n everest -c pxc -- mysql -u root -p</pre>
<p><b>SQL</b></p>
<pre class="urvanov-syntax-highlighter-plain-tag">SELECT @@hostname, @@wsrep_node_name, @@read_only;</pre>
<p><b>Output</b></p>
<pre class="urvanov-syntax-highlighter-plain-tag">+-----------------+-------------------+-------------+
| @@hostname      | @@wsrep_node_name | @@read_only |
+-----------------+-------------------+-------------+
| mysql-vjg-pxc-2 | mysql-vjg-pxc-2   |           0 |
+-----------------+-------------------+-------------+</pre>
</p>
<h2><b>Summary and What’s Next</b></h2>
<p><span>You now have a 3-n</span><span>ode K3s cluster running OpenEverest and a 3-node Percona XtraDB Cluster behind HAProxy, reachable from your laptop. Along the way you saw how K3s nodes join a cluster, why local-path storage pins database pods to nodes, and how HAProxy, headless Services and CoreDNS fit together.</span></p>
<p><span>In </span><a href="https://www.percona.com/blog/inside-an-openeverest-mysql-cluster-galera-health-and-a-live-failover-test/"><b>Part 2</b></a><span>, we read Galera’s health indicators in detail and run a live failover test: we delete the writer pod while a client writes every second, then watch HAProxy switch writers, the pod rejoin with an incremental state transfer, and all three nodes end up with identical data.</span></p>
<p>The post <a href="https://www.percona.com/blog/deploying-openeverest-on-a-3-node-k3s-cluster/">Deploying OpenEverest on a 3-Node K3s Cluster</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/deploying-openeverest-on-a-3-node-k3s-cluster/">Deploying OpenEverest on a 3-Node K3s Cluster</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Inside an OpenEverest MySQL Cluster: Galera Health and a Live Failover Test</title>
        <link>https://www.percona.com/blog/inside-an-openeverest-mysql-cluster-galera-health-and-a-live-failover-test/</link>
        <pubDate>Thu, 12 Nov 2026 03:51:17 +0000</pubDate>
        <dc:creator>Arunjith Aravindan</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/inside-an-openeverest-mysql-cluster-galera-health-and-a-live-failover-test/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Part 2 of 2: Reading wsrep status, killing the writer, and proving zero data loss In Part 1 we built a 3-node K3s cluster, installed OpenEverest, and created a 3-node Percona XtraDB Cluster (PXC) named mysql-vjg. In this post we look inside that cluster. Section A explains how to read Galera’s wsrep_* status variables, so … Continued<br />
The post Inside an OpenEverest MySQL Cluster: Galera Health and a Live Failover Test appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/inside-an-openeverest-mysql-cluster-galera-health-and-a-live-failover-test/">Inside an OpenEverest MySQL Cluster: Galera Health and a Live Failover Test</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><i><span>Part 2 of 2: Reading wsrep status, killing the writer, and proving zero data loss</span></i></p>
<p><span>In </span><b>Part 1</b><span> we built a 3-node K3s cluster, installed OpenEverest, and created a 3-node Percona XtraDB Cluster (PXC) named </span><span>mysql-vjg</span><span>. In this post we look inside that cluster.</span></p>
<ul>
<li><b>Section A</b><span> explains how to read Galera’s </span><span>wsrep_*</span><span> status variables, so you can tell at a glance whether the cluster is healthy.</span></li>
<li><b>Section B</b><span> is a live failover test. We delete the writer pod while a client inserts a row every second, then watch HAProxy switch writers, the pod rejoin, and all three nodes end up with identical data.</span></li>
</ul>
<p><span>All output shown in this post is real output from a lab cluster whose nodes are named </span><span>controlplane</span><span>, </span><span>worker1</span><span> and </span><span>worker2</span><span>. Your node names, pod IPs, timestamps and IDs will differ.</span></p>
<p><b>Important: </b><span>The commands use the example cluster name </span><span>mysql-vjg</span><span> from Part 1. Replace it with your own cluster name everywhere (find it with </span><span>kubectl get pxc -n everest</span><span>). If you created your database in a namespace other than </span><span>everest</span><span>, replace </span><span>-n everest</span><span> as well.</span></p>
<h2><b>Before You Start</b></h2>
<p><b>Where to run:</b><span> every command runs on the </span><b>control plane node</b><span>, where </span><span>kubectl</span><span> is configured, unless a step says otherwise. Some commands run inside a temporary client pod; those steps say so explicitly.</span></p>
<p><span>Several commands need the MySQL root password. Load it from the Kubernetes Secret into a shell variable:</span></p>
<div>$Command <span>(control plane)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">export ROOT_PW=$(kubectl get secret everest-secrets-mysql-vjg -n everest -o jsonpath='{.data.root}' | base64 --decode)
echo ${#ROOT_PW}    # prints the password length; 0 means the variable is empty</pre>
</p>
<div><b><img decoding="async" src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4dd.png" alt="&#x1f4dd;" class="wp-smiley"> Note:</b> Shell variables belong to one shell session. Run the <code>export</code> line again in <b>every</b> new terminal, and again after switching users with <code>sudo su</code> or <code>sudo -i</code>. If you see <code>Access denied for user 'root'@'localhost' (using password: NO)</code>, the variable is empty.</div>
<h2><b>Section A: Understanding Galera Health</b></h2>
<p><span>PXC replicates data with the </span><b>Galera</b><span> library. Galera reports its state through status variables whose names start with </span><span>wsrep_</span><span>, short for </span><b>write-set replication</b><span>. A write-set is the bundle of row changes one transaction produces. At commit time, the write-set is sent to every node and checked for conflicts (</span><b>certification</b><span>) before the commit succeeds.</span></p>
<h4><b>Step A1: Take a Status Snapshot</b></h4>
<p><span>Connect through HAProxy (Part 1, Step 6.5) or into a pod (Part 1, Step 6.8) and run:</span></p>
<p>SQL</p>
<pre class="urvanov-syntax-highlighter-plain-tag">SHOW STATUS LIKE '%wsrep%stat%';
SHOW STATUS LIKE '%wsrep%siz%';</pre>
<p><em>Output. </em></p>
<pre class="urvanov-syntax-highlighter-plain-tag">wsrep_local_state_uuid       | c1319eb6-d354-11f1-8a79-0ff80b37e565
wsrep_monitor_status (L/A/C) | [ (20, 20), (44, 44), (44, 44) ]
wsrep_flow_control_status    | OFF
wsrep_local_state            | 4
wsrep_local_state_comment    | Synced
wsrep_ist_receive_status     |
wsrep_evs_state              | OPERATIONAL
wsrep_cluster_state_uuid     | c1319eb6-d354-11f1-8a79-0ff80b37e565
wsrep_cluster_status         | Primary
wsrep_cert_index_size        | 1
wsrep_gcache_pool_size       | 15624
wsrep_cluster_size           | 3</pre>
</p>
<h4><b>Step A2: What Each Value Means</b></h4>
<table border="1" cellspacing="0" cellpadding="8">
<thead>
<tr>
<th><b>Variable</b></th>
<th><b>Healthy value</b></th>
<th><b>What it means</b></th>
</tr>
</thead>
<tbody>
<tr>
<td><span>wsrep_local_state</span><span> / </span><span>_comment</span></td>
<td><span>4</span><span> / </span><span>Synced</span></td>
<td><span>This node is fully caught up and serving traffic.</span></td>
</tr>
<tr>
<td><span>wsrep_cluster_status</span></td>
<td><span>Primary</span></td>
<td><span>This node is part of the group that holds quorum (a majority). A </span><span>non-Primary</span><span> node has lost quorum and refuses queries, which protects you from split-brain.</span></td>
</tr>
<tr>
<td><span>wsrep_cluster_size</span></td>
<td><span>3</span></td>
<td><span>Number of nodes currently in the group. All three PXC pods are members.</span></td>
</tr>
<tr>
<td><span>wsrep_evs_state</span></td>
<td><span>OPERATIONAL</span></td>
<td><span>EVS (Extended Virtual Synchrony) is Galera’s group-communication layer. OPERATIONAL means the members are exchanging messages normally.</span></td>
</tr>
<tr>
<td><span>wsrep_flow_control_status</span></td>
<td><span>OFF</span></td>
<td><span>No node is asking the cluster to pause. </span><span>ON</span><span> means a slow node has a full apply queue and is throttling writes on every node.</span></td>
</tr>
<tr>
<td><span>wsrep_local_state_uuid</span><span> and </span><span>wsrep_cluster_state_uuid</span></td>
<td><span>identical</span></td>
<td><span>This node has the same data history as the cluster. A mismatch means the node needs a state transfer.</span></td>
</tr>
<tr>
<td><span>wsrep_monitor_status (L/A/C)</span></td>
<td><span>pairs equal</span></td>
<td><span>PXC-specific. Each pair is (last entered, last left) for the Local, Apply and Commit monitors. When both numbers match, no write-sets are in flight.</span></td>
</tr>
<tr>
<td><span>wsrep_ist_receive_status</span></td>
<td><span>empty</span></td>
<td><span>Shows progress only while the node is receiving an IST (see Step A4).</span></td>
</tr>
<tr>
<td><span>wsrep_cert_index_size</span></td>
<td><span>small</span></td>
<td><span>Entries in the certification index used to detect conflicts between concurrent transactions.</span></td>
</tr>
<tr>
<td><span>wsrep_gcache_pool_size</span></td>
<td><span>varies</span></td>
<td><span>Bytes of memory the gcache (the cache of recent write-sets) currently uses.</span></td>
</tr>
</tbody>
</table>
<h4><b>Step A3: The Node State Machine</b></h4>
<p><span>Every time a node joins the cluster, it moves through these states. </span><span>wsrep_local_state</span><span> shows the number, and </span><span>wsrep_local_state_comment</span><span> shows the name.</span></p>
<table border="1" cellspacing="0" cellpadding="8">
<thead>
<tr>
<th><b>State</b></th>
<th><b>Name</b></th>
<th><b>What is happening</b></th>
</tr>
</thead>
<tbody>
<tr>
<td><span>1</span></td>
<td><span>Joining</span></td>
<td><span>The node has joined the group and is requesting the data it is missing.</span></td>
</tr>
<tr>
<td><span>2</span></td>
<td><span>Donor/Desynced</span></td>
<td><span>The node is </span><b>sending</b><span> a state transfer to a joining node. HAProxy takes it out of rotation while this runs.</span></td>
</tr>
<tr>
<td><span>3</span></td>
<td><span>Joined</span></td>
<td><span>The node has received the data and is applying queued write-sets to catch up.</span></td>
</tr>
<tr>
<td><span>4</span></td>
<td><span>Synced</span></td>
<td><span>The node is fully caught up. Only nodes in this state receive traffic from HAProxy.</span></td>
</tr>
</tbody>
</table>
<h4><b>Step A4: IST vs SST: How a Node Catches Up</b></h4>
<p><span>A node that rejoins after a restart needs the write-sets it missed. There are two ways to get them:</span></p>
<ul>
<li><b>IST (Incremental State Transfer):</b><span> a donor node replays only the missing write-sets from its </span><b>gcache</b><span>, a ring buffer of recent write-sets. It takes seconds and puts little load on the donor.</span></li>
<li><b>SST (State Snapshot Transfer):</b><span> a full copy of the dataset, taken with Percona XtraBackup. It can take a long time on large databases, and the donor does extra work while it runs.</span></li>
</ul>
<p><span>The joining node gets an IST if a donor’s gcache still contains every write-set it missed. Otherwise it needs an SST. This is why gcache size matters: a larger gcache lets a node stay away longer and still rejoin with a fast IST. You will see a real IST in Section B.</span></p>
<h4><b>Step A5: Other Variables Worth Monitoring</b></h4>
<p><span>These are not part of the snapshot above, but they are the first places to look when a cluster is slow or applications see unexpected errors.</span></p>
<p>SQL</p>
<pre class="urvanov-syntax-highlighter-plain-tag">SHOW GLOBAL STATUS WHERE Variable_name IN (
  'wsrep_flow_control_paused', 'wsrep_local_recv_queue_avg', 'wsrep_local_send_queue_avg',
  'wsrep_local_cert_failures', 'wsrep_local_bf_aborts', 'wsrep_last_committed',
  'wsrep_incoming_addresses');</pre>
</p>
<table border="1" cellspacing="0" cellpadding="8">
<thead>
<tr>
<th><b>Variable</b></th>
<th><b>What to look for</b></th>
</tr>
</thead>
<tbody>
<tr>
<td><span>wsrep_flow_control_paused</span></td>
<td><span>Fraction of time (0.0 to 1.0) replication was paused by flow control. Keep it close to 0.</span></td>
</tr>
<tr>
<td><span>wsrep_local_recv_queue_avg</span></td>
<td><span>Average length of the apply queue. Values above about 1 mean this node is falling behind.</span></td>
</tr>
<tr>
<td><span>wsrep_local_send_queue_avg</span></td>
<td><span>Average outbound queue length. High values usually point to network problems.</span></td>
</tr>
<tr>
<td><span>wsrep_local_cert_failures</span></td>
<td><span>Transactions that failed certification because another node changed the same rows. These are the “deadlock” errors described in Part 1.</span></td>
</tr>
<tr>
<td><span>wsrep_local_bf_aborts</span></td>
<td><span>Local transactions aborted by a replicated write-set (“brute-force” aborts).</span></td>
</tr>
<tr>
<td><span>wsrep_last_committed</span></td>
<td><span>Sequence number of the last committed write-set. It should be equal or very close on all nodes.</span></td>
</tr>
<tr>
<td><span>wsrep_incoming_addresses</span></td>
<td><span>Addresses of all current cluster members.</span></td>
</tr>
</tbody>
</table>
<h4><b>Step A6: One-Shot Health Check Across All Pods</b></h4>
<p><span>Instead of logging into each node, this loop runs one query on each of the three PXC pods with </span><span>kubectl exec</span><span> and prints the results side by side. How it works:</span></p>
<ul>
<li><span>for i in 0 1 2</span><span> loops over the pod numbers, so </span><span>mysql-vjg-pxc-$i</span><span> becomes </span><span>mysql-vjg-pxc-0</span><span>, </span><span>-1</span><span> and </span><span>-2</span><span>.</span></li>
<li><span>-c pxc</span><span> selects the database container in each pod.</span></li>
<li><span>—</span><span> separates </span><span>kubectl</span><span>‘s own options from the command to run inside the pod. Without it, </span><span>kubectl</span><span> tries to parse </span><span>-uroot</span><span> itself and fails with </span><span>unknown shorthand flag: ‘u’</span><span>.</span></li>
<li><span>env MYSQL_PWD=”$ROOT_PW”</span><span> passes the password to the MySQL client as an environment variable, so it does not appear in the command line.</span></li>
<li><span>-Nse</span><span> runs the SQL without column headers (</span><span>-N</span><span>), in silent tab-separated mode (</span><span>-s</span><span>).</span></li>
</ul>
<div>$Command <span>(control plane)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">for i in 0 1 2; do kubectl exec mysql-vjg-pxc-$i -n everest -c pxc -- env MYSQL_PWD="$ROOT_PW" mysql -uroot -Nse "SELECT @@hostname, (SELECT VARIABLE_VALUE FROM performance_schema.global_status WHERE VARIABLE_NAME='wsrep_local_state_comment'), (SELECT VARIABLE_VALUE FROM performance_schema.global_status WHERE VARIABLE_NAME='wsrep_cluster_status'), (SELECT VARIABLE_VALUE FROM performance_schema.global_status WHERE VARIABLE_NAME='wsrep_cluster_size'), (SELECT VARIABLE_VALUE FROM performance_schema.global_status WHERE VARIABLE_NAME='wsrep_last_committed')"; done</pre>
<p>Output</p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql-vjg-pxc-0    Synced    Primary    3    1057
mysql-vjg-pxc-1    Synced    Primary    3    1057
mysql-vjg-pxc-2    Synced    Primary    3    1057</pre>
<p><span>Every node reports </span><span>Synced</span><span>, </span><span>Primary</span><span>, a cluster size of </span><span>3</span><span>, and the same </span><span>wsrep_last_committed</span><span> value (1057). All three nodes have applied exactly the same write-sets.</span></p>
<h2><b>Section B: Live Failover Test</b></h2>
<p><span>In this test, a client inserts one row per second through HAProxy. While it runs, we delete the writer pod, </span><span>mysql-vjg-pxc-0</span><span>, and observe what happens. The client runs </span><b>inside the cluster</b><span>, so that an SSH tunnel or </span><span>kubectl port-forward</span><span> dropping cannot be confused with the failover itself.</span></p>
<p><span>Open </span><b>three SSH sessions to the control plane</b><span> and use them like this:</span></p>
<table border="1" cellspacing="0" cellpadding="8">
<thead>
<tr>
<th><b>Terminal</b></th>
<th><b>Runs on</b></th>
<th><b>Used for</b></th>
</tr>
</thead>
<tbody>
<tr>
<td><span>A</span></td>
<td><span>Control plane, then inside the </span><span>mysql-client</span><span> pod</span></td>
<td><span>Steps B1 to B3: start the client and the write loop</span></td>
</tr>
<tr>
<td><span>B</span></td>
<td><span>Control plane</span></td>
<td><span>Step B4: watch the PXC pods</span></td>
</tr>
<tr>
<td><span>C</span></td>
<td><span>Control plane</span></td>
<td><span>Step B5 onward: delete the pod and run the checks</span></td>
</tr>
</tbody>
</table>
<h4><b>Step B1: Start a Temporary MySQL Client Pod (Terminal A)</b></h4>
<p><span>kubectl run</span><span> starts a throwaway pod from the </span><span>percona/percona-server:8.0</span><span> image, which includes the </span><span>mysql</span><span> client. The options:</span></p>
<ul>
<li><span>-it</span><span> attaches your terminal to the pod, and </span><span>–command — bash</span><span> starts a shell instead of a MySQL server.</span></li>
<li><span>–rm –restart=Never</span><span> deletes the pod as soon as you exit the shell.</span></li>
<li><span>–env=”MYSQL_PWD=$ROOT_PW”</span><span> puts the root password into the pod’s environment, so </span><span>mysql</span><span> commands inside the pod do not need </span><span>-p</span><span>.</span></li>
</ul>
<div>$Command <span>(control plane, Terminal A)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">kubectl run mysql-client -n everest -it --rm --restart=Never 
  --image=percona/percona-server:8.0 
  --env="MYSQL_PWD=$ROOT_PW" 
  --command -- bash</pre>
<p>Output</p>
<pre class="urvanov-syntax-highlighter-plain-tag">All commands and output from this session will be recorded in container logs, including credentials and sensitive information passed through the command prompt.
If you don't see a command prompt, try pressing enter.
[mysql@mysql-client /]$</pre>
<p><span>The prompt changes to </span><span>[mysql@mysql-client /]$</span><span>: you are now inside the pod. The warning is a reminder that anything typed here ends up in the pod’s logs. The password is also visible in the pod spec, which is acceptable for a short-lived lab pod but not for production.</span></p>
<h4><b>Step B2: Create a Test Table (Terminal A, inside the pod)</b></h4>
<p><span>mysql-vjg-haproxy</span><span> is the Kubernetes DNS name of the HAProxy Service. It resolves only inside the cluster, which is why these commands run from the client pod. The table records which node served each insert (</span><span>served_by</span><span>) and when (</span><span>ts</span><span>, with millisecond precision).</span></p>
<div>$ Command <span>(inside the mysql-client pod)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql -h mysql-vjg-haproxy -uroot -e "
  CREATE DATABASE IF NOT EXISTS demo;
  CREATE TABLE IF NOT EXISTS demo.failover_test (
    id        INT AUTO_INCREMENT PRIMARY KEY,
    served_by VARCHAR(64),
    ts        TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP(3)
  );"</pre>
</p>
<div><b><img decoding="async" src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4dd.png" alt="&#x1f4dd;" class="wp-smiley"> Note:</b> The primary key is required. PXC runs with <code>pxc_strict_mode=ENFORCING</code>, which rejects writes to tables without a primary key, because Galera needs one to replicate rows reliably.</div>
<h4><b>Step B3: Start the Write Loop (Terminal A, inside the pod)</b></h4>
<p><span>Every second, the loop opens a </span><b>new</b><span> connection through HAProxy, inserts one row, and prints the time, the node that served the request, and the ID it generated. </span><span>–connect-timeout=2</span><span> stops a failed connection from hanging the loop, and </span><span>2&gt;&amp;1</span><span> makes any error message appear in the output.</span></p>
<div>$ Command <span>(inside the mysql-client pod)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">while true; do
  out=$(mysql -h mysql-vjg-haproxy -uroot --connect-timeout=2 -Nse "
        INSERT INTO demo.failover_test (served_by) VALUES (@@hostname);
        SELECT @@hostname, LAST_INSERT_ID();" 2&gt;&amp;1 | tr 'nt' '  ')
  echo "$(date +%T)  $out"
  sleep 1
done

09:07:07  mysql-vjg-pxc-0 743
09:07:08  mysql-vjg-pxc-0 746
09:07:10  mysql-vjg-pxc-0 749
...
09:07:39  mysql-vjg-pxc-0 824
09:07:40  mysql-vjg-pxc-0 827</pre>
<p><span>Leave it running. Before the failover, every line shows </span><span>mysql-vjg-pxc-0</span><span>, the current writer.</span></p>
<h4><b>Step B4: Watch the PXC Pods (Terminal B)</b></h4>
<p><span>-w</span><span> (watch) keeps the command running and prints a new line every time a pod changes state. </span><span>-o wide</span><span> adds the pod IP and the node it runs on, and </span><span>grep –line-buffered pxc</span><span> keeps only PXC pods while printing each line immediately.</span></p>
<div>$Command <span>(control plane, Terminal B)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">root@arunopeneverestcontrolplanenode:/home/arunjith.aravindan# kubectl get pods -n everest -o wide -w | grep --line-buffered pxc
mysql-vjg-pxc-0                                    1/1     Running   0               82s     10.42.2.16   arunjithopeneverestworkernode2               
mysql-vjg-pxc-1                                    1/1     Running   0               10d     10.42.1.7    arunjithopeneverestworkernode1               
mysql-vjg-pxc-2                                    1/1     Running   0               10d     10.42.0.10   arunopeneverestcontrolplanenode              </pre>
</p>
<h4><b>Step B5: Delete the Writer Pod (Terminal C)</b></h4>
<p><span>Make sure Terminals A and B are both running, then delete the writer. </span><span>kubectl delete pod</span><span> sends the pod a SIGTERM, which simulates a planned restart or node maintenance. The StatefulSet that owns the pod immediately creates a replacement with the same name.</span></p>
<div>$Command <span>(control plane, Terminal C)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">kubectl delete pod mysql-vjg-pxc-0 -n everest</pre>
<p>Output</p>
<pre class="urvanov-syntax-highlighter-plain-tag">pod "mysql-vjg-pxc-0" deleted from everest namespace</pre>
</p>
<h4><b>Step B6: What the Application Saw (Terminal A)</b></h4>
<p><span>Here is the write loop output around the failover, trimmed (</span><span>…</span><span> marks removed lines):</span></p>
<p><em>Output (trimmed, annotations added)</em></p>
<pre class="urvanov-syntax-highlighter-plain-tag">09:07:38  mysql-vjg-pxc-0 821
09:07:39  mysql-vjg-pxc-0 824
09:07:40  mysql-vjg-pxc-0 827    &lt;- pod deleted around here
09:07:41  mysql-vjg-pxc-2 829    &lt;- HAProxy switched the writer to pxc-2
09:07:42  mysql-vjg-pxc-2 832
...
09:07:46  mysql-vjg-pxc-2 841
09:07:47  mysql-vjg-pxc-2 845    &lt;- pxc-0 left the cluster: IDs now step by 2
09:07:48  mysql-vjg-pxc-2 847
09:07:49  mysql-vjg-pxc-2 849
...
09:08:15  mysql-vjg-pxc-2 895
09:08:16  mysql-vjg-pxc-2 898    &lt;- pxc-0 rejoined: IDs step by 3 again
09:08:17  mysql-vjg-pxc-2 901</pre>
<p><strong>Zero failed writes</strong></p>
<p><span>The write at 09:07:40 went to </span><span>pxc-0</span><span>, and the next one, one second later, went to </span><span>pxc-2</span><span>. Not a single insert failed. Three things made this possible:</span></p>
<ul>
<li><b>Graceful shutdown.</b><span> SIGTERM let </span><span>mysqld</span><span> leave the Galera cluster cleanly instead of crashing.</span></li>
<li><b>Health-checked routing.</b><span> HAProxy checks every node’s Galera state and stopped sending new connections to </span><span>pxc-0</span><span> as soon as it began shutting down.</span></li>
<li><b>Short connections.</b><span> Each loop iteration opens a new connection, so no connection was open on </span><span>pxc-0</span><span> when it went away.</span></li>
</ul>
<p><b>Important: </b><span>HAProxy fails over </span><b>routing</b><span>, not </span><b>sessions</b><span>. Connections that are open on the stopped node are closed, and transactions that were not yet committed are rolled back. Applications need reconnect-and-retry logic. Connection pools that check connections before use handle this for you. Step B11 shows this in action.</span></p>
<h5><strong>The auto-increment step follows cluster membership</strong></h5>
<p><span>Look at the IDs. Galera sets </span><span>auto_increment_increment</span><span> to the current cluster size and gives each node a different </span><span>auto_increment_offset</span><span> (the </span><span>wsrep_auto_increment_control</span><span> setting). Two nodes can then never generate the same ID, even when both accept writes. As a side effect, the IDs show cluster membership changing in real time:</span></p>
<table border="1" cellspacing="0" cellpadding="8">
<thead>
<tr>
<th><b>Time</b></th>
<th><b>Writer</b></th>
<th><b>IDs</b></th>
<th><b>Step</b></th>
<th><b>Why</b></th>
</tr>
</thead>
<tbody>
<tr>
<td><span>09:07:07 – 09:07:40</span></td>
<td><span>pxc-0</span></td>
<td><span>743, 746, 749 … 827</span></td>
<td><span>3</span></td>
<td><span>Three nodes in the cluster</span></td>
</tr>
<tr>
<td><span>09:07:41 – 09:07:46</span></td>
<td><span>pxc-2</span></td>
<td><span>829, 832 … 841</span></td>
<td><span>3</span></td>
<td><span>pxc-0 is shutting down but is still a cluster member</span></td>
</tr>
<tr>
<td><span>09:07:47 – 09:08:15</span></td>
<td><span>pxc-2</span></td>
<td><span>845, 847, 849 … 895</span></td>
<td><span>2</span></td>
<td><span>pxc-0 has left: </span><span>wsrep_cluster_size</span><span> = 2</span></td>
</tr>
<tr>
<td><span>09:08:16 onward</span></td>
<td><span>pxc-2</span></td>
<td><span>898, 901, 904 …</span></td>
<td><span>3</span></td>
<td><span>pxc-0 rejoined the group: size is back to 3</span></td>
</tr>
</tbody>
</table>
<p><span>Gaps in auto-increment IDs are normal in Galera. Applications should never assume IDs are consecutive.</span></p>
<h4><b>Step B7: What Kubernetes Did (Terminal B)</b></h4>
<p>Output (columns and duplicate lines trimmed)</p>
<pre class="urvanov-syntax-highlighter-plain-tag">NAME              READY  STATUS           AGE   IP          NODE
mysql-vjg-pxc-0   1/1    Running          82s   10.42.2.16  worker2
mysql-vjg-pxc-1   1/1    Running          10d   10.42.1.7   worker1
mysql-vjg-pxc-2   1/1    Running          10d   10.42.0.10  controlplane
mysql-vjg-pxc-0   1/1    Terminating      93s   10.42.2.16  worker2
mysql-vjg-pxc-0   0/1    Completed        107s  10.42.2.16  worker2
mysql-vjg-pxc-0   0/1    Pending          0s          worker2
mysql-vjg-pxc-0   0/1    Init:0/1         1s    10.42.2.17  worker2
mysql-vjg-pxc-0   0/1    PodInitializing  8s    10.42.2.17  worker2
mysql-vjg-pxc-0   0/1    Running          9s    10.42.2.17  worker2
mysql-vjg-pxc-0   1/1    Running          39s   10.42.2.17  worker2</pre>
<p><span>Reading it from top to bottom:</span></p>
<ul>
<li><span>The three PXC pods run on three different nodes. OpenEverest uses pod anti-affinity so that losing one node never takes out two database replicas.</span></li>
<li><b>Terminating to Completed (about 14 seconds):</b> <span>mysqld</span><span> shut down gracefully and the container exited cleanly.</span></li>
<li><b>Pending to Init to Running:</b><span> the StatefulSet created a new pod with the </span><b>same name</b><span> on the </span><b>same node</b><span>. The local-path volume (Part 1, Step 4.3) lives on that node’s disk, so the pod has to come back there to reattach its data.</span></li>
<li><b>Running 0/1 to 1/1 (about 30 seconds):</b><span> the container was running but did not pass its readiness check until </span><span>mysqld</span><span> had rejoined the cluster and reached </span><span>Synced</span><span>. The pod also got a new IP (10.42.2.17), which is why applications must use Service names and never pod IPs.</span></li>
</ul>
<h4><b>Step B8: How pxc-0 Rejoined: IST or SST? (Terminal C)</b></h4>
<p><span>First confirm the node is back in the </span><span>Synced</span><span> state:</span></p>
<div>$Command <span>(control plane, Terminal C)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">kubectl exec mysql-vjg-pxc-0 -n everest -c pxc -- env MYSQL_PWD="$ROOT_PW" 
  mysql -uroot -Nse "SHOW STATUS LIKE 'wsrep_local_state_comment'"</pre>
<p>Output</p>
<pre class="urvanov-syntax-highlighter-plain-tag">wsrep_local_state_comment    Synced</pre>
<p><span>Then search the pod’s logs for state-transfer messages. </span><span>–all-containers</span><span> covers the case where the error log is collected by a separate logging container.</span></p>
<div>$Command <span>(control plane, Terminal C)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">kubectl logs mysql-vjg-pxc-0 -n everest --all-containers | grep -Ei 'IST|SST' | tail -20</pre>
<p><em>Output (trimmed)</em></p>
<pre class="urvanov-syntax-highlighter-plain-tag">2026-11-08T09:08:21.792709Z 1 [Note] [Galera] Receiving IST: 27 writesets, seqnos 341-367
2026-11-08T09:08:21.792853Z 0 [Note] [Galera] ####### IST applying starts with 341
...
2026-11-08T09:08:21.975953Z 0 [Note] [Galera] Receiving IST... 100.0% (80/80 events) complete.
2026-11-08T09:08:22.018967Z 1 [Note] [Galera] Draining apply monitors after IST up to 367
2026-11-08T09:08:22.022710Z 1 [Note] [Galera] IST received: c1319eb6-d354-11f1-8a79-0ff80b37e565:367
...
2026-11-08T09:08:22.026879Z 0 [Note] [Galera] SST leaving flow control</pre>
<p><span>The node rejoined with an </span><b>IST</b><span>: it received the 27 write-sets it missed (sequence numbers 341 to 367) in about 0.2 seconds. This was possible because the pod reattached its existing volume, so it only lacked the writes from the few seconds it was down, and those were still in the donor’s gcache. If the volume had been lost, the node would have needed a full SST.</span></p>
<p><span>Put together with the auto-increment table, the timeline is: pxc-0 rejoined the Galera group at about 09:08:16 (cluster size back to 3), received the IST at 09:08:21 to 09:08:22, reached </span><span>Synced</span><span>, and then passed its Kubernetes readiness check.</span></p>
<div><b><img decoding="async" src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4dd.png" alt="&#x1f4dd;" class="wp-smiley"> Note:</b> Despite the word “SST” in the last line, no snapshot transfer happened. Galera reuses some SST-named code paths when finishing an IST. The <code>IST received</code> line is what tells you which method was used.</div>
<h4><b>Step B9: Where Did the Writes Go? (Terminal A)</b></h4>
<p><span>Stop the loop with </span><b>Ctrl+C</b><span>, then summarize which node accepted the writes:</span></p>
<div>$ Command <span>(inside the mysql-client pod)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql -h mysql-vjg-haproxy -uroot -e "
  SELECT served_by, COUNT(*) AS writes, MIN(ts) AS first, MAX(ts) AS last
  FROM demo.failover_test GROUP BY served_by ORDER BY first;"</pre>
<p>Output</p>
<pre class="urvanov-syntax-highlighter-plain-tag">+-----------------+--------+-------------------------+-------------------------+
| served_by       | writes | first                   | last                    |
+-----------------+--------+-------------------------+-------------------------+
| mysql-vjg-pxc-0 |    904 | 2026-11-08 09:02:08.207 | 2026-11-08 09:21:27.210 |
| mysql-vjg-pxc-2 |    103 | 2026-11-08 09:05:51.026 | 2026-11-08 09:08:35.249 |
+-----------------+--------+-------------------------+-------------------------+</pre>
<p><span>Two things stand out:</span></p>
<ul>
<li><b>Writes moved back to pxc-0.</b><span> The last write on </span><span>pxc-2</span><span> was at 09:08:35, about 13 seconds after pxc-0 finished its IST. From then on, </span><span>pxc-0</span><span> served every write. HAProxy prefers </span><span>pxc-0</span><span> as the writer and switches back to it once it is healthy again. The write loop kept running past 09:08:21, which is why the totals go on until 09:21.</span></li>
<li><b>The totals include an earlier practice run.</b> <span>pxc-2</span><span>‘s first write at 09:05:51 comes from a previous failover test, so the counts cover both runs.</span></li>
</ul>
<h4><b>Step B10: Verify That All Nodes Hold Identical Data (Terminal C)</b></h4>
<p><span>The final check: query each PXC pod directly, bypassing HAProxy, and compare the row count, the highest ID, and a checksum of the whole table. </span><span>CHECKSUM TABLE</span><span> computes a hash over every row, so even one different value on one node would change it.</span></p>
<div>$Command <span>(control plane, one line)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">for i in 0 1 2; do kubectl exec mysql-vjg-pxc-$i -n everest -c pxc -- env MYSQL_PWD="$ROOT_PW" mysql -uroot -Nse "SELECT @@hostname, COUNT(*), MAX(id) FROM demo.failover_test; CHECKSUM TABLE demo.failover_test;"; done</pre>
<p>Output</p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql-vjg-pxc-0    1007    2960
demo.failover_test    3133448865
mysql-vjg-pxc-1    1007    2960
demo.failover_test    3133448865
mysql-vjg-pxc-2    1007    2960
demo.failover_test    3133448865</pre>
<p><span>All three nodes have </span><b>1007 rows</b><span> and the </span><b>same checksum</b><span>, including </span><span>pxc-0</span><span>, which was deleted in the middle of the test. Galera replication is </span><b>virtually synchronous</b><span>: a transaction commits only after every node has received and certified its write-set. So an acknowledged write cannot be lost when a single node fails.</span></p>
<p><span>Also note that </span><span>MAX(id)</span><span> is 2960 for only 1007 rows. That is the auto-increment step at work: with 3 nodes, IDs advance by 3, so the highest ID is roughly three times the row count.</span></p>
<h4><b>Step B11 (Optional): What Happens to a Running Query?</b></h4>
<p><span>The write loop opened a new connection every second, so no connection was open when the writer stopped. What happens to a query that is </span><b>running</b><span> at that moment? In the client pod, start a query that sleeps for 20 minutes:</span></p>
<div>$ Command <span>(inside the mysql-client pod)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql -h mysql-vjg-haproxy -uroot -e "SELECT @@hostname; SELECT SLEEP(1200);"</pre>
<p><span>While it is sleeping, delete the pod it printed (the current writer) from Terminal C:</span></p>
<div>$Command <span>(control plane, Terminal C)</span></div>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">kubectl delete pod mysql-vjg-pxc-0 -n everest</pre>
<p><span>The query ended right away, without an error:</span></p>
<p>Output</p>
<pre class="urvanov-syntax-highlighter-plain-tag">+-----------------+
| @@hostname      |
+-----------------+
| mysql-vjg-pxc-0 |
+-----------------+

+-------------+
| SLEEP(1200) |
+-------------+
|           1 |
+-------------+</pre>
<p><span>SLEEP()</span><span> returns </span><span>0</span><span> when it sleeps the full time and </span><span>1</span><span> when it is </span><b>interrupted</b><span>. Here is what happened:</span></p>
<ul>
<li><span>kubectl delete pod</span><span> sends a normal stop signal (SIGTERM), so MySQL shuts down </span><b>gracefully</b><span>.</span></li>
<li><span>During a graceful shutdown, MySQL first interrupts every running query and sends the client a result. That is why </span><span>SLEEP</span><span> returned </span><span>1</span><span>.</span></li>
<li><span>Then MySQL closes all connections. Our client had no more statements to run, so it exited normally and no error was shown.</span></li>
</ul>
<p><span>The connection was still closed. You see an error if you try to </span><b>keep using the same connection</b><span>. To see this, open an interactive session and start a transaction:</span></p>
<div>$ Command <span>(inside the mysql-client pod)</span></div>
<p><span>mysql -h mysql-vjg-haproxy -uroot</span></p>
<p>SQL</p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; SELECT @@hostname;
+-----------------+
| @@hostname      |
+-----------------+
| mysql-vjg-pxc-0 |
+-----------------+
1 row in set (0.00 sec)

mysql&gt; BEGIN;
Query OK, 0 rows affected (0.01 sec)
mysql&gt; INSERT INTO demo.failover_test (served_by) VALUES ('open-transaction-test');
Query OK, 1 row affected (0.01 sec)</pre>
<p><span>Delete the pod that </span><span>@@hostname</span><span> printed from Terminal C, wait about 20 seconds, then run </span><span>COMMIT;</span><span> in the same session. The client should report an error such as </span><span>ERROR 2013 (HY000): Lost connection to MySQL server during query</span><span>. The client may then reconnect to the new writer by itself, but the open transaction is gone. The row was </span><b>not</b><span> saved, which you can check with:</span></p>
<p>SQL</p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; SELECT COUNT(*) FROM demo.failover_test WHERE served_by = 'open-transaction-test';
ERROR 2013 (HY000): Lost connection to MySQL server during query
No connection. Trying to reconnect...
Connection id:    1414734
Current database: *** NONE ***
+----------+
| COUNT(*) |
+----------+
|        0 |
+----------+
1 row in set (0.09 sec)</pre>
<p><b>The lesson:</b><span> a failover never gives you corrupt or half-written data, but open connections and transactions are lost. Applications must reconnect and </span><b>retry the whole transaction</b><span>.</span></p>
<h4><b>Step B12 (Optional): Take a Whole Server Offline</b></h4>
<p><span>So far we deleted one pod. Now we take a whole server out of service, as you would for maintenance such as an OS update or a reboot.</span></p>
<p><span>kubectl drain</span><span> stops all the pods on a server and blocks new pods from starting there. The server keeps running and its data stays on disk. It stays blocked until you run kubectl uncordon.</span></p>
<p><span>Where to run: all commands in this step run on the control plane node. kubectl acts on the worker node through the Kubernetes API, so you don’t need to log in to the worker.</span></p>
<h5><b>B12.1:  Pick a node</b></h5>
<p><span>Check which PXC pod runs on which node:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">root@arunopeneverestcontrolplanenode:/home/arunjith.aravindan# kubectl get pods -n everest -o wide | grep -E 'pxc|mysql-client'
mysql-client                                       1/1     Running   0               177m   10.42.1.84   arunjithopeneverestworkernode1               
mysql-vjg-pxc-0                                    1/1     Running   0               26m    10.42.2.20   arunjithopeneverestworkernode2               
mysql-vjg-pxc-1                                    1/1     Running   0               10d    10.42.1.7    arunjithopeneverestworkernode1               
mysql-vjg-pxc-2                                    1/1     Running   0               10d    10.42.0.10   arunopeneverestcontrolplanenode              
root@arunopeneverestcontrolplanenode:/home/arunjith.aravindan#</pre>
<p><span>We drain worker2. It runs mysql-vjg-pxc-0, the current writer, so this tests losing a server and a writer failover at the same time.</span></p>
<h5><b>B12.2: Drain the node</b></h5>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">root@arunopeneverestcontrolplanenode:/home/arunjith.aravindan# kubectl drain arunjithopeneverestworkernode2 --ignore-daemonsets --delete-emptydir-data</pre>
<p><span>Result: </span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">node/arunjithopeneverestworkernode2 cordoned
….
pod/mysql-vjg-pxc-0 evicted
node/arunjithopeneverestworkernode2 drained
root@arunopeneverestcontrolplanenode:/home/arunjith.aravindan#</pre>
<p><span> –ignore-daemonsets</span><span>: Some helper pods, such as the ones that handle networking, must run on every server. They can’t move to another server, so drain skips them and leaves them running.</span></p>
<p><span>–delete-emptydir-data</span><span>: Some pods keep temporary files that are deleted when the pod stops. This option tells drain that it’s OK to delete those files. Your database data is safe, because it’s stored on a separate disk volume that drain doesn’t touch.</span><span> </span></p>
<h5><b>B12.3: Check the database pod</b></h5>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">root@arunopeneverestcontrolplanenode:/home/arunjith.aravindan# kubectl get pods -n everest -o wide | grep pxc
mysql-vjg-pxc-0                                    0/1     Pending   0               43s                                                  
mysql-vjg-pxc-1                                    1/1     Running   0               10d    10.42.1.7    arunjithopeneverestworkernode1               
mysql-vjg-pxc-2                                    1/1     Running   0               10d    10.42.0.10   arunopeneverestcontrolplanenode              
root@arunopeneverestcontrolplanenode:/home/arunjith.aravindan#</pre>
<p><span>mysql-vjg-pxc-0 is Pending and has no node. Its data is on a local-path volume on worker2’s disk, and worker2 is blocked, so Kubernetes has nowhere to start it. It waits.</span></p>
<p><span>The database keeps working on the other two nodes. Two out of three is still a majority, so the cluster keeps quorum.</span></p>
<h5><b>B12.4: Bring the node back</b></h5>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">root@arunopeneverestcontrolplanenode:/home/arunjith.aravindan# kubectl uncordon arunjithopeneverestworkernode2
node/arunjithopeneverestworkernode2 uncordoned
root@arunopeneverestcontrolplanenode:/home/arunjith.aravindan#</pre>
<p><span>The waiting pod starts right away on worker2 and reattaches its data:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">root@arunopeneverestcontrolplanenode:/home/arunjith.aravindan# kubectl get pods -n everest -o wide | grep pxc
mysql-vjg-pxc-0                                    0/1     Init:0/1   0               2m      10.42.2.21   arunjithopeneverestworkernode2               
mysql-vjg-pxc-1                                    1/1     Running    0               10d     10.42.1.7    arunjithopeneverestworkernode1               
mysql-vjg-pxc-2                                    1/1     Running    0               10d     10.42.0.10   arunopeneverestcontrolplanenode              
root@arunopeneverestcontrolplanenode:/home/arunjith.aravindan#</pre>
<p><span>0/1 Running means MySQL has started but is still rejoining the cluster and catching up. When it shows 1/1, it’s Synced and back in service.</span></p>
<div><b><img decoding="async" src="https://s.w.org/images/core/emoji/17.0.2/72x72/26a0.png" alt="&#x26a0;" class="wp-smiley"> Warning:</b> Never take down two of the three nodes at once. The last node would be a minority (1 of 3), so it would switch to <code>non-Primary</code> and refuse queries. This prevents split-brain, but the database is effectively offline until quorum is restored.</div>
<div><b><img decoding="async" src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="&#x1f4a1;" class="wp-smiley"> Tip:</b> With <code>local-path</code> storage, a database pod can only run on the node that holds its data. With replicated storage such as Longhorn, Kubernetes could start the pod on another node instead of waiting.</div>
<h2><b>Key Takeaways</b></h2>
<ul>
<li><span>A healthy PXC node shows </span><span>Synced</span><span> (state 4), </span><span>Primary</span><span>, the expected cluster size, and the same </span><span>wsrep_last_committed</span><span> value as its peers.</span></li>
<li><span>HAProxy sends writes to one node to avoid certification conflicts, and moved writes to a healthy node within one second when that node was deleted. It moved them back once the original writer had recovered.</span></li>
<li><span>Applications that open short connections saw </span><b>zero failed writes</b><span>. A running query is interrupted cleanly, but open connections are closed and uncommitted transactions are lost, so applications must reconnect and retry.</span></li>
<li><span>A restarted pod reattaches its own volume and catches up with a fast </span><b>IST</b><span> from the gcache. Losing the volume means a full </span><b>SST</b><span>.</span></li>
<li><span>With local-path storage, a database pod is tied to its node. Replicated storage removes that limitation.</span></li>
<li><span>After all of this, every node held byte-for-byte identical data.</span></li>
</ul>
<p>The post <a href="https://www.percona.com/blog/inside-an-openeverest-mysql-cluster-galera-health-and-a-live-failover-test/">Inside an OpenEverest MySQL Cluster: Galera Health and a Live Failover Test</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/inside-an-openeverest-mysql-cluster-galera-health-and-a-live-failover-test/">Inside an OpenEverest MySQL Cluster: Galera Health and a Live Failover Test</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Benchmarking MariaDB Raft Cluster vs. MariaDB Galera Cluster</title>
        <link>https://mariadb.com/resources/blog/benchmarking-mariadb-raft-cluster-vs-mariadb-galera-cluster/</link>
        <pubDate>Wed, 11 Nov 2026 14:30:07 +0000</pubDate>
        <dc:creator>Axel Schwenke</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/benchmarking-mariadb-raft-cluster-vs-mariadb-galera-cluster/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>This post compares Galera Cluster and MariaDB Raft Cluster in common scenarios.</p>
<p><a href="https://mariadb.com/resources/blog/benchmarking-mariadb-raft-cluster-vs-mariadb-galera-cluster/">Benchmarking MariaDB Raft Cluster vs. MariaDB Galera Cluster</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>A clustered database has to keep its nodes in agreement without letting the slowest node set the pace for everyone else. MariaDB Galera Cluster does this by having every node process every write before it commits. MariaDB Raft Cluster, available in MariaDB Enterprise Server 12.3, commits a write once a majority of nodes have it. This post compares the two in the situations where that difference…</p>
<p><a href="https://mariadb.com/resources/blog/benchmarking-mariadb-raft-cluster-vs-mariadb-galera-cluster/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/benchmarking-mariadb-raft-cluster-vs-mariadb-galera-cluster/">Benchmarking MariaDB Raft Cluster vs. MariaDB Galera Cluster</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Raft Cluster: Consistency Without Waiting on Your Slowest Node</title>
        <link>https://mariadb.com/resources/blog/mariadb-raft-cluster-consistency-without-waiting-on-your-slowest-node/</link>
        <pubDate>Wed, 11 Nov 2026 14:29:39 +0000</pubDate>
        <dc:creator>Ralf Gebhardt</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-raft-cluster-consistency-without-waiting-on-your-slowest-node/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>Every clustered database has to answer the same question: how do you keep every node in agreement without letting your […]</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-raft-cluster-consistency-without-waiting-on-your-slowest-node/">MariaDB Raft Cluster: Consistency Without Waiting on Your Slowest Node</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Every clustered database has to answer the same question: how do you keep every node in agreement without letting your slowest node set the pace for everyone else? MariaDB Galera Cluster answers it one way — every node acknowledges every write. MariaDB Raft Cluster, now generally available as part of MariaDB Enterprise Server 12.3, answers it differently: a write commits once a majority of nodes…</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-raft-cluster-consistency-without-waiting-on-your-slowest-node/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/mariadb-raft-cluster-consistency-without-waiting-on-your-slowest-node/">MariaDB Raft Cluster: Consistency Without Waiting on Your Slowest Node</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Heavy MySQL Reports in Seconds: Open Source HTAP with DBTrail and Percona Server for MySQL</title>
        <link>https://www.percona.com/blog/heavy-mysql-reports-in-seconds-open-source-htap-with-dbtrail-and-percona-server-for-mysql/</link>
        <pubDate>Tue, 10 Nov 2026 21:04:03 +0000</pubDate>
        <dc:creator>Vadim Tkachenko</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/heavy-mysql-reports-in-seconds-open-source-htap-with-dbtrail-and-percona-server-for-mysql/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>In Part 1 we ran analytical reports in DuckDB on a DBTrail copy instead of on MySQL. This time I want to look at a different question: what if the application does not need to know the copy exists? Most MySQL servers have a few queries that make someone wait. The monthly report that aggregates … Continued<br />
The post Heavy MySQL Reports in Seconds: Open Source HTAP with DBTrail and Percona Server for MySQL appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/heavy-mysql-reports-in-seconds-open-source-htap-with-dbtrail-and-percona-server-for-mysql/">Heavy MySQL Reports in Seconds: Open Source HTAP with DBTrail and Percona Server for MySQL</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>In <a href="https://www.percona.com/blog/dbtrail-analytical-reports-on-your-mysql-data-without-running-them-on-mysql-part-1/">Part 1</a> we ran analytical reports in DuckDB on a DBTrail copy instead of on MySQL. This time I want to look at a different question: what if the application does not need to know the copy exists?</p>
<p>Most MySQL servers have a few queries that make someone wait. The monthly report that aggregates a whole table. Page 5,000 of a sorted list. The screen that reads years of history. MySQL is built for many small reads and writes, and these queries are a different kind of work.</p>
<p>So what happens to them with DBTrail next to the server? The same 14 reports ran for a day on a Percona Server for MySQL replica and on the copy of the same database that DBTrail keeps.</p>
<p><strong>Short answer: twelve were faster on the copy, and the slowest went from 225 seconds to 7.94 seconds.</strong></p>
<p>Not everything got faster, though. The two lightest reports were faster on Percona Server: one takes <strong>4.0 ms</strong> there and <strong>103 ms</strong> on the copy. Both sides ran the same SQL.</p>
<p><!-- IMAGE 1: upload chart-1-slowest-vs-lightest-report.png to the Media Library and replace the src below --><br />
<a href="https://www.percona.com/wp-content/uploads/2026/11/1-chart-14-reports.png"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-56005" src="https://www.percona.com/wp-content/uploads/2026/11/1-chart-14-reports-1024x805.png" alt="" width="1024" height="805"></a></p>
<p>Full disclosure: I did not run this benchmark myself. It was run and published by the DBTrail project (<a href="https://dbtrail.com/docs">routing guide at dbtrail.com/docs</a>): 14 reports, an average of 317 runs each, on a 200-warehouse order-entry database kept under constant writes by HammerDB, with 4 CPUs on each side. Each engine was timed answering the reports by itself. The copy ran one to five minutes behind the source; the replica had no lag. Over 4,436 paired rounds the copy was <strong>6.5x faster</strong> (geometric mean).</p>
<h2>The 225-second report</h2>
<p>The slowest of the 14 is the kind of query every reporting screen ends up with sooner or later. It adds up every order line and every stock row and joins them by item:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">WITH demand AS (
  SELECT ol_i_id AS i_id, SUM(ol_quantity) AS units, COUNT(*) AS order_lines,
         SUM(CASE WHEN ol_delivery_d IS NULL THEN ol_quantity ELSE 0 END) AS pending_units
  FROM   order_line
  WHERE  ol_quantity &gt;= 1
  GROUP  BY ol_i_id
), supply AS (
  SELECT s_i_id AS i_id, SUM(s_quantity) AS on_hand, SUM(s_ytd) AS shipped_ytd,
         SUM(CASE WHEN s_data LIKE '%ORIGINAL%' THEN 1 ELSE 0 END) AS brand_warehouses
  FROM   stock
  GROUP  BY s_i_id
)
SELECT i.i_id, i.i_name, i.i_price,
       d.units, d.order_lines, d.pending_units,
       s.on_hand, s.shipped_ytd, s.brand_warehouses,
       ROUND(1.0 * s.on_hand / d.units, 3) AS cover_ratio
FROM   demand d
JOIN   supply s ON s.i_id = d.i_id
JOIN   item i   ON i.i_id = d.i_id
ORDER  BY cover_ratio, d.units DESC, i.i_id
LIMIT  20</pre>
<p>This is Q14 of <a href="https://github.com/Percona-Lab/tplytics">tplytics</a>, the report set used in the benchmark. The minimum quantity (1 or 5) and the limit (20 or 50) change from run to run.</p>
<p><strong>No index will fix this one</strong>, because the query has to read both tables from end to end. On the replica that takes <strong>225 seconds</strong>. On the copy, where the data is stored by column and scanned in parallel, it takes <strong>7.94 seconds</strong>.</p>
<h2>HTAP with two open source pieces</h2>
<p>HTAP, hybrid transactional/analytical processing, means the application’s small transactions and the heavy analytical queries are served side by side. The reports that read this database do not need a warehouse loaded for them. In practice the heavy ones are reports, deep pagination, and queries over years of history.</p>
<p><strong>The basic idea is simple.</strong> It takes two open source pieces. Percona Server keeps answering the transactions. DBTrail, an independent project under Apache 2.0, follows the server the way a replica does and answers the heavy queries from its own columnar copy.</p>
<p>I show it here on Percona Server, but it works the same way with MySQL from Oracle, including RDS and Aurora, and with MariaDB.</p>
<p><a href="https://www.percona.com/wp-content/uploads/2026/11/2-diagram-how-it-routes.png"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-56006" src="https://www.percona.com/wp-content/uploads/2026/11/2-diagram-how-it-routes-1024x428.png" alt="" width="1024" height="428"></a></p>
<h2>What the application sees</h2>
<p>To the application, DBTrail is just a MySQL server. It connects to DBTrail’s port over the MySQL protocol, with the driver it already uses and the SQL it already sends. No query is rewritten and no query is tagged.</p>
<pre class="urvanov-syntax-highlighter-plain-tag">$ mysql -h  -P 3309 -u shop -p shop</pre>
<p>For most SELECTs, DBTrail first asks the server for its plan, the same way EXPLAIN does, and the plan decides who answers:</p>
<table>
<thead>
<tr>
<th>Statement</th>
<th>Answered by</th>
<th>Why</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>SELECT * FROM orders WHERE id = 42</code></td>
<td>Percona Server</td>
<td>The plan finds a few rows through an index. The answer is live, to the last write.</td>
</tr>
<tr>
<td><code>SELECT status, COUNT(*) FROM orders GROUP BY status</code></td>
<td>DBTrail’s copy</td>
<td>The plan has a cost of 10,000 or more, or reads a whole table of 100,000 rows or more.</td>
</tr>
<tr>
<td>A heavy SELECT with GROUP_CONCAT, DATE_FORMAT or a JSON function</td>
<td>Percona Server</td>
<td>The copy would answer it differently, or cannot. A correct answer comes before a fast one.</td>
</tr>
<tr>
<td>Any SELECT inside a transaction</td>
<td>Percona Server</td>
<td>A read after your own write has to see that write.</td>
</tr>
<tr>
<td>A SELECT that returns more than 10,000 rows</td>
<td>Percona Server</td>
<td>The copy answers reports, not exports.</td>
</tr>
</tbody>
</table>
<p>The full rules are in the <a href="https://dbtrail.com/docs/guides/query-with-a-mysql-client/routing/how-it-decides">routing guide</a>. What I like here is that nobody maintains a list of queries. A query that is light today and heavy next year goes to the copy when its plan changes.</p>
<p>Column names in the result are the server’s, whoever answers, so code that reads a result by column name keeps working. And before you move an application, the <code>sql-compare</code> command runs its queries on both sides and lists the ones that would answer differently.</p>
<p>DBTrail’s web console counts who answered what, so you can see the split for your own workload:</p>
<p><a href="https://www.percona.com/wp-content/uploads/2026/11/3-console-engine-routing.png"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-56007" src="https://www.percona.com/wp-content/uploads/2026/11/3-console-engine-routing-856x1024.png" alt="" width="856" height="1024"></a></p>
<h2>Writes and reads on one connection</h2>
<p>DBTrail’s port only reads. If your application uses one connection for everything, put ProxySQL in front. Writes, transactions and locking reads go to Percona Server; every other SELECT goes to DBTrail, which then decides between the server and the copy as above.</p>
<p>In ProxySQL that is two servers and two rules, with the application’s user defaulting to hostgroup 10:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">INSERT INTO mysql_servers (hostgroup_id, hostname, port) VALUES
  (10, 'percona-server-host', 3306),
  (20, 'dbtrail-host', 3309);

INSERT INTO mysql_query_rules (rule_id, active, match_digest, destination_hostgroup, apply) VALUES
  (1, 1, '^SELECT .* FOR (UPDATE|SHARE)', 10, 1),
  (2, 1, '^SELECT ', 20, 1);</pre>
<p>The application keeps its host, its port and its login.</p>
<p>But does the application actually feel the difference? This setup was measured with a MariaDB source, an application at a fixed 400 transactions per second, and three reports running in a loop. It is the only run that measures the application and the reports together, so for me it is the most interesting one:</p>
<table>
<thead>
<tr>
<th>Where the reports ran</th>
<th>Application latency, p95</th>
<th>Reports finished in 5 minutes</th>
</tr>
</thead>
<tbody>
<tr>
<td>No reports running</td>
<td>13.7 ms</td>
<td>0</td>
</tr>
<tr>
<td>On the database</td>
<td>6,960 ms</td>
<td>12</td>
</tr>
<tr>
<td>Through DBTrail</td>
<td>13.2 ms</td>
<td>266</td>
</tr>
</tbody>
</table>
<p><em>MariaDB 10.11, ProxySQL 3.1, sysbench. The copy was 0.9 to 3.0 seconds behind. Benchmark by the DBTrail project.</em></p>
<p><strong>With the reports on the database, p95 latency went from 13.7 ms to 6,960 ms. Through DBTrail it stayed at 13.2 ms, and 22 times more reports finished.</strong></p>
<p>One of those three reports was a page five million rows deep, <code>ORDER BY k LIMIT 20 OFFSET 5000000</code>. It took 92 seconds on the database and 0.7 seconds through DBTrail.</p>
<h2>What it takes to run</h2>
<table>
<thead>
<tr>
<th>Part</th>
<th>What it needs</th>
</tr>
</thead>
<tbody>
<tr>
<td>Application</td>
<td>Point its reads at another host and port. Same driver, same SQL, no code to rewrite.</td>
</tr>
<tr>
<td>Database</td>
<td>Nothing is installed in it. It needs the binary log in ROW format with full row images, a primary key on every InnoDB table, and two users.</td>
</tr>
<tr>
<td>Hardware</td>
<td>One machine next to the database. In the 14-report benchmark it had 4 CPUs, the same as the replica. The copy is columnar files on local disk or in S3.</td>
</tr>
<tr>
<td>Cost</td>
<td>Apache 2.0, with no license fee. For these queries there is no warehouse to load and no pipeline to maintain.</td>
</tr>
</tbody>
</table>
<p>The <a href="https://dbtrail.com/docs/quickstart">quick start</a> is five steps on a machine with Docker Compose:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">curl -fsSL https://raw.githubusercontent.com/dbtrail/dbtrail/main/install.sh | sh</pre>
</p>
<ol>
<li>Install with the line above. It opens a web form.</li>
<li>Fill in the host and port of your server. The form shows the SQL that creates DBTrail’s user.</li>
<li>Take the first copy. It reads every table once, with a short lock, so pick a quiet time. Then turn on “Update the copy”.</li>
<li>Turn on the MySQL port.</li>
<li>Connect with your mysql client and run your slowest report.</li>
</ol>
<p>Routing between the server and the copy is one more user and one switch, described in the <a href="https://dbtrail.com/docs/guides/query-with-a-mysql-client/routing">routing guide</a>.</p>
<h2>Try it on your own report</h2>
<p>These are DBTrail’s numbers on DBTrail’s workload. The only benchmark that really matters is your own. Put DBTrail on a separate machine, point it at a replica, and run your slowest report on both.</p>
<p>The documentation lists MySQL and Percona Server for MySQL 8.0 and 8.4, and MariaDB 10.11 and later. Install steps and the routing guide are at <a href="https://dbtrail.com/docs">dbtrail.com/docs</a>, and the source is at <a href="https://github.com/dbtrail/dbtrail">github.com/dbtrail/dbtrail</a>.</p>
<p>If you try it, I am looking for your feedback: which of your queries went to the copy, and how did they do?</p>
<p>The post <a href="https://www.percona.com/blog/heavy-mysql-reports-in-seconds-open-source-htap-with-dbtrail-and-percona-server-for-mysql/">Heavy MySQL Reports in Seconds: Open Source HTAP with DBTrail and Percona Server for MySQL</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/heavy-mysql-reports-in-seconds-open-source-htap-with-dbtrail-and-percona-server-for-mysql/">Heavy MySQL Reports in Seconds: Open Source HTAP with DBTrail and Percona Server for MySQL</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>FOSDEM 2027 – The M-Ecosystem Devroom: Call for Participation</title>
        <link>https://mariadb.org/fosdem-2027-the-m-ecosystem-devroom-call-for-participation/</link>
        <pubDate>Tue, 10 Nov 2026 18:35:32 +0000</pubDate>
        <dc:creator>Frédéric Descamps</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/fosdem-2027-the-m-ecosystem-devroom-call-for-participation/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Different projects. Shared roots. One M-Ecosystem. We are pleased to announce the Call for Participation (CfP) for the M-Ecosystem Devroom at FOSDEM 2027, taking place on Sunday, January 31, 2027, in Brussels, Belgium. Following the tradition of the MariaDB, MySQL &#38; Friends Devroom, we are opening a new chapter that brings together an even broader […]<br />
FOSDEM 2027 – The M-Ecosystem Devroom: Call for Participation appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/fosdem-2027-the-m-ecosystem-devroom-call-for-participation/">FOSDEM 2027 – The M-Ecosystem Devroom: Call for Participation</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Different projects. Shared roots. One M-Ecosystem. We are pleased to announce the Call for Participation (CfP) for the M-Ecosystem Devroom at FOSDEM 2027, taking place on Sunday, January 31, 2027, in Brussels, Belgium. Following the tradition of the MariaDB, MySQL &amp; Friends Devroom, we are opening a new chapter that brings together an even broader […]</p>
<p><a href="https://mariadb.org/fosdem-2027-the-m-ecosystem-devroom-call-for-participation/">FOSDEM 2027 – The M-Ecosystem Devroom: Call for Participation</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/fosdem-2027-the-m-ecosystem-devroom-call-for-participation/">FOSDEM 2027 – The M-Ecosystem Devroom: Call for Participation</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Foundation TAF: Profiling MariaDB Subsystems Across Hardware Using Targeted Performance Profiles</title>
        <link>https://mariadb.org/mariadb-foundation-taf-profiling-mariadb-subsystems-across-hardware-using-targeted-performance-profiles/</link>
        <pubDate>Mon, 09 Nov 2026 17:10:59 +0000</pubDate>
        <dc:creator>Jonathan Miller</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-foundation-taf-profiling-mariadb-subsystems-across-hardware-using-targeted-performance-profiles/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB has a lot of moving parts. Binlog durability, isolation levels, thread scheduling, Performance Schema instrumentation, InnoDB safety mechanisms, charset handling, SSL, logging — each subsystem has its own cost, and that cost changes depending on the hardware underneath it. Last week we built a structured set of performance profiles to measure those costs directly. […]<br />
MariaDB Foundation TAF: Profiling MariaDB Subsystems Across Hardware Using Targeted Performance Profiles appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/mariadb-foundation-taf-profiling-mariadb-subsystems-across-hardware-using-targeted-performance-profiles/">MariaDB Foundation TAF: Profiling MariaDB Subsystems Across Hardware Using Targeted Performance Profiles</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB has a lot of moving parts. Binlog durability, isolation levels, thread scheduling, Performance Schema instrumentation, InnoDB safety mechanisms, charset handling, SSL, logging — each subsystem has its own cost, and that cost changes depending on the hardware underneath it. Last week we built a structured set of performance profiles to measure those costs directly. […]</p>
<p><a href="https://mariadb.org/mariadb-foundation-taf-profiling-mariadb-subsystems-across-hardware-using-targeted-performance-profiles/">MariaDB Foundation TAF: Profiling MariaDB Subsystems Across Hardware Using Targeted Performance Profiles</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/mariadb-foundation-taf-profiling-mariadb-subsystems-across-hardware-using-targeted-performance-profiles/">MariaDB Foundation TAF: Profiling MariaDB Subsystems Across Hardware Using Targeted Performance Profiles</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Giving the Optimizer a Hint: What’s New in MariaDB Server 13.0, compatibility and beyond</title>
        <link>https://mariadb.org/giving-the-optimizer-a-hint-whats-new-in-mariadb-server-13-0-compatibility-and-beyond/</link>
        <pubDate>Mon, 09 Nov 2026 07:49:23 +0000</pubDate>
        <dc:creator>Frédéric Descamps</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/giving-the-optimizer-a-hint-whats-new-in-mariadb-server-13-0-compatibility-and-beyond/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>The optimizer is one of the most important components of a database server. Most of the time, we trust it to make the right decisions. But sometimes, we know something about our data or workload that the optimizer doesn’t, and we’d like to give it a little help. With MariaDB Server 13.0, we’re making that […]<br />
Giving the Optimizer a Hint: What’s New in MariaDB Server 13.0, compatibility and beyond appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/giving-the-optimizer-a-hint-whats-new-in-mariadb-server-13-0-compatibility-and-beyond/">Giving the Optimizer a Hint: What’s New in MariaDB Server 13.0, compatibility and beyond</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>The optimizer is one of the most important components of a database server. Most of the time, we trust it to make the right decisions. But sometimes, we know something about our data or workload that the optimizer doesn’t, and we’d like to give it a little help. With MariaDB Server 13.0, we’re making that […]</p>
<p><a href="https://mariadb.org/giving-the-optimizer-a-hint-whats-new-in-mariadb-server-13-0-compatibility-and-beyond/">Giving the Optimizer a Hint: What’s New in MariaDB Server 13.0, compatibility and beyond</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/giving-the-optimizer-a-hint-whats-new-in-mariadb-server-13-0-compatibility-and-beyond/">Giving the Optimizer a Hint: What’s New in MariaDB Server 13.0, compatibility and beyond</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Why MariaDB is giving financial services a cache of its own</title>
        <link>https://mariadb.com/resources/blog/why-mariadb-is-giving-financial-services-a-cache-of-its-own/</link>
        <pubDate>Fri, 06 Nov 2026 13:58:30 +0000</pubDate>
        <dc:creator>Mani Nagasundaram</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/why-mariadb-is-giving-financial-services-a-cache-of-its-own/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>Nobody has ever said “I’m so excited about our in-memory cache” at a dinner party. And yet these unglamorous layers […]</p>
<p><a href="https://mariadb.com/resources/blog/why-mariadb-is-giving-financial-services-a-cache-of-its-own/">Why MariaDB is giving financial services a cache of its own</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Nobody has ever said “I’m so excited about our in-memory cache” at a dinner party. And yet these unglamorous layers sit underneath risk calculation, trading and payments, and they are about to get a lot more important in the agentic world. Today, at the Open Source in Finance Forum in New York, MariaDB and FINOS, the Fintech Open Source Foundation, announced Kevät, an open source distributed in…</p>
<p><a href="https://mariadb.com/resources/blog/why-mariadb-is-giving-financial-services-a-cache-of-its-own/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/why-mariadb-is-giving-financial-services-a-cache-of-its-own/">Why MariaDB is giving financial services a cache of its own</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Node.js Connector 3.5.5, 3.4.8, 3.3.5, and 3.2.6 now available</title>
        <link>https://mariadb.com/resources/blog/mariadb-node-js-connector-3-5-5-3-4-8-3-3-5-and-3-2-6-now-available/</link>
        <pubDate>Thu, 05 Nov 2026 20:18:03 +0000</pubDate>
        <dc:creator>Daniel Bartholomew</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-node-js-connector-3-5-5-3-4-8-3-3-5-and-3-2-6-now-available/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>MariaDB is pleased to announce the immediate availability of the MariaDB Connector/Node.js 3.5.5, 3.4.8, 3.3.5, and 3.2.6 GA releases. Release […]</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-node-js-connector-3-5-5-3-4-8-3-3-5-and-3-2-6-now-available/">MariaDB Node.js Connector 3.5.5, 3.4.8, 3.3.5, and 3.2.6 now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB is pleased to announce the immediate availability of the MariaDB Connector/Node.js 3.5.5, 3.4.8, 3.3.5, and 3.2.6 GA releases. Download now MariaDB Connector/Node.js 3.5.5 is a Stable (GA) release. Notable changes in this release include: MariaDB Connector/Node.js 3.4.8 is a Stable (GA) release. Notable changes in this release include…</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-node-js-connector-3-5-5-3-4-8-3-3-5-and-3-2-6-now-available/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/mariadb-node-js-connector-3-5-5-3-4-8-3-3-5-and-3-2-6-now-available/">MariaDB Node.js Connector 3.5.5, 3.4.8, 3.3.5, and 3.2.6 now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>What’s New in MariaDB Enterprise Server 12.3?</title>
        <link>https://mariadb.com/resources/blog/whats-new-in-mariadb-enterprise-server-12-3/</link>
        <pubDate>Thu, 05 Nov 2026 17:01:11 +0000</pubDate>
        <dc:creator>Aijaz Fatima</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/whats-new-in-mariadb-enterprise-server-12-3/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>What is MariaDB Enterprise Server? MariaDB Enterprise Server is a core component of our flagship product MariaDB Enterprise Platform, delivering […]</p>
<p><a href="https://mariadb.com/resources/blog/whats-new-in-mariadb-enterprise-server-12-3/">What’s New in MariaDB Enterprise Server 12.3?</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Enterprise Server is a core component of our flagship product MariaDB Enterprise Platform, delivering a hardened, production-grade edition of MariaDB Community Server. MariaDB Enterprise Server is enhanced with specific features that meet enterprise requirements such as advanced audit logging, non-blocking backup support, and data-at-rest encryption, along with backported fixes and…</p>
<p><a href="https://mariadb.com/resources/blog/whats-new-in-mariadb-enterprise-server-12-3/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/whats-new-in-mariadb-enterprise-server-12-3/">What’s New in MariaDB Enterprise Server 12.3?</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>WooCommerce Analytics with DuckDB</title>
        <link>https://www.percona.com/blog/woocommerce-analytics-with-duckdb/</link>
        <pubDate>Thu, 05 Nov 2026 16:31:19 +0000</pubDate>
        <dc:creator>Juan Arruti</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/woocommerce-analytics-with-duckdb/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>MySQL and DuckDB Unlike row-oriented databases, which store data for a single record sequentially on disk, favoring single-row lookups, columnar databases store all the values from a column contiguously in storage, allowing only the selected column to be read from disk. The default MySQL engine is InnoDB, which is ACID-compliant and great for OLTP (Online … Continued<br />
The post WooCommerce Analytics with DuckDB appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/woocommerce-analytics-with-duckdb/">WooCommerce Analytics with DuckDB</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<h3>MySQL and DuckDB</h3>
<p><span>Unlike row-oriented databases, which store data for a single record sequentially on disk, favoring single-row lookups, columnar databases store all the values from a column contiguously in storage, allowing only the selected column to be read from disk.</span></p>
<p><span>The default MySQL engine is InnoDB, which is ACID-compliant and great for OLTP (Online Transaction Processing) workloads. That said, OLAP (Online Analytical Processing) queries are built differently; they scan, group, and summarize millions or billions of rows to produce reports. In these cases, the InnoDB engine can be slow to process such queries. This has been a debt in MySQL over the years; it was common to setup ETL/CDC pipelines to export or stream the data to another engine, usually a columnar database system, to run reporting and BI queries on it.</span></p>
<p><span>DuckDB is a portable analytical database system, designed to be fast and reliable, similar to SQLite.</span></p>
<p><span>Recently, various vendors (MariaDB, Alibaba) started including DuckDB inside MySQL as a storage engine. A table declared with ENGINE=DuckDB stores data in columnar format, and queries are handled by the DuckDB engine.</span></p>
<p><span>This is useful in several ways; the main one is to use MySQL asynchronous replication to stream data from the OLTP, using the InnoDB engine, to a Replica where tables are in DuckDB, thereby offloading the OLAP workload to the replica. To showcase this, we thought that the best example was an on-line store which naturally requires both: short, fast, scalable transactions for the store frontend, and analytics for the store’s reporting and Business Intelligence, and what better than the free and open-source software that serves between 20 and 40% of the world’s e-commerce websites: WooCommerce.</span></p>
<h3><span>WooCommerce</span></h3>
<p><span>There are around 4M WooCommerce stores worldwide, the most of any e-commerce platform, handling between 20 and 39% of all e-commerce sites, and they use MySQL as their underlying database.</span></p>
<p><span>One of the reasons stores have been adopting computers for over 50 years, is the value of having accumulated information about your business’ transactions. This data collection allows business owners to understand trends and find new opportunities, by turning raw data into metrics that marketing and sales departments can act upon. This process is based on the long-term accumulation of large amounts of data and metadata, and that accumulation is often incompatible with transactional/row-oriented storage engines.</span></p>
<p><span>WooCommerce has a built-in analytics module to create those reports that provide metrics, so it is the perfect product to test the performance difference between InnoDB and DuckDB.</span></p>
<p><span>WooCommerce analytics does not run its reports against live order tables because querying these tables would be too slow. Instead, it keeps a set of aggregations in a number of denormalized “lookup” tables, which are optimized for this purpose. This is a limitation when running reports with InnoDB, as querying the raw tables would kill performance, and thus the reports are limited to what you can get from these lookup tables.</span></p>
<p><span>The following lookup tables are created for WooCommerce Analytics:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; SHOW TABLES LIKE '%wc_%lookup'; SHOW TABLES LIKE '%wc_order_stats';
+-------------------------------------+
| Tables_in_woocommerce (%wc_%lookup) |
+-------------------------------------+
| wp_wc_category_lookup               |
| wp_wc_customer_lookup               |
| wp_wc_order_coupon_lookup           |
| wp_wc_order_product_lookup          |
| wp_wc_order_tax_lookup              |
| wp_wc_product_attributes_lookup     |
| wp_wc_product_meta_lookup           |
+-------------------------------------+
7 rows in set (0.00 sec)

+-----------------------------------------+
| Tables_in_woocommerce (%wc_order_stats) |
+-----------------------------------------+
| wp_wc_order_stats                       |
+-----------------------------------------+
1 row in set (0.00 sec)</pre>
<p><span>The wp_wc_order_stats table is the spine of the revenue and orders reports; it contains one row per order, including dates, status, customer, number of items sold, and the monetary totals.</span></p>
<p><span>In the store we’re using, the wc_order_stats table contains 400000 rows, and there are 5000 products. This data was loaded using the </span><a href="https://github.com/woocommerce/wc-smooth-generator"><span>WooCommerce Smooth Generator plugin</span></a><span>.</span></p>
<p><span>The lookup tables are derived data, so WooCommerce has to keep them in sync with the orders they summarize, which it does in the background (which means you have to run a scheduled process that is what keeps these lookup tables updated).</span></p>
<h3><span>MySQL Deployment</span></h3>
<p><span>We deployed a Source/Replica MySQL topology with both databases on the same host, each with its respective Docker image.</span></p>
<h4><span>Source</span></h4>
<p><span>The Source runs Percona Server for MySQL 8.0.46, which we chose to match the replica’s major version.</span></p>
<p><span>WooCommerce tables use the MySQL default engine, which is InnoDB.</span></p>
<p><span>We configured an InnoDB Buffer Pool of 4 GiB:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">[mysqld]
innodb_buffer_pool_size=4G</pre>
</p>
<h4><span>Replica</span></h4>
<p><span>For this test, as a Replica we deployed AliSQL 8.0.44-2, Alibaba’s MySQL branch based on MySQL 8.0.44, which includes the </span><a href="https://github.com/alibaba/AliSQL/blob/master/wiki/duckdb/duckdb.md"><span>DuckDB</span></a><span> storage engine along with other features such as Vector Search and Flashback. At this moment, this is the latest available version.</span></p>
<p><span>We configured the DuckDB instance with the following settings:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">[mysqld]
duckdb_memory_limit=4G    # maximum memory DuckDB is allowed to use
force_innodb_to_duckdb=ON # force-replace the InnoDB engine with DuckDB
duckdb_threads=0          # total number of threads used by DuckDB. 0 equals system CPU cores.</pre>
<p><span>You can find full reference for DuckDB settings here </span><a href="https://github.com/alibaba/AliSQL/blob/master/wiki/duckdb/duckdb_variables-en.md"><span>https://github.com/alibaba/AliSQL/blob/master/wiki/duckdb/duckdb_variables-en.md</span></a><span>  </span></p>
<p><span>The force_innodb_to_duckdb option is mandatory in this process, as it is the way to tell MySQL to use DuckDB engine for tables created via replication or mysqldump.</span></p>
<p><span>After loading the 5000 products and 400K orders, the size of the WooCommerce database directory using the InnoDB engine was 7.3 GiB:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">$ du -sch woocommerce/
7.3G woocommerce/</pre>
<p><span>While on the replica where tables have been created with DuckDB, the dataset fits in just 601 MiB:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">$ du -sch duckdb.db
601M duckdb.db</pre>
<p><span>That is a solid 12x improvement on disk footprint!</span></p>
<h3><span>Sending reports queries directly to the Replica</span></h3>
<p><span>We wanted to find a way to make the process as transparent as possible, but WooCommerce uses WordPress’s single database connection object for everything, which means that the reports’ code will use the global $wpdb, and there is no setting that would allow us to send this reporting/analytics traffic to a different server, or an easy way to introduce a second connection object to the code. This means you are stuck with a single server, so there would be no easy way to make use of both InnoDB and DuckDB copies.</span></p>
<p><span>Thus, we had to come up with some solution to run the reports against the replica. We like simple stuff, so instead of changing the existing WooCommerce installation at all, we run a whole second copy of the same WooCommerce installation that connects to the replica, and we push the analytics traffic to that second WooCommerce copy.</span></p>
<p><span>The original install of your store stays exactly as it is, with its <code>wp-config.php</code> which already points to the primary (InnoDB/transactional) database:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">define( 'DB_HOST', 'ps8.example.local' );   // Percona Server for MySQL 8.0.46, InnoDB</pre>
<p><span>And the second install is just a full copy of the first, in its own directory, with just one line of code changed: the database host.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">$ cp -aL /var/www/html /var/www/html2;  # we assume your WooCommerce install is /var/www/html 
$ chown -R apache:apache /var/www/html2 # and we also assume you run Apache; should not be hard to adapt for Nginx or other web servers</pre>
<p><span>In the copy’s wp-config.php we change only the host and leave the table prefix, the authentication keys, everything else untouched:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">define( 'DB_HOST', 'duckdb8.example.local'' );  // AliSQL 8.0.44 with the DuckDB storage engine, the replica</pre>
<p><span>The second install gets a dedicated pool, listening on its own socket, and its own virtual host on an internal port, handing <code>.php</code> to that pool:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag"># /etc/httpd/conf.d/html2.conf

    DocumentRoot /var/www/html2
    
        AllowOverride All
        Require all granted
    
    
        SetHandler "proxy:unix:/run/php-fpm/www2.sock|fcgi://localhost"
    
</pre>
<p><span>With that in place, we have two addresses for (essentially) the same WooCommerce, each using a different database:</span></p>
<p><span>– <code>http://127.0.0.1:80/</code> is the store, on Percona Server for MySQL 8.0.46 (InnoDB).</span></p>
<p><span>– <code>http://127.0.0.1:8080/</code> is the copy, on DuckDB replica.</span></p>
<p><span>Every analytics call we benchmark goes to one or the other, so the same report is run against InnoDB and against DuckDB from the same codebase, changing nothing but the database underneath.</span></p>
<h3><span>Benchmark Methodology</span></h3>
<p><span>Each report was run several times, and we kept the fastest run for each. </span></p>
<p><span>Before comparing times, we verified that both engines returned the same result set: the same number of rows and the same values, once serialized and sorted. A few reports differed because the DuckDB engine computes decimals as double-precision floating-point rather than exact DECIMAL, so some monetary sums ended up a fraction of a cent apart. While this might be of concern when dealing with real money, for reporting the precision DuckDB provides should be more than enough, as the difference between the reports was always below 1 cent. </span></p>
<p><span>The two engines never ran at the same time. Every report ran first on InnoDB and then on DuckDB, so they never competed for CPU, memory, or disk (at the web server layer). </span></p>
<p><span>A few reports whose SQL relied on MySQL-only syntax failed outright on DuckDB and were discarded rather than rewritten, since the point was to run the same query on both engines.  </span></p>
<p><span>We drove the benchmarks through WooCommerce’s own Analytics REST API, sending the same report requests to each engine and timing the responses.</span></p>
<p><span>Each report was run with the force_cache_refresh parameter, so the result is computed from the database on every call rather than served from WooCommerce’s cache.</span></p>
<h3><span>Built-in Analytics Reports</span></h3>
<p><span>We started with the built-in </span><a href="https://woocommerce.com/products/woocommerce-analytics/"><span>WooCommerce Analytics</span></a><span> reports. All reports used the same window, from 2024-01-01 to 2026-09-01, over a store of 400,000 orders. The stats reports were aggregated by month; the detail reports returned up to 100 rows per page.</span></p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-55564 size-medium_large" src="https://www.percona.com/wp-content/uploads/2026/11/builtin-reports-light-768x802.png" alt="" width="768" height="802"></p>
<p><span>Every built-in report ran faster on DuckDB, from about 10x to nearly 63x, and all of them finished in under a second against InnoDB’s 5 to 16. The biggest improvement resulted from the category reports, where the heavy grouping and aggregation show the columnar engine’s strength.</span></p>
<h3><span>Built-in Analytics Segmented Reports</span></h3>
<p><span>The built-in reports are not limited to a single total over a date range. Each stats report takes an interval, so you can ask for the same figures broken down by hour, day, week, or month, and several of them also accept a segmentby parameter, which splits the totals along a dimension. Segmenting by category, for example, returns revenue or order numbers per product category rather than as a single combined figure, which is how the Analytics screens generate their breakdowns. </span></p>
<p><span>The finer the interval and the more segments involved, the more the report asks of the database. These are the reports we use to compare InnoDB and DuckDB because they are where the underlying engine makes the most difference.</span></p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-55567 size-medium_large" src="https://www.percona.com/wp-content/uploads/2026/11/segmented-reports-light-768x524.png" alt="" width="768" height="524"></p>
<p><span>Every segmented report ran faster on DuckDB, ranging from about 14x to 83x faster. Segmenting by category and time pushes InnoDB into multi-minute queries, while DuckDB still answers in seconds, so the heavier the breakdown, the wider the gap.</span></p>
<h3><span>WooCommerce Customer Analytics Plugin</span></h3>
<p><span>To see whether the engine helps with real third-party code, not just the built-in reports, we also benchmarked the </span><a href="https://coddium.com/customer-analytics-for-woocommerce/"><span>Customer Analytics for WooCommerce</span></a><span> plugin from Coddium.</span></p>
<p><span>It extends WooCommerce Analytics with customer metrics the built-in reports do not provide: customer lifetime value, churn rate, RFM segments, cohort retention, repeat purchase rate, order sequence, and acquisition sources, among others. </span></p>
<p><span>Like the built-in reports, each of these reads from the same WooCommerce Analytics lookup tables, making it a good test of whether a plugin written for MySQL runs faster on the DuckDB engine without any changes of its own.</span></p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-55574 size-medium_large" src="https://www.percona.com/wp-content/uploads/2026/11/plugin-reports-light-1000w-768x1111.webp" alt="" width="768" height="1111"></p>
<p><span>Even with a third-party plugin we did not modify, all eleven reports ran faster on DuckDB, from about 2x to nearly 70x faster.</span></p>
<h3><span>Ad-hoc Query on Live Data</span></h3>
<p><span>As mentioned, the built-in analytics reports are served from precomputed lookup tables, which only answer the questions they were designed to answer. For anything else, you have to query the live order tables directly. So we tested an expensive query against those tables to compare the performance. </span></p>
<p><span>In this case, we wanted to know how many items were sold, broken down by product category, city, and day of the week, across the store’s orders in the date range. We came up with the following query:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">SELECT
  tt.term_taxonomy_id                            AS category_id,
  LOWER(a.city)                                  AS city,
  DAYOFWEEK(o.date_created_gmt)                  AS dow,
  SUM(CAST(im_qty.meta_value AS DECIMAL(10,2)))  AS items_sold
FROM woocommerce.wp_wc_orders o
JOIN woocommerce.wp_wc_order_addresses a
  ON a.order_id = o.id AND a.address_type = 'billing'
JOIN woocommerce.wp_woocommerce_order_items oi
  ON oi.order_id = o.id AND oi.order_item_type = 'line_item'
JOIN woocommerce.wp_woocommerce_order_itemmeta im_prod
  ON im_prod.order_item_id = oi.order_item_id AND im_prod.meta_key = '_product_id'
JOIN woocommerce.wp_woocommerce_order_itemmeta im_qty
  ON im_qty.order_item_id = oi.order_item_id AND im_qty.meta_key = '_qty'
JOIN woocommerce.wp_term_relationships tr
  ON tr.object_id = CAST(im_prod.meta_value AS DECIMAL(20,0))
JOIN woocommerce.wp_term_taxonomy tt
  ON tt.term_taxonomy_id = tr.term_taxonomy_id AND tt.taxonomy = 'product_cat'
WHERE o.type = 'shop_order'
  AND o.status IN ('wc-completed','wc-processing')
  AND o.date_created_gmt &gt;= '2024-01-01' AND o.date_created_gmt &lt; &#039;2026-09-01&#039;
GROUP BY category_id, LOWER(a.city), dow;</pre>
<p><span>The execution time difference between both engines can be found below:</span></p>
<p><img decoding="async" loading="lazy" class="alignnone wp-image-55568 size-medium_large" src="https://www.percona.com/wp-content/uploads/2026/11/adhoc-live-query-light-768x407.png" alt="" width="768" height="407"></p>
<p><span>Across three runs each, DuckDB was consistently about 4.1 seconds and InnoDB about 4 minutes 16 seconds.</span></p>
<p><span>The results are not identical, and the two extra groups come from how each engine compares text. Since the city column uses a case- and accent-insensitive collation that InnoDB applies, it folds an accented spelling and its plain form into a single group. The DuckDB engine does not apply the collation and compares text byte-for-byte, keeping them apart. </span></p>
<p><span>No orders are missing on either side; the same rows are simply bucketed into two more groups.</span></p>
<h3><span>Limitations</span></h3>
<p><span>We ran into the following limitations when performing the above benchmarks:</span></p>
<ul>
<li>
<h4><span>DuckDB SQL compatibility</span></h4>
</li>
</ul>
<p><span>Since the DuckDB storage engine executes queries in its own engine, the SQL syntax should be portable. A query that runs fine on InnoDB can fail on DuckDB when it uses a keyword or data type that DuckDB does not recognize. For example, the CAST function in MySQL accepts the UNSIGNED keyword, but when it’s pushed into DuckDB, it fails with the following error:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">ERROR 7501 (HY000): [DuckDB] Catalog Error: Type with name UNSIGNED does not exist!
Did you mean "JSON"?.</pre>
<p><span>Such queries need to be rewritten so DuckDB can process them. This can be automated with query-rewrite tools such as </span><a href="https://proxysql.com/documentation/query-rewrite/"><span>ProxySQL Query Rewrite</span></a><span> feature or </span><a href="https://dev.mysql.com/doc/refman/8.4/en/rewriter-query-rewrite-plugin.html"><span>MySQL’s Rewriter Query Rewrite plugin</span></a><span>, which we will cover in a separate blog post.</span></p>
<ul>
<li>
<h4><span>Collation</span></h4>
</li>
</ul>
<p><span>Unlike InnoDB, DuckDB does not apply the column collation and forces binary comparison. This can produce different result sets between engines. </span></p>
<p><span>For example, the following SELECT COUNT result set differs between DuckDB and InnoDB:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag"># DuckDB
mysql&gt; SELECT COUNT(DISTINCT city) FROM woocommerce.wp_wc_order_addresses WHERE address_type='billing' AND city'';
+----------------------+
| COUNT(DISTINCT city) |
+----------------------+
|               114412 |
+----------------------+
1 row in set (0.02 sec)

# InnoDB
mysql&gt; SELECT COUNT(DISTINCT city) FROM woocommerce.wp_wc_order_addresses WHERE address_type='billing' AND city'';
+----------------------+
| COUNT(DISTINCT city) |
+----------------------+
|               114375 |
+----------------------+
1 row in set (1.38 sec)</pre>
<p>This is caused by DuckDB bypassing the column collation.</p>
<p>If we force binary comparison when running the query on InnoDB, we obtain the same result set as DuckDB:</p>
<pre class="urvanov-syntax-highlighter-plain-tag"># InnoDB BINARY
mysql&gt; SELECT COUNT(DISTINCT BINARY city) FROM woocommerce.wp_wc_order_addresses WHERE address_type='billing' AND city'';
+-----------------------------+
| COUNT(DISTINCT BINARY city) |
+-----------------------------+
|                      114412 |
+-----------------------------+
1 row in set, 1 warning (1.34 sec)</pre>
<p><span>To prevent this, group and join should be done on numeric IDs rather than text.</span></p>
<ul>
<li>
<h4><span>Decimals computed as Double</span></h4>
</li>
</ul>
<p><span>To improve performance, DuckDB does not support DECIMAL precision by default, so monetary columns are summed in floating point instead. This can lead to differences at sub-cent digits. If you need exact decimal values, you can disable the duckdb_use_double_for_decimal variable when importing the data. </span></p>
<p><span>We have not yet fully tested performance implications of disabling this, but we plan to cover this in another blogpost, in the near future.</span></p>
<ul>
<li>
<h4><span>Foreign keys</span></h4>
</li>
</ul>
<p><span>Traditionally in MySQL, cascaded foreign key operations such as ON DELETE CASCADE were handled internally by InnoDB, below the SQL layer, so they were not written to the binlog files. </span></p>
<p><span>Because the DuckDB storage engine does not perform these cascades itself, changes to child rows would be lost when replicating from InnoDB to DuckDB. </span></p>
<p><span>Starting with MySQL 9.6, foreign key cascades are handled at the SQL layer by default, so the affected rows are recorded in the binary log, making replication across different engines transparent. </span></p>
<p>The following MySQL blog post explains this change in detail:</p>
<p><a href="https://blogs.oracle.com/mysql/no-more-hidden-changes-how-mysql-9-6-transforms-foreign-key-management">https://blogs.oracle.com/mysql/no-more-hidden-changes-how-mysql-9-6-transforms-foreign-key-management</a></p>
<p><span>WooCommerce does not use cascading foreign keys, so this limitation does not apply in this case.</span></p>
<ul>
<li>
<h4><span>Observability</span></h4>
</li>
</ul>
<p><span>DuckDB exposes only a few of status variables. Status variables mostly show counters for statements (<code>Com_duckdb_select</code>, <code>Com_duckdb_insert</code>) and rows processed in batches. </span></p>
<p><span>InnoDB, by comparison, exposes dozens of status variables covering the buffer pool, I/O, row operations, and locking, and is instrumented in detail through the Performance Schema. </span></p>
<p><span>So there is little visibility into what the DuckDB engine is doing internally, such as memory use, disk spilling, or query execution, which makes monitoring and tuning harder than on InnoDB. </span></p>
<p><span>This gap makes sense though, given how much longer InnoDB has existed; DuckDB has had far less time to build equivalent instrumentation.</span></p>
<h3><span>Why Columnar engine wins?</span></h3>
<p><span>The reason is physical, and it comes down to how the data is stored on disk. InnoDB is a row store; it keeps all of a row’s columns together, which is ideal for transactional work, where you read or write an entire row at a time.</span></p>
<p><span>Analytics asks the opposite question. A report rarely needs the whole row; it sums one column, counts another, and groups by a third, across millions of rows.</span></p>
<p><span>In a row store, answering that means reading every full row from the B-tree and discarding most of it.</span></p>
<p><span>A columnar engine stores each column separately, so it reads only the fields a query touches, compresses them far better because the values share a type, and processes them in batches instead of row by row. Reading less, reading it in compressed form, and processing it in bulk is what turns InnoDB’s minutes into DuckDB’s seconds. The heavier the aggregation, the wider the gap, which is exactly what the benchmarks showed.</span></p>
<p><span>P.S. DuckDB is a potential solution for analytics use cases, and this post is part of our testing. At this time, Percona does not have a production DuckDB build and does not support it.</span></p>
<p>The post <a href="https://www.percona.com/blog/woocommerce-analytics-with-duckdb/">WooCommerce Analytics with DuckDB</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/woocommerce-analytics-with-duckdb/">WooCommerce Analytics with DuckDB</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Enterprise Server 12.3 LTS: About 4x More OLTP Throughput than 10.6</title>
        <link>https://mariadb.com/resources/blog/mariadb-enterprise-server-12-3-lts-about-4x-more-oltp-throughput-than-10-6/</link>
        <pubDate>Wed, 04 Nov 2026 13:00:15 +0000</pubDate>
        <dc:creator>Adam Luciano</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-enterprise-server-12-3-lts-about-4x-more-oltp-throughput-than-10-6/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>MariaDB Scaling Improvements From 10.6 to 12.3 Welcome back! For those of us at MariaDB, the 10.6 scaling story is […]</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-enterprise-server-12-3-lts-about-4x-more-oltp-throughput-than-10-6/">MariaDB Enterprise Server 12.3 LTS: About 4x More OLTP Throughput than 10.6</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Welcome back! For those of us at MariaDB, the 10.6 scaling story is familiar territory (the throughput curve that climbs nicely to ~88 threads and then flattens, no matter how many cores sit underneath it), and it has been the backdrop to more than a few customer conversations about why a bigger server did not buy a faster database. Compute is plenty, hence the question our customers are really…</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-enterprise-server-12-3-lts-about-4x-more-oltp-throughput-than-10-6/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/mariadb-enterprise-server-12-3-lts-about-4x-more-oltp-throughput-than-10-6/">MariaDB Enterprise Server 12.3 LTS: About 4x More OLTP Throughput than 10.6</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Agents Are the Database’s Newest Customer: AI in MariaDB Enterprise Platform 2027</title>
        <link>https://mariadb.com/resources/blog/agents-are-the-databases-newest-customer-ai-in-mariadb-enterprise-platform-2027/</link>
        <pubDate>Wed, 04 Nov 2026 13:00:09 +0000</pubDate>
        <dc:creator>Adam Luciano</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/agents-are-the-databases-newest-customer-ai-in-mariadb-enterprise-platform-2027/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>Almost every application we use today, from the banking app on our phones to the order screen at the coffee […]</p>
<p><a href="https://mariadb.com/resources/blog/agents-are-the-databases-newest-customer-ai-in-mariadb-enterprise-platform-2027/">Agents Are the Database’s Newest Customer: AI in MariaDB Enterprise Platform 2027</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Almost every application we use today, from the banking app on our phones to the order screen at the coffee shop, was built on a simple bargain with the database underneath it: a developer wrote the queries ahead of time, someone tuned them, and the same handful ran request after request. That bargain is starting to change, because a new kind of user is showing up at the database…</p>
<p><a href="https://mariadb.com/resources/blog/agents-are-the-databases-newest-customer-ai-in-mariadb-enterprise-platform-2027/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/agents-are-the-databases-newest-customer-ai-in-mariadb-enterprise-platform-2027/">Agents Are the Database’s Newest Customer: AI in MariaDB Enterprise Platform 2027</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Introducing MariaDB Enterprise Platform 2027: one foundation for the agentic enterprise</title>
        <link>https://mariadb.com/resources/blog/introducing-mariadb-enterprise-platform-2027-one-foundation-for-the-agentic-enterprise/</link>
        <pubDate>Wed, 04 Nov 2026 13:00:04 +0000</pubDate>
        <dc:creator>Tina Yang</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/introducing-mariadb-enterprise-platform-2027-one-foundation-for-the-agentic-enterprise/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>Every enterprise is racing to put AI agents to work. But an agent is only as trustworthy as the data […]</p>
<p><a href="https://mariadb.com/resources/blog/introducing-mariadb-enterprise-platform-2027-one-foundation-for-the-agentic-enterprise/">Introducing MariaDB Enterprise Platform 2027: one foundation for the agentic enterprise</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Every enterprise is racing to put AI agents to work. But an agent is only as trustworthy as the data it acts on, and in most enterprises that data is scattered across databases, warehouses, vector stores and caches. Agents fire dozens of queries for every answer, and every hop between systems adds lag. When the data is stale, an agent doesn’t just slow down. It acts confidently on the wrong…</p>
<p><a href="https://mariadb.com/resources/blog/introducing-mariadb-enterprise-platform-2027-one-foundation-for-the-agentic-enterprise/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/introducing-mariadb-enterprise-platform-2027-one-foundation-for-the-agentic-enterprise/">Introducing MariaDB Enterprise Platform 2027: one foundation for the agentic enterprise</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Why Webhook Deduplication Isn&#8217;t Enough</title>
        <link>https://percona.community/blog/2026/11/04/webhook-deduplication-isnt-enough/</link>
        <pubDate>Wed, 04 Nov 2026 09:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/why-webhook-deduplication-isnt-enough/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>Let’s say you’re processing events from an API into your CRM. An event comes in and tells you that a particular contact is a Director at a company. So you update the job title on their contact record in the CRM, along with some other fields like the company and whether they’re qualified.</p>
<p><a href="https://percona.community/blog/2026/11/04/webhook-deduplication-isnt-enough/">Why Webhook Deduplication Isn&#8217;t Enough</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Let’s say you’re processing events from an API into your CRM. An event comes in and tells you that a particular contact is a Director at a company. So you update the job title on their contact record in the CRM, along with some other fields like the company and whether they’re qualified.</p>
<p>A few seconds later, you receive another webhook telling you the same contact is a Manager at that company.</p>
<p>What’s happened here is that the second update was older than the first, but it took longer to arrive, and it has a different event ID.</p>
<p>This kind of thing is a big problem for GTM teams, because it affects how they segment, score and reach out to prospects.</p>
<p>The obvious thing to do to prevent things like this happening is to de-duplicate your webhooks – that is, make sure you’re not processing the same event twice.</p>
<p>However, this doesn’t help here.</p>
<p>Even though the handler was de-duplicating events, the second event still overwrote the information from the first.</p>
<p>To demonstrate the difference between the two methods, I’ve put together a small fixture in Python and Postgres. The two methods both de-duplicate events, and both process the database transactionally – the only difference is that the second one checks whether the contact revision in the incoming event is newer before it updates the CRM.</p>
<p><em>Note: this isn’t based on a real incident, or a real CRM – all records used here are synthetic.</em></p>
<h2>Two different identities, two different guarantees</h2>
<p>We’re modelling a scenario where an external data provider periodically sends complete snapshots of a set of data fields for each contact (in this case, <code>company</code>, <code>job_title</code> and <code>lead_status</code>). Each event contains a tenant ID, the name of the provider, a unique event ID, and the ID of the contact to which the data applies. The data from the event also includes a revision from the source.</p>
<p>We’re using Postgres and have two tables of interest:</p>
<ul>
<li><code>inbound_events</code>, with <code>PRIMARY KEY (tenant_id, provider, event_id)</code>, to answer “have we seen this event before?”</li>
<li><code>crm_contacts</code>, with <code>PRIMARY KEY (tenant_id, provider, contact_id)</code>, to store the latest accepted snapshot for each contact.</li>
</ul>
<p>The primary key on the first table lets us quickly determine whether we’ve seen an event before; the primary key on the second lets us find the contact the event concerns. But we also need a way to determine whether the snapshot in the event is more recent than what we have stored.</p>
<p>For this experiment, we’re assuming that the revision field contains a monotonically increasing integer, which we can trust to accurately reflect recency of the data from the provider. The provider might skip revisions, but if it sends us revision 10 and then revision 12, we know 12 represents the more recent state of the data in the source.</p>
<table>
<thead>
<tr>
<th>Arrival order</th>
<th>Event ID</th>
<th>Source revision</th>
<th>Job title</th>
<th>Lead status</th>
</tr>
</thead>
<tbody>
<tr>
<td>First</td>
<td><code>e10</code></td>
<td>10</td>
<td>Analyst</td>
<td>new</td>
</tr>
<tr>
<td>Second</td>
<td><code>e12</code></td>
<td>12</td>
<td>Director</td>
<td>customer</td>
</tr>
<tr>
<td>Third</td>
<td><code>e11</code></td>
<td>11</td>
<td>Manager</td>
<td>qualified</td>
</tr>
</tbody>
</table>
<p>Each event has a unique ID, so it represents a legitimate event to record. But when we receive <code>e11</code>, we already have revision 12 for the contact, so it would be incorrect to replace the existing data with the new (actually, older) data.</p>
<h2>First, make deduplication work correctly</h2>
<p>The following SQL is run in both cases to claim an event:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">INSERT</span><span class="w"> </span><span class="k">INTO</span><span class="w"> </span><span class="n">inbound_events</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="p">(</span><span class="n">tenant_id</span><span class="p">,</span><span class="w"> </span><span class="n">provider</span><span class="p">,</span><span class="w"> </span><span class="n">event_id</span><span class="p">,</span><span class="w"> </span><span class="n">contact_id</span><span class="p">,</span><span class="w"> </span><span class="n">source_revision</span><span class="p">,</span><span class="w"> </span><span class="n">snapshot</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">VALUES</span><span class="w"> </span><span class="p">(</span><span class="o">%</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="o">%</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="o">%</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="o">%</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="o">%</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="o">%</span><span class="n">s</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">ON</span><span class="w"> </span><span class="n">CONFLICT</span><span class="w"> </span><span class="p">(</span><span class="n">tenant_id</span><span class="p">,</span><span class="w"> </span><span class="n">provider</span><span class="p">,</span><span class="w"> </span><span class="n">event_id</span><span class="p">)</span><span class="w"> </span><span class="k">DO</span><span class="w"> </span><span class="k">NOTHING</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="n">RETURNING</span><span class="w"> </span><span class="n">event_id</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>That SQL relies on the table’s primary key to prevent it from creating a new row. If the <code>RETURNING</code> clause yields no results, the existing event is read from the database and the contact ID, revision and snapshot are compared. The SQL includes <code>%s</code> placeholder strings, which are filled in by the psycopg driver.</p>
<p>That detail matters when two workers receive the same event concurrently. A unique-key conflict can force one worker to wait for the other’s transaction. After that wait, the handler reads the existing event in a separate statement rather than relying on an earlier statement snapshot.</p>
<p>PostgreSQL’s <a href="https://www.postgresql.org/docs/17/transaction-iso.html" target="_blank" rel="noopener noreferrer">transaction isolation documentation</a> explains why statement snapshots matter in this situation.</p>
<p>The important point is that the control implementation already has working deduplication. The comparison doesn’t depend on deliberately removing that protection.</p>
<h2>The control: every new event updates the CRM</h2>
<p>The control handler receives each new versioned event and unconditionally UPSERTs the contact. This is the <code>ON CONFLICT</code> part of its contact <code>INSERT</code> statement:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">ON</span><span class="w"> </span><span class="n">CONFLICT</span><span class="w"> </span><span class="p">(</span><span class="n">tenant_id</span><span class="p">,</span><span class="w"> </span><span class="n">provider</span><span class="p">,</span><span class="w"> </span><span class="n">contact_id</span><span class="p">)</span><span class="w"> </span><span class="k">DO</span><span class="w"> </span><span class="k">UPDATE</span><span class="w"> </span><span class="k">SET</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">source_revision</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">EXCLUDED</span><span class="p">.</span><span class="n">source_revision</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">company</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">EXCLUDED</span><span class="p">.</span><span class="n">company</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">job_title</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">EXCLUDED</span><span class="p">.</span><span class="n">job_title</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">lead_status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">EXCLUDED</span><span class="p">.</span><span class="n">lead_status</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">last_applied_event</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">EXCLUDED</span><span class="p">.</span><span class="n">last_applied_event</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">application_count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">crm_contacts</span><span class="p">.</span><span class="n">application_count</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">updated_at</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">clock_timestamp</span><span class="p">()</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="n">RETURNING</span><span class="w"> </span><span class="n">source_revision</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>This works fine as long as the events are applied in source revision order, but what happens when they’re not? Let’s modify the test to insert events out of order, starting again with an empty database but this time inserting <code>e10</code>, <code>e12</code>, then <code>e11</code>. After <code>e12</code>, the contact is at revision 12 and has ExampleCo-12 / Director / customer from the enrichment store. When <code>e11</code> arrives, the control contact handler accepts the event (it has a new event ID) and applies the UPSERT. The result?</p>
<table>
<thead>
<tr>
<th>Contact state after <code>e11</code></th>
<th>Control handler</th>
</tr>
</thead>
<tbody>
<tr>
<td>Source revision</td>
<td><strong>11</strong></td>
</tr>
<tr>
<td>Company</td>
<td>ExampleCo-11</td>
</tr>
<tr>
<td>Job title</td>
<td>Manager</td>
</tr>
<tr>
<td>Lead status</td>
<td>qualified</td>
</tr>
<tr>
<td>Last applied event</td>
<td><code>e11</code></td>
</tr>
<tr>
<td>Application count</td>
<td>3</td>
</tr>
<tr>
<td>Event outcome</td>
<td>applied</td>
</tr>
</tbody>
</table>
<p><strong>Uh oh!</strong> The source revision has gone backwards from 12 to 11.</p>
<p>Nothing failed at the database level. The event had a valid identity, the transaction committed and the handler did exactly what its SQL instructed.</p>
<p>Yet, somehow the data in the CRM system was older than it had been the last time delivery had occurred.</p>
<p>The issue here is that while the uniqueness of the event tells us whether we’ve seen it before, it doesn’t tell a handler which order to apply updates to an entity in.</p>
<p>In order to fix this, it is necessary to ensure that an update only ever applies if the revision it represents is newer than the one currently held. The corrected code looks like this:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-2" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">ON</span><span class="w"> </span><span class="n">CONFLICT</span><span class="w"> </span><span class="p">(</span><span class="n">tenant_id</span><span class="p">,</span><span class="w"> </span><span class="n">provider</span><span class="p">,</span><span class="w"> </span><span class="n">contact_id</span><span class="p">)</span><span class="w"> </span><span class="k">DO</span><span class="w"> </span><span class="k">UPDATE</span><span class="w"> </span><span class="k">SET</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">source_revision</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">EXCLUDED</span><span class="p">.</span><span class="n">source_revision</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">company</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">EXCLUDED</span><span class="p">.</span><span class="n">company</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">job_title</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">EXCLUDED</span><span class="p">.</span><span class="n">job_title</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">lead_status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">EXCLUDED</span><span class="p">.</span><span class="n">lead_status</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">last_applied_event</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">EXCLUDED</span><span class="p">.</span><span class="n">last_applied_event</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">application_count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">crm_contacts</span><span class="p">.</span><span class="n">application_count</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">updated_at</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">clock_timestamp</span><span class="p">()</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">WHERE</span><span class="w"> </span><span class="n">EXCLUDED</span><span class="p">.</span><span class="n">source_revision</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="n">crm_contacts</span><span class="p">.</span><span class="n">source_revision</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="n">RETURNING</span><span class="w"> </span><span class="n">source_revision</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p><code>EXCLUDED.source_revision</code> is the revision proposed by the incoming event. <code>crm_contacts.source_revision</code> is the revision already stored.</p>
<p>If the incoming revision is higher, PostgreSQL applies the update.</p>
<p>If it’s equal or lower, the existing row isn’t updated. The handler can then inspect the current contact and event history to classify what happened.</p>
<p>Running the same sequence against this implementation produced a different outcome:</p>
<table>
<thead>
<tr>
<th>Contact state after <code>e11</code></th>
<th>Unconditional control</th>
<th>Revision-aware handler</th>
</tr>
</thead>
<tbody>
<tr>
<td>Source revision</td>
<td><strong>11</strong></td>
<td><strong>12</strong></td>
</tr>
<tr>
<td>Company</td>
<td>ExampleCo-11</td>
<td>ExampleCo-12</td>
</tr>
<tr>
<td>Job title</td>
<td>Manager</td>
<td>Director</td>
</tr>
<tr>
<td>Lead status</td>
<td>qualified</td>
<td>customer</td>
</tr>
<tr>
<td>Last applied event</td>
<td><code>e11</code></td>
<td><code>e12</code></td>
</tr>
<tr>
<td>Application count</td>
<td>3</td>
<td>2</td>
</tr>
<tr>
<td><code>e11</code> outcome</td>
<td>applied</td>
<td>stale</td>
</tr>
</tbody>
</table>
<p>Even though the event handler code was fixed to avoid replacing revision 12 with the older inbound event <code>e11</code>, it still attempted to apply <code>e11</code> to the contact. However, since it didn’t succeed in replacing the contact revision, the contact’s application count, last applied event and <code>updated_at</code> timestamp were not affected.</p>
<p>The above state is the contact right after the first delayed event. It isn’t where the test ends. The test then applies yet another event with a different ID and the same old snapshot, <code>e11-identical</code>. The control applies that too, so it finishes at revision 11 with an application count of 4. The revision-aware handler records it as stale, so it stays at revision 12 with a count of 2.</p>
<h2>What would happen if the workers were racing?</h2>
<p>Although the above test scenario was useful for pinpointing the problem, in a real application, the webhooks would likely be processed by multiple workers concurrently.</p>
<p>It’s possible to do the revision comparison in the application code (Python), but then one has to be careful about the stored revision changing between reading it and sending the update to PostgreSQL.</p>
<p>The test fixture avoids this problem by performing the revision comparison in the database in the contact UPSERT statement. It tests the concurrent execution of event handlers by connecting to the database with different connections.</p>
<p>The test starts with a contact at revision 10:</p>
<ol>
<li>Worker A updates the contact to revision 12, then pauses <strong>after</strong> the contact UPSERT and <strong>before</strong> committing its transaction.</li>
<li>Worker B tries to apply another event with revision 11 to the same contact.</li>
<li>A third database connection observes what’s happening.</li>
</ol>
<p>Instead of assuming that the workers are contending with each other, the test inspects the Postgres activity and lock information to see what’s going on:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-3" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SELECT</span><span class="w"> </span><span class="n">pid</span><span class="p">,</span><span class="w"> </span><span class="n">application_name</span><span class="p">,</span><span class="w"> </span><span class="k">state</span><span class="p">,</span><span class="w"> </span><span class="n">wait_event_type</span><span class="p">,</span><span class="w"> </span><span class="n">wait_event</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">pg_blocking_pids</span><span class="p">(</span><span class="n">pid</span><span class="p">)</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="n">blocking_pids</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">FROM</span><span class="w"> </span><span class="n">pg_stat_activity</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">WHERE</span><span class="w"> </span><span class="n">pid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">ANY</span><span class="p">(</span><span class="o">%</span><span class="n">s</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">ORDER</span><span class="w"> </span><span class="k">BY</span><span class="w"> </span><span class="n">pid</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>The test also inspects <code>pg_locks</code> to see the corresponding transaction-ID locks.</p>
<p>Both times the test was run, it observed that one of the workers was indeed blocked by the other:</p>
<table>
<thead>
<tr>
<th>Observation</th>
<th>Repetition 1</th>
<th>Repetition 2</th>
</tr>
</thead>
<tbody>
<tr>
<td>Waiting worker’s event</td>
<td><code>Lock / transactionid</code></td>
<td><code>Lock / transactionid</code></td>
</tr>
<tr>
<td><code>pg_blocking_pids()</code></td>
<td>Identified the revision 12 worker</td>
<td>Identified the revision 12 worker</td>
</tr>
<tr>
<td>Transaction-ID locks</td>
<td>Leader <code>ExclusiveLock</code> granted; follower <code>ShareLock</code> waiting</td>
<td>Leader <code>ExclusiveLock</code> granted; follower <code>ShareLock</code> waiting</td>
</tr>
<tr>
<td>Final contact revision</td>
<td><strong>12</strong></td>
<td><strong>12</strong></td>
</tr>
</tbody>
</table>
<p>In both runs, the revision 12 worker held a granted transaction-ID <code>ExclusiveLock</code>, while the other worker waited with an ungranted <code>ShareLock</code> on that transaction ID.</p>
<p>Once the revision 12 transaction committed, the waiting worker completed. Its revision 11 event was classified as stale.</p>
<p>The contact stayed at revision 12.</p>
<p>It was interesting to see that even though the stale UPSERT didn’t actually do anything, it still had to wait. The <a href="https://www.postgresql.org/docs/17/sql-insert.html" target="_blank" rel="noopener noreferrer">Postgres docs for <code>INSERT ... ON CONFLICT</code></a> explain that the conflicting row is locked before the update’s <code>WHERE</code> condition is evaluated, so there’s still some lock contention even if the conditional update is rejected.</p>
<p>It may seem pedantic, but it’s important to remember that the revision guard protects the state of the contact under the conditions tested. It doesn’t make concurrent updates free of locking.</p>
<p><em>Note: this was not intended as a benchmark, just something to work out if one worker would block the other and what state they were committed in.</em></p>
<h2>Rollbacks, retries and contradictory revisions</h2>
<p>Now, with the corrected handler:</p>
<p>What happened? Well, in the tests, after the UPSERT for the contact, but before the commit, an exception was injected. Due to the ACID properties of Postgres, that rolled back both the inbound event record and the mutation of the contact.</p>
<p>From an outside observer’s perspective, the contact was still the original one that had been committed. But when the event was retried, it was only applied once.</p>
<p>There was another test that checked what happened when an exception was thrown after the commit. In this case, the caller didn’t receive acknowledgement of the event.</p>
<p>In the database, the event had already been committed, and the contact had been created or updated. So, when the event was sent again, the contact wasn’t changed.</p>
<p>There’s a difference between throwing an exception before the commit and after the commit.</p>
<p>There is also a problem with two revisions from the same source being equal.</p>
<p>Two events with different event IDs that refer to the same revision of a contact may contain either (a) the same contact snapshot, in which case the second event is redundant (if it is for the current revision of the contact) or stale (if the contact has been revised further) unless it contradicts the retained revision history, or (b) different contact snapshots, in which case the two events present contradictory revision history from the provider.</p>
<p>The handler records a <code>revision_conflict</code> in the latter case and retains the previously accepted contact. It also checks for this when a contact is at a later revision but the events are retained in history. This way, it’s possible to identify when a provider contradicts itself at an older revision, even if the contact has moved on.</p>
<p>It does not, however, determine which of the two conflicting payloads is the true one – it’s a fixture to detect conflicts, not to resolve them.</p>
<p>There are tests for a few more things, including concurrent claims for the same event ID (and transaction rollback when that occurs), ensuring that events from different tenants or different providers don’t affect each other, handling of explicit null values when supplied in a complete snapshot, and handling of events that don’t provide a trustworthy revision.</p>
<p>The latter point is important: when an event is provided with no revision, the handler needs to record that it was seen but not alter the contact. It can’t assume that the event is newer or older than the existing contact merely because it’s arriving now.</p>
<h2>Reproducing the experiment</h2>
<p>The complete fixture can be found in a <a href="https://github.com/yananai-chiwuta/percona-crm-correctness" target="_blank" rel="noopener noreferrer">public repository</a>: <strong>PostgreSQL CRM correctness under duplicate and out-of-order events</strong>.</p>
<p>The <a href="https://github.com/yananai-chiwuta/percona-crm-correctness/tree/de00349697255cd4fd7e5b9d578c6a8eaf065478" target="_blank" rel="noopener noreferrer">exact tested release commit is <code>de003496</code></a>.</p>
<p>The repository contains a Python handler, PostgreSQL schema, tests, pinned dependencies and a GitHub Actions workflow. It doesn’t include anything that would expose the handler as an HTTP endpoint for webhooks, or talk to a real CRM. It simulates the functions and database that are part of the fixture.</p>
<p>The fixture uses GitHub-hosted runners with temporary service containers for PostgreSQL, so there is no need to install it on a local machine.</p>
<p>It runs under the following environment:</p>
<table>
<thead>
<tr>
<th>Component</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>PostgreSQL server</td>
<td>17.11</td>
</tr>
<tr>
<td>Python</td>
<td>3.12.15</td>
</tr>
<tr>
<td>psycopg</td>
<td>3.3.6</td>
</tr>
<tr>
<td>pytest</td>
<td>9.1.1</td>
</tr>
<tr>
<td>Transaction isolation</td>
<td>READ COMMITTED</td>
</tr>
</tbody>
</table>
<p>A <a href="https://github.com/yananai-chiwuta/percona-crm-correctness/actions/runs/38649001953" target="_blank" rel="noopener noreferrer">verified run on GitHub Actions</a> executes two independent repetitions against fresh instances of the temporary PostgreSQL service.</p>
<table>
<thead>
<tr>
<th>Result</th>
<th>Repetition 1</th>
<th>Repetition 2</th>
</tr>
</thead>
<tbody>
<tr>
<td>Tests passed</td>
<td><strong>85</strong></td>
<td><strong>85</strong></td>
</tr>
<tr>
<td>Failures, errors or skips</td>
<td>0</td>
<td>0</td>
</tr>
<tr>
<td>Observed blocking cases</td>
<td>26</td>
<td>26</td>
</tr>
</tbody>
</table>
<p>If you want to try to falsify this yourself and prove that it isn’t correct, you can re-run the experiment by forking this repo, turning on GitHub Actions in your fork, and manually running the <strong>CRM correctness experiment</strong> workflow, ensuring all four jobs complete successfully on the same commit (two each for PostgreSQL 17.11 and Percona Distribution for PostgreSQL 18). The jobs create some evidence which you can download, but it won’t be around for very long, so I’ve also attached the evidence from both runs to the <a href="https://github.com/yananai-chiwuta/percona-crm-correctness/releases/tag/v1.1.0" target="_blank" rel="noopener noreferrer">v1.1.0 release</a> along with checksums. The important bits from the evidence are what you see here, and also in the repo’s README.</p>
<p><em>Note: there was one tricky bit that required a bit of work while developing this. One of the earlier runs failed because the observation query was trying to sort on the Postgres transaction ID directly. That doesn’t work. But since the transaction ID was just used for sorting the results for display in the evidence, casting it to text was sufficient without changing anything about the processing or the assertions.</em></p>
<p>The results you see above were run after making that change.</p>
<h3>Running it on Percona Distribution for PostgreSQL 18</h3>
<p>I also ran the same tests against Percona Distribution for PostgreSQL 18.6.1, using the <code>percona/percona-distribution-postgresql:18.6.1-3</code> image (pinned by digest in the workflow). This was run twice as well, on fresh instances, against commit <a href="https://github.com/yananai-chiwuta/percona-crm-correctness/tree/648beac9e5b3dae6e77b9a172c6604693dae5161" target="_blank" rel="noopener noreferrer"><code>648beac</code></a> (<a href="https://github.com/yananai-chiwuta/percona-crm-correctness/actions/runs/38931356745" target="_blank" rel="noopener noreferrer">run 38931356745</a>).</p>
<table>
<thead>
<tr>
<th>Result</th>
<th>Repetition 1</th>
<th>Repetition 2</th>
</tr>
</thead>
<tbody>
<tr>
<td>Tests passed</td>
<td><strong>85</strong></td>
<td><strong>85</strong></td>
</tr>
<tr>
<td>Failures, errors or skips</td>
<td>0</td>
<td>0</td>
</tr>
<tr>
<td>Observed blocking cases</td>
<td>26</td>
<td>26</td>
</tr>
</tbody>
</table>
<p>The outcome was the same as on 17.11. The control still went back to revision 11, the revision-aware handler stayed at revision 12, and the waiting worker was blocked by the revision 12 worker before it came back as stale.</p>
<h2>What this experiment does not prove</h2>
<p>The revision guard depends on the contract on the events, namely:</p>
<ul>
<li><strong>The source provides revisions in a correct order.</strong> The revision must come from something that can correctly and reliably order the updates to a given contact. Merely comparing two integers does not inherently establish which of two pieces of information is more recent.</li>
<li><strong>The snapshots provided in the events contain all the fields enriched by the source.</strong> If the source provides three fields, every accepted event must contain those three fields. If one of those fields should be cleared, the source must provide a value of null for that field. This doesn’t handle the case where different sources are providing partial snapshots that need to be merged.</li>
<li><strong>Revision conflicts are detected, not reconciled.</strong> While the handler can detect when two snapshots with the same revision contain different information, and can ensure that a previously accepted snapshot is preserved, it has no way of determining which of the two payloads is correct.</li>
<li><strong>An external CRM isn’t part of the PostgreSQL transaction.</strong> This experiment uses Postgres as the store for the contact information, which allows the handler to atomically commit the event and update the contact. If the update needed to be sent to an external API, the local PostgreSQL transaction alone couldn’t ensure that both operations happened atomically.</li>
<li><strong>This doesn’t establish production correctness.</strong> These tests only test a few specific sequences of event delivery. They don’t prove that this approach is correct in all cases, that it will scale in a production environment, that it can handle all possible deadlocks, or that it will recover from all possible infrastructure problems.</li>
</ul>
<h2>Conclusion</h2>
<p>What went wrong? By applying an old event that was provided with a new ID to our duplicate-safe event handler, we created a situation where Postgres was happy to apply the transaction and still maintain a consistent event history according to our event handler rules. This allowed an old event to overwrite our CRM contact, reverting it from revision 12 back to revision 11.</p>
<p>By adding a condition to our UPSERT to only apply the contact update if the event’s source revision is strictly higher than the one we already have, we can prevent this regression in all of the above scenarios. Interestingly, the concurrent scenarios still result in Postgres waiting on another transaction before returning.</p>
<p>This simple experiment illustrates two key questions we need to answer for an API-to-CRM workflow:</p>
<p><strong>Have we processed this event before?</strong> – enforced by the event ID constraint.</p>
<p><strong>Are we sure that this event contains newer information than what we already have?</strong> – enforced by trusting the ordering contract and only updating the CRM record if it is at a higher revision.</p>
<p>This experiment was built to illustrate the above point.</p>
<h2>References and tools</h2>
<ul>
<li><a href="https://github.com/yananai-chiwuta/percona-crm-correctness" target="_blank" rel="noopener noreferrer">Companion code and tests</a></li>
<li><a href="https://github.com/yananai-chiwuta/percona-crm-correctness/actions/runs/38649001953" target="_blank" rel="noopener noreferrer">Verified run on GitHub Actions</a></li>
<li><a href="https://www.postgresql.org/docs/17/sql-insert.html" target="_blank" rel="noopener noreferrer">PostgreSQL 17: <code>INSERT</code> and <code>ON CONFLICT</code></a></li>
<li><a href="https://www.postgresql.org/docs/17/transaction-iso.html" target="_blank" rel="noopener noreferrer">PostgreSQL 17: Transaction Isolation</a></li>
<li><a href="https://github.com/yananai-chiwuta/percona-crm-correctness/actions/runs/38931356745" target="_blank" rel="noopener noreferrer">Verified run on GitHub Actions (Percona Distribution for PostgreSQL 18)</a></li>
<li><a href="https://github.com/yananai-chiwuta/percona-crm-correctness/releases/tag/v1.1.0" target="_blank" rel="noopener noreferrer">Evidence and checksums (v1.1.0 release)</a></li>
<li><a href="https://docs.percona.com/postgresql/18/docker/docker.html" target="_blank" rel="noopener noreferrer">Percona Distribution for PostgreSQL 18: Docker</a></li>
</ul>
<p><em>Methodology note: this is a synthetic experiment developed with the assistance of AI and verified through GitHub Actions runs.</em></p>
<p><a href="https://percona.community/blog/2026/11/04/webhook-deduplication-isnt-enough/">Why Webhook Deduplication Isn&#8217;t Enough</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Deploying MariaDB and WordPress on Kamatera</title>
        <link>https://mariadb.org/deploying-mariadb-and-wordpress-on-kamatera/</link>
        <pubDate>Tue, 03 Nov 2026 16:54:58 +0000</pubDate>
        <dc:creator>Frédéric Descamps</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/deploying-mariadb-and-wordpress-on-kamatera/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>When deploying MariaDB in the cloud, controlling the infrastructure can be as important as controlling the database itself. Plenty of cloud providers offer their own approaches to virtual machines, networking, storage, and managed services. One of them is Kamatera, a global cloud infrastructure provider that recently joined the MariaDB Foundation as a Silver Sponsor. Kamatera […]<br />
Deploying MariaDB and WordPress on Kamatera appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/deploying-mariadb-and-wordpress-on-kamatera/">Deploying MariaDB and WordPress on Kamatera</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>When deploying MariaDB in the cloud, controlling the infrastructure can be as important as controlling the database itself. Plenty of cloud providers offer their own approaches to virtual machines, networking, storage, and managed services. One of them is Kamatera, a global cloud infrastructure provider that recently joined the MariaDB Foundation as a Silver Sponsor. Kamatera […]</p>
<p><a href="https://mariadb.org/deploying-mariadb-and-wordpress-on-kamatera/">Deploying MariaDB and WordPress on Kamatera</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/deploying-mariadb-and-wordpress-on-kamatera/">Deploying MariaDB and WordPress on Kamatera</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>luroConnect joins MariaDB Foundation as a Silver Sponsor</title>
        <link>https://mariadb.org/luroconnect-joins-mariadb-foundation-as-a-silver-sponsor/</link>
        <pubDate>Tue, 03 Nov 2026 15:54:44 +0000</pubDate>
        <dc:creator>Anna Widenius</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/luroconnect-joins-mariadb-foundation-as-a-silver-sponsor/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB Foundation is pleased to welcome luroConnect as a Silver Sponsor, bringing practical experience in running MariaDB for Magento and Adobe Commerce merchants to our sponsor community. luroConnect provides managed cloud hosting for eCommerce, with 24/7 application-aware support, deployed into customers’ own AWS or GCP accounts. Its team runs MariaDB in production for eCommerce stores […]<br />
luroConnect joins MariaDB Foundation as a Silver Sponsor appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/luroconnect-joins-mariadb-foundation-as-a-silver-sponsor/">luroConnect joins MariaDB Foundation as a Silver Sponsor</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Foundation is pleased to welcome luroConnect as a Silver Sponsor, bringing practical experience in running MariaDB for Magento and Adobe Commerce merchants to our sponsor community. luroConnect provides managed cloud hosting for eCommerce, with 24/7 application-aware support, deployed into customers’ own AWS or GCP accounts. Its team runs MariaDB in production for eCommerce stores […]</p>
<p><a href="https://mariadb.org/luroconnect-joins-mariadb-foundation-as-a-silver-sponsor/">luroConnect joins MariaDB Foundation as a Silver Sponsor</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/luroconnect-joins-mariadb-foundation-as-a-silver-sponsor/">luroConnect joins MariaDB Foundation as a Silver Sponsor</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>The MariaDB Plugin API has Doxygen Documentation Now!</title>
        <link>https://mariadb.org/the-mariadb-plugin-api-has-doxygen-documentation-now/</link>
        <pubDate>Tue, 03 Nov 2026 11:44:01 +0000</pubDate>
        <dc:creator>Georgi Kodinov</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/the-mariadb-plugin-api-has-doxygen-documentation-now/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Developing plugins is one of the ways we really encourage to extend MariaDB Server’s capabilities. However, understanding the available APIs has often required developers to explore header files, source code, and existing plugin implementations.To make this easier, we now have a new, Doxygen-generated MariaDB Server Plugin API reference, available directly in the MariaDB documentation.If you’ve […]<br />
The MariaDB Plugin API has Doxygen Documentation Now! appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/the-mariadb-plugin-api-has-doxygen-documentation-now/">The MariaDB Plugin API has Doxygen Documentation Now!</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Developing plugins is one of the ways we really encourage to extend MariaDB Server’s capabilities. However, understanding the available APIs has often required developers to explore header files, source code, and existing plugin implementations.To make this easier, we now have a new, Doxygen-generated MariaDB Server Plugin API reference, available directly in the MariaDB documentation.If you’ve […]</p>
<p><a href="https://mariadb.org/the-mariadb-plugin-api-has-doxygen-documentation-now/">The MariaDB Plugin API has Doxygen Documentation Now!</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/the-mariadb-plugin-api-has-doxygen-documentation-now/">The MariaDB Plugin API has Doxygen Documentation Now!</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>A New KMIP Library in C++, and the Only Free One</title>
        <link>https://percona.community/blog/2026/11/03/kmipclient-new-kmip-library-in-cpp/</link>
        <pubDate>Tue, 03 Nov 2026 09:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/a-new-kmip-library-in-c-and-the-only-free-one/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>Percona has open sourced kmipclient, a new KMIP library in C++ for applications that need to talk to a key management system over a standard protocol instead of a single vendor’s proprietary API.</p>
<p><a href="https://percona.community/blog/2026/11/03/kmipclient-new-kmip-library-in-cpp/">A New KMIP Library in C++, and the Only Free One</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Percona has open sourced <code>kmipclient</code>, a new KMIP library in C++ for applications that need to talk to a key management system over a standard protocol instead of a single vendor’s proprietary API.</p>
<p>Encryption is one of the fundamental tools for protecting sensitive data. But encryption is only part of the problem. The keys that unlock that data need to be protected separately from the data itself.</p>
<p>If an attacker gets access to both the encrypted data and the keys required to decrypt it, encryption does not buy much. That is a bit like taping your house key to the front door: the lock is real, but it is not doing much work. Keeping keys under their own administrative and security boundary also makes key rotation, access control, auditing, and revocation easier to manage.</p>
<p>This is why dedicated <strong>key management systems (KMS)</strong> exist. A KMS keeps cryptographic keys in a separate security domain and gives applications controlled access to them, so an application can store encrypted data while the keys stay under the control of the key management infrastructure.</p>
<p>There is another problem, though: different KMS products expose different APIs.</p>
<p>The <strong>Key Management Interoperability Protocol (KMIP)</strong> addresses that by defining a standard protocol for communication between applications and key management systems. KMIP is developed by the <a href="https://www.oasis-open.org/committees/kmip/" target="_blank" rel="noopener noreferrer">KMIP Technical Committee at OASIS</a> (the Organization for the Advancement of Structured Information Standards), which publishes the KMIP specifications, profiles, and test cases. The protocol has evolved through several versions, from KMIP 1.0 through 1.4 and the 2.x series, with <a href="https://docs.oasis-open.org/kmip/kmip-spec/v3.0/kmip-spec-v3.0.html" target="_blank" rel="noopener noreferrer">KMIP 3.0 now in development</a>.</p>
<p>Several open source KMIP implementations already exist, in Python, Go, and C. We searched extensively and found none of them native C++: <code>libkmip</code> itself is a C library, and the handful of C++-adjacent projects out there are either proprietary SDKs or early-stage work with no C++ bindings yet. What was missing was a modern, freely available native C++ implementation with a clean API, current KMIP support, and an architecture that would make further development reasonably painless.</p>
<p>So we built one. <code>kmipclient</code> is built on top of its own protocol library, <code>kmipcore</code>, and tested against five independent KMIP-capable servers.</p>
<h2>Why build a new KMIP library in C++</h2>
<p>At the time, Percona was already maintaining and extending an existing KMIP implementation: a fork of <code>libkmip</code>, a C library, wrapped in a thin C++ layer called <code>kmippp</code>. (The old code is still there, on the <a href="https://github.com/percona/kmipclient/tree/legacy-libkmip" target="_blank" rel="noopener noreferrer"><code>legacy-libkmip</code> branch</a>, for anyone curious about the starting point.) It worked, but extending it was not much fun.</p>
<p>The problem was not that KMIP is difficult to implement. The problem was the shape of the C data model. <code>libkmip</code> allocates and frees every request and response type through its own dedicated pair of functions, so adding one KMIP operation means writing a new alloc function, a new free function, and a new parse function, then wiring all three into a C++ wrapper on top. Every small feature turned into a little archaeology dig: find the right allocator, find its matching free function, and hope you freed the thing you actually allocated. The specification implementation was minimal, and even a small addition was expensive to make correctly.</p>
<p>Adding support for the KMIP <strong>Activate</strong> and <strong>Deactivate</strong> operations was a good example. The work meant reading the specification, adding the missing functionality to <code>libkmip</code>, and then adding a matching wrapper in <code>kmippp</code>. Three layers, for one operation.</p>
<p>That was the point where it became clear: this was costing more in support and development than it should.</p>
<p>What was needed was simple to describe: code that was easier to understand, maintain, test, and extend, without fighting the architecture at every step. So a small weekend project started, not to replace the existing implementation immediately, but to see what a clean, maintainable, extensible native C++ KMIP implementation could look like.</p>
<p>The weekend project grew.</p>
<h2>Splitting the protocol from the client</h2>
<p>One of the early decisions was to separate the <strong>KMIP protocol</strong> from the <strong>client</strong> that talks to a server.</p>
<p><code>kmipcore</code> is the protocol library. It holds the KMIP data model, the objects, requests and responses, and the TTLV (Tag-Type-Length-Value) serialization and parsing that KMIP uses on the wire. It has no networking code at all.</p>
<p><code>kmipclient</code> is the client library built on top of <code>kmipcore</code>. It provides the higher-level API applications use, handles the communication layer, and adds features such as a thread-safe connection pool.</p>
<p>Networking and logging are both dependency injection points rather than fixed choices. Networking is abstracted behind a replaceable <code>NetClient</code> interface, with an OpenSSL-based implementation provided out of the box. Logging follows the same pattern: a <code>Logger</code> interface emits structured records that an application can route into its own logging sink instead of one bolted on by the library. Either way, an application can plug <code>kmipclient</code> into networking and logging infrastructure it already runs, rather than standing up a parallel one just for this library.</p>
<p>This separation turned out to matter more than expected. <code>kmipcore</code> can be tested on its own, with no KMS and no network connection involved. <code>kmipclient</code> can then concentrate on the practical problems of talking to a real server. And because <code>kmipcore</code> represents the KMIP protocol itself rather than any one client’s needs, the same library could also become the foundation for a KMIP server implementation later.</p>
<p>The diagram below shows what that split replaced. The old stack needed three layers in C and C++ to reach <code>component_keyring_kmip</code>, Percona Server for MySQL’s keyring component for KMIP. The new stack needs one: <code>kmipcore</code>, with <code>kmipclient</code> sitting on top of it.</p>
<p><figure><img decoding="async" src="https://percona.community/blog/2026/11/kmipclient-architecture-old-vs-new.svg" alt="Old C stack (libkmip, kmip_bio, kmippp, three layers) versus new C++ stack (kmipcore, kmipclient, one layer) feeding into Percona Server for MySQL’s component_keyring_kmip"></figure>
</p>
<p><em>Old stack on the left, new stack on the right. <code>kmipcore</code> is where new KMIP operations actually get implemented.</em></p>
<p>A separate <code>utils</code> module, still in progress, is growing alongside the two libraries to hold key and X.509 certificate handling and other shared helpers that do not belong in either the protocol or the client layer.</p>
<p>The first time a new operation took an afternoon instead of a week, the split already felt worth it.</p>
<h2>The specification comes first</h2>
<p>KMIP is a fairly large and detailed protocol, and interoperability depends on implementing what the specification says, not just what happens to work against one particular server.</p>
<p>The <a href="https://www.oasis-open.org/committees/kmip/" target="_blank" rel="noopener noreferrer">KMIP specification</a> was the primary source of truth throughout the project. <code>kmipclient</code> supports <a href="https://docs.oasis-open.org/kmip/spec/v1.4/kmip-spec-v1.4.html" target="_blank" rel="noopener noreferrer">KMIP 1.4</a> and <a href="https://docs.oasis-open.org/kmip/kmip-spec/v2.0/kmip-spec-v2.0.html" target="_blank" rel="noopener noreferrer">KMIP 2.0</a>, including protocol negotiation, while still letting an application select a protocol version explicitly when it needs to.</p>
<p>Real KMS implementations are useful for testing, but interoperability testing validates a specification-based implementation. It is not a replacement for reading the specification. A server accepting what you send does not prove that what you sent was correct according to KMIP, only that this particular server tolerated it.</p>
<h2>Designed to be extended</h2>
<p>Fully implementing the KMIP specification is a project of its own, and that was never the near-term goal. The practical goal was narrower: implement what is needed today, while keeping the cost of implementing the next piece of the specification as low as possible.</p>
<p>This is where the split between protocol and client pays off. KMIP objects and operations map directly to C++ types, and adding a new operation mostly means implementing the corresponding protocol objects in <code>kmipcore</code>, rather than touching several layers of an older C implementation and a separate C++ wrapper on top of it.</p>
<p>The top-level API is aimed at engineers who care about the result, not the protocol or the cryptography underneath it: activate a key, fetch one, rotate one, without reading the KMIP specification or knowing what a wrapping algorithm is. The protocol details are still there underneath, for the few call sites that actually need them.</p>
<p>The library also supports batching multiple request and response items into a single exchange, which high-level operations use directly. <code>op_get_key()</code>, for example, sends a Get and a Get Attributes request as one batch and returns both the key material and its attributes from a single round trip:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">cpp</span><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-cpp" data-lang="cpp"><span class="line"><span class="cl"><span class="k">auto</span> <span class="n">key</span> <span class="o">=</span> <span class="n">client</span><span class="p">.</span><span class="n">op_get_key</span><span class="p">(</span><span class="n">id</span><span class="p">);</span>
</span></span><span class="line"><span class="cl"><span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="s">"Key: 0x"</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"><span class="n">print_hex</span><span class="p">(</span><span class="n">key</span><span class="o">-&gt;</span><span class="n">value</span><span class="p">());</span>
</span></span><span class="line"><span class="cl"><span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="s">"Attributes:"</span> <span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"><span class="k">for</span> <span class="p">(</span><span class="k">const</span> <span class="k">auto</span> <span class="o">&amp;</span><span class="p">[</span><span class="n">attr_name</span><span class="p">,</span> <span class="n">attr_value</span><span class="p">]</span> <span class="o">:</span>
</span></span><span class="line"><span class="cl"> <span class="n">key</span><span class="o">-&gt;</span><span class="n">attributes</span><span class="p">().</span><span class="n">as_string_map</span><span class="p">())</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="s">" "</span> <span class="o">&lt;&lt;</span> <span class="n">attr_name</span> <span class="o">&lt;&lt;</span> <span class="s">": "</span> <span class="o">&lt;&lt;</span> <span class="n">attr_value</span> <span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre>
</div>
</div>
</div>
<p><em>From <code>kmipclient/examples/example_get.cpp</code>.</em></p>
<p>High-level operations stay just as direct for simpler calls. Activating a key, for instance, is a single method call that returns the server-confirmed key ID or throws:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">cpp</span><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-cpp" data-lang="cpp"><span class="line"><span class="cl"><span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">KmipClient</span><span class="o">::</span><span class="n">op_activate</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="o">&amp;</span><span class="n">id</span><span class="p">)</span> <span class="k">const</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="k">auto</span> <span class="n">request</span> <span class="o">=</span> <span class="n">make_request_message</span><span class="p">();</span>
</span></span><span class="line"><span class="cl"> <span class="k">const</span> <span class="k">auto</span> <span class="n">batch_item_id</span> <span class="o">=</span>
</span></span><span class="line"><span class="cl"> <span class="n">request</span><span class="p">.</span><span class="n">add_batch_item</span><span class="p">(</span><span class="n">kmipcore</span><span class="o">::</span><span class="n">ActivateRequest</span><span class="p">(</span><span class="n">id</span><span class="p">));</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> <span class="n">kmipcore</span><span class="o">::</span><span class="n">secure_bytes</span> <span class="n">response_bytes</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="n">io</span><span class="o">-&gt;</span><span class="n">do_exchange</span><span class="p">(</span>
</span></span><span class="line"><span class="cl"> <span class="n">request</span><span class="p">.</span><span class="n">serialize</span><span class="p">(),</span> <span class="n">response_bytes</span><span class="p">,</span> <span class="n">request</span><span class="p">.</span><span class="n">getMaxResponseSize</span><span class="p">()</span>
</span></span><span class="line"><span class="cl"> <span class="p">);</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> <span class="n">kmipcore</span><span class="o">::</span><span class="n">ResponseParser</span> <span class="n">rf</span><span class="p">(</span><span class="n">response_bytes</span><span class="p">,</span> <span class="n">request</span><span class="p">);</span>
</span></span><span class="line"><span class="cl"> <span class="k">return</span> <span class="n">rf</span>
</span></span><span class="line"><span class="cl"> <span class="p">.</span><span class="n">getResponseByBatchItemId</span><span class="o">&lt;</span><span class="n">kmipcore</span><span class="o">::</span><span class="n">ActivateResponseBatchItem</span><span class="o">&gt;</span><span class="p">(</span>
</span></span><span class="line"><span class="cl"> <span class="n">batch_item_id</span>
</span></span><span class="line"><span class="cl"> <span class="p">)</span>
</span></span><span class="line"><span class="cl"> <span class="p">.</span><span class="n">getUniqueIdentifier</span><span class="p">();</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre>
</div>
</div>
</div>
<p><em>From <code>kmipclient/src/KmipClient.cpp</code>.</em></p>
<p>The library also provides lower-level protocol access for applications that need something more specialized than the high-level API covers.</p>
<h2>From a weekend project to production</h2>
<p>Testing turned the prototype into a library other teams could depend on.</p>
<p>The test suite has two layers. Unit tests exercise the protocol and data model on their own, including serialization, parsing, and specification-conformance checks. Integration tests then run against five independent KMIP server implementations: <a href="https://github.com/OpenKMIP/PyKMIP" target="_blank" rel="noopener noreferrer">PyKMIP</a> (open source), <a href="https://github.com/Cosmian/kms" target="_blank" rel="noopener noreferrer">Cosmian KMS</a> (source-available), HashiCorp Vault Enterprise, Fortanix Data Security Manager, and Thales CipherTrust Manager.</p>
<p><figure><img decoding="async" src="https://percona.community/blog/2026/11/kmipclient-testing-pipeline.svg" alt="Diagram showing unit tests feeding into integration tests, which split into an automated CI pipeline running Cosmian KMS on every commit, and a manual QA pass running all five KMIP servers on every release"></figure>
</p>
<p>Cosmian KMS runs in CI, so the integration suite exercises it on every change. CI started out against PyKMIP; the switch to Cosmian KMS came later, driven by its more complete coverage of the KMIP 2.0 specification. Cosmian KMS is source-available rather than open source: its code is public under the Business Source License (BUSL-1.1), which grants free use for non-production work like a CI pipeline outright, free production use up to two vCPUs, and converts to the Mozilla Public License (MPL) 2.0, an open source license, four years after each version’s publication.</p>
<p>The other four servers are not practical to spin up on every commit, so Percona’s QA engineers run the full integration suite against all five servers by hand after each update, in addition to the automated CI run. Every <code>kmipclient</code> release is verified against all five this way, which gives an interoperability matrix and catches regressions that unit tests and CI alone would miss.</p>
<p><code>kmipclient</code> now backs <code>component_keyring_kmip</code> in <a href="https://docs.percona.com/percona-server/8.0/using-kmip.html" target="_blank" rel="noopener noreferrer">Percona Server for MySQL’s KMIP keyring component</a>, shipping in the 8.4.10 and 8.4.11, 9.7.1 and 9.7.2, and 26.10 releases, with an MTR (MySQL Test Run) suite that exercises it against a Cosmian KMS instance in Docker. It is a general-purpose KMIP client library, though: MySQL was its first important user, not the reason it exists. Teams who previously set up Percona Server for MySQL with HashiCorp Vault Enterprise’s KMIP secrets engine through <a href="https://www.percona.com/blog/using-percona-server-for-mysql-8-0-and-percona-xtrabackup-8-0-with-hashicorp-vault-enterprise-kmip-secrets-engine/" target="_blank" rel="noopener noreferrer">our earlier keyring plugin walkthrough</a> are now running on top of this library.</p>
<h2>Growing through real-world contributions</h2>
<p>The project stopped being a one-person exercise early on.</p>
<p>Thanks are due to several Percona engineers who helped along the way: colleagues from the MongoDB team gave an early hand with KMIP itself and with getting test servers running; colleagues from the PostgreSQL team contributed fixes and improvements covering secure handling of sensitive data, protocol correctness, and network robustness; colleagues from the MySQL team reviewed the library’s design, API, and usability; and colleagues from the QA team have done extensive testing of both the library and the MySQL KMIP keyring built on it, across all five supported KMIP servers.</p>
<p>Contributions crossing three product teams and QA, for a library that started as a weekend project on one engineer’s laptop, says something about how real integration work exposes problems that are hard to find alone. The code gets reviewed, exercised, and occasionally broken in ways a single developer’s test environment rarely produces, which is one of the more effective forms of testing there is.</p>
<h2>How AI fit into the process</h2>
<p>A significant part of the implementation was done with AI coding assistance, mainly GitHub Copilot. The architecture and API were designed by hand first; AI did a lot of the repetitive implementation work afterward.</p>
<p>The approach was deliberately incremental. The KMIP specifications went in first, so the protocol itself was the primary source of truth, not an impression of what the existing C code already did. The existing C library went in next, for practical context on functionality already in use. Then came a hand-written prototype with the new API, interfaces, stubs, and implementation skeletons already defined.</p>
<p>From there, the process followed a pattern: explain the architecture and goals, check that the model’s understanding matched, have it write documentation, then read that documentation back and fix the inconsistencies it surfaced. Development plans came next, broken into a rough work breakdown, followed by the API itself through several rounds of review and revision. Implementation went step by step, function by function, with every step checked rather than accepted on faith.</p>
<p>AI also served as an additional code-review pass: a colleague ran the implementation through several different models for a second set of perspectives. That is not a substitute for human engineering judgment, though. Another colleague reviewed the complete library the traditional way, looking past individual pieces of code at the overall design, API, usability, and maintainability.</p>
<p>AI did a lot of the typing. It did not design the system or make the engineering calls.</p>
<p>There is an irony worth admitting here. Extending <code>libkmip</code> by hand, allocator by allocator, is exactly what made the old architecture feel so expensive in the first place. That kind of grind, hunting down the right alloc function and its matching free function, is precisely the work an AI assistant handles well today. Started now, with these tools already in hand, the choice might not be to write a new library at all. It might be to keep extending the old one.</p>
<h2>What’s next for kmipclient</h2>
<p>The project is not done. A few things are already in motion: folding shared helpers into the <code>utils</code> module and tidying up the key-related API, extending the operation API further, rounding out X.509 certificate support, and filling in more of the KMIP specification. A secure memory de-allocation change is currently in review, and memory allocation and general performance work is next on the list.</p>
<p>None of that changes the underlying goal: implement what applications need now, while keeping the next addition to the specification cheap.</p>
<h2>Try the new KMIP library in C++</h2>
<p><code>kmipclient</code> is a native, open source C++ implementation of KMIP, built on <code>kmipcore</code>, its underlying protocol library. It started as a weekend project aimed at making KMIP development in C++ easier to understand, test, and extend. It has since become a production component in Percona Server for MySQL, tested against five independent KMIP server implementations, with contributions from engineers across three product teams.</p>
<p>It still is not an attempt to implement every corner of the KMIP specification at once. It is a foundation for the functionality applications need today, built so the next piece costs less than the last one did.</p>
<p>Building it requires a C++20 compiler, CMake 3.10 or newer, and OpenSSL. The <code>kmipclient</code> keeps the same dual Apache-2.0/BSD license that <code>libkmip</code> used, out of respect for <code>libkmip</code>’s original author and for the projects already depending on that license.</p>
<p>The project is open source and available on GitHub: <strong><a href="https://github.com/percona/kmipclient" target="_blank" rel="noopener noreferrer">percona/kmipclient</a></strong>. Issues, questions, and contributions are welcome.</p>
<p>And, as is usually true of software, it is not quite finished yet.</p>
<hr>
<h2>Related reading</h2>
<ul>
<li><a href="https://docs.percona.com/percona-server/8.0/using-kmip.html" target="_blank" rel="noopener noreferrer">KMIP keyring component in Percona Server for MySQL</a></li>
<li><a href="https://www.percona.com/blog/using-percona-server-for-mysql-8-0-and-percona-xtrabackup-8-0-with-hashicorp-vault-enterprise-kmip-secrets-engine/" target="_blank" rel="noopener noreferrer">Setting up Percona Server for MySQL with HashiCorp Vault Enterprise’s KMIP secrets engine</a></li>
<li><a href="https://github.com/percona/kmipclient" target="_blank" rel="noopener noreferrer">kmipclient on GitHub</a></li>
</ul>
<p><a href="https://percona.community/blog/2026/11/03/kmipclient-new-kmip-library-in-cpp/">A New KMIP Library in C++, and the Only Free One</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Performance Claim : Technically Correct, but Misleading</title>
        <link>https://jfg-mysql.blogspot.com/2026/11/mariadb-technically-correct-but-misleading-performance-claim.html</link>
        <pubDate>Mon, 02 Nov 2026 20:32:55 +0000</pubDate>
        <dc:creator>Jean-François Gagné</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-performance-claim-technically-correct-but-misleading/</guid>
        <source url="https://jfg-mysql.blogspot.com/">J-F Gagné&#039;s MySQL Blog</source>
        <description><![CDATA[<p>A recent post on the MariaDB Foundation Blog has the impressive title How MariaDB 11.8 became about 3× faster on some in-memory workloads, fixing a regression dating back to 10.5.  The claim is technically correct when viewed in isolation, but I believe it becomes misleading when the broader context is taken into account.  The details are below.</p>
<p>The post mentions a benchmark on 11.8</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/11/mariadb-technically-correct-but-misleading-performance-claim.html">MariaDB Performance Claim : Technically Correct, but Misleading</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>A recent post on the MariaDB Foundation Blog has the impressive title How MariaDB 11.8 became about 3× faster on some in-memory workloads, fixing a regression dating back to 10.5.  The claim is technically correct when viewed in isolation, but I believe it becomes misleading when the broader context is taken into account.  The details are below.</p>
<p>The post mentions a benchmark on 11.8</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/11/mariadb-technically-correct-but-misleading-performance-claim.html">MariaDB Performance Claim : Technically Correct, but Misleading</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>New book &#8211; SELECT to Ship: MariaDB for Application Developers</title>
        <link>https://programmingbrain.com/2026/01/new-book-select-to-ship.html</link>
        <pubDate>Mon, 02 Nov 2026 15:45:00 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/new-book-select-to-ship-mariadb-for-application-developers/</guid>
        <source url="https://programmingbrain.com/">Programming Brain</source>
        <description><![CDATA[<p>I present my new book about SQL, MariaDB, and everything you need to take an application to production.</p>
<p><a href="https://programmingbrain.com/2026/01/new-book-select-to-ship.html">New book &#8211; SELECT to Ship: MariaDB for Application Developers</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>I present my new book about SQL, MariaDB, and everything you need to take an application to production.</p>
<p><a href="https://programmingbrain.com/2026/01/new-book-select-to-ship.html">New book &#8211; SELECT to Ship: MariaDB for Application Developers</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Foundation Newsletter – 1 November 2026</title>
        <link>https://mariadb.org/mariadb-foundation-newsletter-1-november-2026/</link>
        <pubDate>Sun, 01 Nov 2026 18:18:37 +0000</pubDate>
        <dc:creator>Simona Aleksandrova</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-foundation-newsletter-1-november-2026/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>InnoDB about 3x faster on in-memory workloads, the FOSDEM 2027 M-ecosystem devroom call for papers, parallel query execution, our first India meetup and 17 years of MariaDB Server.<br />
MariaDB Foundation Newsletter – 1 November 2026 appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/mariadb-foundation-newsletter-1-november-2026/">MariaDB Foundation Newsletter – 1 November 2026</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>InnoDB about 3x faster on in-memory workloads, the FOSDEM 2027 M-ecosystem devroom call for papers, parallel query execution, our first India meetup and 17 years of MariaDB Server.</p>
<p><a href="https://mariadb.org/mariadb-foundation-newsletter-1-november-2026/">MariaDB Foundation Newsletter – 1 November 2026</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/mariadb-foundation-newsletter-1-november-2026/">MariaDB Foundation Newsletter – 1 November 2026</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>What MariaDB’s plugin API can carry: the HyperLogLog case</title>
        <link>https://mariadb.org/what-mariadbs-plugin-api-can-carry-the-hyperloglog-case/</link>
        <pubDate>Sun, 01 Nov 2026 15:28:14 +0000</pubDate>
        <dc:creator>Roman Nozdrin</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/what-mariadbs-plugin-api-can-carry-the-hyperloglog-case/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Can a complete analytic feature live outside the MariaDB server core? By “complete” I mean a column type, aggregates that build its values, and scalar functions that read them. I built the type_hll plugin, which adds HyperLogLog sketches to MariaDB, and I use it here to answer that question. The answer is mostly yes. One […]<br />
What MariaDB’s plugin API can carry: the HyperLogLog case appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/what-mariadbs-plugin-api-can-carry-the-hyperloglog-case/">What MariaDB’s plugin API can carry: the HyperLogLog case</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Can a complete analytic feature live outside the MariaDB server core? By “complete” I mean a column type, aggregates that build its values, and scalar functions that read them. I built the type_hll plugin, which adds HyperLogLog sketches to MariaDB, and I use it here to answer that question. The answer is mostly yes. One […]</p>
<p><a href="https://mariadb.org/what-mariadbs-plugin-api-can-carry-the-hyperloglog-case/">What MariaDB’s plugin API can carry: the HyperLogLog case</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/what-mariadbs-plugin-api-can-carry-the-hyperloglog-case/">What MariaDB’s plugin API can carry: the HyperLogLog case</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Multi-Node Unused Index Verification</title>
        <link>https://www.percona.com/blog/multi-node-unused-index-verification/</link>
        <pubDate>Sun, 01 Nov 2026 05:26:49 +0000</pubDate>
        <dc:creator>Arunjith Aravindan</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/multi-node-unused-index-verification/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Every MySQL schema that’s been around for a few years collects indexes nobody remembers adding. Some were for a report that was retired. Some came from an ORM migration. A few were added “just in case” and never used. They all cost something: extra writes on every INSERT and UPDATE, increased buffer pool pressure, larger … Continued<br />
The post Multi-Node Unused Index Verification appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/multi-node-unused-index-verification/">Multi-Node Unused Index Verification</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><span>Every MySQL schema that’s been around for a few years collects indexes nobody remembers adding. Some were for a report that was retired. Some came from an ORM migration. A few were added “just in case” and never used. They all cost something: extra writes on every INSERT and UPDATE, increased buffer pool pressure, larger backups, and slower schema changes.</span></p>
<p><span>MySQL makes it look easy to find them. Since 5.7, the </span><span>sys</span><span> schema ships a view called </span><span>sys.schema_unused_indexes</span><span>, and one query gives you a list of indexes with zero reads since the server started. It’s tempting to turn that list straight into </span><span>DROP INDEX</span><span> statements.</span></p>
<p><span>In an earlier post, </span><a href="https://www.percona.com/blog/duplicate-redundant-and-invisible-indexes/"><span>How to Find Duplicate, Unused, and Invisible Indexes in MySQL</span></a><span>, I showed how to use that view on a single server. This post covers what that approach misses once replicas are involved.</span></p>
<p><span>I’ve seen that go wrong, and it’s why I wrote </span><a href="https://github.com/Percona-Lab/check_unused_indexes"><span>check_unused_indexes</span></a><span>. It’s a small Python script that asks the same question on every server in a replication topology and only reports an index when the answer is “unused” everywhere. This post covers why that matters, how the tool works, and how I’d use it on a production system.</span></p>
<h2><b>Why one server’s answer isn’t enough</b></h2>
<p><span>sys.schema_unused_indexes</span><span> is built on Performance Schema’s per-index I/O counters. Those counters are local to the server you query. They know nothing about what your replicas are doing.</span></p>
<p><span>That’s the trap. In most setups, the primary takes writes and the light OLTP reads, while the heavy reads go elsewhere:</span></p>
<ul>
<li><span>A reporting replica runs month-end queries that lean on an index the application never touches.</span></li>
<li><span>An Aurora reader serves the dashboard traffic, so the writer never sees those lookups.</span></li>
<li><span>In a Galera or Percona XtraDB Cluster, the load balancer may send one kind of query to one node more than the others.</span></li>
</ul>
<p><span>So an index can show zero reads on the primary and still be the only thing keeping a replica’s reporting query under a second. Drop it on the primary, the DDL replicates, and the replica falls over into a full table scan.</span></p>
<p><span>There’s a second catch. The counters reset when MySQL restarts. A server patched on Tuesday has seen only a few days of traffic. A weekly batch job or a quarterly report hasn’t run yet, so its indexes look unused when they aren’t.</span></p>
<h2><b>How check_unused_indexes works</b></h2>
<p><span>You give the script a list of servers and tell it which one is the primary. It determines which of those servers belong to that primary’s topology, collects the unused-index lists from each one, and keeps only the indexes that appear on every list. It runs in three steps.</span></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-55409" src="https://www.percona.com/wp-content/uploads/2026/11/Screenshot-2026-11-01-at-10.30.27-AM.png" alt="" width="1130" height="380"></p>
<p><span>check_unused_indexes · 3 steps, 2 abort points</span></p>
<p><span>If the script can’t get a complete answer from every node, it stops instead of printing a list it can’t stand behind.</span></p>
<p><b>Step 1: discover the topology.</b><span> The script connects to every server in your inventory and reads a little metadata from each:</span></p>
<ul>
<li><span>SHOW REPLICA STATUS</span><span> (or </span><span>SHOW SLAVE STATUS</span><span> on older versions) for the source host and port</span></li>
<li><span>@@wsrep_cluster_name</span><span>, to spot Galera and PXC cluster members</span></li>
<li><span>information_schema.replica_host_status</span><span>, which only exists on Aurora</span></li>
<li><span>the </span><span>Uptime</span><span> status variable</span></li>
</ul>
<p><span>Then it walks downstream from the primary. A replica whose source matches the primary’s address is pulled in, then that replica’s own replicas, and so on. Chained and circular replication are handled the same way. If a node is in a Galera cluster, all its cluster peers are included as well. Aurora readers are matched by server ID, or by an alias naming convention I’ll come back to later.</span></p>
<p><span>Servers in the inventory that don’t belong to this primary are left out. That means you can keep a single inventory file for the entire fleet and point the script to different primaries.</span></p>
<p><b>Step 2: ask every node.</b><span> For each node in the resolved topology, the script queries </span><span>sys.schema_unused_indexes</span><span>. Two filters apply on every node:</span></p>
<ul>
<li><span>System schemas (</span><span>sys</span><span>, </span><span>mysql</span><span>, </span><span>performance_schema</span><span>, </span><span>information_schema</span><span>) are always skipped.</span></li>
<li><span>Any index whose first column is part of a foreign key is excluded. MySQL needs an index on FK columns, and it won’t let you drop one that a constraint depends on. Even if it did, you wouldn’t want to.</span></li>
</ul>
<p><span>You can narrow things further with </span><span>–include-schema</span><span> and </span><span>–include-table</span><span>, or skip more schemas with </span><span>–ignore-schema</span><span>.</span></p>
<p><b>Step 3: intersect.</b><span> The script starts with the primary’s list and removes anything that isn’t also on every other node’s list. What’s left is the set of indexes with zero reads everywhere the script looked. It prints that as a table, followed by the DDL to run on the primary.</span></p>
<h2><b>Getting started</b></h2>
<p><span>The script is a single file. It needs Python 3.6 or newer and one library, </span><span>pymysql</span><span>.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">git clone https://github.com/Percona-Lab/check_unused_indexes.git
cd check_unused_indexes
pip3 install --user pymysql</pre>
<p><span>Credentials come from a MySQL option file. By default that’s </span><span>~/.my.cnf</span><span>, and you can point at another one with </span><span>-c</span><span>:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">[client]
user=index_audit
password=change_me</pre>
<p><span>The account needs to read </span><span>sys.schema_unused_indexes</span><span> and </span><span>information_schema</span><span>, and to run </span><span>SHOW REPLICA STATUS</span><span>. Use the same user on every node. The script reads only and never changes anything on the servers.</span></p>
<p><span>There are two ways to tell the script about your servers. For a quick check, you can list them on the command line:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">python3 check_unused_indexes.py 
  --primary "db-primary=10.0.0.10:3306" 
  --replicas "db-replica-1=10.0.0.11:3306,db-replica-2=10.0.0.12:3306"</pre>
<p><span>For anything bigger, I’d use an inventory file. It’s one </span><span>alias=host:port</span><span> per line. Blank lines and lines starting with </span><span>#</span><span> are ignored, and the port defaults to 3306 if you leave it off.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag"># inventory.txt
db-primary=10.0.0.10:3306
db-replica-1=10.0.0.11:3306
db-replica-2=10.0.0.12:3306
db-analytics=10.0.0.13:3306</pre>
<p><span>Then pass the primary’s alias:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">python3 check_unused_indexes.py --inventory inventory.txt --primary db-primary</pre>
<p><span>One thing to check before your first run: the topology walk matches each replica’s </span><span>Source_Host</span><span> against the addresses in your inventory, as plain strings. If your replicas were set up with </span><span>CHANGE REPLICATION SOURCE TO SOURCE_HOST=’db-primary.internal’</span><span>, put that same hostname in the inventory, not the IP. If the topology comes back with fewer nodes than you expect, this is almost always why.</span></p>
<h2><b>A run, step by step</b></h2>
<p><span>Here’s what a run looks like against the inventory above, with the primary and two replicas reachable. The </span><span>db-analytics</span><span> server in the file replicates from a different primary, so the topology walk excludes it. This is the example output from the project README, with the colours stripped.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">=== Step 1: Discovering Topology ===
Mapping topology downstream from Primary: db-primary...

Resolved Topology (3 nodes): db-primary, db-replica-1, db-replica-2

=== Step 2: Checking Unused Indexes on Nodes ===
Checking [PRIMARY] db-primary (10.0.0.10:3306) - Uptime: 42.1 days
  └─ Found 12 unused index candidates on this node.
Checking [REPLICA/CLUSTER] db-replica-1 (10.0.0.11:3306) - Uptime: 42.1 days
  └─ Found 8 unused index candidates on this node.
Checking [REPLICA/CLUSTER] db-replica-2 (10.0.0.12:3306) - Uptime: 14.0 days
  └─ Found 5 unused index candidates on this node.

=== Step 3: Intersecting Unused Indexes Across Topology ===

Safe Target Indexes (Unused across ALL 3 checked nodes):
================================================================================
SCHEMA               | TABLE                          | INDEX NAME
--------------------------------------------------------------------------------
app_db               | orders                         | idx_legacy_status
app_db               | users                          | idx_created_at
================================================================================

Total Candidate Indexes: 2

Generated DDL Statements (Execute on Primary):
--------------------------------------------------------------------------------
ALTER TABLE `app_db`.`orders` ALTER INDEX `idx_legacy_status` INVISIBLE;
ALTER TABLE `app_db`.`users` ALTER INDEX `idx_created_at` INVISIBLE;
--------------------------------------------------------------------------------</pre>
<p><span>Look at the numbers in Step 2. Run the </span><span>sys</span><span> query on the primary alone and you get 12 indexes to drop. Only 2 of those 12 are unused on both replicas. The other 10 are carrying read traffic somewhere, and dropping them would have hurt.</span></p>
<p><span>That gap between 12 and 2 is the whole point of the tool. Expect a gap like this on most real systems. Replicas exist precisely to take the load the primary doesn’t serve.</span></p>
<p><span>If you only want the DDL, for a ticket or a change request, add </span><span>-qs</span><span> (</span><span>–quiet-summary</span><span>) to skip the table.</span></p>
<h2><b>Safety checks: what happens when a node is down</b></h2>
<p><span>The intersection is only as good as its inputs. If a replica can’t be reached and the script quietly skips it, the result looks complete but isn’t. Any index that replica depends on could end up on the drop list. The latest version therefore refuses to guess.</span></p>
<table border="1" cellspacing="0" cellpadding="8">
<thead>
<tr>
<th><span>Situation</span></th>
<th><span>What the script does</span></th>
</tr>
</thead>
<tbody>
<tr>
<td><span>Primary can’t be reached in Step 1</span></td>
<td><span>Stops with a fatal error. Without the primary there’s no topology to walk.</span></td>
</tr>
<tr>
<td><span>Some inventory nodes can’t be reached in Step 1</span></td>
<td><span>Prints a connection warning naming each one, with a note that they weren’t evaluated.</span></td>
</tr>
<tr>
<td><span>Primary drops out during Step 2</span></td>
<td><span>Stops at once. There’s nothing to intersect against.</span></td>
</tr>
<tr>
<td><span>A replica or cluster peer drops out during Step 2</span></td>
<td><span>Stops with a fatal error and lists the nodes, unless you pass </span><span>–force</span><span>.</span></td>
</tr>
<tr>
<td><span>Same, with </span><span>–force</span></td>
<td><span>Carries on with the nodes that answered, prints a warning, and labels the result “checked nodes”.</span></td>
</tr>
<tr>
<td><span>A node’s uptime is under the threshold</span></td>
<td><span>Finishes, then warns that its statistics may be incomplete. The default is 7 days; change it with </span><span>-u</span><span>, or set 0 to disable it.</span></td>
</tr>
</tbody>
</table>
<p><span>The Step 1 warning needs an explanation. If a replica is already down when you start, the script can’t read its replication status. It has no way of knowing that the node belongs to this topology, so it can’t treat it as missing. All it can do is tell you which inventory entries it couldn’t reach. Read that warning before you trust the result.</span></p>
<p><span>–force</span><span> is there for the case where you know a node is gone for good, such as a replica being decommissioned. Don’t use it to get past a network blip.</span></p>
<p><span>The last option is </span><span>–pause-seconds</span><span>, which waits between Step 1 and Step 2. It’s meant for testing these checks. Start a run with </span><span>–pause-seconds 60</span><span>, stop MySQL on one replica while it waits, and check that the script aborts:</span></p>
<p><span>python3 check_unused_indexes.py -i inventory.txt -p db-primary –pause-seconds 60; echo “exit=$?”</span></p>
<p><span>You should see </span><span>FATAL ERROR: Failed to inspect index state on resolved replica/peer node(s)</span><span> and an exit code of 1. Run it once on a test setup before you rely on it in production.</span></p>
<h2><b>From candidate list to dropped index</b></h2>
<p><span>The script prints DDL and stops there. It never runs anything for you, and that’s on purpose. The list is a set of candidates to review, not a set of orders.</span></p>
<p><span>By default, the DDL makes the index invisible rather than dropping it:</span></p>
<p><span>ALTER TABLE <code>app_db</code>.<code>users</code> ALTER INDEX <code>idx_created_at</code> INVISIBLE;</span></p>
<p><span>Invisible indexes arrived in MySQL 8.0. The optimizer stops using the index, but MySQL continues to maintain it on every write. Making it invisible is a metadata change, and so is undoing it, so rolling back takes seconds. A real </span><span>DROP INDEX</span><span> followed by a re-create means rebuilding the index, which on a large table can take hours.</span></p>
<p><span>This is the rollout I’d follow:</span></p>
<ol>
<li><span>Run the script and read the candidate list yourself. Make sure every name makes sense to you.</span></li>
<li><span>Run the </span><span>INVISIBLE</span><span> statements on the primary. They replicate, so every node in the topology changes.</span></li>
<li><span>Wait through at least one full business cycle, including the month-end jobs and any weekly batch. Watch the slow query log and your query metrics for regressions.</span></li>
<li><span>If something slows down, run </span><span>ALTER INDEX … VISIBLE</span><span> on that index, and you’re back where you started.</span></li>
<li><span>Once you’re confident, drop the indexes. </span><span>–action drop</span><span> prints the </span><span>DROP INDEX</span><span> statements, and </span><span>–action both</span><span> prints both kinds.</span></li>
</ol>
<p><span>One more thing before step 5. On MySQL 8.0 you can set </span><span>use_invisible_indexes=on</span><span> in </span><span>optimizer_switch</span><span> for a single session. That lets you check whether a query you’re unsure about would still pick the index, without making it visible to the application.</span></p>
<p><span>For a longer walkthrough of invisible indexes, including testing a single query with </span><span>SET_VAR(optimizer_switch = ‘use_invisible_indexes=on’)</span><span>, see my </span><a href="https://www.percona.com/blog/duplicate-redundant-and-invisible-indexes/"><span>earlier post</span></a><span>.</span></p>
<h2><b>Options at a glance</b></h2>
<table border="1" cellspacing="0" cellpadding="8">
<thead>
<tr>
<th><span>Option</span></th>
<th><span>What it does</span></th>
<th><span>Default</span></th>
</tr>
</thead>
<tbody>
<tr>
<td><span>-p</span><span>, </span><span>–primary</span></td>
<td><span>Primary alias from the inventory, or </span><span>alias=host:port</span><span> / </span><span>host:port</span></td>
<td><span>required</span></td>
</tr>
<tr>
<td><span>-r</span><span>, </span><span>–replicas</span></td>
<td><span>Comma-separated replica specs on the command line</span></td>
<td><span>none</span></td>
</tr>
<tr>
<td><span>-i</span><span>, </span><span>–inventory</span></td>
<td><span>Inventory file, one </span><span>alias=host:port</span><span> per line</span></td>
<td><span>none</span></td>
</tr>
<tr>
<td><span>-c</span><span>, </span><span>–config</span></td>
<td><span>MySQL option file with credentials</span></td>
<td><span>~/.my.cnf</span></td>
</tr>
<tr>
<td><span>-u</span><span>, </span><span>–min-uptime</span></td>
<td><span>Warn when a node has been up fewer days than this</span></td>
<td><span>7</span></td>
</tr>
<tr>
<td><span>–action</span></td>
<td><span>DDL to print: </span><span>invisible</span><span>, </span><span>drop</span><span> or </span><span>both</span></td>
<td><span>invisible</span></td>
</tr>
<tr>
<td><span>-s</span><span>, </span><span>–include-schema</span></td>
<td><span>Only check these schemas</span></td>
<td><span>all</span></td>
</tr>
<tr>
<td><span>-t</span><span>, </span><span>–include-table</span></td>
<td><span>Only check these tables</span></td>
<td><span>all</span></td>
</tr>
<tr>
<td><span>–ignore-schema</span></td>
<td><span>Extra schemas to skip, on top of the system ones</span></td>
<td><span>none</span></td>
</tr>
<tr>
<td><span>-qs</span><span>, </span><span>–quiet-summary</span></td>
<td><span>Print only the DDL</span></td>
<td><span>off</span></td>
</tr>
<tr>
<td><span>–force</span></td>
<td><span>Continue if a replica fails in Step 2 (unsafe)</span></td>
<td><span>off</span></td>
</tr>
<tr>
<td><span>–pause-seconds</span></td>
<td><span>Wait between Step 1 and Step 2, for testing</span></td>
<td><span>0</span></td>
</tr>
<tr>
<td><span>–color</span></td>
<td><span>auto</span><span>, </span><span>always</span><span> or </span><span>never</span></td>
<td><span>auto</span></td>
</tr>
</tbody>
</table>
<h2><b>Limits worth knowing</b></h2>
<p><span>No tool can see traffic that hasn’t happened yet, and this one is no exception. Keep these in mind:</span></p>
<ul>
<li><b>Only servers in the inventory are checked.</b><span> A replica you forgot to list is invisible to the script, and so is everything it serves.</span></li>
<li><b>Unique indexes can still show up.</b> <span>sys.schema_unused_indexes</span><span> excludes primary keys, but not </span><span>UNIQUE</span><span> indexes. A unique index can have zero reads and still be enforcing a business rule. Check every candidate with </span><span>SHOW CREATE TABLE</span><span> before you drop it.</span></li>
<li><b>Statistics start at the last restart.</b><span> The uptime warning helps, but you decide what “long enough” means for your workload.</span></li>
<li><b>Performance Schema must be on.</b><span> It’s on by default. If someone turned it off, the </span><span>sys</span><span> view has nothing to report.</span></li>
<li><b>Aurora needs an alias convention.</b><span> Readers are matched by server ID or by alias prefix. Name the writer </span><span>aurora</span><span> and the readers </span><span>aurora-reader-1</span><span>, </span><span>aurora-reader-2</span><span> and so on, and they’ll be grouped correctly.</span></li>
<li><b>Hosts are matched as strings.</b><span> As covered above, use the same host name or IP in the inventory as the replicas use in </span><span>Source_Host</span><span>.</span></li>
<li><b>It finds unused indexes, not duplicate ones.</b><span> An index can be redundant even if another index covers the same columns. For those, run </span><span>pt-duplicate-key-checker</span><span> from Percona Toolkit, as described in the </span><a href="https://www.percona.com/blog/duplicate-redundant-and-invisible-indexes/"><span>earlier post</span></a><span>.</span></li>
</ul>
<h2><b>Try it and tell me what breaks</b></h2>
<p><span>The project is on GitHub at </span><a href="https://github.com/Percona-Lab/check_unused_indexes"><span>Percona-Lab/check_unused_indexes</span></a><span> under the Apache 2.0 license. It’s one Python file, so it’s easy to read before you run it against anything that matters, and I’d encourage you to do so.</span></p>
<p><span>If it misreads your topology, or you run something it doesn’t handle yet (group replication, multi-source replicas), please open an issue or send a pull request. Real topologies are messier than test labs, and those reports are how the tool gets better.</span></p>
<p>The post <a href="https://www.percona.com/blog/multi-node-unused-index-verification/">Multi-Node Unused Index Verification</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/multi-node-unused-index-verification/">Multi-Node Unused Index Verification</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Still on MariaDB 10.6? Why your next upgrade is a security decision</title>
        <link>https://mariadb.org/still-on-mariadb-10-6-why-your-next-upgrade-is-a-security-decision/</link>
        <pubDate>Sat, 31 Oct 2026 13:07:49 +0000</pubDate>
        <dc:creator>Anna Widenius</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/still-on-mariadb-10-6-why-your-next-upgrade-is-a-security-decision/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Last week was about PHP. This week, check your database. On 21 October 2026, the PHP project shipped emergency fixes for two critical remote code execution flaws, CVE-2026-109618 and CVE-2026-109619, known together as PHP2Shell. Exploit details leaked before the patch, attacks started within hours, and the only real fix was to upgrade PHP or shut […]<br />
Still on MariaDB 10.6? Why your next upgrade is a security decision appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/still-on-mariadb-10-6-why-your-next-upgrade-is-a-security-decision/">Still on MariaDB 10.6? Why your next upgrade is a security decision</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Last week was about PHP. This week, check your database. On 21 October 2026, the PHP project shipped emergency fixes for two critical remote code execution flaws, CVE-2026-109618 and CVE-2026-109619, known together as PHP2Shell. Exploit details leaked before the patch, attacks started within hours, and the only real fix was to upgrade PHP or shut […]</p>
<p><a href="https://mariadb.org/still-on-mariadb-10-6-why-your-next-upgrade-is-a-security-decision/">Still on MariaDB 10.6? Why your next upgrade is a security decision</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/still-on-mariadb-10-6-why-your-next-upgrade-is-a-security-decision/">Still on MariaDB 10.6? Why your next upgrade is a security decision</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>From Cake Pops to Valkey Pong: Finding My Place in the Open Source Community</title>
        <link>https://percona.community/blog/2026/10/29/from-cake-pops-to-valkey-pong/</link>
        <pubDate>Thu, 29 Oct 2026 17:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/from-cake-pops-to-valkey-pong-finding-my-place-in-the-open-source-community/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>I’ll be the first to admit it. I’m not a technical guy. I am, however, observant and curious—two traits that play a major role in my efforts to learn and collaborate with our community members.</p>
<p><a href="https://percona.community/blog/2026/10/29/from-cake-pops-to-valkey-pong/">From Cake Pops to Valkey Pong: Finding My Place in the Open Source Community</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>I’ll be the first to admit it. I’m not a technical guy. I am, however, observant and curious—two traits that play a major role in my efforts to learn and collaborate with our community members.</p>
<p>I don’t write code. I don’t manage databases. Sure, I have my Percona operator wordtracks and basic limited knowledge, but after that, I wave down the nearest technical colleague and execute a beautifully crafted handoff.</p>
<p><figure><img decoding="async" width="1500" height="1999" src="https://percona.community/blog/2026/10/kyle-oss-cake-pops-booth_hu_6338295a965e2366.webp" alt="Cake pops and Percona goat mascot on the booth table at Open Source Summit Europe" loading="lazy"></figure>
</p>
<p>What I do know is people. Events. Marketing. Communications. Building relationships and bringing people together.</p>
<p>And after 18 months with Percona, I’ve learned something pretty incredible: The open source world is as much about people and relationships as it is about technology.</p>
<p>I was reminded of that recently while spending a week in Prague attending Open Source Summit Europe and ValkeyConf. Two different events, two different experiences, but one very common thread running through both: the people.</p>
<h2>It’s About More Than the Technology</h2>
<p>When I first joined Percona, I knew I was stepping into a very technical industry. I also knew I had a lot to learn. What I didn’t fully appreciate at the time was just how passionate, welcoming, and deeply invested the open source community really is.</p>
<p>These aren’t just people who use open source technology because it’s part of their job. For so many of them, open source is something they genuinely believe in. They contribute their time, share their knowledge, champion projects, collaborate endlessly, support one another, and work tirelessly to make the technologies and communities they care about better.</p>
<p>There’s a sense of ownership and pride that comes with that. A genuine belief that collaboration, transparency, and sharing knowledge can make a difference.</p>
<p>And that passion is contagious.</p>
<p>Even for a guy who couldn’t explain half the technical conversations happening around him.</p>
<h2>From Cake Pops to Valkey Pong</h2>
<p><figure><img decoding="async" width="1500" height="1999" src="https://percona.community/blog/2026/10/kyle-oss-valkey-pong-sign_hu_dec64d64d068c26e.webp" alt="Valkey Pong booth sign: Database or Datastore" loading="lazy"></figure>
</p>
<p>If there’s one thing I’ve learned about events, it’s that sometimes the simplest things create the best opportunities for connection.</p>
<p>At Open Source Summit Europe, we had cake pops at the Percona booth. At ValkeyConf, we had Valkey Pong—our take on beer pong, only less beer and more database (or datastore? Depending on the bucket you ponged the ball into).</p>
<p>Now, on the surface, those might sound like fun little booth activities designed to attract attendees.</p>
<p>But what happened around them was so much more meaningful.</p>
<p>People stopped. They laughed. They played. They shared stories. They talked about their projects, their challenges, their successes, and what they were excited about.</p>
<p>Yes, the technical sessions are important. The innovation is exciting. Knowledge sharing is invaluable.</p>
<p>But the conversations in the hallways, at the booths, over coffee, and during an evening out? That’s where relationships are built.</p>
<p>And those relationships are what keep these communities strong.</p>
<h2>Somewhere Along the Way, Something Changed</h2>
<p>Here’s something I’ve noticed over the past year and a half.</p>
<p>When I first started attending open source events, I was the new guy. I was meeting people, introducing myself, learning names, and trying to understand the landscape.</p>
<p><figure><img decoding="async" width="1170" height="778" src="https://percona.community/blog/2026/10/kyle-oss-valkeyconf-group_hu_347fa50ce12ff89e.webp" alt="Percona and Valkey community group photo at ValkeyConf" loading="lazy"></figure>
</p>
<p>Now?</p>
<p>I walk into an event and I know people.</p>
<p>I’m connected with them on social media. We interact throughout the year. We comment on each other’s posts, share a laugh, and keep up with what’s happening in our respective corners of the world.</p>
<p>Then, a few months later, we find ourselves at another conference in another city, and instead of introducing ourselves, we’re giving each other hugs and picking up conversations and inside jokes right where we left off.</p>
<p>I’ve gone from being someone who works in the open source industry to someone who genuinely feels like part of the open source community.</p>
<p>And I don’t take that for granted.</p>
<p>Because the truth is, even without the technical background that so many of the people around me have, I’ve never felt like that disqualified me from being part of this community.</p>
<p>I’ve been welcomed, included, and embraced by people who recognize that a strong community needs all kinds of contributions. Developers, engineers, maintainers, advocates, marketers, event professionals, and countless others all have a role to play.</p>
<p>You don’t have to write the code to believe in the community behind it.</p>
<h2>The Relationships Are What Stay With You</h2>
<p>I spend a lot of time thinking about what makes an event successful.</p>
<p>Of course, there are the metrics. Attendance numbers. Booth traffic. Leads. Engagement. All the things that someone in events and marketing is supposed to care about. And I do care about those things.</p>
<p>But increasingly, I find myself measuring success in a different way, too.</p>
<p>How many meaningful conversations did we have? How many relationships did we strengthen? How many new friends did we make? How many people walked away feeling a little more connected to the community?</p>
<p>While it’s hard to put an exact number on meaningful conversations, strengthened relationships, and new friendships, we can certainly measure the impact of those connections. From the number of new Percona Community members who joined during the event and attendees who entered our raffle, to the visitors who stopped by our booth (yes, we actually keep track!) and the people proudly sporting Percona-branded swag and giveaways for the remainder of the event, these numbers tell a bigger story.</p>
<p>They represent more than just engagement metrics; they represent connections made, relationships built, and a growing community of people who feel like they belong.</p>
<p>And when I think back on my week in Prague, it’s not necessarily a particular session or booth interaction that stands out most.</p>
<p>It’s the people. The familiar faces. The laughter. The conversations. The friendships.</p>
<p>Because at the end of the day, whether it’s a teammate who knows your drink order (double whiskey), a familiar face you can’t wait to catch up with at the next conference, or someone you just met over a cake pop, it’s the relationships that make all of this worthwhile.</p>
<p>I may never be the most technical person in the room. In fact, I won’t ever be.</p>
<p><figure><img decoding="async" width="1999" height="1500" src="https://percona.community/blog/2026/10/kyle-oss-valkeyconf-booth_hu_f90f1e968df74dfb.webp" alt="Kyle Flanagan at the Percona for Valkey booth" loading="lazy"></figure>
</p>
<p>But I went from a guy who knew little to nothing about the open source community to a guy writing and publishing blog posts about his passion for the community and his open source educational journey.</p>
<p>And after 18 months in this community, I can confidently say I’ve found a community of people that make me feel included and valued, regardless of my second-grade database knowledge.</p>
<p>And that’s pretty cool.</p>
<p><a href="https://percona.community/blog/2026/10/29/from-cake-pops-to-valkey-pong/">From Cake Pops to Valkey Pong: Finding My Place in the Open Source Community</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Benchmarking Vector search in six database engines</title>
        <link>https://www.percona.com/blog/benchmarking-vector-search-in-six-database-engines/</link>
        <pubDate>Thu, 29 Oct 2026 16:46:38 +0000</pubDate>
        <dc:creator>Evgeniy Patlan</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/benchmarking-vector-search-in-six-database-engines/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>We loaded 990,000 OpenAI embeddings of 1,536 dimensions into six databases that index vectors themselves, built an HNSW index in each, and measured five things: time to a queryable index, storage and memory, recall against throughput, throughput under concurrent clients, and what happens when 10% of the corpus is rewritten. Same host, same container shape, … Continued<br />
The post Benchmarking Vector search in six database engines appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/benchmarking-vector-search-in-six-database-engines/">Benchmarking Vector search in six database engines</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>We loaded 990,000 OpenAI embeddings of 1,536 dimensions into six databases that index vectors themselves, built an HNSW index in each, and measured five things: time to a queryable index, storage and memory, recall against throughput, throughput under concurrent clients, and what happens when 10% of the corpus is rewritten. Same host, same container shape, same source pins, same query set.</p>
<p>The build numbers spread wider than we expected. Time to a queryable index ran from 1.9 minutes to 6.7 hours for the same million vectors. Index size ran from 3.9 GiB to 15.1 GiB, and the engine with the smallest index took the longest to build it. At recall 0.99 the field closes up: four of the six are within a factor of two of each other. Under 32 clients it opens again. pgvector returns 21.7× its single-client throughput. The three InnoDB-based engines return about 1×.</p>
<p>This is one run on one machine. Two numbers in the concurrency table have since been withdrawn by the harness that produced them, and the reason is below. Framework, configuration and raw records: <a href="https://github.com/Percona-Lab/vector-bench">github.com/Percona-Lab/vector-bench</a>.</p>
<h2>The machine, and how we ran it</h2>
<p>&lt;</p>
<figure class="wp-block-table">
<table>
<tbody>
<tr>
<th scope="row">Host</th>
<td>Intel Xeon Gold 6230 @ 2.10 GHz, 80 logical CPUs, AVX-512, 187.5 GB RAM</td>
</tr>
<tr>
<th scope="row">Server container</th>
<td>CPUs 0–63, 120.8 GB memory limit, 13 GB /dev/shm</td>
</tr>
<tr>
<th scope="row">Harness container</th>
<td>CPUs 64–79, 8 GB memory limit</td>
</tr>
<tr>
<th scope="row">Corpus</th>
<td>dbpedia-openai-1000k-angular, 990,000 × 1,536 float32, cosine</td>
</tr>
<tr>
<th scope="row">Index</th>
<td>HNSW, M = 16 everywhere, k = 10</td>
</tr>
<tr>
<th scope="row">Query effort</th>
<td>ann pass sweeps ef_search 10–800, ops pass pins ef_search 100</td>
</tr>
<tr>
<th scope="row">Concurrency</th>
<td>1, 2, 4, 8, 16, 32 clients, 60 s per point, 3 repeats</td>
</tr>
<tr>
<th scope="row">Filters</th>
<td>500 queries per point at 10% and 1% selectivity</td>
</tr>
<tr>
<th scope="row">Churn</th>
<td>10% of the corpus deleted and re-inserted</td>
</tr>
<tr>
<th scope="row">Build</th>
<td>RelWithDebInfo, -march=x86-64-v3 for all four built from source</td>
</tr>
</tbody>
</table>
</figure>
<p>The database runs in one container and the harness in another, on a private network. One container would charge the several hundred megabytes of NumPy holding the query set to the server’s cgroup and ruin the memory numbers. The harness never configures a server. The orchestrator does, so every engine gets the same treatment, and that treatment is written into the run manifest beside the results.</p>
<p>All six got the same budget: a 42.3 GB InnoDB buffer pool, 12.1 GB of <code>maintenance_work_mem</code> for pgvector’s build, 8 I/O threads and 8 build threads. The two engines with a graph cache got 30.2 GB of it. Both default to 16 MiB, and leaving that in place would judge a vendor on a value it plainly intends you to change. The orchestrator clamped I/O and build threads down from 64, because more than a handful contend rather than help and a large value stalled writes into a populated index outright. It raised /dev/shm from 8 GB to 13 GB so pgvector’s parallel build could hold a segment the size of <code>maintenance_work_mem</code>. Both adjustments are in the manifest.</p>
<p>Recall is ann-benchmarks’ distance-threshold definition, so these numbers stay comparable with published ANN results. Ground truth for filtered queries is recomputed by brute force over the rows that satisfy each predicate. A <code>WHERE</code> clause changes the correct answer set, and scoring a filtered query against unfiltered neighbours scores every engine against the wrong targets.</p>
<h2>What ran</h2>
<figure class="wp-block-table">
<table>
<thead>
<tr>
<th>Engine</th>
<th>Version</th>
<th>Index</th>
<th>Source</th>
</tr>
</thead>
<tbody>
<tr>
<td>MariaDB 11.8</td>
<td>11.8.8</td>
<td>MHNSW</td>
<td>built from tag</td>
</tr>
<tr>
<td>MariaDB 12.3</td>
<td>12.3.2</td>
<td>MHNSW</td>
<td>built from tag</td>
</tr>
<tr>
<td>AliSQL</td>
<td>8.0.44-2</td>
<td>VIDX</td>
<td>built from tag</td>
</tr>
<tr>
<td>PostgreSQL + pgvector</td>
<td>pgvector 0.8.6</td>
<td>HNSW</td>
<td>built from tag</td>
</tr>
<tr>
<td>Valkey + valkey-search</td>
<td>9.1.1</td>
<td>HNSW</td>
<td>Percona packages</td>
</tr>
<tr>
<td>Percona Search for MongoDB</td>
<td>1.70.3-1 on PSMDB 8.3.8-2</td>
<td>HNSW</td>
<td>Percona packages</td>
</tr>
</tbody>
</table>
</figure>
<p>Percona Search for MongoDB is a Technical Preview and its documentation says not for production. Its numbers use the scalar-quantized index, which MongoDB recommends above a 3 GB vector index.</p>
<h2>Loading the data</h2>
<figure class="wp-block-table">
<table>
<caption>Time to a queryable index, and what it costs to keep</caption>
<thead>
<tr>
<th>Engine</th>
<th>Load</th>
<th>Index build</th>
<th>To queryable</th>
<th>Rows/s</th>
<th>Index</th>
<th>Table</th>
<th>Peak RSS</th>
</tr>
</thead>
<tbody>
<tr>
<td>Percona Search</td>
<td>14 s</td>
<td>100 s</td>
<td>1.9 min</td>
<td>69,018</td>
<td>15.1 GiB</td>
<td>5.8 GiB</td>
<td>48.8 GiB</td>
</tr>
<tr>
<td>Valkey</td>
<td>33 s</td>
<td>226 s</td>
<td>4.3 min</td>
<td>30,170</td>
<td>11.3 GiB</td>
<td>6.9 GiB</td>
<td>14.3 GiB</td>
</tr>
<tr>
<td>PostgreSQL</td>
<td>26.9 min</td>
<td>14.0 min</td>
<td>40.9 min</td>
<td>613</td>
<td>7.6 GiB</td>
<td>7.6 GiB</td>
<td>43.5 GiB</td>
</tr>
<tr>
<td>MariaDB 11.8</td>
<td>3.6 h</td>
<td>in the load</td>
<td>3.6 h</td>
<td>75.9</td>
<td>3.9 GiB</td>
<td>14.3 GiB</td>
<td>28.6 GiB</td>
</tr>
<tr>
<td>MariaDB 12.3</td>
<td>5.4 h</td>
<td>in the load</td>
<td>5.4 h</td>
<td>50.7</td>
<td>3.9 GiB</td>
<td>14.4 GiB</td>
<td>27.0 GiB</td>
</tr>
<tr>
<td>AliSQL</td>
<td>6.7 h</td>
<td>in the load</td>
<td>6.7 h</td>
<td>41.0</td>
<td>3.9 GiB</td>
<td>10.5 GiB</td>
<td>21.9 GiB</td>
</tr>
</tbody>
</table>
</figure>
<p>MHNSW and VIDX update the graph on every <code>INSERT</code>, so their load is the index build and there is nothing separate to time. That puts them at 41 to 76 rows a second against pgvector’s 613 and Valkey’s 30,170. pgvector’s 40.9 minutes is 26.9 minutes of <code>COPY</code> plus 14.0 minutes of parallel build across 8 workers.</p>
<p>They get the smallest index for it. 3.9 GiB, where the raw float32 vectors alone are 5.7 GiB. It is the only measurement in this run where MariaDB leads, and it matters when index-resident-per-node is the binding constraint. The table is a different story: MariaDB stores 14.3 GiB for those same vectors, Percona Search 5.8 GiB.</p>
<p>Build time is a re-indexing window. Changing embedding model is an afternoon on pgvector and a weekend on AliSQL.</p>
<h2>Recall against throughput</h2>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" class="alignnone wp-image-55278 size-full" src="https://www.percona.com/wp-content/uploads/2026/10/recall-vs-throughput.png" alt="Line chart of queries per second against recall@10 for the six engines, single client, recall 0.95 and above, log-scale throughput axis." width="1158" height="776"><figcaption>Throughput against recall, single client, M = 16. Up and to the right is better. Large markers are the Pareto frontier for each engine; small ones are every measured ef_search point, including those a better setting dominates.</figcaption></figure>
<figure class="wp-block-table">
<table>
<caption>Queries per second at three accuracy floors, single client</caption>
<thead>
<tr>
<th>Engine</th>
<th>recall ≥ 0.90</th>
<th>≥ 0.95</th>
<th>≥ 0.99</th>
</tr>
</thead>
<tbody>
<tr>
<td>Valkey</td>
<td>1,191</td>
<td>825</td>
<td>264</td>
</tr>
<tr>
<td>PostgreSQL</td>
<td>679</td>
<td>462</td>
<td>210</td>
</tr>
<tr>
<td>MariaDB 12.3</td>
<td>475</td>
<td>475</td>
<td>277</td>
</tr>
<tr>
<td>AliSQL</td>
<td>424</td>
<td>424</td>
<td>126</td>
</tr>
<tr>
<td>MariaDB 11.8</td>
<td>415</td>
<td>415</td>
<td>46</td>
</tr>
<tr>
<td>Percona Search</td>
<td>138</td>
<td>124</td>
<td>88</td>
</tr>
</tbody>
</table>
</figure>
<p>Best throughput whose measured recall clears each floor. MariaDB and AliSQL repeat a number across two columns because their fastest configuration already returns recall 0.956 to 0.989. It wins both floors. That is not a missing measurement.</p>
<p>MariaDB 12.3 is the fastest engine in the run at recall 0.99, at 277 QPS. It gives six times the throughput of 11.8 at that floor for 50% more build time. That is a better graph rather than faster search, and it is the case for upgrading if accuracy above 0.99 is the target.</p>
<p>Raising the floor from 0.90 to 0.95 costs pgvector and Valkey a third of their throughput. It costs MariaDB and AliSQL nothing, because their fastest setting is already above both floors. Neither MHNSW nor VIDX exposes a knob that trades accuracy for speed at a fixed graph degree, so there is no cheaper operating point to move to. pgvector and Valkey expose <code>ef_construction</code> as well as a query-time knob.</p>
<p>One AliSQL point is unexplained. At M = 16, throughput rises from 2.6 to 4.4 QPS between ef_search 400 and 800. More search effort cannot be faster on the same index. AliSQL also has a latency cliff: p50 is 6.6 ms at ef_search 80, 50.8 ms at 120 and 384 ms beyond, reproduced across three runs, two corpus sizes and both graph degrees with no competing load on the host.</p>
<h2>Concurrency</h2>
<figure><img loading="lazy" decoding="async" class="alignnone wp-image-55280 size-full" src="https://www.percona.com/wp-content/uploads/2026/10/concurrency-scaling.png" alt="Three panels showing throughput, p99 latency and scaling efficiency against 1 to 32 concurrent clients for the six engines." width="2048" height="724"></figure>
<figure class="wp-block-image size-large"><figcaption>Throughput, p99 and scaling efficiency against client count, ef_search 100. The efficiency panel for MariaDB 11.8, MariaDB 12.3 and AliSQL is the part this post withdraws.</figcaption></figure>
<figure class="wp-block-table">
<table>
<caption>Throughput by client count, queries per second</caption>
<thead>
<tr>
<th>Engine</th>
<th>1</th>
<th>2</th>
<th>4</th>
<th>8</th>
<th>16</th>
<th>32</th>
<th>p99 @32</th>
<th>In service @32</th>
</tr>
</thead>
<tbody>
<tr>
<td>Valkey</td>
<td>470</td>
<td>956</td>
<td>1,829</td>
<td>3,230</td>
<td>4,983</td>
<td>5,683</td>
<td>10.2 ms</td>
<td>30.7 of 32</td>
</tr>
<tr>
<td>PostgreSQL</td>
<td>221</td>
<td>433</td>
<td>842</td>
<td>1,626</td>
<td>2,861</td>
<td>4,798</td>
<td>10.8 ms</td>
<td>31.9 of 32</td>
</tr>
<tr>
<td>Percona Search</td>
<td>168</td>
<td>339</td>
<td>659</td>
<td>1,272</td>
<td>1,856</td>
<td>1,844</td>
<td>43.5 ms</td>
<td>28.8 of 32</td>
</tr>
<tr>
<td>AliSQL</td>
<td>148</td>
<td>150</td>
<td>149</td>
<td>149</td>
<td>124</td>
<td>127</td>
<td>1,494 ms</td>
<td>16.9 of 32</td>
</tr>
<tr>
<td>MariaDB 11.8</td>
<td>165</td>
<td>142</td>
<td>171</td>
<td>153</td>
<td>162</td>
<td>148</td>
<td>1,364 ms</td>
<td>14.4 of 32</td>
</tr>
<tr>
<td>MariaDB 12.3</td>
<td>199</td>
<td>206</td>
<td>204</td>
<td>204</td>
<td>205</td>
<td>210</td>
<td>1,043 ms</td>
<td>7.1 of 32</td>
</tr>
</tbody>
</table>
</figure>
<p>“In service” is throughput times median latency. By Little’s law that is the average number of queries inside the engine during the window. For the top three it tracks the client count, so the x-axis means what it says. For the two MariaDB builds it does not. At nominally 32 clients, 14.4 and 7.1 queries were in service.</p>
<p>Why are two cells marked? Our harness runs its concurrent clients as threads in one Python interpreter, each with its own connection. MariaDB Connector/C holds the interpreter lock across its socket wait, so some of those clients were waiting on the lock rather than on the database. A later smoke run made it obvious: at 4 clients on a small corpus, MariaDB returned 2,927 QPS at a 0.325 ms median, which is one query in flight.</p>
<p>The harness now computes “in service” for every window and refuses to divide throughput by the client count when it falls below half. On this run that refuses MariaDB 11.8 at 16 and 32 clients, MariaDB 12.3 at 2, 16 and 32, and AliSQL at 2. Six points of thirty-six. It refuses nothing from pgvector, Valkey or Percona Search. It also does not refuse a saturated server: a real queue raises the whole latency distribution including the median, so “in service” stays at the client count while throughput flattens.</p>
<p>The finding survives the withdrawal. Throughput did not rise and median latency rose twentyfold. MariaDB 11.8 returned 165 QPS at one client and 148 at thirty-two, p50 going 4.6 ms to 97 ms. AliSQL went 5.1 ms to 133 ms for the same flat throughput. Offering an engine more work and getting the same throughput at twenty times the latency is a queue, and that queue was on the server side. A client still waiting for the interpreter lock has not issued its query and adds nothing to these percentiles. What we cannot claim is that these three were measured at 32 concurrent queries. They were measured at 7 to 17.</p>
<p>The three flat engines are the three on InnoDB. They are also the three driven through MariaDB Connector/C, where the others use psycopg3, PyMongo and a Valkey client. Two variables, three engines, one pattern. The grouping cannot separate them and nothing here has been profiled. MHNSW and VIDX are separate codebases from different teams, which is what makes the storage engine the interesting half.</p>
<p>The same arithmetic shows one more thing. At a single client, pgvector, Valkey and Percona Search spent 99 to 101% of the window inside the query call. MariaDB 11.8, MariaDB 12.3 and AliSQL spent 74 to 75%. About 1.5 ms per query on that path is our harness, not the server, so their single-client latencies read worse than the engine is. Throughput is unaffected.</p>
<h2>Filtered search</h2>
<p>Every engine here answers “nearest neighbours of this vector where a scalar predicate holds”. They do it three different ways, and the ways diverge as the predicate tightens.</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-55279" src="https://www.percona.com/wp-content/uploads/2026/10/filtered-search.png" alt="" width="1972" height="790"><figcaption>Filtered recall and throughput against the fraction of rows passing the filter. A circled marker means that the engine returned fewer than k rows. pgvector is circled at both selectivities. Note the right-hand panel: Percona Search is the only line that rises as the filter tightens.</figcaption></figure>
<figure class="wp-block-table">
<table>
<caption>Filtered search at two selectivities, 500 queries per point, single client</caption>
<thead>
<tr>
<th rowspan="2">Engine</th>
<th rowspan="2">Strategy</th>
<th colspan="3">10% selective</th>
<th colspan="2">1% selective</th>
</tr>
<tr>
<th>Recall</th>
<th>QPS</th>
<th>p99</th>
<th>Recall</th>
<th>QPS</th>
</tr>
</thead>
<tbody>
<tr>
<td>Valkey</td>
<td>planned per query</td>
<td>0.9952</td>
<td>53.5</td>
<td>36 ms</td>
<td>0.9996</td>
<td>8.2</td>
</tr>
<tr>
<td>MariaDB 12.3</td>
<td>post-filter, keeps going</td>
<td>0.9896</td>
<td>16.4</td>
<td>322 ms</td>
<td>0.9796</td>
<td>0.5</td>
</tr>
<tr>
<td>AliSQL</td>
<td>post-filter, keeps going</td>
<td>0.9866</td>
<td>10.6</td>
<td>447 ms</td>
<td>0.9884</td>
<td>0.3</td>
</tr>
<tr>
<td>MariaDB 11.8</td>
<td>post-filter, keeps going</td>
<td>0.9646</td>
<td>13.0</td>
<td>366 ms</td>
<td>0.9724</td>
<td>0.4</td>
</tr>
<tr>
<td>Percona Search</td>
<td>pre-filter</td>
<td>0.8582</td>
<td>71.9</td>
<td>25 ms</td>
<td>0.8666</td>
<td>117.5</td>
</tr>
<tr>
<td>PostgreSQL</td>
<td>post-filter, stops</td>
<td>0.8594</td>
<td>227.5</td>
<td>6.4 ms</td>
<td>0.1034</td>
<td>237.1</td>
</tr>
</tbody>
</table>
</figure>
<p>Recall is scored against ground truth recomputed over the qualifying rows only. pgvector’s two recall figures are marked because its queries returned fewer than k rows: 224 of 500 at 10% selectivity, all 500 at 1%.</p>
<p>pgvector post-filters and then stops. It walks the graph, collects ef_search candidates, and drops the ones that fail the predicate. At 1% selectivity nearly all of them fail, so the query returns one or two rows where ten were asked for. No error, no warning, full speed. Recall 0.1034 is a short answer rather than a bad one. Iterative scan exists in pgvector 0.8 for this case and was not measured here, so this is the cost of the default. The default is what an application gets if nobody knows to change it.</p>
<p>MariaDB and AliSQL post-filter too, but keep searching until enough rows survive. Recall holds above 0.97 and throughput goes under one query a second, with a p99 of ten to thirteen seconds.</p>
<p>Percona Search pre-filters, which is why it is the only engine that gets faster as the predicate tightens: 71.9 QPS at 10% selectivity, 117.5 at 1%. Its recall is the lowest of the five that answer completely, 0.858 to 0.867, and that is the scalar quantization rather than the filter. Unquantized it reaches 0.997 on this corpus, at the same index size. Valkey plans per query and is the only engine that is both accurate and usable at 1%.</p>
<h2>Churn</h2>
<p>Delete 99,000 rows, re-insert the same 99,000, measure the index again.</p>
<figure class="wp-block-table">
<table>
<caption>Throughput and recall before and after re-inserting 10% of the corpus</caption>
<thead>
<tr>
<th>Engine</th>
<th>QPS before</th>
<th>QPS after</th>
<th>Change</th>
<th>Recall after</th>
<th>Re-insert rate</th>
</tr>
</thead>
<tbody>
<tr>
<td>PostgreSQL</td>
<td>244</td>
<td>245</td>
<td>+0.4%</td>
<td>0.9816</td>
<td>128 rows/s</td>
</tr>
<tr>
<td>Valkey</td>
<td>479</td>
<td>460</td>
<td>−4.0%</td>
<td>0.9742</td>
<td>137 rows/s</td>
</tr>
<tr>
<td>Percona Search</td>
<td>186</td>
<td>113</td>
<td>−39.2%</td>
<td>0.8416</td>
<td>20,223 rows/s</td>
</tr>
<tr>
<td>MariaDB 12.3</td>
<td>156</td>
<td>—</td>
<td>—</td>
<td>—</td>
<td>28.1 rows/s</td>
</tr>
<tr>
<td>MariaDB 11.8</td>
<td>152</td>
<td>—</td>
<td>—</td>
<td>—</td>
<td>22.8 rows/s</td>
</tr>
<tr>
<td>AliSQL</td>
<td>138</td>
<td>—</td>
<td>—</td>
<td>—</td>
<td>16.1 rows/s</td>
</tr>
</tbody>
</table>
</figure>
<figure class="wp-block-image size-large"><img decoding="async" loading="lazy" class="alignnone size-full wp-image-55281" src="https://www.percona.com/wp-content/uploads/2026/10/churn-throughput.png" alt="" width="1168" height="741"><figcaption>Throughput after churn as a fraction of throughput before it. Three engines, not six: MariaDB 11.8, MariaDB 12.3 and AliSQL never reached the post-churn measurement, for the reason below.</figcaption></figure>
<p>The three dashes are our bug, not an engine result. Each re-insert gets a wall-clock budget so a stalled write releases the machine instead of holding the run overnight. We set it to thirty minutes, sized against a Valkey defect where pipelined writes into an indexed prefix never returned. Thirty minutes is far too short for an engine doing the work slowly and correctly. MariaDB 12.3 got 51,480 rows of 99,000 in, MariaDB 11.8 got 41,580, AliSQL got 29,700, and the post-churn measurement never ran. The budget is two hours now. Recovering those three cells costs about 24 hours, most of it reloading the corpus.</p>
<p>The partial run still answers the question we wanted. Re-inserting into a populated index runs at 16 to 28 rows a second, against 41 to 76 for the initial load. Writing into an established graph costs two to three times what building it does, on all three engines. These re-inserts ran with no reader threads in the interpreter, which the records confirm, so the concurrency problem above does not touch them.</p>
<p>Percona Search loses 39%, the largest drop in the table, while recall goes 0.8432 to 0.8416. The index is not degrading, the throughput is. pgvector is flat because its repair path ran: <code>VACUUM (ANALYZE)</code> after the re-insert, the only maintenance hook any engine here exposes for this.</p>
<h2>What we got wrong</h2>
<ul>
<li><strong>Concurrent clients were threads sharing one interpreter lock.</strong> That made every multi-client figure conditional on something the figure did not state. The harness now records, for every window, the time-average number of queries outstanding and a robust estimate of how many were in service, and refuses the per-client division when the second falls below half the client count. Six points in this run are refused. The fix is each client in its own OS process. It is implemented and measured, and it changes what every multi-client number means, so it carries a measurement-version bump: numbers taken after it will not be charted beside numbers taken before it.</li>
<li><strong>At one client, the MySQL-family path spends a quarter of the window outside the query call.</strong> The other three spend none. Latency comparisons across those two groups carry that difference. Throughput comparisons do not.</li>
<li><strong>The churn budget was sized for a hang, not for slow correct work.</strong> It cost three cells.</li>
<li><strong>pgvector’s filtered numbers are the default configuration.</strong> Iterative scan was not measured, and it is the feature that addresses the failure we recorded.</li>
<li><strong>Graph degree is two points, not a curve.</strong> M = 6 and M = 16 for MHNSW and VIDX so they would have real measurements below recall 0.90. The other three ran at M = 16 only. M = 6 was worse than M = 16 everywhere above recall 0.88.</li>
<li><strong>One configuration, one machine, one run.</strong> The four engines built from source all used -march=x86-64-v3. The two installed from packages compile nothing of ours. Mixing that flag between engines would turn the comparison into a comparison of compiler flags, so it is recorded per engine in the manifest.</li>
</ul>
<p>The run manifest holds the host, the resolved budgets, the image IDs and the source commit of every engine, and the report generator refuses a run directory without one.</p>
<h2>What this means, and where it stops</h2>
<p>Choosing on this evidence: pgvector for concurrent traffic, where 4,798 QPS at a 10.8 ms p99 is an order of magnitude clear of the MySQL family, provided someone turns on iterative scan before shipping a filtered query. Valkey if the working set fits in memory and you need filters that are both accurate and fast; test its write path into an indexed prefix first. MariaDB 12.3 if the index has to be small and accurate and the traffic is a handful of concurrent clients. It is the fastest engine here at recall 0.99 and its index is a quarter the size of Percona Search’s. Percona Search if a tight predicate is the common case, since it is the only engine that speeds up as the filter narrows, and if a Technical Preview is acceptable. MariaDB 11.8 does nothing 12.3 does not do better. AliSQL builds slowest and has a latency cliff above ef_search 80.</p>
<p>Where it stops: one corpus at one dimensionality, one graph degree for half the field, one machine, one run, no profiling of the concurrency ceiling, and no second observation of anything. The numbers most likely to move under a re-run are the three missing churn cells and the six refused concurrency points. The least likely are build time, index size and recall, which agreed across earlier runs at two corpus sizes.</p>
<h2>Try it</h2>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag"><code>git clone https://github.com/Percona-Lab/vector-bench
cd vector-bench
./run-benchmark.sh build --engines all
./scripts/generate-dataset.sh dbpedia-openai-1000k-angular
./run-benchmark.sh run --profile tuned-complete --run-id 
./run-benchmark.sh report --run-dir  
  --datasets dbpedia-openai-1000k-angular</code></pre>
<p>All runs can take about 40 hours, nearly all of it the incremental builds. Smaller profiles exist for checking the pipeline before committing a machine for two days: <code>--profile dev</code> is about a minute per engine on a synthetic corpus, <code>--profile smoke</code> about 45 minutes per pass and it exercises every chart. The run directory keeps the records, the manifest, per-phase logs and memory timeseries, so any number here traces back to the process that produced it. Issues and corrections are welcome.</p>
<p><em>Run full-20260825, profile tuned-complete, tuned resource pass, dbpedia-openai-1000k-angular, 990,000 × 1,536, M = 16, k = 10. Versions: MariaDB 11.8.8, MariaDB 12.3.2, AliSQL 8.0.44-2, pgvector 0.8.6, Valkey 9.1.1 with valkey-search, Percona Search for MongoDB 1.70.3-1 on PSMDB 8.3.8-2. One run, all of it. Missing measurements are marked missing, not estimated. Charts are the ones the framework generates.  </em></p>
<p>The post <a href="https://www.percona.com/blog/benchmarking-vector-search-in-six-database-engines/">Benchmarking Vector search in six database engines</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/benchmarking-vector-search-in-six-database-engines/">Benchmarking Vector search in six database engines</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Percona Operator for MySQL 1.3.0: autopilot tuning, zero-data-loss async failover, encrypted PITR</title>
        <link>https://www.percona.com/blog/percona-operator-for-mysql-1-3-0/</link>
        <pubDate>Thu, 29 Oct 2026 14:24:47 +0000</pubDate>
        <dc:creator>Slava Sarzhan</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/percona-operator-for-mysql-1-3-0-autopilot-tuning-zero-data-loss-async-failover-encrypted-pitr/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>  Percona Operator for MySQL 1.3.0 is out. This release moves three things forward for teams running MySQL on Kubernetes: the operator now tunes MySQL for you based on the pod resources, async clusters can fail over without losing data in flight, and point-in-time recovery works on clusters where binary logs are encrypted at rest. … Continued<br />
The post Percona Operator for MySQL 1.3.0: autopilot tuning, zero-data-loss async failover, encrypted PITR appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/percona-operator-for-mysql-1-3-0/">Percona Operator for MySQL 1.3.0: autopilot tuning, zero-data-loss async failover, encrypted PITR</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><img decoding="async" loading="lazy" class="aligncenter wp-image-55250 size-full" src="https://www.percona.com/wp-content/uploads/2026/10/MDES-1186-Blog-image-Percona-Operator-for-MySQL-1.3.0-Hero-2400-x-880.png" alt="" width="2401" height="880"></p>
<p> </p>
<p><strong>Percona Operator for MySQL 1.3.0</strong> is out. This release moves three things forward for teams running MySQL on Kubernetes: the operator now tunes MySQL for you based on the pod resources, async clusters can fail over without losing data in flight, and point-in-time recovery works on clusters where binary logs are encrypted at rest.</p>
<p>The headline features in this post are <strong>automatic MySQL configuration tuning</strong>, <strong>zero data loss failover for asynchronous clusters</strong>, and <strong>encrypted binary logs for point-in-time recovery</strong>. Each of them removes a step that teams were doing by hand, or a case they had to accept as a known gap.</p>
<p>As with every operator release, most of what shipped came from what the community asked for on <a href="https://forums.percona.com/" rel="nofollow">forums.percona.com</a> and in <a href="https://perconadev.atlassian.net/browse/K8SPS" rel="nofollow">JIRA</a>. The operator is open source and runs on any CNCF-conformant Kubernetes.</p>
<p>In this post, you’ll learn about:</p>
<ul>
<li>Important upgrade notes you should read before you touch <code>1.3.0</code></li>
<li>Automatic MySQL configuration tuning (and how it hot-applies without a restart)</li>
<li>Zero data loss failover for asynchronous clusters</li>
<li>Encrypted binary logs for point-in-time recovery</li>
<li>Other improvements in the release</li>
</ul>
<div class="markdown-heading">
 </p>
<h2 class="heading-element">Before you upgrade</h2>
<p>Two defaults changed in <code>1.3.0</code>. Review both before upgrading.</p>
</div>
<div class="markdown-heading">
 </p>
<h3 class="heading-element">Leader election is on by default</h3>
<p>The operator now runs with leader election enabled out of the box. In every realistic deployment this is what you want. If you have a single-replica controller and want the old behavior for a specific reason (local development, debugging), set the <code>PSO_LEADER_ELECTION_ENABLED</code> environment variable on the operator Deployment to <code>false</code>.</p>
</div>
<div class="markdown-heading">
 </p>
<h3 class="heading-element">Asynchronous clusters now require backups</h3>
<p>This is the one that will trip an upgrade. In <code>1.3.0</code>, async clusters must have backups enabled, because the zero data loss failover feature (below) relies on reading binary logs from the failed primary. If backups are not configured on an async cluster, the operator refuses to reconcile.</p>
</div>
<p>You have two options:</p>
<ol>
<li><strong>Enable backups</strong> on the cluster (the recommended path). See the <a href="https://docs.percona.com/percona-operator-for-mysql/ps/backups.html" rel="nofollow">backups documentation</a>.</li>
<li><strong>Explicitly opt out</strong> of zero data loss failover by setting the escape hatch:
<div class="highlight highlight-source-yaml">
<pre class="urvanov-syntax-highlighter-plain-tag">spec:
  unsafeFlags:
    asyncFailoverWithPossibleDataLoss: true</pre>
</div>
<p>This restores the pre-<code>1.3.0</code> behavior: fast failover, but transactions committed on the old primary that had not yet reached the chosen replica are lost.</p>
</li>
</ol>
<p>Group Replication clusters are unaffected by this change.</p>
<div class="markdown-heading">
 </p>
<h2 class="heading-element">Automatic MySQL configuration tuning</h2>
<p><img decoding="async" loading="lazy" class="aligncenter wp-image-55238 size-large" src="https://www.percona.com/wp-content/uploads/2026/10/autotune-1024x420.png" alt="" width="1024" height="420"></p>
<div class="markdown-heading">
 </p>
<h3 class="heading-element">Why it matters</h3>
<p>Tuning MySQL by hand for a given pod shape is work most teams do once and then forget. When the pod resource limits change, the hand-tuned values rarely follow. 1.3.0 adds a first-class <code>autoConfig</code> block to the CR so the operator computes the MySQL configuration from the pod’s CPU and memory, and the workload shape you declare.</p>
</div>
<div class="markdown-heading">
 </p>
<h3 class="heading-element">How it works</h3>
<p>The relevant fields live under <code>spec.mysql.autoConfig</code>. <code>enabled</code> turns the feature on, <code>loadType</code> tells the operator the workload shape, and <code>version</code> tells it which MySQL version to tune for. The accepted <code>loadType</code> values are <code>mostlyReads</code>, <code>someWrites</code>, <code>equalReadsWrites</code>, and <code>heavyWrites</code>. The version string follows the <code>X.Y.Z</code> MySQL version format.</p>
</div>
<p>The CRD enforces that <code>mysql.resources</code> sets both CPU and memory when <code>autoConfig.enabled</code> is true. Without those limits, the operator has no basis for its calculation.</p>
<div class="markdown-heading">
 </p>
<h3 class="heading-element">Dynamic configuration changes</h3>
<p>Where a MySQL variable allows it, the operator applies configuration changes with <code>SET GLOBAL</code> instead of a restart. Static variables still require a restart, which the operator rolls through pods one at a time.</p>
</div>
<div class="markdown-heading">
 </p>
<h3 class="heading-element">Wiring it up</h3>
<p>The following block comes from the sample CR in the operator repository:</p>
</div>
<div class="highlight highlight-source-yaml">
<pre class="urvanov-syntax-highlighter-plain-tag">apiVersion: ps.percona.com/v1
kind: PerconaServerMySQL
metadata:
  name: cluster1
spec:
  mysql:
    size: 3
    resources:
      limits:
        memory: 8Gi
        cpu: 4
    autoConfig:
      enabled: true
      loadType: someWrites
      version: 8.4.0</pre>
</div>
<p>With that block, the operator sizes the buffer pool and friends from the 8 GiB / 4 CPU limits, biases the configuration toward a mixed workload with some writes, and tunes for MySQL 8.4.0. Change the limits or the load type and the operator recomputes.</p>
<div class="markdown-heading">
 </p>
<h2 class="heading-element">Zero data loss failover for asynchronous clusters<br />
<img decoding="async" loading="lazy" class="aligncenter wp-image-55239 size-large" src="https://www.percona.com/wp-content/uploads/2026/10/zero-data-loss-failover-1024x461.png" alt="" width="1024" height="461"></h2>
<div class="markdown-heading">
 </p>
<h3 class="heading-element">Why it matters</h3>
<p>Async MySQL replication, by definition, acknowledges a transaction to the client before any replica has it. If the primary dies with transactions in its binary log that no replica has read yet, those transactions are gone, even with a well-configured HA controller.</p>
</div>
<div class="markdown-heading">
 </p>
<h3 class="heading-element">How it works</h3>
<p>The operator extends the xtrabackup sidecar on every MySQL pod with a <code>POST /failover/stream</code> endpoint on port 6450 that serves binary logs as a tar stream. When the primary fails, the failover tool runs on the chosen replica.</p>
</div>
<p> </p>
<h3 class="heading-element">The salvage sequence</h3>
<ol>
<li>Probe the failed primary and stand down if it has come back.</li>
<li>Stop replication and flush relay logs.</li>
<li>Read <code>Source_Log_File</code> and <code>Read_Source_Log_Pos</code> to find the gap.</li>
<li>Fetch the missing binary logs from the failed primary’s sidecar.</li>
<li>Trim the fetched binlogs back to their last complete transaction.</li>
<li>Splice them into the latest closed relay log.</li>
<li>Start the SQL thread and wait until every missing transaction is applied.</li>
</ol>
<p>Only then does the orchestrator promote the chosen replica.</p>
<div class="markdown-heading">
 </p>
<h3 class="heading-element">Timeouts and the escape hatch</h3>
<p>The failover has a budget. By default, the failover tool waits up to one hour for the source pod to become reachable and apply the missing transactions. When the budget expires, the <code>on-timeout</code> policy decides what happens: <code>Abort</code> holds the cluster, or <code>ForceWithPossibleDataLoss</code> promotes anyway. The budget is counted from the first attempt, not per retry.</p>
</div>
<p>Because the mechanism requires the failed primary’s pod to be reachable (its <code>mysqld</code> can be down, but its sidecar must answer), the CRD now validates that backups are enabled on async clusters. To opt out of this gate and restore the pre-1.3.0 behavior, set <code>spec.unsafeFlags.asyncFailoverWithPossibleDataLoss: true</code>.</p>
<div class="markdown-heading">
 </p>
<h2 class="heading-element">Encrypted binary logs for point-in-time recovery</h2>
<p><img decoding="async" loading="lazy" class="aligncenter wp-image-55240 size-large" src="https://www.percona.com/wp-content/uploads/2026/10/encrypted-pitr-1024x420.png" alt="" width="1024" height="420"></p>
<div class="markdown-heading">
 </p>
<h3 class="heading-element">Why it matters</h3>
<p>The operator’s binlog server ships binary logs to object storage for point-in-time recovery. In 1.3.0 those shipped files can be encrypted at rest, with the key material held in a Kubernetes Secret instead of being carried on each MySQL pod.</p>
</div>
<div class="markdown-heading">
 </p>
<h3 class="heading-element">How it works</h3>
<p>The binlog server uses envelope encryption. A per-file data encryption key (DEK) encrypts each binlog file. That DEK is itself wrapped under a key encryption key (KEK) that the operator reads from a keyring Secret. The CR surfaces three fields for this:</p>
</div>
<ul>
<li><code>spec.backup.pitr.binlogServer.storage.encryption.cipher</code> picks the symmetric cipher (<code>AES-256-CTR</code> by default).</li>
<li><code>spec.backup.pitr.binlogServer.storage.encryption.kekId</code> names the KEK entry inside the keyring.</li>
<li><code>spec.backup.pitr.binlogServer.keyringSecret</code> points at the Kubernetes Secret that holds the keyring file (default key <code>keyring.json</code>).</li>
</ul>
<p>On the restore side, the PITR tool reads the keyring, finds the KEK named in the file’s metadata, unwraps the file key, and streams the decrypted events through <code>mysqlbinlog</code> into the restored MySQL. If the keyring is missing or the named KEK is not in it, the restore fails fast with an explicit error rather than producing partially restored data.</p>
<div class="markdown-heading">
 </p>
<h3 class="heading-element">Wiring it up</h3>
<p>Enable PITR with an encrypted binlog server. The relevant block in the CR is <code>spec.backup.pitr.binlogServer</code>, which carries its own <code>encryption</code> sub-block and a reference to the keyring secret:</p>
</div>
<div class="highlight highlight-source-yaml">
<pre class="urvanov-syntax-highlighter-plain-tag">apiVersion: ps.percona.com/v1
kind: PerconaServerMySQL
metadata:
  name: cluster1
spec:
  backup:
    enabled: true
    pitr:
      enabled: true
      binlogServer:
        storage:
          encryption:
            cipher: AES-256-CTR
            kekId: alpha
          s3:
            bucket: S3-BACKUP-BUCKET-NAME-HERE
            credentialsSecret: ps-cluster1-s3-credentials
            endpointUrl: https://s3.amazonaws.com
            region: us-west-2
        keyringSecret:
          key: keyring.json
          name: ps-cluster1-binlog-server-keyring</pre>
</div>
<p>The <code>encryption.cipher</code> and <code>encryption.kekId</code> fields are what tell the binlog server to encrypt shipped binary logs at rest. The <code>keyringSecret</code> provides the master key material.</p>
<div class="markdown-heading">
 </p>
<h2 class="heading-element">Other improvements</h2>
<p>The release notes have the full list with ticket IDs. The highlights:</p>
</div>
<ul>
<li><strong>Application users managed in the CR</strong>: declare application users in the top-level <code>spec.users</code> list, each with <code>name</code>, optional <code>passwordSecretRef</code>, <code>dbs</code>, <code>hosts</code>, <code>grants</code>, and <code>withGrantOption</code>.</li>
<li><strong>Custom CA for S3-compatible storage</strong>: the backup path now accepts a custom CA bundle, which lets you point at private MinIO or S3-compatible endpoints behind a corporate certificate authority.</li>
<li><strong>cert-manager ClusterIssuer support</strong>: the TLS block can reference a cluster-scoped issuer instead of a namespaced one.</li>
<li><strong>TLS rotation without a restart</strong>: the operator merges old and new CA, hot-reloads leaves, and drops the old root once propagation is confirmed.</li>
<li><strong>Backup deadlines</strong>: a backup that exceeds its deadline fails fast with a clear status instead of hanging.</li>
<li><strong>Configurable leader election</strong>: tune the leader-election parameters via <code>PSO_LEADER_ELECTION_*</code> environment variables on the operator Deployment.</li>
<li><strong>Persistent operator logging</strong>: operator logs survive controller restarts.</li>
<li><strong>DigitalOcean Kubernetes (DOKS) support</strong> as an officially supported platform.</li>
<li><strong>MySQL 9.7</strong> added to the supported-version matrix.</li>
<li><strong>Replication type switch (tech preview)</strong>, <strong>ClusterSet rejoin</strong>, <strong>replication lag reporting</strong>, <strong>even-sized async clusters</strong>, and <strong>async bootstrap from backup</strong> round out the async and multi-cluster story.</li>
</ul>
<div class="markdown-heading">
 </p>
<h2 class="heading-element">Conclusion</h2>
<p>Percona Operator for MySQL 1.3.0 tightens the parts of a MySQL platform that reviews and on-call rotations care about most: autoconfig gives each pod the configuration its CPU and memory actually warrant, zero data loss failover salvages the transactions stranded on a failed primary before promoting a replica, and encrypted binlog shipping lets point-in-time recovery stay on, under keys you control, for clusters where encryption at rest is a hard requirement. Application users in the CR, custom CAs for private S3 endpoints, and in-place TLS rotation move more day-two work out of runbooks and into the spec. If there is a workflow you still script around the operator, tell us on the forum, since that is where releases like this one come from.</p>
</div>
<div class="markdown-heading">
 </p>
<h2 class="heading-element">Try It Out</h2>
</div>
<ul>
<li><strong>Release notes</strong>: <a href="https://docs.percona.com/percona-operator-for-mysql/latest/ReleaseNotes/Kubernetes-Operator-for-PS-RN1.3.0.html" rel="nofollow">Percona Operator for MySQL 1.3.0 Release Notes</a></li>
<li><strong>GitHub</strong>: <a href="https://github.com/percona/percona-server-mysql-operator/tree/v1.3.0">percona/percona-server-mysql-operator</a></li>
<li><strong>Documentation</strong>: <a href="https://docs.percona.com/percona-operator-for-mysql/latest/" rel="nofollow">docs.percona.com/percona-operator-for-mysql/ps</a></li>
<li><strong>Community Forum</strong>: <a href="https://forums.percona.com/" rel="nofollow">forums.percona.com</a></li>
</ul>
</div>
</div>
</div>
<p>The post <a href="https://www.percona.com/blog/percona-operator-for-mysql-1-3-0/">Percona Operator for MySQL 1.3.0: autopilot tuning, zero-data-loss async failover, encrypted PITR</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/percona-operator-for-mysql-1-3-0/">Percona Operator for MySQL 1.3.0: autopilot tuning, zero-data-loss async failover, encrypted PITR</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Inner Join: Oleg Smirnov on parallel query execution</title>
        <link>https://mariadb.org/inner-join-oleg-smirnov-on-parallel-query-execution/</link>
        <pubDate>Thu, 29 Oct 2026 12:55:57 +0000</pubDate>
        <dc:creator>Simona Aleksandrova</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/inner-join-oleg-smirnov-on-parallel-query-execution/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB Server has executed every query on a single thread since the beginning. That is changing. In the first episode of Inner Join, our new video series with the engineers of the MariaDB core team, I sat down with Oleg Smirnov of the Optimizer team to talk about parallel query execution: why it took this […]<br />
Inner Join: Oleg Smirnov on parallel query execution appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/inner-join-oleg-smirnov-on-parallel-query-execution/">Inner Join: Oleg Smirnov on parallel query execution</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Server has executed every query on a single thread since the beginning. That is changing. In the first episode of Inner Join, our new video series with the engineers of the MariaDB core team, I sat down with Oleg Smirnov of the Optimizer team to talk about parallel query execution: why it took this […]</p>
<p><a href="https://mariadb.org/inner-join-oleg-smirnov-on-parallel-query-execution/">Inner Join: Oleg Smirnov on parallel query execution</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/inner-join-oleg-smirnov-on-parallel-query-execution/">Inner Join: Oleg Smirnov on parallel query execution</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Getting Started with Percona PostgreSQL Operator</title>
        <link>https://percona.community/blog/2026/10/29/getting-started-with-percona-postgresql-operator/</link>
        <pubDate>Thu, 29 Oct 2026 07:04:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/getting-started-with-percona-postgresql-operator/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>I’m a long term user of MySQL with both asynchronous replication and synchronous with PXC. For a while now this has been on Kubernetes with either Helm deployments or more recently operator deployments. I felt it was time to dip my toe into the world of PostgreSQL as it’s become more and more popular (or certainly appears to be).</p>
<p><a href="https://percona.community/blog/2026/10/29/getting-started-with-percona-postgresql-operator/">Getting Started with Percona PostgreSQL Operator</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>I’m a long term user of MySQL with both asynchronous replication and synchronous with PXC. For a while now this has been on Kubernetes with either Helm deployments or more recently operator deployments. I felt it was time to dip my toe into the world of PostgreSQL as it’s become more and more popular (or certainly appears to be).</p>
<p>My learning style has always been to jump right in a see what i can break so nowadays I normally build a repeatable throwaway Kubernetes setup with <a href="https://kind.sigs.k8s.io/" target="_blank" rel="noopener noreferrer">Kind</a> where i can play and destroy quickly in a repeatable environment.</p>
<p>I have recently built a set of <a href="https://github.com/statefulops/kind-scripts" target="_blank" rel="noopener noreferrer">base kind stacks</a> that I can reuse as i was constantly rebuilding stacks with slightly different configs so i wanted to start standardising them.</p>
<p>Full disclaimer I’ve used this setup on an Arm MacBook. I’m assuming it will work on Linux pretty much the same but for Windows I have no idea. I’ve not touched Windows in a long time but it <em>should</em> work them same.</p>
<p>Installing kind is pretty simple and will depend on your host O/S &#8211; full details are <a href="https://kind.sigs.k8s.io/docs/user/quick-start/" target="_blank" rel="noopener noreferrer">here</a></p>
<p>The scripts used below can be found in <a href="https://github.com/statefulops/postgres-scripts/tree/main" target="_blank" rel="noopener noreferrer">Github</a> in the directory <code>Percona-Operator</code></p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">git clone https://github.com/statefulops/postgres-scripts.git</span></span></code></pre>
</div>
</div>
</div>
<h2>Deploy a base cluster with an object store</h2>
<p>The first step is to deploy a multi-node Kind cluster with a way of simulating an S3 compatible object store (in this example using <a href="https://rustfs.com/" target="_blank" rel="noopener noreferrer">RustFS</a>). Using something like RustFS ensure we are avoiding any cloud costs when testing backups and restores.</p>
<p>The quick and dangerous way is to run a script from Github</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">curl -fsSL https://raw.githubusercontent.com/statefulops/kind-scripts/main/s3/create-cluster.sh <span class="p">|</span> bash -s -- v1.37.0 percona-pg</span></span></code></pre>
</div>
</div>
</div>
<p>The safer way is to download the script, check it’s not doing anything harmfull and then execute it yourself</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-2" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">curl -fsSL https://raw.githubusercontent.com/statefulops/kind-scripts/main/s3/create-cluster.sh -o create-cluster.sh
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">less create-cluster.sh
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">chmod +x create-cluster.sh
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">./create-cluster.sh v1.37.0 percona-pg</span></span></code></pre>
</div>
</div>
</div>
<p>This will deploy a Master node and 3 workers with zone labels, and a container running RustFS. Using Kubernetes 1.37. I tend to always use Zone labels even locally as it simulates multiple zone deployments.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-3" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">kubectl get nodes -L topology.kubernetes.io/zone</span></span></code></pre>
</div>
</div>
</div>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-4" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">NAME STATUS ROLES AGE VERSION ZONE
</span></span><span class="line"><span class="cl">percona-pg-control-plane Ready control-plane 3m39s v1.37.0
</span></span><span class="line"><span class="cl">percona-pg-worker Ready  3m25s v1.37.0 AZ-A
</span></span><span class="line"><span class="cl">percona-pg-worker2 Ready  3m25s v1.37.0 AZ-B
</span></span><span class="line"><span class="cl">percona-pg-worker3 Ready  3m25s v1.37.0 AZ-C</span></span></code></pre>
</div>
</div>
</div>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-5" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">kubectl get po -n rustfs</span></span></code></pre>
</div>
</div>
</div>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-6" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">NAME READY STATUS RESTARTS AGE
</span></span><span class="line"><span class="cl">rustfs-574c7b89d7-5dl4d 1/1 Running 0 4m1s</span></span></code></pre>
</div>
</div>
</div>
<p>A nodeport is set automatically so the RustFS UI will be available on <a href="http://localhost:9001/" target="_blank" rel="noopener noreferrer">http://localhost:9001</a>. The user is set to <em>myadminuser</em> and the script sets a random value for the secret password in a Kubernetes secret. To get the password run</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-7" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">kubectl get secret rustfs-admin-credentials -n rustfs -o <span class="nv">jsonpath</span><span class="o">=</span><span class="s1">'{.data.secret-key}'</span> <span class="p">|</span> base64 -d</span></span></code></pre>
</div>
</div>
</div>
<p>UI on <a href="http://localhost:9001/" target="_blank" rel="noopener noreferrer">http://localhost:9001</a></p>
<p><figure><img decoding="async" width="2318" height="1206" src="https://percona.community/blog/2026/10/getting-started-pg-rustfs-logon_hu_d2b2c89d1f4111d4.webp" alt="Rust FS Login" loading="lazy"></figure>
</p>
<p><figure><img decoding="async" width="3398" height="696" src="https://percona.community/blog/2026/10/getting-started-pg-rustfs-ui_hu_47774d553765ae19.webp" alt="Rust FS UI" loading="lazy"></figure>
</p>
<p>Standard AWS CLI commands work as well &#8211; make sure you run the make_bucket command is it is needed later.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-8" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="nb">export</span> <span class="nv">AWS_ACCESS_KEY_ID</span><span class="o">=</span>myadminuser
</span></span><span class="line"><span class="cl"><span class="nb">export</span> <span class="nv">AWS_SECRET_ACCESS_KEY</span><span class="o">=</span><span class="k">$(</span>kubectl get secret rustfs-admin-credentials -n rustfs -o <span class="nv">jsonpath</span><span class="o">=</span><span class="s1">'{.data.secret-key}'</span> <span class="p">|</span> base64 -d<span class="k">)</span>
</span></span><span class="line"><span class="cl"><span class="nb">export</span> <span class="nv">AWS_DEFAULT_REGION</span><span class="o">=</span>us-east-1
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">aws --endpoint-url http://localhost:9000 s3 mb s3://my-kind-bucket</span></span></code></pre>
</div>
</div>
</div>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-9" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">make_bucket: my-kind-bucket</span></span></code></pre>
</div>
</div>
</div>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-10" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">aws --endpoint-url http://localhost:9000 s3 ls</span></span></code></pre>
</div>
</div>
</div>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-11" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">2026-10-12 12:14:49 my-kind-bucket</span></span></code></pre>
</div>
</div>
</div>
<h2>Install the Percona PostgreSQL Operator 3.1.0</h2>
<p>Add the Percona Helm repo:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-12" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">helm repo add percona https://percona.github.io/percona-helm-charts/
</span></span><span class="line"><span class="cl">helm repo update</span></span></code></pre>
</div>
</div>
</div>
<p>Safety check — only ever run this against a local kind cluster: <em>I might have learnt this lesson the hard way</em> <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-13" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="nv">CURRENT_CONTEXT</span><span class="o">=</span><span class="k">$(</span>kubectl config current-context<span class="k">)</span>
</span></span><span class="line"><span class="cl"><span class="k">case</span> <span class="s2">"</span><span class="nv">$CURRENT_CONTEXT</span><span class="s2">"</span> in
</span></span><span class="line"><span class="cl">*kind*<span class="o">)</span> <span class="nb">echo</span> <span class="s2">"OK: using kind context '</span><span class="nv">$CURRENT_CONTEXT</span><span class="s2">'"</span> <span class="p">;;</span>
</span></span><span class="line"><span class="cl">*<span class="o">)</span> <span class="nb">echo</span> <span class="s2">"ABORT: context '</span><span class="nv">$CURRENT_CONTEXT</span><span class="s2">' is not a kind cluster"</span><span class="p">;</span> <span class="nb">exit</span> <span class="m">1</span> <span class="p">;;</span>
</span></span><span class="line"><span class="cl"><span class="k">esac</span></span></span></code></pre>
</div>
</div>
</div>
<p>Install the operator and switch to its namespace:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-14" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">kubectl create namespace pg-operator
</span></span><span class="line"><span class="cl">helm install ps-operator percona/pg-operator --namespace pg-operator</span></span></code></pre>
</div>
</div>
</div>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-15" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">NAME: ps-operator
</span></span><span class="line"><span class="cl">LAST DEPLOYED: Mon Oct 12 12:48:30 2026
</span></span><span class="line"><span class="cl">NAMESPACE: pg-operator
</span></span><span class="line"><span class="cl">STATUS: deployed
</span></span><span class="line"><span class="cl">REVISION: 1
</span></span><span class="line"><span class="cl">DESCRIPTION: Install complete
</span></span><span class="line"><span class="cl">TEST SUITE: None
</span></span><span class="line"><span class="cl">NOTES:
</span></span><span class="line"><span class="cl">1. Percona Operator for PostgreSQL is deployed.
</span></span><span class="line"><span class="cl"> See if the operator Pod is running:
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> kubectl get pods -l app.kubernetes.io/name=pg-operator --namespace pg-operator
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> Check the operator logs if the Pod is not starting:
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> export POD=$(kubectl get pods -l app.kubernetes.io/name=pg-operator --namespace pg-operator --output name)
</span></span><span class="line"><span class="cl"> kubectl logs $POD --namespace=pg-operator
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">2. Deploy the database cluster from pg-db chart:
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> helm install my-db percona/pg-db --namespace=pg-operator
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Read more in our documentation: https://docs.percona.com/percona-operator-for-postgresql/2.0/</span></span></code></pre>
</div>
</div>
</div>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-16" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">kubectl config set-context --current --namespace<span class="o">=</span>pg-operator</span></span></code></pre>
</div>
</div>
</div>
<h2>Create a Cluster and Connect to it</h2>
<p>The sample deployment which comes with the operator repo is, in my view, too complex to start with so I’ve created some simple ones</p>
<p>Review <code>cr-simple.yaml</code> and check what it’s going to do, then apply it to the kind cluster. It will deploy a 3 Postgres pods and 3 PGBouncer pods.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-17" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">kubectl apply -f cr-simple.yaml</span></span></code></pre>
</div>
</div>
</div>
<p>Check the status and wait for it to become Ready</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-18" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">kubectl get perconapgcluster</span></span></code></pre>
</div>
</div>
</div>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-19" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">NAME ENDPOINT STATUS POSTGRES PGBOUNCER AGE
</span></span><span class="line"><span class="cl">cluster1 cluster1-pgbouncer.pg-operator.svc ready 3 3 2m13s</span></span></code></pre>
</div>
</div>
</div>
<p>Once is is ready check the pods are running ok, you should have something similar to this</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-20" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">kubectl get po -o wide</span></span></code></pre>
</div>
</div>
</div>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-21" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">NAME READY STATUS RES AGE IP NODE
</span></span><span class="line"><span class="cl">cluster1-backup-24fx-jqd4c 0/1 Completed 0 41h 10.244.1.7 percona-pg-worker
</span></span><span class="line"><span class="cl">cluster1-backup-xr9r-2ltht 0/1 Completed 0 41h 10.244.1.6 percona-pg-worker
</span></span><span class="line"><span class="cl">cluster1-instance1-8nz4-0 6/6 Running 0 41h 10.244.3.8 percona-pg-worker3
</span></span><span class="line"><span class="cl">cluster1-instance1-bzbc-0 6/6 Running 0 41h 10.244.1.8 percona-pg-worker
</span></span><span class="line"><span class="cl">cluster1-instance1-mp4b-0 6/6 Running 0 18h 10.244.4.10 percona-pg-worker2
</span></span><span class="line"><span class="cl">cluster1-pgbouncer-6744b67fcc-5djhn 2/2 Running 0 41h 10.244.1.4 percona-pg-worker
</span></span><span class="line"><span class="cl">cluster1-pgbouncer-6744b67fcc-rpngj 2/2 Running 0 41h 10.244.4.6 percona-pg-worker2
</span></span><span class="line"><span class="cl">cluster1-pgbouncer-6744b67fcc-zx75p 2/2 Running 0 41h 10.244.3.4 percona-pg-worker3
</span></span><span class="line"><span class="cl">cluster1-repo-host-0 2/2 Running 0 41h 10.244.3.7 percona-pg-worker3
</span></span><span class="line"><span class="cl">ps-operator-pg-operator-8575f47647-rbr77 1/1 Running 0 41h 10.244.1.2 percona-pg-worker</span></span></code></pre>
</div>
</div>
</div>
<p>To connect to the cluster get the generated credentials from the Kubernetes secret</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-22" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="nv">PGBOUNCER_URI</span><span class="o">=</span><span class="k">$(</span>kubectl get secret cluster1-pguser-cluster1 -o <span class="nv">jsonpath</span><span class="o">=</span><span class="s1">'{.data.pgbouncer-uri}'</span> <span class="p">|</span> base64 --decode<span class="k">)</span></span></span></code></pre>
</div>
</div>
</div>
<p>Then deploy a standalone container and pass the credentials to create a command prompt on the running cluster.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-23" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">kubectl run -i --rm --tty pg-client --image<span class="o">=</span>percona/percona-distribution-postgresql:18.6.1-1 --restart<span class="o">=</span>Never -- psql <span class="nv">$PGBOUNCER_URI</span></span></span></code></pre>
</div>
</div>
</div>
<p>Run a SQL command to find the IP of the pod we are connected to.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-24" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="nv">cluster1</span><span class="o">=</span>&gt; SELECT inet_server_addr<span class="o">()</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-25" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl"> inet_server_addr
</span></span><span class="line"><span class="cl">------------------
</span></span><span class="line"><span class="cl"> 10.244.3.8
</span></span><span class="line"><span class="cl">(1 row)</span></span></code></pre>
</div>
</div>
</div>
<p>In this case we are connected to <code>cluster1-instance1-8nz4-0</code> which is the current Primary pod. To find the current role of the pod look at it’s labels.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-26" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">kubectl describe po cluster1-instance1-8nz4-0<span class="p">|</span>grep role
</span></span><span class="line"><span class="cl"> postgres-operator.crunchydata.com/role<span class="o">=</span>primary</span></span></code></pre>
</div>
</div>
</div>
<p>The other nodes are marked as Replicas</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-27" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"> kubectl describe po cluster1-instance1-mp4b-0<span class="p">|</span>grep role
</span></span><span class="line"><span class="cl"> postgres-operator.crunchydata.com/role<span class="o">=</span>replica
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> kubectl describe po cluster1-instance1-bzbc-0<span class="p">|</span>grep role
</span></span><span class="line"><span class="cl"> postgres-operator.crunchydata.com/role<span class="o">=</span>replica</span></span></code></pre>
</div>
</div>
</div>
<p>The actual route from the standalone container in reality involved a few hops</p>
<div>
<p><figure><img decoding="async" width="524" height="655" src="https://percona.community/blog/2026/10/getting-started-pg-cluster-overview_hu_d0c40cefb9e0dc7d.webp" alt="Overview" loading="lazy"></figure>
</p>
</div>
<p>The host in the <code>PGBOUNCER_URI</code> points to the service <code>cluster-1-pgbouncer</code> which routes the connection to one of the pg_bouncer pods. The connection is then passed through two more services,<code> cluster-1-primary</code> and <code>cluster-1-ha</code>, to reach the current primary. Current being <code>cluster1-instance1-8nz4-0</code>.</p>
<p>The failover is controlled by <a href="https://github.com/patroni/patroni" target="_blank" rel="noopener noreferrer">patroni</a> which will detect when a primary node fails and will promote a new Primary. To test this kill the current primary node.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-28" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">kubectl delete po cluster1-instance1-8nz4-0
</span></span><span class="line"><span class="cl">pod <span class="s2">"cluster1-instance1-8nz4-0"</span> deleted from pg-operator namespace</span></span></code></pre>
</div>
</div>
</div>
<p>and one of the Replicas will be promoted into it’s place</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-29" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">kubectl describe po cluster1-instance1-mp4b-0<span class="p">|</span>grep role
</span></span><span class="line"><span class="cl"> postgres-operator.crunchydata.com/role<span class="o">=</span>primary</span></span></code></pre>
</div>
</div>
</div>
<p>If you test the connection again you should end up on the new Primary</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-30" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"> kubectl run -i --rm --tty pg-client --image<span class="o">=</span>percona/percona-distribution-postgresql:18.6.1-1 --restart<span class="o">=</span>Never -- psql <span class="nv">$PGBOUNCER_URI</span></span></span></code></pre>
</div>
</div>
</div>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-31" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="nv">cluster1</span><span class="o">=</span>&gt; SELECT inet_server_addr<span class="o">()</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> inet_server_addr
</span></span><span class="line"><span class="cl">------------------
</span></span><span class="line"><span class="cl"> 10.244.4.10
</span></span><span class="line"><span class="cl"><span class="o">(</span><span class="m">1</span> row<span class="o">)</span></span></span></code></pre>
</div>
</div>
</div>
<p>and the old Primary has been added back into the cluster as a Replica</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-32" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">kubectl describe po cluster1-instance1-8nz4-0<span class="p">|</span>grep role
</span></span><span class="line"><span class="cl"> postgres-operator.crunchydata.com/role<span class="o">=</span>replica</span></span></code></pre>
</div>
</div>
</div>
<h2>Run a Backup and verify it worked</h2>
<p>The next step is try a backup to an object store, in this case the local RustFS container. This is the part where I initially struggled as the setup I’ve used for testing MySQL and PXC didn’t initially work. After much chatting with AI we jointly realised that pgBackRest ALWAYS speaks TLS to an S3 endpoint so TLS needs enabling first on the rustFS container.</p>
<p>Running the <code>rust-enable-tls.sh</code> script enables this.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-33" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">./rust-enable-tls.sh</span></span></code></pre>
</div>
</div>
</div>
<p>To create a backup the Operator needs a secret containing the Access key and Secret Key for the object store. This can be created in a couple of ways:</p>
<p>The quick one-line version</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-34" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="nb">printf</span> <span class="s1">'[global]nrepo2-s3-key=%snrepo2-s3-key-secret=%sn'</span> <span class="se">
</span></span></span><span class="line"><span class="cl"> <span class="s2">"</span><span class="k">$(</span>kubectl get secret rustfs-admin-credentials -n rustfs -o <span class="nv">jsonpath</span><span class="o">=</span><span class="s1">'{.data.access-key}'</span> <span class="p">|</span> base64 -d<span class="k">)</span><span class="s2">"</span> <span class="se">
</span></span></span><span class="line"><span class="cl"> <span class="s2">"</span><span class="k">$(</span>kubectl get secret rustfs-admin-credentials -n rustfs -o <span class="nv">jsonpath</span><span class="o">=</span><span class="s1">'{.data.secret-key}'</span> <span class="p">|</span> base64 -d<span class="k">)</span><span class="s2">"</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="p">|</span> kubectl create secret generic cluster1-pgbackrest-secrets -n pg-operator <span class="se">
</span></span></span><span class="line"><span class="cl"> --from-file<span class="o">=</span>s3.conf<span class="o">=</span>/dev/stdin --dry-run<span class="o">=</span>client -o yaml <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="p">|</span> kubectl apply -f -</span></span></code></pre>
</div>
</div>
</div>
<p>or by encoding the secret key into the <code>s3.conf</code> section in <code>backup_secret.yaml</code> and applying it.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-35" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">kubectl get secret rustfs-admin-credentials -n rustfs -o <span class="nv">jsonpath</span><span class="o">=</span><span class="s1">'{.data.secret-key}'</span> <span class="p">|</span> base64 -d
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">cat <span class="s">&lt;</span></span><span class="line"><span class="cl"><span class="s">[global]
</span></span></span><span class="line"><span class="cl"><span class="s">repo2-s3-key=myadminuser
</span></span></span><span class="line"><span class="cl"><span class="s">repo2-s3-key-secret
</span></span></span><span class="line"><span class="cl"><span class="s">EOF</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">vi backup_secret.yaml
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nb">set</span> the s3.conf: and add the string from the <span class="nb">command</span> cat <span class="nb">command</span> above
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">kubectl apply -f backup_secret.yaml</span></span></span></code></pre>
</div>
</div>
</div>
<p>The cluster now needs to be configured to backup to the bucket by applying <code>cr-backup.yaml</code>. This will add a new backup location <code>repo2</code> to the CR which points to the bucket in RustFS. Make sure the bucket <code>my-kind-bucket</code>exists first.</p>
<p>The key parts of the new CR are</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">yaml</span><button class="code-block__copy" type="button" data-copy-target="codeblock-36" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">backups</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">pgbackrest</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l">docker.io/percona/percona-pgbackrest:2.59.0-1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">configuration</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">secret</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">cluster1-pgbackrest-secrets &lt;- The secret from above</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">global</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">repo2-s3-uri-style</span><span class="p">:</span><span class="w"> </span><span class="l">path</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">repo2-storage-verify-tls</span><span class="p">:</span><span class="w"> </span><span class="s2">"n"</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="l">........</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">repo2</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">s3</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">bucket</span><span class="p">:</span><span class="w"> </span><span class="s2">"my-kind-bucket"</span><span class="l">. &lt;- the backup bucket.</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">endpoint</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://rustfs-svc.rustfs.svc.cluster.local:9000"</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">region</span><span class="p">:</span><span class="w"> </span><span class="s2">"us-east-1"</span></span></span></code></pre>
</div>
</div>
</div>
<p>Apply the new CR and wait for all the pods to update.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-37" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">kubectl apply -f cr-backup.yaml</span></span></code></pre>
</div>
</div>
</div>
<p>Before we run the backup we can put some data in which should allow us to test the restore later</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-38" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"> kubectl run -i --rm --tty pg-client --image<span class="o">=</span>percona/percona-distribution-postgresql:18.6.1-1 --restart<span class="o">=</span>Never -- psql <span class="nv">$PGBOUNCER_URI</span></span></span></code></pre>
</div>
</div>
</div>
<p>Cut and paste the following SQL into the terminal</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-39" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">CREATE</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">phonebook</span><span class="p">(</span><span class="n">phone</span><span class="w"> </span><span class="nb">VARCHAR</span><span class="p">(</span><span class="mi">32</span><span class="p">),</span><span class="w"> </span><span class="n">firstname</span><span class="w"> </span><span class="nb">VARCHAR</span><span class="p">(</span><span class="mi">32</span><span class="p">),</span><span class="w"> </span><span class="n">lastname</span><span class="w"> </span><span class="nb">VARCHAR</span><span class="p">(</span><span class="mi">32</span><span class="p">),</span><span class="w"> </span><span class="n">address</span><span class="w"> </span><span class="nb">VARCHAR</span><span class="p">(</span><span class="mi">64</span><span class="p">));</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">INSERT</span><span class="w"> </span><span class="k">INTO</span><span class="w"> </span><span class="n">phonebook</span><span class="p">(</span><span class="n">phone</span><span class="p">,</span><span class="w"> </span><span class="n">firstname</span><span class="p">,</span><span class="w"> </span><span class="n">lastname</span><span class="p">,</span><span class="w"> </span><span class="n">address</span><span class="p">)</span><span class="w"> </span><span class="k">VALUES</span><span class="p">(</span><span class="s1">'+1 123 456 7890'</span><span class="p">,</span><span class="w"> </span><span class="s1">'John'</span><span class="p">,</span><span class="w"> </span><span class="s1">'Doe'</span><span class="p">,</span><span class="w"> </span><span class="s1">'North America'</span><span class="p">);</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">phonebook</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>Then run the backup and wait for it to finish:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-40" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl apply -f backup.yaml
</span></span><span class="line"><span class="cl">kubectl get perconapgbackup -w</span></span></code></pre>
</div>
</div>
</div>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-41" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">NAME CLUSTER REPO DESTINATION STATUS TYPE COMPLETED AGE
</span></span><span class="line"><span class="cl">backup2 cluster1 repo2 s3://my-kind-bucket Running 3m38s
</span></span><span class="line"><span class="cl">cluster1-backup-xr9r-9hvb7 cluster1 repo1 Succeeded full 7m10s 9m11s
</span></span><span class="line"><span class="cl">backup2 cluster1 repo2 s3://my-kind-bucket Running full 4m
</span></span><span class="line"><span class="cl">backup2 cluster1 repo2 s3://my-kind-bucket Running full 4m10s
</span></span><span class="line"><span class="cl">backup2 cluster1 repo2 s3://my-kind-bucket Succeeded full 13s 4m10s
</span></span><span class="line"><span class="cl">backup2 cluster1 repo2 s3://my-kind-bucket Succeeded full 14s 4m11s</span></span></code></pre>
</div>
</div>
</div>
<p>There should now be a backup in the rustFS bucket &#8211; Either check on the UI or via AWS CLI</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-42" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">aws --no-verify-ssl --endpoint-url https://localhost:9000 <span class="se">
</span></span></span><span class="line"><span class="cl"> s3 ls --recursive s3://my-kind-bucket/pgbackrest/repo2/backup/</span></span></code></pre>
</div>
</div>
</div>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-43" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">2026-10-13 15:21:19 243781 pgbackrest/repo2/backup/db/20261013-142013F/backup.manifest
</span></span><span class="line"><span class="cl">2026-10-13 15:21:19 243781 pgbackrest/repo2/backup/db/20261013-142013F/backup.manifest.copy
</span></span><span class="line"><span class="cl">2026-10-13 15:21:18 23 pgbackrest/repo2/backup/db/20261013-142013F/pg_data/PG_VERSION.gz
</span></span><span class="line"><span class="cl">2026-10-13 15:21:19 195 pgbackrest/repo2/backup/db/20261013-142013F/pg_data/backup_label.gz
</span></span><span class="line"><span class="cl">2026-10-13 15:21:18 87 pgbackrest/repo2/backup/db/20261013-142013F/pg_data/base/1/112.gz
</span></span><span class="line"><span class="cl">2026-10-13 15:21:18 85 pgbackrest/repo2/backup/db/20261013-142013F/pg_data/base/1/113.gz
</span></span><span class="line"><span class="cl">2026-10-13 15:21:15 13371 pgbackrest/repo2/backup/db/20261013-142013F/pg_data/base/1/1247.gz
</span></span><span class="line"><span class="cl">2026-10-13 15:21:16 186 pgbackrest/repo2/backup/db/20261013-142013F/pg_data/base/1/1247_fsm.gz
</span></span><span class="line"><span class="cl">2026-10-13 15:21:18 70 pgbackrest/repo2/backup/db/20261013-142013F/pg_data/base/1/1247_vm.gz
</span></span><span class="line"><span class="cl">2026-10-13 15:21:15 38713 pgbackrest/repo2/backup/db/20261013-142013F/pg_data/base/1/1249.gz
</span></span><span class="line"><span class="cl">.......</span></span></code></pre>
</div>
</div>
</div>
<h2>Restore from a Backup</h2>
<p>Before running the restore delete the row from the test table.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-44" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">delete</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="n">phonebook</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">select</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="n">phonebook</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>Find what backups are available</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-45" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">kubectl get pg-backup</span></span></code></pre>
</div>
</div>
</div>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-46" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">NAME CLUSTER REPO DESTINATION STATUS TYPE COMPLETED AGE
</span></span><span class="line"><span class="cl">backup2 cluster1 repo2 s3://my-kind-bucket Succeeded full 2d1h 2d1h
</span></span><span class="line"><span class="cl">cluster1-backup-xr9r-9hvb7 cluster1 repo1 Succeeded full 2d1h 2d1h</span></span></code></pre>
</div>
</div>
</div>
<p>Describe the backup and find the backup name</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-47" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">kubectl describe pg-backup backup2</span></span></code></pre>
</div>
</div>
</div>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-48" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Name: backup2
</span></span><span class="line"><span class="cl">Namespace: pg-operator
</span></span><span class="line"><span class="cl">Labels: 
</span></span><span class="line"><span class="cl">Annotations: pgv2.percona.com/pgbackrest-backup-job-type: manual
</span></span><span class="line"><span class="cl">API Version: pgv2.percona.com/v2
</span></span><span class="line"><span class="cl">Kind: PerconaPGBackup
</span></span><span class="line"><span class="cl">Metadata:
</span></span><span class="line"><span class="cl"> Creation Timestamp: 2026-10-13T14:17:24Z
</span></span><span class="line"><span class="cl"> Generation: 2
</span></span><span class="line"><span class="cl"> Resource Version: 3301
</span></span><span class="line"><span class="cl"> UID: eead1a51-2999-4391-bd30-d85c7575c24a
</span></span><span class="line"><span class="cl">Spec:
</span></span><span class="line"><span class="cl"> Container Options:
</span></span><span class="line"><span class="cl"> Method: pgbackrest
</span></span><span class="line"><span class="cl"> Pg Cluster: cluster1
</span></span><span class="line"><span class="cl"> Repo Name: repo2
</span></span><span class="line"><span class="cl">Status:
</span></span><span class="line"><span class="cl"> Backup Name: 20261013-142013F &lt;- Backup Name
</span></span><span class="line"><span class="cl"> Backup Type: full
</span></span><span class="line"><span class="cl"> Completed: 2026-10-13T14:21:21Z
</span></span><span class="line"><span class="cl"> Cr Version: 3.1.0
</span></span><span class="line"><span class="cl"> Destination: s3://my-kind-bucket
</span></span><span class="line"><span class="cl"> Image: docker.io/percona/percona-pgbackrest:2.59.0-1
</span></span><span class="line"><span class="cl"> Job Name: cluster1-backup-24fx
</span></span><span class="line"><span class="cl"> Repo:
</span></span><span class="line"><span class="cl"> Name: repo2
</span></span><span class="line"><span class="cl"> s3:
</span></span><span class="line"><span class="cl"> Bucket: my-kind-bucket
</span></span><span class="line"><span class="cl"> Endpoint: https://rustfs-svc.rustfs.svc.cluster.local:9000
</span></span><span class="line"><span class="cl"> Region: us-east-1
</span></span><span class="line"><span class="cl"> Size: 31673834
</span></span><span class="line"><span class="cl"> State: Succeeded
</span></span><span class="line"><span class="cl"> Storage Type: s3</span></span></code></pre>
</div>
</div>
</div>
<p>Edit the <code>restore.yaml</code> and update the backup name next to the <code>--set=20261013-142013F_20261015-165445I</code> option, then apply it</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-49" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">kubectl apply -f restore.yaml</span></span></code></pre>
</div>
</div>
</div>
<p>The restore will terminate all the Postgres Pods and restore them. Once they are back run the SQL to see if the row has been restored.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-50" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">select</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="n">phonebook</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">phone</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">firstname</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">lastname</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">address</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="c1">-----------------+-----------+----------+---------------
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="o">+</span><span class="mi">1</span><span class="w"> </span><span class="mi">123</span><span class="w"> </span><span class="mi">456</span><span class="w"> </span><span class="mi">7890</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">John</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">Doe</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">North</span><span class="w"> </span><span class="n">America</span></span></span></code></pre>
</div>
</div>
</div>
<h2>Tidy Up</h2>
<p>Delete the kind cluster and everything else should go with it.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-51" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">kind delete cluster --name percona-pg</span></span></code></pre>
</div>
</div>
</div>
<p>This to me is a starting point where I can play without worrying about breaking stuff as it’s quick to rebuild.<br />
While doing this I came up with many ideas I wanted to try out but thats for the future. I’ve probably made loads of bad or wrong decisions setting this up but it’s a start and it works for me.</p>
<p><em>This post is part of the <a href="https://percona.community/blog/write-for-percona-community/">Percona Community Writers Program</a>.</em></p>
<p><a href="https://percona.community/blog/2026/10/29/getting-started-with-percona-postgresql-operator/">Getting Started with Percona PostgreSQL Operator</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>How to Extract Data from InnoDB, MyISAM, and MyRocks Files Without a Running Server</title>
        <link>https://www.percona.com/blog/how-to-extract-data-from-innodb-myisam-and-myrocks-files-without-a-running-server/</link>
        <pubDate>Wed, 28 Oct 2026 13:13:49 +0000</pubDate>
        <dc:creator>Przemysław Malkowski</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/how-to-extract-data-from-innodb-myisam-and-myrocks-files-without-a-running-server/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Probably everyone responsible for managing database servers at some point realizes that it would be helpful to have a tool capable of extracting data directly from raw database files. Something completely offline, without the need to have a running database server, and that would work with data directories, files, or binary backups (storage volume snapshots, … Continued<br />
The post How to Extract Data from InnoDB, MyISAM, and MyRocks Files Without a Running Server appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/how-to-extract-data-from-innodb-myisam-and-myrocks-files-without-a-running-server/">How to Extract Data from InnoDB, MyISAM, and MyRocks Files Without a Running Server</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Probably everyone responsible for managing database servers at some point realizes that it would be helpful to have a tool capable of <strong>extracting data directly from raw database files</strong>. Something completely offline, without the need to have a running database server, and that would work with data directories, files, or binary backups (storage volume snapshots, XtraBackup, etc).</p>
<p>There are a couple of use cases for that I could think of:</p>
<ul>
<li>Crashed/corrupted data recovery – if the database service refuses to start or enters a crash-restart loop and there are no good backups (<a href="https://dev.mysql.com/doc/refman/9.7/en/point-in-time-recovery.html">PITR</a>!) available.</li>
<li>Backup (additional) <strong>verification</strong> and data files health check.</li>
<li>Extraction of individual databases or tables from a full backup.</li>
<li>Quick provisioning of staging/QA instances directly from live production.</li>
<li>Recovery of accidentally deleted rows.</li>
<li>Forensics (i.e., quick seek for data across many old backups without the need to reload them).</li>
<li>Import/migrate data from very old/legacy database versions.</li>
</ul>
<h2>Backups!</h2>
<p>Here, let me drop an obvious yet often neglected statement: nothing will replace good backups! Your database infrastructure should always be planned with the assumption that your data may get damaged or lost at any time. Visit here if you want to check if your current backup policy is up to date: <a href="https://www.percona.com/blog/mysql-backup-and-recovery-best-practices/">https://www.percona.com/blog/mysql-backup-and-recovery-best-practices/</a></p>
<p>Now, would an offline tool with the ability to read SQL data from files be another backup method? NO! Modern ACID- and MVCC-compliant data engines are too complex in terms of data durability and consistency. So, reading directly from database files does not guarantee the dump would be consistent. Dedicated backup tools like <a href="https://docs.percona.com/percona-xtrabackup/">XtraBackup</a> engage additional steps to ensure consistency, like following the redo log and using backup locks.</p>
<h2>Corruption and Crash Recovery</h2>
<p>Typically, when MySQL / MariaDB server detects severely corrupted data, it may need to perform an emergency shutdown with the intention of preventing further damage. A lot depends on the scope of the damage. Some minor issues with secondary indexes could often be fixed by re-creating the index, but clustered key corruption often leads to an engine crash whenever the corrupted page is accessed. You may find yourself in a situation similar to these reports:</p>
<p><a href="https://bugs.mysql.com/bug.php?id=111610">https://bugs.mysql.com/bug.php?id=111610</a><br />
<a href="https://bugs.mysql.com/bug.php?id=113706">https://bugs.mysql.com/bug.php?id=113706</a></p>
<p>Again, with good backups, this should be no problem. But a bad surprise may force you to try to read all healthy rows in the hope of restoring as much as possible. The task will be, in most cases, very tedious – an attempt to read a row sitting in a corrupted page would crash the server, so you have to wait for a restart before you can try reading the next row.</p>
<p>This was one of the reasons for me to try to come up with a tool fully capable of extracting rows without needing to run MySQL. Otherwise, a challenging project was affordable using vibe-coding, where the agent could build data decoding by reading the relevant engine’s source code. So, let me introduce a new open-source project: <a href="https://github.com/PrzemekMalkowski/innodump"><strong>innodump</strong></a>! Up to this point, I have implemented all three most popular MySQL and MariaDB engines: <strong>InnoDB, MyISAM, and MyRocks</strong> (RocksDB). The tool can read and dump the whole data directory, or specific tables, either from a common or general tablespace or from a per-table file. It decodes both the table schema and rows into SQL files or a TSV structure compatible with <a href="https://dev.mysql.com/doc/mysql-shell/26.7/en/mysql-shell-utilities-load-dump.html">MySQL Shell dump</a> utilities. The latter allows you to load the dump into another instance very efficiently.</p>
<p>There is an option relevant from the corruption point of view:</p>
<p><strong><code>--skip-corrupted</code></strong> – in case a corrupted data page is encountered, it prints a comment and skips to the next page, effectively reading as much data as possible.</p>
<p>Example run:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">$ innodump --file innodump_work/instant_t.ibd --verbose --skip-corrupted
File:        innodump_work/instant_t.ibd (130023424 bytes)
Space ID:    409
Pages:       7936
Page size:   16384 bytes
FSP flags:   0x00004021 (post_antelope=true atomic_blobs=true data_dir=false shared=false temporary=false encryption=false sdi=true)
SDI:         present (written by MySQL 8.0.33, dd_version 80023, sdi_version 80019)
Tables in SDI: 1
Row format:  DYNAMIC
Clustered index: "PRIMARY" (id 943), root page 4
Secondary indexes: 5
Physical fields: 31 (29 output)
=== innodump 0.8.1 ===
Table:       db1.instant_t (row_format=DYNAMIC)
Columns:     29 output (31 total incl. system/hidden)
warning: corrupted page 100 (index "PRIMARY", id 943): LSN low bytes at the start and end of the page disagree
Schema file: sqldump_2026-10-21_16.42/db1.instant_t-schema.sql
Data file:   sqldump_2026-10-21_16.42/db1.instant_t-data.sql (100680 row(s) written, 1 corrupted page(s) skipped - see warnings above)</pre>
</p>
<h2>Data Verification</h2>
<p><strong><code>--examine</code></strong> – this option makes the tool read every table and decode every row without storing them; it produces a report of how many rows can be found and how many of them are corrupted.</p>
<p>Note: the tool scans only the clustered (primary) index, so it will not find possible secondary index corruptions; it is expected to only ensure which rows can be restored.</p>
<pre class="urvanov-syntax-highlighter-plain-tag">$ innodump --examine --source-dir /data/sandboxes/msb_11_6_2/data/
=== innodump 0.8.1 ===
Following /data/sandboxes/msb_11_6_2/data/ recursively — recognized as a single instance's datadir (found ibdata1), so every InnoDB table found inside (file-per-table .ibd files, plus any table found only in ibdata1's own shared tablespace) and every MyISAM table (.MYD files), plus every MyRocks table (read from #rocksdb) will be examined (nothing is written).
Source:      /data/sandboxes/msb_11_6_2/data/ (6 .ibd file(s), 129 .frm-only table(s) to resolve via ibdata1, a MyRocks data directory (#rocksdb) found)
  db1.t0                                   InnoDB        8 row(s)  OK  [row_format=COMPACT]
  db1.t1                                   InnoDB        5 row(s)  OK  [row_format=COMPACT]
  mysql.gtid_slave_pos                     InnoDB        0 row(s)  OK  [row_format=COMPACT]
  mysql.innodb_index_stats                 InnoDB       13 row(s)  OK  [row_format=COMPACT]
  mysql.innodb_table_stats                 InnoDB        3 row(s)  OK  [row_format=COMPACT]
  mysql.transaction_registry               InnoDB        0 row(s)  OK  [row_format=COMPACT]
  db1.sbtest1                              ROCKSDB 1000000 row(s)  OK

Summary
  InnoDB       6 table(s), 29 row(s)
  ROCKSDB      1 table(s), 1000000 row(s)
  total        7 table(s), 1000029 row(s)
Note:        129 .frm file(s) with no matching .ibd had no InnoDB entry in ibdata1's own dictionary either - likely non-InnoDB tables, VIEWs, or a general tablespace - not examined
Result:      every table read cleanly</pre>
<p>If you are looking for a way to scan InnoDB files for potential corruption, you should always start with the official <a href="https://dev.mysql.com/doc/refman/9.7/en/innochecksum.html">innochecksum</a>. With innodump’s examination, the main goal is to show what’s actually readable.</p>
<h2>Staging/dev/QA Data Provisioned the Easy and Unintrusive Way?</h2>
<p>Quite often, a DBA may be tasked with setting up a non-production MySQL or MariaDB instance having a recent data snapshot from production. And typically, this kind of data copy for staging purposes does not have to be point-in-time consistent. And note that using this tool on a live instance or on an unprepared backup will mean various data consistency issues, like dirty pages may not be on disk yet, pages can be mid-write, it can produce rows that are missing, stale, or wrongly flagged, and even whole tables can be missing if created recently enough inside a common space.</p>
<p>Now, if the last regular available backup is up to date enough, it may still be too costly to restore the full backup while only a handful of databases are needed. Here, innodump can dump <strong>from specific database folders or files</strong>:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">$ innodump --source-dir /data/sandboxes/msb_9_7_0/data/db2/ --format tsv --compression zstd
=== innodump 0.8.1 ===
Following /data/sandboxes/msb_9_7_0/data/db2/ recursively — recognized as a single database directory (no subdirectories of its own), so every InnoDB table found inside (file-per-table .ibd files, plus any table found only in ibdata1's own shared tablespace) and every MyISAM table (.MYD files) will be dumped.
Source:      /data/sandboxes/msb_9_7_0/data/db2/ (5 .ibd file(s) found)
  db2.categories: 10000 row(s)
  db2.cities: 100000 row(s)
  db2.products: 100000 row(s)
  db2.sales: 1049877 row(s)
  db2.stores: 100000 row(s)
Files:       5/5 .ibd file(s) processed
Tables:      5 extracted
Rows:        1359877 written
Output:      tsvdump_2026-10-21_16.58</pre>
<p>The exported folder can use the format compatible with fast MySQL Shell import:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">$ ls tsvdump_2026-10-21_16.58/
db2@categories.json  db2@categories.tsv.zst  db2@cities.sql      db2.json           db2@products.sql      db2@sales.json  db2@sales.tsv.zst  db2@stores.json  db2@stores.tsv.zst  @.json
db2@categories.sql   db2@cities.json         db2@cities.tsv.zst  db2@products.json  db2@products.tsv.zst  db2@sales.sql   db2.sql            db2@stores.sql   @.done.json</pre>
<p>What if no recent backup is available but there is a need to fetch staging data quickly from production? Bearing in mind that reading from a live datadir has the caveats above, which is fine for a throwaway staging copy, the tool can do it gently, as it allows you to limit the IO throughput during exporting. Moreover, it can bypass the OS page cache via the <code>O_DIRECT</code> flag, so as not to trash the server’s cache with garbage and avoid causing additional memory pressure (the kernel might decide to swap out some least recently used user space memory to make room for page cache!). Therefore, to make the export from production with as little impact as possible, I recommend using <code>--io-limit</code> (RATE bytes per second) and <code>--direct-io</code> options, plus being gentle on the CPU side, running the tool with <a href="https://man7.org/linux/man-pages/man2/nice.2.html">nice</a>.</p>
<p>Example run results without these options used:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">$ time innodump --file /data/sandboxes/msb_9_7_0/data/tpcdh/orders.ibd --format tsv --compression zstd
=== innodump 0.8.1 ===
Table:       tpcdh.orders (row_format=DYNAMIC)
Columns:     9 output (11 total incl. system/hidden)
Dump dir:    tsvdump_2026-10-21_17.25 (MySQL Shell util.loadDump()-compatible, zstd level 1)
Rows:        1500000 written

real	0m1.726s
user	0m6.601s
sys	0m0.362s

$ fincore /data/sandboxes/msb_9_7_0/data/tpcdh/orders.ibd
   RES PAGES  SIZE FILE
192.1M 49168  228M /data/sandboxes/msb_9_7_0/data/tpcdh/orders.ibd</pre>
<p>And with these safety settings (time longer bc io limit, and page cache is skipped bc direct io):</p>
<pre class="urvanov-syntax-highlighter-plain-tag">$ time innodump --file /data/sandboxes/msb_9_7_0/data/tpcdh/orders.ibd --format tsv --compression zstd --direct-io --io-limit 30M
=== innodump 0.8.1 ===
Table:       tpcdh.orders (row_format=DYNAMIC)
Columns:     9 output (11 total incl. system/hidden)
Dump dir:    tsvdump_2026-10-21_17.28 (MySQL Shell util.loadDump()-compatible, zstd level 1)
Rows:        1500000 written

real	0m9.241s
user	0m8.024s
sys	0m0.486s

$ fincore /data/sandboxes/msb_9_7_0/data/tpcdh/orders.ibd
RES PAGES  SIZE FILE
 0B     0  228M /data/sandboxes/msb_9_7_0/data/tpcdh/orders.ibd</pre>
</p>
<h2>Recover Deleted Rows?</h2>
<p>InnoDB does not immediately purge or overwrite deleted rows in the table spaces. The record is first only delete-marked and stays in the page. If no new writes have actually reclaimed the space yet, such rows usually can be decoded. So, if done quickly, there is a good chance you can restore those rows, and innodump makes it easy via the <a href="https://github.com/PrzemekMalkowski/innodump#recovering-deleted-rows"><code>--deleted-only</code></a> option!</p>
<pre class="urvanov-syntax-highlighter-plain-tag">$ innodump --file /data/sandboxes/msb_8_4_3/data/sbtest/sbtest1.ibd --deleted-only
=== innodump 0.8.1 ===
Table:       sbtest.sbtest1 (row_format=DYNAMIC)
Columns:     4 output (6 total incl. system/hidden)
Schema file: sqldump_2026-10-21_17.46/sbtest.sbtest1-schema.sql
Data file:   sqldump_2026-10-21_17.46/sbtest.sbtest1-data-deleted.sql (2100 delete-marked row(s) written)</pre>
<p>I hope you may find the tool handy for the cases mentioned above as well as possibly others, like extracting data from some ancient/legacy database versions, where the regular backup tools don’t even work.</p>
<p>Note: it is not an officially supported Percona software, but rather an experimental personal project.</p>
<p>The tool can be found on GitHub, and all feedback is welcome!</p>
<p><a href="https://github.com/PrzemekMalkowski/innodump">https://github.com/PrzemekMalkowski/innodump</a></p>
<p><em>The article was created by a human.</em></p>
<p>The post <a href="https://www.percona.com/blog/how-to-extract-data-from-innodb-myisam-and-myrocks-files-without-a-running-server/">How to Extract Data from InnoDB, MyISAM, and MyRocks Files Without a Running Server</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/how-to-extract-data-from-innodb-myisam-and-myrocks-files-without-a-running-server/">How to Extract Data from InnoDB, MyISAM, and MyRocks Files Without a Running Server</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Build an “ask the docs” app with Laravel 13 and MariaDB Vector</title>
        <link>https://mariadb.org/build-an-ask-the-docs-app-with-laravel-13-and-mariadb-vector/</link>
        <pubDate>Wed, 28 Oct 2026 07:54:16 +0000</pubDate>
        <dc:creator>Robert Silén</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/build-an-ask-the-docs-app-with-laravel-13-and-mariadb-vector/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Earlier this month we wrote that Laravel 13 now supports MariaDB Vector natively. Mohamed Touhami Rhaima, one of the community contributors who made that happen, has now written a tutorial on how to use it, and recorded a video version. Why MariaDB Vector in Laravel With Laravel 13 and MariaDB 11.7 or later, you can […]<br />
Build an “ask the docs” app with Laravel 13 and MariaDB Vector appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/build-an-ask-the-docs-app-with-laravel-13-and-mariadb-vector/">Build an “ask the docs” app with Laravel 13 and MariaDB Vector</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Earlier this month we wrote that Laravel 13 now supports MariaDB Vector natively. Mohamed Touhami Rhaima, one of the community contributors who made that happen, has now written a tutorial on how to use it, and recorded a video version. Why MariaDB Vector in Laravel With Laravel 13 and MariaDB 11.7 or later, you can […]</p>
<p><a href="https://mariadb.org/build-an-ask-the-docs-app-with-laravel-13-and-mariadb-vector/">Build an “ask the docs” app with Laravel 13 and MariaDB Vector</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/build-an-ask-the-docs-app-with-laravel-13-and-mariadb-vector/">Build an “ask the docs” app with Laravel 13 and MariaDB Vector</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Catch Lost Updates Before Release: A Two-Client PostgreSQL Test on Windows</title>
        <link>https://percona.community/blog/2026/10/27/catch-lost-updates-before-release/</link>
        <pubDate>Tue, 27 Oct 2026 15:07:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/catch-lost-updates-before-release-a-two-client-postgresql-test-on-windows/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>Two successful reservations of three units should reduce stock from ten to four. A read-calculate-write operation can instead leave seven: both clients overwrite the row with a value calculated from an earlier read. That mismatch is what this lab checks. The release check is an invariant:</p>
<p><a href="https://percona.community/blog/2026/10/27/catch-lost-updates-before-release/">Catch Lost Updates Before Release: A Two-Client PostgreSQL Test on Windows</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Two successful reservations of three units should reduce stock from ten to four. A read-calculate-write operation can instead leave seven: both clients overwrite the row with a value calculated from an earlier read. That mismatch is what this lab checks. The release check is an invariant:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">final stock =
</span></span><span class="line"><span class="cl"> starting stock -
</span></span><span class="line"><span class="cl"> 3 × committed reservations</span></span></code></pre>
</div>
</div>
</div>
<p>Keep that assertion beside a controlled two-client test before releasing reservation code. The lab uses one inventory row at READ COMMITTED, so the stock change is easy to compare with committed reservations. Multi-SKU transactions, request idempotency, and Serializable retries need separate tests. This lab measures no throughput.</p>
<p>For that comparison, count a reservation only after its UPDATE changes a row and COMMIT succeeds. The fixture stores one inventory row; application order records are outside this lab.</p>
<h2>The SQL failure and fix</h2>
<p>Start with the unsafe operation: read stock, subtract three in application code, and write the replacement:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SELECT</span><span class="w"> </span><span class="n">stock</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">FROM</span><span class="w"> </span><span class="n">lu_lab</span><span class="p">.</span><span class="n">inventory</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">WHERE</span><span class="w"> </span><span class="n">sku</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="c1">-- Both clients read 10 and calculate 7.
</span></span></span><span class="line"><span class="cl"><span class="k">UPDATE</span><span class="w"> </span><span class="n">lu_lab</span><span class="p">.</span><span class="n">inventory</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">SET</span><span class="w"> </span><span class="n">stock</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">7</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">WHERE</span><span class="w"> </span><span class="n">sku</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="n">RETURNING</span><span class="w"> </span><span class="n">stock</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>Putting both statements in a transaction does not preserve the invariant. In the test, A writes seven and holds its transaction open while B attempts the same update and waits. After A commits, B writes its stale seven and commits too.</p>
<p>That wait is expected at <a href="https://www.postgresql.org/docs/18/transaction-iso.html#XACT-READ-COMMITTED" target="_blank" rel="noopener noreferrer">READ COMMITTED</a>. PostgreSQL waits for a competing updater, then rechecks its condition against the updated row. The problem is the assignment: it still asks PostgreSQL to write the literal seven.</p>
<p>To avoid that stale assignment, let the write do the arithmetic and check available stock:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-2" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">UPDATE</span><span class="w"> </span><span class="n">lu_lab</span><span class="p">.</span><span class="n">inventory</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">SET</span><span class="w"> </span><span class="n">stock</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">stock</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">3</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">WHERE</span><span class="w"> </span><span class="n">sku</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="k">AND</span><span class="w"> </span><span class="n">stock</span><span class="w"> </span><span class="o">&gt;=</span><span class="w"> </span><span class="mi">3</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="n">RETURNING</span><span class="w"> </span><span class="n">stock</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>With that change, B subtracts from A’s updated row. Starting at ten, A leaves seven and B leaves four. Starting at four, A leaves one and B’s condition fails. <a href="https://www.postgresql.org/docs/18/sql-update.html" target="_blank" rel="noopener noreferrer">A zero-row UPDATE succeeds</a>; treat it as a rejected attempt. SKU 1 exists in this fixture. An application must also consider a missing SKU or other unmatched predicates.</p>
<p>RETURNING remains provisional until COMMIT succeeds. A returned row followed by ROLLBACK consumes no stock.</p>
<p>The positive integer three makes these examples directly runnable in psql. Before formatting fixture SQL, the Python helper requires exactly type int and a positive quantity. Application adaptations should use their database driver’s parameter binding.</p>
<h2>Check the intended collision</h2>
<p>To check the fix, the test has to establish that B really waits for A. Both workers begin at READ COMMITTED and read the seeded stock before A updates. A holds its transaction open while B issues the competing write. A’s SQL session polls whether its PID appears in pg_blocking_pids(B). The test requires distinct worker PIDs and that blocking observation before releasing A’s transaction. PostgreSQL documents these <a href="https://www.postgresql.org/docs/18/functions-info.html" target="_blank" rel="noopener noreferrer">session and blocker functions</a>.</p>
<p>A barrier establishes that both reads finished, but it does not show that B waited for A’s database lock. The blocker check supplies that evidence. Bounded waits and retrieved worker results make connection failures, missing lock waits, and worker exceptions fail the run.</p>
<p>Windows Python uses its standard library and Docker Desktop to coordinate persistent psql clients inside a disposable Linux Percona container. A separate controller session prepares and checks the fixture. The <a href="https://percona.community/labs/postgresql-lost-update-pg18/README.txt">lab appendix</a> contains setup, commands, failure handling, and cleanup; the <a href="https://percona.community/labs/postgresql-lost-update-pg18/lost_update_psql_lab.py">complete Python source</a> accompanies it.</p>
<h2>Assert outcomes, including rollback</h2>
<p>With that overlap established, compare the committed count with the final stock. Each attempt requests three units. These outcomes were observed on PostgreSQL 18:</p>
<p>Unsafe overwrite, two clients: starting stock 10; committed reservations 2; final stock 7. The defect is reproduced.</p>
<p>Conditional update, two clients: starting stock 10; committed reservations 2; final stock 4.</p>
<p>Conditional update, two clients: starting stock 4; committed reservations 1; final stock 1.</p>
<p>A rolls back while B waits: starting stock 4; committed reservations 1; final stock 1.</p>
<p>Insufficient stock, one client: starting stock 2; committed reservations 0; final stock 2.</p>
<p>The unsafe case is useful precisely because it fails the invariant: keep it as a negative control, require seven, and verify the violation. For every corrected case, apply the same invariant and check both the committed count and the final stock.</p>
<p>For rollback, A tentatively decrements four to one, B waits, and A rolls back. B then reserves three successfully. A contributes nothing to the committed count. The single-client insufficient case changes no row.</p>
<p>These outcome checks matter even though the column uses NOT NULL and CHECK (stock &gt;= 0). Seven passes despite the lost update. <a href="https://www.postgresql.org/docs/18/ddl-constraints.html#DDL-CONSTRAINTS-CHECK-CONSTRAINTS" target="_blank" rel="noopener noreferrer">CHECK constraints</a> reject invalid row values; they cannot reconstruct intent. Keep NOT NULL because a CHECK expression evaluating to NULL also passes.</p>
<h2>Observed Windows validation</h2>
<p>On October 15, 2026, twenty complete suites passed with eighty blocking observations: four paired cases per suite. A deliberately wrong-port probe exited 1 without a passing result.</p>
<table>
<thead>
<tr>
<th>Environment</th>
<th>Recorded value</th>
</tr>
</thead>
<tbody>
<tr>
<td>Run (UTC)</td>
<td>2026-10-15T18:14:24.1203443Z to 2026-10-15T18:14:53.0113288Z</td>
</tr>
<tr>
<td>Server</td>
<td>PostgreSQL 18.6 — Percona Server 18.6.1, x86_64; server_version_num 180006</td>
</tr>
<tr>
<td>Windows</td>
<td>Windows 11 Home 10.0.26300, build 26300</td>
</tr>
<tr>
<td>Controller</td>
<td>PowerShell 7.6.5; Python 3.13.2 AMD64</td>
</tr>
<tr>
<td>Docker</td>
<td>Desktop 4.95.0 (242831); client and Engine 29.8.2</td>
</tr>
<tr>
<td>Image tag</td>
<td>percona/percona-distribution-postgresql:18.6</td>
</tr>
</tbody>
</table>
<p>Image digest: <code>sha256:27a1dba816fcc4cec88f216d54e3ec86db4c1d4b16799f49800055c41606e11e</code>.</p>
<p>Harness SHA-256: <code>5d80c87e0ba114b5302efe2a97ac59bcdfaf3fb9f5952c853e512b7f2fada484</code>.</p>
<p>See the <a href="https://percona.community/labs/postgresql-lost-update-pg18/recorded-evidence/psql-validation-summary.json">recorded validation summary</a>.</p>
<p>Keep the source, environment, output, and exit status together when you repeat the lab, so you can tell exactly what was tested. Repetition checks this coordination, not every possible interleaving.</p>
<p>A conditional decrement does not make repeated requests idempotent. Multi-row work needs its own transaction rules and lock ordering. This harness does not exercise Serializable retries; applications using that isolation must <a href="https://www.postgresql.org/docs/18/mvcc-serialization-failure-handling.html" target="_blank" rel="noopener noreferrer">retry complete transactions after serialization failures</a>, including their reads and decisions.</p>
<p>When you adapt this release check, keep the invariant, negative control, contention evidence, and failure assertions together.</p>
<p><em>Automated Windows validation was AI-assisted using Codex on Jack VanSickle’s SNOW-WOLF machine.</em></p>
<p><em>This post is part of the <a href="https://percona.community/blog/write-for-percona-community/">Percona Community Writers Program</a>.</em></p>
<p><a href="https://percona.community/blog/2026/10/27/catch-lost-updates-before-release/">Catch Lost Updates Before Release: A Two-Client PostgreSQL Test on Windows</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>How MariaDB 11.8 became about 3× faster on some in-memory workloads, fixing a regression dating back to 10.5</title>
        <link>https://mariadb.org/how-mariadb-11-8-became-about-3x-faster-on-some-in-memory-workloads-fixing-a-regression-dating-back-to-10-5/</link>
        <pubDate>Tue, 27 Oct 2026 14:25:44 +0000</pubDate>
        <dc:creator>Roman Nozdrin</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/how-mariadb-11-8-became-about-3x-faster-on-some-in-memory-workloads-fixing-a-regression-dating-back-to-10-5/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Publishing on behalf of Alessandro Vetere. Conclusions first: InnoDB in-memory workloads started paying for LRU management in 10.5, a performance regression, and I think the reason is that a clock, which was meant to say “eviction has started”, began ticking much earlier. A minimal fix would bring back the old meaning of the clock. The […]<br />
How MariaDB 11.8 became about 3× faster on some in-memory workloads, fixing a regression dating back to 10.5 appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/how-mariadb-11-8-became-about-3x-faster-on-some-in-memory-workloads-fixing-a-regression-dating-back-to-10-5/">How MariaDB 11.8 became about 3× faster on some in-memory workloads, fixing a regression dating back to 10.5</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Publishing on behalf of Alessandro Vetere. Conclusions first: InnoDB in-memory workloads started paying for LRU management in 10.5, a performance regression, and I think the reason is that a clock, which was meant to say “eviction has started”, began ticking much earlier. A minimal fix would bring back the old meaning of the clock. The […]</p>
<p><a href="https://mariadb.org/how-mariadb-11-8-became-about-3x-faster-on-some-in-memory-workloads-fixing-a-regression-dating-back-to-10-5/">How MariaDB 11.8 became about 3× faster on some in-memory workloads, fixing a regression dating back to 10.5</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/how-mariadb-11-8-became-about-3x-faster-on-some-in-memory-workloads-fixing-a-regression-dating-back-to-10-5/">How MariaDB 11.8 became about 3× faster on some in-memory workloads, fixing a regression dating back to 10.5</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>FOSDEM 2027: Bringing the M-Ecosystem Together</title>
        <link>https://mariadb.org/fosdem-2027-bringing-the-m-ecosystem-together/</link>
        <pubDate>Tue, 27 Oct 2026 14:08:18 +0000</pubDate>
        <dc:creator>Frédéric Descamps</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/fosdem-2027-bringing-the-m-ecosystem-together/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>One ecosystem, many projects, shared challenges. Join us in Brussels on Sunday, January 31, 2027, for the M-Ecosystem Devroom at FOSDEM! Building on the tradition of the MariaDB, MySQL &#38; Friends Devroom, this new chapter expands its scope and ambition, bringing together developers and contributors from across the open-source database ecosystem to share knowledge, tackle […]<br />
FOSDEM 2027: Bringing the M-Ecosystem Together appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/fosdem-2027-bringing-the-m-ecosystem-together/">FOSDEM 2027: Bringing the M-Ecosystem Together</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>One ecosystem, many projects, shared challenges. Join us in Brussels on Sunday, January 31, 2027, for the M-Ecosystem Devroom at FOSDEM! Building on the tradition of the MariaDB, MySQL &amp; Friends Devroom, this new chapter expands its scope and ambition, bringing together developers and contributors from across the open-source database ecosystem to share knowledge, tackle […]</p>
<p><a href="https://mariadb.org/fosdem-2027-bringing-the-m-ecosystem-together/">FOSDEM 2027: Bringing the M-Ecosystem Together</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/fosdem-2027-bringing-the-m-ecosystem-together/">FOSDEM 2027: Bringing the M-Ecosystem Together</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>How Vestiaire Collective achieved near-zero downtime RDS for MariaDB upgrades with Amazon RDS Blue/Green Deployments</title>
        <link>https://aws.amazon.com/blogs/database/how-vestiaire-collective-achieved-near-zero-downtime-rds-for-mariadb-upgrades-with-amazon-rds-blue-green-deployments/</link>
        <pubDate>Mon, 26 Oct 2026 17:19:34 +0000</pubDate>
        <dc:creator>Ejaz Azeem</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/how-vestiaire-collective-achieved-near-zero-downtime-rds-for-mariadb-upgrades-with-amazon-rds-blue-green-deployments/</guid>
        <source url="https://aws.amazon.com/blogs/database/">RDS for MariaDB – AWS Database Blog</source>
        <description><![CDATA[<p>Vestiaire Collective, a global platform for pre-owned luxury fashion, achieved near-zero downtime upgrading its Amazon RDS for MariaDB fleet across two major versions. Learn how the team used Amazon RDS Blue/Green Deployments with AWS Countdown Premium to deliver a 94-second and then a 7-second switchover during peak sales season.</p>
<p><a href="https://aws.amazon.com/blogs/database/how-vestiaire-collective-achieved-near-zero-downtime-rds-for-mariadb-upgrades-with-amazon-rds-blue-green-deployments/">How Vestiaire Collective achieved near-zero downtime RDS for MariaDB upgrades with Amazon RDS Blue/Green Deployments</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><a href="https://www.vestiairecollective.com/" target="_blank" rel="noopener">Vestiaire Collective</a> is a leading global platform for pre-owned luxury fashion. The company achieved near-zero downtime when upgrading its <a href="https://aws.amazon.com/rds/mariadb/" target="_blank" rel="noopener">Amazon Relational Database Service (Amazon RDS) for MariaDB</a> fleet by using <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments.html" target="_blank" rel="noopener">Amazon RDS Blue/Green Deployments</a>. Vestiaire Collective is operating across 50 countries with over 7.5 million members and 30,000 new daily listings. The company follows a sustainability-focused philosophy called <em>Think First, Buy Second</em>, connecting buyers and sellers of secondhand luxury and designer items through a digitally verified and AI-curated marketplace.</p>
<p>As a 24/7 global ecommerce platform, Vestiaire Collective relies on RDS for MariaDB to power its core monolithic application. This application is the backbone of every purchase, listing, and transaction on the platform. When their production RDS for MariaDB fleet on version 10.6 approached its end-of-support date, the engineering team faced a challenge: upgrade across two major versions while maintaining near-zero downtime during peak sales season.</p>
<p>In this post, we share how Vestiaire Collective used Amazon RDS Blue/Green Deployments combined with <a href="https://aws.amazon.com/premiumsupport/aws-countdown/" target="_blank" rel="noopener">AWS Countdown Premium</a> to execute a two-phase upgrade from MariaDB 10.6 to 11.4. The team achieved a 94-second switchover in the first upgrade and only 7 seconds with no write downtime noticeable to customers in the second. This was the lowest-downtime database maintenance event in the company’s five-year history.</p>
<h2>The challenge</h2>
<p>Vestiaire Collective’s production RDS for MariaDB cluster consisted of a db.r7g.12xlarge primary instance with eight read replicas. This cluster supports the core monolithic application that powers the entire business. Any extended downtime means customers cannot purchase items, complete transactions, or browse listings. For a platform serving millions of users across multiple time zones, downtime is equivalent to business down.</p>
<p>The team faced several compounding pressures:</p>
<ul>
<li><strong>End-of-support timeline:</strong> Support for RDS for MariaDB 10.6.x was nearing its end and the specific minor version 10.6.19 would be deprecated as early as March 2026.</li>
<li><strong>Peak season timing:</strong> The upgrades needed to happen during the fall 2025 peak sales season.</li>
<li><strong>AWS Database Migration Service (AWS DMS) dependency:</strong> The RDS for MariaDB instance served as a source for two AWS DMS tasks, adding complexity to any upgrade path.</li>
<li><strong>Performance requirements:</strong> The team wanted to simultaneously upgrade instance class from R7g to R8g for improved performance and cost efficiency.</li>
</ul>
<h2>Evaluating upgrade approaches</h2>
<p>Before selecting RDS Blue/Green Deployments, the team evaluated alternative upgrade methods:</p>
<ul>
<li><strong>In-place upgrade:</strong> Would require several hours of downtime, which is unacceptable for a 24/7 global platform during peak season.</li>
<li><strong>Upgrade with AWS DMS:</strong> Evaluated but not pursued because of the complexity of maintaining replication consistency across the upgrade.</li>
</ul>
<p>Testing in lower environments (staging and QA) confirmed that RDS Blue/Green Deployments provided the safest path with the least downtime. The team upgraded their non-production environments first, validating application compatibility before applying the process to production.</p>
<h2>Why Amazon RDS Blue/Green Deployments</h2>
<p>The team chose RDS Blue/Green Deployments for three key reasons:</p>
<ol type="1">
<li><strong>Minimal disruption during peak sales season.</strong> RDS Blue/Green Deployments typically deliver a <a href="https://aws.amazon.com/about-aws/whats-new/2026/01/amazon-rds-blue-green-deployments-reduces-downtime/" target="_blank" rel="noopener">switchover with minimal downtime</a> versus several hours of downtime required by an in-place upgrade. Protecting peak season revenue made this the clear choice.</li>
<li><strong>Performance stability from the moment of switchover.</strong> The multi-hour <a href="https://aws.amazon.com/blogs/storage/addressing-i-o-latency-when-restoring-amazon-ebs-volumes-from-ebs-snapshots/" target="_blank" rel="noopener">Amazon EBS volume hydration process</a> happens entirely on the standby (green) environment before it receives any customer traffic. The green environment gives you time to hydrate storage and warm the buffer pool before it takes traffic, avoiding potential performance degradation.</li>
<li><strong>Risk mitigation with full rollback until switchover.</strong> Blue/Green allowed the team to run the upgraded environment in parallel with real production write traffic through binlogs for over a week before switching over. This validated application compatibility, query performance, replication accuracy, and DMS task continuity. In-place upgrades offer limited rollback options once applied. Blue/Green provided a tested, proven path with zero cascading failure risk.</li>
</ol>
<h2>Solution overview</h2>
<p>Vestiaire Collective executed a two-phase upgrade strategy: first upgrading to MariaDB 10.11.14, and then to MariaDB 11.4.9. This isolated major engine version changes, following a recommended best practice.</p>
<table border="1px" width="100%" cellpadding="10px">
<tbody>
<tr>
<td><strong>Phase</strong></td>
<td><strong>Date</strong></td>
<td><strong>Upgrade Path</strong></td>
<td><strong>Additional Changes</strong></td>
<td><strong>Switchover Time</strong></td>
</tr>
<tr>
<td>Upgrade 1</td>
<td>October, 2025</td>
<td>MariaDB 10.6.19 → 10.11.14</td>
<td>Instance class: db.r7g.12xlarge → db.r8g.12xlarge</td>
<td>~94 seconds</td>
</tr>
<tr>
<td>Upgrade 2</td>
<td>December, 2025</td>
<td>MariaDB 10.11.14 → 11.4.9</td>
<td>Engine version only</td>
<td>~7 seconds</td>
</tr>
</tbody>
</table>
<p>The entire project spanned from October to December 2025, covering 1 primary instance, eight read replicas, and two DMS tasks. The following architecture diagram shows Vestiaire Collective’s application infrastructure on AWS.</p>
<div class="wp-caption alignnone">
 <a href="https://d2908q01vomqb2.cloudfront.net/887309d048beef83ad3eabf2a79a64a389ab1c9f/2026/10/22/DBBLOG-5775-1.png" target="_blank" rel="noopener"><img decoding="async" src="https://d2908q01vomqb2.cloudfront.net/887309d048beef83ad3eabf2a79a64a389ab1c9f/2026/10/22/DBBLOG-5775-1.png" alt="Vestiaire Collective application infrastructure on AWS, showing the Amazon RDS for MariaDB primary instance, eight read replicas, and two AWS DMS tasks" width="800"></a></p>
<p class="wp-caption-text">Figure 1: Vestiaire Collective application infrastructure on AWS</p>
</div>
<h2>Upgrade 1: MariaDB 10.6 to 10.11 with instance class change</h2>
<p>The first upgrade combined a major engine version change with an instance class migration (a combination that would be difficult to achieve with minimal downtime using traditional in-place methods).</p>
<h3>Pre-switchover preparation</h3>
<p>The team followed a methodical preparation timeline:</p>
<ul>
<li><strong>Friday:</strong> Completed storage scaling to 5,500 GiB for all green environment instances and verified storage optimization across the fleet.</li>
<li><strong>Monday:</strong> Performed <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/mysql-stored-proc-warming.html" target="_blank" rel="noopener">InnoDB cache warming</a> on the green environment. This prevented initial post-switchover latency caused by filling an empty buffer pool. Performed manual backups of the blue primary instance.</li>
<li><strong>Tuesday (switchover day):</strong> Ran final pre-switchover health checks (<code>SHOW PROCESSLIST</code>, <code>SHOW ENGINE INNODB STATUS</code>) and initiated the switchover at 04:00 UTC with a 5-minute timeout window.</li>
</ul>
<h3>Switchover results</h3>
<p>The switchover completed in approximately 94 seconds, well within the expected 1–5 minute window. Application traffic validation and monitoring began immediately afterward, with DMS tasks managed as required post-switchover. To maintain DMS tasks, they were stopped before switchover and then resumed from a new binlog position after the switchover.</p>
<h2>Upgrade 2: MariaDB 10.11 to 11.4</h2>
<p>Building on the success and lessons of the first upgrade, the second phase focused solely on the engine version upgrade from 10.11.14 to 11.4.9.</p>
<p>The results exceeded expectations: the total switchover time was approximately 7 seconds, with no noticeable write downtime at the database level. The database was accepting read and write operations immediately, though DNS propagation required additional time.</p>
<p>This was the lowest-downtime database maintenance event in Vestiaire Collective’s five-year history with AWS. The downtime was so minimal that their internal monitoring tools did not trigger a single alarm during the second upgrade event.</p>
<h2>Using AWS Countdown Premium</h2>
<p><a href="https://aws.amazon.com/premiumsupport/aws-countdown/" target="_blank" rel="noopener">AWS Countdown Premium</a> provided critical support across both upgrades and the intervening peak sales period. The Countdown Premium engineer joined weekly cadence calls with Vestiaire Collective’s team to stay aligned on preparation and next steps. In addition, Countdown Premium provided:</p>
<ul>
<li><strong>Operational Readiness Review (ORR):</strong> A review of the RDS for MariaDB environment (including the primary instance and eight read replicas) was performed across key pillars including resiliency and high availability, observability, operations, and performance.</li>
<li><strong>Upgrade runbook planning:</strong> Working with the customer, the Countdown Premium engineer helped refine the upgrade runbook to reduce potential risk, including pre-staging DB backups, validating replication health, and handling active DB write operations pre-switchover.</li>
<li><strong>Upgrade 1 (October, 2025):</strong> 24-hour standby support coverage with RDS for MariaDB and DMS engineers on call. A war room call bridge was established for real-time coordination.</li>
<li><strong>Peak Sales Event (November, 2025):</strong> 12-hour standby support with RDS database engineers proactively monitoring Amazon CloudWatch metrics. A dedicated war room call and formal communications channel helped verify no issues went undetected.</li>
<li><strong>Upgrade 2 (December, 2025):</strong> 24-hour standby support with the same war room coordination model.</li>
<li><strong>Post-event Countdown Premium report:</strong> A post-event Countdown Premium report was delivered capturing detailed metrics analysis for each upgrade, comparing performance in the week before and the week after each upgrade event to confirm stability and surface any regressions.</li>
</ul>
<p>The team also used <a href="https://slack.com/connect" target="_blank" rel="noopener">Slack External Connect</a> as an ongoing communication channel between the AWS Countdown Premium engineer and the Vestiaire Collective team, which facilitated rapid troubleshooting, faster engagement, and easier collaboration. This allowed for quick identification and resolution of a Performance Insights query truncation issue discovered during the engagement.</p>
<h2>Results</h2>
<p>The Blue/Green deployment approach delivered measurable improvements across availability and operational confidence. Additionally, the engine version upgrade and instance class change provided significant performance improvements:</p>
<table border="1px" width="100%" cellpadding="10px">
<tbody>
<tr>
<td><strong>Metric</strong></td>
<td><strong>Result</strong></td>
</tr>
<tr>
<td>Upgrade 1 switchover time</td>
<td>~94 seconds</td>
</tr>
<tr>
<td>Upgrade 2 switchover time</td>
<td>~7 seconds</td>
</tr>
<tr>
<td>Query execution improvement</td>
<td>Up to 40% for most-used queries (measured through benchmarking)</td>
</tr>
<tr>
<td>Post-upgrade CPU utilization</td>
<td>Maximum 4.6%, with no bottlenecking</td>
</tr>
<tr>
<td>Read/write latency impact</td>
<td>No significant changes. Spikes well below the 10 ms threshold</td>
</tr>
</tbody>
</table>
<blockquote>
<p><em>“We used to treat major database upgrades as multi-hour, all-hands events. Blue/Green let us combine a major engine upgrade with an r7g-to-r8g instance class change in a single 94-second switchover, then repeat the pattern in seven seconds two months later. We now have a proven playbook we’re applying to MariaDB 11.8 and to the rest of our infrastructure modernisation roadmap.”</em></p>
<p>— Hugo Almeida, VP of Engineering, Vestiaire Collective</p>
</blockquote>
<h2>Conclusion</h2>
<p>In this post, you learned how Vestiaire Collective used Amazon RDS Blue/Green Deployments to upgrade their production MariaDB fleet across two major versions with near-zero downtime. You also learned how combining this approach with AWS Countdown Premium support enabled the team to safely execute these upgrades during peak sales season while simultaneously gaining up to 40 percent query performance improvements through an instance class migration and optimizing the queries.</p>
<p>Building on the success of their Fall 2025 upgrades, Vestiaire Collective has an ambitious infrastructure modernization roadmap:</p>
<ol type="1">
<li><strong>Continuous performance optimization:</strong> Ongoing monitoring and tuning using CloudWatch Database Insights, with a focus on query optimization as part of a broader monolith RDS optimization initiative.</li>
<li><strong>MariaDB 11.8 LTS upgrade:</strong> Evaluating an upgrade from 11.4 to MariaDB 11.8 LTS, using the same proven Blue/Green methodology.</li>
</ol>
<p>To get started with Amazon RDS Blue/Green Deployments for your own database fleet, see the <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments.html" target="_blank" rel="noopener">Amazon RDS Blue/Green Deployments</a> documentation. For guidance on planning major version upgrades, see the Amazon RDS for MariaDB upgrade guide.</p>
<p> </p>
</p>
<hr>
<h2>About the authors</h2>
<footer>
<div class="blog-author-box">
<div class="blog-author-image">
   <img decoding="async" loading="lazy" class="alignnone size-full" src="https://d2908q01vomqb2.cloudfront.net/887309d048beef83ad3eabf2a79a64a389ab1c9f/2026/10/22/DBBLOG-5775-2.jpg" alt="Ejaz Azeem" width="100" height="133">
  </div>
<h3 class="lb-h4">Ejaz Azeem</h3>
<p>Ejaz is a Senior DevOps Engineer at Vestiaire Collective, based in Berlin. He owns the company’s multi-cluster Amazon Elastic Kubernetes Service (Amazon EKS) platform and production RDS for MariaDB estate. He leads the high-stakes maintenance and upgrade work that keeps the core monolith available for 7.5 million members across 50 countries. He designed and led the RDS for MariaDB Blue/Green upgrade program, delivering Vestiaire Collective’s lowest-downtime database upgrade in five years.</p>
</p></div>
<div class="blog-author-box">
<div class="blog-author-image">
   <img decoding="async" loading="lazy" class="alignnone size-full" src="https://d2908q01vomqb2.cloudfront.net/887309d048beef83ad3eabf2a79a64a389ab1c9f/2026/10/22/DBBLOG-5775-3.jpg" alt="Yala El Feghaly" width="100" height="133">
  </div>
<h3 class="lb-h4">Yala El Feghaly</h3>
<p>Yala is a Senior Technical Account Manager at Amazon Web Services (AWS). She works closely with enterprise customers to accelerate cloud adoption, architectural excellence, and operational efficiency. As a trusted technical advisor, she helps customers navigate complex cloud environments and implement AWS best practices to achieve their business objectives.</p>
</p></div>
<div class="blog-author-box">
<div class="blog-author-image">
   <img decoding="async" loading="lazy" class="alignnone size-full" src="https://d2908q01vomqb2.cloudfront.net/887309d048beef83ad3eabf2a79a64a389ab1c9f/2026/10/22/DBBLOG-5775-4.jpg" alt="Ryan Moore" width="100" height="133">
  </div>
<h3 class="lb-h4">Ryan Moore</h3>
<p>Ryan is a Technical Account Manager at AWS supporting ISV customers. He has also worked within the AWS database team for 3 years. Ryan is an Amazon Aurora MySQL and Amazon RDS for MySQL subject matter expert who helps customers build performant, scalable, and secure architectures in the AWS Cloud.</p>
</p></div>
</footer>
<p><a href="https://aws.amazon.com/blogs/database/how-vestiaire-collective-achieved-near-zero-downtime-rds-for-mariadb-upgrades-with-amazon-rds-blue-green-deployments/">How Vestiaire Collective achieved near-zero downtime RDS for MariaDB upgrades with Amazon RDS Blue/Green Deployments</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>The Man Who Benchmarks MariaDB Against the World</title>
        <link>https://mariadb.org/the-man-who-benchmarks-mariadb-against-the-world/</link>
        <pubDate>Sun, 25 Oct 2026 19:11:24 +0000</pubDate>
        <dc:creator>Simona Aleksandrova</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/the-man-who-benchmarks-mariadb-against-the-world/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Jonathan Miller has spent 27 years in database performance testing. He talks about TAF, the open source Test Automation Framework that benchmarks MariaDB, MySQL and PostgreSQL side by side, configuration provenance, and how to prove your patch made MariaDB faster.<br />
The Man Who Benchmarks MariaDB Against the World appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/the-man-who-benchmarks-mariadb-against-the-world/">The Man Who Benchmarks MariaDB Against the World</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Jonathan Miller has spent 27 years in database performance testing. He talks about TAF, the open source Test Automation Framework that benchmarks MariaDB, MySQL and PostgreSQL side by side, configuration provenance, and how to prove your patch made MariaDB faster.</p>
<p><a href="https://mariadb.org/the-man-who-benchmarks-mariadb-against-the-world/">The Man Who Benchmarks MariaDB Against the World</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/the-man-who-benchmarks-mariadb-against-the-world/">The Man Who Benchmarks MariaDB Against the World</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>What’s new in MariaDB Connector/J 4.0</title>
        <link>https://mariadb.com/resources/blog/whats-new-in-mariadb-connector-j-4-0/</link>
        <pubDate>Fri, 23 Oct 2026 00:59:25 +0000</pubDate>
        <dc:creator>Diego Dupin</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/whats-new-in-mariadb-connector-j-4-0-2/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>MariaDB Connector/J 4.0.0 is now generally available. Connector/J is the JDBC driver for MariaDB Community Server and MariaDB Enterprise Server, […]</p>
<p><a href="https://mariadb.com/resources/blog/whats-new-in-mariadb-connector-j-4-0/">What’s new in MariaDB Connector/J 4.0</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Connector/J 4.0.0 is now generally available. Connector/J is the JDBC driver for MariaDB Community Server and MariaDB Enterprise Server, released under the LGPL 2.1 license. It is the first major version since 3.0 in 2021. 4.0 requires Java 17 or later. If you are still on Java 8 or 11, the 3.5 branch stays maintained and receives the same fixes in 3.5.11, released alongside 4.0.0.</p>
<p><a href="https://mariadb.com/resources/blog/whats-new-in-mariadb-connector-j-4-0/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/whats-new-in-mariadb-connector-j-4-0/">What’s new in MariaDB Connector/J 4.0</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>What’s new in MariaDB Connector/J 4.0</title>
        <link>https://mariadb.com/resources/blog/whats-new-in-mariadb-connector-j-4-0/</link>
        <pubDate>Thu, 22 Oct 2026 18:13:39 +0000</pubDate>
        <dc:creator>Diego Dupin</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/whats-new-in-mariadb-connector-j-4-0/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>MariaDB Connector/J 4.0.0 is now generally available. Connector/J is the JDBC driver for MariaDB Community Server and MariaDB Enterprise Server, […]</p>
<p><a href="https://mariadb.com/resources/blog/whats-new-in-mariadb-connector-j-4-0/">What’s new in MariaDB Connector/J 4.0</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Connector/J 4.0.0 is now generally available. Connector/J is the JDBC driver for MariaDB Community Server and MariaDB Enterprise Server, released under the LGPL 2.1 license. It is the first major version since 3.0 in 2021. 4.0 requires Java 17 or later. If you are still on Java 8 or 11, the 3.5 branch stays maintained and receives the same fixes in 3.5.11, released alongside 4.0.0.</p>
<p><a href="https://mariadb.com/resources/blog/whats-new-in-mariadb-connector-j-4-0/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/whats-new-in-mariadb-connector-j-4-0/">What’s new in MariaDB Connector/J 4.0</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Atarim joins MariaDB Foundation as a Silver sponsor</title>
        <link>https://mariadb.org/atarim-joins-mariadb-foundation-as-a-silver-sponsor/</link>
        <pubDate>Wed, 21 Oct 2026 17:17:47 +0000</pubDate>
        <dc:creator>Anna Widenius</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/atarim-joins-mariadb-foundation-as-a-silver-sponsor-2/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB Foundation is pleased to welcome Atarim as a Silver sponsor, strengthening the connection between MariaDB and the agencies and hosting providers shaping the web. Atarim is an AI web agency that plugs into existing web agencies and does the client work. Agencies point it at the sites they look after, and it designs, writes, […]<br />
Atarim joins MariaDB Foundation as a Silver sponsor appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/atarim-joins-mariadb-foundation-as-a-silver-sponsor/">Atarim joins MariaDB Foundation as a Silver sponsor</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Foundation is pleased to welcome Atarim as a Silver sponsor, strengthening the connection between MariaDB and the agencies and hosting providers shaping the web. Atarim is an AI web agency that plugs into existing web agencies and does the client work. Agencies point it at the sites they look after, and it designs, writes, […]</p>
<p><a href="https://mariadb.org/atarim-joins-mariadb-foundation-as-a-silver-sponsor/">Atarim joins MariaDB Foundation as a Silver sponsor</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/atarim-joins-mariadb-foundation-as-a-silver-sponsor/">Atarim joins MariaDB Foundation as a Silver sponsor</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Atarim joins MariaDB Foundation as a Silver sponsor</title>
        <link>https://mariadb.org/atarim-joins-mariadb-foundation-as-a-silver-sponsor/</link>
        <pubDate>Wed, 21 Oct 2026 17:17:47 +0000</pubDate>
        <dc:creator>Anna Widenius</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/atarim-joins-mariadb-foundation-as-a-silver-sponsor/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB Foundation is pleased to welcome Atarim as a Silver sponsor, strengthening the connection between MariaDB and the agencies and hosting providers shaping the web. Atarim is an AI web agency that plugs into existing web agencies and does the client work. Agencies point it at the sites they look after, and it designs, writes, […]<br />
Atarim joins MariaDB Foundation as a Silver sponsor appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/atarim-joins-mariadb-foundation-as-a-silver-sponsor/">Atarim joins MariaDB Foundation as a Silver sponsor</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Foundation is pleased to welcome Atarim as a Silver sponsor, strengthening the connection between MariaDB and the agencies and hosting providers shaping the web. Atarim is an AI web agency that plugs into existing web agencies and does the client work. Agencies point it at the sites they look after, and it designs, writes, […]</p>
<p><a href="https://mariadb.org/atarim-joins-mariadb-foundation-as-a-silver-sponsor/">Atarim joins MariaDB Foundation as a Silver sponsor</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/atarim-joins-mariadb-foundation-as-a-silver-sponsor/">Atarim joins MariaDB Foundation as a Silver sponsor</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Prove your PostgreSQL restore before a Kubernetes migration</title>
        <link>https://percona.community/blog/2026/10/20/prove-postgresql-restore-before-kubernetes-migration/</link>
        <pubDate>Tue, 20 Oct 2026 14:55:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/prove-your-postgresql-restore-before-a-kubernetes-migration/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>A migration plan can name every component and still leave the useful question unanswered: if the move fails, can the application work again? A dump file is not that answer. A restore into a new database, followed by the checks the application actually needs, is.</p>
<p><a href="https://percona.community/blog/2026/10/20/prove-postgresql-restore-before-kubernetes-migration/">Prove your PostgreSQL restore before a Kubernetes migration</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>A migration plan can name every component and still leave the useful question unanswered: if the move fails, can the application work again? A dump file is not that answer. A restore into a new database, followed by the checks the application actually needs, is.</p>
<h2>Define what recovered means</h2>
<p>For this lab I treated the application as a small order service. Recovered meant four checks, and nothing else:</p>
<ul>
<li>The login role app_orders can connect to the restored database.</li>
<li>The known order lab-customer-1001 is present and still has two line items.</li>
<li>That role can insert a new order and one line item.</li>
<li>The insert uses the restored sequence and the foreign key, so the new line points at the new order.</li>
</ul>
<p>I did not treat “pg_restore exited 0” as recovered. I also did not treat a connection as the postgres superuser as recovered.</p>
<p>The backup was taken in the same session, so this lab does not measure how much data an older dump would miss. The restore times below are for a 64 kB example. They are not a production recovery-time objective.</p>
<h2>One example, two clusters</h2>
<p>I built this localhost lab for the article using synthetic data and two throwaway PostgreSQL instances. Both were PostgreSQL 16.14 from Homebrew, with client tools of the same version. The exercise did not use a production host, password, or customer record.</p>
<p>The source database, orders_src, had the pgcrypto extension, an orders table, an order_items table, and grants for app_orders. The role was created in the source cluster. It was not created inside the database dump.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="c1">-- Selected setup statements; full example in the appendix.
</span></span></span><span class="line"><span class="cl"><span class="k">CREATE</span><span class="w"> </span><span class="k">ROLE</span><span class="w"> </span><span class="n">app_orders</span><span class="w"> </span><span class="n">LOGIN</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">CREATE</span><span class="w"> </span><span class="n">EXTENSION</span><span class="w"> </span><span class="k">IF</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">EXISTS</span><span class="w"> </span><span class="n">pgcrypto</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="c1">-- orders.id defaults to gen_random_uuid()
</span></span></span><span class="line"><span class="cl"><span class="c1">-- order_items.order_id references orders(id)
</span></span></span><span class="line"><span class="cl"><span class="k">GRANT</span><span class="w"> </span><span class="k">USAGE</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="k">SCHEMA</span><span class="w"> </span><span class="k">public</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="n">app_orders</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">GRANT</span><span class="w"> </span><span class="k">SELECT</span><span class="p">,</span><span class="w"> </span><span class="k">INSERT</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="n">orders</span><span class="p">,</span><span class="w"> </span><span class="n">order_items</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="n">app_orders</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>I dumped only that database:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sh</span><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">pg_dump --host<span class="o">=</span>127.0.0.1 --port<span class="o">=</span><span class="m">55432</span> --username<span class="o">=</span>postgres <span class="se">
</span></span></span><span class="line"><span class="cl"> --dbname<span class="o">=</span>orders_src --format<span class="o">=</span>custom --file<span class="o">=</span>article-lab.dump</span></span></code></pre>
</div>
</div>
</div>
<p>That command exited 0 in 0.07 seconds. The custom-format file was 5,170 bytes. The archive header said it was created at 2026-10-01 10:57:05 CAT from database version 16.14. pg_restore –list showed tables, data, grants, the pgcrypto extension, and a default privilege. It had no ROLE entry for app_orders.</p>
<p>The public table data was 64 kB. I am not using the size of the whole database directory as the size of the example.</p>
<h2>The finding</h2>
<p>The first useful failure did not appear when I restored into another database on the source cluster. That restore exited 0, but it was insufficient for validating recovery into a fresh cluster. app_orders was already a cluster role, so the grants had something to attach to. A same-cluster restore can test other recovery scenarios; it does not test whether a new cluster has the required roles.</p>
<p>I then created a second instance on port 55433. Its only role was postgres. I created an empty orders_dst from template0 and restored the same file:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sh</span><button class="code-block__copy" type="button" data-copy-target="codeblock-2" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">pg_restore --host<span class="o">=</span>127.0.0.1 --port<span class="o">=</span><span class="m">55433</span> --username<span class="o">=</span>postgres <span class="se">
</span></span></span><span class="line"><span class="cl"> --dbname<span class="o">=</span>orders_dst --exit-on-error --single-transaction <span class="se">
</span></span></span><span class="line"><span class="cl"> article-lab.dump</span></span></code></pre>
</div>
</div>
</div>
<p>That command exited 1 in 0.04 seconds. The error was:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-3" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">pg_restore: error: could not execute query: ERROR: role "app_orders" does not exist
</span></span><span class="line"><span class="cl">Command was: GRANT USAGE ON SCHEMA public TO app_orders;</span></span></code></pre>
</div>
</div>
</div>
<p>Because the restore used –single-transaction, the failed grant rolled the load back. dt on orders_dst reported no relations. A dump that listed tables, data, and grants was still not a complete recovery plan. The missing piece was cluster state: the login role.</p>
<p>I created only that role on the second instance and ran the same pg_restore again. It exited 0 in 0.05 seconds. pgcrypto 1.3 was present after the restore, because this target server shipped that extension. Connecting as app_orders, the known order still had two items. An insert of lab-customer-restore-check with line SKU-C and quantity 1 succeeded, and the foreign key held.</p>
<p>A custom dump can contain the tables, data, and grants needed by an application yet omit a role those grants depend on. A same-cluster restore can therefore succeed while a fresh-cluster restore fails.</p>
<h2>What changes when you repeat this in Kubernetes</h2>
<p>The dump file does not change. The target does.</p>
<p>In this lab, “a new instance” was a second PostgreSQL cluster on another port. The equivalent Kubernetes target is a freshly initialized PostgreSQL cluster with new storage, whether created manually or by an operator. A replacement pod that mounts the existing data volume retains the database state, including roles; restarting a pod alone does not reproduce this test. Bootstrap credentials may be supplied through a Secret, but PostgreSQL roles are cluster state, not contents of article-lab.dump. If app_orders is absent in the fresh target, replaying this dump produces the same failed grant. Create the required application role before restoring. Do not assume the operator’s bootstrap role is the role your application uses.</p>
<p>The connection settings also need validation. This lab used 127.0.0.1 and a local role. For Kubernetes, check that the application’s Service endpoint, Secret, database name, and login role match the intended target; a migration may change some of them. pg_restore does not edit DATABASE_URL or Kubernetes resources. Run the same checks from the application process: read lab-customer-1001, then insert one disposable order and its line item. A laptop or port-forward check does not exercise the same network path as the application pod and can pass while that pod still cannot connect.</p>
<p>The server package can change too. Both instances here were PostgreSQL 16.14 from the same Homebrew install, so pgcrypto 1.3 restored cleanly. A Kubernetes image can omit that extension or ship another version. After restore, check pg_extension inside the target, then run the application checks. Do not infer the extension from the source cluster.</p>
<h2>What this lab does not prove</h2>
<p>It does not prove operator backup, volume snapshots, failover, or point-in-time recovery. Those are different mechanisms. A logical dump does not include the write-ahead log or the persistent volume.</p>
<p>It does not prove a production recovery time. The successful restore took 0.05 seconds for this 64 kB example. Larger datasets and different storage, hardware, and validation work can change that substantially. The backup being seconds old limits what this exercise says about potential data loss; it does not explain the restore speed.</p>
<p>It does not prove rollback. I took no writes on the source after the dump. During a migration, those writes exist. Before the cutover, decide who stops writes, and do not point the application back at the old database unless you have a plan for writes that happened after the dump. This lab did not test that plan.</p>
<p>The decision from the exercise is narrow. Before calling a Kubernetes migration recoverable, initialize a fresh PostgreSQL cluster, provision the roles and extension packages the restore requires, restore the dump, and run the application checks from the workload that will connect. Then test the backup method production will actually use. A green restore on the source cluster alone does not establish fresh-cluster recovery.</p>
<h2>Sources</h2>
<p><a href="https://www.postgresql.org/docs/16/backup-dump.html" target="_blank" rel="noopener noreferrer">PostgreSQL 16 SQL dump guidance</a></p>
<p><a href="https://www.postgresql.org/docs/16/app-pgrestore.html" target="_blank" rel="noopener noreferrer">PostgreSQL 16 pg_restore reference</a></p>
<h2>Appendix: Reproduce the missing-role failure</h2>
<p>This script reconstructs a minimal example of the finding; it is not the source of the original 64 kB size, archive size, or timings above. It was separately executed with PostgreSQL 16.14: the same-cluster restore succeeded, the fresh-cluster restore failed on the missing role, no public tables remained after rollback, and creating the role allowed restore and application-role checks to pass. Both companion instances were stopped afterward.<br />
Save the script as reproduce.sh and run it with sh reproduce.sh. It defaults to the Homebrew PostgreSQL 16 tools; set PG_BINDIR to your PostgreSQL 16 bin directory if needed. It creates private temporary data directories and Unix sockets, listens on no TCP interface, and retains logs and the archive in the evidence directory it prints. The source and target use local trust authentication only for this disposable exercise. Do not reuse that authentication setup for a deployed database.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sh</span><button class="code-block__copy" type="button" data-copy-target="codeblock-4" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl"><span class="cp">#!/bin/sh
</span></span></span><span class="line"><span class="cl"><span class="nb">set</span> -eu
</span></span><span class="line"><span class="cl"><span class="nb">umask</span> <span class="m">077</span>
</span></span><span class="line"><span class="cl"><span class="nv">PG_BINDIR</span><span class="o">=</span><span class="si">${</span><span class="nv">PG_BINDIR</span><span class="k">:-</span><span class="p">/opt/homebrew/opt/postgresql@16/bin</span><span class="si">}</span>
</span></span><span class="line"><span class="cl"><span class="nv">TASK_LAB</span><span class="o">=</span><span class="k">$(</span>mktemp -d /tmp/pg-restore-companion.XXXXXX<span class="k">)</span>
</span></span><span class="line"><span class="cl">cleanup<span class="o">()</span> <span class="o">{</span>
</span></span><span class="line"><span class="cl"> <span class="s2">"</span><span class="nv">$PG_BINDIR</span><span class="s2">/pg_ctl"</span> -D <span class="s2">"</span><span class="nv">$TASK_LAB</span><span class="s2">/target"</span> -m fast -w stop &gt;/dev/null 2&gt;<span class="p">&amp;</span><span class="m">1</span> <span class="o">||</span> <span class="nb">true</span>
</span></span><span class="line"><span class="cl"> <span class="s2">"</span><span class="nv">$PG_BINDIR</span><span class="s2">/pg_ctl"</span> -D <span class="s2">"</span><span class="nv">$TASK_LAB</span><span class="s2">/source"</span> -m fast -w stop &gt;/dev/null 2&gt;<span class="p">&amp;</span><span class="m">1</span> <span class="o">||</span> <span class="nb">true</span>
</span></span><span class="line"><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="cl"><span class="nb">trap</span> cleanup EXIT HUP INT TERM
</span></span><span class="line"><span class="cl">mkdir <span class="s2">"</span><span class="nv">$TASK_LAB</span><span class="s2">/socket"</span>
</span></span><span class="line"><span class="cl"><span class="nb">printf</span> <span class="s1">'Evidence directory: %sn'</span> <span class="s2">"</span><span class="nv">$TASK_LAB</span><span class="s2">"</span>
</span></span><span class="line"><span class="cl"><span class="s2">"</span><span class="nv">$PG_BINDIR</span><span class="s2">/postgres"</span> --version
</span></span><span class="line"><span class="cl"><span class="k">for</span> instance in <span class="nb">source</span> target<span class="p">;</span> <span class="k">do</span>
</span></span><span class="line"><span class="cl"> <span class="s2">"</span><span class="nv">$PG_BINDIR</span><span class="s2">/initdb"</span> -D <span class="s2">"</span><span class="nv">$TASK_LAB</span><span class="s2">/</span><span class="nv">$instance</span><span class="s2">"</span> -U postgres --auth<span class="o">=</span>trust --no-locale &gt;<span class="s2">"</span><span class="nv">$TASK_LAB</span><span class="s2">/</span><span class="nv">$instance</span><span class="s2">-init.log"</span>
</span></span><span class="line"><span class="cl"><span class="k">done</span>
</span></span><span class="line"><span class="cl"><span class="s2">"</span><span class="nv">$PG_BINDIR</span><span class="s2">/pg_ctl"</span> -D <span class="s2">"</span><span class="nv">$TASK_LAB</span><span class="s2">/source"</span> -l <span class="s2">"</span><span class="nv">$TASK_LAB</span><span class="s2">/source.log"</span> -o <span class="s2">"-k </span><span class="nv">$TASK_LAB</span><span class="s2">/socket -p 55442 -c listen_addresses=''"</span> -w start &gt;/dev/null
</span></span><span class="line"><span class="cl"><span class="s2">"</span><span class="nv">$PG_BINDIR</span><span class="s2">/pg_ctl"</span> -D <span class="s2">"</span><span class="nv">$TASK_LAB</span><span class="s2">/target"</span> -l <span class="s2">"</span><span class="nv">$TASK_LAB</span><span class="s2">/target.log"</span> -o <span class="s2">"-k </span><span class="nv">$TASK_LAB</span><span class="s2">/socket -p 55443 -c listen_addresses=''"</span> -w start &gt;/dev/null
</span></span><span class="line"><span class="cl"><span class="nb">export</span> <span class="nv">PGHOST</span><span class="o">=</span><span class="s2">"</span><span class="nv">$TASK_LAB</span><span class="s2">/socket"</span> <span class="nv">PGUSER</span><span class="o">=</span>postgres
</span></span><span class="line"><span class="cl"><span class="s2">"</span><span class="nv">$PG_BINDIR</span><span class="s2">/createdb"</span> -p <span class="m">55442</span> -T template0 orders_src
</span></span><span class="line"><span class="cl"><span class="s2">"</span><span class="nv">$PG_BINDIR</span><span class="s2">/psql"</span> -X -v <span class="nv">ON_ERROR_STOP</span><span class="o">=</span><span class="m">1</span> -p <span class="m">55442</span> -d orders_src <span class="s">&lt;&lt;&#039;SQL&#039;
</span></span></span><span class="line"><span class="cl"><span class="s">CREATE ROLE app_orders LOGIN;
</span></span></span><span class="line"><span class="cl"><span class="s">CREATE EXTENSION pgcrypto;
</span></span></span><span class="line"><span class="cl"><span class="s">CREATE TABLE orders (
</span></span></span><span class="line"><span class="cl"><span class="s"> id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
</span></span></span><span class="line"><span class="cl"><span class="s"> customer_ref text NOT NULL UNIQUE
</span></span></span><span class="line"><span class="cl"><span class="s">);
</span></span></span><span class="line"><span class="cl"><span class="s">CREATE TABLE order_items (
</span></span></span><span class="line"><span class="cl"><span class="s"> id bigint GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
</span></span></span><span class="line"><span class="cl"><span class="s"> order_id uuid NOT NULL REFERENCES orders(id),
</span></span></span><span class="line"><span class="cl"><span class="s"> sku text NOT NULL,
</span></span></span><span class="line"><span class="cl"><span class="s"> quantity integer NOT NULL CHECK (quantity &gt; 0)
</span></span></span><span class="line"><span class="cl"><span class="s">);
</span></span></span><span class="line"><span class="cl"><span class="s">INSERT INTO orders(customer_ref) VALUES ('lab-customer-1001');
</span></span></span><span class="line"><span class="cl"><span class="s">INSERT INTO order_items(order_id,sku,quantity)
</span></span></span><span class="line"><span class="cl"><span class="s"> SELECT id,'SKU-A',1 FROM orders WHERE customer_ref='lab-customer-1001';
</span></span></span><span class="line"><span class="cl"><span class="s">INSERT INTO order_items(order_id,sku,quantity)
</span></span></span><span class="line"><span class="cl"><span class="s"> SELECT id,'SKU-B',2 FROM orders WHERE customer_ref='lab-customer-1001';
</span></span></span><span class="line"><span class="cl"><span class="s">GRANT USAGE ON SCHEMA public TO app_orders;
</span></span></span><span class="line"><span class="cl"><span class="s">GRANT SELECT,INSERT ON orders,order_items TO app_orders;
</span></span></span><span class="line"><span class="cl"><span class="s">GRANT USAGE,SELECT ON SEQUENCE order_items_id_seq TO app_orders;
</span></span></span><span class="line"><span class="cl"><span class="s">SQL</span>
</span></span><span class="line"><span class="cl"><span class="s2">"</span><span class="nv">$PG_BINDIR</span><span class="s2">/pg_dump"</span> -p <span class="m">55442</span> -d orders_src -Fc -f <span class="s2">"</span><span class="nv">$TASK_LAB</span><span class="s2">/article-lab.dump"</span>
</span></span><span class="line"><span class="cl"><span class="s2">"</span><span class="nv">$PG_BINDIR</span><span class="s2">/pg_restore"</span> --list <span class="s2">"</span><span class="nv">$TASK_LAB</span><span class="s2">/article-lab.dump"</span> &gt;<span class="s2">"</span><span class="nv">$TASK_LAB</span><span class="s2">/archive-list.txt"</span>
</span></span><span class="line"><span class="cl"><span class="s2">"</span><span class="nv">$PG_BINDIR</span><span class="s2">/createdb"</span> -p <span class="m">55442</span> -T template0 orders_same_cluster
</span></span><span class="line"><span class="cl"><span class="s2">"</span><span class="nv">$PG_BINDIR</span><span class="s2">/pg_restore"</span> -p <span class="m">55442</span> -d orders_same_cluster --exit-on-error --single-transaction <span class="s2">"</span><span class="nv">$TASK_LAB</span><span class="s2">/article-lab.dump"</span>
</span></span><span class="line"><span class="cl"><span class="nb">printf</span> <span class="s1">'same_cluster_restore_exit=0n'</span>
</span></span><span class="line"><span class="cl"><span class="s2">"</span><span class="nv">$PG_BINDIR</span><span class="s2">/createdb"</span> -p <span class="m">55443</span> -T template0 orders_dst
</span></span><span class="line"><span class="cl"><span class="nb">set</span> +e
</span></span><span class="line"><span class="cl"><span class="s2">"</span><span class="nv">$PG_BINDIR</span><span class="s2">/pg_restore"</span> -p <span class="m">55443</span> -d orders_dst --exit-on-error --single-transaction <span class="s2">"</span><span class="nv">$TASK_LAB</span><span class="s2">/article-lab.dump"</span> &gt;<span class="s2">"</span><span class="nv">$TASK_LAB</span><span class="s2">/first-restore.out"</span> 2&gt;<span class="s2">"</span><span class="nv">$TASK_LAB</span><span class="s2">/first-restore.err"</span>
</span></span><span class="line"><span class="cl"><span class="nv">TASK_FIRST_STATUS</span><span class="o">=</span><span class="nv">$?</span>
</span></span><span class="line"><span class="cl"><span class="nb">set</span> -e
</span></span><span class="line"><span class="cl"><span class="nb">printf</span> <span class="s1">'fresh_cluster_restore_exit=%sn'</span> <span class="s2">"</span><span class="nv">$TASK_FIRST_STATUS</span><span class="s2">"</span>
</span></span><span class="line"><span class="cl"><span class="o">[</span> <span class="s2">"</span><span class="nv">$TASK_FIRST_STATUS</span><span class="s2">"</span> -eq <span class="m">1</span> <span class="o">]</span>
</span></span><span class="line"><span class="cl">cat <span class="s2">"</span><span class="nv">$TASK_LAB</span><span class="s2">/first-restore.err"</span>
</span></span><span class="line"><span class="cl"><span class="nv">TASK_TABLE_COUNT</span><span class="o">=</span><span class="k">$(</span><span class="s2">"</span><span class="nv">$PG_BINDIR</span><span class="s2">/psql"</span> -XAt -p <span class="m">55443</span> -d orders_dst -c <span class="s2">"SELECT count(*) FROM pg_tables WHERE schemaname='public'"</span><span class="k">)</span>
</span></span><span class="line"><span class="cl"><span class="nb">printf</span> <span class="s1">'tables_after_failed_restore=%sn'</span> <span class="s2">"</span><span class="nv">$TASK_TABLE_COUNT</span><span class="s2">"</span>
</span></span><span class="line"><span class="cl"><span class="o">[</span> <span class="s2">"</span><span class="nv">$TASK_TABLE_COUNT</span><span class="s2">"</span> -eq <span class="m">0</span> <span class="o">]</span>
</span></span><span class="line"><span class="cl"><span class="s2">"</span><span class="nv">$PG_BINDIR</span><span class="s2">/psql"</span> -X -v <span class="nv">ON_ERROR_STOP</span><span class="o">=</span><span class="m">1</span> -p <span class="m">55443</span> -d postgres -c <span class="s1">'CREATE ROLE app_orders LOGIN;'</span>
</span></span><span class="line"><span class="cl"><span class="s2">"</span><span class="nv">$PG_BINDIR</span><span class="s2">/pg_restore"</span> -p <span class="m">55443</span> -d orders_dst --exit-on-error --single-transaction <span class="s2">"</span><span class="nv">$TASK_LAB</span><span class="s2">/article-lab.dump"</span>
</span></span><span class="line"><span class="cl"><span class="nb">printf</span> <span class="s1">'restore_after_role_creation_exit=0n'</span>
</span></span><span class="line"><span class="cl"><span class="s2">"</span><span class="nv">$PG_BINDIR</span><span class="s2">/psql"</span> -X -v <span class="nv">ON_ERROR_STOP</span><span class="o">=</span><span class="m">1</span> -p <span class="m">55443</span> -U app_orders -d orders_dst <span class="s">&lt;&lt;&#039;SQL&#039;
</span></span></span><span class="line"><span class="cl"><span class="s">SELECT current_user;
</span></span></span><span class="line"><span class="cl"><span class="s">SELECT customer_ref,count(*) AS line_count FROM orders
</span></span></span><span class="line"><span class="cl"><span class="s"> JOIN order_items ON order_items.order_id=orders.id
</span></span></span><span class="line"><span class="cl"><span class="s"> WHERE customer_ref='lab-customer-1001' GROUP BY customer_ref;
</span></span></span><span class="line"><span class="cl"><span class="s">DO $$ BEGIN
</span></span></span><span class="line"><span class="cl"><span class="s"> IF (SELECT count(*) FROM orders JOIN order_items ON order_items.order_id=orders.id
</span></span></span><span class="line"><span class="cl"><span class="s"> WHERE customer_ref='lab-customer-1001')  2 THEN
</span></span></span><span class="line"><span class="cl"><span class="s"> RAISE EXCEPTION 'Known order did not retain two items';
</span></span></span><span class="line"><span class="cl"><span class="s"> END IF;
</span></span></span><span class="line"><span class="cl"><span class="s">END $$;
</span></span></span><span class="line"><span class="cl"><span class="s">WITH new_order AS (
</span></span></span><span class="line"><span class="cl"><span class="s"> INSERT INTO orders(customer_ref) VALUES ('lab-customer-restore-check') RETURNING id
</span></span></span><span class="line"><span class="cl"><span class="s">)
</span></span></span><span class="line"><span class="cl"><span class="s">INSERT INTO order_items(order_id,sku,quantity)
</span></span></span><span class="line"><span class="cl"><span class="s"> SELECT id,'SKU-C',1 FROM new_order RETURNING id,order_id,sku,quantity;
</span></span></span><span class="line"><span class="cl"><span class="s">DO $$ BEGIN
</span></span></span><span class="line"><span class="cl"><span class="s"> IF (SELECT count(*) FROM orders JOIN order_items ON order_items.order_id=orders.id
</span></span></span><span class="line"><span class="cl"><span class="s"> WHERE customer_ref='lab-customer-restore-check' AND sku='SKU-C' AND quantity=1)  1 THEN
</span></span></span><span class="line"><span class="cl"><span class="s"> RAISE EXCEPTION 'New order validation failed';
</span></span></span><span class="line"><span class="cl"><span class="s"> END IF;
</span></span></span><span class="line"><span class="cl"><span class="s">END $$;
</span></span></span><span class="line"><span class="cl"><span class="s">SQL</span>
</span></span><span class="line"><span class="cl"><span class="s2">"</span><span class="nv">$PG_BINDIR</span><span class="s2">/psql"</span> -X -p <span class="m">55443</span> -d orders_dst -c <span class="s2">"SELECT extname,extversion FROM pg_extension WHERE extname='pgcrypto'"</span>
</span></span><span class="line"><span class="cl"><span class="nb">printf</span> <span class="s1">'companion_checks=PASSn'</span>
</span></span><span class="line"><span class="cl">cleanup
</span></span><span class="line"><span class="cl"><span class="nb">trap</span> - EXIT HUP INT TERM
</span></span><span class="line"><span class="cl"><span class="nb">printf</span> <span class="s1">'Both throwaway instances stopped; evidence retained at %sn'</span> <span class="s2">"</span><span class="nv">$TASK_LAB</span><span class="s2">"</span></span></span></code></pre>
</div>
</div>
</div>
<h2>Disclosure</h2>
<p>AI assisted initial drafting, editing, and companion-script preparation and testing. I edited the article and supplied the original lab results. This is a synthetic-data lab, not a customer incident or a Percona Operator recovery test.</p>
<p><em>This post is part of the <a href="https://percona.community/blog/write-for-percona-community/">Percona Community Writers Program</a>.</em></p>
<p><a href="https://percona.community/blog/2026/10/20/prove-postgresql-restore-before-kubernetes-migration/">Prove your PostgreSQL restore before a Kubernetes migration</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Amazic joins MariaDB Foundation as a Silver Sponsor</title>
        <link>https://mariadb.org/amazic-joins-mariadb-foundation-as-a-silver-sponsor/</link>
        <pubDate>Tue, 20 Oct 2026 07:06:16 +0000</pubDate>
        <dc:creator>Anna Widenius</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/amazic-joins-mariadb-foundation-as-a-silver-sponsor/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB Foundation is pleased to welcome Amazic as a Silver Sponsor, adding a new supporter with strong connections across the software ecosystem. Amazic connects innovative software vendors with partners, developers and organisations looking to adopt modern technologies. Combining software distribution with technical enablement, training, content and community-focused events, Amazic helps bridge the gap between technology […]<br />
Amazic joins MariaDB Foundation as a Silver Sponsor appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/amazic-joins-mariadb-foundation-as-a-silver-sponsor/">Amazic joins MariaDB Foundation as a Silver Sponsor</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Foundation is pleased to welcome Amazic as a Silver Sponsor, adding a new supporter with strong connections across the software ecosystem. Amazic connects innovative software vendors with partners, developers and organisations looking to adopt modern technologies. Combining software distribution with technical enablement, training, content and community-focused events, Amazic helps bridge the gap between technology […]</p>
<p><a href="https://mariadb.org/amazic-joins-mariadb-foundation-as-a-silver-sponsor/">Amazic joins MariaDB Foundation as a Silver Sponsor</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/amazic-joins-mariadb-foundation-as-a-silver-sponsor/">Amazic joins MariaDB Foundation as a Silver Sponsor</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Three Days in Prague with the Percona MongoDB Team</title>
        <link>https://percona.community/blog/2026/10/19/three-days-in-prague-with-the-percona-mongodb-team/</link>
        <pubDate>Mon, 19 Oct 2026 08:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/three-days-in-prague-with-the-percona-mongodb-team/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>Our MongoDB team at Percona works remotely, spread across many countries and time zones. Most days that works well, but once in a while it helps to be in the same room. In October we met in Prague for three days to plan next year, look at how we work, and spend some time together away from our laptops.</p>
<p><a href="https://percona.community/blog/2026/10/19/three-days-in-prague-with-the-percona-mongodb-team/">Three Days in Prague with the Percona MongoDB Team</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Our MongoDB team at Percona works remotely, spread across many countries and time zones. Most days that works well, but once in a while it helps to be in the same room. In October we met in Prague for three days to plan next year, look at how we work, and spend some time together away from our laptops.</p>
<p>Here is a short look at what we did and what we learned.</p>
<p><figure><img decoding="async" width="1600" height="1200" src="https://percona.community/blog/2026/10/prague-team-meeting-group_hu_d950145bd1f58418.webp" alt="The Percona MongoDB team in Prague" loading="lazy"></figure>
</p>
<h2>Who was there</h2>
<p>Engineers, QA, documentation, product management and our Scrum Master, all working on <a href="https://docs.percona.com/percona-server-for-mongodb/" target="_blank" rel="noopener noreferrer">Percona Server for MongoDB</a>, <a href="https://docs.percona.com/percona-backup-mongodb/" target="_blank" rel="noopener noreferrer">Percona Backup for MongoDB</a> and Percona ClusterSync for MongoDB. One teammate could not travel and joined part of the sessions over Zoom.</p>
<h2>Planning 2027 with customer and community feedback</h2>
<p>We spent most of the first day on the roadmap. We started with the product vision, then went through feedback from customers and the community, and the requests we see most often in support. After that we ran a roadmap workshop with Now, Next and Later columns on the wall and moved cards around until we agreed where to focus for each product.</p>
<p>A good part of the feedback we reviewed was already in our plans. The rest went into the roadmap for the product it belongs to. If you use any of our MongoDB products and have a feature request or a pain point, the <a href="https://forums.percona.com/" target="_blank" rel="noopener noreferrer">Percona Community Forum</a> is a good place to tell us. That feedback ends up in exactly these discussions.</p>
<p><figure><img decoding="async" width="1600" height="1204" src="https://percona.community/blog/2026/10/prague-roadmap-workshop_hu_11f69b8645280309.webp" alt="Roadmap workshop with Now, Next and Later columns" loading="lazy"></figure>
</p>
<p><figure><img decoding="async" width="566" height="752" src="https://percona.community/blog/2026/10/prague-roadmap-board_hu_2df2ceb9fa99236b.webp" alt="Going through the roadmap cards" loading="lazy"></figure>
</p>
<p>We also looked back at the engineering goals we set for this year: which ones helped our users and the team, and which ones we should not continue. That review will shape our goals for next year.</p>
<h2>Using AI agents for documentation</h2>
<p>With regular releases across several products, documentation can easily become the slowest step. Rasika from our documentation team showed the agents she built to help with this:</p>
<ul>
<li><strong>Release notes agent:</strong> takes the exact versions, the Jira release report and the product template, and opens a pull request with draft release notes.</li>
<li><strong>Feature agent:</strong> takes a Jira ticket or other source and drafts the feature docs, references and navigation updates in a pull request.</li>
</ul>
<p>The agents draft and check. The writer still resolves gaps with engineering, reviews the diff, approves and publishes. We agreed to make this part of our normal workflow and to keep docs changes for a release in a release branch, so they are ready when the release goes out.</p>
<p><figure><img decoding="async" width="1007" height="755" src="https://percona.community/blog/2026/10/prague-docs-agents_hu_a8c7c99fe41448c0.webp" alt="Rasika presenting documentation pull requests with project agents" loading="lazy"></figure>
</p>
<h2>Getting releases out faster</h2>
<p>We release Percona Server for MongoDB every month, and a common question from users is how quickly we follow upstream MongoDB releases. We spent an afternoon going through every step of a release, from building and testing to documentation, to see where the time goes.</p>
<p>The main ideas were more build and test capacity so more jobs can run in parallel, and more automation to pick up new upstream tags as soon as they are published. We also talked about balance. Faster releases are good for users, but not at the cost of burning out the team.</p>
<h2>Performance testing</h2>
<p>Our QA team walked us through how we run performance tests today and what we focus on. One thing we want to add is regular performance regression checks for Percona ClusterSync for MongoDB builds, so we catch slowdowns before a release, not after.</p>
<h2>Retro and a quick safety check</h2>
<p>Our Scrum Master ran a retro using Start, Stop, Continue. Before that we did a safety check: everyone put a sticky note on a scale from 1 (“I won’t say anything meaningful, I’ll smile and agree”) to 5 (“I’ll talk about anything”). Most of the team voted 4. It takes five minutes and tells you a lot about how open the following discussion will be, so it is worth trying with your own team.</p>
<p>One theme that came up clearly: there are still small, repetitive tasks in our daily work where we could use AI more.</p>
<p><figure><img decoding="async" width="547" height="691" src="https://percona.community/blog/2026/10/prague-retro-board_hu_717894a02d271252.webp" alt="Start, Stop, Continue retro board" loading="lazy"></figure>
</p>
<p><figure><img decoding="async" width="495" height="719" src="https://percona.community/blog/2026/10/prague-safety-check_hu_442d88a4ad0fda1d.webp" alt="Safety check before the retro" loading="lazy"></figure>
</p>
<h2>Prison Island and Prague evenings</h2>
<p>On the second day we left the meeting room for Prison Island Praha, a set of small challenge rooms you solve in teams. Some rooms need logic, some need speed, and most need a bit of both. It was a good way to see how people work together when the problem is not a database.</p>
<p>The evenings were for good food and Czech beer, at Vinohradský Parlament on the first night and Cà Phê Cổ on the second. Thanks to Jakub for organizing all of it.</p>
<p><figure><img decoding="async" width="1600" height="938" src="https://percona.community/blog/2026/10/prague-prison-island-team_hu_318390390dd28313.webp" alt="The team at Prison Island Praha" loading="lazy"></figure>
</p>
<p><figure><img decoding="async" width="1600" height="1101" src="https://percona.community/blog/2026/10/prague-prison-island-lineup_hu_7cacf287f9893420.webp" alt="Lining up at Prison Island" loading="lazy"></figure>
</p>
<p><figure><img decoding="async" width="1005" height="752" src="https://percona.community/blog/2026/10/prague-team-dinner_hu_40e4d07ea9866c3e.webp" alt="Team dinner in Prague" loading="lazy"></figure>
</p>
<p><figure><img decoding="async" width="1600" height="1200" src="https://percona.community/blog/2026/10/prague-evening-out_hu_21194042d1a6f701.webp" alt="An evening out in Prague" loading="lazy"></figure>
</p>
<h2>Wrapping up</h2>
<p>Three days was not enough for every topic on our list, and the rest will go into our regular team calls. But meeting in person makes the remote work that follows easier. We know each other better, and we left with a clear picture of what we want to build next.</p>
<p>If you run MongoDB with Percona Server for MongoDB, Percona Backup for MongoDB or Percona ClusterSync for MongoDB, we would like to hear from you. Share your feedback, questions and ideas on the <a href="https://forums.percona.com/" target="_blank" rel="noopener noreferrer">Percona Community Forum</a>.</p>
<p><a href="https://percona.community/blog/2026/10/19/three-days-in-prague-with-the-percona-mongodb-team/">Three Days in Prague with the Percona MongoDB Team</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Make pg_stat_monitor stable again!</title>
        <link>https://percona.community/blog/2026/10/19/pg-stat-monitor-2-4-0/</link>
        <pubDate>Mon, 19 Oct 2026 00:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/make-pg_stat_monitor-stable-again/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>pg_stat_monitor started as a fork of pg_stat_statements, built to be a more advanced replacement for it. It provides more detailed information about query execution and groups it in configurable time buckets, so you can look at what happened in a particular time window. It also powers the Query Analytics feature in Percona Monitoring and Management (PMM). However, over time other work took priority at Percona, and the extension stopped getting the attention it needed. The original developers moved on to other things, and the reasoning behind several design decisions went with them. For a couple of years it stayed in maintenance mode, we were fixing reported bugs, and never stepped back to look at deep architectural issues. All that led to a degraded user experience and stability issues.</p>
<p><a href="https://percona.community/blog/2026/10/19/pg-stat-monitor-2-4-0/">Make pg_stat_monitor stable again!</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>pg_stat_monitor started as a fork of pg_stat_statements, built to be a more advanced replacement for it. It provides more detailed information about query execution and groups it in configurable time buckets, so you can look at what happened in a particular time window. It also powers the Query Analytics feature in Percona Monitoring and Management (PMM). However, over time other work took priority at Percona, and the extension stopped getting the attention it needed. The original developers moved on to other things, and the reasoning behind several design decisions went with them. For a couple of years it stayed in maintenance mode, we were fixing reported bugs, and never stepped back to look at deep architectural issues. All that led to a degraded user experience and stability issues.</p>
<p>2.4.0 is our attempt to turn that around. It is the biggest release in years: about 250 commits since 2.3.2. We restructured the code and fixed bugs across the whole extension, and the C code got about 20% smaller. Among the fixes are several buffer overflows, a use-after-free, a lock ordering problem and a few statistics that were simply wrong. We also backported the pg_stat_statements regression tests. The most important fixes, though, are about memory management, and that is what this post is about. For everything else, see the <a href="https://docs.percona.com/pg-stat-monitor/release-notes/2.4.0.html" target="_blank" rel="noopener noreferrer">release notes</a>.</p>
<h2>The symptoms</h2>
<p>Well, memory leaked under certain workloads. The end was always the same: the process eventually got killed by the OOM killer.</p>
<p>Not every workload was affected, it depended on how it was run. Queries sent over the simple protocol were fine. Named prepared statements leaked memory on every execution. Statements running through SPI inside a background worker leaked the same way. In both cases nothing reclaimed the memory, so growth stopped only when the session or the worker did.</p>
<p>Another problematic case is when statements produce warnings. On PostgreSQL 18 and earlier, each warning caused a small memory leak, which could accumulate over time if many warnings were generated.</p>
<h2>How PostgreSQL manages memory</h2>
<p>Server code does not call <code>malloc()</code> and <code>free()</code> directly. Instead it uses memory contexts, also known as memory arenas outside PostgreSQL. Every allocation happens within a context, and freeing the context releases all allocated memory at once. Contexts form a tree structure, so freeing a parent context frees every child context as well. This is what lets PostgreSQL manage memory efficiently and survive an error thrown in the middle of a query.</p>
<p>So when you write an extension, you should keep in mind which context your allocations belong to and when that context will be freed.</p>
<p>Four contexts matter for our topic:</p>
<ul>
<li><code>TopMemoryContext</code> is the root context for the backend. It lives as long as the backend does and is only destroyed when the backend exits.</li>
<li><code>TopTransactionContext</code> is reset at every commit and every abort, which deletes all of its child contexts.</li>
<li><code>MessageContext</code> is reset after each client protocol message.</li>
<li><code>ErrorContext</code> is reserved for error reporting. On PostgreSQL 18 and earlier, it is only reset during error recovery.</li>
</ul>
<p>An extension can create its own context or use one of the existing ones. Choosing a context with the wrong lifetime causes problems: your data either vanishes too early or stays around longer than needed. The latter looks exactly like a leak, even though every byte is still accounted for.</p>
<h2>How pg_stat_monitor managed its memory</h2>
<h3>The original design</h3>
<p>pg_stat_monitor collects per-statement statistics in backend-local memory first, and dumps them into the shared time buckets when the statement finishes and we have the full set of data. That local memory lived in a context called <code>PgsmMemoryContext</code>, and it was created as a child of <code>TopMemoryContext</code>. <code>TopMemoryContext</code> lives as long as the backend does. So instead of relying on context lifetime, pg_stat_monitor used a persistent context, and for cleanup it used a reset callback assigned to another context: <code>MessageContext</code>. <code>MessageContext</code> is reset after every client protocol message, and a reset invokes the callback, which cleaned out <code>PgsmMemoryContext</code> without destroying it.</p>
<p>One detail matters for everything below. A reset callback in PostgreSQL is one-shot: it is popped off the context’s callback list before it is called, so it fires once and is gone. To keep the cleanup working, pg_stat_monitor had to register a fresh callback for every message. It did this from the post parse analyze hook, one of the first steps in the statement lifecycle. So callback setup depends not on the statement finishing, but on the next message going through parse analysis. This design has two weak points, and we hit both of them.</p>
<h3>The callback is not registered on every execution path</h3>
<p>Background workers have no <code>MessageContext</code>. So a statement running through SPI inside a background worker never arms the reset callback at all. Nothing resets <code>PgsmMemoryContext</code>, and because its parent is <code>TopMemoryContext</code>, nothing else is going to. It keeps growing for the life of the worker.</p>
<p>In the extended query protocol, the client sends a named prepared statement as separate messages: <code>Parse</code> once, then <code>Bind</code> and <code>Execute</code> for every run. Parse analysis happens only during <code>Parse</code>, so that is the only message that arms the callback. When <code>MessageContext</code> is reset after <code>Parse</code>, the callback fires and nothing re-arms it. <code>MessageContext</code> is still reset after every <code>Bind</code> and <code>Execute</code>, but no callback is attached to it anymore, so <code>PgsmMemoryContext</code> keeps growing for the life of the session. This is the pattern database drivers use for prepared statements. Note that the SQL-level <code>PREPARE</code> and <code>EXECUTE</code> commands are not affected, because each <code>EXECUTE</code> statement goes through parse analysis itself and re-arms the callback.</p>
<h3>The error path allocated into a context nobody resets</h3>
<p>pg_stat_monitor records the warnings and errors a statement produces, so it hooks into the code PostgreSQL uses to emit log messages. That hook runs in the middle of error reporting, and error reporting has a memory context of its own, <code>ErrorContext</code>. PostgreSQL keeps that one reserved so it always has somewhere to build a message, even when the backend is short on memory. It is cleaned out when the server unwinds from an error. A <code>WARNING</code> does not unwind anything: the statement simply carries on. PostgreSQL 19 added <code>ErrorContext</code> resets after reporting a warning, so this leak only affects PostgreSQL 18 and earlier.</p>
<p>Our hook copied the query text wherever it happened to be running, so that copy landed in <code>ErrorContext</code> instead of in pg_stat_monitor’s own context. Nothing was ever going to reclaim it. The entry for the statement itself went to <code>PgsmMemoryContext</code>, so it stayed there until the next <code>MessageContext</code> reset cleaned it up, if that ever happened.</p>
<p>Both problems come from the same place. We inherited the design from pg_stat_statements, which we forked years ago, and we never revisited it as pg_stat_monitor grew code paths that upstream does not have. The test suite did not help either. We had nothing that ran a background worker in a loop, nothing that held a session open across thousands of <code>Bind</code> and <code>Execute</code> cycles, and nothing that measured backend memory at all. None of this is exotic.</p>
<h2>What we changed</h2>
<p>Both problems have the same shape. The memory sat in a context that never dies, and the cleanup depended on an event that does not always happen. Rather than trying to make the cleanup callback fire on every path, we changed where the memory lives.</p>
<p>Every path that can execute a statement runs inside a transaction. Background worker SPI, named prepared statements, ordinary queries. A background worker may not have a <code>MessageContext</code>, but it always has a transaction.</p>
<p>The change is:</p>
<ul>
<li><code>PgsmMemoryContext</code> is no longer a child of <code>TopMemoryContext</code>. It is created as a child of <code>TopTransactionContext</code>, so it is automatically deleted at every commit and every abort. There is no callback to register and nothing to re-arm, so there is no execution path left that can skip the cleanup.</li>
<li>There is a special handling of subtransactions, but in any case the memory is tied to the top-level transaction and will be cleaned up when that transaction ends.</li>
<li>The error and utility statement paths no longer allocate an entry at all. They use a local variable that goes away by itself when the function returns, which removes the <code>ErrorContext</code> allocations completely.</li>
</ul>
<p>This covers all three cases from the beginning of the post. A background worker always runs its statements inside a transaction, so its memory is now freed when that transaction ends, the same as in a regular backend. Named prepared statements no longer depend on parse analysis to clean up after them, every <code>Execute</code> is followed by a commit that frees the memory. Warnings no longer allocate anything that outlives the hook.</p>
<h2>What’s next</h2>
<p>2.4.0 was about stabilizing the code base we already have. We reworked memory management, removed code we no longer need, and built the test coverage that should have been there from the start. We did not change how the extension is structured. That is the plan for the next major release: we want to revisit the architecture of pg_stat_monitor, starting with how it uses shared memory and how it behaves when that memory fills up.</p>
<p><a href="https://percona.community/blog/2026/10/19/pg-stat-monitor-2-4-0/">Make pg_stat_monitor stable again!</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Foundation: Exploring TidesDB Performance with TAF</title>
        <link>https://mariadb.org/mariadb-foundation-exploring-tidesdb-performance-with-taf/</link>
        <pubDate>Fri, 16 Oct 2026 19:31:58 +0000</pubDate>
        <dc:creator>Jonathan Miller</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-foundation-exploring-tidesdb-performance-with-taf/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>TidesDB now exists inside MariaDB as a pluggable storage engine. With the TideSQL plugin available, anyone can load TidesDB into a MariaDB server and begin experimenting with it. But having a plugin is only the first step — you still need a practical, reproducible way to run real workloads against it, that’s where TAF comes […]<br />
MariaDB Foundation: Exploring TidesDB Performance with TAF appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/mariadb-foundation-exploring-tidesdb-performance-with-taf/">MariaDB Foundation: Exploring TidesDB Performance with TAF</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>TidesDB now exists inside MariaDB as a pluggable storage engine. With the TideSQL plugin available, anyone can load TidesDB into a MariaDB server and begin experimenting with it. But having a plugin is only the first step — you still need a practical, reproducible way to run real workloads against it, that’s where TAF comes […]</p>
<p><a href="https://mariadb.org/mariadb-foundation-exploring-tidesdb-performance-with-taf/">MariaDB Foundation: Exploring TidesDB Performance with TAF</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/mariadb-foundation-exploring-tidesdb-performance-with-taf/">MariaDB Foundation: Exploring TidesDB Performance with TAF</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>When a Small Change Writes Too Much – How A Linux Kernel Improvement Can Strike You in PXC/Galera Workloads</title>
        <link>https://www.percona.com/blog/when-a-small-change-writes-too-much-how-a-linux-kernel-improvement-can-strike-you-in-pxc-galera-workloads/</link>
        <pubDate>Fri, 16 Oct 2026 12:58:08 +0000</pubDate>
        <dc:creator>Przemysław Malkowski</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/when-a-small-change-writes-too-much-how-a-linux-kernel-improvement-can-strike-you-in-pxc-galera-workloads/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>We’ve recently been dealing with an interesting customer case where a PXC version upgrade from 5.7 to 8.0 seemed to trigger a completely unexpected problem. Even though the workload and MySQL settings did not change, all PXC members began exhibiting sparse but regular bursts of massive disk writes. Yet the MySQL side workload statistics that … Continued<br />
The post When a Small Change Writes Too Much – How A Linux Kernel Improvement Can Strike You in PXC/Galera Workloads appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/when-a-small-change-writes-too-much-how-a-linux-kernel-improvement-can-strike-you-in-pxc-galera-workloads/">When a Small Change Writes Too Much – How A Linux Kernel Improvement Can Strike You in PXC/Galera Workloads</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>We’ve recently been dealing with an interesting customer case where a PXC version upgrade from 5.7 to 8.0 seemed to trigger a completely unexpected problem. Even though the workload and MySQL settings did not change, all PXC members began exhibiting sparse but regular <strong>bursts of massive disk writes</strong>. Yet the MySQL side workload statistics that we gathered during those bursts did not explain the volume of them at all!</p>
<p><!-- IMAGE: upload images/image1.png to the Media Library and insert it here --></p>
<p>Analyzing these bursts further with pidstat and iostat confirmed that the mysqld process was indeed the sole source of excessive disk writes, and digging further showed the responsible threads to be the <a href="https://github.com/percona/galera/blob/a6b54d887d58bae43ae3f46f5696195329405b7e/gcs/src/gcs.cpp#L1688-L1704">Galera receiver thread</a> responsible for subscribing to the replication stream, as well as the main connection threads on the writer node, or <strong>Galera applier threads</strong> on the secondary members. And what’s most important is that there was a <strong>huge disparity</strong> between InnoDB engine threads writes (redo, undo, tablespace, etc) and binary log writes versus what was accounted to the Galera threads.</p>
<p>At first, it looked like during the burst, several GB of write-sets were received and applied, yet InnoDB barely changed any pages. All InnoDB-related write activity was completely flat, so they did not participate in these high IO load spikes at all! An example mysqld per-thread breakdown for <strong>a few-second burst</strong> looked like this:</p>
<div>
<table>
<thead>
<tr>
<th>Thread group</th>
<th>Accounted Writes</th>
<th>Share</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>applier</code> (Galera write-set appliers, many threads)</td>
<td>13.0 GB</td>
<td>61%</td>
</tr>
<tr>
<td><code>galera_recv-0</code> (Galera receiver thread)</td>
<td>5.2 GB</td>
<td>24%</td>
</tr>
<tr>
<td><code>ib_pg_flush*</code> (InnoDB page cleaners)</td>
<td>2.0 GB</td>
<td>9%</td>
</tr>
<tr>
<td><code>ib_log_writer</code> (redo log)</td>
<td>0.76 GB</td>
<td>4%</td>
</tr>
<tr>
<td><code>Galera_srvc</code> (Galera service thread)</td>
<td>0.29 GB</td>
<td>1%</td>
</tr>
</tbody>
</table>
</div>
<p>The quick thought on the small redo log vs potentially huge writeset volume was that maybe transactions changing a single column would bloat the binlog events with other large blob/text/json columns, due to <code>binlog_row_image=full</code>, as the ROW image format applies to both Galera writesets and binary logs. But, analyzing the binary logs (with <a href="https://github.com/PrzemekMalkowski/binlogsum">binlogsum</a>) showed moderate and completely flat volume, nothing related to those bursts.</p>
<p>Looking for clues, I asked myself, so what are those Galera threads exactly writing? The receiver thread copies all replicated writesets into the Galera cache file(s), but also reclaims the space when the ring wraps (the ring-buffer allocator walks forward from the oldest buffers and discards released ones).</p>
<p>Then, the applier or connection threads also update the cache according to the transaction’s state. Still, when there are no spikes with big writesets (MySQL write load stays flat), why would we see such massive IO write bursts only accounted to the Galera threads?</p>
<p>And why would that weird behavior start to happen after the PXC upgrade? We could not find any clues in the source code; there were no changes to the Galera plugin or wsrep extensions that would explain these bursts.</p>
<p>Later, we found out additional information, which turned out to be crucial – not only the PXC version, but also the OS was upgraded! Now, the previous one: Debian 11, uses Linux <strong>5.10</strong> LTS kernel series, while the upgraded version 12 uses the Linux <strong>6.1 LTS kernel</strong> series. And as the main suspect at this point was the Gcache store, how would the new kernel change the way this file is handled, though? It turns out that it does indeed, and it is related to the fact that the Galera plugin uses the <a href="https://kernel-internals.org/io/mmap-io/"><strong>mmap() path</strong></a> to handle the cache!</p>
<h2>Page Folios in Modern Linux Kernels</h2>
<p>In pursuit of handling large data on machines with big RAM and disk space more efficiently in Linux, in addition to <a href="https://docs.kernel.org/admin-guide/mm/hugetlbpage.html">huge pages</a>, something called <strong>page folios</strong> was <a href="https://kernelnewbies.org/Linux_5.16#Memory_folios_infrastructure_for_a_faster_memory_management">introduced in 5.16</a>. What is relevant to this case is that large folios were implemented to also handle the page cache, initially only for the XFS filesystem in <a href="https://kernelnewbies.org/Linux_5.18#Memory_management">kernel <strong>5.18</strong></a>, and yes, the affected cluster kept Galera cache on the XFS partition. Then, large folios support is what makes the kernel 6.1 different from the previous 5.10.</p>
<p>OK, but why would “folios” cause bursts, and why do they not affect InnoDB writes, but only the Galera threads? Now, unlike any other data or log files in MySQL (except <a href="https://dev.mysql.com/doc/refman/9.7/en/server-system-variables.html#sysvar_temptable_max_mmap">TempTable</a> storage) or MariaDB, Galera cache files do not use the <code>write()</code> or <code>pwrite()</code> path, but <strong><code>mmap</code></strong> rather.</p>
<p>This difference pointed me to some reports complaining about the <strong>systemd journal’s</strong> excessive IO problems, which turns out to be <strong><a href="https://systemd.io/JOURNAL_FILE_FORMAT/">using <code>mmap()</code></a> path as well</strong>!</p>
<p>Funny enough, the problem is not very well known, and the root cause is still being confused to this day, even in the most affected systemd community. Some reports describe the journal IO pressure being higher than expected, but never define the real culprit. The systemd issue that currently covers this problem best is:<br />
<a href="https://github.com/systemd/systemd/issues/40262">https://github.com/systemd/systemd/issues/40262</a><br />
Related kernel thread discussions:<br />
<a href="https://lwn.net/Articles/1092530/">https://lwn.net/Articles/1092530/</a><br />
<a href="https://lists.openwall.net/linux-kernel/2026/08/20/1169">https://lists.openwall.net/linux-kernel/2026/08/20/1169</a><br />
And despite many good blog posts about optimizing journal IO, I found only this one that points to the folio impact:<br />
<a href="https://www.cnblogs.com/32bin/p/22929557">https://www.cnblogs.com/32bin/p/22929557</a><br />
The problem even reached the general tech press, as still unsolved in 2026:<br />
<a href="https://northeasttimes.com/2026/08/14/a-single-log-line-eats-49kb-of-disk-and-linux-admins-are-furious/">https://northeasttimes.com/2026/08/14/a-single-log-line-eats-49kb-of-disk-and-linux-admins-are-furious/</a></p>
<p>In short: on a large folios-enabled kernel and filesystem, page cache entries are grouped in folios. In early kernel implementations (5.18–6.5), <code>write()</code>/<code>pwrite()</code> paths were also affected, but InnoDB typically uses <code>O_DIRECT</code> for table spaces (so not using page cache at all), and redo and binlog use small appends, which create order-0 (4 kB) small folios. Then in Linux 6.6, a patch was implemented that added per-block dirty tracking, as now <a href="https://docs.kernel.org/filesystems/iomap/design.html">iomap</a> records the overlapping filesystem blocks (filesystem-block granularity): <a href="https://lore.kernel.org/linux-xfs/874jr53ab4.fsf@doe.com/T/">see RFCv3 for details</a>. With mmap writes, any update only tracks a whole folio. Thus, writeback page cache iteration, in the mmap case, will sync the whole folio (up to 2MB) instead of the exact fs block (4kB). In other words, the <code>mmap()</code> path cannot benefit from the improved I/O tracking loops in 6.6+.</p>
<p>So, yes, the difference may be potentially huge, and small random writes to a mmapped file can induce huge IO bursts when the related page cache gets flushed to disk.</p>
<p>There are important variables here:</p>
<ul>
<li>
<ul>
<li>Readahead size via <code>optimal_io_size</code> → <code>read_ahead_kb</code>, per block device, influences the sizes of large folios allocated through it (from 128kB up to even 2MB)</li>
<li>Bursts are specifically periodic due to how writeback of dirty data gets invoked – every <a href="https://www.kernel.org/doc/html/latest/admin-guide/sysctl/vm.html#dirty-writeback-centisecs"><code>dirty_writeback_centisecs</code></a> (default 5 seconds) the kernel checks if the dirty data (tracked per inode) age is old enough via <a href="https://www.kernel.org/doc/html/latest/admin-guide/sysctl/vm.html#dirty-expire-centisecs"><code>dirty_expire_centisecs</code></a> (default 30 seconds) – the observed roughly 33-second bursts on the affected PXC nodes, are consistent with this mechanism (although these settings do not guarantee a fixed flush period) when the object, here the Gcache inode, gets flushed when receiving regular writes.</li>
<li>Workload characteristics matter a lot – writes accumulated within a single folio will result in way smaller write amplifications as compared to a file being updated in many random places, hence touching many different large folios.</li>
</ul>
</li>
</ul>
<p><a href="https://www.percona.com/wp-content/uploads/2026/10/folio-writeback-truck-1.svg"><img decoding="async" class="size-full wp-image-54721 aligncenter" src="https://www.percona.com/wp-content/uploads/2026/10/folio-writeback-truck-1.svg" alt=""></a>The whole concept is damn complex, so let me share a more technical deep dive schematic in a separate document. Bear in mind, I am not a Linux kernel expert, so I hope there are not too many errors. The document is available here: <a href="https://przemekmalkowski.github.io/folios-mmap/">https://przemekmalkowski.github.io/folios-mmap/</a></p>
<h2>Galera Cache Impact</h2>
<p>Galera’s writeset cache has been historically a mmapped file from the very beginning. And there are a couple of factors that make the large folio-induced write amplifications particularly severe here:</p>
<ul>
<li>The cache file is by <a href="https://docs.percona.com/percona-xtradb-cluster/8.0/wsrep-provider-index.html#gcachesize">default 128MB</a>, but very often a much bigger size is used to provide long enough IST coverage.</li>
<li>In addition to sequential appends of new writesets, there are many <strong>small and random updates</strong> that change their <a href="https://deepwiki.com/percona/galera/5-storage-system-(gcache)#buffer-management">status</a> to <a href="https://github.com/percona/galera/blob/13ff9ed6577de1aa01e6e296f87ba439cde70b98/gcache/src/gcache_bh.hpp#L104-L108">RELEASED</a> when the transaction is already applied and ready to be overwritten.</li>
<li>Quite often, MySQL data, together with the galera.cache file, is placed on a large storage, like RAID arrays. Specifically for software RAID, the Linux kernel automatically increases the readahead size proportionally to the array geometry and the advertised optimal I/O size. For hardware RAID and dm/LVM stacks, it may be the case too. This leads to even larger folios, and that’s exactly what happened for the said customer case.</li>
<li>During the PXC member startup, the whole gcache file is scanned sequentially during the <a href="https://docs.percona.com/percona-xtradb-cluster/8.4/wsrep-provider-index.html#gcacherecover">recovery process</a> (enabled by default), which can immediately populate the large page cache areas.</li>
</ul>
<p>Having said that, every PXC/Galera cluster may be affected by extra write amplifications for the galera.cache (and gcache.page.X), if kernel and filesystem versions support large folios. But the impact may be small enough to slip through unnoticed when the default readahead of 128kB is set for the disk block device. The extra IO write pressure may be wrongly assumed to be related to regular (and complex enough) database writes. But when the storage uses bigger readahead, and large folios get to even 2MB in size, the amplification is huge and really difficult to miss.</p>
<h2>Possible workarounds</h2>
<p>As currently there is no Linux kernel side solution implemented for the mmap() path, there are a couple of workarounds possible, and they apply to any applications using mmapped files, not only PXC/Galera:</p>
<ul>
<li>Depending on the kernel version, using the <strong>EXT4</strong> filesystem may be an option, as folio support was introduced there much later (<a href="https://kernelnewbies.org/Linux_6.16#Some_Ext4_performance_improvements">in 6.16</a>) than in XFS (5.18) – if applicable, this allows us to avoid the said amplifications altogether. It helped in this customer’s case!</li>
<li>Lower the <a href="https://kernel-internals.org/io/readahead/">readahead</a> size for the disk device – for the price of potentially limited performance, the maximum size of large folios will be impacted by it, making the amplifications smaller.</li>
<li>Modify the <a href="https://github.com/percona/galera/blob/007c7363b74cc2626c54569d9830a12bc2c665db/galerautils/src/gu_mmap.cpp#L67">application mmap calls</a> to use <a href="https://kernel-internals.org/io/mmap-io/?h=madv_random#hints-that-affect-io-behaviour">MADV_RANDOM via madvise() hints</a>. It will basically disable readahead via enforced random access.</li>
<li>Stop using <code>mmap()</code> path in favor of <code>pwrite()</code> on Linux 6.6+.</li>
<li>Finally, use a customized modern kernel, <strong>compiled without THP support</strong> via the disabled <code>CONFIG_TRANSPARENT_HUGEPAGE</code> option – <a href="https://github.com/ctrliq/kernel-src-tree/commit/421f1ab48452af48b64e205de1caca3d1ba415f4">large folios are not created on recent kernels when THP is not available</a>. (Note that disabling THP in GRUB is not enough to disable large folios!)</li>
</ul>
<p>For PXC, I reported the problem here: <a href="https://perconadev.atlassian.net/browse/PXC-5340">https://perconadev.atlassian.net/browse/PXC-5340</a></p>
<h2>How to check if you’re affected</h2>
<ul>
<li>Kernel and filesystem: XFS on 5.18+, or ext4 on 6.16+.</li>
<li>Readahead size: <code>cat /sys/block//queue/{read_ahead_kb,optimal_io_size}</code>.</li>
<li>Large mappings: <code>FilePmdMapped</code> in <code>/proc/meminfo</code> or <code>smaps</code> for the gcache mapping, and <code>thp_file_mapped</code> climbing in <code>/proc/vmstat</code>.</li>
<li>Bursts: about every 30–35 s (unless different timers in <code>vm.dirty_expire_centisecs</code> and <code>vm.dirty_writeback_centisecs</code>) in iostat, with per-thread <code>pidstat -d</code> charges in up to 2 MB multiples.</li>
</ul>
<h2>More on Large Folios Impact Cases</h2>
<p>During research, I found another interesting story. It turns out that mixing active write workloads using both page cache and bypassing it with <code>O_DIRECT</code> may lead to additional unexpected stalls. This time it was visible with RocksDB, as described here:</p>
<p><a href="https://blog.wegenz.in/posts/page-cache-reclaim-foliotune-direct-io-stalemate">https://blog.wegenz.in/posts/page-cache-reclaim-foliotune-direct-io-stalemate</a></p>
<p><em>The article was created by a human.</em></p>
<p>The post <a href="https://www.percona.com/blog/when-a-small-change-writes-too-much-how-a-linux-kernel-improvement-can-strike-you-in-pxc-galera-workloads/">When a Small Change Writes Too Much – How A Linux Kernel Improvement Can Strike You in PXC/Galera Workloads</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/when-a-small-change-writes-too-much-how-a-linux-kernel-improvement-can-strike-you-in-pxc-galera-workloads/">When a Small Change Writes Too Much – How A Linux Kernel Improvement Can Strike You in PXC/Galera Workloads</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>JavaScript in MySQL: Extending SQL, Not Moving the Application</title>
        <link>https://www.percona.com/blog/javascript-in-mysql-extending-sql-not-moving-the-application/</link>
        <pubDate>Thu, 15 Oct 2026 15:12:30 +0000</pubDate>
        <dc:creator>Marco Tusa</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/javascript-in-mysql-extending-sql-not-moving-the-application/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>At Percona Live Europe 2026, Dmitry Lenev and I presented JavaScript in My Database? Over My Dead Query, the story of component_js_lang, the V8-based JavaScript engine for Percona Server for MySQL 8.4. That experience told us few things: The presentation was seen as “for developers” What most DBA or DevOps heard was “JavaScript in the … Continued<br />
The post JavaScript in MySQL: Extending SQL, Not Moving the Application appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/javascript-in-mysql-extending-sql-not-moving-the-application/">JavaScript in MySQL: Extending SQL, Not Moving the Application</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><span>At Percona Live Europe 2026, Dmitry Lenev and I presented </span><i><span>JavaScript in My Database? Over My Dead Query</span></i><span>, the story of </span><span>component_js_lang</span><span>, the V8-based JavaScript engine for Percona Server for MySQL 8.4. That experience told us few things:</span></p>
<ul>
<li><span>The presentation was seen as “for developers”</span></li>
<li><span>What most DBA or DevOps heard was “JavaScript in the database” = “application logic in the database”</span></li>
</ul>
<p><span>This let most of the people pictured developers shipping their business logic into stored procedures. Order workflows, pricing rules, REST calls, all running inside mysqld. </span></p>
<p><span>That picture is wrong, and in this post I want to replace it with the right one, using the same four demos we showed on stage.</span></p>
<p><em><strong>The fear is reasonable, the target is wrong</strong></em></p>
<p><span>DBAs have earned their skepticism. Many of us have inherited a schema where thousands of lines of stored procedures </span><i><span>were</span></i><span> the application: impossible to test, impossible to version, impossible to scale out, and owned by nobody who still works there.</span></p>
<p><span>So when a new language arrives inside the server, the reflex is to protect the database from becoming an application server again. </span></p>
<h3><span>We share that reflex.</span> <span><br />
</span></h3>
<p><span>The point of this post is that JavaScript routines, used as designed, do not move us in that direction. </span><span><br />
</span><span>They move the opposite way: they make SQL stronger so that </span><i><span>less</span></i><span> logic needs to be pulled out of the database and re-implemented somewhere else.</span></p>
<p><span>The engine itself also enforces the boundary. Inside </span><span>component_js_lang</span><span> a routine has:</span></p>
<ul>
<li><span>No network I/O. No </span><span>fetch()</span><span>, no sockets. A routine cannot call your payment provider or another microservice.</span></li>
<li><span>No file system access. It cannot read configs, keys or files.</span></li>
<li><span>No Node.js or DOM APIs. No </span><span>require()</span><span>, no </span><span>process</span><span>, no npm ecosystem.</span></li>
<li><span>No useful async. Everything runs synchronously inside the statement.</span></li>
</ul>
<p><span>You cannot build an application with that toolbox. However you can build very good functions!</span></p>
<h2><span>What JavaScript routines are actually for</span></h2>
<p><span>A JavaScript routine extends the SQL vocabulary. It is a new function you call from </span><span>SELECT</span><span>, </span><span>JOIN</span><span>, </span><span>WHERE</span><span>, </span><span>GROUP BY</span><span> or a trigger, exactly like </span><span>LOWER()</span><span> or </span><span>JSON_EXTRACT()</span><span>. The only new syntax is </span><span>LANGUAGE JS</span><span>:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">CREATE FUNCTION norm_keys(d JSON) RETURNS JSON
DETERMINISTIC NO SQL LANGUAGE JS AS $$
  const walk = (j) =&gt; {
    if (j === null || typeof j !== 'object') return j
    if (Array.isArray(j)) return j.map(walk)
    const out = {}
    for (const [k, v] of Object.entries(j))
      out[k.toLowerCase()] = walk(v)
    return out
  }
  return walk(typeof d === 'string' ? JSON.parse(d) : d)
$$;</pre>
<p> </p>
<p><span>The rule we kept repeating on stage is simple: SQL owns the set, JavaScript owns the value. SQL is unbeatable at filtering, joining, ordering, windowing and aggregating. Where SQL and its procedural language stop is a short, very specific list:</span></p>
<ul>
<li><span>Recursion over a shape not known in advance. </span><span>JSON_TABLE</span><span> needs every path as a literal.</span></li>
<li><span>Arrays. SQL has no array type, so any algorithm that fills a grid has nowhere to live.</span></li>
<li><span>Big integers. </span><span>BIGINT</span><span> stops at 19 digits; an IBAN checksum needs 29.</span></li>
<li><span>Real iteration with aggregates. A recursive CTE cannot contain an aggregate or window function (ERROR 3575), and a </span><span>WHILE</span><span> loop in PL pays an executor round trip on every statement.</span></li>
<li><span>Rich string handling. </span><span>UPPER()</span><span> and </span><span>LOWER()</span><span> do not know that McDonald has a capital D.</span></li>
</ul>
<p><span>None of these is business logic. They are missing building blocks. JavaScript supplies them and hands the result straight back to SQL.</span></p>
<p><a href="https://www.percona.com/wp-content/uploads/2026/10/schema.png"><img loading="lazy" decoding="async" class="size-medium_large wp-image-54699 alignnone" src="https://www.percona.com/wp-content/uploads/2026/10/schema-768x403.png" alt="" width="768" height="403"></a></p>
<p><span>The JavaScript routine lives inside the SQL layer, not beside the application: a query calls it, and it returns a value to that query.</span></p>
<h2><span>Four demos, one pattern</span></h2>
<p><a href="https://www.percona.com/wp-content/uploads/2026/10/slide1.png"><img loading="lazy" decoding="async" class="size-medium_large wp-image-54700 alignnone" src="https://www.percona.com/wp-content/uploads/2026/10/slide1-768x372.png" alt="" width="768" height="372"></a></p>
<p><span>Each demo in the </span><a href="https://github.com/Tusamarco/blogs/tree/master/pleu_2026"><span>pleu_2026 repository</span></a><span> follows the same shape: SQL does the set work, a small JavaScript function does the one step SQL cannot phrase, and the decision that matters to the business stays in the application.</span></p>
<table>
<tbody>
<tr>
<td><span>Demo</span></td>
<td><span>What SQL could not do</span></td>
<td><span>The JavaScript piece</span></td>
<td><span>Result</span></td>
<td><span>What stays in the application</span></td>
</tr>
<tr>
<td><a href="https://github.com/Tusamarco/blogs/tree/master/pleu_2026/normalize_key"><span>Normalize JSON keys</span></a></td>
<td><span>Walk a JSON tree of unknown shape; four partners spell </span><span>customer.id</span><span> four ways</span></td>
<td><span>norm_keys()</span><span>, 9 lines</span></td>
<td><span>One report went from 51 lines with four </span><span>UNION ALL</span><span> branches to 19 lines with no partner names</span></td>
<td><span>Which partners to onboard and what the report means</span></td>
</tr>
<tr>
<td><a href="https://github.com/Tusamarco/blogs/tree/master/pleu_2026/validation_input"><span>Validate input at the door</span></a></td>
<td><span>Proper-case names, normalise phones, run an IBAN mod-97 on a 29-digit number</span></td>
<td><span>proper_name()</span><span>, </span><span>clean_email()</span><span>, </span><span>clean_phone()</span><span>, </span><span>valid_iban()</span><span>, </span><span>clean_contact()</span></td>
<td><span>460 of 2,000 rows caught, each with a list of what was wrong</span></td>
<td><span>What to do with a rejected contact: fix, call the customer, quarantine</span></td>
</tr>
<tr>
<td><a href="https://github.com/Tusamarco/blogs/tree/master/pleu_2026/deupe_data_cpu_bound_algorithm"><span>Deduplicate customers</span></a></td>
<td><span>Levenshtein distance needs a grid, and SQL has no arrays</span></td>
<td><span>lev_distance()</span><span> inside a </span><span>JOIN</span><span> predicate</span></td>
<td><span>Name equality found 21.7% of duplicates; blocking in SQL plus two distances found about 80% at 99.7% precision</span></td>
<td><span>Whether to merge two records, and how</span></td>
</tr>
<tr>
<td><a href="https://github.com/Tusamarco/blogs/tree/master/pleu_2026/where_should_I_live"><span>Where should Federico live?</span></a></td>
<td><span>Iterate to a geometric median; recursive CTEs refuse aggregates</span></td>
<td><span>Weiszfeld procedure</span></td>
<td><span>11.00 s in procedural SQL vs 0.52 s in JavaScript; 327,033 statements vs 6</span></td>
<td><span>Whether Federico actually moves</span></td>
</tr>
</tbody>
</table>
<p><span>A few details are worth calling out, because they are exactly where DBAs and developers should meet.</span></p>
<p><span>Dedupe: SQL narrows, JavaScript decides the distance. Comparing 3,000 customers with 2,000 signups is six million pairs. We never let JavaScript see them all. Ordinary join predicates on city and initials cut the work to 21,352 pairs, and only those reach </span><span>lev_distance()</span><span>. The function returns a number. Merging two customers is a business decision, and it stays in the application.</span></p>
<p><span>Validation: the function reports, the policy decides. </span><span>clean_contact()</span><span> returns the cleaned values </span><i><span>and</span></i><span> an array of errors. A trigger uses it to guarantee that nothing dirty lands in </span><span>contacts</span><span>, whoever does the insert: web app, mobile app, nightly import, or someone at a </span><span>mysql</span><span> prompt at 2am. What happens next to a rejected row is still the application’s job.</span></p>
<p><span>Federico: three steps, one of them JavaScript. Turning 44,347 raw stops into 16,232 weighted endpoints is two window functions, and nothing beats SQL there. Turning the resulting coordinate into a district is plain joins. JavaScript only runs the inner loop in the middle. Note that this demo uses </span><span>session.runSql()</span><span>, so today it runs on MySQL Enterprise; SQL from JavaScript is the top roadmap item for Percona Server.</span></p>
<h2><span>Where we draw the line</span></h2>
<p><span>A JavaScript routine belongs in the database when it makes a data operation possible or cheaper. It belongs in the application when it decides what the business does. In practice we use five questions before accepting a routine:</span></p>
<ol>
<li><span>Does it work on values the database already holds? If it needs an external service, a file or a user session, it is application code.</span></li>
<li><span>Is it deterministic, with no side effects outside the transaction? </span><span>DETERMINISTIC NO SQL</span><span> is not only a binlog requirement; it is a good design filter.</span></li>
<li><span>Is it called from SQL? A good routine sits inside a </span><span>SELECT</span><span>, a </span><span>JOIN</span><span>, a </span><span>JSON_TABLE</span><span> or a trigger. If nothing in SQL calls it, ask why it is in the database.</span></li>
<li><span>Is the result smaller than the input, or does it save a round trip? Two numbers out instead of 5,000 names, emails and cities is the kind of win we want.</span></li>
<li><span>Would every client need the same rule? Validation that the web app, the mobile app and the importer all must apply is a data rule. Pricing for a campaign that changes next week is business policy.</span></li>
</ol>
<table>
<tbody>
<tr>
<td><span>Belongs in a JS routine</span></td>
<td><span>Stays in the application</span></td>
</tr>
<tr>
<td><span>Normalising and validating values (keys, names, phones, IBAN)</span></td>
<td><span>Workflows, approvals, notifications</span></td>
</tr>
<tr>
<td><span>Distance, similarity, checksum and parsing functions</span></td>
<td><span>Decisions based on those scores: merge, reject, refund</span></td>
</tr>
<tr>
<td><span>The inner loop of a numeric algorithm over rows SQL selected</span></td>
<td><span>Orchestration across services and external APIs</span></td>
</tr>
<tr>
<td><span>Integrity rules every writer must obey</span></td>
<td><span>UI, sessions, authentication flows</span></td>
</tr>
<tr>
<td><span>Reshaping JSON so SQL can query it</span></td>
<td><span>Business rules owned by product and changed often</span></td>
</tr>
</tbody>
</table>
<p><span>If a routine starts to need configuration tables, feature flags or calls to another system, that is our signal that it has crossed the line.</span></p>
<h2><span>Why developers should ask for it</span></h2>
<p><span>For developers this is not about giving up control of the application. It is about no longer having to pull data out of MySQL just because SQL could not express one step.</span></p>
<ul>
<li><span>It is the language you already write. ECMAScript on V8, the same runtime as Chrome and Node.js. JSON columns arrive as native JS objects, no </span><span>JSON.parse()</span><span> needed.</span></li>
<li><span>Fewer round trips. In the commute demo one </span><span>CALL</span><span> read 16,232 rows and wrote 2,000 answers with zero rows crossing the network. The speed-up from 11.00 s to 0.52 s came from not crossing the executor boundary 327,033 times, not from JavaScript being a faster language.</span></li>
<li><span>Less personal data in motion. The dedupe query returns two numbers instead of shipping 5,000 names, emails and cities to an app server, and into its logs. Your GDPR scope stays in the database.</span></li>
<li><span>One rule, written once. Validation that lives in five clients becomes four out-of-date copies. A function and a trigger are one copy nobody can bypass.</span></li>
<li><span>Simpler queries in your code. </span><span>norm_keys()</span><span> turned a 51-line, partner-specific report into 19 lines. Partner five becomes a data change, not a code change.</span></li>
<li><span>Pure functions are easy to test. Deterministic, no I/O, no hidden state: the same unit-testing habits you already have.</span></li>
</ul>
<h3><span>How we suggest developers and DBAs work together:</span></h3>
<ol>
<li><span>The developer proposes the function, with the SQL that will call it.</span></li>
<li><span>The DBA reviews it against the five questions above, and checks if the call site uses blocking or filtering so the function runs on as few rows as possible.</span></li>
<li><span>Grant </span><span>CREATE_JS_ROUTINE</span><span> deliberately; it is required on top of </span><span>CREATE ROUTINE</span><span>, so who can write JavaScript is an explicit choice.</span></li>
<li><span>Keep the routine in version control next to the schema migrations.</span></li>
</ol>
<p><span>SQL did not get worse, it got a companion</span></p>
<p><span>JavaScript in MySQL is not an invitation to rebuild the application inside the server. </span></p>
<p><span>It is a set of sharp tools for the few places where SQL and PL run out: recursion, arrays, big numbers and tight loops. </span><span><br />
</span><span>The set work stays in SQL, the business logic stays in the application, and JavaScript fills the gap between them.</span></p>
<p><span>If you want to try it, </span><span>component_js_lang</span><span> is available as a tech preview in Percona Server for MySQL 8.4.5-5 and later, free and open source, while the equivalent feature from Oracle requires MySQL Enterprise. </span></p>
<p><span>You can easily use the code available here </span><a href="https://github.com/Tusamarco/blogs/tree/master/pleu_2026"><span>Demo code from Percona Live Europe 2026</span></a><span> to perform some tests, just doing cut and paste. </span></p>
<p><span>Tell us what you think on the </span><a href="https://forums.percona.com/"><span>Percona Community Forum</span></a><span> or in </span><a href="https://jira.percona.com/"><span>Jira</span></a><span> with the label </span><span>PS-JS-LANG</span><span>. Your feedback decides what goes into GA, starting with SQL execution from JavaScript routines.</span></p>
<p><span>Resources</span></p>
<ul>
<li><a href="https://docs.percona.com/percona-server/8.4/js-lang-overview.html"><span>Percona Server js_lang documentation</span></a></li>
<li><a href="https://github.com/Tusamarco/blogs/tree/master/pleu_2026"><span>Demo code from Percona Live Europe 2026</span></a></li>
<li><a href="https://github.com/percona/percona-server/tree/release-8.4.11-11/components/js_lang"><span>Source code on GitHub</span></a></li>
</ul>
<p>The post <a href="https://www.percona.com/blog/javascript-in-mysql-extending-sql-not-moving-the-application/">JavaScript in MySQL: Extending SQL, Not Moving the Application</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/javascript-in-mysql-extending-sql-not-moving-the-application/">JavaScript in MySQL: Extending SQL, Not Moving the Application</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Foundation Newsletter – 15 October 2026</title>
        <link>https://mariadb.org/mariadb-foundation-newsletter-15-october-2026/</link>
        <pubDate>Thu, 15 Oct 2026 15:08:27 +0000</pubDate>
        <dc:creator>Simona Aleksandrova</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-foundation-newsletter-15-october-2026/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>The first half of October belonged to the ecosystem. The MariaDB Ecosystem Hub passed 200 entries six months after launch, Laravel 13 gained native MariaDB Vector support through community contributors, and Frappe and Solanica joined the Foundation as Silver Sponsors. The Foundation’s testing framework learned PostgreSQL, reproduced a regression reported by Mark Callaghan and confirmed […]<br />
MariaDB Foundation Newsletter – 15 October 2026 appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/mariadb-foundation-newsletter-15-october-2026/">MariaDB Foundation Newsletter – 15 October 2026</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>The first half of October belonged to the ecosystem. The MariaDB Ecosystem Hub passed 200 entries six months after launch, Laravel 13 gained native MariaDB Vector support through community contributors, and Frappe and Solanica joined the Foundation as Silver Sponsors. The Foundation’s testing framework learned PostgreSQL, reproduced a regression reported by Mark Callaghan and confirmed […]</p>
<p><a href="https://mariadb.org/mariadb-foundation-newsletter-15-october-2026/">MariaDB Foundation Newsletter – 15 October 2026</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/mariadb-foundation-newsletter-15-october-2026/">MariaDB Foundation Newsletter – 15 October 2026</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Retry-safe webhook ingestion with PostgreSQL: duplicates, concurrent requests and old snapshots</title>
        <link>https://percona.community/blog/2026/10/15/retry-safe-webhook-ingestion-postgresql/</link>
        <pubDate>Thu, 15 Oct 2026 12:15:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/retry-safe-webhook-ingestion-with-postgresql-duplicates-concurrent-requests-and-old-snapshots/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>This is a synthetic laboratory example, not a customer production incident. AI assisted with drafting and checking the material.</p>
<p><a href="https://percona.community/blog/2026/10/15/retry-safe-webhook-ingestion-postgresql/">Retry-safe webhook ingestion with PostgreSQL: duplicates, concurrent requests and old snapshots</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><em>This is a synthetic laboratory example, not a customer production incident. AI assisted with drafting and checking the material.</em></p>
<p>A webhook sender cannot always tell whether a delivery worked. The receiver may commit a database transaction and lose the connection before returning a response. A retry then arrives for work that is already complete.</p>
<p>Event IDs address that ambiguity, but they do not solve ordering. Two different events can describe the same object, and the older event can arrive last. A receiver that blindly replaces the stored state can move an order from a newer revision back to an older one.</p>
<p>This lab uses two PostgreSQL tables and one transaction per delivery. It keeps an immutable record of accepted events and a current object snapshot. The tests use separate database connections, including cases where one transaction actually waits for another. There is no queue or HTTP framework in the example, so the database behavior is visible.</p>
<h2>Define what an event means</h2>
<p>The example uses synthetic order snapshots with five fields:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">json</span><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"source"</span><span class="p">:</span> <span class="s2">"shop"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"event_id"</span><span class="p">:</span> <span class="s2">"event-3"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"object_id"</span><span class="p">:</span> <span class="s2">"order-1"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"revision"</span><span class="p">:</span> <span class="mi">3</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"snapshot"</span><span class="p">:</span> <span class="p">{</span><span class="nt">"status"</span><span class="p">:</span> <span class="s2">"paid"</span><span class="p">,</span> <span class="nt">"total_cents"</span><span class="p">:</span> <span class="mi">4200</span><span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre>
</div>
</div>
</div>
<p>This design depends on a specific contract:</p>
<ul>
<li>The same event ID always identifies the same content within a source.</li>
<li>Each object revision belongs to exactly one event ID.</li>
<li>Revisions increase within an object, and each event contains a complete snapshot.</li>
<li>The source namespace includes the provider account or tenant. It comes from authenticated context, not an untrusted request field.</li>
</ul>
<p>Revision 3 can replace revision 1 without receiving revision 2. That is valid for complete snapshots. It would be wrong for events such as “add $10” or “remove line item 4,” which may depend on earlier changes. If the provider supplies neither ordered versions nor a way to fetch authoritative state, this receiver cannot manufacture an ordering guarantee.</p>
<p>The inbox remains append-only in this lab. Deleting old entries would change the period over which identity collisions can be detected.</p>
<h2>Put both identities in the schema</h2>
<p><code>schema.sql</code> creates the event inbox and the current projection:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">CREATE</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">webhook_inbox</span><span class="w"> </span><span class="p">(</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">source</span><span class="w"> </span><span class="nb">text</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="w"> </span><span class="k">CHECK</span><span class="w"> </span><span class="p">(</span><span class="k">source</span><span class="w"> </span><span class="o"></span><span class="w"> </span><span class="s1">''</span><span class="p">),</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">event_id</span><span class="w"> </span><span class="nb">text</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="w"> </span><span class="k">CHECK</span><span class="w"> </span><span class="p">(</span><span class="n">event_id</span><span class="w"> </span><span class="o"></span><span class="w"> </span><span class="s1">''</span><span class="p">),</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">object_id</span><span class="w"> </span><span class="nb">text</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="w"> </span><span class="k">CHECK</span><span class="w"> </span><span class="p">(</span><span class="n">object_id</span><span class="w"> </span><span class="o"></span><span class="w"> </span><span class="s1">''</span><span class="p">),</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="nb">bigint</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="w"> </span><span class="k">CHECK</span><span class="w"> </span><span class="p">(</span><span class="n">revision</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="mi">0</span><span class="p">),</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">snapshot</span><span class="w"> </span><span class="n">jsonb</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="w"> </span><span class="k">CHECK</span><span class="w"> </span><span class="p">(</span><span class="n">jsonb_typeof</span><span class="p">(</span><span class="n">snapshot</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'object'</span><span class="p">),</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">received_at</span><span class="w"> </span><span class="n">timestamptz</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="w"> </span><span class="k">DEFAULT</span><span class="w"> </span><span class="n">clock_timestamp</span><span class="p">(),</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">PRIMARY</span><span class="w"> </span><span class="k">KEY</span><span class="w"> </span><span class="p">(</span><span class="k">source</span><span class="p">,</span><span class="w"> </span><span class="n">event_id</span><span class="p">),</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">UNIQUE</span><span class="w"> </span><span class="p">(</span><span class="k">source</span><span class="p">,</span><span class="w"> </span><span class="n">object_id</span><span class="p">,</span><span class="w"> </span><span class="n">revision</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="p">);</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">CREATE</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">object_state</span><span class="w"> </span><span class="p">(</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">source</span><span class="w"> </span><span class="nb">text</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">object_id</span><span class="w"> </span><span class="nb">text</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="nb">bigint</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="w"> </span><span class="k">CHECK</span><span class="w"> </span><span class="p">(</span><span class="n">revision</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="mi">0</span><span class="p">),</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">snapshot</span><span class="w"> </span><span class="n">jsonb</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="w"> </span><span class="k">CHECK</span><span class="w"> </span><span class="p">(</span><span class="n">jsonb_typeof</span><span class="p">(</span><span class="n">snapshot</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'object'</span><span class="p">),</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">PRIMARY</span><span class="w"> </span><span class="k">KEY</span><span class="w"> </span><span class="p">(</span><span class="k">source</span><span class="p">,</span><span class="w"> </span><span class="n">object_id</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="p">);</span></span></span></code></pre>
</div>
</div>
</div>
<p>The inbox has two different identities to protect. Its primary key identifies a delivery across retries. Its second unique constraint prevents two event IDs from claiming the same object revision. Even if those two events carry identical JSON, the lab treats them as a violation of the stated source contract.</p>
<p>The projection has one row per object and source. An older snapshot can be retained in the inbox without becoming the current projection. <code>received_at</code> is diagnostic information; it never decides which state wins.</p>
<h2>Claim the event before changing state</h2>
<p>The first statement attempts to add the event to the inbox:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-2" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">INSERT</span><span class="w"> </span><span class="k">INTO</span><span class="w"> </span><span class="n">webhook_inbox</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="p">(</span><span class="k">source</span><span class="p">,</span><span class="w"> </span><span class="n">event_id</span><span class="p">,</span><span class="w"> </span><span class="n">object_id</span><span class="p">,</span><span class="w"> </span><span class="n">revision</span><span class="p">,</span><span class="w"> </span><span class="n">snapshot</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">VALUES</span><span class="w"> </span><span class="p">(</span><span class="o">%</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="o">%</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="o">%</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="o">%</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="o">%</span><span class="n">s</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">ON</span><span class="w"> </span><span class="n">CONFLICT</span><span class="w"> </span><span class="k">DO</span><span class="w"> </span><span class="k">NOTHING</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="n">RETURNING</span><span class="w"> </span><span class="n">event_id</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>An inserted row means this transaction can proceed with the projection. No returned row requires another check; it does not automatically mean a harmless retry.</p>
<p>The Python code issues a separate query for the event ID and compares the stored object, revision and JSON value with the request. An exact match returns <code>duplicate</code>. A mismatch raises <code>ReusedEventId</code>. If the event ID is absent, the other unique constraint rejected the insert, so the code raises <code>ReusedRevision</code>.</p>
<p>Why a separate statement? At READ COMMITTED, an insert can wait for a conflicting transaction whose row was not visible in its initial snapshot. The next statement gets a new snapshot. Combining the insert and lookup into one statement changes that visibility question. <a href="https://www.postgresql.org/docs/16/transaction-iso.html" target="_blank" rel="noopener noreferrer">PostgreSQL transaction isolation</a></p>
<p>The conflict clause intentionally has no target. Targeting only <code>(source, event_id)</code> would leave a conflict on the separate object-revision unique constraint unhandled. PostgreSQL documents that an omitted target for <code>DO NOTHING</code> handles all usable unique constraints and indexes. The follow-up lookup then distinguishes the expected duplicate from a protocol conflict. <a href="https://www.postgresql.org/docs/16/sql-insert.html#SQL-ON-CONFLICT" target="_blank" rel="noopener noreferrer">INSERT and ON CONFLICT</a></p>
<p>The comparison also stays in PostgreSQL. Python considers <code>True == 1</code> to be true. That is not the identity rule wanted for JSON snapshots. A regression test retries the same event ID with <code>{"value": true}</code> changed to <code>{"value": 1}</code> and expects rejection.</p>
<h2>Advance the projection only to a newer revision</h2>
<p>For a newly accepted event, the second write is:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-3" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">INSERT</span><span class="w"> </span><span class="k">INTO</span><span class="w"> </span><span class="n">object_state</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="k">current</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="p">(</span><span class="k">source</span><span class="p">,</span><span class="w"> </span><span class="n">object_id</span><span class="p">,</span><span class="w"> </span><span class="n">revision</span><span class="p">,</span><span class="w"> </span><span class="n">snapshot</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">VALUES</span><span class="w"> </span><span class="p">(</span><span class="o">%</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="o">%</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="o">%</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="o">%</span><span class="n">s</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">ON</span><span class="w"> </span><span class="n">CONFLICT</span><span class="w"> </span><span class="p">(</span><span class="k">source</span><span class="p">,</span><span class="w"> </span><span class="n">object_id</span><span class="p">)</span><span class="w"> </span><span class="k">DO</span><span class="w"> </span><span class="k">UPDATE</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">SET</span><span class="w"> </span><span class="n">revision</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">EXCLUDED</span><span class="p">.</span><span class="n">revision</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">snapshot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">EXCLUDED</span><span class="p">.</span><span class="n">snapshot</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="k">current</span><span class="p">.</span><span class="n">revision</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="n">EXCLUDED</span><span class="p">.</span><span class="n">revision</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="n">RETURNING</span><span class="w"> </span><span class="n">revision</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>The version comparison belongs in the update itself. Reading a revision in Python and later issuing an unconditional update would leave a gap for another writer.</p>
<p>An event that advances the projection returns <code>applied</code>. An event that loses the version comparison returns <code>stale</code>; its inbox entry still commits. PostgreSQL does not return a row when the conflict row was locked but the update condition was false. <a href="https://www.postgresql.org/docs/16/sql-insert.html" target="_blank" rel="noopener noreferrer">INSERT RETURNING behavior</a></p>
<p>The lock-order test exercises both outcomes. First, revision 2 holds the object row while revision 1 waits. After revision 2 commits, revision 1 leaves it unchanged. In the other order, revision 3 holds the row while revision 4 waits; revision 4 advances it after the lock is released. The test checks the database’s blocking relationship before releasing the first transaction, rather than relying on a guessed delay.</p>
<p>All writers of this projection must follow the same rule. Another application that writes an arbitrary revision directly can invalidate the guarantee.</p>
<h2>Keep the inbox and projection in one transaction</h2>
<p>The public wrapper in <code>ingest.py</code> is deliberately small:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">python</span><button class="code-block__copy" type="button" data-copy-target="codeblock-4" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">ingest</span><span class="p">(</span><span class="n">conn</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
</span></span><span class="line"><span class="cl"> <span class="k">with</span> <span class="n">conn</span><span class="p">:</span>
</span></span><span class="line"><span class="cl"> <span class="n">result</span> <span class="o">=</span> <span class="n">apply_in_transaction</span><span class="p">(</span><span class="n">conn</span><span class="p">,</span> <span class="n">event</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"> <span class="k">return</span> <span class="n">result</span></span></span></code></pre>
</div>
</div>
</div>
<p>The connection uses READ COMMITTED with autocommit disabled. The return happens after the transaction context commits. An HTTP adapter must wait for this function to finish before acknowledging a delivery.</p>
<p>Two tests cover the response boundary. One closes a connection while its writes remain uncommitted; a new connection can then accept the same event. The other commits, closes the connection and retries as if the sender received no acknowledgement; the retry returns <code>duplicate</code>.</p>
<p>These are transaction-boundary simulations. They do not inject a broken network or kill the database server. The tests use disposable memory-backed storage, so they also do not demonstrate survival of a host power failure. Production durability depends on storage, WAL settings and replication policy. <a href="https://www.postgresql.org/docs/16/runtime-config-wal.html" target="_blank" rel="noopener noreferrer">PostgreSQL WAL configuration</a></p>
<h2>Run the tests</h2>
<p><a href="https://percona.community/blog/2026/10/postgresql-webhook-lab-2026-10-08.zip">Download the runnable lab</a>, including the schema, Python implementation, tests and recorded verification logs. It needs Docker and Python 3.10 or later:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sh</span><button class="code-block__copy" type="button" data-copy-target="codeblock-5" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">python3 -m venv .venv
</span></span><span class="line"><span class="cl">.venv/bin/python -m pip install -r requirements.txt
</span></span><span class="line"><span class="cl"><span class="nv">LAB_PYTHON</span><span class="o">=</span>.venv/bin/python bash run_lab.sh</span></span></code></pre>
</div>
</div>
</div>
<p>The runner starts a separate container on a random loopback port and removes its own container when finished. It does not connect to an existing database. The image digest pins the PostgreSQL 16.14 build used for verification; the driver is psycopg2 2.9.10. The pin makes the lab reproducible and is not a production patch recommendation.</p>
<p>The suite checks these cases:</p>
<table>
<thead>
<tr>
<th>Case</th>
<th>Expected result</th>
</tr>
</thead>
<tbody>
<tr>
<td>Sequential retry</td>
<td>One inbox row; retry is <code>duplicate</code></td>
</tr>
<tr>
<td>Concurrent duplicate, first transaction commits</td>
<td>Second waits, then returns <code>duplicate</code></td>
</tr>
<tr>
<td>Concurrent duplicate, first transaction rolls back</td>
<td>Second waits, then applies the event</td>
</tr>
<tr>
<td>Revision 3 followed by 1 and 2</td>
<td>Projection stays at 3; all three inbox entries remain</td>
</tr>
<tr>
<td>Different revisions contend for the same object</td>
<td>The greater revision wins in both tested lock orders</td>
</tr>
<tr>
<td>Connection closes before commit</td>
<td>Neither write survives; a retry can apply</td>
</tr>
<tr>
<td>Commit succeeds but acknowledgement is treated as lost</td>
<td>Retry is <code>duplicate</code></td>
</tr>
<tr>
<td>Event ID or object revision is reused</td>
<td>Reject the conflict without changing the projection</td>
</tr>
<tr>
<td>Identical IDs from separate sources</td>
<td>Independent inbox and projection rows</td>
</tr>
<tr>
<td>24 concurrent deliveries of eight events</td>
<td>Eight inbox rows, 16 duplicates, final revision 8</td>
</tr>
<tr>
<td>Invalid snapshot or changed JSON type</td>
<td>Reject without accepting the conflicting data</td>
</tr>
</tbody>
</table>
<p>The verified full run passes 13 tests. The concurrency regression is also run 30 times; its log is included with the lab. The wall-clock time is a test result, not a throughput benchmark.</p>
<h2>The boundary of the guarantee</h2>
<p>This receiver converges on the greatest accepted snapshot revision while recognising repeated deliveries. A successful duplicate or stale delivery can receive a success response. A changed event identity needs investigation. A transient database failure needs a retry of the entire transaction or a retryable response, not a success response hiding the exception.</p>
<p>External effects need a separate design. Sending email or charging a card inside this function would not make those operations atomic with PostgreSQL. For that extension, a transactional outbox can record work to dispatch, and the external receiver still needs an appropriate idempotency contract.</p>
<p>For the snapshot problem here, the useful division is explicit: the inbox answers whether an event was accepted, and the projection answers which version is current. The transaction ensures those answers cannot be committed halfway through a delivery.</p>
<p><em>This post is part of the <a href="https://percona.community/blog/write-for-percona-community/">Percona Community Writers Program</a>.</em></p>
<p><a href="https://percona.community/blog/2026/10/15/retry-safe-webhook-ingestion-postgresql/">Retry-safe webhook ingestion with PostgreSQL: duplicates, concurrent requests and old snapshots</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Solanica joins MariaDB Foundation as a Silver Sponsor</title>
        <link>https://mariadb.org/solanica-joins-mariadb-foundation-as-a-silver-sponsor/</link>
        <pubDate>Thu, 15 Oct 2026 07:09:18 +0000</pubDate>
        <dc:creator>Anna Widenius</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/solanica-joins-mariadb-foundation-as-a-silver-sponsor/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>We are pleased to welcome Solanica, the company driving the development of OpenEverest, as a MariaDB Foundation Silver Sponsor. OpenEverest is an open-source platform for deploying and managing databases on Kubernetes. Its recently added MariaDB support gives developers and platform teams another way to bring MariaDB into their infrastructure, with deployment, high availability, backups and […]<br />
Solanica joins MariaDB Foundation as a Silver Sponsor appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/solanica-joins-mariadb-foundation-as-a-silver-sponsor/">Solanica joins MariaDB Foundation as a Silver Sponsor</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>We are pleased to welcome Solanica, the company driving the development of OpenEverest, as a MariaDB Foundation Silver Sponsor. OpenEverest is an open-source platform for deploying and managing databases on Kubernetes. Its recently added MariaDB support gives developers and platform teams another way to bring MariaDB into their infrastructure, with deployment, high availability, backups and […]</p>
<p><a href="https://mariadb.org/solanica-joins-mariadb-foundation-as-a-silver-sponsor/">Solanica joins MariaDB Foundation as a Silver Sponsor</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/solanica-joins-mariadb-foundation-as-a-silver-sponsor/">Solanica joins MariaDB Foundation as a Silver Sponsor</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Apologies for delaying Postgres 19</title>
        <link>https://percona.community/blog/2026/10/15/apologies-for-delaying-postgres-19/</link>
        <pubDate>Thu, 15 Oct 2026 00:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/apologies-for-delaying-postgres-19/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>Everyone who follows database news has already heard about the delays of PostgreSQL 19: the major release that was supposed to go GA in September, now scheduled to be released on November 19 after multiple delays. What happened, is AI to blame, and why am I apologizing?</p>
<p><a href="https://percona.community/blog/2026/10/15/apologies-for-delaying-postgres-19/">Apologies for delaying Postgres 19</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Everyone who follows database news has already heard about the delays of PostgreSQL 19:<br />
the major release that was supposed to go GA in September, now scheduled to be released on November 19 after multiple delays.<br />
What happened, is AI to blame, and why am I apologizing?</p>
<p>Outside committers, I am the only contributor “responsible” for clearly <a href="https://hackorum.dev/topics/253174" target="_blank" rel="noopener noreferrer">causing a last-minute revert</a> of a major feature, while I also reported multiple issues about FOR PORTION OF, REPACK and online checksums. I was one of the developers trying to save the online checksums even at the last minute, when the original RC1 deadline already passed.</p>
<p>The primary “culprits” behind the delay are of course committers: Robert Haas, who started the mass revert discussion with the <a href="https://hackorum.dev/topics/253549" target="_blank" rel="noopener noreferrer">“scary patch contest”</a>, Noah Misch, who called for 8 reverts, and Andres Freund, who called for only 2, but one of them was PGQ.</p>
<p>The above is of course sarcasm, and the people above are the ones who made sure that PG19 will be as stable as possible, so please don’t harass them.</p>
<h1>Unlucky timing in a changing world</h1>
<p>It’s quite clear from the pgsql-hackers threads that many of the reported issues were found by AI reviews.<br />
But AI was already used before, if not for development, then for review, so what happened here?<br />
If AI is so easy to use and run, how did everyone miss so many issues?</p>
<p>AI is advancing rapidly.<br />
A year or a year and a half ago it was already capable of doing significant work on websites and in many other areas, but back then when I tried to use it for postgres development, I often hit roadblocks:<br />
it had major issues understanding some of the “stranger” constructs PostgreSQL’s C codebase uses, and it wasn’t even capable of reliably working on small extensions without significant human involvement.</p>
<p>When I started using it to help review PostgreSQL patches at the beginning of this year, it was already somewhat better, but still far from perfect: it mostly found minor issues or false positives, even when I actively tried to prompt it into looking into trickier questions.</p>
<p>Several of the now reverted patches were already committed at that point, and even the others were under development for a long time.</p>
<p>While improvements to LLMs happened gradually over time, there were major jumps:<br />
the introduction of Fable 5 in June, Opus 5 and GPT-5.6 in July, Opus 5.5 and GPT-6 in September.</p>
<p>These models all made a significant difference in the number / complexity of the issues found, and they have one thing in common: all were released after the feature freeze for PostgreSQL 19.</p>
<p>AI will continue to advance, so in that sense, this could be a continuing problem in later years.<br />
On the other hand, the current models already find as many issues in a patch as humans do, or more, so the worst may be behind us.<br />
At least we hope so.</p>
<p>I would say that with good prompting, the main missing thing with AI is design-level review:<br />
answering the questions of “is this the proper way to do it”, or “does this feature even make sense for PostgreSQL?”</p>
<p>This doesn’t mean that future models won’t find more logic issues, but my hope is that the effect will be less dramatic in the next years.<br />
AI still needs proper guidance.<br />
But with humans focusing on the above design questions, and filtering out the “noise” of minor/nitpick issues sometimes elevated to blockers by AI reviews, LLMs can significantly improve the quality of future code contributions.</p>
<p>Unless all senior developers burn out before we reach that, and decide to become carpenters.</p>
<p><figure><img decoding="async" width="1672" height="941" src="https://percona.community/blog/2026/10/developer-carpenter_hu_fdcee03df4546d36.webp" alt="Some senior developers found a less stressful career" loading="lazy"></figure>
</p>
<h1>A side channel attack: the vulnpocalypse</h1>
<p>Other than the above problems, in which LLMs played a direct role, they also had an indirect effect on the release: the <a href="https://en.wiktionary.org/wiki/vulnpocalypse" target="_blank" rel="noopener noreferrer">vulnpocalypse</a> happened, and postgres is affected by it.</p>
<p>This is visible from the number of security issues fixed in recent years alone:</p>
<pre class="mermaid">
%%{init: {"themeVariables": {"xyChart": {"plotColorPalette": "#653DF4"}}}}%%
xychart-beta
title "PostgreSQL security fixes per year"
x-axis [2020, 2021, 2022, 2023, 2024, 2025, "2026 (so far)"]
y-axis "Security fixes" 0 --&gt; 50
bar [7, 8, 2, 8, 7, 7, 44]
</pre>
<p>The picture is even worse if we check the distribution of those 44: “only” 5 fixes in February, 11 in May and 28 in August.</p>
<p>That 28 lines up perfectly with the beta period, where committers usually focus on making sure that the release is as good as it can be.<br />
Previously, 1 or 2 committers typically worked on security fixes for a minor release.<br />
In August, 10 committers did, taking significant time away from the most active participants in postgres development.</p>
<p>And this is only what we can see in the commit history:<br />
I think many of us suspect that the real workload, the number of both good and bad AI-generated or AI-inspired submissions, is much higher than this.<br />
And we don’t even have to suspect it, as some committers and contributors are <a href="https://peter.eisentraut.org/blog/2026/10/09/the-reverts-will-continue-until-morale-improves" target="_blank" rel="noopener noreferrer">openly</a> <a href="https://hackorum.dev/topics/253549" target="_blank" rel="noopener noreferrer">talking</a> <a href="https://hackorum.dev/topics/253680" target="_blank" rel="noopener noreferrer">about</a> <a href="https://hackorum.dev/topics/253972" target="_blank" rel="noopener noreferrer">the</a> <a href="https://hackorum.dev/topics/253171" target="_blank" rel="noopener noreferrer">problem</a>.</p>
<p>It also didn’t magically disappear after the August release:<br />
as we can see from the previous dates, some of the mentioned models were released after August.<br />
These models are already very good at reviewing patches, but reviewing entire huge codebases is still tricky, and will require both better models and better tooling.</p>
<p>While I can’t see into the future, and I can’t tell how many security issues the November releases will fix, I would bet a significant amount on the number being above 28, and on it staying higher than normal for many future minor releases.</p>
<h1>What can we do better?</h1>
<p>While PostgreSQL usually moves at a slow pace, we can already see that things are happening:</p>
<p><a href="https://hackorum.dev/topics/253680" target="_blank" rel="noopener noreferrer">One of the threads I posted earlier</a> in this post is about PostgreSQL increasing its minor release schedule to every 2 or 1.5 months.<br />
This won’t help with the issue of limited resources (the same security team that previously handled 8 issues a year now has to handle possibly 100+), but it can help users receive the fixes to issues discoverable with frontier models more quickly, and can help even out the pacing for the developers working on them.</p>
<p>Another thread is about improving the process of <a href="https://hackorum.dev/topics/253900" target="_blank" rel="noopener noreferrer">becoming a committer</a>.<br />
PostgreSQL having more committers could spread the load, not just with the security issues, but also with handling the increasing number of AI contributions to the project.</p>
<h1>Where can YOU help?</h1>
<p>You don’t have to be a developer to participate:<br />
even if PostgreSQL gets more committers, they will still need more people interested in trying out and reviewing features.<br />
You can try out interesting features even before they get committed to the main codebase.<br />
Knowing which patches generate interest, and which seem to be in a good-enough state for end users, could be valuable additional feedback for patch authors, reviewers and committers.</p>
<p>If you like a patch, don’t be afraid to simply reply “This is a great idea”, that itself is feedback!<br />
And if you don’t even know how to get started with that, and only want to ask “How could I contribute?”, that’s also a good starting point and feedback.</p>
<p>This is also where our work with <a href="https://hackorum.dev/" target="_blank" rel="noopener noreferrer">hackorum.dev</a> comes into the picture.<br />
Hackorum makes it easier to follow the development of PostgreSQL in a nice user interface, and now it also provides automatically built Docker images for each patch submission.</p>
<p>You don’t have to learn how to apply a patch, or build postgres, you don’t even have to install a Linux VM:<br />
just go to an interesting thread, execute the displayed docker command, and you will be immediately presented with a PostgreSQL instance containing the patch.</p>
<p>Are you interested in <a href="https://hackorum.dev/topics/50890" target="_blank" rel="noopener noreferrer">WAL compression</a>, <a href="https://hackorum.dev/topics/253013" target="_blank" rel="noopener noreferrer">JSON-based postgres configuration files</a>, a <a href="https://hackorum.dev/topics/52845" target="_blank" rel="noopener noreferrer">WHERE clause for REFRESH MATERIALIZED VIEW</a>, or simply quickly trying out the fix for a bug you encountered or reported before it is released? All of these are one command away, and these are just a few examples.</p>
<h1>Lessons for us</h1>
<p>For me, the biggest takeaway from this release is that I should pay more attention to things already committed, and I think this is a lesson for many people.</p>
<p>Previously I focused on reviewing active threads, patches that were still under discussion, and simply accepted what already got to the master branch as “stable”.<br />
This was both intentional and a simple constraint, as I only have so many hours I can spend on postgres, and I have to decide where to spend them.</p>
<p>Fortunately this is a question where both AI and habits can help:<br />
at Percona we already have an AI automation reviewing all new commits to PostgreSQL and a few other projects every day, and the same automation also warns if something significant was changed.<br />
Reading at least the description/summary of what changed every day is also a good habit.</p>
<h1>The outlook for PG20</h1>
<p>We have to accept what happened with PostgreSQL 19, but what does all the above mean for 20?</p>
<p>At first, the outlook might seem grim:<br />
if the number of security and normal bug reports continues to rise, committers will have even less time to work on other things, and we could end up with a bugfix-only release.</p>
<p>On the other hand, a significant number of PostgreSQL 19 features were reverted, and these now have a good chance to make it into 20.<br />
We can already see this intention: some features were reverted only from the REL_19_STABLE branch, but kept in master, and even those that were completely reverted have a chance of coming back.</p>
<p>It’s easy to find people arguing for both outcomes, and I don’t think anybody can give any answer other than a wild guess.</p>
<p>Will PG20 have <em>some</em> new features?<br />
For sure.<br />
But will it end up as ambitious as PG19 was originally, or even half? It’s too early to tell, we have to wait and see.</p>
<p>And, if you have some time, of course, don’t forget to help out! Every patch properly tested before commit is one less revert next August!</p>
<p>Stay tuned for my next apology!</p>
<p><a href="https://percona.community/blog/2026/10/15/apologies-for-delaying-postgres-19/">Apologies for delaying Postgres 19</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Foundation: Reproducing and Validating MDEV‑37992 with TAF</title>
        <link>https://mariadb.org/mariadb-foundation-reproducing-and-validating-mdev-37992-with-taf/</link>
        <pubDate>Wed, 14 Oct 2026 20:38:19 +0000</pubDate>
        <dc:creator>Jonathan Miller</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-foundation-reproducing-and-validating-mdev-37992-with-taf/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Thanks to Mark Callaghan for filing MDEV‑37992. This regression only appears under specific LRU and buffer‑pool conditions, and requires a memory‑resident workload to expose. Using TAF, I reproduced the issue across 11.8, 12.3, and 13.1 using both parent commits and patched commits from MDEV‑33966. The fix restores expected throughput in all branches. The workload used […]<br />
MariaDB Foundation: Reproducing and Validating MDEV‑37992 with TAF appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/mariadb-foundation-reproducing-and-validating-mdev-37992-with-taf/">MariaDB Foundation: Reproducing and Validating MDEV‑37992 with TAF</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Thanks to Mark Callaghan for filing MDEV‑37992. This regression only appears under specific LRU and buffer‑pool conditions, and requires a memory‑resident workload to expose. Using TAF, I reproduced the issue across 11.8, 12.3, and 13.1 using both parent commits and patched commits from MDEV‑33966. The fix restores expected throughput in all branches. The workload used […]</p>
<p><a href="https://mariadb.org/mariadb-foundation-reproducing-and-validating-mdev-37992-with-taf/">MariaDB Foundation: Reproducing and Validating MDEV‑37992 with TAF</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/mariadb-foundation-reproducing-and-validating-mdev-37992-with-taf/">MariaDB Foundation: Reproducing and Validating MDEV‑37992 with TAF</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Bagisto MariaDB Vector Semantic Search</title>
        <link>https://mariadb.org/bagisto-mariadb-vector-semantic-search/</link>
        <pubDate>Tue, 13 Oct 2026 19:58:19 +0000</pubDate>
        <dc:creator>Frédéric Descamps</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/bagisto-mariadb-vector-semantic-search/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>I’m always interested to see how MariaDB Vector is being used in real applications, beyond the usual demos and simple similarity-search examples. In this guest post, the team behind Bagisto takes a very practical look at semantic search for e-commerce using MariaDB Vector. What I particularly like is that they don’t stop at showing it […]<br />
Bagisto MariaDB Vector Semantic Search appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/bagisto-mariadb-vector-semantic-search/">Bagisto MariaDB Vector Semantic Search</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>I’m always interested to see how MariaDB Vector is being used in real applications, beyond the usual demos and simple similarity-search examples. In this guest post, the team behind Bagisto takes a very practical look at semantic search for e-commerce using MariaDB Vector. What I particularly like is that they don’t stop at showing it […]</p>
<p><a href="https://mariadb.org/bagisto-mariadb-vector-semantic-search/">Bagisto MariaDB Vector Semantic Search</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/bagisto-mariadb-vector-semantic-search/">Bagisto MariaDB Vector Semantic Search</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>One query to audit the PostgreSQL row-level security an AI app builder wrote for you</title>
        <link>https://percona.community/blog/2026/10/13/postgresql-rls-audit-ai-app-builder/</link>
        <pubDate>Tue, 13 Oct 2026 08:45:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/one-query-to-audit-the-postgresql-row-level-security-an-ai-app-builder-wrote-for-you/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>I take over apps that were made with Lovable, Bolt or v0.</p>
<p><a href="https://percona.community/blog/2026/10/13/postgresql-rls-audit-ai-app-builder/">One query to audit the PostgreSQL row-level security an AI app builder wrote for you</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>I take over apps that were made with Lovable, Bolt or v0.</p>
<p>The apps’ databases are on Supabase. In this post I’ll show you how I check and patch what the builders wrote in the database to protect its data.</p>
<p>TaskFlow is a demo. I wrote its schema and policies by hand, copying what Lovable and Bolt generate. The database is PostgreSQL 16.14 on my laptop, with a shim that creates the Supabase roles and <code>auth.uid()</code>.</p>
<blockquote>
<p>An insufficient database Row-Level Security policy in Lovable through 2025-04-15 allows remote unauthenticated attackers to read or write to arbitrary database tables of generated sites. NOTE: this is disputed by the Supplier because each individual customer of the Lovable platform accepts a responsibility over protecting the data of their application.</p>
<p><a href="https://www.cve.org/CVERecord?id=CVE-2025-48757" target="_blank" rel="noopener noreferrer">CVE-2025-48757</a></p>
</blockquote>
<h2>What the generated policies look like</h2>
<p>These are the policies that I reconstructed in <a href="https://github.com/works-on-my-box/lovable-rescue-case" target="_blank" rel="noopener noreferrer">TaskFlow</a>, a demo task tracker:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">alter</span><span class="w"> </span><span class="k">table</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">tasks</span><span class="w"> </span><span class="n">enable</span><span class="w"> </span><span class="k">row</span><span class="w"> </span><span class="k">level</span><span class="w"> </span><span class="k">security</span><span class="p">;</span><span class="w"> </span><span class="c1">-- and the other four tables
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">create</span><span class="w"> </span><span class="n">policy</span><span class="w"> </span><span class="s2">"Enable read access for all users"</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">profiles</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="k">select</span><span class="w"> </span><span class="k">using</span><span class="w"> </span><span class="p">(</span><span class="k">true</span><span class="p">);</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">create</span><span class="w"> </span><span class="n">policy</span><span class="w"> </span><span class="s2">"Users can update own profile"</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">profiles</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="k">update</span><span class="w"> </span><span class="k">using</span><span class="w"> </span><span class="p">(</span><span class="n">auth</span><span class="p">.</span><span class="n">uid</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">id</span><span class="p">);</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">create</span><span class="w"> </span><span class="n">policy</span><span class="w"> </span><span class="s2">"Enable read access for all users"</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">projects</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="k">select</span><span class="w"> </span><span class="k">using</span><span class="w"> </span><span class="p">(</span><span class="k">true</span><span class="p">);</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">create</span><span class="w"> </span><span class="n">policy</span><span class="w"> </span><span class="s2">"Owners can update projects"</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">projects</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="k">update</span><span class="w"> </span><span class="k">using</span><span class="w"> </span><span class="p">(</span><span class="n">auth</span><span class="p">.</span><span class="n">uid</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">owner_id</span><span class="p">);</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">create</span><span class="w"> </span><span class="n">policy</span><span class="w"> </span><span class="s2">"Enable read access for all users"</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">project_members</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="k">select</span><span class="w"> </span><span class="k">using</span><span class="w"> </span><span class="p">(</span><span class="k">true</span><span class="p">);</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">create</span><span class="w"> </span><span class="n">policy</span><span class="w"> </span><span class="s2">"Enable insert for authenticated users only"</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">project_members</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="k">insert</span><span class="w"> </span><span class="k">to</span><span class="w"> </span><span class="n">authenticated</span><span class="w"> </span><span class="k">with</span><span class="w"> </span><span class="k">check</span><span class="w"> </span><span class="p">(</span><span class="k">true</span><span class="p">);</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">create</span><span class="w"> </span><span class="n">policy</span><span class="w"> </span><span class="s2">"Team can read tasks"</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">tasks</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="k">select</span><span class="w"> </span><span class="k">to</span><span class="w"> </span><span class="n">authenticated</span><span class="w"> </span><span class="k">using</span><span class="w"> </span><span class="p">(</span><span class="k">true</span><span class="p">);</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">create</span><span class="w"> </span><span class="n">policy</span><span class="w"> </span><span class="s2">"Team can update tasks"</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">tasks</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="k">update</span><span class="w"> </span><span class="k">to</span><span class="w"> </span><span class="n">authenticated</span><span class="w"> </span><span class="k">using</span><span class="w"> </span><span class="p">(</span><span class="k">true</span><span class="p">);</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">create</span><span class="w"> </span><span class="n">policy</span><span class="w"> </span><span class="s2">"Enable all for authenticated users"</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">comments</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="k">all</span><span class="w"> </span><span class="k">to</span><span class="w"> </span><span class="n">authenticated</span><span class="w"> </span><span class="k">using</span><span class="w"> </span><span class="p">(</span><span class="k">true</span><span class="p">)</span><span class="w"> </span><span class="k">with</span><span class="w"> </span><span class="k">check</span><span class="w"> </span><span class="p">(</span><span class="k">true</span><span class="p">);</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="c1">-- plus three more in 01-schema-as-generated.sql</span></span></span></code></pre>
</div>
</div>
</div>
<p><code>anon</code> is the role of the public API key. <code>authenticated</code> is any signed-in user, and <code>auth.uid()</code> returns their id.</p>
<p>The generated read policy on <code>projects</code> says that every role (<code>anon</code> included) can read all rows.</p>
<p>In older Supabase projects, <code>anon</code> and <code>authenticated</code> are not just roles. They also hold full table privileges on tables in the <code>public</code> schema (check <code>dp</code>).</p>
<p>The <code>service_role</code> key sits in the repository’s <code>.env</code> file, right next to the project’s URL. This key bypasses row-level security and should be rotated first.</p>
<h2>The audit</h2>
<p>Let’s look at how we can find out what the generated policies do. And how they leak data.</p>
<h3>What the query looks like</h3>
<p>We will run just one query that goes through PostgreSQL’s catalogs:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">with</span><span class="w"> </span><span class="n">t</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="p">(</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">select</span><span class="w"> </span><span class="k">c</span><span class="p">.</span><span class="n">oid</span><span class="p">,</span><span class="w"> </span><span class="k">c</span><span class="p">.</span><span class="n">relname</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">tbl</span><span class="p">,</span><span class="w"> </span><span class="k">c</span><span class="p">.</span><span class="n">relrowsecurity</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">rls_on</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="n">pg_class</span><span class="w"> </span><span class="k">c</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">join</span><span class="w"> </span><span class="n">pg_namespace</span><span class="w"> </span><span class="n">n</span><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="n">n</span><span class="p">.</span><span class="n">oid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">c</span><span class="p">.</span><span class="n">relnamespace</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">n</span><span class="p">.</span><span class="n">nspname</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'public'</span><span class="w"> </span><span class="k">and</span><span class="w"> </span><span class="k">c</span><span class="p">.</span><span class="n">relkind</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="p">(</span><span class="s1">'r'</span><span class="p">,</span><span class="w"> </span><span class="s1">'p'</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="p">),</span><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="p">(</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">select</span><span class="w"> </span><span class="n">polrelid</span><span class="p">,</span><span class="w"> </span><span class="n">polname</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="n">polcmd</span><span class="w"> </span><span class="k">when</span><span class="w"> </span><span class="s1">'r'</span><span class="w"> </span><span class="k">then</span><span class="w"> </span><span class="s1">'SELECT'</span><span class="w"> </span><span class="k">when</span><span class="w"> </span><span class="s1">'a'</span><span class="w"> </span><span class="k">then</span><span class="w"> </span><span class="s1">'INSERT'</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">when</span><span class="w"> </span><span class="s1">'w'</span><span class="w"> </span><span class="k">then</span><span class="w"> </span><span class="s1">'UPDATE'</span><span class="w"> </span><span class="k">when</span><span class="w"> </span><span class="s1">'d'</span><span class="w"> </span><span class="k">then</span><span class="w"> </span><span class="s1">'DELETE'</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="s1">'ALL'</span><span class="w"> </span><span class="k">end</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">cmd</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="k">when</span><span class="w"> </span><span class="n">polroles</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'{0}'</span><span class="w"> </span><span class="k">then</span><span class="w"> </span><span class="s1">'{public}'</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="n">polroles</span><span class="p">::</span><span class="n">regrole</span><span class="p">[]::</span><span class="nb">text</span><span class="w"> </span><span class="k">end</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">roles</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">pg_get_expr</span><span class="p">(</span><span class="n">polqual</span><span class="p">,</span><span class="w"> </span><span class="n">polrelid</span><span class="p">)</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">using_expr</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">pg_get_expr</span><span class="p">(</span><span class="n">polwithcheck</span><span class="p">,</span><span class="w"> </span><span class="n">polrelid</span><span class="p">)</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">check_expr</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="n">pg_policy</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">select</span><span class="w"> </span><span class="n">t</span><span class="p">.</span><span class="n">tbl</span><span class="p">,</span><span class="w"> </span><span class="n">t</span><span class="p">.</span><span class="n">rls_on</span><span class="p">,</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">polname</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">policy</span><span class="p">,</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">cmd</span><span class="p">,</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">roles</span><span class="p">,</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">using_expr</span><span class="p">,</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">check_expr</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">concat_ws</span><span class="p">(</span><span class="s1">'; '</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="k">when</span><span class="w"> </span><span class="k">not</span><span class="w"> </span><span class="n">t</span><span class="p">.</span><span class="n">rls_on</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">then</span><span class="w"> </span><span class="s1">'RLS OFF: every row open to any role with a grant'</span><span class="w"> </span><span class="k">end</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="k">when</span><span class="w"> </span><span class="n">t</span><span class="p">.</span><span class="n">rls_on</span><span class="w"> </span><span class="k">and</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">polname</span><span class="w"> </span><span class="k">is</span><span class="w"> </span><span class="k">null</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">then</span><span class="w"> </span><span class="s1">'RLS on, no policies: the API roles see nothing (app breaks rather than leaks)'</span><span class="w"> </span><span class="k">end</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="k">when</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">using_expr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'true'</span><span class="w"> </span><span class="k">and</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">cmd</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="p">(</span><span class="s1">'SELECT'</span><span class="p">,</span><span class="w"> </span><span class="s1">'ALL'</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">then</span><span class="w"> </span><span class="s1">'reads every row'</span><span class="w"> </span><span class="k">end</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="k">when</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">using_expr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'true'</span><span class="w"> </span><span class="k">and</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">cmd</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="p">(</span><span class="s1">'UPDATE'</span><span class="p">,</span><span class="w"> </span><span class="s1">'DELETE'</span><span class="p">,</span><span class="w"> </span><span class="s1">'ALL'</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">then</span><span class="w"> </span><span class="s1">'writes or deletes every row'</span><span class="w"> </span><span class="k">end</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="k">when</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">roles</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'{public}'</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">then</span><span class="w"> </span><span class="s1">'no TO clause: applies to anon as well'</span><span class="w"> </span><span class="k">end</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="k">when</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">check_expr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'true'</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">then</span><span class="w"> </span><span class="s1">'WITH CHECK (true): ownership columns not enforced on write'</span><span class="w"> </span><span class="k">end</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="k">when</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">cmd</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="p">(</span><span class="s1">'UPDATE'</span><span class="p">,</span><span class="w"> </span><span class="s1">'ALL'</span><span class="p">)</span><span class="w"> </span><span class="k">and</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">check_expr</span><span class="w"> </span><span class="k">is</span><span class="w"> </span><span class="k">null</span><span class="w"> </span><span class="k">and</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">using_expr</span><span class="w"> </span><span class="o"></span><span class="w"> </span><span class="s1">'true'</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">then</span><span class="w"> </span><span class="s1">'no WITH CHECK: USING is reused for the new row'</span><span class="w"> </span><span class="k">end</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="k">when</span><span class="w"> </span><span class="n">coalesce</span><span class="p">(</span><span class="n">p</span><span class="p">.</span><span class="n">using_expr</span><span class="p">,</span><span class="w"> </span><span class="s1">''</span><span class="p">)</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">coalesce</span><span class="p">(</span><span class="n">p</span><span class="p">.</span><span class="n">check_expr</span><span class="p">,</span><span class="w"> </span><span class="s1">''</span><span class="p">)</span><span class="w"> </span><span class="o">~</span><span class="w"> </span><span class="s1">'auth.(uid|jwt|role)()'</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">and</span><span class="w"> </span><span class="n">coalesce</span><span class="p">(</span><span class="n">p</span><span class="p">.</span><span class="n">using_expr</span><span class="p">,</span><span class="w"> </span><span class="s1">''</span><span class="p">)</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">coalesce</span><span class="p">(</span><span class="n">p</span><span class="p">.</span><span class="n">check_expr</span><span class="p">,</span><span class="w"> </span><span class="s1">''</span><span class="p">)</span><span class="w"> </span><span class="o">!~*</span><span class="w"> </span><span class="s1">'(s*select auth.'</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">then</span><span class="w"> </span><span class="s1">'auth.*() not wrapped in (select ...): evaluated per row'</span><span class="w"> </span><span class="k">end</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">findings</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">from</span><span class="w"> </span><span class="n">t</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">left</span><span class="w"> </span><span class="k">join</span><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">polrelid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">t</span><span class="p">.</span><span class="n">oid</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">order</span><span class="w"> </span><span class="k">by</span><span class="w"> </span><span class="n">t</span><span class="p">.</span><span class="n">tbl</span><span class="p">,</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">cmd</span><span class="p">,</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">polname</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p><code>pg_policies</code> skips tables where there are no policies. So this query first checks <code>pg_class</code>, then gets the policies from <code>pg_policy</code> and adds a <code>findings</code> column for our report.</p>
<p>PostgreSQL 9.5 and newer has row-level security built in. You don’t need any extensions.</p>
<h3>What it finds (6 of 12 rows, columns cut for width)</h3>
<p>It tells us that <code>true</code> means that this policy reads or writes every row:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-2" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl"> tbl | policy | cmd | roles | findings
</span></span><span class="line"><span class="cl">-----------------+--------------------------------------------+--------+-----------------+---------------------------------------------------------
</span></span><span class="line"><span class="cl"> comments | Enable all for authenticated users | ALL | {authenticated} | reads every row; writes or deletes every row; WITH CHECK (true): ownership columns not enforced on write
</span></span><span class="line"><span class="cl"> profiles | Enable read access for all users | SELECT | {public} | reads every row; no TO clause: applies to anon as well
</span></span><span class="line"><span class="cl"> profiles | Users can update own profile | UPDATE | {public} | no TO clause: applies to anon as well; no WITH CHECK: USING is reused for the new row; auth.*() not wrapped in (select ...): evaluated per row
</span></span><span class="line"><span class="cl"> project_members | Enable insert for authenticated users only | INSERT | {authenticated} | WITH CHECK (true): ownership columns not enforced on write
</span></span><span class="line"><span class="cl"> tasks | Team can read tasks | SELECT | {authenticated} | reads every row
</span></span><span class="line"><span class="cl"> tasks | Team can update tasks | UPDATE | {authenticated} | writes or deletes every row</span></span></code></pre>
</div>
</div>
</div>
<p>There is no <code>TO</code> clause on two of these policies, which means that they apply to the <code>anon</code> role too.</p>
<p>On <code>project_members</code>, we have <code>WITH CHECK (true)</code>. This means that any signed-in user can add owner rows to <code>project_members</code>, and this is a bad thing.</p>
<p>It’s also wrong that <code>auth.*()</code> isn’t wrapped in a subquery for performance.</p>
<p>There are blind spots. The query can’t check the columns (like <code>is_admin</code> on <code>profiles</code>). It can’t check policies where <code>auth.role() = 'authenticated'</code>.</p>
<h2>Testing a policy from psql</h2>
<p>PostgREST runs every request as one API role. The JWT claims go into transaction settings, and then it executes the query. We can do the same thing by hand:</p>
<p>Set the role with <code>set role</code>, and put the user ID into the <code>request.jwt.claims</code> setting.</p>
<h3>Example</h3>
<p>Let’s start with a test case:</p>
<p>Alice is the owner of project Alpha. Bob is just a member of Alpha, so he has no right to modify or delete it. Carol owns Gamma, but she has nothing to do with Alpha.</p>
<p>If you run <code>04-test-as-user.sql</code> from psql, you will get some output like this:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-3" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">=== anon: the key from the browser bundle, nobody signed in
</span></span><span class="line"><span class="cl">set role anon;
</span></span><span class="line"><span class="cl"> profiles | projects | members | tasks
</span></span><span class="line"><span class="cl">----------+----------+---------+-------
</span></span><span class="line"><span class="cl"> 3 | 2 | 3 | 0
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">=== carol signed in (member of Gamma only)
</span></span><span class="line"><span class="cl">set role authenticated;
</span></span><span class="line"><span class="cl">select set_config('request.jwt.claims',
</span></span><span class="line"><span class="cl"> '{"sub": "00000000-0000-0000-0000-000000000003", "role": "authenticated"}', false);
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">--- what she can read
</span></span><span class="line"><span class="cl"> project | title | done
</span></span><span class="line"><span class="cl">---------+---------------------------------+------
</span></span><span class="line"><span class="cl"> Alpha | Rotate the leaked service key | f
</span></span><span class="line"><span class="cl"> Alpha | Write RLS policies for comments | f
</span></span><span class="line"><span class="cl"> Gamma | Pick a domain name | f
</span></span><span class="line"><span class="cl"> Gamma | Set up billing | f
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">--- what she can write: someone else's task in Alpha
</span></span><span class="line"><span class="cl">update public.tasks set done = true
</span></span><span class="line"><span class="cl">where title = 'Rotate the leaked service key' returning title, done;
</span></span><span class="line"><span class="cl"> title | done
</span></span><span class="line"><span class="cl">-------------------------------+------
</span></span><span class="line"><span class="cl"> Rotate the leaked service key | t
</span></span><span class="line"><span class="cl">UPDATE 1
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">--- make herself an owner of Alpha
</span></span><span class="line"><span class="cl">insert into public.project_members (project_id, user_id, role)
</span></span><span class="line"><span class="cl">values ('...00a1', '...0003', 'owner') returning *;
</span></span><span class="line"><span class="cl"> project_id | user_id | role
</span></span><span class="line"><span class="cl">------------+---------+-------
</span></span><span class="line"><span class="cl"> ...00a1 | ...0003 | owner
</span></span><span class="line"><span class="cl">INSERT 0 1
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">--- and an admin
</span></span><span class="line"><span class="cl">update public.profiles set is_admin = true where id = auth.uid()
</span></span><span class="line"><span class="cl">returning full_name, is_admin;
</span></span><span class="line"><span class="cl"> full_name | is_admin
</span></span><span class="line"><span class="cl">-----------+----------
</span></span><span class="line"><span class="cl"> Carol | t
</span></span><span class="line"><span class="cl">UPDATE 1
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">--- a policy with USING but no WITH CHECK: hand her own project to alice
</span></span><span class="line"><span class="cl">update public.projects set owner_id = '...0001' where name = 'Gamma'
</span></span><span class="line"><span class="cl">returning name, owner_id;
</span></span><span class="line"><span class="cl">ERROR: new row violates row-level security policy for table "projects"</span></span></code></pre>
</div>
</div>
</div>
<p>Carol’s first four statements went through. But then we hit an error: new row violates row-level security policy for table “projects”. This error happens because the <code>USING</code> clause is reused on policies that lack a <code>WITH CHECK</code>.</p>
<h2>The fix</h2>
<p>There are some rules that I follow when fixing RLS. First, every policy names its role. Second, a row is visible if the user is a member of its project. And finally, every insert and update has <code>WITH CHECK</code>.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-4" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">drop</span><span class="w"> </span><span class="n">policy</span><span class="w"> </span><span class="s2">"Enable read access for all users"</span><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">profiles</span><span class="p">;</span><span class="w"> </span><span class="c1">-- and the other eleven
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="k">revoke</span><span class="w"> </span><span class="k">all</span><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">profiles</span><span class="p">,</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">projects</span><span class="p">,</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">project_members</span><span class="p">,</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">tasks</span><span class="p">,</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">comments</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="n">anon</span><span class="p">,</span><span class="w"> </span><span class="n">authenticated</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">grant</span><span class="w"> </span><span class="k">select</span><span class="p">,</span><span class="w"> </span><span class="k">insert</span><span class="p">,</span><span class="w"> </span><span class="k">update</span><span class="p">,</span><span class="w"> </span><span class="k">delete</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">profiles</span><span class="p">,</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">projects</span><span class="p">,</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">project_members</span><span class="p">,</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">tasks</span><span class="p">,</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">comments</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">to</span><span class="w"> </span><span class="n">authenticated</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<h3>“Infinite recursion” on project_members</h3>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-5" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">create</span><span class="w"> </span><span class="n">policy</span><span class="w"> </span><span class="s2">"members: read own projects"</span><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">project_members</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="k">select</span><span class="w"> </span><span class="k">to</span><span class="w"> </span><span class="n">authenticated</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">using</span><span class="w"> </span><span class="p">(</span><span class="n">project_id</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="p">(</span><span class="k">select</span><span class="w"> </span><span class="n">m</span><span class="p">.</span><span class="n">project_id</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">project_members</span><span class="w"> </span><span class="n">m</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">m</span><span class="p">.</span><span class="n">user_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="k">select</span><span class="w"> </span><span class="n">auth</span><span class="p">.</span><span class="n">uid</span><span class="p">())));</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">select</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">project_members</span><span class="p">;</span><span class="w"> </span><span class="c1">-- as a signed-in user</span></span></span></code></pre>
</div>
</div>
</div>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-6" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">ERROR: infinite recursion detected in policy for relation "project_members"</span></span></code></pre>
</div>
</div>
</div>
<p>The reason is that <code>project_members</code> has its own RLS policies. So when I try to see if a user is a member of the project, it tries to check if they are a member. This causes infinite recursion.</p>
<p>The fix was to make <code>private.my_project_ids()</code> <code>SECURITY DEFINER</code> with an empty <code>search_path</code>.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-7" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">create</span><span class="w"> </span><span class="k">schema</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="k">not</span><span class="w"> </span><span class="k">exists</span><span class="w"> </span><span class="n">private</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">grant</span><span class="w"> </span><span class="k">usage</span><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">schema</span><span class="w"> </span><span class="n">private</span><span class="w"> </span><span class="k">to</span><span class="w"> </span><span class="n">authenticated</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">create</span><span class="w"> </span><span class="k">or</span><span class="w"> </span><span class="k">replace</span><span class="w"> </span><span class="k">function</span><span class="w"> </span><span class="n">private</span><span class="p">.</span><span class="n">my_project_ids</span><span class="p">()</span><span class="w"> </span><span class="k">returns</span><span class="w"> </span><span class="k">setof</span><span class="w"> </span><span class="n">uuid</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">language</span><span class="w"> </span><span class="k">sql</span><span class="w"> </span><span class="k">stable</span><span class="w"> </span><span class="k">security</span><span class="w"> </span><span class="k">definer</span><span class="w"> </span><span class="k">set</span><span class="w"> </span><span class="n">search_path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">''</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="err">$$</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">select</span><span class="w"> </span><span class="n">project_id</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">project_members</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">user_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="k">select</span><span class="w"> </span><span class="n">auth</span><span class="p">.</span><span class="n">uid</span><span class="p">())</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="err">$$</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">revoke</span><span class="w"> </span><span class="k">execute</span><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">function</span><span class="w"> </span><span class="n">private</span><span class="p">.</span><span class="n">my_project_ids</span><span class="p">()</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="k">public</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">grant</span><span class="w"> </span><span class="k">execute</span><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">function</span><span class="w"> </span><span class="n">private</span><span class="p">.</span><span class="n">my_project_ids</span><span class="p">()</span><span class="w"> </span><span class="k">to</span><span class="w"> </span><span class="n">authenticated</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">create</span><span class="w"> </span><span class="n">policy</span><span class="w"> </span><span class="s2">"projects: owner and members read"</span><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">projects</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="k">select</span><span class="w"> </span><span class="k">to</span><span class="w"> </span><span class="n">authenticated</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">using</span><span class="w"> </span><span class="p">(</span><span class="n">owner_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="k">select</span><span class="w"> </span><span class="n">auth</span><span class="p">.</span><span class="n">uid</span><span class="p">())</span><span class="w"> </span><span class="k">or</span><span class="w"> </span><span class="n">id</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="p">(</span><span class="k">select</span><span class="w"> </span><span class="n">private</span><span class="p">.</span><span class="n">my_project_ids</span><span class="p">()));</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">create</span><span class="w"> </span><span class="n">policy</span><span class="w"> </span><span class="s2">"members: read own projects"</span><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">project_members</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="k">select</span><span class="w"> </span><span class="k">to</span><span class="w"> </span><span class="n">authenticated</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">using</span><span class="w"> </span><span class="p">(</span><span class="n">project_id</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="p">(</span><span class="k">select</span><span class="w"> </span><span class="n">private</span><span class="p">.</span><span class="n">my_project_ids</span><span class="p">())</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">or</span><span class="w"> </span><span class="k">exists</span><span class="w"> </span><span class="p">(</span><span class="k">select</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">projects</span><span class="w"> </span><span class="n">p</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">project_members</span><span class="p">.</span><span class="n">project_id</span><span class="w"> </span><span class="k">and</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">owner_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="k">select</span><span class="w"> </span><span class="n">auth</span><span class="p">.</span><span class="n">uid</span><span class="p">())));</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">create</span><span class="w"> </span><span class="n">policy</span><span class="w"> </span><span class="s2">"members: owner adds"</span><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">project_members</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="k">insert</span><span class="w"> </span><span class="k">to</span><span class="w"> </span><span class="n">authenticated</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">with</span><span class="w"> </span><span class="k">check</span><span class="w"> </span><span class="p">(</span><span class="k">exists</span><span class="w"> </span><span class="p">(</span><span class="k">select</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">projects</span><span class="w"> </span><span class="n">p</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">project_members</span><span class="p">.</span><span class="n">project_id</span><span class="w"> </span><span class="k">and</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">owner_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="k">select</span><span class="w"> </span><span class="n">auth</span><span class="p">.</span><span class="n">uid</span><span class="p">())));</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">create</span><span class="w"> </span><span class="n">policy</span><span class="w"> </span><span class="s2">"tasks: members update, task stays in a project of theirs"</span><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">tasks</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="k">update</span><span class="w"> </span><span class="k">to</span><span class="w"> </span><span class="n">authenticated</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">using</span><span class="w"> </span><span class="p">(</span><span class="n">project_id</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="p">(</span><span class="k">select</span><span class="w"> </span><span class="n">private</span><span class="p">.</span><span class="n">my_project_ids</span><span class="p">()))</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">with</span><span class="w"> </span><span class="k">check</span><span class="w"> </span><span class="p">(</span><span class="n">project_id</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="p">(</span><span class="k">select</span><span class="w"> </span><span class="n">private</span><span class="p">.</span><span class="n">my_project_ids</span><span class="p">()));</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">revoke</span><span class="w"> </span><span class="k">update</span><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">tasks</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="n">authenticated</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">grant</span><span class="w"> </span><span class="k">update</span><span class="w"> </span><span class="p">(</span><span class="n">title</span><span class="p">,</span><span class="w"> </span><span class="n">done</span><span class="p">)</span><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">tasks</span><span class="w"> </span><span class="k">to</span><span class="w"> </span><span class="n">authenticated</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="c1">-- plus ten more in 05-fix.sql</span></span></span></code></pre>
</div>
</div>
</div>
<h3>The is_admin column</h3>
<p>I needed to revoke table-level <code>UPDATE</code>, and grant it back on <code>full_name</code> only:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-8" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">revoke</span><span class="w"> </span><span class="k">update</span><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">profiles</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="n">authenticated</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">grant</span><span class="w"> </span><span class="k">update</span><span class="w"> </span><span class="p">(</span><span class="n">full_name</span><span class="p">)</span><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">profiles</span><span class="w"> </span><span class="k">to</span><span class="w"> </span><span class="n">authenticated</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<h2>Checking the fix</h2>
<p>I ran the same test case again, with a fresh database. But the first time I ran <code>run.sh</code> it didn’t reseed the test data. It looked like I had failed to patch the security.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-9" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">##### 05b-leftovers.sql: 05-fix.sql on top of what carol wrote (no reseed)
</span></span><span class="line"><span class="cl">[...]
</span></span><span class="line"><span class="cl">--- no policy takes back rows written under the old ones. to review on a live database:
</span></span><span class="line"><span class="cl"> project | member | role
</span></span><span class="line"><span class="cl">---------+--------+-------
</span></span><span class="line"><span class="cl"> Alpha | Carol | owner
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> full_name | is_admin
</span></span><span class="line"><span class="cl">-----------+----------
</span></span><span class="line"><span class="cl"> Carol | t</span></span></code></pre>
</div>
</div>
</div>
<p>After reseeding and rerunning, the results were better:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-10" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">=== anon: the key from the browser bundle, nobody signed in
</span></span><span class="line"><span class="cl">ERROR: permission denied for table profiles
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">=== carol signed in (member of Gamma only)
</span></span><span class="line"><span class="cl">--- what she can read
</span></span><span class="line"><span class="cl"> project | title | done
</span></span><span class="line"><span class="cl">---------+--------------------+------
</span></span><span class="line"><span class="cl"> Gamma | Pick a domain name | f
</span></span><span class="line"><span class="cl"> Gamma | Set up billing | f
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">--- someone else's task in Alpha: 0 rows, the row is not there for her
</span></span><span class="line"><span class="cl"> title | done
</span></span><span class="line"><span class="cl">-------+------
</span></span><span class="line"><span class="cl">UPDATE 0
</span></span><span class="line"><span class="cl">--- the same update, no WHERE, no RETURNING: her own two tasks
</span></span><span class="line"><span class="cl">UPDATE 2
</span></span><span class="line"><span class="cl">--- make herself an owner of Alpha
</span></span><span class="line"><span class="cl">ERROR: new row violates row-level security policy for table "project_members"
</span></span><span class="line"><span class="cl">--- the same insert without RETURNING
</span></span><span class="line"><span class="cl">ERROR: new row violates row-level security policy for table "project_members"
</span></span><span class="line"><span class="cl">--- and an admin
</span></span><span class="line"><span class="cl">ERROR: permission denied for table profiles
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">=== bob signed in (member of Alpha, not its owner)
</span></span><span class="line"><span class="cl">[...]
</span></span><span class="line"><span class="cl">--- a teammate's task: he cannot make himself its author
</span></span><span class="line"><span class="cl">ERROR: permission denied for table tasks
</span></span><span class="line"><span class="cl">--- the app still works: bob starts a project of his own and adds himself to it
</span></span><span class="line"><span class="cl"> name
</span></span><span class="line"><span class="cl">------
</span></span><span class="line"><span class="cl"> Beta
</span></span><span class="line"><span class="cl">INSERT 0 1
</span></span><span class="line"><span class="cl"> role
</span></span><span class="line"><span class="cl">-------
</span></span><span class="line"><span class="cl"> owner
</span></span><span class="line"><span class="cl">INSERT 0 1
</span></span><span class="line"><span class="cl">[...]</span></span></code></pre>
</div>
</div>
</div>
<p>The audit findings were empty for all 14 policies.</p>
<h2>The cost</h2>
<p>Let’s see how much they cost on a large table.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-11" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">=== seeding: 2,000 users, 500 projects, ~4 members each, 200,000 tasks
</span></span><span class="line"><span class="cl"> tasks | memberships | my_projects
</span></span><span class="line"><span class="cl">--------+-------------+-------------
</span></span><span class="line"><span class="cl"> 200004 | 2008 | 5</span></span></code></pre>
</div>
</div>
</div>
<p>I look at the dashboard count (how many tasks are there) and then one page of tasks for the authenticated user. I run these tests on my laptop: 11th gen i7, PostgreSQL 16.14, <code>shared_buffers</code> is 128 MB and the cache is warm. JIT is turned off for this test.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-12" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">explain</span><span class="w"> </span><span class="p">(</span><span class="k">analyze</span><span class="p">,</span><span class="w"> </span><span class="n">buffers</span><span class="p">,</span><span class="w"> </span><span class="n">costs</span><span class="w"> </span><span class="k">off</span><span class="p">)</span><span class="w"> </span><span class="k">select</span><span class="w"> </span><span class="k">count</span><span class="p">(</span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">tasks</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">explain</span><span class="w"> </span><span class="p">(</span><span class="k">analyze</span><span class="p">,</span><span class="w"> </span><span class="n">buffers</span><span class="p">,</span><span class="w"> </span><span class="n">costs</span><span class="w"> </span><span class="k">off</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">select</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">tasks</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">project_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">:</span><span class="n">page</span><span class="w"> </span><span class="k">order</span><span class="w"> </span><span class="k">by</span><span class="w"> </span><span class="n">created_at</span><span class="w"> </span><span class="k">desc</span><span class="w"> </span><span class="k">limit</span><span class="w"> </span><span class="mi">10</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-13" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="c1">-- A: a function call per row
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="k">using</span><span class="w"> </span><span class="p">(</span><span class="n">private</span><span class="p">.</span><span class="n">is_project_member</span><span class="p">(</span><span class="n">project_id</span><span class="p">))</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="c1">-- B: what 05-fix.sql installs on tasks
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="k">using</span><span class="w"> </span><span class="p">(</span><span class="n">project_id</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="p">(</span><span class="k">select</span><span class="w"> </span><span class="n">private</span><span class="p">.</span><span class="n">my_project_ids</span><span class="p">()))</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="c1">-- C: correlated EXISTS
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="k">using</span><span class="w"> </span><span class="p">(</span><span class="k">exists</span><span class="w"> </span><span class="p">(</span><span class="k">select</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">project_members</span><span class="w"> </span><span class="n">m</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">m</span><span class="p">.</span><span class="n">project_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tasks</span><span class="p">.</span><span class="n">project_id</span><span class="w"> </span><span class="k">and</span><span class="w"> </span><span class="n">m</span><span class="p">.</span><span class="n">user_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="k">select</span><span class="w"> </span><span class="n">auth</span><span class="p">.</span><span class="n">uid</span><span class="p">())))</span></span></span></code></pre>
</div>
</div>
</div>
<h3>The shape A policy</h3>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-14" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl"> Aggregate (actual time=1064.579..1064.580 rows=1 loops=1)
</span></span><span class="line"><span class="cl"> Buffers: shared hit=404515
</span></span><span class="line"><span class="cl"> -&gt; Seq Scan on tasks (actual time=0.293..1064.294 rows=2000 loops=1)
</span></span><span class="line"><span class="cl"> Filter: private.is_project_member(project_id)
</span></span><span class="line"><span class="cl"> Rows Removed by Filter: 198004
</span></span><span class="line"><span class="cl"> Buffers: shared hit=404515
</span></span><span class="line"><span class="cl"> [...]
</span></span><span class="line"><span class="cl"> Execution Time: 1064.597 ms</span></span></code></pre>
</div>
</div>
</div>
<p>The query plan tells us that it ran the function <code>is_project_member(project_id)</code> on every row in the table.</p>
<p>It took 1065 ms and 404,515 buffer hits (on my machine). The first page of tasks took 0.57 ms, because it used <code>project_id = $1</code> which was leakproof and ran first.</p>
<p>But if I tried to run a <code>LIKE</code> search for title, it took 1073 ms because it had to call <code>is_project_member(project_id)</code> again.</p>
<h3>Shape B: the “project_id in (select my_project_ids())” policy</h3>
<p>But now the dashboard count took just 13.9 ms, and the first page of tasks 0.65 ms.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-15" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">[...]
</span></span><span class="line"><span class="cl"> -&gt; Index Scan using tasks_created_at_idx on tasks (actual time=0.176..0.638 rows=10 loops=1)
</span></span><span class="line"><span class="cl"> Filter: ((hashed SubPlan 1) AND (project_id = '00000000-0000-0000-0002-000000000003'::uuid))
</span></span><span class="line"><span class="cl"> Rows Removed by Filter: 4496
</span></span><span class="line"><span class="cl"> Execution Time: 0.653 ms</span></span></code></pre>
</div>
</div>
</div>
<h3>Correlated EXISTS</h3>
<p>In this case, the dashboard count took 20.7 ms (with JIT turned off).</p>
<p>I also tried to run the query with the default <code>jit = on</code>. It was slower: 283 ms vs 20.7 ms.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-16" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">--- C with jit = on (the default up to PostgreSQL 18): the cost estimate crosses jit_above_cost
</span></span><span class="line"><span class="cl"> Aggregate (cost=6449848.95..6449848.96 rows=1 width=8) (actual time=269.537..269.542 rows=1 loops=1)
</span></span><span class="line"><span class="cl"> -&gt; Seq Scan on tasks (cost=0.00..6449598.94 rows=100002 width=0) (actual time=254.382..269.470 rows=2000 loops=1)
</span></span><span class="line"><span class="cl"> Filter: (hashed SubPlan 22)
</span></span><span class="line"><span class="cl"> Rows Removed by Filter: 198004
</span></span><span class="line"><span class="cl"> [...]
</span></span><span class="line"><span class="cl"> JIT:
</span></span><span class="line"><span class="cl"> Timing: Generation 2.293 ms, Inlining 50.450 ms, Optimization 109.853 ms, Emission 93.490 ms, Total 256.087 ms
</span></span><span class="line"><span class="cl"> Execution Time: 282.744 ms</span></span></code></pre>
</div>
</div>
</div>
<p>The plan showed that the query was estimated at 6.4 million cost units. This is more than <code>jit_above_cost</code>, so it spent 256 ms just to compile the plan.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-17" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">--- B with jit = on: the estimate stays under jit_above_cost, nothing is compiled
</span></span><span class="line"><span class="cl"> Execution Time: 16.028 ms</span></span></code></pre>
</div>
</div>
</div>
<h3>The index</h3>
<p>Adding an index helped a lot.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-18" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">create</span><span class="w"> </span><span class="k">index</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="k">not</span><span class="w"> </span><span class="k">exists</span><span class="w"> </span><span class="n">tasks_project_id_created_at_idx</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">tasks</span><span class="w"> </span><span class="p">(</span><span class="n">project_id</span><span class="p">,</span><span class="w"> </span><span class="n">created_at</span><span class="w"> </span><span class="k">desc</span><span class="p">);</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">create</span><span class="w"> </span><span class="k">index</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="k">not</span><span class="w"> </span><span class="k">exists</span><span class="w"> </span><span class="n">project_members_user_id_idx</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">project_members</span><span class="w"> </span><span class="p">(</span><span class="n">user_id</span><span class="p">,</span><span class="w"> </span><span class="n">project_id</span><span class="p">);</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">create</span><span class="w"> </span><span class="k">index</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="k">not</span><span class="w"> </span><span class="k">exists</span><span class="w"> </span><span class="n">comments_task_id_idx</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="k">public</span><span class="p">.</span><span class="n">comments</span><span class="w"> </span><span class="p">(</span><span class="n">task_id</span><span class="p">);</span></span></span></code></pre>
</div>
</div>
</div>
<p>This made the first page of tasks run in 0.15 ms, because now it didn’t have to filter out 4,496 rows.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-19" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">=== the indexes (08-indexes.sql), with shape B in place
</span></span><span class="line"><span class="cl">[...]
</span></span><span class="line"><span class="cl"> -&gt; Index Scan using tasks_project_id_created_at_idx on tasks (actual time=0.123..0.139 rows=10 loops=1)
</span></span><span class="line"><span class="cl"> Index Cond: (project_id = '00000000-0000-0000-0002-000000000003'::uuid)
</span></span><span class="line"><span class="cl"> Filter: (hashed SubPlan 1)
</span></span><span class="line"><span class="cl"> Execution Time: 0.152 ms</span></span></code></pre>
</div>
</div>
</div>
<h3>The (select auth.uid()) trick vs bare auth.uid()</h3>
<p>Wrapping <code>auth.uid()</code> into a subquery is a lot faster. In this case, it was 10 ms vs 151 ms.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-20" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">--- using (created_by = auth.uid())
</span></span><span class="line"><span class="cl"> Execution Time: 150.685 ms
</span></span><span class="line"><span class="cl">--- using (created_by = (select auth.uid()))
</span></span><span class="line"><span class="cl"> InitPlan 1 (returns $0)
</span></span><span class="line"><span class="cl"> -&gt; Seq Scan on tasks (actual time=0.037..9.873 rows=400 loops=1)
</span></span><span class="line"><span class="cl"> Filter: (created_by = $0)
</span></span><span class="line"><span class="cl"> Execution Time: 9.910 ms</span></span></code></pre>
</div>
</div>
</div>
<h2>What I hand back</h2>
<p>I hand over the audit output before and after the fix. I also include Carol’s transcript from when she tried to do stuff that she wasn’t allowed to, the rows to review, my <code>05-fix.sql</code> script and the <code>08-indexes.sql</code> script.</p>
<p>I set up a GitHub Actions job that runs on every push and fails if any of my regressions fail.</p>
<p>The first version of this job failed because psql writes ERROR lines to stderr. But grep was reading from stdout only.</p>
<p>When the builder updates their schema, you will need to fix the RLS again.</p>
<p><em>This post is part of the <a href="https://percona.community/blog/write-for-percona-community/">Percona Community Writers Program</a>.</em></p>
<p><a href="https://percona.community/blog/2026/10/13/postgresql-rls-audit-ai-app-builder/">One query to audit the PostgreSQL row-level security an AI app builder wrote for you</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Community Spotlight: Slava Rozhnev and SQLtest.online</title>
        <link>https://mariadb.org/community-spotlight-slava-rozhnev-and-sqltest-online/</link>
        <pubDate>Mon, 12 Oct 2026 18:16:35 +0000</pubDate>
        <dc:creator>Simona Aleksandrova</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/community-spotlight-slava-rozhnev-and-sqltest-online/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Open source runs on people. Not only the engineers who commit code, but everyone who builds tools, answers questions, writes tutorials and shows up when help is needed. Slava Rozhnev, creator of SQLtest.online, is one of those people for MariaDB. He has been creating SQL quizzes with the MariaDB Foundation for a while now, and […]<br />
Community Spotlight: Slava Rozhnev and SQLtest.online appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/community-spotlight-slava-rozhnev-and-sqltest-online/">Community Spotlight: Slava Rozhnev and SQLtest.online</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Open source runs on people. Not only the engineers who commit code, but everyone who builds tools, answers questions, writes tutorials and shows up when help is needed. Slava Rozhnev, creator of SQLtest.online, is one of those people for MariaDB. He has been creating SQL quizzes with the MariaDB Foundation for a while now, and […]</p>
<p><a href="https://mariadb.org/community-spotlight-slava-rozhnev-and-sqltest-online/">Community Spotlight: Slava Rozhnev and SQLtest.online</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/community-spotlight-slava-rozhnev-and-sqltest-online/">Community Spotlight: Slava Rozhnev and SQLtest.online</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Migrations to MariaDB from MySQL Now Easier Than Ever: Open Source MariaDB Migrator Tool Reaches GA</title>
        <link>https://mariadb.com/resources/blog/migrations-to-mariadb-from-mysql-now-easier-than-ever-open-source-mariadb-migrator-tool-reaches-ga/</link>
        <pubDate>Mon, 12 Oct 2026 16:51:38 +0000</pubDate>
        <dc:creator>Manoj Vakeel</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/migrations-to-mariadb-from-mysql-now-easier-than-ever-open-source-mariadb-migrator-tool-reaches-ga/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>In July we introduced MariaDB Migrator as a beta: four migration modes, a read-only Assess and Plan phase, and a […]</p>
<p><a href="https://mariadb.com/resources/blog/migrations-to-mariadb-from-mysql-now-easier-than-ever-open-source-mariadb-migrator-tool-reaches-ga/">Migrations to MariaDB from MySQL Now Easier Than Ever: Open Source MariaDB Migrator Tool Reaches GA</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>In July we introduced MariaDB Migrator as a beta: four migration modes, a read-only Assess and Plan phase, and a single YAML file driving the whole thing. Michael Aglietti then walked through three failures even a careful migration can miss. Today MariaDB Migrator is generally available. If you’d like to watch a video on what’s new in the MariaDB Migrator, check this out…</p>
<p><a href="https://mariadb.com/resources/blog/migrations-to-mariadb-from-mysql-now-easier-than-ever-open-source-mariadb-migrator-tool-reaches-ga/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/migrations-to-mariadb-from-mysql-now-easier-than-ever-open-source-mariadb-migrator-tool-reaches-ga/">Migrations to MariaDB from MySQL Now Easier Than Ever: Open Source MariaDB Migrator Tool Reaches GA</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Migrations to MariaDB from MySQL Now Easier Than Ever: Open Source MariaDB Migrator Tool Reaches GA</title>
        <link>https://mariadb.com/resources/blog/migrations-to-mariadb-from-mysql-now-easier-than-ever-open-source-mariadb-migrator-tool-reaches-ga/</link>
        <pubDate>Mon, 12 Oct 2026 16:51:00 +0000</pubDate>
        <dc:creator>Manoj Vakeel</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/migrations-to-mariadb-from-mysql-now-easier-than-ever-open-source-mariadb-migrator-tool-reaches-ga-2/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>In July we introduced MariaDB Migrator as a beta: four migration modes, a read-only Assess and Plan phase, and a […]</p>
<p><a href="https://mariadb.com/resources/blog/migrations-to-mariadb-from-mysql-now-easier-than-ever-open-source-mariadb-migrator-tool-reaches-ga/">Migrations to MariaDB from MySQL Now Easier Than Ever: Open Source MariaDB Migrator Tool Reaches GA</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>In July we introduced MariaDB Migrator as a beta: four migration modes, a read-only Assess and Plan phase, and a single YAML file driving the whole thing. Michael Aglietti then walked through three failures even a careful migration can miss. Today MariaDB Migrator is generally available. If you’d like to watch a video on what’s new in the MariaDB Migrator, check this out…</p>
<p><a href="https://mariadb.com/resources/blog/migrations-to-mariadb-from-mysql-now-easier-than-ever-open-source-mariadb-migrator-tool-reaches-ga/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/migrations-to-mariadb-from-mysql-now-easier-than-ever-open-source-mariadb-migrator-tool-reaches-ga/">Migrations to MariaDB from MySQL Now Easier Than Ever: Open Source MariaDB Migrator Tool Reaches GA</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Thread Pool in Percona Server and MySQL (Part 2)</title>
        <link>https://www.percona.com/blog/thread-pool-in-percona-server-and-mysql-part-2/</link>
        <pubDate>Mon, 12 Oct 2026 11:14:07 +0000</pubDate>
        <dc:creator>Bogdan Degtyariov</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/thread-pool-in-percona-server-and-mysql-part-2/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Thread Pool in Percona Server and MySQL (Part 2) The previous Part 1 focused on explaining the idea of thread pool, configuration options and analysis of thread pool efficiency in Percona Server for MySQL 9.7.1-1 against the base line, which is the same server without thread pooling. We recommend reading the post with Part 1 … Continued<br />
The post Thread Pool in Percona Server and MySQL (Part 2) appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/thread-pool-in-percona-server-and-mysql-part-2/">Thread Pool in Percona Server and MySQL (Part 2)</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<h2><span>Thread Pool in Percona Server and MySQL (Part 2)</span></h2>
<p><span>The previous <a href="https://www.percona.com/blog/thread-pool-in-percona-server-and-mysql-part-1/">Part 1</a> focused on explaining the idea of thread pool, configuration options and analysis of thread pool efficiency in Percona Server for MySQL 9.7.1-1 against the base line, which is the same server without thread pooling.</span></p>
<p><span>We recommend reading the post with <a href="https://www.percona.com/blog/thread-pool-in-percona-server-and-mysql-part-1/">Part 1</a> before proceeding with reading Part 2 in the current post.</span></p>
<h4><span>MySQL 26.7.0 with and without thread pool:</span></h4>
<p><span>For better understanding of Percona Server 9.7.1-1 and MySQL 26.7.0 / 9.7.2 thread pool performance against each other we will start with a brief look at MySQL on its own.</span></p>
<p><span>The test runs did not find any significant differences in the performance of the thread pool between MySQL Server 26.7.0 and 9.7.2:</span></p>
<p><span> <b>Graph 1 – Comparison of MySQL 26.7.0 and 9.7.2 </b>[ <a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=graph&amp;metric=tps&amp;server=mysql+26.7.0%2Cmysql+9.7.2&amp;mem=2&amp;tp=off%2C10&amp;os=2" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=table&amp;metric=tps&amp;server=mysql+26.7.0%2Cmysql+9.7.2&amp;mem=2&amp;tp=off%2C10&amp;os=2" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]</span><img loading="lazy" decoding="async" class="alignnone size-full wp-image-54399" src="https://www.percona.com/wp-content/uploads/2026/10/101.png" alt="Graph 1 - Comparison of MySQL 26.7.0 and 9.7.2" width="1235" height="780"></span></p>
<p><span>As can be seen on the Graph 1 – the variation in performance between the versions is minimal. Configurations without thread pool go extremely close to each other, same as with the thread pool.</span></p>
<p><span>Lines that correspond to similar configurations converge to the same values across all server buffer tiers (2G / 12G / 32G) and across thread pool parameter ranges (<b>thread_pool_size=[10/20/40/80/120/160]</b> and <b>thread_pool_oversubscribe=[2/3/4]</b>).</span></p>
<p><span><b>NOTE</b>: MySQL 26.7.0 is very slightly faster than 9.7.2 in the high connection threads count.</span></p>
<p><span>Therefore, to avoid the crowded graphs the data and performance comparisons will be presented for MySQL Version 26.7.0 only. The results for MySQL 9.7.2 can be viewed on the </span><a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html" target="_blank" rel="noopener"><span>interactive graph</span></a><span> page on GitHub.</span></p>
<p><span> <b>Graph 2 – MySQL with 2G buffer </b> [ <a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=graph&amp;metric=tps&amp;server=mysql+26.7.0&amp;mem=2&amp;tp=all&amp;os=2" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=table&amp;metric=tps&amp;server=mysql+26.7.0&amp;mem=2&amp;tp=all&amp;os=2" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]</span><img loading="lazy" decoding="async" class="alignnone size-full wp-image-54401" src="https://www.percona.com/wp-content/uploads/2026/10/102.png" alt="Graph 2 - MySQL with 2G buffer" width="1235" height="780"></span></p>
<p><span>The thread pool implementation behaves differently in MySQL Server 26.7.0. Although it does not bring a huge performance boost as it was in Percona Server, the buffer pool for a high number of client connection threads (640 / 1280 / 2560) helps to keep TPS performance better than without the thread pool. Especially with 2560 connections the pooled TPS is three times the number of non-pooled TPS: 371 and 122 respectively.</span></p>
<p><span>The selection of the optimal value for <b>thread_pool_size</b> is important. The value itself (10) looks the same as it was with Percona Server. In the same way, higher values for <b>thread_pool_size</b> (20 / 40 / 80 / 120 / 160) do less TPS improvements.</span></p>
<p><span>Unlike Percona Server the oversubscription variations do not impact TPS much when </span><b>innodb_buffer_pool_size=2G</b><span>. However, <b>thread_pool_oversubscribe=2</b> does slightly better than 3 or 4.</span></p>
<p><span> <b>Graph 3 – MySQL with 12G buffer </b> [ <a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=graph&amp;metric=tps&amp;server=mysql+26.7.0&amp;mem=12&amp;tp=all&amp;os=2" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=table&amp;metric=tps&amp;server=mysql+26.7.0&amp;mem=12&amp;tp=all&amp;os=2" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]</span></span><img loading="lazy" decoding="async" class="alignnone size-full wp-image-54403" src="https://www.percona.com/wp-content/uploads/2026/10/103.png" alt="Graph 3 - MySQL with 12G buffer " width="1235" height="780"></p>
<p><span>Increasing buffer pool (<b>innodb_buffer_pool_size=12G</b>) brings the overall TPS performance up, but thread pool makes less impact at the highest number of connections: 1273 with thread pool and 718 without (TPS is improved by 77%).</span></p>
<p><span>With the fully buffered data set (<b>innodb_buffer_pool_size=32G</b>) MySQL thread pool configuration managed to achieve better TPS performance than non-pooled configuration.</span></p>
<p><span> <b>Graph 4 – MySQL with 32G buffer </b> [ <a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=graph&amp;metric=tps&amp;server=mysql+26.7.0&amp;mem=32&amp;tp=all&amp;os=2" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=table&amp;metric=tps&amp;server=mysql+26.7.0&amp;mem=32&amp;tp=all&amp;os=2" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]</span></span><img decoding="async" loading="lazy" class="alignnone size-full wp-image-54404" src="https://www.percona.com/wp-content/uploads/2026/10/104.png" alt="Graph 4 - MySQL with 32G buffer" width="1235" height="780"></p>
<p><span>The pooled configuration yielded 18,975 TPS against 17,011 for non-pooled server configuration, which is 11.6% win for the thread pool.</span></p>
<p><span>The p95 latency in MySQL had a very similar characteristic to Percona Server with thread pool reducing the latency from 759ms down to 153 ms.</span></p>
<h4><span>Comparison of Percona Server 9.7.1-1 for MySQL and MySQL Server 26.7.0:</span></h4>
<p><span>Finally, we arrived at the direct TPS comparison.</span><span><br />
</span><span>Let’s start with <b>innodb_buffer_pool_size=2G</b>:</span></p>
<p><span>For the comparison we will pick the best performing thread pool configurations for Percona Server and MySQL Server along with baseline (thread pool disabled) configurations. It was established before that <b>thread_pool_size=10</b> works best for both servers (TP 10 on the graph), but the oversubscription 4 (os4 on the graph) works better for Percona Server while the optimal oversubscription for MySQL Server is 2 (</span><b>os2</b><span> on the graph).</span></p>
<p><span> <b>Graph 5 – Percona Server and MySQL with 2G buffer </b> [ <a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=graph&amp;metric=tps&amp;server=Percona-Server+9.7.1-1%2Cmysql+26.7.0&amp;mem=2&amp;tp=off%2C10%2C20&amp;os=2%2C4&amp;shape=box&amp;points=all&amp;median=lines&amp;hide=Percona-Server+9.7.1-1+%7C+2G+%7C+TP+10+os2%2CPercona-Server+9.7.1-1+%7C+2G+%7C+TP+20+os2%2CPercona-Server+9.7.1-1+%7C+2G+%7C+TP+20+os4%2Cmysql+26.7.0+%7C+2G+%7C+TP+10+os4%2Cmysql+26.7.0+%7C+2G+%7C+TP+20+os2%2Cmysql+26.7.0+%7C+2G+%7C+TP+20+os4%2Cmysql+9.7.2+%7C+2G+%7C+TP+off%2Cmysql+9.7.2+%7C+2G+%7C+TP+10+os2" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=table&amp;metric=tps&amp;server=Percona-Server+9.7.1-1%2Cmysql+26.7.0&amp;mem=2&amp;tp=off%2C10%2C20&amp;os=2%2C4&amp;shape=box&amp;points=all&amp;median=lines&amp;hide=Percona-Server+9.7.1-1+%7C+2G+%7C+TP+10+os2%2CPercona-Server+9.7.1-1+%7C+2G+%7C+TP+20+os2%2CPercona-Server+9.7.1-1+%7C+2G+%7C+TP+20+os4%2Cmysql+26.7.0+%7C+2G+%7C+TP+10+os4%2Cmysql+26.7.0+%7C+2G+%7C+TP+20+os2%2Cmysql+26.7.0+%7C+2G+%7C+TP+20+os4%2Cmysql+9.7.2+%7C+2G+%7C+TP+off%2Cmysql+9.7.2+%7C+2G+%7C+TP+10+os2" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]<img decoding="async" loading="lazy" class="alignnone size-full wp-image-54406" src="https://www.percona.com/wp-content/uploads/2026/10/105b.png" alt="Graph 5 - Percona Server and MySQL with 2G buffer" width="1235" height="780"><br />
</span></span></p>
<p><span>MySQL Server starts well, winning with 40 connections, but we do not consider thread pool efficiency to be good with low number of connections.</span></p>
<p><span>At 2560 connections mark the Percona Server implementation of the thread pool helps it to produce more TPS than MySQL server by a factor of 6.2 (2,304 against 371 TPS).</span></p>
<p><span> <b>Graph 6 – Percona Server and MySQL with 12G buffer </b> [ <a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=graph&amp;metric=tps&amp;server=Percona-Server+9.7.1-1%2Cmysql+26.7.0&amp;mem=12&amp;tp=off%2C10%2C20&amp;os=2%2C4&amp;shape=box&amp;points=all&amp;median=lines&amp;hide=Percona-Server+9.7.1-1+%7C+12G+%7C+TP+10+os2%2CPercona-Server+9.7.1-1+%7C+12G+%7C+TP+10+os4%2CPercona-Server+9.7.1-1+%7C+12G+%7C+TP+20+os2%2Cmysql+26.7.0+%7C+12G+%7C+TP+10+os4%2Cmysql+26.7.0+%7C+12G+%7C+TP+20+os2%2Cmysql+26.7.0+%7C+12G+%7C+TP+20+os4" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=table&amp;metric=tps&amp;server=Percona-Server+9.7.1-1%2Cmysql+26.7.0&amp;mem=12&amp;tp=off%2C10%2C20&amp;os=2%2C4&amp;shape=box&amp;points=all&amp;median=lines&amp;hide=Percona-Server+9.7.1-1+%7C+12G+%7C+TP+10+os2%2CPercona-Server+9.7.1-1+%7C+12G+%7C+TP+10+os4%2CPercona-Server+9.7.1-1+%7C+12G+%7C+TP+20+os2%2Cmysql+26.7.0+%7C+12G+%7C+TP+10+os4%2Cmysql+26.7.0+%7C+12G+%7C+TP+20+os2%2Cmysql+26.7.0+%7C+12G+%7C+TP+20+os4" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]</span></span><img decoding="async" loading="lazy" class="alignnone size-full wp-image-54408" src="https://www.percona.com/wp-content/uploads/2026/10/106.png" alt="Graph 6 - Percona Server and MySQL with 12G buffer" width="1235" height="780"></p>
<p><span>Again, at a lower number of connections (40 and 80) MySQL Server goes faster than Percona Server.</span></p>
<p><span>Moving to the high number of connections (2560) with <b>innodb_buffer_pool_size=12G</b> the Percona thread pool performs better than MySQL.</span></p>
<p><span>On the next graph corresponding to <b>innodb_buffer_pool_size=32G</b>, the best performing configurations are different for Percona Server (<b>thread_pool_size=160/thread_pool_oversubscribe=2</b>) and MySQL Server (<b>thread_pool_size=10/thread_pool_oversubscribe=2</b>). It looks that in Percona Server increasing <b>innodb_buffer_pool_size</b> requires increasing <b>thread_pool_size</b> for the thread pool to work optimally.</span></p>
<p><span> <b>Graph 7 – Percona Server and MySQL with 32G buffer </b> [ <a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=graph&amp;metric=tps&amp;server=Percona-Server+9.7.1-1%2Cmysql+26.7.0&amp;mem=32&amp;tp=off%2C10%2C160&amp;os=2%2C4&amp;shape=box&amp;points=all&amp;median=lines&amp;hide=Percona-Server+9.7.1-1+%7C+32G+%7C+TP+10+os2%2CPercona-Server+9.7.1-1+%7C+32G+%7C+TP+10+os4%2CPercona-Server+9.7.1-1+%7C+32G+%7C+TP+160+os2%2Cmysql+26.7.0+%7C+32G+%7C+TP+10+os2%2Cmysql+26.7.0+%7C+32G+%7C+TP+160+os2%2Cmysql+26.7.0+%7C+32G+%7C+TP+160+os4" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=table&amp;metric=tps&amp;server=Percona-Server+9.7.1-1%2Cmysql+26.7.0&amp;mem=32&amp;tp=off%2C10%2C160&amp;os=2%2C4&amp;shape=box&amp;points=all&amp;median=lines&amp;hide=Percona-Server+9.7.1-1+%7C+32G+%7C+TP+10+os2%2CPercona-Server+9.7.1-1+%7C+32G+%7C+TP+10+os4%2CPercona-Server+9.7.1-1+%7C+32G+%7C+TP+160+os2%2Cmysql+26.7.0+%7C+32G+%7C+TP+10+os2%2Cmysql+26.7.0+%7C+32G+%7C+TP+160+os2%2Cmysql+26.7.0+%7C+32G+%7C+TP+160+os4" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]</span></span><img decoding="async" loading="lazy" class="alignnone size-full wp-image-54411" src="https://www.percona.com/wp-content/uploads/2026/10/107.png" alt="Graph 7 - Percona Server and MySQL with 32G buffer" width="1235" height="780"></p>
<p><span>In the tier of fully buffered data (<b>innodb_buffer_pool_size=32G</b>) both servers performance was close, but MySQL Server was slightly faster. When it comes to the thread pool, MySQL is a clear winner with 19,054 TPS against 15,519 TPS from Percona Server (22% difference).</span></p>
<p><span>With regard to p95 the Percona Server showed slightly better (lower) latency than MySQL server in 2G and 12G buffer tiers. However, with 32G the MySQL Server is ahead of Percona Server:</span></p>
<p><span> <b>Graph 8 – p95 latency in Percona Server and MySQL with 32G buffer </b> [ <a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=graph&amp;metric=lat95&amp;server=Percona-Server+9.7.1-1%2Cmysql+26.7.0&amp;mem=32&amp;tp=off%2C40&amp;os=2&amp;shape=box&amp;points=all&amp;median=lines" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=table&amp;metric=lat95&amp;server=Percona-Server+9.7.1-1%2Cmysql+26.7.0&amp;mem=32&amp;tp=off%2C40&amp;os=2&amp;shape=box&amp;points=all&amp;median=lines" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]<br />
<img decoding="async" loading="lazy" class="alignnone size-full wp-image-54412" src="https://www.percona.com/wp-content/uploads/2026/10/108.png" alt="Graph 8 - p95 latency in Percona Server and MySQL with 32G buffer" width="1235" height="780"><br />
</span></span></p>
<p><span>With disabled thread pool the latencies for both Percona Server and MySQL land close to each other with MySQL being slightly better (shorter).</span></p>
<p><span>When thread pool is enabled the p95 latency in MySQL is notably better (by ~25%) with 177ms against 235ms in Percona server.</span></p>
<h2><span>Conclusion</span></h2>
<p><span>Despite sharing the base server code, the thread pool implementations in Percona Server for MySQL and MySQL are very different. When the data set is too big to be fully buffered the Percona Server thread pool shows better performance compared to MySQL Server. However, MySQL Server and its thread pool wins with the configurations when data is fully buffered. Also, in the fully buffered scenario the p95 latency in MySQL Server is slightly shorter than in Percona Server.</span></p>
<p><span>Another important observation is that the thread pool inside Percona Server for MySQL is very sensitive to the number of thread groups (<b>thread_pool_size</b>) and the number of active threads in the same group (<b>thread_pool_oversubscribe</b>). These options had the biggest impact on the performance and setting optimal values is important to reach the full potential of the thread pool.</span></p>
<p><span>With MySQL Server change of these parameters has less dramatic effect. Also, the noticeable benefit of thread pooling in case of MySQL is visible only on high connection numbers such as 1280/2560 while Percona Server implementation does it much earlier with 80+ connections.</span></p>
<p>The post <a href="https://www.percona.com/blog/thread-pool-in-percona-server-and-mysql-part-2/">Thread Pool in Percona Server and MySQL (Part 2)</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/thread-pool-in-percona-server-and-mysql-part-2/">Thread Pool in Percona Server and MySQL (Part 2)</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>FOSS 2026 conference in Chernihiv: how it went</title>
        <link>https://percona.community/blog/2026/10/12/foss-2026-conference-in-chernihiv-how-it-went/</link>
        <pubDate>Mon, 12 Oct 2026 10:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/foss-2026-conference-in-chernihiv-how-it-went/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>On October 1-2, Chernihiv Polytechnic National University held the II International scientific and practical conference “Free/Open Source Software in Education, Science &#38; Business”. The conference was online and free for everyone. The idea is to bring together people from universities, from industry and from open source communities and talk about how free software is used in education, science and business.</p>
<p><a href="https://percona.community/blog/2026/10/12/foss-2026-conference-in-chernihiv-how-it-went/">FOSS 2026 conference in Chernihiv: how it went</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>On October 1-2, Chernihiv Polytechnic National University held the II International scientific and practical conference <a href="https://percona.community/events/2026-feit-stu-foss/">“Free/Open Source Software in Education, Science &amp; Business”</a>. The conference was online and free for everyone. The idea is to bring together people from universities, from industry and from open source communities and talk about how free software is used in education, science and business.</p>
<p>This year Percona was well represented. There were six speakers from Percona, and two more keynote speakers also worked at Percona in the past.</p>
<h2>Day 1: keynotes</h2>
<p>The first day started with welcome words from Volodymyr Bazylevych, Chair of the Organizing Committee, and Anatolii Prystupa, Vice-Rector for Research. After that there were five keynote talks.</p>
<p><strong>Yevhen Patlan (Percona)</strong> spoke about embedding DuckDB into MySQL. MySQL works very well for transactions, but analytical queries over hundreds of millions of rows can take a long time on InnoDB. Usually people solve this by copying data to a separate column store, so they need to support two systems and a pipeline between them. Yevhen showed another way: run DuckDB inside MySQL. He talked about Percona’s experimental DuckDB engine for MySQL 9.7: how query pushdown works, how results stay the same as in InnoDB, and the TPC-H results on 500 GB. He also told about a two-phase commit bug that made a replica lose data without any error.</p>
<p><strong>Frédéric Descamps (MariaDB Foundation)</strong>, known in the community as “lefred”, worked many years at Percona and then in the MySQL Community Team. This year he joined the MariaDB Foundation. In his talk he showed MariaDB Server features that people often don’t know about: system-versioned tables, flashback, sequences, invisible columns and others. For every feature he explained which real problem it solves.</p>
<p><strong>Sergii Shchaslyvyi (AWS)</strong> talked about virtualization. After the licensing changes, many companies started to look for alternatives to their current virtualization platform. Sergii explained what migration options exist and where open source technologies make sense.</p>
<p><strong>Oleksiy Lukin (Percona)</strong> is not a new person for this conference. He worked at Chernihiv Polytechnic for more than 20 years and has been one of the organizers since 2009. Oleksiy presented kmipclient and kmipcore, an open source C++ library for KMIP (Key Management Interoperability Protocol). It supports KMIP 1.4 and 2.0, it is tested with five different KMIP servers, and Percona Server for MySQL already uses it.</p>
<p><strong>Vinicius Grippa (Readyset, Oracle ACE Director)</strong> finished the first day. Before Readyset he worked at Percona for eight years. He presented myflames, an open source tool that builds flame graphs, treemaps and Visual Explain style diagrams from MySQL execution plans. With these pictures it is much easier to understand where a query spends time.</p>
<h2>Day 2: track talks</h2>
<p>On the second day there were 13 talks from researchers, teachers and students. A team from Chernihiv Polytechnic presented a browser-based simulator for STM32 firmware and electrical circuits. Other talks were about microgrid optimization with CVXPY, local AI on x86 NPUs, digital education in crisis conditions, cyber hygiene for students and teaching steganography with free software.</p>
<p>Four more Percona engineers spoke on this day:</p>
<ul>
<li><strong>Adnan Šupić</strong> &#8211; zero-downtime migration with Percona ClusterSync for MongoDB</li>
<li><strong>Puneet Kala</strong> &#8211; a practical open source stack for running MongoDB</li>
<li><strong>Fabio Silva</strong> &#8211; how PMM hosts another application inside an iframe</li>
<li><strong>Briana Swift</strong> &#8211; how to manage public messaging for seven database technologies without a PMO, using a public GitHub repository and treating text like code</li>
</ul>
<h2>Some numbers</h2>
<ul>
<li>82 registered participants</li>
<li>51 submitted theses</li>
<li>18 talks</li>
<li>more than 90 people online</li>
<li>participants from Ukraine, Belgium, Brazil, The Gambia, India and other countries</li>
</ul>
<p>Big thanks to the computer engineering students of Chernihiv Polytechnic. They were active during both days and asked speakers a lot of good questions.</p>
<h2>Thanks to our partners</h2>
<p>The conference would not be possible without our partners:</p>
<ul>
<li><strong>Chernihiv Polytechnic National University</strong> &#8211; for hosting and organizing the conference.</li>
<li><strong>WIN-WIN EDIH</strong> &#8211; the conference was held as part of this project, co-funded by the European Union.</li>
<li><strong>Percona</strong> &#8211; for the support and for six speakers.</li>
<li><strong>MariaDB Foundation</strong> &#8211; for the support and the keynote about MariaDB Server.</li>
<li><strong>Amazon Web Services (AWS)</strong> &#8211; for the support and the keynote about migration from proprietary virtualization.</li>
<li><strong>Readyset</strong> &#8211; for the support and the keynote about myflames.</li>
<li><strong>OurSQL Foundation</strong> &#8211; for the support of the conference.</li>
<li><strong>PortaOne</strong> &#8211; for the support of the conference.</li>
<li><strong>Chernihiv IT Cluster (Chernihiv.IT)</strong> &#8211; for helping to connect the university with the local IT community.</li>
</ul>
<p>Thanks to you, the conference stays free, and Ukrainian students and researchers can listen to and talk with people from the international open source community.</p>
<h2>Recordings and materials</h2>
<ul>
<li>Keynote recordings on YouTube: <a href="https://www.youtube.com/@foss-che" target="_blank" rel="noopener noreferrer">https://www.youtube.com/@foss-che</a></li>
<li>Program and slides: <a href="https://feit.stu.cn.ua/foss/" target="_blank" rel="noopener noreferrer">https://feit.stu.cn.ua/foss/</a></li>
<li>Conference proceedings will be published at the end of October.</li>
</ul>
<p>Thanks to all speakers, authors and participants. See you at FOSS 2027!</p>
<p><a href="https://percona.community/blog/2026/10/12/foss-2026-conference-in-chernihiv-how-it-went/">FOSS 2026 conference in Chernihiv: how it went</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Meet MySQL 26.7: A New Versioning Era Begins</title>
        <link>https://www.percona.com/blog/meet-mysql-26-7-a-new-versioning-era-begins/</link>
        <pubDate>Mon, 12 Oct 2026 04:05:49 +0000</pubDate>
        <dc:creator>Anil Joshi</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/meet-mysql-26-7-a-new-versioning-era-begins/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Over the period, we have witnessed how MySQL versioning evolved from 8.0 to 9.7 LTS, and now it has entered a new era: a calendar-based model. Let’s first take a brief look at how MySQL versioning has evolved over time. Phase 1 – MySQL 8.0 (2018–2026) used a traditional single-track release model, with all new … Continued<br />
The post Meet MySQL 26.7: A New Versioning Era Begins appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/meet-mysql-26-7-a-new-versioning-era-begins/">Meet MySQL 26.7: A New Versioning Era Begins</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><span>Over the period, we have witnessed how MySQL versioning evolved from 8.0 to 9.7 LTS, and now it has entered a new era: </span><b>a calendar-based model</b><span>.</span></p>
<p><span>Let’s first take a brief look at how MySQL versioning has evolved over time.</span></p>
<ul>
<li><b>Phase 1</b><span><span> – MySQL 8.0 (2018–2026) used a traditional single-track release model, with all new features and bug fixes rolled into the same 8.0 release line.</span></span></li>
<li><b>Phase 2</b><span> – Oracle launches an Innovative/LTS dual-track model (Mid 2023). </span><b>Innovation releases</b><span> focus on new features and changes to short-lived performance on a quarterly basis. The </span><b>LTS (Long Term Stable) release</b><span> is steadier and has a long lifespan, with a cycle of </span><b>5 years of Premier Support + 3 years of Extended Support</b><span>, and it typically launches every </span><b>2 years</b><span><span><span>.</span></span></span></li>
<li><b>Phase 3</b><span> – There are chains of Innovation releases following (</span><b>8.1</b><span>, </span><b>8.2</b><span>, </span><b>8.3</b><span>) between (2023- 2024), leading to the </span><b>first LTS (8.4)</b><span><span><span> in April 2024.</span></span></span></li>
<li><b>Phase 4 </b><span>– There was a shift in the Innovative versioning numbering, and we moved in the next </span><b>9.7 series</b><span>. </span><b>v9.0</b><span> to </span><b>v9.6</b><span> are part of the Innovative release model (2024-26). We got our </span><b>second LTS (9.7)</b><span> in April 2026, with a </span><b>5-year Premier Support cycle </b>followed by <b>3 years of Extended Support</b><span>.</span></li>
</ul>
<p><span>After going through all those phases, we have finally reached a major shift in the overall versioning model. Instead of the next </span><b>Innovation release </b>to<b> v9.8</b><span>, Oracle switched to calendar versioning mode (</span><b>Year</b><span>.</span><b>Month</b><span>.</span><b>Patch</b><span>). So, the new Innovative release shipped as </span><b>v26.7.0 </b><span>instead</span> <span>of</span><b> v9.8.</b></p>
<h3><span>Now, let’s discuss the new versioning model a bit.</span></h3>
<p><span>The new versioning model is denoted as </span><b>Year.Month.Patch</b><span>, or </span><b>YY.M.P.</b></p>
<ul>
<li><span>26 represents </span><b>2026(Year)</b><span>.</span></li>
<li><span>7 represents </span><b>July (Month)</b><span>.</span></li>
<li><span>0 is the </span><b>PATCH Number</b><span>.</span></li>
</ul>
<p><span>The same quarterly cycle is followed for each subsequent Innovative release; the only difference is that it now uses the calendar versioning model. For example,  the next innovation release would tentatively be </span><b>v26.10.0</b><span>, scheduled for launch in </span><b>October 2026</b><span>.</span></p>
<p><span>The LTS release can also be considered roughly every 2 years </span><span>under the new versioning model. The next LTS release in the new scheme is expected in </span><b>April 2028</b><span> as </span><b>28.4.0</b><span>.</span></p>
<h3><span>Why choose the new Versioning Model?</span></h3>
<p><span>The real advantage we see is that with the format (</span><b>Year</b><span>.</span><b>Month</b><span>.</span><b>Patch</b><span>), we can better assess when releases/packages were shipped and how they relate to overall release planning (Innovative/LTS, etc.). This was a problem with the previous versioning model, say 8.4/9.7, as we don’t get much clue or information.</span></p>
<p><span>This has no impact on the existing LTS (8.4/9.7); they will get the usual quarterly maintenance updates (bug fixes and security patches) while all Innovation or new features are offered under the new Calendar series.</span></p>
<h3><span>How does the upgrade cycle work?</span></h3>
<ul>
<li><b>MySQL 9.7.x LTS </b><span>is the sole entry point into the first </span><b>calendar-versioned lineage 26.7.0</b><span>, so we must first upgrade to 9.7 LTS if we need to go with a calendar version upgrade to 26.7.0. </span></li>
<li><b>8.4.x LTS or any previous version </b><span>won’t simply work when considering upgrading to a new lineage.</span></li>
<li><span>Singe hope upgrade from</span><b> v9.7.x LTS</b><span> to </span><b>26.7.0 </b><span>or any later release in that same lineage (e.g., 26.10.0, 27.1.0, 27.4.0) is still valid until the next LTS, v28.4.0.</span></li>
</ul>
<p>E.g,</p>
<pre class="urvanov-syntax-highlighter-plain-tag">8.4.x LTS -&gt; 9.7.x LTS -&gt; 26.7.0</pre>
<p><span>So if someone is still using an EOL version like 5.7, 8.0 has to follow the above path and upgrade to 8.4 LTS first.</span></p>
<h3><span>What features and enhancements does v26.7 bring to the table?</span></h3>
<h5><span>1) Change Stream Applier for Multi-Threaded Replication</span></h5>
<p><span>The new </span><b>change stream applier (CSA)</b><span> introduces further improvements to parallel transaction scheduling and execution. The original model, </span><b>Multi-threaded Applier (MTA)</b><span>, basically uses a </span><b>coordinator</b><span> to read transactions sequentially from the relay files and then hand them off to </span><b>worker threads </b><span>for parallel applying and execution</span><b>. </b><span>This can be a limitation, especially when a worker thread is waiting/sitting Idle for a commit due to any prior or dependency transaction.</span></p>
<p><b>Change stream applier (CSA)</b><span>  basically separates the transaction applying from commit ordering. For example, if a worker finishes applying a transaction but has to wait for the commit order, it can </span><b>work on another dependency-ready transaction instead</b><span>. </span></p>
<p><span>The replication configurations below are introduced by CSR adoption. Please note that it works for each channel separately.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">APPLIER_VERSION  -  “1” denotes for MTA and “2“ denotes for CSA
APPLIER_WORKER_COUNT - different worker count based on each replication channel 
APPLIER_EVENT_MEMORY_LIMIT - Per-channel memory limits for cached binlog events</pre>
</p>
<h4><span>CSA has some more added advantages:</span></h4>
<ul>
<li><b>CSA workers</b><span> can </span><b>simultaneously read transaction </b><span>events from the relay log and release event memory when events are consumed.</span></li>
<li><b>Relay log files</b><span> can also be marked for </span><b>concurrent</b> <b>purging</b><span> once all transactions have been applied successfully and there is nothing left to read from the relay files.</span></li>
</ul>
<h4><span>How to apply the change stream applier?</span></h4>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; STOP REPLICA FOR CHANNEL 'mysql1';</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; CHANGE REPLICATION SOURCE TO
APPLIER_VERSION = 2,
APPLIER_WORKER_COUNT = 8,
APPLIER_EVENT_MEMORY_LIMIT = 1073741824,
REQUIRE_ROW_FORMAT = 1,
GTID_ONLY = 1
FOR CHANNEL 'mysql1';</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; START REPLICA FOR CHANNEL 'mysql1';</pre>
</p>
<h4><span>Requirements to use CSA</span></h4>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">Row-Based replication (binlog_format=ROW)
GTID enforcement (gtid_mode=ON)</pre>
</p>
<h5><span>2) Thread Pool Plugin</span></h5>
<p><span>The good news is that the Thread Pool Plugin is now available in MySQL Community releases, removing the previous dependency on the Enterprise Edition to use the Thread Pool mechanism.</span></p>
<p><span>MySQL traditionally uses a </span><b>one-thread-per-connection</b><span> model, where each client connection creates a dedicated server thread. This approach can become a problem when an application establishes a very large number of concurrent connections, especially when many of those connections are Idle/Sleep(waiting for work).</span></p>
<p><span>The </span><b>Thread Pool</b><span> addresses this by managing a high volume of client connections through a</span><b> smaller number of worker threads</b><span>. So, instead of creating a new thread for each connection, the Thread Pool uses the connections from the existing pool of threads and schedules their work across a controlled number of worker threads.</span></p>
<p><span>This could be useful in an environment where applications trigger a very high number of concurrent database connections, and simply increasing </span><b>max_connections</b><span> is not an option, as it would lead to excessive thread creation and resource consumption during database setup.</span></p>
<h4><span>How to enable the Thread Pool?</span></h4>
<ul>
<li><span>Load thread pool plugin</span></li>
</ul>
<pre class="urvanov-syntax-highlighter-plain-tag">[mysqld]
plugin-load-add=thread_pool.so</pre>
</p>
<ul>
<li><span>Restart the database service</span></li>
</ul>
<pre class="urvanov-syntax-highlighter-plain-tag">bash&gt; Systemctl restart mysql</pre>
</p>
<ul>
<li><span>Verify plugin active</span></li>
</ul>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql &gt;  SELECT PLUGIN_NAME, PLUGIN_STATUS
    -&gt;        FROM INFORMATION_SCHEMA.PLUGINS
    -&gt;        WHERE PLUGIN_NAME LIKE 'thread%';
+-------------+---------------+
| PLUGIN_NAME | PLUGIN_STATUS |
+-------------+---------------+
| thread_pool | ACTIVE        |
+-------------+---------------+
1 row in set (0.004 sec)</pre>
<p> </p>
<h4><span>Thread Pool configuration/Monitoring</span></h4>
<p><span>The thread pool size and other related parameters can be listed and configured as needed.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; show variables like 'thread_pool%';
+----------------------------------------+-------+
| Variable_name                          | Value |
+----------------------------------------+-------+
| thread_pool_algorithm                  | 1     |
| thread_pool_connection_report_interval | 120   |
| thread_pool_dedicated_listeners        | OFF   |
| thread_pool_high_priority_connection   | 0     |
| thread_pool_longrun_trx_limit          | 2000  |
| thread_pool_max_active_query_threads   | 0     |
| thread_pool_max_transactions_limit     | 192   |
| thread_pool_max_unused_threads         | 32    |
| thread_pool_prio_kickup_timer          | 1000  |
| thread_pool_query_threads_per_group    | 2     |
| thread_pool_size                       | 6     |
| thread_pool_stall_limit                | 6     |
| thread_pool_transaction_delay          | 0     |
+----------------------------------------+-------+
13 rows in set (0.003 sec)</pre>
<p><b>Performance_schema</b><span> provided a few tables to monitor thread pool activity, along with the status variables.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql &gt; show tables like 'tp%';
+------------------------------------+
| Tables_in_performance_schema (tp%) |
+------------------------------------+
| tp_connections                     |
| tp_thread_group_state              |
| tp_thread_group_stats              |
| tp_thread_state                    |
+------------------------------------+
4 rows in set (0.001 sec)</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt;  show status like 'thread_pool_%';
+---------------------------+-------+
| Variable_name             | Value |
+---------------------------+-------+
| Thread_pool_query_threads | 14    |
+---------------------------+-------+
1 row in set (0.001 sec)</pre>
</p>
<h5><span>3) Undo Log Truncation Improvement</span></h5>
<p><span>MySQL 26.7 improves the robustness of InnoDB undo tablespace truncation. Previously, InnoDB used a separate </span><b>undo_{space_number}_trunc.log</b><span> file to keep track of an undo tablespace truncation operation. This external file was used to determine whether a truncation operation was in progress, particularly during recovery.</span></p>
<p><span>Now this approach has changed: instead of maintaining a separate truncate log file, the truncation state is captured directly in the </span><a href="https://dev.mysql.com/doc/relnotes/mysql/26.7/en/news-26-7-0.html"><span>undo tablespace header</span></a><span>.</span></p>
<p><span>This improves both undo truncation and recovery as it does not rely on a separate dedicated file.</span></p>
<h5><span>4)  InnoDB recovery and metadata infrastructure Improvement</span></h5>
<p><span>There were some internal changes, or rather improvements, to the structure and efficiency of the core InnoDB recovery, metadata, redo-log, tablespace, and transaction-visibility code paths.</span></p>
<p><span>This doesn’t bring any changes to the usage point of view.  The goal is to make these components easier to maintain, test, and extend without changing user-visible SQL semantics.</span></p>
<h5><span>5) Group Replication default communication stack</span></h5>
<p><span>The </span><b>group_replication_communication_stack</b><span> now defaults to “</span><b>MySQL</b><span>” from “</span><b>XCOM</b><span>”. This change is more aligned with the MySQL Server authentication and connection security. </span></p>
<p><span>This also means no separate communication port needs to be specified for group replication variables (</span><b>group_replication_local_address</b><span> and </span><b>group_replication_group_seeds</b><span>). The native MySQL port (3306)/ MEMBER_PORT or whatever is defined for MySQL nodes can be used instead. </span></p>
<p><span>In short, the default MySQL communication stack provides the benefits below. </span></p>
<ul>
<li><span>Overall, it simplifies the creation of InnoDB Clusters by using MySQL Server’s connection security in place of the Group Replication implementation.</span></li>
<li><span>It removes the need for an extra network address or port for internal Group Replication communications.</span></li>
<li><span>Using the MySQL protocol means that standard user authentication methods can be used to grant or revoke access to the group, in place of the allow list.</span></li>
<li><span>Supports network namespaces for Group Replication.</span></li>
</ul>
<p><b>Note</b><span> – If migrating from the old environment or switching from “XCOM” to “MySQL” simply switching the communication stack wouldn’t work.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; set global group_replication_communication_stack = 'MySQL';</pre>
<p><span>Group replication must be stopped on all members, and then the </span><a href="https://dev.mysql.com/doc/refman/8.4/en/group-replication-connection-security.html"><span>relevant changes </span></a><span>should be applied. Finally, the cluster needs to be bootstrapped. </span></p>
<p><span>Basically, this activity requires </span><a href="https://dev.mysql.com/doc/refman/26.7/en/group-replication-system-variables.html#sysvar_group_replication_communication_stack"><span>downtime</span></a><span> to successfully switch the communication stack.</span></p>
<p><span>Also, the XCom communication stack is deprecated and could be removed in future releases, so better to switch to the MySQL stack. Further complete release notes can be checked here – </span><a href="https://dev.mysql.com/doc/relnotes/mysql/26.7/en/news-26-7-0.html"><span>https://dev.mysql.com/doc/relnotes/mysql/26.7/en/news-26-7-0.html</span></a></p>
<h2><span>Conclusion</span></h2>
<p><span>The transition to MySQL 26.7 introduces a major shift to a </span><b>calendar-based versioning scheme </b><span>(</span><b>Year</b><span>.</span><b>Month</b><span>.</span><b>Patch</b><span>), providing clearer alignment with release timelines and future planning across both Innovation releases and long-term support cycles. Upgrading to this new series requires being on MySQL 9.7 LTS as the primary baseline before moving forward into the 26.x series.</span></p>
<p><span>Alongside versioning improvements, MySQL 26.7 delivers significant architecture and usability enhancements. Key features include the </span><a href="https://dev.mysql.com/doc/refman/26.7/en/change-stream-applier.html"><b>Change Stream Applier (CSA)</b></a><span> for optimised parallel transaction execution and replication performance, as well as the </span><a href="https://dev.mysql.com/doc/refman/26.7/en/thread-pool-installation.html"><b>native availability of the Thread Pool Plugin in Community editions</b></a><span> to manage high-concurrency connections effectively without relying on Enterprise Edition extras.</span></p>
<p>The post <a href="https://www.percona.com/blog/meet-mysql-26-7-a-new-versioning-era-begins/">Meet MySQL 26.7: A New Versioning Era Begins</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/meet-mysql-26-7-a-new-versioning-era-begins/">Meet MySQL 26.7: A New Versioning Era Begins</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Docker DBA Lab</title>
        <link>https://percona.community/blog/2026/10/12/docker-dba-lab/</link>
        <pubDate>Mon, 12 Oct 2026 00:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/docker-dba-lab/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>Building a Database DBA Lab with Docker, PostgreSQL, MySQL, and Percona Monitoring and Management How I built a local database playground, learned a few lessons the hard way, and created a practical command reference along the way.</p>
<p><a href="https://percona.community/blog/2026/10/12/docker-dba-lab/">Docker DBA Lab</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<h1>Building a Database DBA Lab with Docker, PostgreSQL, MySQL, and Percona Monitoring and Management</h1>
<p><em>How I built a local database playground, learned a few lessons the hard way, and created a practical command reference along the way.</em></p>
<h2>Introduction</h2>
<p>One of the best ways to learn database administration is to get your hands dirty.</p>
<p>Documentation is important, but there’s something different about building your own environment, breaking it, troubleshooting it, and eventually understanding why everything works.</p>
<p>Recently, I decided to create a local database lab using Docker Desktop on my Mac. My goal was straightforward: build an environment where I could experiment with MySQL, PostgreSQL, Percona XtraDB Cluster (PXC), and Percona Monitoring and Management (PMM), without worrying about disrupting a production environment.</p>
<p>What started as a few containers quickly became a much more interesting learning experience.</p>
<p>Along the way, I ran into Docker networking problems, container persistence challenges, cluster bootstrap issues, and PostgreSQL monitoring configuration. This article shows the setup I recommend after working through those problems, so you can start with the right foundation instead of discovering it at the end.</p>
<h2>1. Building the Lab</h2>
<p>The foundation of my environment is Docker Desktop.</p>
<p>The lab includes:</p>
<ul>
<li>Percona Server for MySQL 8.4</li>
<li>A three-node Percona XtraDB Cluster</li>
<li>PostgreSQL 17</li>
<li>PMM Server and PMM Client</li>
<li>Persistent Docker volumes</li>
<li>A shared Docker network</li>
</ul>
<p>The architecture looks like this:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Docker Desktop
</span></span><span class="line"><span class="cl">│
</span></span><span class="line"><span class="cl">├── pmm-network
</span></span><span class="line"><span class="cl">│ ├── pmm-server
</span></span><span class="line"><span class="cl">│ ├── pmm-client
</span></span><span class="line"><span class="cl">│ ├── percona-server
</span></span><span class="line"><span class="cl">│ ├── postgres-server
</span></span><span class="line"><span class="cl">│ ├── pxc1
</span></span><span class="line"><span class="cl">│ ├── pxc2
</span></span><span class="line"><span class="cl">│ └── pxc3
</span></span><span class="line"><span class="cl">│
</span></span><span class="line"><span class="cl">└── Persistent Docker Volumes
</span></span><span class="line"><span class="cl"> ├── pmm-data
</span></span><span class="line"><span class="cl"> ├── pmm-client-data
</span></span><span class="line"><span class="cl"> ├── mysql-data
</span></span><span class="line"><span class="cl"> ├── postgres-data
</span></span><span class="line"><span class="cl"> ├── pxc1_data
</span></span><span class="line"><span class="cl"> ├── pxc2_data
</span></span><span class="line"><span class="cl"> └── pxc3_data</span></span></code></pre>
</div>
</div>
</div>
<p>There are two ways to build this.</p>
<h3>Option A (recommended): Docker Compose</h3>
<p>Docker Compose lets you define every container, volume, and network attachment in one file. The whole lab becomes reproducible: one command brings it up, one command shuts it down, and nothing depends on remembering which <code>docker run</code> flags you used weeks ago.</p>
<p>I started out with individual <code>docker run</code> commands and later moved everything to Compose. If I were starting again, I would begin here.</p>
<p>First, keep passwords out of the Compose file by putting them in a <code>.env</code> file next to it (and out of version control):</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># .env</span>
</span></span><span class="line"><span class="cl"><span class="nv">MYSQL_ROOT_PASSWORD</span><span class="o">=</span>change-me
</span></span><span class="line"><span class="cl"><span class="nv">PXC_ROOT_PASSWORD</span><span class="o">=</span>change-me
</span></span><span class="line"><span class="cl"><span class="nv">POSTGRES_PASSWORD</span><span class="o">=</span>change-me
</span></span><span class="line"><span class="cl"><span class="nv">PMM_ADMIN_PASSWORD</span><span class="o">=</span>change-me
</span></span><span class="line"><span class="cl"><span class="nv">PG_MONITOR_PASSWORD</span><span class="o">=</span>change-me
</span></span><span class="line"><span class="cl"><span class="nv">MYSQL_MONITOR_PASSWORD</span><span class="o">=</span>change-me</span></span></code></pre>
</div>
</div>
</div>
<p>Then define the lab in <code>docker-compose.yml</code>:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">yaml</span><button class="code-block__copy" type="button" data-copy-target="codeblock-2" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">services</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">pmm-server</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l">percona/pmm-server:3.9.1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">platform</span><span class="p">:</span><span class="w"> </span><span class="l">linux/amd64</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">container_name</span><span class="p">:</span><span class="w"> </span><span class="l">pmm-server</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">ports</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="s2">"443:8443"</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">volumes</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">pmm-data:/srv</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">networks</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="l">pmm-network]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">pmm-client</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l">percona/pmm-client:3.9.1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">container_name</span><span class="p">:</span><span class="w"> </span><span class="l">pmm-client</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">depends_on</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="l">pmm-server]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">environment</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">PMM_AGENT_SERVER_ADDRESS</span><span class="p">:</span><span class="w"> </span><span class="l">pmm-server:8443</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">PMM_AGENT_SERVER_USERNAME</span><span class="p">:</span><span class="w"> </span><span class="l">admin</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">PMM_AGENT_SERVER_PASSWORD</span><span class="p">:</span><span class="w"> </span><span class="l">${PMM_ADMIN_PASSWORD}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">PMM_AGENT_SERVER_INSECURE_TLS</span><span class="p">:</span><span class="w"> </span><span class="m">1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">PMM_AGENT_SETUP</span><span class="p">:</span><span class="w"> </span><span class="m">1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">PMM_AGENT_CONFIG_FILE</span><span class="p">:</span><span class="w"> </span><span class="l">config/pmm-agent.yaml</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">volumes</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">pmm-client-data:/usr/local/percona/pmm/config</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">networks</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="l">pmm-network]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">percona-server</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l">percona/percona-server:8.4.11</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">container_name</span><span class="p">:</span><span class="w"> </span><span class="l">percona-server</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">environment</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">MYSQL_ROOT_PASSWORD</span><span class="p">:</span><span class="w"> </span><span class="l">${MYSQL_ROOT_PASSWORD}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">ports</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="s2">"3306:3306"</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">volumes</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">mysql-data:/var/lib/mysql</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">networks</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="l">pmm-network]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">postgres-server</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l">postgres:17</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">container_name</span><span class="p">:</span><span class="w"> </span><span class="l">postgres-server</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">environment</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">POSTGRES_PASSWORD</span><span class="p">:</span><span class="w"> </span><span class="l">${POSTGRES_PASSWORD}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">command</span><span class="p">:</span><span class="w"> </span><span class="p">&gt;</span><span class="sd">
</span></span></span><span class="line"><span class="cl"><span class="sd"> postgres
</span></span></span><span class="line"><span class="cl"><span class="sd"> -c shared_preload_libraries=pg_stat_statements
</span></span></span><span class="line"><span class="cl"><span class="sd"> -c track_io_timing=on</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">ports</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="s2">"5432:5432"</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">volumes</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">postgres-data:/var/lib/postgresql/data</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">networks</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="l">pmm-network]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">pxc1</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l">percona/percona-xtradb-cluster:8.4.11</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">container_name</span><span class="p">:</span><span class="w"> </span><span class="l">pxc1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">environment</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">CLUSTER_NAME</span><span class="p">:</span><span class="w"> </span><span class="l">pxc-lab</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">MYSQL_ROOT_PASSWORD</span><span class="p">:</span><span class="w"> </span><span class="l">${PXC_ROOT_PASSWORD}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">volumes</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">pxc1_data:/var/lib/mysql</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">./certs:/etc/mysql/certs:ro</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">./conf.d:/etc/percona-xtradb-cluster.conf.d:ro</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">stop_grace_period</span><span class="p">:</span><span class="w"> </span><span class="l">120s</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">healthcheck</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">test</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"CMD"</span><span class="p">,</span><span class="w"> </span><span class="s2">"mysqladmin"</span><span class="p">,</span><span class="w"> </span><span class="s2">"ping"</span><span class="p">,</span><span class="w"> </span><span class="s2">"-uroot"</span><span class="p">,</span><span class="w"> </span><span class="s2">"-p${PXC_ROOT_PASSWORD}"</span><span class="p">]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">interval</span><span class="p">:</span><span class="w"> </span><span class="l">10s</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">retries</span><span class="p">:</span><span class="w"> </span><span class="m">30</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">networks</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="l">pmm-network]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">ports</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="s2">"3307:3306"</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">pxc2</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l">percona/percona-xtradb-cluster:8.4.11</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">container_name</span><span class="p">:</span><span class="w"> </span><span class="l">pxc2</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">environment</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">CLUSTER_NAME</span><span class="p">:</span><span class="w"> </span><span class="l">pxc-lab</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">CLUSTER_JOIN</span><span class="p">:</span><span class="w"> </span><span class="l">pxc1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">MYSQL_ROOT_PASSWORD</span><span class="p">:</span><span class="w"> </span><span class="l">${PXC_ROOT_PASSWORD}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">volumes</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">pxc2_data:/var/lib/mysql</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">./certs:/etc/mysql/certs:ro</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">./conf.d:/etc/percona-xtradb-cluster.conf.d:ro</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">stop_grace_period</span><span class="p">:</span><span class="w"> </span><span class="l">120s</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">depends_on</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">pxc1</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">condition</span><span class="p">:</span><span class="w"> </span><span class="l">service_healthy</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">networks</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="l">pmm-network]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">ports</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="s2">"3308:3306"</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">pxc3</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l">percona/percona-xtradb-cluster:8.4.11</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">container_name</span><span class="p">:</span><span class="w"> </span><span class="l">pxc3</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">environment</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">CLUSTER_NAME</span><span class="p">:</span><span class="w"> </span><span class="l">pxc-lab</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">CLUSTER_JOIN</span><span class="p">:</span><span class="w"> </span><span class="l">pxc1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">MYSQL_ROOT_PASSWORD</span><span class="p">:</span><span class="w"> </span><span class="l">${PXC_ROOT_PASSWORD}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">volumes</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">pxc3_data:/var/lib/mysql</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">./certs:/etc/mysql/certs:ro</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">./conf.d:/etc/percona-xtradb-cluster.conf.d:ro</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">stop_grace_period</span><span class="p">:</span><span class="w"> </span><span class="l">120s</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">depends_on</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">pxc2</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">networks</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="l">pmm-network]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">ports</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="s2">"3309:3306"</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">networks</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">pmm-network</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">pmm-network</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">volumes</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">pmm-data</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">pmm-client-data</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">mysql-data</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">postgres-data</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">pxc1_data</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">pxc2_data</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="l">pxc3_data:</span></span></span></code></pre>
</div>
</div>
</div>
<p>A few design choices are worth calling out, because each one comes from a problem I hit:</p>
<ul>
<li><strong>Volumes and the network are declared up front.</strong> Every database has persistent storage and is attached to <code>pmm-network</code> from the moment it is created, so there is nothing to wire up afterward.</li>
<li><strong>All PXC nodes share the same SSL certificates.</strong> Mismatched certificates were behind several of my early cluster join failures.</li>
<li><strong><code>stop_grace_period: 120s</code></strong> gives each PXC node time to shut down cleanly instead of being killed (exit code 137).</li>
<li><strong><code>depends_on</code> defines the PXC order.</strong> Compose starts <code>pxc1</code> first and waits for it to be healthy before the others join. On shutdown, Compose stops dependents first, so the nodes leave in the order <code>pxc3</code>, <code>pxc2</code>, <code>pxc1</code>.</li>
</ul>
<p>Bring the lab up and down with:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-3" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">docker compose up -d
</span></span><span class="line"><span class="cl">docker compose stop <span class="c1"># stops containers, keeps everything</span>
</span></span><span class="line"><span class="cl">docker compose down <span class="c1"># removes containers, keeps named volumes</span></span></span></code></pre>
</div>
</div>
</div>
<h3>Option B (alternative): Individual <code>docker run</code> commands</h3>
<p>If you prefer to build containers one at a time, or want to understand what Compose is doing for you, you can create the network yourself and attach containers to it:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-4" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">docker network create pmm-network
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">docker run -d --name postgres-server <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --network pmm-network <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> -e <span class="nv">POSTGRES_PASSWORD</span><span class="o">=</span><span class="s2">"</span><span class="nv">$POSTGRES_PASSWORD</span><span class="s2">"</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> -v postgres-data:/var/lib/postgresql/data <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> -p 5432:5432 <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> postgres:17</span></span></code></pre>
</div>
</div>
</div>
<p>An existing container can be attached later:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-5" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">docker network connect pmm-network postgres-server</span></span></code></pre>
</div>
</div>
</div>
<p>This works, but you are responsible for recreating each container with exactly the same flags, volumes, and network settings every time. That is the main reason I recommend Option A. Whichever option you choose, avoid mixing the two for the same lab, because it becomes hard to tell which containers are managed by Compose and which are not.</p>
<h3>A networking lesson that applies either way</h3>
<p>At one point, PMM couldn’t resolve my PostgreSQL container:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-6" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">lookup postgres-server on 127.0.0.11:53: no such host</span></span></code></pre>
</div>
</div>
</div>
<p>The problem wasn’t PostgreSQL or PMM. The PostgreSQL container was stopped, so it had no active network endpoint, and Docker’s internal DNS had nothing to return.</p>
<p>That was an important reminder: <strong>always verify the container and network state before troubleshooting the application.</strong></p>
<h2>2. Making Monitoring Persistent with PMM</h2>
<p>Once the databases were running, I wanted visibility into their performance.</p>
<p>PMM provides dashboards and metrics for MySQL, PXC, and PostgreSQL. It consists of a server that stores and visualizes monitoring data and a client agent that collects database metrics.</p>
<p>The key thing to understand is that persistent storage and service registration are related, but they are not the same thing.</p>
<p>PMM Server maintains the monitoring inventory, while PMM Client has its own configuration and agent identity. If the client is recreated with a new identity, the association between the client and its registered services is lost. In my early setup, after recreating containers, the client listing showed only the basic agents:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-7" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">pmm_agent Connected
</span></span><span class="line"><span class="cl">node_exporter Running
</span></span><span class="line"><span class="cl">vmagent Running</span></span></code></pre>
</div>
</div>
</div>
<p>Two things prevent this, and both should be in place from the start:</p>
<ol>
<li><strong>A persistent volume for the client configuration.</strong> In the Compose file above, <code>pmm-client-data</code> keeps the agent identity across restarts and recreations.</li>
<li><strong>An idempotent registration script.</strong> It adds each database only if it isn’t already registered, so it is safe to run after every <code>docker compose up</code>.</li>
</ol>
<p>Before registering, create a monitoring user in each database. For PostgreSQL, for example:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-8" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">CREATE</span><span class="w"> </span><span class="k">USER</span><span class="w"> </span><span class="n">pmm</span><span class="w"> </span><span class="k">WITH</span><span class="w"> </span><span class="n">PASSWORD</span><span class="w"> </span><span class="s1">'change-me'</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">GRANT</span><span class="w"> </span><span class="n">pg_monitor</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="n">pmm</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">CREATE</span><span class="w"> </span><span class="n">EXTENSION</span><span class="w"> </span><span class="k">IF</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">EXISTS</span><span class="w"> </span><span class="n">pg_stat_statements</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>Then the registration script, which reads credentials from the <code>.env</code> file rather than hardcoding them:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-9" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="cp">#!/usr/bin/env bash
</span></span></span><span class="line"><span class="cl"><span class="cp"></span><span class="c1"># register-pmm.sh</span>
</span></span><span class="line"><span class="cl"><span class="nb">set</span> -euo pipefail
</span></span><span class="line"><span class="cl"><span class="nb">source</span> .env
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">registered<span class="o">()</span> <span class="o">{</span>
</span></span><span class="line"><span class="cl"> docker <span class="nb">exec</span> pmm-client pmm-admin list <span class="p">|</span> grep -qw <span class="s2">"</span><span class="nv">$1</span><span class="s2">"</span>
</span></span><span class="line"><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">if</span> ! registered postgres-server<span class="p">;</span> <span class="k">then</span>
</span></span><span class="line"><span class="cl"> docker <span class="nb">exec</span> pmm-client pmm-admin add postgresql <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --username<span class="o">=</span>pmm <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --password<span class="o">=</span><span class="s2">"</span><span class="nv">$PG_MONITOR_PASSWORD</span><span class="s2">"</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --host<span class="o">=</span>postgres-server <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --port<span class="o">=</span><span class="m">5432</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> postgres-server
</span></span><span class="line"><span class="cl"><span class="k">fi</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">for</span> node in percona-server pxc1 pxc2 pxc3<span class="p">;</span> <span class="k">do</span>
</span></span><span class="line"><span class="cl"> <span class="k">if</span> ! registered <span class="s2">"</span><span class="nv">$node</span><span class="s2">"</span><span class="p">;</span> <span class="k">then</span>
</span></span><span class="line"><span class="cl"> docker <span class="nb">exec</span> pmm-client pmm-admin add mysql <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --username<span class="o">=</span>pmm <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --password<span class="o">=</span><span class="s2">"</span><span class="nv">$MYSQL_MONITOR_PASSWORD</span><span class="s2">"</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --host<span class="o">=</span><span class="s2">"</span><span class="nv">$node</span><span class="s2">"</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --port<span class="o">=</span><span class="m">3306</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --query-source<span class="o">=</span>perfschema <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> <span class="s2">"</span><span class="nv">$node</span><span class="s2">"</span>
</span></span><span class="line"><span class="cl"> <span class="k">fi</span>
</span></span><span class="line"><span class="cl"><span class="k">done</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">docker <span class="nb">exec</span> pmm-client pmm-admin list</span></span></code></pre>
</div>
</div>
</div>
<p>The takeaway: <strong>a monitoring system should be designed to survive a restart, not just work immediately after installation.</strong></p>
<h2>3. Learning PostgreSQL Through Real Workloads</h2>
<p>With PostgreSQL running and connected to PMM, I wanted to do more than look at an idle dashboard.</p>
<p>I used sysbench to generate a workload against PostgreSQL 17.</p>
<p>My test environment included ten tables with approximately 750,000 rows each, giving me about 7.5 million rows to experiment with.</p>
<p>A sample workload command looked like this:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-10" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sysbench <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --db-driver<span class="o">=</span>pgsql <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --pgsql-host<span class="o">=</span>127.0.0.1 <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --pgsql-port<span class="o">=</span><span class="m">5432</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --pgsql-user<span class="o">=</span>postgres <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --pgsql-db<span class="o">=</span>sbtest <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --tables<span class="o">=</span><span class="m">10</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --table-size<span class="o">=</span><span class="m">750000</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --threads<span class="o">=</span><span class="m">16</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --time<span class="o">=</span><span class="m">300</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --report-interval<span class="o">=</span><span class="m">5</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> oltp_read_write run</span></span></code></pre>
</div>
</div>
</div>
<p>With the workload running, PMM became much more interesting.</p>
<p>I could observe database activity, disk latency, query execution statistics, and changes in resource utilization.</p>
<p>This also helped me understand an important distinction: PostgreSQL tuple activity is not the same thing as SQL queries per second.</p>
<p>One query can read or return many tuples. Looking only at tuple counts without understanding the underlying queries can lead to incorrect conclusions about workload intensity.</p>
<h2>4. Understanding PostgreSQL Query Performance</h2>
<p>One of the most useful PostgreSQL features for troubleshooting is <code>EXPLAIN</code>.</p>
<p>For example:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-11" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">EXPLAIN</span><span class="w"> </span><span class="p">(</span><span class="k">ANALYZE</span><span class="p">,</span><span class="w"> </span><span class="n">BUFFERS</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">FROM</span><span class="w"> </span><span class="n">sbtest1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">WHERE</span><span class="w"> </span><span class="n">id</span><span class="w"> </span><span class="k">BETWEEN</span><span class="w"> </span><span class="mi">100</span><span class="w"> </span><span class="k">AND</span><span class="w"> </span><span class="mi">200</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>This shows the execution plan, actual execution measurements, and buffer activity.</p>
<p>I started paying attention to several key pieces of information:</p>
<ul>
<li>Whether PostgreSQL used a sequential scan or an index</li>
<li>Estimated versus actual rows</li>
<li>Execution time</li>
<li>Buffer hits and reads</li>
<li>Number of execution loops</li>
</ul>
<p>Because the Compose file loads <code>pg_stat_statements</code> at startup, query statistics are aggregated from the beginning.</p>
<p>A useful query is:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-12" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SELECT</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">calls</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">total_exec_time</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">mean_exec_time</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">rows</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">LEFT</span><span class="p">(</span><span class="n">query</span><span class="p">,</span><span class="w"> </span><span class="mi">100</span><span class="p">)</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="n">query</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">FROM</span><span class="w"> </span><span class="n">pg_stat_statements</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">ORDER</span><span class="w"> </span><span class="k">BY</span><span class="w"> </span><span class="n">total_exec_time</span><span class="w"> </span><span class="k">DESC</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">LIMIT</span><span class="w"> </span><span class="mi">10</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>This provides a different perspective from looking at individual slow queries.</p>
<p>A query that takes only a fraction of a millisecond might still consume substantial cumulative execution time if it runs hundreds of thousands of times.</p>
<p>For a DBA, both individual latency and aggregate workload matter.</p>
<h2>5. MVCC, Dead Tuples, and VACUUM</h2>
<p>My next learning objective was understanding PostgreSQL’s Multi-Version Concurrency Control (MVCC).</p>
<p>Unlike an in-place overwrite model, PostgreSQL commonly creates a new row version when a row is updated.</p>
<p>Older versions may remain until PostgreSQL determines they are no longer needed.</p>
<p>That leads directly to one of PostgreSQL’s most important maintenance mechanisms: VACUUM.</p>
<p>I experimented with updating large numbers of rows:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-13" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">UPDATE</span><span class="w"> </span><span class="n">sbtest1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">SET</span><span class="w"> </span><span class="n">k</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">k</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">WHERE</span><span class="w"> </span><span class="n">id</span><span class="w"> </span><span class="o">&lt;=</span><span class="w"> </span><span class="mi">300000</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>Then checked the table statistics:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-14" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SELECT</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">relname</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">n_live_tup</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">n_dead_tup</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">last_autovacuum</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">autovacuum_count</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">FROM</span><span class="w"> </span><span class="n">pg_stat_user_tables</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">WHERE</span><span class="w"> </span><span class="n">relname</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'sbtest1'</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>This gave me a practical way to observe dead tuple estimates and autovacuum activity.</p>
<p>I also explored what happens when a long-running transaction holds an old snapshot.</p>
<p>By starting a <code>REPEATABLE READ</code> transaction and leaving it open while another session updated rows, I could demonstrate how PostgreSQL may need to retain older row versions.</p>
<p>That helped connect several important DBA concepts:</p>
<p><strong>Long-running transactions → old snapshots → delayed tuple cleanup → potential table bloat.</strong></p>
<p>I also learned that normal VACUUM generally makes space reusable within PostgreSQL rather than immediately shrinking the table file.</p>
<p><code>VACUUM FULL</code> can reclaim disk space by rewriting a table, but it requires an exclusive lock and is not something to run casually in production.</p>
<h2>6. Operating the PXC Cluster Safely</h2>
<p>My three-node Percona XtraDB Cluster taught me that <strong>database containers need database-aware operational procedures.</strong> That’s why startup and shutdown are built into the Compose file rather than left to chance.</p>
<p>Early on, I ran into certificate problems, donor timeouts, cluster membership issues, and shutdowns that ended with exit code 137 (the container being killed before MySQL finished). The shared certificate directory, the healthcheck on <code>pxc1</code>, and <code>stop_grace_period</code> address those directly.</p>
<p>The shutdown procedure is simply:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-15" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">docker compose stop pxc3 pxc2 pxc1</span></span></code></pre>
</div>
</div>
</div>
<p>If you use Option B, do the same thing explicitly, one node at a time, with a long timeout:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-16" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">docker stop -t <span class="m">120</span> pxc3
</span></span><span class="line"><span class="cl">docker stop -t <span class="m">120</span> pxc2
</span></span><span class="line"><span class="cl">docker stop -t <span class="m">120</span> pxc1</span></span></code></pre>
</div>
</div>
</div>
<p>To start the cluster again, check <code>grastate.dat</code> on each node and understand the meaning of <code>safe_to_bootstrap</code>:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-17" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">docker run --rm -v pxc1_data:/data alpine cat /data/grastate.dat</span></span></code></pre>
</div>
</div>
</div>
<p>After a clean shutdown, the last node to leave the cluster (here, <code>pxc1</code>) will have <code>safe_to_bootstrap: 1</code> and is the right node to start first.</p>
<p>After an unclean shutdown, selecting the correct bootstrap node requires recovery checks. Compare the recovered sequence numbers across nodes and bootstrap from the most advanced one. Simply changing <code>safe_to_bootstrap</code> to <code>1</code> without verifying that can lose data.</p>
<h2>7. My Most Useful Commands</h2>
<p>I kept a command cheat sheet from the start of the project, and it has become one of the most useful outcomes. It captures the commands I actually needed while learning and troubleshooting. I recommend starting one on day one.</p>
<p>For Docker:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-18" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># Running containers</span>
</span></span><span class="line"><span class="cl">docker ps
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># All containers</span>
</span></span><span class="line"><span class="cl">docker ps -a
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Status of the Compose-managed lab</span>
</span></span><span class="line"><span class="cl">docker compose ps
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Follow logs</span>
</span></span><span class="line"><span class="cl">docker logs -f postgres-server
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Inspect network configuration</span>
</span></span><span class="line"><span class="cl">docker inspect postgres-server <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --format <span class="s1">'{{json .NetworkSettings.Networks}}'</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Resource usage</span>
</span></span><span class="line"><span class="cl">docker stats
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># List Docker volumes</span>
</span></span><span class="line"><span class="cl">docker volume ls
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Check PMM services</span>
</span></span><span class="line"><span class="cl">docker <span class="nb">exec</span> pmm-client pmm-admin list</span></span></code></pre>
</div>
</div>
</div>
<p>These commands are my first line of investigation whenever something isn’t behaving as expected.</p>
<p>For PostgreSQL, my daily reference includes:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-19" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="c1">-- Current sessions
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="k">SELECT</span><span class="w"> </span><span class="n">pid</span><span class="p">,</span><span class="w"> </span><span class="n">usename</span><span class="p">,</span><span class="w"> </span><span class="k">state</span><span class="p">,</span><span class="w"> </span><span class="n">query</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">FROM</span><span class="w"> </span><span class="n">pg_stat_activity</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="c1">-- Long-running transactions
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="k">SELECT</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">pid</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">state</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">now</span><span class="p">()</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">xact_start</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="n">transaction_age</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">query</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">FROM</span><span class="w"> </span><span class="n">pg_stat_activity</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">WHERE</span><span class="w"> </span><span class="n">xact_start</span><span class="w"> </span><span class="k">IS</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="c1">-- Dead tuples
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="k">SELECT</span><span class="w"> </span><span class="n">relname</span><span class="p">,</span><span class="w"> </span><span class="n">n_live_tup</span><span class="p">,</span><span class="w"> </span><span class="n">n_dead_tup</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">FROM</span><span class="w"> </span><span class="n">pg_stat_user_tables</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">ORDER</span><span class="w"> </span><span class="k">BY</span><span class="w"> </span><span class="n">n_dead_tup</span><span class="w"> </span><span class="k">DESC</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="c1">-- Blocking sessions
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="k">SELECT</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">pid</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">pg_blocking_pids</span><span class="p">(</span><span class="n">pid</span><span class="p">)</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="n">blocked_by</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">FROM</span><span class="w"> </span><span class="n">pg_stat_activity</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">WHERE</span><span class="w"> </span><span class="k">cardinality</span><span class="p">(</span><span class="n">pg_blocking_pids</span><span class="p">(</span><span class="n">pid</span><span class="p">))</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>These are simple queries, but they form a useful starting point for troubleshooting.</p>
<h2>8. Design Principles Behind the Lab</h2>
<p>To summarize, these are the principles the setup above is built on:</p>
<ol>
<li><strong>Define the whole lab in Docker Compose</strong>, rather than mixing <code>docker run</code> commands with Compose-managed containers.</li>
<li><strong>Declare persistent volumes and network attachments before creating any databases.</strong></li>
<li><strong>Treat startup and shutdown as part of the design</strong>, especially for PXC.</li>
<li><strong>Make PMM registration reproducible</strong> with a persistent client volume and an idempotent script, and keep credentials out of scripts and command history.</li>
<li><strong>Keep a command cheat sheet from the beginning.</strong></li>
</ol>
<h2>Final Thoughts</h2>
<p>What began as an effort to build a small local database environment turned into a practical DBA learning experience.</p>
<p>I now have a place to explore PostgreSQL performance, MVCC, autovacuum, MySQL replication concepts, PXC clustering, and database monitoring without risking a production system.</p>
<p>Perhaps the biggest lesson is that the most valuable learning moments often happen when something breaks.</p>
<p>A Docker DNS failure teaches networking. A missing PMM registration teaches persistence and identity. A PXC bootstrap problem teaches cluster recovery. A growing dead tuple count teaches PostgreSQL MVCC.</p>
<p>And once you understand why something broke, you’re much better prepared to troubleshoot it the next time.</p>
<p><strong>My next goal is to continue expanding the lab with PostgreSQL replication, backup and recovery, and more deliberate performance troubleshooting exercises.</strong></p>
<hr>
<p><em>This article describes a local learning environment. The commands and configurations are intended for experimentation and should be reviewed and adapted before use in production.</em></p>
<p><a href="https://percona.community/blog/2026/10/12/docker-dba-lab/">Docker DBA Lab</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>In MariaDB 13.0, new-style optimizer hints go beyond MySQL’s</title>
        <link>https://petrunia.net/2026/10/10/in-mariadb-13-0-new-style-optimizer-hints-go-beyond-mysqls/</link>
        <pubDate>Sat, 10 Oct 2026 09:31:00 +0000</pubDate>
        <dc:creator>spetrunia2</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/in-mariadb-13-0-new-style-optimizer-hints-go-beyond-mysqls/</guid>
        <source url="https://petrunia.net/">Sergei Petrunia&#039;s blog</source>
        <description><![CDATA[<p>Short MariaDB 13.0 is now stable. In this release, MariaDB’s support for query optimizer hints reaches maturity and is ready for real-world use. In order to get here, we’ve extended MySQL’s hint syntax. The most visible change is that the QB_NAME hint now supports “path-based” addressing of query blocks. We’ve discovered we were not the […]</p>
<p><a href="https://petrunia.net/2026/10/10/in-mariadb-13-0-new-style-optimizer-hints-go-beyond-mysqls/">In MariaDB 13.0, new-style optimizer hints go beyond MySQL’s</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<h2 class="wp-block-heading">Short</h2>
<p class="wp-block-paragraph">MariaDB 13.0 is now stable. In this release, MariaDB’s support for query optimizer hints reaches maturity and is ready for real-world use. </p>
<p class="wp-block-paragraph">In order to get here, we’ve extended MySQL’s hint syntax. The most visible change is that the QB_NAME hint now supports “path-based” addressing of query blocks. We’ve discovered we were not the first to add such extension: TiDB also has implemented it. We’ve made MariaDB’s path syntax to be compatible with TiDB.</p>
<h2 class="wp-block-heading">Long</h2>
<p class="wp-block-paragraph">New-style optimizer hints are put into <code><strong>/*+ */</strong></code> comment next to the SELECT/UPDATE/DELETE word:</p>
<div class="wp-block-code">
<div class="cm-editor">
<div class="cm-scroller">
<pre>
<code class="language-sql"><div class="cm-line"><span class="tok-keyword">SELECT</span> <span class="tok-comment">/*+ NO_INDEX(t1 index1) JOIN_ORDER(t1, t2) */</span> col1 <span class="tok-keyword">FROM</span> ...;</div></code></pre>
</p></div>
</p></div>
</div>
<p class="wp-block-paragraph">Both MySQL and MariaDB share a comprehensive set of hints to control</p>
<ul class="wp-block-list">
<li>the join order,</li>
<li>which indexes should be used,</li>
<li>which optimizations should be applied or not, etc.</li>
</ul>
<p class="wp-block-paragraph">One can put a collection of hints next to the first SELECT keyword to specify all needed adjustments to the query plan:</p>
<div class="show-line-numbers wp-block-code">
<div class="cm-editor">
<div class="cm-scroller">
<pre>
<code class="language-sql"><div class="cm-line"><span class="tok-keyword">SELECT</span></div><div class="cm-line">  <span class="tok-comment">/*+ JOIN_ORDER(dt2, dt)</span></div><div class="cm-line"><span class="tok-comment">      NO_INDEX(table20@named_select index1)</span></div><div class="cm-line"><span class="tok-comment">      JOIN_ORDER(@`select#3` table10, table11)</span></div><div class="cm-line"><span class="tok-comment">  */</span></div><div class="cm-line">  select_column1<span class="tok-punctuation">,</span> ...</div><div class="cm-line"><span class="tok-keyword">FROM</span></div><div class="cm-line">  <span class="tok-punctuation">(</span><span class="tok-keyword">SELECT</span> <span class="tok-comment">/*+ QB_NAME(named_select) */</span> col1 </div><div class="cm-line">   <span class="tok-keyword">FROM</span> table20 ... <span class="tok-keyword">WHERE</span> ...<span class="tok-punctuation">)</span> dt</div><div class="cm-line">  <span class="tok-keyword">JOIN</span></div><div class="cm-line">  <span class="tok-punctuation">(</span><span class="tok-keyword">SELECT</span> ... <span class="tok-keyword">FROM</span> table10<span class="tok-punctuation">,</span> table11 <span class="tok-keyword">WHERE</span> ...<span class="tok-punctuation">)</span> dt2</div></code></pre>
</p></div>
</p></div>
</div>
<p class="wp-block-paragraph">It is very convenient when doing troubleshooting. You suggest one hint instead of requesting to modify the query in multiple places.</p>
<p class="wp-block-paragraph">How does one refer to different parts of the query? In MySQL, there are two ways:</p>
<ol class="wp-block-list">
<li><strong>Explicit query block names</strong> in form of <code><strong>QB_NAME(named_select)</strong></code>. Here one has to put another hint at the target select to assign it a name. </li>
<li><strong>Implicit query block names</strong> in form of <code><strong>select#n</strong></code>. Those are close to “number of the SELECT word in the query text”, but the actual definition is more complex for queries with CTEs. </li>
</ol>
<p class="wp-block-paragraph">Alas, neither kind of names could be used to control SELECTs that come from a VIEW. This is because MySQL does “hint resolution” step before “view processing” step.</p>
<h3 class="wp-block-heading">Hint path syntax</h3>
<p class="wp-block-paragraph">We didn’t like these limitations. We’ve also learned that TiDB had extended hint syntax to address precisely this<br />problem. We’ve added a compatible extension. Now, parts of query can be referred by specifying “path” through the derived tables:</p>
<div class="show-line-numbers wp-block-code">
<div class="cm-editor">
<div class="cm-scroller">
<pre>
<code class="language-sql"><div class="cm-line"><span class="tok-keyword">SELECT</span></div><div class="cm-line">  <span class="tok-comment">/*+ </span></div><div class="cm-line"><span class="tok-comment">    QB_NAME(child_select @derived1 @derived1)    -- denote the innermost select as "child_select" </span></div><div class="cm-line"><span class="tok-comment">    JOIN_ORDER(@child_select t2 t1)              -- specify join order there</span></div><div class="cm-line"><span class="tok-comment">  */</span></div><div class="cm-line"><span class="tok-keyword">FROM</span></div><div class="cm-line">  <span class="tok-punctuation">(</span><span class="tok-keyword">select</span></div><div class="cm-line">    <span class="tok-keyword">from</span> </div><div class="cm-line">      <span class="tok-punctuation">(</span><span class="tok-keyword">select</span> ... </div><div class="cm-line">       <span class="tok-keyword">from</span> t1<span class="tok-punctuation">,</span> t2 <span class="tok-keyword">where</span> ...</div><div class="cm-line">      <span class="tok-punctuation">)</span> <span class="tok-keyword">as</span> derived2</div><div class="cm-line">   <span class="tok-punctuation">)</span> <span class="tok-keyword">AS</span> derived1<span class="tok-punctuation">,</span></div><div class="cm-line">  ...</div></code></pre>
</p></div>
</p></div>
</div>
<p class="wp-block-paragraph">Path syntax works across VIEWs. Now it’s possible to use hints to control any part of the query.  See <a href="https://mariadb.com/docs/server/ha-and-performance/optimization-and-tuning/optimizer-hints/query-block-naming">MariaDB documentation </a>for further details.</p>
<p class="wp-block-paragraph">
<p><a href="https://petrunia.net/2026/10/10/in-mariadb-13-0-new-style-optimizer-hints-go-beyond-mysqls/">In MariaDB 13.0, new-style optimizer hints go beyond MySQL’s</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>PGO or not PGO this is the dilemma. Step 3</title>
        <link>https://www.percona.com/blog/pgo-or-not-pgo-this-is-the-dilemma-step-3/</link>
        <pubDate>Fri, 09 Oct 2026 11:47:55 +0000</pubDate>
        <dc:creator>Marco Tusa</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/pgo-or-not-pgo-this-is-the-dilemma-step-3/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Step 3: Why my sysbench-trained build loses and how to do it right. Given the topic complexity and the length of this article I have split it in 3 three different blog-post: What is PGO How PGO it works Why my sysbench-trained build loses and how to do it right. Three compounding reasons: Uncovered code … Continued<br />
The post PGO or not PGO this is the dilemma. Step 3 appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/pgo-or-not-pgo-this-is-the-dilemma-step-3/">PGO or not PGO this is the dilemma. Step 3</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<h2><span>Step 3: Why my sysbench-trained build loses and how to do it right.</span><span><br />
</span></h2>
<p><span>Given the topic complexity and the length of this article I have split it in 3 three different blog-post:</span></p>
<ol>
<li><a href="https://www.percona.com/blog/pgo-or-not-pgo-this-is-the-dilemma-step-1"><span>What is PGO</span></a></li>
<li><a href="https://www.percona.com/blog/pgo-or-not-pgo-this-is-the-dilemma-step-2"><span>How PGO it works</span></a></li>
<li><span>Why my sysbench-trained build loses and how to do it right.</span></li>
</ol>
<h3><span>Three compounding reasons:</span></h3>
<ol>
<li><i><span>Uncovered code gets pessimized.</span></i> <span><br />
</span><span>Sysbench-tpcc touches a narrow slice of mysqld. </span><span><br />
</span><span>Every function with zero counts is treated as cold: GCC optimizes it for size, skips inlining, and shoves it into cold sections. </span><span><br />
</span><span>But at runtime I still execute plenty of code my training never touched, such as purge, flushing, stats recalculation, error paths, different optimizer plans, connection churn. </span><span><br />
</span><span>All of that is now running de-optimized code, and I pay icache penalties every time hot code calls into “cold” regions. </span><span><br />
</span><span>This is why GCC added </span><span>-fprofile-partial-training</span><span>, without it, a narrow profile actively hurts everything outside it.</span></li>
<li><i><span>High-concurrency instrumented runs produce corrupted or skewed profiles.</span></i> <span><br />
</span><span>GCC’s profile counters are non-atomic by default. </span><span><br />
</span><span>With 128–1024 threads hammering the same counters I get lost updates and internally inconsistent counts (I actually had “profile count data file corrupted/inconsistent” warnings at the </span><span>-fprofile-use</span><span> compile). </span><span><br />
</span><span>I need to use </span><span>-fprofile-update=atomic</span><span>, which almost nobody sets and was at the beginning not aware of. </span><span><br />
</span><span>In short my profile was garbage and a garbage profile is worse than no profile, consistent with my PGO build being </span><i><span>slower</span></i><span> than plain </span><span>-O3</span><span> at 128 threads.</span></li>
<li><i><span>Instrumentation distorts what “hot” means under contention.</span></i> <span><br />
</span><span>The instrumented binary is 2–10x slower, which shifts where threads pile up. Spin loops in mutexes and rw-locks record enormous counts, so the compiler lavishes optimization on </span><i><span>waiting</span></i><span> code instead of useful work. While at high thread counts my real bottleneck is lock contention and memory latency things branch layout can’t fix. </span></li>
</ol>
<p><i><span>Do I have a way to merge the different profiles like MTR + sysbench?</span></i><span><br />
</span><span>The answer is yes. For GCC it’s simple to do so, because the runtime automatically merges profile data across multiple training runs against the same instrumented binary. I don’t need a separate merge step like Clang does.</span></p>
<p><span>What it does is that each time an instrumented binary exits, it writes its counters into files. If those files already exist (from a previous run), GCC’s runtime </span><i><span>adds</span></i><span> the new counts to the existing ones rather than overwriting them. </span><span><br />
</span><span>So if I run MTR first, then run sysbench against the same instrumented build with the same </span><span>FPROFILE_DIR</span><span>, the second run’s counts accumulate on top of the first. The final profile reflects both workloads combined. </span></p>
<p><span>Combining MTR with a moderate-thread sysbench run for PGO training is helpful because the two workloads cover different, complementary dimensions of mysqld’s behavior: </span></p>
<ul>
<li><span>MTR sweeps broad functional breadth parser, optimizer, DDL, replication, error paths. However it runs almost entirely single-connection, so it never exercises the branches that only exist under real concurrency, like the contended slow-path of a latch, MVCC visibility checks against in-flight writers, lock-wait queuing, or redo-log group-commit batching;</span></li>
<li><span>A moderate-concurrency sysbench run (something like 4–64 threads, enough to create actual simultaneous access without descending into the timing-distortion and counter-corruption problems), fills exactly that gap by giving those concurrency-only branches nonzero execution counts, which keeps the compiler from treating them as cold, since cold code paths get optimized for size instead of speed.</span></li>
</ul>
<p><span>So the merged profile ends up with both the wide code coverage MTR provides and the concurrent-path coverage MTR structurally can’t, at the cost of only a modest, second-order improvement over MTR alone since PGO’s overall gains are already small and this specific slice of the binary is a narrow fraction of total execution.</span></p>
<p> </p>
<p><span>However even where it does help, I am stacking a small effect on top of a small effect. I have already found PGO vs non-PGO gives me under 5%. </span><span><br />
</span><span>The incremental gain from better-covering a narrow slice of concurrency-only code within that is a second-order refinement. </span><span><br />
</span><span>It is plausibly in the sub-1% range, quite  smaller than the run-to-run noise I had seen just from benchmark variance.</span></p>
<p><span>Or at least that is what I now think, let me validate it.</span><span><br />
</span><span><br />
</span><span>Commands to build the code:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">cmake ../mysql-9.7.2 
-DCMAKE_INSTALL_PREFIX=/opt/mysql_templates/mysql-9.7.2-PGO-instrument 
-DCMAKE_BUILD_TYPE=Release 
-DENABLED_LOCAL_INFILE=1 
-DWITH_FEDERATED_STORAGE_ENGINE=1 
-DWITH_ARCHIVE_STORAGE_ENGINE=1 
-DWITH_PACKAGE_FLAGS=OFF 
-DCOMPILATION_COMMENT_SERVER="Marco compile 9.7.2-PGO instrument" 
-DCOMPILATION_COMMENT="Marco compile 9.7.2 PGO instrument" 
-DCMAKE_C_COMPILER=clang-20 
-DCMAKE_CXX_COMPILER=clang++-20 
-DCMAKE_C_FLAGS="-fuse-ld=lld" 
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" 
-DFPROFILE_GENERATE=ON 
-DWITH_LTO=OFF 
-DFPROFILE_DIR=/opt/mysql_source/profile</pre>
<p><span>Run the mtr:</span><span><br />
</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">perl mysql-test-run.pl --force --max-test-fail=0 --parallel=8 --suite=main,innodb,innodb_undo,binlog,rpl,perfschema,sys_vars</pre>
<p> </p>
<p><span>Then run the sysbench-tpcc test with 64 threads</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">sysbench /opt/tools/sysbench-tpcc/tpcc.lua --mysql-host=127.0.0.1 --mysql-port=3307  --mysql-user=app_test --mysql-password=test --mysql-db=tpcc --db-driver=mysql --tables=10 --scale=100 --rand-type=uniform --report-interval=1  --histogram --report_csv=yes  --stats_format=csv --db-ps-mode=disable --trx_level=RR --enable_purge=yes --time=600 --threads=64 --mysql-ssl=PREFERRED --mysql-ignore-errors=none  --reconnect=0  run</pre>
<p><span>And got the profile as</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">[root@sm-blade03 profile]# llvm-profdata-20 show -detailed-summary /opt/mysql_source/profile/mysql.profdata
/opt/mysql_source/profile/mysql.profdata
Instrumentation level: IR entry_first = 0 instrument_loop_entries = 0
Total functions: 52403
Maximum function count: 289910820864
Maximum internal block count: 16881288068
Total number of blocks: 619050
Total count: 2473216025729
Detailed summary:
2 blocks (0.00%) with count &gt;= 289910820864 account for 1% of the total counts.
2 blocks (0.00%) with count &gt;= 289910820864 account for 10% of the total counts.
2 blocks (0.00%) with count &gt;= 289910820864 account for 20% of the total counts.
11 blocks (0.00%) with count &gt;= 16777125216 account for 30% of the total counts.
32 blocks (0.01%) with count &gt;= 7806039615 account for 40% of the total counts.
77 blocks (0.01%) with count &gt;= 3839409465 account for 50% of the total counts.
160 blocks (0.03%) with count &gt;= 2273821592 account for 60% of the total counts.
312 blocks (0.05%) with count &gt;= 1111890303 account for 70% of the total counts.
719 blocks (0.12%) with count &gt;= 365989756 account for 80% of the total counts.
2165 blocks (0.35%) with count &gt;= 85858392 account for 90% of the total counts.
4893 blocks (0.79%) with count &gt;= 24359463 account for 95% of the total counts.
16760 blocks (2.71%) with count &gt;= 2841200 account for 99% of the total counts.
45006 blocks (7.27%) with count &gt;= 148881 account for 99.9% of the total counts.
96619 blocks (15.61%) with count &gt;= 8640 account for 99.99% of the total counts.
157023 blocks (25.37%) with count &gt;= 960 account for 99.999% of the total counts.
220001 blocks (35.54%) with count &gt;= 91 account for 99.9999% of the total counts</pre>
<p><span>Checking on how counts concentrate: just 2 blocks account for 20% of </span><i><span>all</span></i><span> executed instructions across the entire training run (almost certainly a tight InnoDB buffer-pool/redo-log/lock_manager loop  counts in the hundreds of billions), while 90% of total execution volume is concentrated in only 2,165 blocks (0.35% of all covered blocks). </span></p>
<p><span>That’s the “hot core” PGO is designed to find and optimize aggressively. Meanwhile the long tail,  the other 96%+ of blocks, still has nonzero counts (this is a sparse profile, so anything appearing here was actually executed at least once).</span></p>
<p><span>Meaning a huge amount of MTR’s functional-path breadth got captured even though it’s numerically dwarfed by sysbench’s tight hot loops.</span></p>
<p><span>This is the ideal shape for a merged profile: a small, extremely hot core (from sustained sysbench load) sitting on top of broad, low-frequency-but-nonzero coverage (from MTR’s functional sweep). </span></p>
<p><span>If MTR had contributed nothing, I would have a much flatter, narrower distribution with far fewer total functions covered.</span><span><br />
</span><span> If sysbench had swamped everything with no MTR contribution, I would have a similar shape but with a much smaller “Total functions” number, since sysbench-tpcc only touches a fraction of mysqld’s total surface.</span></p>
<p><span>Command to build the final optimized binaries:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">llvm-profdata-20 merge -sparse /opt/mysql_source/profile/*.profraw -o /opt/mysql_source/profile/mysql.profdata

cmake ../mysql-9.7.2 
 -DCMAKE_INSTALL_PREFIX=/opt/mysql_templates/mysql-9.7.2-PGO-optimized-MTR-sysbench 
  -DCMAKE_BUILD_TYPE=Release 
  -DENABLED_LOCAL_INFILE=1 
  -DWITH_FEDERATED_STORAGE_ENGINE=1 
  -DWITH_ARCHIVE_STORAGE_ENGINE=1 
  -DWITH_PACKAGE_FLAGS=OFF 
  -DCOMPILATION_COMMENT_SERVER="Marco compile 9.7.2-PGO optimized MTR+sysbench" 
  -DCOMPILATION_COMMENT="Marco compile 9.7.2 PGO optimized MTR+sysbench" 
  -DCMAKE_C_COMPILER=clang-20 
  -DCMAKE_CXX_COMPILER=clang++-20 
  -DFPROFILE_USE=ON 
  -DFPROFILE_DIR=/opt/mysql_source/profile/mysql.profdata 
  -DWITH_SSL=system -DWITH_ZLIB=system -DWITH_LZ4=system -DWITH_ICU=system 
  -DWITH_NUMA=ON -DWITH_LTO=ON -DWITH_LD=lld -DWITH_SYSTEMD=1 
  -DWITH_UNIT_TESTS=OFF -DWITH_ROUTER=OFF -DMYSQL_MAINTAINER_MODE=OFF</pre>
<p><span>Re-running the test I got this:</span></p>
<p><a href="https://www.percona.com/wp-content/uploads/2026/10/pgo_not_pgo_mtr_vs_mtr_sysbench-scaled.png"><img loading="lazy" decoding="async" class="alignleft size-medium_large wp-image-54432" src="https://www.percona.com/wp-content/uploads/2026/10/pgo_not_pgo_mtr_vs_mtr_sysbench-768x337.png" alt="" width="768" height="337"></a></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p><span>As expected the benefit I got was minimal, something was there but that disappeared while the concurrency increased.</span></p>
<p> </p>
<h2><span>Conclusions</span></h2>
<ul>
<li><span>Non-PGO vs PGO comparison: we had a 12% increase with low concurrency. But when simulating a more realistic load with higher contention the win becomes smaller and smaller, under 2%.</span></li>
<li><span>Training-workload choice mattered a lot: a sysbench-tpcc-trained PGO build ended up </span><i><span>slower</span></i><span> than a non-PGO.</span></li>
<li><span>After switching to a merged MTR + moderate-concurrency-sysbench training profile and re-running, the gain was still minimal, and it shrank further as concurrency increased.</span></li>
</ul>
<p> </p>
<h3><span>Why the sysbench-only build lost</span></h3>
<p><span>Sysbench-tpcc only exercises a narrow slice of mysqld, so everything outside that slice (purge, flushing, stats, error paths, alternate optimizer plans) gets pessimized as “cold” code.</span></p>
<p><span>At 128–1024 threads, GCC’s non-atomic profile counters get corrupted under contention unless I explicitly set </span><span>-fprofile-update=atomic,</span><span>a garbage profile is worse than no profile at all.</span></p>
<p><span>Instrumentation overhead (2–10x slowdown) distorts what looks “hot” under load mutex/rwlock spin loops dominate the counts, so the compiler optimizes waiting code instead of real work, while the actual bottleneck (lock contention, memory latency) is something branch layout can’t fix anyway.</span></p>
<p><b>Bottom line:</b><span> PGO for MySQL/Percona Server binaries does work in the sense that the mechanism is sound whole-binary function reordering for something the size of mysqld is a legitimate, often the single biggest, win in PGO generally. </span></p>
<p><span>But empirically here the payoff was consistently small (sub-5%, trending toward sub-1% for the concurrency-specific refinement), fragile to training-workload choice, fragile to build-flag correctness (atomic counters, </span><span>-fprofile-partial-training</span><span>), and it erodes further as thread count rises,  which is exactly what happens in production and what we care about most.</span></p>
<p><span>So my practical answer: </span><b>it’s not a clear “yes, always compile with PGO.”</b><span> It’s more a “</span><b>maybe, and only if you get every detail right</b><span>“. Correct broad-coverage training data (MTR, ideally merged with moderate-concurrency sysbench), atomic profile counters, and realistic expectations that the win is marginal and shrinks under heavy concurrency. </span></p>
<p><span>Get any of those wrong and you can end up </span><i><span>worse</span></i><span> than a plain build. </span><span><br />
</span><span>Given the size of the benefit versus the number of ways to mess up the training methodology, PGO reads more like a niche optimization for a well-controlled build pipeline than a default you’d flip on broadly.</span></p>
<p><span>I would be more than happy to prove wrong and I am eager to get other people’s feedback, so please test, test, test and let me know. </span></p>
<p> </p>
<p><span>Happy MySQL to everyone</span></p>
<p>Go to:</p>
<p><a href="https://www.percona.com/blog/pgo-or-not-pgo-this-is-the-dilemma-step-1"><span>What is PGO</span></a></p>
<p><a href="https://www.percona.com/blog/pgo-or-not-pgo-this-is-the-dilemma-step-2"><span>How PGO it works</span></a></p>
<p>The post <a href="https://www.percona.com/blog/pgo-or-not-pgo-this-is-the-dilemma-step-3/">PGO or not PGO this is the dilemma. Step 3</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/pgo-or-not-pgo-this-is-the-dilemma-step-3/">PGO or not PGO this is the dilemma. Step 3</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>PGO or not PGO this is the dilemma. Step 2</title>
        <link>https://www.percona.com/blog/pgo-or-not-pgo-this-is-the-dilemma-step-2/</link>
        <pubDate>Fri, 09 Oct 2026 11:47:32 +0000</pubDate>
        <dc:creator>Marco Tusa</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/pgo-or-not-pgo-this-is-the-dilemma-step-2/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Step 2: How it works Given the topic complexity and the length of this article I have split it in 3 three different blog-post: What is PGO How PGO it works Why my sysbench-trained build loses and how to do it right. How PGO works: PGO is a two-pass build. First pass compiles with instrumentation … Continued<br />
The post PGO or not PGO this is the dilemma. Step 2 appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/pgo-or-not-pgo-this-is-the-dilemma-step-2/">PGO or not PGO this is the dilemma. Step 2</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<h2><span>Step 2: How it works</span></h2>
<p><span>Given the topic complexity and the length of this article I have split it in 3 three different blog-post:</span></p>
<ol>
<li><a href="https://www.percona.com/blog/pgo-or-not-pgo-this-is-the-dilemma-step-1"><span>What is PGO</span></a></li>
<li><span>How PGO it works</span></li>
<li><a href="https://www.percona.com/blog/pgo-or-not-pgo-this-is-the-dilemma-step-3"><span>Why my sysbench-trained build loses and how to do it right.</span></a></li>
</ol>
<p><b>How PGO works:</b><span> PGO is a two-pass build. First pass compiles with instrumentation (</span><i><span>-fprofile-generate</span></i><span>): every basic block and branch gets a counter. </span><span><br />
</span><span>You run a training workload, counters are dumped to </span><i><span>profraw </span></i><span>files. </span><span><br />
</span><span>Second pass recompiles using those counts to drive inlining decisions, branch layout (hot path falls through, cold path jumps away), hot/cold function splitting, code ordering for icache/iTLB locality, loop unrolling, and indirect-call promotion. </span><span><br />
</span><span>Crucially, PGO is not “make the trained workload fast” it’s “tell the compiler which code is hot and which is cold, and let it reshape the whole binary accordingly.”</span></p>
<p> </p>
<h3><span>But how does it work?</span></h3>
<p><b>Phase 1: what actually gets recorded.</b><span> The instrumented binary has counters injected at compile time one per edge in the control-flow graph, not just per function. </span><span><br />
</span><span>So for every branch, every loop back-edge, every call site, there’s a counter that increments each time execution takes that path. </span><span><br />
</span><span>This is finer-grained than “function X was called N times” it’s “when we reached this branch, we went left 950,000 times and right 50 times.” </span><span><br />
</span><span>That per-edge granularity is what lets the second phase make surgical decisions rather than just “function X is hot, function Y is cold.”</span></p>
<p><b>Phase 2: what the compiler does with those counts.</b><span> Several distinct transformations, all driven by the same counter data:</span></p>
<p><i><span>Inlining.</span></i> <span><br />
</span><span>Normally the compiler inlines based on static heuristics:</span></p>
<ul>
<li><span>function size call-site count</span></li>
<li><span>estimated cost/benefit. </span></li>
</ul>
<p><span>With profile data it can override those heuristics: a call site executed millions of times gets inlined even if it looks “too expensive” by static cost rules, because the runtime benefit clearly outweighs the code-size cost. </span></p>
<p><span>A call site that’s technically inlinable but sits in dead-cold code gets left as a real call inlining it would only bloat the binary for no benefit.</span></p>
<p><i><span>Branch layout.</span></i> <span><br />
</span><span>Every “if” in our code compiles down to a branch instruction with two possible outcomes: </span></p>
<ul>
<li><span>continue straight to the next instruction</span></li>
<li><span>jump somewhere else. </span></li>
</ul>
<p><span>Continuing straight is basically free; the CPU is already fetching instructions in order, so there’s no extra cost. </span><span><br />
</span><span>Jumping is not free: the CPU has to guess in advance which way a branch will go so it can keep fetching ahead of time, and if it guesses wrong, it has to throw away the work it already queued up and start over from the right place.</span></p>
<p><span>That is the “pipeline bubble,” a small stall. So the “straight through” path is cheap and the “jump elsewhere” path carries a penalty when the guess is wrong. </span></p>
<p><span>The compiler arranges the hot path as the fall-through and pushes the cold path out of line; literally relocated to a separate location in the binary, often into a </span><span>.text.unlikely</span><span> section. </span><span><br />
</span><span>So an </span><span>if (unlikely_error_condition) { …rare handling… }</span><span> block doesn’t sit inline interrupting the hot path anymore; it is moved somewhere else entirely, and the hot path becomes a straight run of instructions with no diversion.</span></p>
<p><i><span>To be clear, reordering our if/else in the source code usually doesn’t change how the compiler lays out the machine code. Optimizing compilers decide branch layout themselves based on either profile data (PGO) or static heuristics, not on which branch we happened to write first in the source. So swapping the order of our if blocks by hand generally has little to no effect on the compiled result.</span></i></p>
<p><i><span>Hot/cold function splitting.</span></i> <span><br />
</span><span>This is the same idea applied within a single function. </span><span><br />
</span><span>A function might have a hot core loop and a rarely-hit error-handling tail. </span><span><br />
</span><span>The compiler physically splits the function into two pieces: </span></p>
<ul>
<li><span>the hot part stays in </span><span>.text.hot</span></li>
<li><span>the cold part moves to </span><span>.text.unlikely</span><span>. </span></li>
</ul>
<p><span>The function still works identically (a jump connects them when needed), but now the hot part is smaller and denser, so more of it fits in an instruction-cache line, and cold code that’s almost never touched isn’t wasting icache space sitting next to it.</span></p>
<p><i><span>Whole-binary function reordering.</span></i><span><br />
</span><span>This is where “reshape the whole binary” becomes literal. </span><span><br />
</span><span>At link time (especially with LTO, which MySQL’s PGO build enables), functions get physically reordered in the final executable so that functions which call each other frequently, or execute in sequence during a hot workload, are placed near each other in memory. </span><span><br />
</span><span>This maximizes instruction-cache and iTLB locality; the CPU’s fetch unit is pulling in a tight cluster of hot functions instead of jumping all over a 100+MB binary. </span><span><br />
</span><span>For something the size of </span><span>mysqld</span><span>, </span><b>this is often the single biggest win</b><span>, because normal builds place functions in </span><b>whatever order the source files happen to be compiled,</b> <b>which has no relationship to runtime call patterns</b><span>.</span></p>
<p><i><span>Indirect-call promotion.</span></i> <span><br />
</span><span>If profile data shows a virtual call or function-pointer call resolves to the same target the overwhelming majority of the time (common in C++ with vtables, e.g. a storage-engine interface with basically only InnoDB registered), the compiler inserts a guarded direct call: “if target == this specific address, call it directly and skip the indirect jump; otherwise fall back to the indirect call.” </span><span><br />
</span><span>Direct calls are cheaper and more predictable for the branch predictor than an indirect jump through a table.</span></p>
<p><i><span>Register allocation and code density trade-offs.</span></i> <span><br />
</span><span>Hot code gets compiled favoring speed, more aggressive unrolling, more registers dedicated to hot-path values. </span><span><br />
</span><span>Cold code, especially with </span><span>-fprofile-partial-training</span><span> and cold-path treatment, gets compiled favoring size, fewer registers, less unrolling because it barely executes. So runtime cost there is irrelevant but its footprint in the binary is not free (it still occupies disk/page-cache space and can evict hot lines from cache if placed carelessly, which is exactly why it gets segregated into </span><span>.text.unlikely</span><span> rather than just left unoptimized in place).</span></p>
<p><i><span>Switch/jump-table lowering.</span></i> <span><br />
</span><span>A switch statement with many cases can be compiled as a jump table (fast, O(1), but requires a full table load and indirect jump) or as a cascade of compares (slower per-case but better branch prediction if one case dominates). </span><span><br />
</span><span>Profile data tells the compiler which case actually dominates in practice and picks accordingly.</span></p>
<p><b>Given the above</b><span>,  “reshape the whole binary” is not metaphorical. The compiler is redrawing the physical layout of machine code in the executable: which instructions are adjacent to which, which code sections are hot and packed tightly versus cold and shoved to the side, which calls are direct versus indirect, and where the CPU’s fetch/prediction effort gets spent. </span><span><br />
</span><span>None of this requires the </span><i><span>values</span></i><span> processed during training to resemble production traffic. It only requires the </span><i><span>shape</span></i><span> of control flow. </span><span><br />
</span><span>Which branches, functions, and paths are frequently exercised to resemble production traffic. </span><span><br />
</span><span>That’s the core reason MTR’s broad-but-different-data coverage transfers well: it walks nearly every code path in mysqld even though the actual queries and data are nothing like a TPCC workload, and control-flow shape is exactly what PGO optimizes for.</span></p>
<p> </p>
<p><a href="https://www.percona.com/blog/pgo-or-not-pgo-this-is-the-dilemma-step-3"><span>Why my sysbench-trained build loses and how to do it right.</span></a></p>
<p>The post <a href="https://www.percona.com/blog/pgo-or-not-pgo-this-is-the-dilemma-step-2/">PGO or not PGO this is the dilemma. Step 2</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/pgo-or-not-pgo-this-is-the-dilemma-step-2/">PGO or not PGO this is the dilemma. Step 2</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>PGO or not PGO this is the dilemma. Step 1</title>
        <link>https://www.percona.com/blog/pgo-or-not-pgo-this-is-the-dilemma-step-1/</link>
        <pubDate>Fri, 09 Oct 2026 11:47:08 +0000</pubDate>
        <dc:creator>Marco Tusa</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/pgo-or-not-pgo-this-is-the-dilemma-step-1/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Given the topic complexity and the length of this article I have split it in 3 three different blog-post: What is PGO How PGO it works Why my sysbench-trained build loses and how to do it right. Step 1: What is PGO PGO (Profile-Guided Optimization) is a two-pass compilation technique.  First, we build the program … Continued<br />
The post PGO or not PGO this is the dilemma. Step 1 appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/pgo-or-not-pgo-this-is-the-dilemma-step-1/">PGO or not PGO this is the dilemma. Step 1</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><span>Given the topic complexity and the length of this article I have split it in 3 three different blog-post:</span></p>
<ol>
<li><span>What is PGO</span></li>
<li><a href="https://www.percona.com/blog/pgo-or-not-pgo-this-is-the-dilemma-step-2"><span>How PGO it works</span></a></li>
<li><a href="https://www.percona.com/blog/pgo-or-not-pgo-this-is-the-dilemma-step-3"><span>Why my sysbench-trained build loses and how to do it right.</span></a></li>
</ol>
<h2><span>Step 1: What is PGO</span></h2>
<p><span>PGO (Profile-Guided Optimization) is a two-pass compilation technique. </span></p>
<p><span>First, we build the program with instrumentation that adds counters to every branch, loop, and call site. </span><span><br />
</span><span>Next, we run it against a representative training workload so these counters can record which code paths are actually hot versus cold. </span><span><br />
</span><span>We then recompile the program using that data to drive the compiler’s decisions.</span></p>
<p><span>With this profiling data, the compiler inlines hot call sites more aggressively and lays out hot paths as straight-line, fall-through code while pushing cold paths out of the way. </span><span><br />
</span><span>Finally, it physically reorders functions in the binary so frequently interacting hot code sits close together for better instruction-cache locality, and converts frequently resolved indirect calls into direct ones.</span><span><br />
</span><span><br />
</span><span>The result isn’t “make the training run fast” but rather “reshape the entire binary’s layout around real execution patterns,” which is why the quality and representativeness of the training workload matters so much to whether PGO actually helps. </span></p>
<h2><span>It is nice to be wrong</span></h2>
<p><span>Not so far ago I was wondering if having Percona Server compiled with PGO default is a good idea or not. Then I started to do some tests and I end up with this:</span></p>
<p><i><span>If I compare non PGO with PGO release I can see an optimization, minimal below 5% but is there.</span></i></p>
<p><i><span>If I compile MySQL using PGO and use as sample the recording of a specific test say sysbench-tpcc my compile will always be slower than my compile without PGO, no mater how many threads I use during recording, I tried from 128 to 1024.</span></i></p>
<p><a href="https://www.percona.com/wp-content/uploads/2026/10/Percona_server_no_pg_vs_ps_marco_sysbench_pgo-scaled.png"><img loading="lazy" decoding="async" class="size-medium_large wp-image-54430 alignleft" src="https://www.percona.com/wp-content/uploads/2026/10/Percona_server_no_pg_vs_ps_marco_sysbench_pgo-768x337.png" alt="" width="768" height="337"></a></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p><span>Given my understanding of PGO was that it should be the other way around I was a bit disoriented. So I decided to read a bit and get a better understanding of what PGO really means/does and if it makes sense or not.</span></p>
<p> </p>
<p><a href="https://www.percona.com/blog/pgo-or-not-pgo-this-is-the-dilemma-step-2"><span>How PGO it works</span></a></p>
<p>The post <a href="https://www.percona.com/blog/pgo-or-not-pgo-this-is-the-dilemma-step-1/">PGO or not PGO this is the dilemma. Step 1</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/pgo-or-not-pgo-this-is-the-dilemma-step-1/">PGO or not PGO this is the dilemma. Step 1</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Welcome to PGConf.EU Valencia!</title>
        <link>https://percona.community/blog/2026/10/09/pgconf-eu-valencia/</link>
        <pubDate>Fri, 09 Oct 2026 07:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/welcome-to-pgconf-eu-valencia/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>PGConf.EU is right around the corner! This year, we’re heading to Valencia for three days of talks on October 20-22, followed by the Community Events Day on Friday, October 23.</p>
<p><a href="https://percona.community/blog/2026/10/09/pgconf-eu-valencia/">Welcome to PGConf.EU Valencia!</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><a href="https://2026.pgconf.eu/" target="_blank" rel="noopener noreferrer">PGConf.EU</a> is right around the corner! This year, we’re heading to Valencia for three days of talks on October 20-22, followed by the Community Events Day on Friday, October 23.</p>
<p><figure><img decoding="async" src="https://percona.community/blog/2026/09/pgconf-eu-valencia-welcome.svg" alt="PGConf.EU 2026 in Valencia"></figure>
</p>
<p>I’m excited to get there for several reasons, and I’d like to share some of that excitement with you all <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<h2>A first look behind the scenes</h2>
<p>I’m currently serving as PostgreSQL Europe Vice-Treasurer, and this is my first time on the conference organising team. And I must say, seeing the work behind the scenes gives me a whole new appreciation for the event.</p>
<p>Moving to a larger conference centre, with more space and comfort for attendees, speakers and sponsors, is a real challenge. The whole team is working hard to make it a great experience for everyone.</p>
<p>Kudos to <a href="https://2026.pgconf.eu/organisation/" target="_blank" rel="noopener noreferrer">everyone involved</a>, especially Martin Marques, our local point of contact, who helped bring PostgreSQL Europe to Valencia!</p>
<h2>Let’s talk about pgBackRest</h2>
<p>Of course, I won’t just be wearing my staff shirt. I also have the pleasure of presenting a talk about my beloved backup tool: <a href="https://www.postgresql.eu/events/pgconfeu2026/schedule/session/8238-pgbackrest-in-ha-setups-deployment-patterns-that-work/" target="_blank" rel="noopener noreferrer">pgBackRest in HA setups: deployment patterns that work</a>.</p>
<p>If you’ve read my blog or attended one of my talks, you probably know that backups, disaster recovery and high availability are topics I enjoy quite a bit. This time, we’ll look at how to deploy pgBackRest in HA environments.</p>
<p>pgBackRest can fit many different setups: a dedicated backup host, backups taken from standby servers, or data sent directly to cloud storage. Yet many users only use a fraction of those possibilities. We’ll explore deployment patterns and how to choose an architecture that fits your environment and recovery requirements.</p>
<p>The session is on Tuesday at 16:05 in Audit 2. If you’re curious about the topic, come along <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p><figure><img decoding="async" width="400" height="212" src="https://percona.community/blog/2026/09/pgconf-eu-valencia-pgstef-talk-card_hu_f2b55eb8f2dfc545.webp" alt="Stefan Fercot’s talk card" loading="lazy"></figure>
</p>
<p>I’m especially excited because I won’t be the only one talking about pgBackRest. David Steele, the project’s author and lead developer, will be there too! Together with Jan Wieremjewicz from Percona, he’ll present <a href="https://www.postgresql.eu/events/pgconfeu2026/schedule/session/7963-the-monday-we-learned-who-maintains-our-backups/" target="_blank" rel="noopener noreferrer">The Monday We Learned Who Maintains Our Backups</a>, revisiting what happened in April when pgBackRest was marked as no longer maintained, and what followed.</p>
<p>Their session is in the same room at 14:45, in the slot before mine, with a tea break in between. A good afternoon for anyone interested in pgBackRest!</p>
<p>I’m also really happy to see David again. I first met him at PGConf.EU in Milan in 2019, and we haven’t had many opportunities to meet at conferences in recent years. Whether you already use pgBackRest or are just considering it, Valencia will be a great place to ask questions and meet the people behind the project.</p>
<h2>Too many talks, too little time</h2>
<p>With three days of talks across multiple tracks, choosing what to attend (and, inevitably, what to miss) won’t be easy. Here are a few of my personal picks:</p>
<ul>
<li>
<p><a href="https://www.postgresql.eu/events/pgconfeu2026/schedule/session/8058-is-postgresql-on-my-raspberry-pi-faster-than-your-cloud-instance/" target="_blank" rel="noopener noreferrer"><strong>Is PostgreSQL On My Raspberry Pi Faster Than Your Cloud Instance</strong></a>, by <strong>Chris Ellis</strong>. Chris always brings a bit of fun to his talks, so I’m always happy to attend them!</p>
</li>
<li>
<p><a href="https://www.postgresql.eu/events/pgconfeu2026/schedule/session/8066-community-moments-that-shaped-30-years-of-postgresql/" target="_blank" rel="noopener noreferrer"><strong>Community Moments That Shaped 30 Years of PostgreSQL</strong></a>, by <strong>Valeria Kaplan</strong>. PostgreSQL turned 30 this year. After attending the <a href="https://2026.pgconf.dev/session/670" target="_blank" rel="noopener noreferrer">roundtable retrospective at PGConf.dev</a> last May, I’m curious to see which moments Valeria has chosen to share.</p>
</li>
<li>
<p><a href="https://www.postgresql.eu/events/pgconfeu2026/schedule/session/8120-autovacuum-is-running-is-it-actually-working/" target="_blank" rel="noopener noreferrer"><strong>Autovacuum Is Running. Is It Actually Working?</strong></a>, by <strong>Teresa Lopes</strong>. Everyone loves autovacuum, right? As Teresa puts it: <em>“The problem is not vacuum. The problem is misconfiguration.”</em></p>
</li>
<li>
<p><a href="https://www.postgresql.eu/events/pgconfeu2026/schedule/session/8341-exercising-postgresql-performance-enhancing-patches/" target="_blank" rel="noopener noreferrer"><strong>Exercising PostgreSQL Performance Enhancing Patches</strong></a>, by <strong>Melanie Plageman</strong>. Evaluating the performance impact of a patch is far from straightforward. I’m looking forward to learning more about how Melanie approaches it.</p>
</li>
<li>
<p><a href="https://www.postgresql.eu/events/pgconfeu2026/schedule/session/8275-what-is-patroni-really/" target="_blank" rel="noopener noreferrer"><strong>What is Patroni, really?</strong></a>, by <strong>Alexander Kukushkin</strong> and <strong>Polina Bungina</strong>. Have I mentioned that Patroni is my second-favourite tool? This is probably my must-attend session on Wednesday.</p>
</li>
<li>
<p><a href="https://www.postgresql.eu/events/pgconfeu2026/schedule/session/7904-a-demo-only-tour-through-postgresql-19/" target="_blank" rel="noopener noreferrer"><strong>A demo only tour through PostgreSQL 19</strong></a>, by <strong>Daniel Westermann</strong>. Daniel expected PostgreSQL 19 to be out by the conference. His forecast looks pretty close: the release is currently <a href="https://hackorum.dev/topics/253972" target="_blank" rel="noopener noreferrer">planned for October 29</a>. Either way, a tour through live demos sounds like a fun way to start the last day of talks.</p>
</li>
<li>
<p><a href="https://www.postgresql.eu/events/pgconfeu2026/schedule/session/8310-postgres-before-postgresql-stories-from-inside-the-original-berkeley-lab/" target="_blank" rel="noopener noreferrer"><strong>Postgres Before PostgreSQL: Stories from Inside the Original Berkeley Lab</strong></a>, by <strong>Ellyne Phneah</strong>. There’s always room for more PostgreSQL stories, especially when Ellyne is telling them <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
</li>
<li>
<p><a href="https://www.postgresql.eu/events/pgconfeu2026/schedule/session/7858-can-we-skip-recovery-the-architecture-of-on-demand-wal-replay/" target="_blank" rel="noopener noreferrer"><strong>Can We Skip Recovery? The Architecture of On-Demand WAL Replay</strong></a>, by <strong>Srinath Reddy Sadipiralla</strong>. Recovery is a topic I keep coming back to. I’m always curious to hear different approaches and explore what might be improved.</p>
</li>
<li>
<p><a href="https://www.postgresql.eu/events/pgconfeu2026/schedule/session/8186-identifying-bottlenecks-in-postgres-workloads/" target="_blank" rel="noopener noreferrer"><strong>Identifying bottlenecks in Postgres workloads</strong></a>, by <strong>Andres Freund</strong>. From my years as a DBA and PostgreSQL consultant, I know how much time can go into finding the actual bottleneck. I’m looking forward to hearing how Andres approaches that investigation.</p>
</li>
<li>
<p><a href="https://www.postgresql.eu/events/pgconfeu2026/schedule/session/8319-what-actually-goes-wrong-with-postgres-on-kubernetes/" target="_blank" rel="noopener noreferrer"><strong>What Actually Goes Wrong with Postgres on Kubernetes</strong></a>, by <strong>Natalia Marukovich</strong>. Running PostgreSQL on Kubernetes comes with its own challenges. I’m interested in hearing about the things that go wrong and what we can learn from them.</p>
</li>
</ul>
<p>And those are only a few highlights! Check the <a href="https://www.postgresql.eu/events/pgconfeu2026/schedule/" target="_blank" rel="noopener noreferrer">full schedule</a> and pick yours.</p>
<p>Of course, I’ll also try to leave some time for what is, in my opinion, the most important track: the hallway track <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Catching up over coffee, asking a question after a session, or discussing an unexpected problem is a big part of why I enjoy these technical events. Tuesday evening’s <em>PostgreSQL Europe Reception</em> will be another opportunity to continue those conversations.</p>
<h2>A day for the wider community</h2>
<p>Friday, October 23, is dedicated to the <a href="https://2026.pgconf.eu/community-day/" target="_blank" rel="noopener noreferrer">Community Events Day</a>. Now in its second edition, it brings together events led by community members, with room for broader discussions about PostgreSQL and its ecosystem.</p>
<p>One discussion particularly close to my heart is <strong>“A Postgres Ecosystem Foundation?”</strong></p>
<p>We rely on so many projects around PostgreSQL to operate our databases, connect our applications and extend what the database can do. I feel that bringing this wider ecosystem together could help both the people maintaining those projects and the users trying to find their way through it.</p>
<p>The road towards a foundation may be long and winding, but I’m looking forward to discussing what it could achieve and how we might get there.</p>
<h2>Meeting my new colleagues, too</h2>
<p>Having recently joined Percona, I have another reason to look forward to Valencia: many of my new colleagues will be there.</p>
<p>I’m excited to meet them in person, spend time together during our planned team meetings and activities, and catch up around the sponsor booth. <a href="https://2026.pgconf.eu/sponsors/" target="_blank" rel="noopener noreferrer">Percona is a Gold Sponsor</a>, so we’ll have a stand at the conference. I’ve also heard there will be plenty of stickers… <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f92b.png" alt="🤫" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<h2>See you in Valencia!</h2>
<p>If you haven’t decided to join yet, have I convinced you? And if you’d like to explore the city beyond the conference venue, the website has a <a href="https://2026.pgconf.eu/things-to-do/" target="_blank" rel="noopener noreferrer">things to do in Valencia</a> section too. So many good reasons to make the trip <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f600.png" alt="😀" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>I’m looking forward to seeing familiar faces and meeting plenty of new people. Between organising duties, talks and the Percona booth, I might be moving around quite a bit, but don’t hesitate to come and say hi if you catch me!</p>
<p><a href="https://percona.community/blog/2026/10/09/pgconf-eu-valencia/">Welcome to PGConf.EU Valencia!</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Step by Step: ProxySQL HA with BGP ECMP Anycast</title>
        <link>https://percona.community/blog/2026/10/08/step-by-step-proxysql-ha-with-bgp-ecmp-anycast/</link>
        <pubDate>Thu, 08 Oct 2026 18:50:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/step-by-step-proxysql-ha-with-bgp-ecmp-anycast/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>In our previous blog post ProxySQL HA with BGP ECMP Anycast, we established why we would want to use BGP ECMP as a strategy for making our ProxySQL cluster highly available. Now let’s look at how to implement it technically.</p>
<p><a href="https://percona.community/blog/2026/10/08/step-by-step-proxysql-ha-with-bgp-ecmp-anycast/">Step by Step: ProxySQL HA with BGP ECMP Anycast</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>In our previous blog post <a href="https://percona.community/blog/2026/09/07/proxysql-ha-with-bgp-ecmp-anycast/">ProxySQL HA with BGP ECMP Anycast</a>, we established why we would want to use BGP ECMP as a strategy for making our ProxySQL cluster highly available. Now let’s look at how to implement it technically.</p>
<p>For this scenario we assume that we have:</p>
<ul>
<li>an OPNsense instance as our BGP Router with the IP address <code>10.5.8.251</code></li>
<li>Two ProxySQL nodes (proxysql-01 with IP <code>10.5.20.4</code> and proxysql-02 with IP <code>10.5.20.5</code>)</li>
<li><code>10.5.200.1</code> as the anycast IP we want both ProxySQL nodes to accept connections on</li>
</ul>
<h2>Setup on the router</h2>
<h3>Enable BGP on OPNsense</h3>
<p>The out-of-the-box installation of OPNsense does not come with BGP support. To add it, install the FRRouting package first (<code>os-frr</code>), which will enable available protocols for dynamic routing.</p>
<p>Install the <code>os-frr</code> plugin in System -&gt; Firmware -&gt; Plugins.</p>
<p><figure><img decoding="async" width="1412" height="264" src="https://percona.community/blog/2026/10/step-by-step-opnsense-plugin_hu_fba90df71c74e8e3.webp" alt="OPNsense Plugin" loading="lazy"></figure>
</p>
<p>We need to activate the routing service on our OPNsense host.</p>
<ul>
<li>In Routing -&gt; General check “enable”</li>
</ul>
<p><figure><img decoding="async" width="2984" height="698" src="https://percona.community/blog/2026/10/step-by-step-opnsense-frr-enable-routing_hu_9efa9097dca2c77b.webp" alt="OPNsense Enable Routing" loading="lazy"></figure>
</p>
<p>Next, assign an Autonomous System (AS) number to the OPNsense BGP peer.<br />
An AS number identifies a network, or a group of routers, under a single administrative domain.<br />
Choose a private AS number from the range 64512-65534.</p>
<p>In Routing -&gt; BGP (advanced mode):</p>
<ul>
<li>check “enable”.</li>
<li>set the chosen AS number (in this example we use <code>64512</code>).</li>
<li>set Maximum Paths to 2 to match the number of ProxySQL nodes that we have.</li>
</ul>
<p>Maximum Paths configures OPNsense to perform Equal-Cost Multi-Path (ECMP) load balancing across the two paths.<br />
Any additional paths are kept as backups and only used if an active route is withdrawn.</p>
<p><figure><img decoding="async" width="756" height="648" src="https://percona.community/blog/2026/10/step-by-step-opnsense-bgp-routing_hu_f58dfe96d892be31.webp" alt="OPNsense BGP Routing" loading="lazy"></figure>
</p>
<h3>Create a firewall rule for BGP traffic</h3>
<p>BGP exchanges routing information through a TCP connection on port 179.<br />
Our ProxySQL nodes will establish this connection towards OPNsense, so we need a firewall rule to allow this traffic.</p>
<p>First, we will create an alias for the ProxySQL nodes. This keeps the firewall rule readable, and new nodes only need to be added in one place.</p>
<p>In Firewall -&gt; Aliases, add:</p>
<ul>
<li><strong>Name:</strong> <code>proxysql_nodes</code></li>
<li><strong>Type:</strong> Host(s)</li>
<li><strong>Content:</strong> <code>10.5.20.4</code>, <code>10.5.20.5</code> (The IP addresses of our ProxySQL nodes)</li>
</ul>
<p><figure><img decoding="async" width="1195" height="580" src="https://percona.community/blog/2026/10/step-by-step-opnsense-alias_hu_983befdd323eb875.webp" alt="OPNsense Alias" loading="lazy"></figure>
</p>
<p>With the Alias in place, we can now continue to define the actual Firewall rule:</p>
<p>Navigate to Firewall -&gt; Rules and create a new rule:</p>
<ul>
<li><strong>Description:</strong> Allow ProxySQL network to BGP peer with OPNsense</li>
<li><strong>Interface:</strong> Select the interface the ProxySQL nodes are in.</li>
<li><strong>Action:</strong> Pass</li>
<li><strong>Direction:</strong> in</li>
<li><strong>Version:</strong> IPv4</li>
<li><strong>Protocol:</strong> TCP</li>
<li><strong>Source:</strong> <code>proxysql_nodes</code> (the alias we created in the previous step)</li>
<li><strong>Source port:</strong> any</li>
<li><strong>Destination:</strong> the OPNsense address the ProxySQL nodes peer with (<code>10.5.8.251</code>)</li>
<li><strong>Destination port:</strong> BGP (179)</li>
</ul>
<p>Note, here we do not explicitly enable logging. It may be helpful to enable logging that if you need to debug the BGP peering.</p>
<p><figure><img decoding="async" width="896" height="1085" src="https://percona.community/blog/2026/10/step-by-step-opnsense-firewall-rule-bgp-alias_hu_c31879523e744fb8.webp" alt="OPNsense Firewall Rule BGP Alias" loading="lazy"></figure>
</p>
<h3>Set up route filtering with a prefix list</h3>
<p>We need to set up an inbound filter using a prefix list.<br />
The prefix list defines the networks that OPNsense will accept routes for, and should be as narrow as possible to prevent a misbehaving peer from advertising routes that could re-route sensitive traffic through it.</p>
<p>Prefix lists are configured in Routing -&gt; BGP -&gt; Prefix Lists.<br />
Create the prefix list:</p>
<ul>
<li><strong>Description</strong>: <code>ProxySQL Anycast IP</code></li>
<li><strong>Name</strong>: <code>ANYCAST-PROXYSQL-IN</code></li>
<li><strong>IP Version</strong>: IPV4</li>
<li><strong>Sequence Number</strong>: for this example we use <code>10</code>. Sequence numbers are used in order to set the order with which to apply the rules, in case you would have multiple rules for the same prefix list. We only need to create one entry for the ProxySQL Anycast IP.</li>
<li><strong>Action</strong>: <code>Permit</code>, as we want to allow the ProxySQL Anycast IP.</li>
<li><strong>Network</strong>: <code>10.5.200.1/32</code>, the Anycast IP of our ProxySQL nodes.</li>
</ul>
<blockquote>
<p><strong>Tip:</strong> Click the ⓘ icon next to a field in the OPNsense UI for more information.</p>
</blockquote>
<p><figure><img decoding="async" width="894" height="693" src="https://percona.community/blog/2026/10/step-by-step-opnsense-create-prefix-list_hu_959b307cd265af60.webp" alt="OPNsense Create Prefix List" loading="lazy"></figure>
</p>
<h3>Configure BGP neighbors</h3>
<p>In this step we will configure OPNsense to know about our ProxySQL servers and their intent to peer.<br />
Neighbor configuration defines which IPs are allowed to speak the BGP protocol with OPNsense. In our case, we need to define a neighbor for both of our ProxySQL hosts:</p>
<p>Choose a unique AS number for the cluster. All ProxySQL nodes belonging to this cluster will share this AS number, whilst separate clusters must use different, dedicated AS numbers.<br />
Ensure that the cluster AS number is distinct from the one configured for OPNsense.<br />
For this example we choose the AS number <code>64513</code>.</p>
<p>Navigate to Routing -&gt; BGP -&gt; Neighbors and add a new one.</p>
<ul>
<li><strong>Description</strong>: ProxySQL-01</li>
<li><strong>Peer-IP</strong>: 10.5.20.4</li>
<li><strong>Remote AS</strong>: 64513</li>
<li><strong>Local AS</strong>: 64512</li>
<li><strong>Prefix-List In</strong>: ANYCAST-PROXYSQL-IN:10</li>
</ul>
<p>Make sure you repeat this for the second ProxySQL.</p>
<p><figure><img decoding="async" width="922" height="1006" src="https://percona.community/blog/2026/10/step-by-step-opnsense-bgp-neighbor_hu_200a8f376f883a4e.webp" alt="OPNsense BGP Neighbor" loading="lazy"></figure>
</p>
<p>All configurable BGP options can be found in the <a href="https://docs.opnsense.org/manual/dynamic_routing.html#bgp-section" target="_blank" rel="noopener noreferrer">OPNsense documentation</a>.</p>
<h2>Setup on the ProxySQL nodes</h2>
<p>Next, assign the anycast virtual IP (<code>10.5.200.1</code>) to the loopback interface of each ProxySQL node, so that the node accepts traffic intended for that IP address.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># Add the Anycast VIP to the loopback interface</span>
</span></span><span class="line"><span class="cl">sudo ip addr add 10.5.200.1/32 dev lo</span></span></code></pre>
</div>
</div>
</div>
<p>Make the address persistent across reboots by adding it to netplan, systemd-networkd or <code>/etc/network/interfaces</code>.</p>
<h3>Install ExaBGP</h3>
<p>ExaBGP is a tool that can speak the BGP protocol with OPNsense and is able to announce / withdraw routes.</p>
<p>Install ExaBGP on the ProxySQL hosts with:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo apt-get update
</span></span><span class="line"><span class="cl">sudo apt-get install exabgp</span></span></code></pre>
</div>
</div>
</div>
<p>For information on installing ExaBGP on other distributions, you can check the <a href="https://github.com/Exa-Networks/exabgp/wiki/Installation-Guide" target="_blank" rel="noopener noreferrer">ExaBGP wiki here</a>.</p>
<p>Note that BIRD (BIRD Internet Routing Daemon) or FRR can be used as alternative tools to ExaBGP, but in this example we will go with ExaBGP.</p>
<h3>Create the health check</h3>
<p>As we only want to route traffic to a ProxySQL host when the ProxySQL process is running, we need a way to tell ExaBGP when to announce the route and when to withdraw it.<br />
We will write a health check script that ExaBGP can execute to determine the state of our ProxySQL process.<br />
If this health check fails, ExaBGP withdraws the node’s route from OPNsense. OPNsense removes that node as an anycast next hop, and routes the traffic to the remaining healthy nodes.</p>
<p>In our example, we will use a simple bash script that uses <code>mysqladmin</code> to send a <code>PING</code> to ProxySQL:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-2" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="cp">#!/usr/bin/env bash
</span></span></span><span class="line"><span class="cl"><span class="cp"></span>
</span></span><span class="line"><span class="cl"><span class="nv">ANYCAST_IP</span><span class="o">=</span><span class="s2">"10.5.200.1/32"</span>
</span></span><span class="line"><span class="cl"><span class="nv">FAILED</span><span class="o">=</span><span class="m">1</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">while</span> true<span class="p">;</span> <span class="k">do</span>
</span></span><span class="line"><span class="cl"> <span class="c1"># Execute the health check command and depending on the return code</span>
</span></span><span class="line"><span class="cl"> <span class="c1"># announce or withdraw the route.</span>
</span></span><span class="line"><span class="cl"> mysqladmin --defaults-extra-file<span class="o">=</span>/etc/exabgp/proxysql-monitor.cnf --connect-timeout<span class="o">=</span><span class="m">2</span> ping <span class="p">&amp;</span>&gt; /dev/null
</span></span><span class="line"><span class="cl"> <span class="nv">STATUS</span><span class="o">=</span><span class="nv">$?</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> <span class="k">if</span> <span class="o">[</span> <span class="nv">$STATUS</span> -eq <span class="m">0</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
</span></span><span class="line"><span class="cl"> <span class="k">if</span> <span class="o">[</span> <span class="nv">$FAILED</span> -ne <span class="m">0</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
</span></span><span class="line"><span class="cl"> <span class="c1"># Recovered: Announce route</span>
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> <span class="s2">"announce route </span><span class="nv">$ANYCAST_IP</span><span class="s2"> next-hop self"</span>
</span></span><span class="line"><span class="cl"> <span class="nv">FAILED</span><span class="o">=</span><span class="m">0</span>
</span></span><span class="line"><span class="cl"> <span class="k">fi</span>
</span></span><span class="line"><span class="cl"> <span class="k">else</span>
</span></span><span class="line"><span class="cl"> <span class="k">if</span> <span class="o">[</span> <span class="nv">$FAILED</span> -eq <span class="m">0</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
</span></span><span class="line"><span class="cl"> <span class="c1"># Health check failed: Withdraw route</span>
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> <span class="s2">"withdraw route </span><span class="nv">$ANYCAST_IP</span><span class="s2"> next-hop self"</span>
</span></span><span class="line"><span class="cl"> <span class="nv">FAILED</span><span class="o">=</span><span class="m">1</span>
</span></span><span class="line"><span class="cl"> <span class="k">fi</span>
</span></span><span class="line"><span class="cl"> <span class="k">fi</span>
</span></span><span class="line"><span class="cl"> sleep <span class="m">2</span>
</span></span><span class="line"><span class="cl"><span class="k">done</span></span></span></code></pre>
</div>
</div>
</div>
<p>Save the health check file as <code>/etc/exabgp/healthcheck-proxysql</code>, and make it executable with <code>chmod +x /etc/exabgp/healthcheck-proxysql</code>.</p>
<p>To avoid passwords in the check script, we tell mysqladmin to load them from a separate file. Create that file (<code>/etc/exabgp/proxysql-monitor.cnf</code>) with the credentials that you want the check to use to connect to ProxySQL:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-3" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="o">[</span>client<span class="o">]</span>
</span></span><span class="line"><span class="cl"><span class="nv">user</span><span class="o">=</span>user
</span></span><span class="line"><span class="cl"><span class="nv">password</span><span class="o">=</span>password
</span></span><span class="line"><span class="cl"><span class="nv">host</span><span class="o">=</span>127.0.0.1
</span></span><span class="line"><span class="cl"><span class="nv">port</span><span class="o">=</span><span class="m">6033</span></span></span></code></pre>
</div>
</div>
</div>
<p>Ensure that you replace “user” and “password” with your actual user credentials. Restrict the file permissions with:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-4" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo chown exabgp:exabgp /etc/exabgp/proxysql-monitor.cnf
</span></span><span class="line"><span class="cl">sudo chmod <span class="m">600</span> /etc/exabgp/proxysql-monitor.cnf</span></span></code></pre>
</div>
</div>
</div>
<p>In our example, the script only checks if connecting to ProxySQL succeeds, and not whether ProxySQL can reach any backend servers.<br />
The checks you come up with should ideally only test the readiness of the ProxySQL process, regardless of the health of the MySQL nodes behind it. Otherwise you might get unwanted side effects. For example:<br />
you could write a check to verify whether there are hosts with status <code>ONLINE</code> in the <code>runtime_mysql_servers</code> table. At first it might sound like a good idea, as a misconfigured ProxySQL server would be taken offline.<br />
BUT: In case your MySQL cluster is experiencing a downtime, ALL ProxySQLs will withdraw their routes, causing clients to see timeouts instead of potentially helpful error messages. Define your health checks carefully based on your specific architecture.</p>
<h3>Configuring ExaBGP</h3>
<p>ExaBGP configuration lives in the <code>/etc/exabgp/exabgp.conf</code> file. You can find full details on what can be configured there in the <a href="https://github.com/Exa-Networks/exabgp/wiki/Configuration-Syntax" target="_blank" rel="noopener noreferrer">ExaBGP documentation</a>.<br />
For the purpose of this blog post, we will define three blocks.</p>
<ul>
<li>The <code>process</code> block defines the path to the health check script.</li>
<li>The <code>template</code> block defines the BGP settings and which health check process to run.</li>
<li>Each <code>neighbor</code> block defines the router we want ExaBGP to peer with.</li>
</ul>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-5" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># -------------------------------------------------------------------</span>
</span></span><span class="line"><span class="cl"><span class="c1"># Process Definitions</span>
</span></span><span class="line"><span class="cl"><span class="c1"># -------------------------------------------------------------------</span>
</span></span><span class="line"><span class="cl">process proxysql-healthcheck <span class="o">{</span>
</span></span><span class="line"><span class="cl"> run <span class="s2">"/etc/exabgp/healthcheck-proxysql"</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> encoder text<span class="p">;</span>
</span></span><span class="line"><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># -------------------------------------------------------------------</span>
</span></span><span class="line"><span class="cl"><span class="c1"># Neighbor Templates</span>
</span></span><span class="line"><span class="cl"><span class="c1"># -------------------------------------------------------------------</span>
</span></span><span class="line"><span class="cl">template <span class="o">{</span>
</span></span><span class="line"><span class="cl"> neighbor opnsense-nodes <span class="o">{</span>
</span></span><span class="line"><span class="cl"> router-id 10.5.20.4<span class="p">;</span>
</span></span><span class="line"><span class="cl"> local-as 64513<span class="p">;</span>
</span></span><span class="line"><span class="cl"> peer-as 64512<span class="p">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> api <span class="o">{</span>
</span></span><span class="line"><span class="cl"> processes <span class="o">[</span> proxysql-healthcheck <span class="o">]</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="o">}</span>
</span></span><span class="line"><span class="cl"> <span class="o">}</span>
</span></span><span class="line"><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># -------------------------------------------------------------------</span>
</span></span><span class="line"><span class="cl"><span class="c1"># OPNsense nodes</span>
</span></span><span class="line"><span class="cl"><span class="c1"># -------------------------------------------------------------------</span>
</span></span><span class="line"><span class="cl">neighbor 10.5.8.251 <span class="o">{</span>
</span></span><span class="line"><span class="cl"> inherit opnsense-nodes<span class="p">;</span>
</span></span><span class="line"><span class="cl"> local-address 10.5.20.4<span class="p">;</span>
</span></span><span class="line"><span class="cl"><span class="o">}</span></span></span></code></pre>
</div>
</div>
</div>
<p>Create the file on proxysql-01 and proxysql-02, but make sure to update the neighbor and template block. The router-id and local-address should be set to <code>10.5.20.5</code> on proxysql-02.</p>
<p>Once you have created this file, restart ExaBGP.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-6" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">systemctl restart exabgp</span></span></code></pre>
</div>
</div>
</div>
<p>You can check the status of ExaBGP by running <code>exabgpcli show neighbor summary</code> on the ProxySQL hosts.</p>
<h3>An overview of the workflow for a healthy ProxySQL node</h3>
<ul>
<li>ExaBGP starts the health check script that we configured in exabgp.conf</li>
<li>The script sees that ProxySQL is running, and outputs <code>announce route 10.5.200.1/32 next-hop self</code>.</li>
<li>ExaBGP receives this output and sends a BGP UPDATE message to OPNsense.</li>
<li>OPNsense adds the ProxySQL node as potential “next hop” to its routing table for 10.5.200.1.</li>
</ul>
<p>If the health checks detects that ProxySQL is not running, it will output <code>withdraw route 10.5.200.1/32 next-hop self</code>, which tells ExaBGP to send a BGP update for OPNsense to remove that route from its routing table.<br />
The traffic is redistributed to the remaining healthy ProxySQL node.</p>
<h3>Check BGP ECMP is configured correctly</h3>
<h4>Check the firewall</h4>
<p>Ensure that the firewall is not blocking traffic by navigating to Firewall -&gt; Log Files -&gt; Live View. Make sure you have enabled logging in the firewall rule you created.<br />
Filter for “address” “is” “10.5.200.1” and check that the connections are not blocked.</p>
<h4>Check ExaBGP on the ProxySQL</h4>
<p>Run the health check on the ProxySQL to confirm that the ProxySQL reports that it is healthy, and announces the route.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-7" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo -u exabgp /etc/exabgp/healthcheck-proxysql</span></span></code></pre>
</div>
</div>
</div>
<p>You should see output like:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-8" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">announce route 10.5.200.1/32 next-hop self</span></span></code></pre>
</div>
</div>
</div>
<p>Check that ExaBGP announces the route with:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-9" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">exabgpcli show adj-rib out</span></span></code></pre>
</div>
</div>
</div>
<p>You should see output like:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-10" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">neighbor 10.5.8.251 ipv4 unicast 10.5.200.1/32 next-hop self</span></span></code></pre>
</div>
</div>
</div>
<p>Check that ExaBGP has an established BGP session to OPNsense with:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-11" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">exabgpcli show neighbor summary</span></span></code></pre>
</div>
</div>
</div>
<p>You want to see that the state is <code>established</code>. State <code>active</code> means “ready to connect”, but no connection is actually made.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-12" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">Peer AS up/down state <span class="p">|</span> <span class="c1">#sent #recvd</span>
</span></span><span class="line"><span class="cl">10.5.8.251 <span class="m">64512</span> 0:00:57 established <span class="m">2</span> <span class="m">6</span></span></span></code></pre>
</div>
</div>
</div>
<h4>Verify the BGP connections and routes on OPNsense.</h4>
<p>Navigate to Routing -&gt; Diagnostics -&gt; BGP to check the routing status.<br />
The Anycast IP should appear twice, one entry for each ProxySQL. Both entries should be marked <code>valid</code>.<br />
The path should show the AS number <code>64513</code>.</p>
<p><figure><img decoding="async" width="4288" height="992" src="https://percona.community/blog/2026/10/step-by-step-opnsense-bgp-diagnostics-routing-table_hu_66293039f48a63b3.webp" alt="OPNsense BGP Diagnostics Routing Table" loading="lazy"></figure>
</p>
<p>BGP always selects a single best path. With Maximum Paths set, the other equal-cost paths are also installed in the routing table and are flagged as multipath.<br />
You can also run <code>vtysh</code> on the OPNsense CLI to check this:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-13" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">vtysh -c <span class="s2">"show ip route 10.5.200.1/32"</span></span></span></code></pre>
</div>
</div>
</div>
<p>You should see an entry like:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-14" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">Routing entry <span class="k">for</span> 10.5.200.1/32
</span></span><span class="line"><span class="cl"> Known via <span class="s2">"bgp"</span>, distance 20, metric 0, best
</span></span><span class="line"><span class="cl"> Last update 00:05:12 ago
</span></span><span class="line"><span class="cl"> Flags: Selected
</span></span><span class="line"><span class="cl"> Status: Installed
</span></span><span class="line"><span class="cl"> * 10.5.20.4, via vtnet1, weight <span class="m">1</span>
</span></span><span class="line"><span class="cl"> * 10.5.20.5, via vtnet1, weight <span class="m">1</span></span></span></code></pre>
</div>
</div>
</div>
<p>The <code>*</code> next to each result shows that this is an active next-hop path.<br />
Because the two results share the same weight (<code>1</code>), ECMP is active, and OPNsense will load balance the tcp connections equally across the two routes.</p>
<h3>Summary</h3>
<p>In this blog post we stepped through an example setup of BGP ECMP Anycast for ProxySQL. We configured OPNsense to accept anycast routes from our ProxySQL nodes and load-balance across them. On each node, ExaBGP announces the route whilst ProxySQL is healthy and withdraws the route when ProxySQL fails. To scale the cluster, add the new node to the proxysql_nodes alias, create a BGP neighbor for it, and raise Maximum Paths to match the new node count.</p>
<p><em>This post is part of the <a href="https://percona.community/blog/write-for-percona-community/">Percona Community Writers Program</a>.</em></p>
<p><a href="https://percona.community/blog/2026/10/08/step-by-step-proxysql-ha-with-bgp-ecmp-anycast/">Step by Step: ProxySQL HA with BGP ECMP Anycast</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Your Galera cluster’s hardest problem was never the replication library</title>
        <link>https://www.percona.com/blog/your-galera-clusters-hardest-problem-was-never-the-replication-library/</link>
        <pubDate>Thu, 08 Oct 2026 16:07:52 +0000</pubDate>
        <dc:creator>Valeria Bogatyreva</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/your-galera-clusters-hardest-problem-was-never-the-replication-library/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Ask anyone who runs a multi-node MySQL Galera Cluster in production about their worst night. Almost nobody says write-set replication was wrong. They say something closer to this: “All queries piling up… no error messages in logs.” Twenty minutes of downtime, ended only when a human picked a node to kill. (codership-team) Or the flow-control … Continued<br />
The post Your Galera cluster’s hardest problem was never the replication library appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/your-galera-clusters-hardest-problem-was-never-the-replication-library/">Your Galera cluster’s hardest problem was never the replication library</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><span>Ask anyone who runs a multi-node MySQL Galera Cluster in production about their worst night. Almost nobody says write-set replication was wrong. They say something closer to this:</span></p>
<p><i><span>“All queries piling up… no error messages in logs.”</span></i></p>
<p><span>Twenty minutes of downtime, ended only when a human picked a node to kill. (</span><a href="https://groups.google.com/g/codership-team/c/KJI1JyE9tuI"><span>codership-team</span></a><span>)</span></p>
<p><span>Or the flow-control stall where writes time out and </span><span>wsrep_flow_control_sent</span><span> still reads 0, so there’s nothing to alert on and nothing to write in the post-mortem. (</span><a href="https://groups.google.com/g/codership-team/c/znt-3N1RAyQ"><span>codership-team</span></a><span>)</span></p>
<p><span>You have your own version of these. You didn’t need mine.</span></p>
<p><span>And here’s the thing about all of them: the root cause is usually not Galera. It’s flashcache, or a shadowed </span><span>wsrep_provider_options</span><span> line, or DNS resolving to the wrong interface, or a one-way firewall path. One team diagnosed a Kubernetes crash loop by reading the operator’s source code.</span></p>
<p><span>So your MTTR isn’t dominated by repair. It’s dominated by diagnosis. The cluster is not hard to fix once you know what’s wrong, but it’s hard to know what’s wrong at 3am with writes stalled and clean logs.</span></p>
<p><span>That’s what changed on 30 September 2026.</span></p>
<h2><span>What the EOL actually takes away</span></h2>
<p><span>MariaDB plc acquired Codership in May 2025 and set the end of support for all current MySQL Galera Cluster versions at 30 September 2026. No development, no maintenance, no binary releases after that.</span></p>
<p><span>Your cluster will behave on 1 October exactly as it did the day before. Nothing new breaks. What disappears is the two things that used to bound those incidents: someone to escalate to, and a release that eventually contains the fix.</span></p>
<p><span>MariaDB Enterprise’s recommended way out is migrating to MariaDB Galera Cluster. That’s a different database: distinct system table structure, a data dictionary that differs fundamentally from MySQL’s, and user privileges that MariaDB’s own migration notes say you have to systematically recreate. You built this HA layer on open source MySQL because you wanted control. Changing database vendor to keep a support contract is the opposite of control.</span></p>
<p><span>Two paths that don’t ask you to:</span></p>
<h2><span>Keep the cluster, buy back the escalation path</span></h2>
<p><span>If diagnosis is the expensive part, what shortens it is a senior engineer who has seen your failure mode before. Not a new binary.</span></p>
<p><span>Percona MySQL Support covers your existing MySQL Galera Cluster as it is. No migration, no re-platforming, no privilege rebuild. Senior MySQL engineers 24x7x365 on follow-the-sun, consultative support as well as incident triage (wsrep tuning, DDL strategy, write distribution, quorum design), and contractual SLAs down to 15-minute initial response for Severity 1 incidents on Premium tier. Details in the</span><a href="https://learn.percona.com/hubfs/Datasheet/New-Services-Offerings/Percona-Support-for-MySQL-datasheet.pdf"> <span>support datasheet</span></a><span>.</span></p>
<h2><span>Or move to PXC, where the cluster layer still gets fixed</span></h2>
<p><span>Percona XtraDB Cluster is Percona Server for MySQL plus the Galera library – our own fork, in a</span><a href="https://github.com/percona/galera"> <span>public repo</span></a><span>, compatible with MySQL Community Edition.</span></p>
<p><span>The difference from the MariaDB path is mechanical: your schema, system tables, and user accounts carry over as they are. Same wsrep behavior, same ecosystem, same tools, same connectors. The</span><a href="https://www.percona.com/blog/migrate-mysql-galera-cluster-to-percona-xtradb-cluster/"> <span>ten-step walkthrough</span></a><span> is public and free to follow on your own.</span></p>
<p><span>The reason to pick PXC isn’t that it’s another Galera build. It’s that the failure modes at the top of this post are what we ship fixes for: IST and SST behavior, node eviction, flow control, DDL under concurrent writes. Public release notes, Jira IDs attached, every quarter:</span></p>
<p><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-54529" src="https://www.percona.com/wp-content/uploads/2026/10/galera-eol-release-table-300x148.png" alt="" width="300" height="148"></p>
<p><span>That cadence goes back to 2012, across 5.5, 5.6, 5.7, 8.0 and now 8.4, with the 8.0 line still shipping alongside. In the last 90 days, nearly 4,000 PXC host instances reported telemetry outside Kubernetes, and the PXC Operator runs across thousands more Kubernetes deployments. The engineers you’d escalate to are in this cluster layer every week.- See the recent work on</span><a href="https://www.percona.com/blog/stop-guessing-at-gcache-inspect-galera-pxc-write-sets-with-gcache-inspector/"> <span>gcache inspection</span></a><span> and</span><a href="https://www.percona.com/blog/deploying-cross-site-replication-in-percona-operator-for-mysql-pxc/"> <span>cross-site replication in the Operator</span></a><span>.</span></p>
<p><span>If you’d rather not migrate alone, our migration service includes a test environment on the target cluster with a wsrep behavior comparison against your current one: you watch it handle the same failures before you commit, plus a documented rollback plan, scheduled cutover with off-hours support, and a health audit a few weeks after go-live.</span></p>
<h2><span>What’s not an option</span></h2>
<p><span>Running unmaintained. Not because of the date since your cluster won’t notice the date. Because the next time all the queries pile up and the logs say nothing, there’s no ticket to open and no release to wait for.</span></p>
<p><span>Support buys time. Migration ends the exposure. Doing both, in that order, is a perfectly good plan. Either way your clustering layer stays open source, stays on MySQL, and stays supported.</span></p>
<p><a href="https://www.percona.com/mysql/support/mysql-galera/"><span>Talk to us</span></a><span> about which one fits.</span></p>
<p>The post <a href="https://www.percona.com/blog/your-galera-clusters-hardest-problem-was-never-the-replication-library/">Your Galera cluster’s hardest problem was never the replication library</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/your-galera-clusters-hardest-problem-was-never-the-replication-library/">Your Galera cluster’s hardest problem was never the replication library</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Building a Public Performance Change Detection Library for MariaDB</title>
        <link>https://mariadb.org/building-a-public-performance-change-detection-library-for-mariadb/</link>
        <pubDate>Thu, 08 Oct 2026 14:28:57 +0000</pubDate>
        <dc:creator>Jonathan Miller</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/building-a-public-performance-change-detection-library-for-mariadb/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Performance engineering inside a database project is usually private. Teams run internal workloads, investigate changes, fix issues, and move on. The knowledge stays inside the company, and the outside world only sees a benchmark graph or a release note. …<br />
Continue reading "Building a Public Performance Change Detection Library for MariaDB"<br />
Building a Public Performance Change Detection Library for MariaDB appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/building-a-public-performance-change-detection-library-for-mariadb/">Building a Public Performance Change Detection Library for MariaDB</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Performance engineering inside a database project is usually private. Teams run internal workloads, investigate changes, fix issues, and move on. The knowledge stays inside the company, and the outside world only sees a benchmark graph or a release note. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/building-a-public-performance-change-detection-library-for-mariadb/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;Building a Public Performance Change Detection Library for MariaDB&#8221;</span></a></p>
<p><a href="https://mariadb.org/building-a-public-performance-change-detection-library-for-mariadb/">Building a Public Performance Change Detection Library for MariaDB</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/building-a-public-performance-change-detection-library-for-mariadb/">Building a Public Performance Change Detection Library for MariaDB</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Open Source milestone – MariaDB’sEcosystem hub hits 200 solutions</title>
        <link>https://mariadb.org/open-source-milestone-mariadbsecosystem-hub-hits-200-solutions/</link>
        <pubDate>Thu, 08 Oct 2026 10:35:03 +0000</pubDate>
        <dc:creator>Anna Widenius</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/open-source-milestone-mariadbsecosystem-hub-hits-200-solutions/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>New ‘App store of open source’ is one stop shop serving the fast-growing MariaDB community’s needs for applications, developer tools, cloud platforms and projects.<br />
 The MariaDB Foundation today announces the MariaDB Server Ecosystem Hub has exceeded 200 entries, just six months after launch. …<br />
Continue reading "Open Source milestone – MariaDB’sEcosystem hub hits 200 solutions"<br />
Open Source milestone – MariaDB’sEcosystem hub hits 200 solutions appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/open-source-milestone-mariadbsecosystem-hub-hits-200-solutions/">Open Source milestone – MariaDB’sEcosystem hub hits 200 solutions</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>New ‘App store of open source’ is one stop shop serving the fast-growing MariaDB community’s needs for applications, developer tools, cloud platforms and projects.<br />
 The MariaDB Foundation today announces the<a href="https://mariadb.org/open-source-milestone-mariadbsecosystem-hub-hits-200-solutions/"> MariaDB Server Ecosystem Hub</a> has exceeded 200 entries, just six months after launch. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/open-source-milestone-mariadbsecosystem-hub-hits-200-solutions/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;Open Source milestone – MariaDB’sEcosystem hub hits 200 solutions&#8221;</span></a></p>
<p><a href="https://mariadb.org/open-source-milestone-mariadbsecosystem-hub-hits-200-solutions/">Open Source milestone – MariaDB’sEcosystem hub hits 200 solutions</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/open-source-milestone-mariadbsecosystem-hub-hits-200-solutions/">Open Source milestone – MariaDB’sEcosystem hub hits 200 solutions</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Adobe Commerce and MariaDB: How the Database Shift Supports Peak Trading and Agentic AI</title>
        <link>https://mariadb.com/resources/blog/adobe-commerce-and-mariadb-how-the-database-shift-supports-peak-trading-and-agentic-ai/</link>
        <pubDate>Wed, 07 Oct 2026 16:20:24 +0000</pubDate>
        <dc:creator>Neil Goldfarb</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/adobe-commerce-and-mariadb-how-the-database-shift-supports-peak-trading-and-agentic-ai/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>eCommerce is seasonal, and as high-volume peak trading windows, major marketing campaigns, and seasonal demand surges approach, eCommerce teams worldwide […]</p>
<p><a href="https://mariadb.com/resources/blog/adobe-commerce-and-mariadb-how-the-database-shift-supports-peak-trading-and-agentic-ai/">Adobe Commerce and MariaDB: How the Database Shift Supports Peak Trading and Agentic AI</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>eCommerce is seasonal, and as high-volume peak trading windows, major marketing campaigns, and seasonal demand surges approach, eCommerce teams worldwide enter preparation mode. This time of year, code freezes take effect, stress testing intensifies, and infrastructure leaders scrutinize every layer of the tech stack to ensure flawless performance under maximum load. In case you missed…</p>
<p><a href="https://mariadb.com/resources/blog/adobe-commerce-and-mariadb-how-the-database-shift-supports-peak-trading-and-agentic-ai/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/adobe-commerce-and-mariadb-how-the-database-shift-supports-peak-trading-and-agentic-ai/">Adobe Commerce and MariaDB: How the Database Shift Supports Peak Trading and Agentic AI</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Adobe Commerce and MariaDB: How the Database Shift Supports Peak Trading and Agentic AI</title>
        <link>https://mariadb.com/resources/blog/adobe-commerce-and-mariadb-how-the-database-shift-supports-peak-trading-and-agentic-ai/</link>
        <pubDate>Wed, 07 Oct 2026 16:20:00 +0000</pubDate>
        <dc:creator>Neil Goldfarb</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/adobe-commerce-and-mariadb-how-the-database-shift-supports-peak-trading-and-agentic-ai-2/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>eCommerce is seasonal, and as high-volume peak trading windows, major marketing campaigns, and seasonal demand surges approach, eCommerce teams worldwide […]</p>
<p><a href="https://mariadb.com/resources/blog/adobe-commerce-and-mariadb-how-the-database-shift-supports-peak-trading-and-agentic-ai/">Adobe Commerce and MariaDB: How the Database Shift Supports Peak Trading and Agentic AI</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>eCommerce is seasonal, and as high-volume peak trading windows, major marketing campaigns, and seasonal demand surges approach, eCommerce teams worldwide enter preparation mode. This time of year, code freezes take effect, stress testing intensifies, and infrastructure leaders scrutinize every layer of the tech stack to ensure flawless performance under maximum load. In case you missed it…</p>
<p><a href="https://mariadb.com/resources/blog/adobe-commerce-and-mariadb-how-the-database-shift-supports-peak-trading-and-agentic-ai/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/adobe-commerce-and-mariadb-how-the-database-shift-supports-peak-trading-and-agentic-ai/">Adobe Commerce and MariaDB: How the Database Shift Supports Peak Trading and Agentic AI</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Laravel 13 now supports MariaDB Vector natively</title>
        <link>https://mariadb.org/laravel-13-now-supports-mariadb-vector-natively/</link>
        <pubDate>Wed, 07 Oct 2026 06:52:02 +0000</pubDate>
        <dc:creator>Robert Silén</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/laravel-13-now-supports-mariadb-vector-natively/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>If your Laravel application runs on MariaDB, you can add semantic search to it without a second database, an external vector service or an extra package. …<br />
Continue reading "Laravel 13 now supports MariaDB Vector natively"<br />
Laravel 13 now supports MariaDB Vector natively appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/laravel-13-now-supports-mariadb-vector-natively/">Laravel 13 now supports MariaDB Vector natively</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>If your Laravel application runs on MariaDB, you can add semantic search to it without a second database, an external vector service or an extra package. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/laravel-13-now-supports-mariadb-vector-natively/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;Laravel 13 now supports MariaDB Vector natively&#8221;</span></a></p>
<p><a href="https://mariadb.org/laravel-13-now-supports-mariadb-vector-natively/">Laravel 13 now supports MariaDB Vector natively</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/laravel-13-now-supports-mariadb-vector-natively/">Laravel 13 now supports MariaDB Vector natively</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Solving SIEM Data Gravity: How to Cut Ingest Costs Without Losing a Single Security Event</title>
        <link>https://mariadb.com/resources/blog/solving-siem-data-gravity-how-to-cut-ingest-costs-without-losing-a-single-security-event/</link>
        <pubDate>Tue, 06 Oct 2026 20:30:32 +0000</pubDate>
        <dc:creator>Rohit Dharampal</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/solving-siem-data-gravity-how-to-cut-ingest-costs-without-losing-a-single-security-event/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>Your SIEM bill climbs every year — but most of what you pay to ingest and index is repetitive, benign […]</p>
<p><a href="https://mariadb.com/resources/blog/solving-siem-data-gravity-how-to-cut-ingest-costs-without-losing-a-single-security-event/">Solving SIEM Data Gravity: How to Cut Ingest Costs Without Losing a Single Security Event</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Your SIEM bill climbs every year — but most of what you pay to ingest and index is repetitive, benign noise. The usual fixes, sampling or dropping data, trade away the security visibility you bought the SIEM for in the first place. There is a better option: reduce the noise in memory, before it ever reaches the SIEM — while preserving 100% of security-relevant events.</p>
<p><a href="https://mariadb.com/resources/blog/solving-siem-data-gravity-how-to-cut-ingest-costs-without-losing-a-single-security-event/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/solving-siem-data-gravity-how-to-cut-ingest-costs-without-losing-a-single-security-event/">Solving SIEM Data Gravity: How to Cut Ingest Costs Without Losing a Single Security Event</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>DBTrail: Analytical Reports on Your MySQL Data, Without Running Them on MySQL – Part 1</title>
        <link>https://www.percona.com/blog/dbtrail-analytical-reports-on-your-mysql-data-without-running-them-on-mysql-part-1/</link>
        <pubDate>Tue, 06 Oct 2026 16:28:16 +0000</pubDate>
        <dc:creator>Vadim Tkachenko</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/dbtrail-analytical-reports-on-your-mysql-data-without-running-them-on-mysql-part-1/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>MySQL is very good at serving application workloads, but things get more complicated when somebody decides to run a large report on the same server. A scan can push hot pages out of the buffer pool. A long-running read can hold back purge. A GROUP BY over millions of rows can start writing temporary tables … Continued<br />
The post DBTrail: Analytical Reports on Your MySQL Data, Without Running Them on MySQL – Part 1 appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/dbtrail-analytical-reports-on-your-mysql-data-without-running-them-on-mysql-part-1/">DBTrail: Analytical Reports on Your MySQL Data, Without Running Them on MySQL – Part 1</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MySQL is very good at serving application workloads, but things get more complicated when somebody decides to run a large report on the same server.</p>
<p>A scan can push hot pages out of the buffer pool. A long-running read can hold back purge. A <code>GROUP BY</code> over millions of rows can start writing temporary tables to disk.</p>
<p>The traditional answer is a reporting replica. But that means running another MySQL server, and at the end of the day it is still a row-oriented database.</p>
<p>Another option is moving the data into an analytical database. That can work very well, but now you have a data pipeline to build, operate, monitor, and eventually debug.</p>
<p>We have been looking at what MySQL users can do with DuckDB, and DBTrail is an interesting approach.</p>
<p>DBTrail is open source under Apache 2.0. It is being built by Daniel Guzman-Burgos, who previously worked at Percona as a MySQL Technical Lead.</p>
<p><strong>The basic idea is simple.</strong></p>
<p>DBTrail connects to MySQL similarly to a replica. It makes an initial copy of the tables using <code>mydumper</code> and stores the data as Parquet files, either locally or in S3.</p>
<p>After that, it reads the MySQL binary log and periodically applies changes to the copy.</p>
<p>You query the resulting data with DuckDB.</p>
<p><strong>Nothing is installed inside MySQL, there is no MySQL plugin, agent, or trigger.</strong></p>
<p>The setup would look like this:</p>
<p><strong><a href="https://www.percona.com/wp-content/uploads/2026/10/dbtrail_mysql_analytics_flow_web_hires-scaled.webp"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-54479" src="https://www.percona.com/wp-content/uploads/2026/10/dbtrail_mysql_analytics_flow_web_hires-1024x576.webp" alt="" width="1024" height="576"></a></strong></p>
<p>Let’s do some performance testing.</p>
<h2>The setup</h2>
<p>We used three AWS machines in the same subnet in <code>us-west-2a</code>.</p>
<div>
<table>
<thead>
<tr>
<th>Role</th>
<th>Machine</th>
<th>Software</th>
</tr>
</thead>
<tbody>
<tr>
<td>Source</td>
<td>r7i.4xlarge</td>
<td>Percona Server for MySQL 8.4.11-11</td>
</tr>
<tr>
<td>DBTrail and DuckDB</td>
<td>r7i.4xlarge</td>
<td>DBTrail 0.99.0, DuckDB 1.5.6</td>
</tr>
<tr>
<td>Load generator</td>
<td>c7i.2xlarge</td>
<td>sysbench 1.0.20, sysbench-tpcc</td>
</tr>
</tbody>
</table>
</div>
<h3>Machines in more detail</h3>
<div>
<table>
<thead>
<tr>
<th></th>
<th>Source and DBTrail machines</th>
<th>Load machine</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>CPU</strong></td>
<td>Intel Xeon Platinum 8488C, 8 cores, 16 threads</td>
<td>Same CPU, 4 cores, 8 threads</td>
</tr>
<tr>
<td><strong>Memory</strong></td>
<td>128 GB, 123.8 GB usable</td>
<td>16 GB</td>
</tr>
<tr>
<td><strong>Disk</strong></td>
<td>EBS gp3, 400 GB, 16,000 IOPS, 1,000 MB/s provisioned</td>
<td>Not used by the test</td>
</tr>
<tr>
<td><strong>Filesystem</strong></td>
<td>ext4, <code>relatime,discard,commit=30</code></td>
<td></td>
</tr>
<tr>
<td><strong>I/O scheduler</strong></td>
<td>none, 128 KB read-ahead</td>
<td></td>
</tr>
<tr>
<td><strong>OS</strong></td>
<td>Ubuntu 24.04.5, kernel 7.0.0-1013-aws</td>
<td>Same</td>
</tr>
<tr>
<td><strong>Kernel settings</strong></td>
<td>swappiness 60, dirty ratio 20/10, THP <code>madvise</code></td>
<td>Same</td>
</tr>
<tr>
<td><strong>Docker</strong></td>
<td>29.1.3</td>
<td></td>
</tr>
</tbody>
</table>
</div>
<h2>The MySQL source</h2>
<p>Percona Server runs in Docker using host networking.</p>
<p>We used full durability and a buffer pool large enough to keep the whole data set in memory:</p>
<pre class="urvanov-syntax-highlighter-plain-tag"><code>innodb_buffer_pool_size        = 96G
innodb_redo_log_capacity       = 32G
innodb_flush_log_at_trx_commit = 1
sync_binlog                    = 1
innodb_flush_method            = O_DIRECT
innodb_io_capacity             = 8000
innodb_io_capacity_max         = 16000
binlog_format                  = ROW
binlog_row_image               = FULL
gtid_mode                      = ON</code></pre>
<p>The workload is sysbench-tpcc with 200 warehouses, which produces 102 million rows and about 19 GB of data when the run started.</p>
<p>For the initial workload we held the workload at <strong>300 transactions per second</strong>.</p>
<p>One TPC-C transaction in this test is roughly 28 SQL statements, so that means about:</p>
<ul>
<li><strong>8,500 QPS</strong></li>
<li><strong>5,200 row changes per second</strong></li>
</ul>
<p>It is important to put that load into context—on the same server flat out with 64 threads and nothing else attached, it reached <strong>4,049 transactions per second</strong>, or about <strong>115,000 QPS</strong>.</p>
<p>So the 300 TPS test uses only about <strong>7% of the available capacity</strong>, and we chose a relatively light load intentionally. We wanted to see what analytical queries cost even when the source has plenty of headroom.</p>
<p><a href="https://www.percona.com/wp-content/uploads/2026/10/08-load-in-context.svg"><img decoding="async" class="aligncenter size-full wp-image-54481" src="https://www.percona.com/wp-content/uploads/2026/10/08-load-in-context.svg" alt=""></a></p>
<h2>DBTrail</h2>
<p>DBTrail installs with one command that starts its Docker Compose stack:</p>
<pre class="urvanov-syntax-highlighter-plain-tag"><code>curl -fsSL https://raw.githubusercontent.com/dbtrail/dbtrail/v0.99.0/install.sh 
  | DBTRAIL_REF=v0.99.0 sh</code></pre>
<p>The stack contains two containers: DBTrail itself and a MySQL 8.4.9 instance DBTrail uses as an index of row changes.</p>
<p>This internal MySQL needs attention, as the default installation leaves its buffer pool at MySQL’s <strong>128 MB default</strong>. For this workload, <strong>that is nowhere near enough.</strong></p>
<p>For the main tests we configured it like this:</p>
<pre class="urvanov-syntax-highlighter-plain-tag"><code>innodb_buffer_pool_size        = 48G
innodb_redo_log_capacity       = 16G
innodb_log_buffer_size         = 256M
innodb_flush_log_at_trx_commit = 2
innodb_flush_method            = O_DIRECT
innodb_io_capacity             = 8000
innodb_io_capacity_max         = 16000
innodb_page_cleaners           = 16
innodb_flush_neighbors         = 0
skip-log-bin</code></pre>
<p>DuckDB ran on the same machine with its defaults: 16 threads and a 99 GB memory limit.</p>
<p><a href="https://www.percona.com/wp-content/uploads/2026/10/tpcc-overview-scaled.png"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-54482" src="https://www.percona.com/wp-content/uploads/2026/10/tpcc-overview-1024x640.png" alt="" width="1024" height="640"></a></p>
<h2>Does DBTrail slow MySQL down?</h2>
<p><strong>Short answer: at this workload, almost not at all.</strong></p>
<p>The load ran continuously. Each row below represents one phase of the same test.</p>
<div>
<table>
<thead>
<tr>
<th>Phase</th>
<th>TPS</th>
<th>QPS</th>
<th>Median 95th percentile</th>
<th>Worst second</th>
</tr>
</thead>
<tbody>
<tr>
<td>Nothing attached, 10 min</td>
<td>299.9</td>
<td>8,554</td>
<td>41.9 ms</td>
<td>46.6 ms</td>
</tr>
<tr>
<td>DBTrail reading binlog, 10 min</td>
<td>300.5</td>
<td>8,535</td>
<td>41.9 ms</td>
<td>47.5 ms</td>
</tr>
<tr>
<td><strong>Initial copy of all tables, 4m 40s</strong></td>
<td>298.1</td>
<td>8,460</td>
<td>41.1 ms</td>
<td><strong>118.9 ms</strong></td>
</tr>
<tr>
<td><strong>Copy updated every 5 min, 75 min</strong></td>
<td>300.2</td>
<td>8,539</td>
<td>41.1 ms</td>
<td>46.6 ms</td>
</tr>
</tbody>
</table>
</div>
<p><a href="https://www.percona.com/wp-content/uploads/2026/10/01-source-cost.svg"><img decoding="async" class="aligncenter size-full wp-image-54483" src="https://www.percona.com/wp-content/uploads/2026/10/01-source-cost.svg" alt=""></a></p>
<p>There is one spike here that stands out.</p>
<p>When the initial copy started, at approximately second 1,500 of the workload, the 95th percentile latency jumped to <span><strong>119 ms</strong></span> and throughput dropped to <span><strong>271 transactions</strong></span> for that second and it happened once.</p>
<p>The initial copy takes a global read lock briefly when it starts, and the timing matches that operation, after that, DBTrail read <span><strong>102 million rows in less than five minutes without any measurable slowdown in the application workload.</strong></span></p>
<p>CPU usage confirms the same story: the source normally sat around <strong>18% CPU</strong>, but during the initial table copy it increased to about <strong>35%</strong>.</p>
<p>When we later ran the five analytical reports directly against MySQL, CPU was around 24%.</p>
<p><a href="https://www.percona.com/wp-content/uploads/2026/10/09-cpu.svg"><img decoding="async" class="aligncenter size-full wp-image-54484" src="https://www.percona.com/wp-content/uploads/2026/10/09-cpu.svg" alt=""></a></p>
<p><a href="https://www.percona.com/wp-content/uploads/2026/10/10-disk.svg"><img decoding="async" class="aligncenter size-full wp-image-54485" src="https://www.percona.com/wp-content/uploads/2026/10/10-disk.svg" alt=""></a></p>
<p>There is also a noticeable increase in source writes around minute 12. That happened three minutes before DBTrail connected, so it was unrelated to DBTrail.</p>
<p>The DBTrail machine itself writes roughly as much as the source because it keeps an index of every captured row change.</p>
<h2>Query times on the TPC-C data</h2>
<p>DBTrail creates a <code>views.sql</code> file containing a DuckDB view for each source table.</p>
<p>From there you can query the data normally:</p>
<pre class="urvanov-syntax-highlighter-plain-tag"><code>$ duckdb -init views.sql

D SELECT
      i.i_id,
      i.i_name,
      sum(ol.ol_quantity) AS units,
      sum(ol.ol_amount) AS revenue
  FROM tpcc.order_line1 ol
  JOIN tpcc.item1 i ON i.i_id = ol.ol_i_id
  GROUP BY i.i_id, i.i_name
  ORDER BY revenue DESC
  LIMIT 10;</code></pre>
<p>We ran the same five reports against MySQL and against DuckDB while the transactional workload continued running, during the workload the data had grown from 102 million to 113 million rows.</p>
<p>MySQL had essentially everything cached in memory and the DBTrail copy was also in its normal operating state: a base Parquet file plus the accumulated change files that DuckDB needs to combine when executing the query.</p>
<p>The results:</p>
<div>
<table>
<thead>
<tr>
<th>Report</th>
<th>MySQL</th>
<th>DuckDB on DBTrail copy</th>
</tr>
</thead>
<tbody>
<tr>
<td>Revenue per warehouse</td>
<td>9.7 s</td>
<td>0.75 s</td>
</tr>
<tr>
<td>Orders and revenue per district/month</td>
<td>46.5 s</td>
<td>2.8 s</td>
</tr>
<tr>
<td>Ten best-selling items</td>
<td>5m 32s</td>
<td>1.7 s</td>
</tr>
<tr>
<td>Customers by state and credit</td>
<td>3.6 s</td>
<td>0.18 s</td>
</tr>
<tr>
<td>Warehouses low on stock</td>
<td>3.0 s</td>
<td>0.23 s</td>
</tr>
<tr>
<td><strong>Total</strong></td>
<td><strong>6m 35s</strong></td>
<td><strong>5.7 s</strong></td>
</tr>
</tbody>
</table>
</div>
<p><strong>This is where the difference becomes interesting: 6m 35s on MySQL and less than 6s on DuckDB.</strong></p>
<p><a href="https://www.percona.com/wp-content/uploads/2026/10/duckdb-report.png"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-54486" src="https://www.percona.com/wp-content/uploads/2026/10/duckdb-report-1024x464.png" alt="" width="1024" height="464"></a></p>
<h2>Running TPC-H: all 22 queries</h2>
<p>TPC-H is a more standard analytical workload; for this test, we loaded TPC-H at scale factor 10.</p>
<p>The dataset contained:</p>
<ul>
<li><strong>86.6 million rows</strong></li>
<li><strong>18.2 GB of InnoDB data</strong></li>
<li>Normal indexes on join keys, order dates, and ship dates</li>
</ul>
<p>The initial DBTrail copy took <strong>6 minutes 26 seconds</strong> and produced <strong>2.8 GB of Parquet files</strong>.</p>
<p>We ran the same SQL against both systems and compared results:</p>
<p><a href="https://www.percona.com/wp-content/uploads/2026/10/12-tpch-queries.png"><img decoding="async" loading="lazy" class="aligncenter size-large wp-image-54487" src="https://www.percona.com/wp-content/uploads/2026/10/12-tpch-queries-1024x891.png" alt="" width="1024" height="891"></a></p>
<p><a href="https://www.percona.com/wp-content/uploads/2026/10/13-tpch-total.png"><img decoding="async" loading="lazy" class="aligncenter size-large wp-image-54488" src="https://www.percona.com/wp-content/uploads/2026/10/13-tpch-total-1024x300.png" alt="" width="1024" height="300"></a></p>
<div>
<table>
<thead>
<tr>
<th></th>
<th>MySQL</th>
<th>DuckDB warm</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>All 22 queries</strong></td>
<td><strong>5m 24s</strong></td>
<td><strong>10.3 s</strong></td>
</tr>
</tbody>
</table>
</div>
<p>MySQL wins <strong>Q19</strong> because an index can go directly to the relevant rows, <strong>Q17 is effectively a tie</strong> and for the rest, <strong>DuckDB is substantially faster.</strong></p>
<p>If you are interested in these performance numbers, stay tuned for Part 2, where we will look into how often DBTrail refreshes data to stay up to date.</p>
<p>The post <a href="https://www.percona.com/blog/dbtrail-analytical-reports-on-your-mysql-data-without-running-them-on-mysql-part-1/">DBTrail: Analytical Reports on Your MySQL Data, Without Running Them on MySQL – Part 1</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/dbtrail-analytical-reports-on-your-mysql-data-without-running-them-on-mysql-part-1/">DBTrail: Analytical Reports on Your MySQL Data, Without Running Them on MySQL – Part 1</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>What Is Running on My MongoDB Right Now? Real-Time Analytics in PMM</title>
        <link>https://www.percona.com/blog/what-is-running-on-my-mongodb-right-now-real-time-analytics-in-pmm/</link>
        <pubDate>Tue, 06 Oct 2026 12:51:43 +0000</pubDate>
        <dc:creator>Tibor Korocz</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/what-is-running-on-my-mongodb-right-now-real-time-analytics-in-pmm/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>The Problem The application is slow, the Slack channel is on fire, and somebody asks the oldest question in our job: What is running on the database right now? Query Analytics (QAN) in PMM is great for the history. It shows which queries used the most time in the last hour or the last 12 … Continued<br />
The post What Is Running on My MongoDB Right Now? Real-Time Analytics in PMM appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/what-is-running-on-my-mongodb-right-now-real-time-analytics-in-pmm/">What Is Running on My MongoDB Right Now? Real-Time Analytics in PMM</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<h2><b>The Problem</b></h2>
<p><span>The application is slow, the Slack channel is on fire, and somebody asks the oldest question in our job: </span><b>What is running on the database right now?</b> <span>Query Analytics (QAN) in PMM is great for the history. It shows which queries used the most time in the last hour or the last 12 hours. This is QAN from my test environment:</span> <a href="https://www.percona.com/wp-content/uploads/2026/10/00046-scaled.jpg"><img decoding="async" loading="lazy" class="alignnone size-full wp-image-54454" src="https://www.percona.com/wp-content/uploads/2026/10/00046-scaled.jpg" alt="" width="2560" height="1800"></a> <span>As we can see, two aggregations on the </span><span>orders</span><span> collection are on the top, basically each of them is keeping one core busy all the time. But are they running right now? For how long? Who is sending them? QAN can not tell, because it works with finished operations. MongoDB reports an operation to the diagnostic log or the profiler only when it completes, so an aggregation that has been running for two minutes and is still going is invisible there.</span> <span>So what can you do? Usually you open </span><em><span>mongosh</span></em><span>, run </span><em><span>db.currentOp()</span></em><span>, and scroll through a huge JSON document. Then you run it again, and again, to see if the operation is still there. I did this many times and I never really enjoyed it. (If you do, I will not judge you. <img decoding="async" src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="&#x1f642;" class="wp-smiley"> )</span> <span>PMM has a better answer for this now: </span><b>Real-Time Query Analytics</b><span>, or RTA.</span></p>
<h2><b>What Is Real-Time Analytics, in One Sentence?</b></h2>
<p><span>RTA shows every MongoDB operation that is running right now, refreshed every two seconds (which is configurable), and it forgets them when they are gone, but then you can find them in Query Analytics.</span> <span>It arrived in </span><a href="https://docs.percona.com/percona-monitoring-and-management/3/release-notes/3.7.0.html"><span>PMM 3.7.0</span></a><span> and for now it works with MongoDB only. MySQL and PostgreSQL support is planned.</span> <span>But how does it work? There is a new agent inside pmm-agent called </span><em><span>rta-mongodb-agent</span></em><span>. Every two seconds it runs the </span><em><span>$currentOp</span></em><span> aggregation on the </span><span>admin</span><span> database. </span> <span>The results go to PMM Server and they live in memory only. Nothing is written to ClickHouse, and an old snapshot is dropped after 30 seconds. So RTA does not replace QAN, it is the other half of it:</span></p>
<figure class="wp-block-table">
<table>
<thead>
<tr>
<th> </th>
<th>Query Analytics (QAN)</th>
<th>Real-Time Analytics (RTA)</th>
</tr>
</thead>
<tbody>
<tr>
<td>What it shows</td>
<td>Finished queries, grouped by fingerprint</td>
<td>Operations running now, one row each</td>
</tr>
<tr>
<td>Data source on MongoDB</td>
<td>Profiler or slow query log</td>
<td><code>$currentOp</code>, every 2 seconds</td>
</tr>
<tr>
<td>Storage</td>
<td>ClickHouse, with retention</td>
<td>Memory only</td>
</tr>
<tr>
<td>Answers</td>
<td>“What was slow last night?”</td>
<td>“What is slow right now?”</td>
</tr>
</tbody>
</table>
</figure>
<h2><b>How Do I Enable It?</b></h2>
<p><span>The good news: there is nothing to install. If PMM already monitors your MongoDB, RTA uses the same connection details and credentials as the MongoDB exporter. You need:</span></p>
<ul>
<li><span>PMM Server and PMM Client 3.7.0 or newer. I recommend 3.9.0 or newer, because the CSV export arrived there.</span></li>
<li><span>The MongoDB user PMM already uses. </span><em><span>$currentOp</span></em><span> with </span><span>allUsers: true</span><span> needs the </span><em><span>inprog</span></em><span> privilege, which comes with the </span><em><span>clusterMonitor</span></em><span> role. The user in the </span><a href="https://docs.percona.com/percona-monitoring-and-management/3/install-pmm/install-pmm-client/connect-database/mongodb.html"><span>PMM documentation</span></a><span> already has it.</span></li>
<li><span>The Admin role in PMM to start or stop a session. Viewers can watch the sessions that are already running.</span></li>
</ul>
<p><span>Then:</span></p>
<ol>
<li><span>Go to </span><b>Query Analytics</b><span> and open the </span><b>Real-time</b><span> tab.</span></li>
<li><span>Pick a cluster or a service in the </span><b>Cluster/Service</b><span> field. If you pick a cluster, all of its services are selected.</span></li>
<li><span>Click </span><b>Start session</b><span>.</span></li>
</ol>
<p><a href="https://www.percona.com/wp-content/uploads/2026/10/00098-scaled.jpg"><img decoding="async" loading="lazy" class="alignnone size-full wp-image-54455" src="https://www.percona.com/wp-content/uploads/2026/10/00098-scaled.jpg" alt="" width="2560" height="1800"></a> <span>That’s it. In the background PMM creates an </span><em><span>rta-mongodb-agent</span></em><span> for the service, so you will see it in </span><em><span>pmm-admin list</span></em><span> as well.</span> <span>Each session connects directly to one MongoDB node. On a replica set, start a session for every member you want to watch; picking the cluster does exactly this.</span> <span>One important thing: </span><b>a session does not stop by itself.</b><span> It runs until somebody stops it on the </span><b>All sessions</b><span> page, and then it stops for all users. While it runs, the agent queries MongoDB every two seconds, so please stop the sessions you do not need.</span> <span>If two seconds is too often for you (or not often enough), you can change the collect interval with pmm-admin. The minimum is one second:</span></p>
<pre class="lang:default decode:true">pmm-admin inventory change agent rta-mongodb-agent  --collect-interval=5s</pre>
<h2><b>Let’s Catch a Slow Query</b></h2>
<p><span>For this post (and for the video below) I built a small lab: Percona Server for MongoDB 8.0 with a </span><span>shop.orders</span><span> collection of 4 million documents, and three applications: </span><em><span>orders-api</span></em><span>, </span><em><span>checkout-service</span></em><span> and </span><em><span>reporting-job</span></em><span>. The reporting job runs a “duplicate customer check”. I think you can already guess which one is the problem.</span> <span>If you prefer watching, here is the whole flow in 51 seconds:</span></p>
<div class="wp-video"><video class="wp-video-shortcode" width="1080" height="1350" preload="none" controls="controls"><a href="https://www.percona.com/wp-content/uploads/2026/10/rta-mongodb-v7-4x5-zoom-under8mb.mp4">https://www.percona.com/wp-content/uploads/2026/10/rta-mongodb-v7-4&#215;5-zoom-under8mb.mp4</a></video></div>
<h3> </h3>
<h3><b>Step 1: Watch It Live</b></h3>
<p><span>After </span><b>Start session</b><span>, the table shows every operation in flight. By default it refreshes every two seconds; the </span><b>Auto-refresh</b><span> menu goes from 1 to 5 seconds. I clicked the </span><b>Elapsed time</b><span> header to put the longest operations on top, but you can also filter queries or hosts using the free-form text field:</span> <a href="https://www.percona.com/wp-content/uploads/2026/10/00308-scaled.jpg"><img decoding="async" loading="lazy" class="alignnone size-full wp-image-54456" src="https://www.percona.com/wp-content/uploads/2026/10/00308-scaled.jpg" alt="" width="2560" height="1800"></a> <span>Two aggregations on </span><em><span>orders</span></em><span>, one running for almost two minutes and one for 49 seconds. We can also see some </span><em><span>hello</span></em><span> commands and a </span><em><span>system.profile</span></em><span> read. The </span><em><span>hello</span></em><span> ones are drivers waiting for topology changes, and the </span><em><span>system.profile</span></em><span> one is PMM’s QAN agent reading the profiler. So yes, PMM is monitoring itself a little bit. You can ignore these.</span></p>
<h3><b>Step 2: Open the Culprit</b></h3>
<p><span>Click the top row, and the details open. The stream pauses while the panel is open, so the row does not jump away while you read it:</span> <span>And here is everything we need:</span> <a href="https://www.percona.com/wp-content/uploads/2026/10/00376-scaled.jpg"><img decoding="async" loading="lazy" class="alignnone size-full wp-image-54457" src="https://www.percona.com/wp-content/uploads/2026/10/00376-scaled.jpg" alt="" width="2560" height="1800"></a></p>
<ul>
<li><b>Plan summary: COLLSCAN.</b><span> A full collection scan on 4 million documents.</span></li>
<li><b>Client app name: reporting-job.</b><span> Now we know who to talk to.</span></li>
<li><b>The pipeline</b><span> starts with a </span><em><span>$lookup</span></em><span> from </span><span>orders</span><span> to itself on </span><em><span>customer.email</span></em><span>, and there is no index on that field.</span></li>
<li><b>maxTimeMS: 240000.</b><span> It will run for four minutes before MongoDB kills it, and then the job starts it again.</span></li>
</ul>
<p><span>QAN will show this aggregation too, but only after it ends. RTA shows it while it is running, with the client, the plan and the full command. If you need more, the </span><b>Raw data</b><span> tab has the whole </span><span>$currentOp</span><span> document, locks included.</span></p>
<h3><b>Step 3: Stop It (If You Really Have To)</b></h3>
<p><span>There is no kill button in RTA, and I think this is a good decision. If you really have to stop the operation, copy the </span><b>Operation ID</b><span> and run it yourself:</span></p>
<pre class="lang:default decode:true">db.killOp(314387757)</pre>
<p><span>Of course, please make sure you know what you are killing, especially if it is a write. And killing it only buys you time, because the job will start it again. The real fix here is an index on the join field:</span></p>
<pre class="lang:default decode:true">db.orders.createIndex({ "customer.email": 1 })</pre>
<h3><b>Step 4: Save the Evidence</b></h3>
<p><span>RTA keeps nothing, so if you want to show this to somebody tomorrow, click </span><b>Pause</b><span> and then </span><b>Export</b><span>:</span> <a href="https://www.percona.com/wp-content/uploads/2026/10/00488-scaled.jpg"><img decoding="async" loading="lazy" class="alignnone size-full wp-image-54458" src="https://www.percona.com/wp-content/uploads/2026/10/00488-scaled.jpg" alt="" width="2560" height="1800"></a> <span>The CSV has every row that passes your current filters, across all pages, including the raw query. This is very useful for the incident report, or when you want to send it to a colleague (or to Percona Support). Even a query that never finishes leaves evidence this way.</span></p>
<h2><b>Any Limitations?</b></h2>
<p><span>Yes, a few, and it is good to know them before you rely on RTA during an incident:</span></p>
<ul>
<li><b>MongoDB only</b><span> for now, and the service has to be connected through PMM Client 3.7.0 or newer.</span></li>
<li><b>It is a snapshot every two seconds.</b><span> Operations shorter than 10 ms, or ones that start and finish between two polls, are never shown. That is still QAN’s job.</span></li>
<li><b>Nothing is stored.</b><span> When the operation is gone, it is gone from RTA as well. Pause and export if you want to keep it.</span></li>
<li><b>The query text is rebuilt</b><span> from the command document, so it can look different from what the application sent. For example, my aggregations show up as </span><em><span>db.runCommand(…)</span></em><span>. The </span><b>Raw data</b><span> tab has the original.</span></li>
<li><b>Everybody who can open the page sees the raw values</b><span>, Viewers included. In my lab those are customer email addresses. Please keep this in mind with production data.</span></li>
<li><b>Sessions run until somebody stops them</b><span>, as I mentioned above.</span></li>
</ul>
<h2><b>Conclusion</b></h2>
<p><span>RTA answers the question QAN never could: </span><b>what is running right now?</b><span> There is nothing to install, it uses the MongoDB connection PMM already has, and in the video it takes less than a minute to go from “MongoDB is slow” to “the reporting job does a COLLSCAN because </span><em><span>customer.email</span></em><span> has no index”.</span> <span>No more </span><em><span>db.currentOp()</span></em><span> in a loop during an incident. I think this is a great addition to QAN, and I am waiting for the MySQL and PostgreSQL versions as well.</span> <span>The full documentation is </span><a href="https://docs.percona.com/percona-monitoring-and-management/3/use/qan/QAN-realtime-analytics.html"><span>here</span></a><span>. If you already use RTA in production, I would like to hear your real-life experiences in the comments or on the </span><a href="https://per.co.na/PMM3_forums"><span>PMM forum</span></a><span>.</span></p>
<p>The post <a href="https://www.percona.com/blog/what-is-running-on-my-mongodb-right-now-real-time-analytics-in-pmm/">What Is Running on My MongoDB Right Now? Real-Time Analytics in PMM</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/what-is-running-on-my-mongodb-right-now-real-time-analytics-in-pmm/">What Is Running on My MongoDB Right Now? Real-Time Analytics in PMM</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Frappe joins MariaDB Foundation as a Silver Sponsor</title>
        <link>https://mariadb.org/frappe-joins-mariadb-foundation-as-a-silver-sponsor/</link>
        <pubDate>Tue, 06 Oct 2026 05:54:40 +0000</pubDate>
        <dc:creator>Anna Widenius</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/frappe-joins-mariadb-foundation-as-a-silver-sponsor/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB Foundation welcomes Frappe as a Silver Sponsor.<br />
Frappe builds open-source software for running organisations, including ERPNext, Frappe HR and Frappe CRM. Its applications are built on Frappe Framework, where MariaDB is the default database. …<br />
Continue reading "Frappe joins MariaDB Foundation as a Silver Sponsor"<br />
Frappe joins MariaDB Foundation as a Silver Sponsor appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/frappe-joins-mariadb-foundation-as-a-silver-sponsor/">Frappe joins MariaDB Foundation as a Silver Sponsor</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Foundation welcomes Frappe as a Silver Sponsor.<br />
Frappe builds open-source software for running organisations, including ERPNext, Frappe HR and Frappe CRM. Its applications are built on Frappe Framework, where MariaDB is the default database. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/frappe-joins-mariadb-foundation-as-a-silver-sponsor/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;Frappe joins MariaDB Foundation as a Silver Sponsor&#8221;</span></a></p>
<p><a href="https://mariadb.org/frappe-joins-mariadb-foundation-as-a-silver-sponsor/">Frappe joins MariaDB Foundation as a Silver Sponsor</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/frappe-joins-mariadb-foundation-as-a-silver-sponsor/">Frappe joins MariaDB Foundation as a Silver Sponsor</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Foundation Adds PostgreSQL to Its Engine‑Agnostic Testing Framework (TAF).</title>
        <link>https://mariadb.org/mariadb-foundation-adds-postgresql-to-its-engine-agnostic-testing-framework-taf/</link>
        <pubDate>Mon, 05 Oct 2026 20:18:31 +0000</pubDate>
        <dc:creator>Jonathan Miller</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-foundation-adds-postgresql-to-its-engine-agnostic-testing-framework-taf/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>The Test Automation Framework (TAF) was designed so that database makers themselves could create a plugin and integrate their database engine directly into the framework.<br />
TAF provides the structure — …<br />
Continue reading "MariaDB Foundation Adds PostgreSQL to Its Engine‑Agnostic Testing Framework (TAF)."<br />
MariaDB Foundation Adds PostgreSQL to Its Engine‑Agnostic Testing Framework (TAF). appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/mariadb-foundation-adds-postgresql-to-its-engine-agnostic-testing-framework-taf/">MariaDB Foundation Adds PostgreSQL to Its Engine‑Agnostic Testing Framework (TAF).</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>The Test Automation Framework (TAF) was designed so that database makers themselves could create a plugin and integrate their database engine directly into the framework.<br />
TAF provides the structure — … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/mariadb-foundation-adds-postgresql-to-its-engine-agnostic-testing-framework-taf/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;MariaDB Foundation Adds PostgreSQL to Its Engine‑Agnostic Testing Framework (TAF).&#8221;</span></a></p>
<p><a href="https://mariadb.org/mariadb-foundation-adds-postgresql-to-its-engine-agnostic-testing-framework-taf/">MariaDB Foundation Adds PostgreSQL to Its Engine‑Agnostic Testing Framework (TAF).</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/mariadb-foundation-adds-postgresql-to-its-engine-agnostic-testing-framework-taf/">MariaDB Foundation Adds PostgreSQL to Its Engine‑Agnostic Testing Framework (TAF).</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Updated MariaDB C++ and ODBC Connectors now available</title>
        <link>https://mariadb.com/resources/blog/updated-mariadb-c-and-odbc-connectors-now-available-2/</link>
        <pubDate>Mon, 05 Oct 2026 16:40:33 +0000</pubDate>
        <dc:creator>Daniel Bartholomew</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/updated-mariadb-c-and-odbc-connectors-now-available-2/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>MariaDB is pleased to announce the immediate availability of MariaDB Connector/C++ 1.1.9 and 1.0.8 and MariaDB Connector/ODBC 3.2.10 and 3.1.24. […]</p>
<p><a href="https://mariadb.com/resources/blog/updated-mariadb-c-and-odbc-connectors-now-available-2/">Updated MariaDB C++ and ODBC Connectors now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB is pleased to announce the immediate availability of MariaDB Connector/C++ 1.1.9 and 1.0.8 and MariaDB Connector/ODBC 3.2.10 and 3.1.24. All are Stable (GA) releases. Download Now See the release notes and changelogs for details and visit mariadb.com/downloads/connectors to download.</p>
<p><a href="https://mariadb.com/resources/blog/updated-mariadb-c-and-odbc-connectors-now-available-2/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/updated-mariadb-c-and-odbc-connectors-now-available-2/">Updated MariaDB C++ and ODBC Connectors now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Migrating a 500 GB Production MariaDB Database from Amazon RDS to EC2, With a Rollback Path</title>
        <link>https://mariadb.org/migrating-a-500-gb-production-mariadb-database-from-amazon-rds-to-ec2-with-a-rollback-path/</link>
        <pubDate>Mon, 05 Oct 2026 10:52:36 +0000</pubDate>
        <dc:creator>Frédéric Descamps</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/migrating-a-500-gb-production-mariadb-database-from-amazon-rds-to-ec2-with-a-rollback-path/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>I always enjoy real production stories where MariaDB is used in demanding environments and the people involved are willing to share the architecture, the challenges, and the decisions made along the way. …<br />
Continue reading "Migrating a 500 GB Production MariaDB Database from Amazon RDS to EC2, With a Rollback Path"<br />
Migrating a 500 GB Production MariaDB Database from Amazon RDS to EC2, With a Rollback Path appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/migrating-a-500-gb-production-mariadb-database-from-amazon-rds-to-ec2-with-a-rollback-path/">Migrating a 500 GB Production MariaDB Database from Amazon RDS to EC2, With a Rollback Path</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>I always enjoy real production stories where MariaDB is used in demanding environments and the people involved are willing to share the architecture, the challenges, and the decisions made along the way. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/migrating-a-500-gb-production-mariadb-database-from-amazon-rds-to-ec2-with-a-rollback-path/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;Migrating a 500 GB Production MariaDB Database from Amazon RDS to EC2, With a Rollback Path&#8221;</span></a></p>
<p><a href="https://mariadb.org/migrating-a-500-gb-production-mariadb-database-from-amazon-rds-to-ec2-with-a-rollback-path/">Migrating a 500 GB Production MariaDB Database from Amazon RDS to EC2, With a Rollback Path</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/migrating-a-500-gb-production-mariadb-database-from-amazon-rds-to-ec2-with-a-rollback-path/">Migrating a 500 GB Production MariaDB Database from Amazon RDS to EC2, With a Rollback Path</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Thread Pool in Percona Server and MySQL (Part 1)</title>
        <link>https://www.percona.com/blog/thread-pool-in-percona-server-and-mysql-part-1/</link>
        <pubDate>Mon, 05 Oct 2026 10:48:57 +0000</pubDate>
        <dc:creator>Bogdan Degtyariov</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/thread-pool-in-percona-server-and-mysql-part-1/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Thread Pool in Percona Server and MySQL (Part 1) A new version of Community MySQL Server July release contains two versions 26.7.0 and 9.7.2. It is an important milestone because it finally brings a Thread Pooling feature to the community. The official MySQL Server Thread Pool plugin existed for a long time, but was available … Continued<br />
The post Thread Pool in Percona Server and MySQL (Part 1) appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/thread-pool-in-percona-server-and-mysql-part-1/">Thread Pool in Percona Server and MySQL (Part 1)</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<h2><span>Thread Pool in Percona Server and MySQL (Part 1)</span></h2>
<p><span>A new version of Community MySQL Server July release contains two versions 26.7.0 and 9.7.2. It is an important milestone because it finally brings a Thread Pooling feature to the community. The official MySQL Server Thread Pool plugin existed for a long time, but was available exclusively for MySQL Enterprise Edition.</span></p>
<p><span>Before MySQL 26.7.0 / 9.7.2 the most popular free thread pooling enabled alternatives were:</span></p>
<ul>
<li><span>Percona Server for MySQL, which shipped Thread Pool functionality as a plugin</span></li>
<li><span>MariaDB with the Thread Pooling built into the server</span></li>
<li><span>Third-party plugins such as xiezhenye/mysql-plugin-threadpool available on GitHub</span></li>
</ul>
<p><span>Now we will be able to see what benefits the thread pooling mechanism brings to MySQL Server and compare it with the implementation of the thread pool in Percona Server for MySQL.</span></p>
<p><span>Part 1 will explain the basics of thread pooling and analyze the efficiency of its implementation in Percona Server for MySQL. The performance comparison between Percona Server and MySQL Server is done in Part 2.</span></p>
<h2><span>What is Thread Pooling and why is it needed?</span></h2>
<p><span>Thread Pooling is a technique that reuses a fixed number of pre-created threads to handle multiple client connections and execute statements inside a database.</span></p>
<p><span>By default, MySQL creates a dedicated thread whenever a client connects, runs the queries, and then destroys the thread when finished. When connection counts grow very large, this default method causes performance to drop significantly because creating, destroying, and constantly switching between thousands of threads wastes system resources and causes contention.</span></p>
<p><span>This blog post from Vadim Tkachenko explains the working of thread pool, which gives an easy to understand similarity with the car traffic:</span></p>
<p><a href="https://www.percona.com/blog/simcity-outages-traffic-control-and-thread-pool-for-mysql/" target="_blank" rel="noopener"><span>SimCity outages, traffic control and Thread Pool for MySQL</span></a></p>
<p><span>More information about it can be found in </span><a href="https://docs.percona.com/percona-server/9.7/threadpool.html" target="_blank" rel="noopener"><span>Percona Documentation</span></a><span>.</span></p>
<p><span><b>WARNING:</b> the post is several pages long because it looks into different aspects of thread pooling and compares the effect of various options. If you do not want to dive into the details, feel free to read the <b>SPOILER</b> below and proceed to the Conclusion section.</span></p>
<p><span><b>SPOILER</b>: Thread Pool is not a universal database booster, which always brings performance up. Like every advanced tool it should be used with full understanding of the goals and objectives. Otherwise the results might be far from perfect.</span></p>
<h3><span>How it works</span></h3>
<ol>
<li><b>Thread Groups:</b><span> The pool divides threads into distinct groups that are assigned to a specific CPU core. For this reason the number of groups often matches the number of CPU cores.</span></li>
<li><b>Round-Robin Assignment:</b><span> As client connections come in, they are distributed evenly across these groups.</span></li>
<li><b>Listening and Queuing:</b><span> Inside each group, a listener thread monitors incoming queries and places them into either a high-priority queue (such as queries within an active transaction) or a normal/low-priority queue.</span></li>
<li><b>Execution and Reuse:</b><span> Worker threads pick up queries from the queues (handling high-priority items first), execute them, and then wait to handle the next request instead of shutting down.</span></li>
</ol>
<p><span>See also:</span></p>
<ul>
<li><a href="https://docs.percona.com/percona-server/9.7/threadpool.html#core-concepts-and-usage-examples" target="_blank" rel="noopener"><span>Core concepts and usage examples</span></a></li>
<li><a href="https://docs.percona.com/percona-server/9.7/threadpool.html#priority-connection-scheduling" target="_blank" rel="noopener"><span>Priority connection scheduling</span></a></li>
</ul>
<h2><span>Thread Pool configuration:</span></h2>
<p><span>In this research we will be sweeping across the range of various parameters of the Thread Pool and see how the performance of the server is affected.</span></p>
<p><span>The base line will be the server configuration when the thread pool is not enabled. This is done by setting <strong>thread_handling=one-thread-per-connection</strong>. When the pooling is enabled (<strong>thread_handling=pool-of-threads</strong>) the benchmark will set different values for the following variables that control the thread pool behavior:</span></p>
<table border="1" width="100%" cellpadding="5">
<tbody>
<tr bgcolor="#DDDDDD">
<td><span><b>Name</b></span></td>
<td width="200"><span><b>Sweep range</b></span></td>
<td><span><b>Description</b></span></td>
</tr>
<tr>
<td><span><b>thread_pool_size</b></span></td>
<td><span>10 / 20 / 40 / 80 / 120 / 160</span></td>
<td><span>Number of thread groups in the pool.</span><br />
<span>NOTE: <b>thread_pool_size=5</b> was also tested, but the performance was unsatisfactory, for that reason it is not included in the report.</span></td>
</tr>
<tr>
<td><span><b>thread_pool_max_threads /</b><b><br />
</b><b>thread_pool_max_active_query_threads</b></span></td>
<td><span>12000</span></td>
<td><span>Maximum number of threads in the pool.</span></td>
</tr>
<tr>
<td><span><b>thread_pool_oversubscribe /</b><b><br />
</b><b>thread_pool_query_threads_per_group</b></span></td>
<td><span>2 / 3 / 4</span></td>
<td><span>Number of threads that can be active at the same time within the same group.</span></td>
</tr>
</tbody>
</table>
<p> </p>
<h2><span>Other Configuration and Methodology</span></h2>
<p><span>The configuration was as follows:</span></p>
<table border="1" width="100%" cellpadding="5">
<tbody>
<tr>
<td><span>Benchmark</span></td>
<td><span>Sysbench OLTP Read-Write</span></td>
</tr>
<tr>
<td><span>CPU</span></td>
<td><span>Intel Xeon Gold 6230 (2×20 cores, HT = 80 logical CPUs)</span></td>
</tr>
<tr>
<td><span>RAM</span></td>
<td><span>187 GiB DDR4</span></td>
</tr>
<tr>
<td><span>Storage</span></td>
<td><span>NVMe SSD (2.9 TB) INTEL SSDPE2KE032T8</span></td>
</tr>
<tr>
<td><span>OS</span></td>
<td><span>Ubuntu 24.04, kernel 6.8.0-60-generic</span></td>
</tr>
<tr>
<td><span>DB Engines</span></td>
<td><span>Percona Server for MySQL 9.7.1-1 (release build)</span></p>
<p><span>MySQL Server 26.7.0 (release build)</span></p>
</td>
</tr>
</tbody>
</table>
<p><span>Additional dimensions for the benchmark:</span></p>
<table border="1" width="100%" cellpadding="5">
<tbody>
<tr>
<td><span>Database Sizes (Row Number)</span></td>
<td><span>24Gb (100M rows)</span></td>
</tr>
<tr>
<td><span>Number of tables in DB Schema</span></td>
<td><span>20 (this number is constant for all runs)</span></p>
<p><span>Database Schema definition can be downloaded from here: </span></p>
<p><a href="https://percona-lab-results.github.io/2026-interactive-metrics/schema_dump.sql" target="_blank" rel="noopener"><span>https://percona-lab-results.github.io/2026-interactive-metrics/schema_dump.sql</span></a></p>
</td>
</tr>
<tr>
<td><span>Number of concurrent threads</span></td>
<td><span>40 / 80 / 120 / 160 / 320 / 640 / 1280 / 2560 / 5120</span></td>
</tr>
<tr>
<td><span>Buffer to Data Ratio</span></td>
<td><span>1:12 (I/O bound), 1:2 (Partially buffered), 1:1 (Fully buffered)</span></td>
</tr>
</tbody>
</table>
<p><span>Execution of the benchmarks was done as follows:</span></p>
<table border="1" width="100%" cellpadding="5">
<tbody>
<tr>
<td><span>Ramp-up</span></td>
<td><span><strong>48G – 600 sec (10 min)</strong></span></p>
<p>The Ramp-up times were established experimentally depending on the Data Size until the point when increasing them further did not bring significant changes.</p>
</td>
</tr>
<tr>
<td>Measurement window</td>
<td><span><strong>900 sec (15 min)</strong></span></p>
<p>Ideally it should be as long as possible, but measurements should take reasonable time. Hence, we used the experience of previous benchmarks and established that this window is adequate for the purpose.</p>
</td>
</tr>
<tr>
<td>Number of runs</td>
<td><span><strong>1 </strong></span></p>
<p>Could be more runs, but testing took a long time.</p>
</td>
</tr>
</tbody>
</table>
<p><span>Important Database Configuration options (the actual config files with specific settings for each run can be downloaded from the interactive graphs):</span></p>
<table border="1" width="100%" cellpadding="5">
<tbody>
<tr bgcolor="#DDDDDD">
<td colspan="2"><span><b>InnoDB – Buffer pool Tier</b></span></td>
</tr>
<tr>
<td><span>innodb_buffer_pool_size</span></td>
<td><b>2G/12G/32G</b></td>
</tr>
<tr>
<td><span>innodb_buffer_pool_load_at_startup</span></td>
<td><span>OFF</span></td>
</tr>
<tr>
<td><span>innodb_buffer_pool_dump_at_shutdown</span></td>
<td><span>OFF</span></td>
</tr>
<tr bgcolor="#DDDDDD">
<td colspan="2"><span><b>Threading</b></span></td>
</tr>
<tr>
<td><span>thread_stack</span></td>
<td><span>512K</span></td>
</tr>
<tr>
<td><span>thread_cache_size</span></td>
<td><span>256</span></td>
</tr>
<tr>
<td><span>back_log</span></td>
<td><span>4096</span></td>
</tr>
<tr bgcolor="#DDDDDD">
<td colspan="2"><span><b>InnoDB I/O</b></span></td>
</tr>
<tr>
<td><span>innodb_io_capacity</span></td>
<td><span>10000</span></td>
</tr>
<tr>
<td><span>innodb_io_capacity_max</span></td>
<td><span>20000</span></td>
</tr>
<tr>
<td><span>innodb_read_io_threads</span></td>
<td><span>16</span></td>
</tr>
<tr>
<td><span>innodb_write_io_threads</span></td>
<td><span>16</span></td>
</tr>
<tr>
<td><span>innodb_use_native_aio</span></td>
<td><span>ON</span></td>
</tr>
<tr bgcolor="#DDDDDD">
<td colspan="2"><span><b>InnoDB Log / Durability</b></span></td>
</tr>
<tr>
<td><span>innodb_log_buffer_size</span></td>
<td><span>256M</span></td>
</tr>
<tr>
<td><span>innodb_flush_log_at_trx_commit</span></td>
<td><span>1 # full ACID</span></td>
</tr>
<tr>
<td><span>innodb_doublewrite</span></td>
<td><span>ON</span></td>
</tr>
<tr bgcolor="#DDDDDD">
<td colspan="2"><span><b>InnoDB – Concurrency &amp; OLTP Tuning</b></span></td>
</tr>
<tr>
<td><span>innodb_stats_on_metadata</span></td>
<td><span>OFF</span></td>
</tr>
<tr>
<td><span>innodb_open_files</span></td>
<td><span>65536</span></td>
</tr>
<tr>
<td><span>innodb_lock_wait_timeout</span></td>
<td><span>50</span></td>
</tr>
<tr>
<td><span>innodb_rollback_on_timeout</span></td>
<td><span>ON</span></td>
</tr>
<tr bgcolor="#DDDDDD">
<td colspan="2"><span><b>Per-Session Buffers</b></span></td>
</tr>
<tr>
<td><span>sort_buffer_size    </span></td>
<td><span>4M</span></td>
</tr>
<tr>
<td><span>join_buffer_size    </span></td>
<td><span>4M</span></td>
</tr>
<tr>
<td><span>read_buffer_size    </span></td>
<td><span>2M</span></td>
</tr>
<tr>
<td><span>read_rnd_buffer_size</span></td>
<td><span>4M</span></td>
</tr>
<tr>
<td><span>tmp_table_size      </span></td>
<td><span>256M</span></td>
</tr>
<tr>
<td><span>max_heap_table_size</span></td>
<td><span>256M</span></td>
</tr>
<tr bgcolor="#DDDDDD">
<td colspan="2"><span><b>Binary Log</b></span></td>
</tr>
<tr>
<td><span>disable_log_bin</span></td>
<td><span>ON # Disabled binlog</span></td>
</tr>
<tr bgcolor="#DDDDDD">
<td colspan="2"><span><b>Other InnoDB settings</b></span></td>
</tr>
<tr>
<td><span>innodb_redo_log_capacity    </span></td>
<td><span>4G</span></td>
</tr>
<tr>
<td><span>innodb_change_buffering     </span></td>
<td><span>none</span></td>
</tr>
<tr>
<td><span>innodb_flush_method         </span></td>
<td><span>O_DIRECT</span></td>
</tr>
<tr>
<td><span>innodb_buffer_pool_instances</span></td>
<td><b>Calculated as</b><b><br />
</b><b>(innodb_buffer_pool_size G / 5)</b><b><br />
</b><b>But must be in range [1..8]</b></td>
</tr>
<tr bgcolor="#DDDDDD">
<td colspan="2"><span><b>Misc server settings</b></span></td>
</tr>
<tr>
<td><span>collation_server</span></td>
<td><span>utf8mb4_unicode_ci</span></td>
</tr>
<tr>
<td><span>bulk_insert_buffer_size</span></td>
<td><span>256M</span></td>
</tr>
<tr>
<td><span>myisam_sort_buffer_size </span></td>
<td><span>128M</span></td>
</tr>
<tr>
<td><span>key_buffer_size         </span></td>
<td><span>64M # MyISAM only, keep small for OLTP</span></td>
</tr>
</tbody>
</table>
<p> </p>
<h2><span>Results</span></h2>
<p><span>The scope of results is broad and therefore the results presentation will be divided into the sections.</span></p>
<h4><span>Percona Server 9.7.1-1 with and without thread pool:</span></h4>
<p><span>The most impressive effect of the thread pool can be illustrated on the following graph where the level of oversubscription is 4 (os4 in the legend) and the number of thread groups is 10 (TP 10 in the legend).</span></p>
<p><span><b> Graph 1.0 – best effect of thread pooling </b>[ <a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=graph&amp;metric=tps&amp;server=Percona-Server+9.7.1-1&amp;mem=2&amp;tp=off%2C10%2C20&amp;os=2%2C4" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=table&amp;metric=tps&amp;server=Percona-Server+9.7.1-1&amp;mem=2&amp;tp=off%2C10%2C20&amp;os=2%2C4" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]</span></span><img loading="lazy" decoding="async" class="alignnone size-full wp-image-54382" src="https://www.percona.com/wp-content/uploads/2026/10/001.png" alt="Graph 1.1 - thread pool size variations" width="1235" height="780"></p>
<p><span>The green line (<b>thread_pool_size=10/thread_pool_oversubscribe=4</b>) is closely followed by the blue line, which corresponds to the number of groups 20 and the oversubscription 2.</span></p>
<p><span>As the graph shows – the effect of the thread pool on the performance in the low thread count (40/80) is relatively small. A notable effect starts to show at 120 threads when non-pooled configuration TPS plunges down. It is good to keep in mind that the thread pooling mechanism is not a universal performance booster. Though, it helps to avoid system thrashing when the number of threads is much larger than CPU cores can process.</span></p>
<p><span>With 2560 connections the best configuration with thread pool shows excellent efficiency of 2304 TPS against 129 TPS without the thread pool, which is 17.9 times faster. Some thread-pooled configurations are more efficient than the other ones. The combination <b>thread_pool_size=20</b> with <b>thread_pool_oversubscribe=4</b> fails to prevent sharp TPS drop at 120 client connections, though its shape improves as the number of connections increases.The drop from the maximum of 2485 TPS at 640 connections to 2304 TPS at 2560 connections is visible (7.5%), but not critical.</span></p>
<p><span>Interesting that the optimal number of groups is smaller than the number of physical CPU cores (40).</span></p>
<p><span>Another important observation is that in this test increase of the number of thread groups causes the TPS performance to drop: the curve with <b>thread_pool_size=20</b> is below <b>thread_pool_size=10</b> and <b>thread_pool_size=40/80/120/160</b> are even lower.</span></p>
<p><span><b> Graph 1.1 – thread pool size variations </b>[ <a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=graph&amp;metric=tps&amp;server=Percona-Server+9.7.1-1&amp;mem=2&amp;tp=off%2C10%2C20%2C40%2C80%2C120%2C160&amp;os=4"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=table&amp;metric=tps&amp;server=Percona-Server+9.7.1-1&amp;mem=2&amp;tp=off%2C10%2C20%2C40%2C80%2C120%2C160&amp;os=4"><span>TABLE</span></a><span> ]</span></span><img loading="lazy" decoding="async" class="alignnone size-full wp-image-54383" src="https://www.percona.com/wp-content/uploads/2026/10/001-1.png" alt="Graph 1.1 - thread pool size variations" width="1235" height="780"></p>
<p><span>The next graph shows how TPS changes when we consider the optimal value for <b>thread_pool_size=10</b>, but change <b>thread_pool_oversubscribe</b>.</span></p>
<p><span><b> Graph 2.0 – oversubscription variations </b> [ <a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=graph&amp;metric=tps&amp;server=Percona-Server+9.7.1-1&amp;mem=2&amp;tp=off%2C10&amp;os=all" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=table&amp;metric=tps&amp;server=Percona-Server+9.7.1-1&amp;mem=2&amp;tp=off%2C10&amp;os=all" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]</span></span><img loading="lazy" decoding="async" class="alignnone wp-image-54387" src="https://www.percona.com/wp-content/uploads/2026/10/002.png" alt="Graph 2.0 - oversubscription variations" width="1235" height="780"></p>
<p><span>With the best configuration (<b>thread_pool_oversubscribe=4</b>) having 2304 TPS and the least performing pooling configuration (<b>thread_pool_oversubscribe=2</b>) with 2043 TPS the speed difference is 11%. So, a non-optimal oversubscription value can incur a significant penalty.</span></p>
<p><span>The above two cases correspond to the I/O bound scenario when the data size (24G) is much larger than the server buffer size (2G).</span></p>
<p><span>Let us see how the buffer pool efficiency changes as <b>innodb_buffer_pool_size</b> increased to 12G, which allows buffering approximately half of the data set.</span></p>
<p><span><b> Graph 3.0 – partially buffered data set (12G buffer) </b> [ <a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=graph&amp;metric=tps&amp;server=Percona-Server+9.7.1-1&amp;mem=12&amp;tp=all&amp;os=4" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=table&amp;metric=tps&amp;server=Percona-Server+9.7.1-1&amp;mem=12&amp;tp=all&amp;os=4" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]</span></span><img decoding="async" loading="lazy" class="alignnone size-full wp-image-54389" src="https://www.percona.com/wp-content/uploads/2026/10/003.png" alt="Graph 3.0 - partially buffered data set (12G buffer)" width="1235" height="780"></p>
<p><span>This time <b>thread_pool_size=20</b> is the optimal value for the data size (24G) and the allocated server buffer size (12G). The non-optimal oversubscription values have a similar effect (look at <a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=graph&amp;metric=tps&amp;server=Percona-Server+9.7.1-1&amp;mem=12&amp;tp=20&amp;os=all" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a>) on the performance as in Graph 2.0.</span></p>
<p><span>When the server configuration moves to the fully buffered data set the distribution of performance is changed:</span></p>
<p><span><b> Graph 4.0 – fully buffered data set (32G buffer) </b> [ <a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=graph&amp;metric=tps&amp;server=Percona-Server+9.7.1-1&amp;mem=32&amp;tp=all&amp;os=4" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=table&amp;metric=tps&amp;server=Percona-Server+9.7.1-1&amp;mem=32&amp;tp=all&amp;os=4" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]</span></span><img decoding="async" loading="lazy" class="alignnone size-full wp-image-54390" src="https://www.percona.com/wp-content/uploads/2026/10/004.png" alt="Graph 4.0 - fully buffered data set (32G buffer)" width="1235" height="780"></p>
<p><span>The configuration without the thread pool wins in all number of client connections in this test. The largest deviation from the base line is observed around 80 to 640 connections, but then the performance converses to around 16K TPS for all configurations. The configuration with  <b>thread_pool_size=10</b> is now the slowest one and larger thread pool sizes perform better.</span></p>
<p><span>Varying oversubscription did not have a notable effect with fully buffered data.</span></p>
<p><span><strong>NOTE:</strong> It would be interesting to see if thread pool wins with 5K or 10K connections. We might do another research devoted to extremely high thread count, but this post describes the efficiency of the thread pool across the low (40) to the high (2560) number of client connection threads.</span></p>
<p><span>Despite not having superior performance with regards to TPS with the fully buffered data set, the thread pool is still beneficial with regards to predictability of the server behavior. What I mean by this is most of the clients (95%) connected to the server have their transactions executed quickly, but a minority (5%) have to wait much longer. The response latency for the unlucky 5% might be out of the acceptable range. The long waiting clients do not care about other clients whose data was quickly processed. Therefore, the raw TPS does not hold much value for them.</span></p>
<p><span> <b>Graph 5.0 – p95 latency </b> [ <a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=graph&amp;metric=lat95&amp;server=Percona-Server+9.7.1-1&amp;mem=32&amp;tp=all&amp;os=4" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/thread-pool-benchmark/benchmark_report.html?display=table&amp;metric=lat95&amp;server=Percona-Server+9.7.1-1&amp;mem=32&amp;tp=all&amp;os=4" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]</span></span><img decoding="async" loading="lazy" class="alignnone size-full wp-image-54393" src="https://www.percona.com/wp-content/uploads/2026/10/005.png" alt="Graph 5.0 - p95 latency" width="1235" height="780"></p>
<p><span>Unlike TPS when the higher value is better, the p95 Latency should be kept as low as possible.</span></p>
<p><span>Up to 1280 client connections the p95 latency was grouping around roughly the same numbers. However, for 2560 connections it changed dramatically. The configuration with disabled thread pooling suddenly demonstrated much longer p95 than the pooled counterparts.</span></p>
<p><span>The 5% of clients will have to wait longer than 787 ms if the thread pool is not used. The pooled configurations keep a much tighter range of 235-297 ms. The system performs as well as its slowest/weakest link and if a client application performs several transactions it is more likely to end up waiting significantly longer. For some outliers the latency reached 2000 ms. </span></p>
<p> </p>
<h2><span>Conclusion</span></h2>
<p><span>Thread pooling does not bring any gains and even causes a small slow down on a low number of server connections.</span></p>
<p><span>The most visible effect of thread pooling can be seen in the scenario when I/O is one of the factors that limit performance.</span></p>
<p><span>Careful tuning of thread pool options is required to get the best performance. Even a seemingly small variation from optimal parameter values can cause large performance drops.</span></p>
<p><span>However, when properly configured, it can show spectacular results with almost 18 times TPS boost compared to the same server running without thread pool.</span></p>
<p><span>For system stability we should not only consider the raw TPS numbers, but also the latency related to processing of some transactions. Even if no TPS gain is obtained, the thread pool allows to minimize the waiting time for slowest transactions.</span></p>
<p>The post <a href="https://www.percona.com/blog/thread-pool-in-percona-server-and-mysql-part-1/">Thread Pool in Percona Server and MySQL (Part 1)</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/thread-pool-in-percona-server-and-mysql-part-1/">Thread Pool in Percona Server and MySQL (Part 1)</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>DBaaS Risks: 5 Costly Myths That Wreck Budgets and Trust</title>
        <link>https://minervadb.com/dbaas-risks-serverless-database-data-architect/</link>
        <pubDate>Sun, 04 Oct 2026 16:08:40 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/dbaas-risks-5-costly-myths-that-wreck-budgets-and-trust/</guid>
        <source url="https://minervadb.com/">MinervaDB</source>
        <description><![CDATA[<p>The cloud console says Available. The dashboard is green. The provider's status page has not had an incident in months. And yet the monthly invoice has doubled, a restore that "should have worked" did not, [...]</p>
<p><a href="https://minervadb.com/dbaas-risks-serverless-database-data-architect/">DBaaS Risks: 5 Costly Myths That Wreck Budgets and Trust</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>The cloud console says <em>Available</em>. The dashboard is green. The provider&#8217;s status page has not had an incident in months. And yet the monthly invoice has doubled, a restore that &#8220;should have worked&#8221; did not, and a security researcher has just emailed about a database endpoint reachable from the internet. None of these failures came from the provider. They came from a belief: that a managed or serverless database takes care of everything, so the business no longer needs anyone who owns its data architecture.</p>
<p>That belief is one of the most expensive <strong>DBaaS risks</strong> a company can carry, precisely because it feels like a saving. This post explains where the provider&#8217;s responsibility ends, how serverless database costs spiral without design ownership, why automated backups are not recoverability, and what a data architect or data management expert actually does on a managed platform. Every guardrail comes with code you can apply this week. Figures in examples are illustrative, not benchmarks.</p>
<h2>The myth: &#8220;the platform handles it&#8221;</h2>
<p>DBaaS platforms such as Amazon RDS and Aurora, Google Cloud SQL, AlloyDB and BigQuery, and Azure SQL are excellent engineering. They remove the toil of racking servers, patching operating systems, replicating storage and running failover machinery. Serverless options go further and scale capacity automatically. It is natural to conclude that the database is now &#8220;someone else&#8217;s problem&#8221;.</p>
<p>The providers themselves say otherwise. AWS describes it as the <a href="https://aws.amazon.com/compliance/shared-responsibility-model/" target="_blank" rel="noopener">shared responsibility model</a>: the provider is responsible for security &#8220;of&#8221; the cloud, and the customer remains responsible for security &#8220;in&#8221; the cloud, which for a database means its configuration, access, data and use. Every major provider draws the same line. The business still owns everything that determines cost, correctness and trust.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNjA4IiB3aWR0aD0iOTAwIiBoZWlnaHQ9IjYwOCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJEQm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CIgc3Ryb2tlLXdpZHRoPSIxIi8+PHRleHQgeD0iNDkwLjAiIHk9IjM1OS43IiBjbGFzcz0iYSIgZm9udC1zaXplPSIxNCIgZmlsbD0iIzBhMTQyNCI+QXV0b21hdGVkIHNuYXBzaG90cyAoYXMgY29uZmlndXJlZCk8L3RleHQ+PHJlY3QgeD0iNDc2LjAiIHk9IjM4MC43MTAwMDAwMDAwMDAwNCIgd2lkdGg9IjM4NC4wIiBoZWlnaHQ9IjM2IiByeD0iNiIgZmlsbD0iI2ZmZiIgc3Ryb2tlPSIjZGNkZWU0IiBzdHJva2Utd2lkdGg9IjEiLz48dGV4dCB4PSI0OTAuMCIgeT0iNDAzLjciIGNsYXNzPSJhIiBmb250LXNpemU9IjE0IiBmaWxsPSIjMGExNDI0Ij5GYWlsb3ZlciBtZWNoYW5pc20gKGFzIGNvbmZpZ3VyZWQpPC90ZXh0PjxyZWN0IHg9IjI0IiB5PSI1NDQuNzEiIHdpZHRoPSI4NTIiIGhlaWdodD0iNTAiIHJ4PSIxMCIgZmlsbD0iIzBhMWEyZiIgc3Ryb2tlPSIjMGExYTJmIiBzdHJva2Utd2lkdGg9IjEiLz48dGV4dCB4PSI0NTAuMCIgeT0iNTc1LjciIGNsYXNzPSJhYiIgZm9udC1zaXplPSIxNCIgZmlsbD0iI2ZmZmZmZiIgdGV4dC1hbmNob3I9Im1pZGRsZSI+JnF1b3Q7TWFuYWdlZCZxdW90OyByZW1vdmVzIHRvaWwsIG5vdCBhY2NvdW50YWJpbGl0eTogdGhlIGludm9pY2UgYW5kIHRoZSBicmVhY2ggbm90aWNlIGNhcnJ5IHlvdXIgbmFtZTwvdGV4dD48L3N2Zz4=" width="900" height="608" alt="DBaaS risks and the shared responsibility line: data model, queries, cost guardrails, restores, access control, upgrades, monitoring and exit plan remain with the business while the provider runs hardware, patching and replication" loading="lazy"><figcaption>Figure 1. Where the provider&#8217;s job ends and yours begins. Everything on the left still needs an owner.</figcaption></figure>
<p>Look at the left column of Figure 1, the heart of most DBaaS risks. None of those items is server administration. They are design and governance decisions, and they are exactly what a data architect does. Removing that role does not remove the decisions; it means they are made by default, by accident, or by whoever happens to be writing the next migration.</p>
<h2>Financial destruction, part 1: elastic capacity scales waste</h2>
<p>Serverless database costs follow usage, and usage is driven by design. A missing index turns a 5 ms lookup into a full table scan. An ORM that issues one query per row turns one request into hundreds. A dashboard that runs <code>SELECT *</code> over a year of data every minute scans terabytes a day. On a fixed-size server, these mistakes show up as slowness, and someone investigates. On an elastic platform, they show up as capacity: Aurora Serverless v2 adds ACUs, an on-demand table consumes more request units, BigQuery bills more bytes scanned. The application stays fast. The invoice absorbs the problem.</p>
<p>The ceiling is higher than many teams realise: AWS has <a href="https://aws.amazon.com/blogs/database/introducing-scaling-up-to-256-acus-with-amazon-aurora-serverless-v2/" target="_blank" rel="noopener">extended Aurora Serverless v2 to 256 ACUs</a> per instance. That headroom is a gift for genuine growth and a liability for unbounded design.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgMzcyIiB3aWR0aD0iOTAwIiBoZWlnaHQ9IjM3MiIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJTZXJ2ZXJsZXNzIGRhdGFiYXNlIGNvc3Qgc3BpcmFsOiBhIG1pc3NpbmcgaW5kZXggb3IgdW5ib3VuZGVkIHF1ZXJ5IGNhdXNlcyBmdWxsIHNjYW5zLCBhdXRvc2NhbGluZyBjYXBhY2l0eSBvciBieXRlcyBiaWxsZWQsIGFuZCBhIHJ1bmF3YXkgaW52b2ljZSwgd2l0aCB0aGUgZ3VhcmRyYWlsIHRoYXQgYnJlYWtzIGVhY2ggc3RlcCI+PHRpdGxlPlNlcnZlcmxlc3MgZGF0YWJhc2UgY29zdCBzcGlyYWw6IGEgbWlzc2luZyBpbmRleCBvciB1bmJvdW5kZWQgcXVlcnkgY2F1c2VzIGZ1bGwgc2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HQgeD0iNzAxLjAiIHk9IjI4MC43IiBjbGFzcz0iYWIiIGZvbnQtc2l6ZT0iMTMiIGZpbGw9IiMwMDQzY2UiPmJ1ZGdldHMgYW5kIGFub21hbHk8L3RleHQ+PHRleHQgeD0iNzAxLjAiIHk9IjI5Ny45IiBjbGFzcz0iYWIiIGZvbnQtc2l6ZT0iMTMiIGZpbGw9IiMwMDQzY2UiPmFsZXJ0czwvdGV4dD48cGF0aCBkPSJNNzc4LjUsMzIzLjcxMDAwMDAwMDAwMDA0IEw3NzguNSwzNDYuNzEwMDAwMDAwMDAwMDQgTDEyMS41LDM0Ni43MTAwMDAwMDAwMDAwNCBMMTIxLjUsMzI2LjcxMDAwMDAwMDAwMDA0IiBmaWxsPSJub25lIiBzdHJva2U9IiNiMzI2MWUiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWRhc2hhcnJheT0iNiA0IiBtYXJrZXItZW5kPSJ1cmwoI2FoKSIvPjxyZWN0IHg9IjI2MS42NTczNDM3NSIgeT0iMzM4LjcxMDAwMDAwMDAwMDA0IiB3aWR0aD0iMzc2LjY4NTMxMjUiIGhlaWdodD0iMTkiIHJ4PSI0IiBmaWxsPSIjZmZmIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMCIvPjx0ZXh0IHg9IjQ1MC4wIiB5PSIzNTEuNyIgY2xhc3M9ImFiIiBmb250LXNpemU9IjEzIiBmaWxsPSIjYjMyNjFlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIj5ubyBmZWVkYmFjayB0byBkZXNpZ246IHRoZSBuZXh0IHJlbGVhc2UgYWRkcyBtb3JlIHdhc3RlPC90ZXh0Pjwvc3ZnPg==" width="900" height="372" alt="Serverless database costs spiral: design gap, waste per request, elastic scaling and surprise invoice, with guardrails of schema review, pg_stat_statements, capacity limits and budget alerts" loading="lazy"><figcaption>Figure 2. The serverless cost spiral. Each step has a guardrail; without an owner, none of them exist.</figcaption></figure>
<p>An illustrative example of the arithmetic: a report that scans 2 TB per run, scheduled every 15 minutes, scans close to 200 TB a month. Multiply by your on-demand rate per terabyte and the number is rarely small. The same report with a partition filter and a pre-aggregated table might scan a few gigabytes. That difference is not a provider setting. It is a design decision.</p>
<p>The first line of defence is finding the waste. On any managed PostgreSQL, <code>pg_stat_statements</code> ranks queries by the work they do, which is what elastic platforms charge for:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- DBaaS risks, the design gap: find the queries that make elastic capacity expensive.
-- PostgreSQL on RDS, Aurora, Cloud SQL, AlloyDB or Azure (pg_stat_statements enabled).
SELECT queryid,
       calls,
       round(total_exec_time::NUMERIC / 1000, 1)                 AS total_s,
       round((total_exec_time / NULLIF(calls, 0))::NUMERIC, 2)    AS mean_ms,
       shared_blks_read + shared_blks_hit                         AS blocks_touched,
       round(rows::NUMERIC / NULLIF(calls, 0), 1)                 AS rows_per_call,
       left(query, 70)                                            AS query
FROM pg_stat_statements
ORDER BY shared_blks_read + shared_blks_hit DESC     -- work done, which is what you pay for
LIMIT 15;

-- Tables read mostly by sequential scans: usually a missing or unusable index.
SELECT relname,
       seq_scan,
       seq_tup_read,
       idx_scan,
       n_live_tup
FROM pg_stat_user_tables
WHERE seq_scan &gt; 0
  AND n_live_tup &gt; 100000
ORDER BY seq_tup_read DESC
LIMIT 15;</pre>
<p>On BigQuery, the equivalent discipline is estimating before running and refusing to run past a ceiling. Google documents both per-query limits and <a href="https://docs.cloud.google.com/bigquery/docs/custom-quotas" target="_blank" rel="noopener">custom query quotas</a> for projects and users:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="python"># Serverless database costs on BigQuery on-demand: you pay for bytes scanned,
# not for the rows you return. Estimate first, then refuse to run past a ceiling.
from google.cloud import bigquery

client = bigquery.Client()           # credentials from the environment, never in code

SQL = """
SELECT customer_id, SUM(amount) AS revenue
FROM `analytics.orders`
WHERE order_date BETWEEN '2026-09-01' AND '2026-09-30'   -- partition filter
GROUP BY customer_id
"""

# 1. Dry run: BigQuery plans the query and reports bytes it WOULD scan, for free.
dry = client.query(SQL, job_config=bigquery.QueryJobConfig(dry_run=True, use_query_cache=False))
gib = dry.total_bytes_processed / 1024**3
print(f"Estimated scan: {gib:,.1f} GiB")

# 2. Hard ceiling: the job fails instead of billing more than 50 GiB.
cfg = bigquery.QueryJobConfig(maximum_bytes_billed=50 * 1024**3)
rows = client.query(SQL, job_config=cfg).result()

# Project-wide protection belongs in custom quotas (query usage per day / per user),
# set by an administrator, so one dashboard or notebook cannot spend the month's budget.</pre>
<h2>Financial destruction, part 2: nobody set the ceilings</h2>
<p>Finding waste is reactive. The structural fix for serverless database costs is to make spend a designed property of the system: a maximum capacity per cluster, a storage autoscaling cap, a budget with forecast alerts, and a daily anomaly check. These are a few lines of infrastructure code, but someone has to decide the numbers, defend them in a review and change them deliberately when the business grows.</p>
<pre><code class="language-hcl"># DBaaS risks, guardrail 2: put a ceiling on elastic capacity and an alarm on spend.

# Aurora Serverless v2: capacity is billed in ACUs. Without a sensible maximum,
# a bad query or traffic spike scales the bill as happily as it scales the database.
resource "aws_rds_cluster" "events" {
  cluster_identifier  = "events-prod"
  engine              = "aurora-postgresql"
  engine_mode         = "provisioned"
  engine_version      = "16.6"
  storage_encrypted   = true
  deletion_protection = true
  manage_master_user_password = true
  master_username     = "dbadmin"

  serverlessv2_scaling_configuration {
    min_capacity = 0.5     # ACUs; the floor you pay for when idle (0 enables auto-pause on supported versions)
    max_capacity = 16      # ACUs; the ceiling is a business decision, written down and reviewed
  }
}

# Monthly budget for the database service with early warnings.
resource "aws_budgets_budget" "database" {
  name         = "database-monthly"
  budget_type  = "COST"
  limit_amount = "4000"             # illustrative; derive from your unit economics
  limit_unit   = "USD"
  time_unit    = "MONTHLY"

  cost_filter {
    name   = "Service"
    values = ["Amazon Relational Database Service"]
  }

  notification {                    # forecast to exceed: act before the money is spent
    comparison_operator        = "GREATER_THAN"
    threshold                  = 80
    threshold_type             = "PERCENTAGE"
    notification_type          = "FORECASTED"
    subscriber_email_addresses = ["data-platform@example.com"]
  }
}</code></pre>
<p>Then watch the trend of serverless database costs, not just the threshold. A daily query over the Cost and Usage Report catches a doubling in days rather than at month end:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- Serverless database costs: daily database spend from the AWS Cost and Usage Report
-- in Athena, with a simple anomaly flag. Column names follow the legacy CUR schema;
-- adjust them for CUR 2.0 exports.
WITH daily AS (
    SELECT date(line_item_usage_start_date)          AS usage_day,
           product_product_name                      AS service,
           SUM(line_item_unblended_cost)             AS cost_usd
    FROM cur.cost_and_usage
    WHERE product_product_name IN ('Amazon Relational Database Service', 'Amazon DynamoDB')
      AND line_item_usage_start_date &gt;= date_add('day', -60, current_date)
    GROUP BY 1, 2
)
SELECT usage_day,
       service,
       round(cost_usd, 2)                                                     AS cost_usd,
       round(avg(cost_usd) OVER (PARTITION BY service ORDER BY usage_day
                                 ROWS BETWEEN 14 PRECEDING AND 1 PRECEDING), 2) AS trailing_14d_avg,
       CASE WHEN cost_usd &gt; 1.5 * avg(cost_usd) OVER (PARTITION BY service ORDER BY usage_day
                                 ROWS BETWEEN 14 PRECEDING AND 1 PRECEDING)
            THEN 'INVESTIGATE' ELSE '' END                                     AS flag
FROM daily
ORDER BY usage_day DESC, service;</pre>
<h2>Reputation compromise, part 1: backups that were never restores</h2>
<p>&#8220;Backups are automatic&#8221; is true and dangerously incomplete. Automated snapshots are only as good as their retention, their location and the last time anyone restored one. Common gaps we find in DBaaS risks reviews: retention shorter than the time it takes to notice silent corruption, snapshots stored in the same account as production so one compromised credential can delete both, no tested point-in-time restore, and no idea how long a restore of the real dataset takes. The recovery time objective written in a contract is a guess until it has been measured.</p>
<p>A restore drill is the only evidence that counts. The script below restores production to a new instance, measures the elapsed time, validates the data and then removes the drill copy behind a verification step and an explicit confirmation gate:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">#!/usr/bin/env bash
# DBaaS risks, guardrail 3: a backup only counts once it has been restored.
# Quarterly point-in-time restore drill on Amazon RDS. Measures real RTO.
set -euo pipefail
: "${SRC:?source DB instance id}" "${PGPASSWORD:?}" "${PGUSER:?}"
DRILL="${SRC}-restore-drill-$(date -u +%Y%m%d)"
START=$(date +%s)

# 1. Restore to a NEW instance (never touches the source).
aws rds restore-db-instance-to-point-in-time 
  --source-db-instance-identifier "${SRC}" 
  --target-db-instance-identifier "${DRILL}" 
  --use-latest-restorable-time 
  --no-publicly-accessible 
  --tags Key=purpose,Value=restore-drill
aws rds wait db-instance-available --db-instance-identifier "${DRILL}"
END=$(date +%s)
echo "Restore completed in $(( (END - START) / 60 )) minutes  &lt;- your measured RTO for this size&quot;

# 2. Validate the data, not just the instance status.
HOST=$(aws rds describe-db-instances --db-instance-identifier &quot;${DRILL}&quot; 
        --query &#039;DBInstances[0].Endpoint.Address&#039; --output text)
psql -h &quot;${HOST}&quot; -d orders -At -c &quot;
  SELECT &#039;orders&#039;,  count(*), max(created_at) FROM orders
  UNION ALL
  SELECT &#039;payments&#039;, count(*), max(created_at) FROM payments;&quot;

# 3. DESTRUCTIVE cleanup of the drill copy only, behind verification and a gate.
TAG=$(aws rds list-tags-for-resource 
        --resource-name &quot;$(aws rds describe-db-instances --db-instance-identifier &quot;${DRILL}&quot; 
                           --query &#039;DBInstances[0].DBInstanceArn&#039; --output text)&quot; 
        --query &quot;TagList[?Key==&#039;purpose&#039;].Value&quot; --output text)
[[ &quot;${TAG}&quot; == &quot;restore-drill&quot; &amp;&amp; &quot;${DRILL}&quot; != &quot;${SRC}&quot; ]] || { echo &quot;Not a drill instance. Stop.&quot;; exit 1; }
read -r -p &quot;Type &#039;DELETE ${DRILL}&#039; to remove the drill copy: &quot; ANSWER
[[ &quot;${ANSWER}&quot; == &quot;DELETE ${DRILL}&quot; ]] || { echo &quot;Kept ${DRILL}.&quot;; exit 0; }
aws rds delete-db-instance --db-instance-identifier &quot;${DRILL}&quot; --skip-final-snapshot
aws rds wait db-instance-deleted --db-instance-identifier &quot;${DRILL}&quot;
aws rds describe-db-instances --db-instance-identifier &quot;${SRC}&quot; 
  --query &#039;DBInstances[0].DBInstanceStatus&#039; --output text      # validation: source still &quot;available&quot;</pre>
<p>Run it quarterly, record the time, and copy snapshots to a separate account and region. When a regulator, an auditor or a customer asks how long recovery takes, the answer becomes a measured number instead of a hope.</p>
<h2>Reputation compromise, part 2: secure platform, insecure database</h2>
<p>A managed database runs on hardened infrastructure. Whether it is reachable from the internet, who can log in, which roles can read raw personal data and whether the encryption keys are under your control are all configuration choices. Defaults vary by provider and console path, and &#8220;it worked in the demo&#8221; configurations have a way of reaching production. A safe baseline should be codified, reviewed and enforced, not remembered:</p>
<pre><code class="language-hcl"># DBaaS risks, guardrail 1: a managed database that is safe by default.
# Terraform (AWS provider 5.x). Every line below is a decision the provider
# will NOT make for you; leave one out and the default may be the risky option.
resource "aws_db_instance" "orders" {
  identifier                  = "orders-prod"
  engine                      = "postgres"
  engine_version              = "17"            # pin the major; track its end-of-support date
  instance_class              = "db.r7g.xlarge"
  allocated_storage           = 500
  max_allocated_storage       = 1000            # cap storage autoscaling: growth is a cost decision

  # Data protection
  storage_encrypted           = true
  kms_key_id                  = aws_kms_key.db.arn   # customer-managed key you can audit and rotate
  deletion_protection         = true                 # a stray "terraform destroy" cannot drop prod
  backup_retention_period     = 14                   # days; align with your documented RPO
  copy_tags_to_snapshot       = true
  skip_final_snapshot         = false
  final_snapshot_identifier   = "orders-prod-final"

  # Exposure
  publicly_accessible         = false
  db_subnet_group_name        = aws_db_subnet_group.private.name
  vpc_security_group_ids      = [aws_security_group.db_from_app_only.id]
  iam_database_authentication_enabled = true

  # Availability and observability
  multi_az                    = true
  performance_insights_enabled = true
  monitoring_interval         = 30                   # seconds, Enhanced Monitoring

  # Credentials never live in code: RDS stores the master secret in Secrets Manager.
  username                    = "dbadmin"
  manage_master_user_password = true

  auto_minor_version_upgrade  = true
  maintenance_window          = "sun:03:00-sun:04:00" # your quietest hour, not the default
}</code></pre>
<p>Inside the database, the same discipline applies: few superusers, masked views for analysts, and row-level isolation for multi-tenant data. Under regimes such as GDPR, India&#8217;s DPDP Act and HIPAA, the question after an incident is not which cloud you used but what controls you had and whether you can prove it.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- DBaaS risks, guardrail 4: least privilege and PII protection inside the database.
-- 1. Who can do everything? (rds_superuser on RDS/Aurora; adjust per platform)
SELECT r.rolname,
       r.rolcanlogin,
       ARRAY(SELECT b.rolname
             FROM pg_auth_members m
             JOIN pg_roles b ON b.oid = m.roleid
             WHERE m.member = r.oid) AS member_of
FROM pg_roles AS r
WHERE r.rolcanlogin
  AND (r.rolsuper
       OR pg_has_role(r.oid, 'rds_superuser', 'MEMBER'))
ORDER BY r.rolname;

-- 2. Analysts see masked PII through a view; the base table stays locked down.
REVOKE ALL ON customers FROM analyst_role;

CREATE OR REPLACE VIEW customers_masked AS
SELECT customer_id,
       left(email, 2) || '***@' || split_part(email, '@', 2) AS email_masked,
       country_code,
       created_at
FROM customers;

GRANT SELECT ON customers_masked TO analyst_role;

-- 3. Multi-tenant SaaS: each session only sees its own tenant's rows.
ALTER TABLE invoices ENABLE ROW LEVEL SECURITY;
CREATE POLICY invoices_tenant_isolation ON invoices
    USING (tenant_id = current_setting('app.tenant_id')::BIGINT);</pre>
<h2>The slow-burn risks: upgrades, end of support and lock-in</h2>
<p>Managed engines still reach end of support. On AWS, databases running major versions past the end of standard support can be automatically enrolled in <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/extended-support.html" target="_blank" rel="noopener">Amazon RDS Extended Support</a>, which carries an additional charge. That is a reasonable bridge for a planned migration and an unpleasant surprise for a business that did not know which versions it was running. A version inventory is the starting point for an upgrade calendar:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">#!/usr/bin/env bash
# DBaaS risks, guardrail 5: know every engine version you run before the provider tells you.
# Inventory of RDS and Aurora engine versions across regions, for the upgrade calendar.
for region in us-east-1 eu-west-1 ap-south-1; do
  aws rds describe-db-instances --region "${region}" 
    --query 'DBInstances[].[DBInstanceIdentifier,Engine,EngineVersion]' --output text 
  | awk -v r="${region}" '{print r"t"$0}'
done | sort -k3,3 -k4,4V
# Compare each major version with the provider's release calendar. Versions past the
# end of standard support can be enrolled in paid Extended Support automatically.</pre>
<p>Lock-in is the other slow burn. Proprietary features, provider-specific SQL extensions, egress pricing and tightly coupled event integrations are often the right choice, but each one raises the cost of leaving. A data architect records those choices and their exit cost while they are being made, rather than discovering them during a contract renegotiation.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNDc0IiB3aWR0aD0iOTAwIiBoZWlnaHQ9IjQ3NCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJEQmFhUyByaXNrcyBtYXA6IGNvbW1vbiBtYW5hZ2VkIGFuZCBzZXJ2ZXJsZXNzIGRhdGFiYXNlIG15dGhzLCB3aGF0IGFjdHVhbGx5IGhhcHBlbnMsIGFuZCB0aGUgZmluYW5jaWFsIGFuZCByZXB1dGF0aW9uYWwgaW1wYWN0IG9uIHRoZSBidXNpbmVzcyI+PHRpdGxlPkRCYWFTIHJpc2tzIG1hcDogY29tbW9uIG1hbmFnZWQgYW5kIHNlcnZlcmxlc3MgZGF0YWJhc2UgbXl0aHMsIHdoYXQgYWN0dWFsbHkgaGFwcGVucywgYW5kIHRoZSBmaW5hbmNpYWwgYW5kIHJlcHV0YXRpb25hbCBpbXBhY3Qgb24gdGhlIGJ1c2luZXNzPC90aXRsZT48ZGVmcz48bWFya2VyIGlkPSJhaCIgbWFya2VyV2lkdGg9IjgiIG1hcmtlckhlaWdodD0iOCIgcmVmWD0iNyIgcmVmWT0iNCIgb3JpZW50PSJhdXRvIiBtYXJrZXJVbml0cz0idXNlclNwYWNlT25Vc2UiPjxwYXRoIGQ9Ik0wLDAgTDgsNCBMMCw4IHoiIGZpbGw9IiM1YjY0NzIiLz48L21hcmtlcj48bWFya2VyIGlkPSJhaGIiIG1hcm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C90ZXh0Pjx0ZXh0IHg9IjcwMCIgeT0iNDQwLjUiIGNsYXNzPSJhYiIgZm9udC1zaXplPSIxNCIgZmlsbD0iIzBhMTQyNCI+cGxhdGZvcm08L3RleHQ+PC9zdmc+" width="900" height="474" alt="DBaaS risks map of five myths: it scales so design does not matter, backups are automatic, the cloud is secure, upgrades are handled, we can always move later, with financial and reputation impact" loading="lazy"><figcaption>Figure 3. Five DBaaS myths, what really happens, and the financial and reputational cost.</figcaption></figure>
<h2>What a data architect actually does on a managed platform</h2>
<p>The role has changed, not disappeared. On a managed or serverless platform a data architect or data management expert spends little time on servers and most of it on decisions: which engine fits which workload, how data is modelled and keyed, what each feature will cost at ten times today&#8217;s traffic, what the recovery objectives are and how they are proven, who may see which data, and how the business could leave a platform if it had to.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNDM4IiB3aWR0aD0iOTAwIiBoZWlnaHQ9IjQzOCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJXaGF0IGEgZGF0YSBhcmNoaXRlY3Qgb3IgZGF0YSBtYW5hZ2VtZW50IGV4cGVydCBvd25zIGFjcm9zcyB0aGUgZGF0YSBsaWZlY3ljbGUgb24gREJhYVMgYW5kIHNlcnZlcmxlc3MgcGxhdGZvcm1zOiBkZXNpZ24sIGJ1aWxkLCBvcGVyYXRlIGFuZCBnb3Zlcm4sIHdpdGggZGVsaXZlcmFibGVzIj48dGl0bGU+V2hhdCBhIGRhdGEgYXJjaGl0ZWN0IG9yIGRhdGEgbWFuYWdlbWVudCBleHBlcnQgb3ducyBhY3Jvc3MgdGhlIGRhdGEgbGlmZWN5Y2xlIG9uIERCYWFTIGFuZCBzZXJ2ZXJsZXNzIHBsYXRmb3JtczogZGVzaWduLCBidWlsZCwgb3BlcmF0ZSBhbmQgZ292ZXJuLCB3aXRoIGRlbGl2ZXJhYmxlcz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E0LjUiPlBJSSBjbGFzc2lmaWNhdGlvbiBhbmQgbWFza2luZzwvdGV4dD48Y2lyY2xlIGN4PSI0ODAuMCIgY3k9IjM1NS4zNyIgcj0iNCIgZmlsbD0iI2I4NWMwMCIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiLz48dGV4dCB4PSI0OTQuMCIgeT0iMzU5LjQiIGNsYXNzPSJhIiBmb250LXNpemU9IjE0LjUiPmxlYXN0LXByaXZpbGVnZSBhY2Nlc3MgcmV2aWV3czwvdGV4dD48Y2lyY2xlIGN4PSI0ODAuMCIgY3k9IjM4Ni41MSIgcj0iNCIgZmlsbD0iI2I4NWMwMCIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiLz48dGV4dCB4PSI0OTQuMCIgeT0iMzkwLjUiIGNsYXNzPSJhIiBmb250LXNpemU9IjE0LjUiPmV4aXQgcGxhbiBhbmQgcG9ydGFiaWxpdHkgdGVzdHM8L3RleHQ+PC9zdmc+" width="900" height="438" alt="What a data architect owns on DBaaS and serverless platforms: design, build, operate and govern, with deliverables such as data model, infrastructure as code, restore drills and PII classification" loading="lazy"><figcaption>Figure 4. What a data architect owns across the lifecycle on a managed platform.</figcaption></figure>
<p>Not every company needs a full-time hire to cover this. Many need a fractional data architect, or a partner who brings the role and a team behind it. What no company should do is leave the role empty and assume the platform fills it. DBaaS risks are not caused by the providers; they are caused by the gap between what the provider does and what the business assumes it does.</p>
<h2>Why &#8220;we will hire a data architect later&#8221; costs more</h2>
<p>Data design debt compounds in a way application debt often does not. A table keyed badly at launch holds a year of data by the time anyone notices; fixing it means a migration under live traffic, dual writes, backfills and a cutover window. A tenant model without isolation has to be retrofitted while customers are using it. A cost structure built on scanning raw events has to be redesigned while the invoice keeps arriving. The earlier a data architect reviews these choices, the cheaper each correction is.</p>
<p>There is also a negotiating cost. A business that cannot say what it spends per feature, how fast it can recover or how it would leave a provider has no leverage in a renewal and no credible answer in a due-diligence questionnaire. Investors, enterprise buyers and auditors increasingly ask these questions directly, and &#8220;the platform handles it&#8221; is not an answer they accept. Treating DBaaS risks as a board-level topic, with named owners, is cheaper than explaining an incident afterwards.</p>
<h2>Twelve questions for leadership</h2>
<p>If the answer to any of these is &#8220;the platform handles it&#8221; or &#8220;we are not sure&#8221;, the business is carrying unpriced DBaaS risks:</p>
<ol>
<li>What is the maximum monthly database spend, and what technically stops us exceeding it?</li>
<li>Which ten queries cost the most, and who reviewed them?</li>
<li>When did we last restore production, and how long did it take?</li>
<li>Are backups copied to a separate account and region?</li>
<li>Is any database endpoint reachable from the internet?</li>
<li>How many people can read raw personal data?</li>
<li>Who controls the encryption keys?</li>
<li>Which engine versions do we run, and when does each reach end of support?</li>
<li>What are our RPO and RTO per system, and are they measured or assumed?</li>
<li>Which provider-specific features would make leaving expensive?</li>
<li>Who is on call for the database, and what is their runbook?</li>
<li>Who owns the data model and approves schema changes?</li>
</ol>
<h2>How MinervaDB closes the gap</h2>
<p>MinervaDB is a vendor-neutral, full-stack database infrastructure company. We act as the data architect and data management team for businesses on Amazon RDS and Aurora, DynamoDB, Google Cloud SQL, AlloyDB and BigQuery, Azure SQL and Cosmos DB, Snowflake and Databricks, as well as self-managed PostgreSQL, MySQL, SQL Server, MongoDB and ClickHouse. A typical engagement starts with a DBaaS risks review covering cost, recoverability, security and lifecycle, then puts the guardrails in this post into code.</p>
<p>We have supported more than 900 enterprises from 46 cities over 15+ years, with 24×7 consultative support targets of 15 minutes for Severity 1, 12 hours for Severity 2, 24 hours for Severity 3 and 48 hours for Severity 4. Because we sell no licences, we will also tell you when a managed service is the right choice and when it is not.</p>
<h2>Frequently asked questions</h2>
<h3>What are the biggest DBaaS risks for a business?</h3>
<p>Uncontrolled cost from elastic scaling of inefficient queries, backups that have never been restored, insecure configuration and access, unplanned end-of-support upgrades, and lock-in that makes leaving expensive.</p>
<h3>Why do serverless database costs grow so quickly?</h3>
<p>Serverless platforms bill by capacity used, requests or bytes scanned. Missing indexes, chatty application code and unfiltered analytical queries consume more of each, and the platform scales to absorb them instead of failing.</p>
<h3>Do we still need a data architect if we use a managed database?</h3>
<p>Yes. The provider operates infrastructure; the business still owns the data model, queries, cost limits, recovery testing, access control and lifecycle planning. That ownership can be a full-time hire, a fractional role or a partner.</p>
<h3>Are automated DBaaS backups enough for disaster recovery?</h3>
<p>Not on their own. Recovery needs adequate retention, copies in a separate account and region, and regular restore drills that measure the real recovery time.</p>
<h3>How can we cap serverless database costs?</h3>
<p>Set maximum capacity per cluster, cap storage autoscaling, use per-query byte limits and custom quotas on scan-billed engines, configure budgets with forecast alerts, and review the most expensive queries regularly.</p>
<p><em>All Terraform, SQL, Python and scripts in this post are illustrative; limits, versions and thresholds are examples, not recommendations for your workload, and provider features and pricing change over time. Test every change in a non-production environment first, confirm current provider documentation, and maintain a robust disaster-recovery posture, including verified backups and rehearsed failover, before applying anything to production.</em></p>
<p><strong>Not sure who owns your data architecture today?</strong> <a href="https://minervadb.com/contact-minervadb-book-an-appointment/">Book a DBaaS risks review with a MinervaDB principal architect</a>, or email contact@minervadb.com.</p>
<p><a href="https://minervadb.com/dbaas-risks-serverless-database-data-architect/">DBaaS Risks: 5 Costly Myths That Wreck Budgets and Trust</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>SQL Server Performance: 7 Brilliant 2025 Engine Internals</title>
        <link>https://minervadb.com/sql-server-performance-sql-server-2025-internals/</link>
        <pubDate>Sat, 03 Oct 2026 13:38:07 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/sql-server-performance-7-brilliant-2025-engine-internals/</guid>
        <source url="https://minervadb.com/">MinervaDB</source>
        <description><![CDATA[<p>On July 14, 2026, SQL Server 2016 reached end of support, and Microsoft’s own blog put it plainly: plan your next steps. For thousands of estates the next step is SQL Server 2025, generally available [...]</p>
<p><a href="https://minervadb.com/sql-server-performance-sql-server-2025-internals/">SQL Server Performance: 7 Brilliant 2025 Engine Internals</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>On July 14, 2026, SQL Server 2016 reached end of support, and Microsoft’s own blog put it plainly: plan your next steps. For thousands of estates the next step is SQL Server 2025, generally available since November 2025. The marketing headline is AI. The reason DBAs should care is lower in the stack: SQL Server 2025 changes how the lock manager, the optimizer, tempdb and Always On replicas behave, and each change moves a <strong>SQL Server performance</strong> number you can measure.</p>
<p>This post is a tour of those SQL Server 2025 internals with the measurements that prove them. We cover optimized locking, optional parameter plan optimization, columnstore and batch mode, tempdb space resource governance, persisted statistics on secondaries and the high availability and data movement story, then close with a staged upgrade path. Feature facts come from Microsoft’s official <a href="https://www.microsoft.com/en-us/sql-server/" target="_blank" rel="noopener">SQL Server site</a> and <a href="https://www.microsoft.com/en-us/sql-server/blog/" target="_blank" rel="noopener">SQL Server blog</a>; T-SQL is version-pinned and every number in our examples is illustrative, not a benchmark.</p>
<h2>SQL Server 2025 at a glance: the release facts</h2>
<p>Microsoft announced SQL Server 2025 in November 2024, shipped a public preview in May 2025 and the first release candidate in August 2025, and the November 18, 2025 post on the <a href="https://www.microsoft.com/en-us/sql-server/blog/2025/11/18/one-consistent-sql-the-launchpad-from-legacy-to-innovation/" target="_blank" rel="noopener">SQL Server blog</a> marked general availability. The product reports version 17.x and introduces compatibility level 170. Microsoft describes “over 50 enhancements made to the database engine”. The <a href="https://www.microsoft.com/en-us/sql-server/" target="_blank" rel="noopener">SQL Server product page</a> groups the ones that matter for SQL Server performance under three lines: batch mode and faster query processing, improved concurrency with optimized locking, and “reliable failover enhancements”.</p>
<p>Express edition now supports databases up to 50 GB, which matters for small production servers that used to hit the old ceiling. And in September 2026, Microsoft made SQL Server on Azure Local generally available for connected and disconnected operations. Start every upgrade conversation by confirming what you actually run:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- SQL Server performance baseline, step 0: know exactly what you are running.
-- SQL Server 2025 reports product version 17.x and supports compatibility level 170.
SELECT SERVERPROPERTY('ProductVersion')      AS product_version,   -- 17.0.xxxx.x on SQL Server 2025
       SERVERPROPERTY('ProductLevel')        AS product_level,     -- RTM / CU level
       SERVERPROPERTY('ProductUpdateLevel')  AS cumulative_update,
       SERVERPROPERTY('Edition')             AS edition;

-- Compatibility level per database: new optimizer behaviour is gated by it.
SELECT name,
       compatibility_level,
       is_read_committed_snapshot_on,
       is_accelerated_database_recovery_on
FROM sys.databases
WHERE database_id &gt; 4
ORDER BY name;</pre>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNTM0IiB3aWR0aD0iOTAwIiBoZWlnaHQ9IjUzNCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJTUUwgU2VydmVyIHBlcmZvcm1hbmNlIGludGVybmFscyBtYXAgZm9yIFNRTCBTZXJ2ZXIgMjAyNTogd2hpY2ggZW5naW5lIGNvbXBvbmVudCBlYWNoIG5ldyBwZXJmb3JtYW5jZSwgc2NhbGFiaWxpdHkgYW5kIGhpZ2ggYXZhaWxhYmlsaXR5IGNhcGFiaWxpdHkgY2hhbmdlcyI+PHRpdGxlPlNRTCBTZXJ2ZXIgcGVyZm9ybWFuY2UgaW50ZXJuYWxzIG1hcCBmb3IgU1FMIFNlcnZlciAyMDI1OiB3aGljaCBlbmdpbmUgY29tcG9uZW50IGVhY2ggbmV3IHBlcmZvcm1hbmNlLCBzY2FsYWJpbGl0eSBhbmQgaGlnaCBhdmFpbGFiaWxpdHkgY2FwYWJpbGl0eSBjaGFuZ2VzPC90aXRsZT48ZGVmcz48bWFya2VyIGlkPSJhaCIgbWFya2VyV2lkdGg9IjgiIG1hcmtlckhlaWdodD0iOCIgcmVmWD0iNyIgcmVmWT0iNCIgb3JpZW50PSJhdXRvIiBtYXJrZXJVbml0cz0idXNlclNwYWNlT25Vc2UiPjxwYXRoIGQ9Ik0wL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jUiIGZpbGw9IiMwYTE0MjQiPkRhdGEgbW92ZW1lbnQ8L3RleHQ+PHRleHQgeD0iMjEwIiB5PSI1MDAuMyIgY2xhc3M9ImEiIGZvbnQtc2l6ZT0iMTQiPkNoYW5nZSBldmVudCBzdHJlYW1pbmcsIEZhYnJpYyBtaXJyb3Jpbmc8L3RleHQ+PHRleHQgeD0iNTQ4IiB5PSI1MDAuMyIgY2xhc3M9ImFiIiBmb250LXNpemU9IjE0IiBmaWxsPSIjMGExNDI0Ij5hbmFseXRpY3Mgd2l0aG91dCBFVEwgbG9hZCBvbiBPTFRQPC90ZXh0Pjwvc3ZnPg==" width="900" height="534" alt="SQL Server performance internals map for SQL Server 2025 showing lock manager, optimizer, executor, DML processing, tempdb, Always On replicas and data movement changes" loading="lazy"><figcaption>Figure 1. Where SQL Server 2025 changes the engine, and what you should see after each change.</figcaption></figure>
<h2>Measure first: a SQL Server performance baseline worth trusting</h2>
<p>Every engine change in this post is a hypothesis until a baseline proves it. Before touching binaries, we turn on Query Store with wait statistics capture and keep at least two weeks of history, then record lock waits and lock manager memory. Those three sources answer the questions that matter after the upgrade: did plans change, did waits change, and did the lock manager shrink.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- SQL Server performance baseline, step 1: capture behaviour BEFORE changing anything.
-- Query Store keeps plans and runtime stats per query; size it for 2+ weeks.
ALTER DATABASE [SalesDB] SET QUERY_STORE = ON
(
    OPERATION_MODE              = READ_WRITE,
    QUERY_CAPTURE_MODE          = AUTO,          -- skip trivial ad hoc noise
    MAX_STORAGE_SIZE_MB         = 4096,
    INTERVAL_LENGTH_MINUTES     = 15,
    CLEANUP_POLICY              = (STALE_QUERY_THRESHOLD_DAYS = 30),
    WAIT_STATS_CAPTURE_MODE     = ON
);

-- Lock-related waits since startup: the numbers optimized locking should move.
SELECT wait_type,
       waiting_tasks_count,
       wait_time_ms / 1000.0                       AS wait_s,
       wait_time_ms * 1.0 / NULLIF(waiting_tasks_count, 0) AS avg_wait_ms
FROM sys.dm_os_wait_stats
WHERE wait_type LIKE N'LCK[_]M[_]%'
ORDER BY wait_time_ms DESC;

-- Memory consumed by the lock manager right now.
SELECT type,
       SUM(pages_kb) / 1024.0 AS lock_memory_mb
FROM sys.dm_os_memory_clerks
WHERE type = N'OBJECTSTORE_LOCK_MANAGER'
GROUP BY type;</pre>
<p>Export the Query Store data and the wait snapshot before the upgrade. Wait statistics are cumulative since the last restart, so a before-and-after comparison needs two snapshots over comparable business periods, not one number.</p>
<h2>Inside the lock manager: how optimized locking works</h2>
<p>Classic SQL Server locking is pessimistic and granular. An UPDATE scans candidate rows with update (U) locks, converts qualifying rows to exclusive (X) locks and holds each X lock until the transaction commits. A large update therefore holds thousands of row locks, consumes lock memory and risks escalation to a table lock that blocks everyone. Microsoft’s description of optimized locking is precise: it “reduce[s] lock memory consumption and minimize[s] blocking for concurrent transactions through Transaction ID (TID) Locking and Lock After Qualification (LAQ)”.</p>
<p>TID locking changes what is held. Each modified row version carries the ID of the transaction that wrote it, and the transaction holds a single exclusive lock on its own ID. Row locks are taken only for the moment of modification and then released, because anyone who needs to wait for that row can wait on the TID instead. Lock after qualification changes when locks are taken: under read committed snapshot, the predicate is evaluated against the latest committed version without a U lock, and only rows that qualify are locked. Fewer locks, held for less time, is exactly what high-concurrency OLTP needs.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNDEwIiB3aWR0aD0iOTAwIiBoZWlnaHQ9IjQxMCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJTUUwgU2VydmVyIHBlcmZvcm1hbmNlIHdpdGggb3B0aW1pemVkIGxvY2tpbmc6IGNsYXNzaWMgcm93IGFuZCBwYWdlIGxvY2tzIGhlbGQgdG8gZW5kIG9mIHRyYW5zYWN0aW9uIGNvbXBhcmVkIHdpdGggU1FMIFNlcnZlciAyMDI1IHRyYW5zYWN0a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5MC4wIiB5PSIzMDAuNiIgY2xhc3M9ImFiIiBmb250LXNpemU9IjEyIiBmaWxsPSIjZmZmZmZmIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIj41PC90ZXh0Pjx0ZXh0IHg9IjUxMC4wIiB5PSIzMDAuNiIgY2xhc3M9ImEiIGZvbnQtc2l6ZT0iMTQiPmNvbmN1cnJlbnQgd3JpdGVycyB0byBvdGhlciByb3dzIHByb2NlZWQ8L3RleHQ+PHJlY3QgeD0iNDc4LjAiIHk9IjM0NC43MTAwMDAwMDAwMDAwNCIgd2lkdGg9IjM4MC4wIiBoZWlnaHQ9IjM2IiByeD0iOCIgZmlsbD0iIzFmN2E0ZCIgc3Ryb2tlPSIjMWY3YTRkIiBzdHJva2Utd2lkdGg9IjEiLz48dGV4dCB4PSI2NjguMCIgeT0iMzY3LjciIGNsYXNzPSJhYiIgZm9udC1zaXplPSIxNSIgZmlsbD0iI2ZmZmZmZiIgdGV4dC1hbmNob3I9Im1pZGRsZSI+MSBUSUQgbG9jayBoZWxkIHRvIENPTU1JVDwvdGV4dD48L3N2Zz4=" width="900" height="410" alt="Optimized locking in SQL Server 2025 compared with classic locking: thousands of row X locks held to commit versus one transaction ID lock with lock after qualification" loading="lazy"><figcaption>Figure 2. Optimized locking: one TID lock held to commit instead of one lock per modified row (illustrative).</figcaption></figure>
<p>Optimized locking depends on two database settings that are already familiar: accelerated database recovery (ADR), whose persistent version store carries the row versions and their transaction IDs, and read committed snapshot isolation (RCSI) for LAQ. Turning RCSI on changes read semantics for existing code, so it deserves testing in its own right. The script below enables all three with verification before, a confirmation gate and validation after.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- Optimized locking (SQL Server 2025 internals): enable per database, in a maintenance window.
-- Run with sqlcmd:  sqlcmd -S $(SQLHOST) -d master -v CONFIRM="NO" -i enable_optlock.sql
-- Changing RCSI needs exclusive access; WITH ROLLBACK IMMEDIATE disconnects sessions.
:setvar DB "SalesDB"

-- ---------- Verification BEFORE ----------
SELECT name,
       is_accelerated_database_recovery_on,
       is_read_committed_snapshot_on,
       DATABASEPROPERTYEX(name, 'IsOptimizedLockingOn') AS optimized_locking_on
FROM sys.databases
WHERE name = N'$(DB)';

-- ---------- Confirmation gate ----------
IF N'$(CONFIRM)'  N'YES'
BEGIN
    RAISERROR(N'Dry run only. Re-run with -v CONFIRM="YES" to apply.', 10, 1);
    SET NOEXEC ON;                         -- compile but execute nothing below
END;
GO

-- 1. Accelerated database recovery: row versions in the persistent version store
--    carry the transaction ID that TID locking relies on.
ALTER DATABASE [$(DB)] SET ACCELERATED_DATABASE_RECOVERY = ON;

-- 2. Read committed snapshot: lets lock after qualification (LAQ) evaluate
--    predicates on the latest committed version without U locks.
ALTER DATABASE [$(DB)] SET READ_COMMITTED_SNAPSHOT ON WITH ROLLBACK IMMEDIATE;

-- 3. Optimized locking itself.
ALTER DATABASE [$(DB)] SET OPTIMIZED_LOCKING = ON;
GO
SET NOEXEC OFF;
GO

-- ---------- Validation AFTER ----------
SELECT name,
       is_accelerated_database_recovery_on,
       is_read_committed_snapshot_on,
       DATABASEPROPERTYEX(name, 'IsOptimizedLockingOn') AS optimized_locking_on   -- expect 1
FROM sys.databases
WHERE name = N'$(DB)';

-- ---------- Rollback (reverse order) ----------
-- ALTER DATABASE [$(DB)] SET OPTIMIZED_LOCKING = OFF;
-- ALTER DATABASE [$(DB)] SET READ_COMMITTED_SNAPSHOT OFF WITH ROLLBACK IMMEDIATE;
-- ALTER DATABASE [$(DB)] SET ACCELERATED_DATABASE_RECOVERY = OFF;</pre>
<p>Then prove the effect of optimized locking on your own workload. With it on, an open transaction that updated thousands of rows shows a single <code>XACT</code> lock in <code>sys.dm_tran_locks</code> instead of a matching number of KEY or RID locks. Over a business cycle, compare the <code>LCK_M_*</code> waits and the <code>OBJECTSTORE_LOCK_MANAGER</code> clerk with the baseline.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- SQL Server performance check: see the TID lock instead of thousands of row locks.
-- Session 1: an open transaction that updates many rows.
BEGIN TRANSACTION;
UPDATE dbo.Orders
SET    Status = N'SHIPPED'
WHERE  OrderDate &gt;= '2026-09-01' AND OrderDate &lt; &#039;2026-09-02&#039;;
-- (leave the transaction open)

-- Session 2: what locks does session 1 hold?
SELECT request_session_id,
       resource_type,               -- XACT = the transaction ID lock under optimized locking
       request_mode,
       COUNT(*) AS lock_count
FROM sys.dm_tran_locks
WHERE request_session_id = 61       -- session 1 spid
GROUP BY request_session_id, resource_type, request_mode
ORDER BY lock_count DESC;

-- Expected shape with optimized locking ON: one XACT X lock plus intent locks,
-- not one KEY or RID X lock per updated row.
-- Session 1: COMMIT;  (or ROLLBACK)</pre>
<h2>Optimizer and executor: fewer bad plans, faster scans</h2>
<h3>Optional parameter plan optimization</h3>
<p>Parameter sniffing is the most common cause of “it was fast yesterday” incidents. Microsoft introduced optional parameter plan optimization (OPPO), “designed to enable SQL Server to choose the optimal execution plan based on customer-provided runtime parameter values and to significantly reduce bad parameter sniffing problems”. The target is the catch-all search procedure where a parameter may be NULL to mean “any value”: one cached plan cannot serve both the selective and the unrestricted case well.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- SQL Server 2025 internals: optional parameter plan optimization (OPPO).
-- Targets the classic "optional parameter" pattern that sniffs one plan for all calls.
ALTER DATABASE [SalesDB] SET COMPATIBILITY_LEVEL = 170;
ALTER DATABASE SCOPED CONFIGURATION SET OPTIONAL_PARAMETER_OPTIMIZATION = ON;
GO

CREATE OR ALTER PROCEDURE dbo.SearchOrders
    @CustomerId INT = NULL,          -- NULL means "any customer"
    @Status     NVARCHAR(20) = NULL
AS
BEGIN
    SET NOCOUNT ON;
    -- Before OPPO: a plan compiled for @CustomerId = NULL (scan) could be reused for a
    -- selective @CustomerId (seek wanted), or the reverse. OPPO lets the optimizer keep
    -- separate plan variants depending on whether the optional parameter is supplied.
    SELECT OrderId, CustomerId, OrderDate, Amount, Status
    FROM dbo.Orders
    WHERE (CustomerId = @CustomerId OR @CustomerId IS NULL)
      AND (Status     = @Status     OR @Status     IS NULL);
END;
GO

-- Verify in Query Store: one parent query, multiple plan variants.
SELECT qv.parent_query_id,
       qv.query_variant_query_id,
       p.plan_id,
       rs.count_executions,
       rs.avg_duration / 1000.0 AS avg_ms
FROM sys.query_store_query_variant AS qv
JOIN sys.query_store_plan          AS p  ON p.query_id = qv.query_variant_query_id
JOIN sys.query_store_runtime_stats AS rs ON rs.plan_id = p.plan_id
ORDER BY qv.parent_query_id, avg_ms DESC;</pre>
<p>OPPO is gated by compatibility level 170, which also changes other optimizer behaviour. That is why the upgrade path at the end of this post raises the compatibility level as a separate, reversible step, with Query Store watching for regressions.</p>
<h3>Batch mode, columnstore and ordered nonclustered columnstore</h3>
<p>Microsoft cites “improvements in batch mode processing and columnstore indexing” in SQL Server 2025, and one customer quoted in the preview announcement reported that an “ordered non-clustered Columnstore index significantly improved query performance by over 63%”. The internals are simple: when rowgroups are built in key order, each segment’s min and max values cover a narrow range, so a date-range query can skip whole rowgroups instead of decompressing them.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- SQL Server performance for analytics on OLTP tables: ordered nonclustered columnstore.
-- Ordering rowgroups by OrderDate makes min/max segment metadata tight, so date-range
-- queries skip most rowgroups (segment elimination).
CREATE NONCLUSTERED COLUMNSTORE INDEX ncci_Orders_Analytics
ON dbo.Orders (OrderDate, CustomerId, Amount, Status)
ORDER (OrderDate)
WITH (MAXDOP = 1);                  -- single-threaded build gives the cleanest ordering

-- Measure elimination: compare segment reads before and after.
SET STATISTICS IO ON;
SELECT CustomerId, SUM(Amount) AS revenue
FROM dbo.Orders
WHERE OrderDate &gt;= '2026-09-01' AND OrderDate &lt; &#039;2026-10-01&#039;
GROUP BY CustomerId;
SET STATISTICS IO OFF;
-- Look for &quot;segment reads N, segment skipped M&quot; in the Messages tab.</pre>
<p>Treat the 63% as one customer’s result, not a promise. The measurement that matters for your SQL Server performance is the ratio of segments skipped to segments read for your own range predicates.</p>
<h3>Optimized Halloween protection</h3>
<p>Update plans that read and write the same index need Halloween protection so a row is not updated twice, traditionally implemented with a spool that copies rows into tempdb. Microsoft lists “optimized Halloween protection” among the engine redesigns in SQL Server 2025. In practice we look for fewer eager spools in update plans and lower tempdb usage for large modifications after the upgrade.</p>
<h2>tempdb: from shared hazard to governed resource</h2>
<p>tempdb is shared by every database on the instance, and a single runaway sort, hash or snapshot-heavy report can fill it and stall everything else. SQL Server 2025 adds tempdb space resource governance, which Microsoft says helps “save time and reduce risk”. The control sits in Resource Governor: a workload group gets a maximum amount of tempdb data space, and requests that exceed it fail instead of taking the instance down with them.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- SQL Server 2025 internals: tempdb space resource governance.
-- Cap how much tempdb data space one workload group may consume, so a runaway
-- report cannot fill tempdb and stall the whole instance.
USE master;
GO
CREATE RESOURCE POOL rp_reporting;
GO
CREATE WORKLOAD GROUP wg_reporting
WITH (GROUP_MAX_TEMPDB_DATA_MB = 20480)        -- 20 GB of tempdb data space, illustrative
USING rp_reporting;
GO

-- Classifier: route the reporting login into the governed group.
CREATE OR ALTER FUNCTION dbo.fn_rg_classifier()
RETURNS SYSNAME
WITH SCHEMABINDING
AS
BEGIN
    RETURN CASE WHEN SUSER_SNAME() = N'svc_reporting' THEN N'wg_reporting' ELSE N'default' END;
END;
GO

-- Verification BEFORE: current classifier and groups.
SELECT classifier_function_id, is_enabled FROM sys.resource_governor_configuration;

ALTER RESOURCE GOVERNOR WITH (CLASSIFIER_FUNCTION = dbo.fn_rg_classifier);
ALTER RESOURCE GOVERNOR RECONFIGURE;            -- applies to NEW sessions only
GO

-- Validation AFTER: usage and violations per workload group.
SELECT name,
       tempdb_data_space_kb / 1024           AS tempdb_mb_now,
       peak_tempdb_data_space_kb / 1024      AS tempdb_mb_peak,
       total_tempdb_data_limit_violation_count AS limit_violations
FROM sys.dm_resource_governor_workload_groups;

-- Rollback:
-- ALTER RESOURCE GOVERNOR WITH (CLASSIFIER_FUNCTION = NULL);
-- ALTER RESOURCE GOVERNOR RECONFIGURE;</pre>
<p>Size the cap from evidence: watch <code>peak_tempdb_data_space_kb</code> per group for a few weeks before enforcing a limit, and alert on <code>total_tempdb_data_limit_violation_count</code> afterwards. A cap that is too low simply moves the outage from the instance to the report.</p>
<h2>High availability in SQL Server 2025: stable plans and reliable failover</h2>
<p>Availability is also a SQL Server performance problem. After a failover, a new primary with cold caches and missing statistics can be “up” but too slow to serve traffic. Microsoft highlights “reliable failover enhancements” in SQL Server 2025, and the original announcement calls out one internal change directly: “Persisted statistics on secondary replicas prevent the loss of statistics during a restart or failover, thereby avoiding potential performance degradation.”</p>
<p>The background: readable secondaries cannot write to the user database, so statistics the optimizer needs for read workloads were created as temporary statistics and lost on restart or role change. Persisting them means reporting queries on secondaries keep their plans across those events.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNTg0IiB3aWR0aD0iOTAwIiBoZWlnaHQ9IjU4NCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJTUUwgU2VydmVyIDIwMjUgaGlnaCBhdmFpbGFiaWxpdHkgYW5kIGRhdGEgbW92ZW1lbnQgdG9wb2xvZ3k6IHByaW1hcnkgcmVwbGljYSwgc3luY2hyb25vdXMgYW5kIGFzeW5jaHJvbm91cyBzZWNvbmRhcmllcyB3aXRoIHBlcnNpc3RlZCBzdGF0aXN0aWNzLCBjaGFuZ2UgZXZlbnQgc3RyZWFtaW5nIHRvIEF6dXJlIEV2ZW50IEh1YnMsIEZhYnJpYyBtaXJyb3JpbmcgdG8gT25lTGFrZSwgYW5kIEF6dXJlIEFyYyBtYW5hZ2VtZW50Ij48dGl0bGU+U1FMIFNlcnZlciAyMDI1IGhpZ2ggYXZhaWxhYmlsaXR5IGFuZCBkYXRhIG1vdmVtZW50IHRvcG9sb2d5OiBwcmltYXJ5IHJlcGxpY2EsIHN5bmNocm9ub3Vz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sPSIjZjRmNWY3IiBzdHJva2U9IiNkY2RlZTQiIHN0cm9rZS13aWR0aD0iMSIgc3Ryb2tlLWRhc2hhcnJheT0iNCAzIi8+PHRleHQgeD0iNDUwLjAiIHk9IjU0OS43IiBjbGFzcz0iYWIiIGZvbnQtc2l6ZT0iMTQiIGZpbGw9IiMwYTE0MjQiIHRleHQtYW5jaG9yPSJtaWRkbGUiPkF6dXJlIEFyYzogaW52ZW50b3J5LCBBRyBoZWFsdGgsIERlZmVuZGVyLCBFU1UgYW5kIERSIHRvIEF6dXJlIFNRTCBmb3IgdGhlIHdob2xlIGVzdGF0ZTwvdGV4dD48L3N2Zz4=" width="900" height="584" alt="SQL Server 2025 high availability topology with synchronous and asynchronous secondaries that persist statistics, change event streaming to Azure Event Hubs, Fabric mirroring and Azure Arc management" loading="lazy"><figcaption>Figure 3. High availability and data movement around one SQL Server 2025 primary.</figcaption></figure>
<p>Monitoring stays DMV-based. Log send queue and redo queue are the two numbers that bound data loss and failover time, and they belong on every dashboard alongside synchronization state.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- SQL Server performance and availability health (SQL Server 2025): run on the primary.
SELECT ag.name                                   AS ag_name,
       ar.replica_server_name,
       ars.role_desc,
       ar.availability_mode_desc,                -- SYNCHRONOUS_COMMIT / ASYNCHRONOUS_COMMIT
       ar.failover_mode_desc,
       drs.synchronization_state_desc,
       drs.log_send_queue_size                   AS log_send_queue_kb,   -- data not yet sent
       drs.redo_queue_size                       AS redo_queue_kb,       -- data not yet redone
       drs.last_commit_time
FROM sys.availability_groups               AS ag
JOIN sys.availability_replicas             AS ar  ON ar.group_id   = ag.group_id
JOIN sys.dm_hadr_availability_replica_states AS ars ON ars.replica_id = ar.replica_id
LEFT JOIN sys.dm_hadr_database_replica_states AS drs ON drs.replica_id = ar.replica_id
ORDER BY ag.name, ars.role_desc, ar.replica_server_name;

-- On a readable secondary: statistics the engine created for read workloads.
-- SQL Server 2025 persists these across restart and failover, so plans on the
-- secondary do not fall back to guesses after every role change.
SELECT OBJECT_NAME(s.object_id) AS table_name,
       s.name                   AS stats_name,
       s.is_temporary,
       STATS_DATE(s.object_id, s.stats_id) AS last_updated
FROM sys.stats AS s
WHERE OBJECTPROPERTY(s.object_id, 'IsUserTable') = 1
  AND s.is_temporary = 1
ORDER BY last_updated DESC;</pre>
<p>Failover should be rehearsed, not assumed. A planned manual failover to a synchronized secondary loses no data, but it disconnects sessions, so we always run it behind a verification and a confirmation gate:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">#!/usr/bin/env bash
# SQL Server performance drill, DISRUPTIVE: planned manual AG failover (no data loss).
# Run against the SYNCHRONOUS secondary that should become primary.
set -euo pipefail
: "${TARGET:?secondary instance}" "${AG:?availability group name}" "${SQLCMDPASSWORD:?}" "${SQLUSER:?}"
SQL=(sqlcmd -S "${TARGET}" -U "${SQLUSER}" -b -h -1 -W)

# --- Verification BEFORE: every database on the target must be SYNCHRONIZED.
NOT_SYNC=$("${SQL[@]}" -Q "SET NOCOUNT ON;
  SELECT COUNT(*) FROM sys.dm_hadr_database_replica_states drs
  JOIN sys.availability_groups ag ON ag.group_id = drs.group_id
  WHERE ag.name = N'${AG}' AND drs.is_local = 1
    AND drs.synchronization_state_desc  N'SYNCHRONIZED';")
echo "Databases not synchronized on ${TARGET}: ${NOT_SYNC}"
[[ "${NOT_SYNC}" == "0" ]] || { echo "Refusing to fail over."; exit 1; }

read -r -p "Type 'FAILOVER ${AG} TO ${TARGET}' to continue: " ANSWER
[[ "${ANSWER}" == "FAILOVER ${AG} TO ${TARGET}" ]] || { echo "Aborted."; exit 1; }

# --- Action: clients reconnect through the listener.
"${SQL[@]}" -Q "ALTER AVAILABILITY GROUP [${AG}] FAILOVER;"

# --- Validation AFTER: the target should now report PRIMARY.
"${SQL[@]}" -Q "SET NOCOUNT ON;
  SELECT ars.role_desc FROM sys.dm_hadr_availability_replica_states ars
  JOIN sys.availability_groups ag ON ag.group_id = ars.group_id
  WHERE ag.name = N'${AG}' AND ars.is_local = 1;"</pre>
<h3>Scaling reads and analytics without loading the primary</h3>
<p>Two SQL Server 2025 capabilities take analytical load off the OLTP primary entirely. Change event streaming “allows users to consume transaction log changes as events directly from SQL Server to Microsoft Azure Event Hubs”, and mirroring to Microsoft Fabric replicates data to OneLake “in near real-time” with what Microsoft calls a zero-ETL experience. Both read from the log rather than running queries, so the cost on the primary is log processing, not scans. For estates spread across sites, Azure Arc adds inventory, AG health tracking and “disaster recovery and read scale-out to Azure SQL”.</p>
<h2>Scalability for new workloads: vectors, JSON and regex in the engine</h2>
<p>SQL Server 2025 adds a native vector store and index “powered by DiskANN, a vector search technology using disk storage to efficiently find similar data points in large datasets”, plus native JSON with aggregates and regular expressions. From a SQL Server performance standpoint the value is fewer round trips: similarity search, document handling and pattern matching run next to the data instead of in an application tier that pulls rows over the network.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- SQL Server 2025 internals for AI workloads: native vector type and similarity search.
CREATE TABLE dbo.ProductDocs
(
    DocId      INT IDENTITY(1,1) CONSTRAINT PK_ProductDocs PRIMARY KEY,
    Title      NVARCHAR(200) NOT NULL,
    Body       NVARCHAR(MAX) NOT NULL,
    Embedding  VECTOR(1536)  NOT NULL      -- fixed-dimension float vector
);

-- Exact k-NN with VECTOR_DISTANCE: fine for small tables or filtered subsets.
DECLARE @q VECTOR(1536) = (SELECT Embedding FROM dbo.ProductDocs WHERE DocId = 42);
SELECT TOP (10)
       DocId,
       Title,
       VECTOR_DISTANCE('cosine', Embedding, @q) AS distance
FROM dbo.ProductDocs
ORDER BY distance;

-- Approximate search at scale uses a DiskANN vector index. Check the feature status
-- for your build (it shipped as preview in SQL Server 2025) before using it in production.
-- CREATE VECTOR INDEX vix_ProductDocs_Embedding
--     ON dbo.ProductDocs (Embedding)
--     WITH (METRIC = 'cosine', TYPE = 'diskann');

-- Regex and native JSON reduce round trips to the application tier.
SELECT DocId, Title
FROM dbo.ProductDocs
WHERE REGEXP_LIKE(Title, N'^(SQL|Azure) ', 'i');</pre>
<p>Vector indexes are new territory for capacity planning: memory, build time and recall all need testing on your data. In September 2026 Microsoft announced DiskANN vector indexes as generally available in Azure SQL Database Hyperscale; check the status for your SQL Server build before relying on them.</p>
<h2>What SQL Server 2025 internals will not fix</h2>
<p>An honest upgrade plan also lists what stays the same. Optimized locking reduces lock footprint and blocking, but it does not shorten a transaction that holds its TID lock for minutes; long transactions still block writers to the same rows and still grow the version store. OPPO addresses optional-parameter patterns, not every form of parameter sensitivity. Columnstore improvements do not replace a missing rowstore index for point lookups. And none of the SQL Server 2025 internals compensates for undersized storage, a saturated log volume or a chatty application issuing thousands of single-row calls.</p>
<p>That is why we treat SQL Server performance work as two tracks running together: take the engine improvements the upgrade offers, and keep fixing the workload with the same measurement discipline as before.</p>
<h2>A staged upgrade path that protects SQL Server performance</h2>
<p>The fastest way to lose the benefits of SQL Server 2025 internals is to change everything at once. We separate binaries from behaviour: upgrade the engine while keeping the old compatibility level, enable ADR and RCSI, then optimized locking, then compatibility level 170, measuring after each step. Every step has its own rollback, and Query Store makes plan regressions visible and fixable by forcing the previous plan.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNTAwIiB3aWR0aD0iOTAwIiBoZWlnaHQ9IjUwMCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJTdGFnZWQgU1FMIFNlcnZlciAyMDI1IHVwZ3JhZGUgcGF0aCBmb3IgcGVyZm9ybWFuY2Ugc2FmZXR5OiBiYXNlbGluZSB3aXRoIFF1ZXJ5IFN0b3JlLCB1cGdyYWRlIGJpbmFyaWVzIGF0IHRoZSBvbGQgY29tcGF0aWJpbGl0eSBsZXZlbCwgZW5hYmxlIGZlYXR1cmVzIG9uZSBhdCBhIHRpbWUsIHRoZW4gcmFpc2UgdG8gY29tcGF0aWJpbGl0eSBsZXZlbCAxNzAgd2l0aCBhIHJvbGx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B4PSI0OTAuMCIgeT0iNDA4LjIiIGNsYXNzPSJhYiIgZm9udC1zaXplPSIxNCIgZmlsbD0iI2ZmZmZmZiIgdGV4dC1hbmNob3I9Im1pZGRsZSI+NjwvdGV4dD48dGV4dCB4PSI1MTYuMCIgeT0iNDA4LjIiIGNsYXNzPSJhYiIgZm9udC1zaXplPSIxNi41IiBmaWxsPSIjMGExNDI0Ij5GaXggcmVncmVzc2lvbnM8L3RleHQ+PHRleHQgeD0iNDc2LjAiIHk9IjQzNi4yIiBjbGFzcz0iYSIgZm9udC1zaXplPSIxMy41Ij5RdWVyeSBTdG9yZSBmb3JjZWQgcGxhbnMgb3IgaGludHMsIHRoZW4gcmV0ZXN0PC90ZXh0Pjx0ZXh0IHg9IjQ3Ni4wIiB5PSI0NjguMiIgY2xhc3M9Im1iIiBmb250LXNpemU9IjEyIiBmaWxsPSIjMDA0M2NlIj5yb2xsYmFjazogdW5mb3JjZSB0aGUgcGxhbjwvdGV4dD48L3N2Zz4=" width="900" height="500" alt="Staged SQL Server 2025 upgrade path: baseline, upgrade binaries, enable ADR and RCSI, enable optimized locking, raise compatibility level 170, fix regressions, with a rollback for each step" loading="lazy"><figcaption>Figure 4. The staged SQL Server 2025 upgrade path we use to keep SQL Server performance predictable.</figcaption></figure>
<ol>
<li><strong>Baseline.</strong> Query Store and wait snapshots, at least two weeks.</li>
<li><strong>Upgrade binaries.</strong> In place, or as a rolling upgrade through an availability group, keeping the old compatibility level.</li>
<li><strong>Enable ADR and RCSI.</strong> Test read semantics; watch version store growth.</li>
<li><strong>Enable optimized locking.</strong> Compare lock waits, lock memory and escalations with the baseline.</li>
<li><strong>Raise compatibility level to 170.</strong> Unlock OPPO and other optimizer changes; watch Query Store for regressions.</li>
<li><strong>Fix regressions.</strong> Force known-good plans, then fix the root cause and unforce.</li>
</ol>
<h2>SQL Server performance checklist for SQL Server 2025</h2>
<table>
<thead>
<tr>
<th>Area</th>
<th>What to change</th>
<th>Metric that proves it</th>
</tr>
</thead>
<tbody>
<tr>
<td>Concurrency</td>
<td>ADR, RCSI, optimized locking</td>
<td><code>LCK_M_*</code> waits, <code>OBJECTSTORE_LOCK_MANAGER</code> memory, XACT locks</td>
</tr>
<tr>
<td>Plan stability</td>
<td>Compatibility level 170, OPPO</td>
<td>Query Store plan variants and duration per variant</td>
</tr>
<tr>
<td>Analytics on OLTP</td>
<td>Ordered nonclustered columnstore</td>
<td>Segments skipped vs read</td>
</tr>
<tr>
<td>tempdb</td>
<td>Workload group tempdb caps</td>
<td>Peak tempdb space and limit violations per group</td>
</tr>
<tr>
<td>Availability</td>
<td>Persisted secondary statistics, failover drills</td>
<td>Log send and redo queues, time to primary</td>
</tr>
<tr>
<td>Data movement</td>
<td>Change event streaming, Fabric mirroring</td>
<td>Primary CPU and log throughput before vs after</td>
</tr>
</tbody>
</table>
<p>For the wider picture, our earlier overview of <a href="https://minervadb.com/sql-server-2025-performance-scalability-ha/">SQL Server 2025 performance, scalability and high availability</a> and our guide to <a href="https://minervadb.com/sql-server-2025-high-availability/">SQL Server 2025 high availability</a> cover deployment topologies, while this post stays on the engine internals.</p>
<h2>How MinervaDB helps with SQL Server performance</h2>
<p>MinervaDB is a vendor-neutral database infrastructure company providing SQL Server consulting, 24×7 consultative support and remote DBA services. A SQL Server 2025 engagement starts with measurement: Query Store, wait statistics and lock manager baselines, then a staged upgrade with a rollback at every step. Our response targets are 15 minutes for Severity 1, 12 hours for Severity 2, 24 hours for Severity 3 and 48 hours for Severity 4.</p>
<p>We have supported more than 900 enterprises from 46 cities over 15+ years. Because we sell no licences, we will also tell you when Azure SQL, PostgreSQL or another engine is the better fit for a workload.</p>
<h2>Frequently asked questions</h2>
<h3>What is the latest SQL Server release?</h3>
<p>SQL Server 2025, version 17.x, generally available since November 2025. It introduces compatibility level 170.</p>
<h3>What is optimized locking in SQL Server 2025?</h3>
<p>Optimized locking combines transaction ID (TID) locking and lock after qualification (LAQ) to reduce lock memory and blocking. It relies on accelerated database recovery, and LAQ uses read committed snapshot isolation.</p>
<h3>Does SQL Server 2025 fix parameter sniffing?</h3>
<p>It reduces a common case. Optional parameter plan optimization lets the optimizer keep different plans depending on whether optional parameters are supplied, under compatibility level 170.</p>
<h3>What changed for high availability in SQL Server 2025?</h3>
<p>Microsoft cites reliable failover enhancements, and statistics on readable secondary replicas now persist across restarts and failovers, which keeps read workloads stable after a role change.</p>
<h3>How large can an Express edition database be in SQL Server 2025?</h3>
<p>Microsoft states that SQL Server 2025 Express supports applications up to 50 GB in database size.</p>
<p><em>All T-SQL and scripts in this post are illustrative and version-pinned to SQL Server 2025 (17.x); thresholds and sizes are examples, not recommendations for your workload. Test every change in a non-production environment first, confirm your exact build and edition, and maintain a robust disaster-recovery posture, including verified backups and rehearsed failover, before applying anything to production.</em></p>
<p><strong>Planning a SQL Server 2025 upgrade or chasing a SQL Server performance regression?</strong> <a href="https://minervadb.com/contact-minervadb-book-an-appointment/">Book a session with a MinervaDB principal architect</a>, or email contact@minervadb.com.</p></p>
<p><a href="https://minervadb.com/sql-server-performance-sql-server-2025-internals/">SQL Server Performance: 7 Brilliant 2025 Engine Internals</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>YugabyteDB Performance Monitoring: Kill Slow SQL in 6 Steps</title>
        <link>https://minervadb.com/yugabytedb-performance-monitoring/</link>
        <pubDate>Sat, 03 Oct 2026 05:33:00 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/yugabytedb-performance-monitoring-kill-slow-sql-in-6-steps/</guid>
        <source url="https://minervadb.com/">MinervaDB</source>
        <description><![CDATA[<p>At 02:14 the p99 alert fires. Dashboards show the cluster is up, CPU looks unremarkable and every node is healthy. Yet checkout queries that took 8 ms now take 400. In a single-node database you [...]</p>
<p><a href="https://minervadb.com/yugabytedb-performance-monitoring/">YugabyteDB Performance Monitoring: Kill Slow SQL in 6 Steps</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>At 02:14 the p99 alert fires. Dashboards show the cluster is up, CPU looks unremarkable and every node is healthy. Yet checkout queries that took 8 ms now take 400. In a single-node database you would open one tool and see the problem. In a distributed SQL database the slow part could be on any of nine nodes, in any of thousands of tablets, inside a Raft round trip, a lock queue or a disk read. <strong>YugabyteDB performance monitoring</strong> is the discipline of finding which one, quickly and with evidence.</p>
<p>This guide is the YugabyteDB observability playbook we use for that hunt. It maps every telemetry surface YugabyteDB exposes to the layer it describes, shows how Active Session History correlates a YSQL query with the DocDB RPCs it caused, and ends with a six-step troubleshooting workflow and a read-only evidence collector you can run during an incident. All facts come from the official YugabyteDB documentation and are version-pinned; numbers in examples are illustrative, not benchmarks.</p>
<h2>Why YugabyteDB observability needs a map</h2>
<p>YugabyteDB is a PostgreSQL-compatible query layer (YSQL) running on DocDB, where every table and index is split into tablets, each tablet is a Raft group, and each replica stores data in a RocksDB-based LSM tree. A single SELECT can touch several tablets on several nodes. So Yugabyte performance troubleshooting is never “look at the slow log”: you need to know which layer was waiting, then which node, then which tablet.</p>
<p>The good news is that YugabyteDB instruments every layer. The challenge is that the instruments live in different places: SQL views, Prometheus endpoints on three ports, web UIs and diagnostic bundles. Figure 1 is the map we start from in every YugabyteDB performance monitoring engagement.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNTU5IiB3aWR0aD0iOTAwIiBoZWlnaHQ9IjU1OSIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJZdWdhYnl0ZURCIHBlcmZvcm1hbmNlIG1vbml0b3JpbmcgbWFwOiBmb3IgZWFjaCBsYXllciwgdGhlIGxpdmUgdmlldywgdGhlIGhpc3Rvcnkgc291cmNlIGFuZCB0aGUgbWV0cmljcyBlbmRwb2ludCB1c2VkIGZvciBvYnNlcnZhYmlsaXR5IGFuZC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leHQgeD0iMTkyIiB5PSI0OTcuNSIgY2xhc3M9ImEiIGZvbnQtc2l6ZT0iMTQiPlNTVCBjb3VudCwgY29tcGFjdGlvbjwvdGV4dD48dGV4dCB4PSIxOTIiIHk9IjUxNi4wIiBjbGFzcz0iYSIgZm9udC1zaXplPSIxNCI+c3RhdGU8L3RleHQ+PHRleHQgeD0iMzkwIiB5PSI0ODguMyIgY2xhc3M9ImEiIGZvbnQtc2l6ZT0iMTQiPkFTSDo8L3RleHQ+PHRleHQgeD0iMzkwIiB5PSI1MDYuOCIgY2xhc3M9ImEiIGZvbnQtc2l6ZT0iMTQiPlJvY2tzREJfUmVhZEJsb2NrRnJvbUZpbGUsPC90ZXh0Pjx0ZXh0IHg9IjM5MCIgeT0iNTI1LjIiIGNsYXNzPSJhIiBmb250LXNpemU9IjE0Ij5XQUxfU3luYzwvdGV4dD48dGV4dCB4PSI2MjQiIHk9IjQ5Ny41IiBjbGFzcz0iYSIgZm9udC1zaXplPSIxNCI+OjkwMDAgcm9ja3NkYl9ibG9ja19jYWNoZV8qLDwvdGV4dD48dGV4dCB4PSI2MjQiIHk9IjUxNi4wIiBjbGFzcz0iYSIgZm9udC1zaXplPSIxNCI+bG9nX3N5bmNfbGF0ZW5jeTwvdGV4dD48L3N2Zz4=" width="900" height="559" alt="YugabyteDB performance monitoring map showing for each layer the live view, the history source and the metrics endpoint" loading="lazy"><figcaption>Figure 1. The YugabyteDB observability map: one live view, one history source and one metric stream per layer.</figcaption></figure>
<h2>Layer 1: YugabyteDB performance monitoring with metrics and golden signals</h2>
<p>According to the <a href="https://docs.yugabyte.com/stable/launch-and-manage/monitor-and-alert/metrics/" target="_blank" rel="noopener">YugabyteDB metrics documentation</a>, the servers export close to 2,000 metrics in JSON (<code>/metrics</code>) and Prometheus (<code>/prometheus-metrics</code>) formats: YB-Master on port 7000, YB-TServer on 9000, YSQL on 13000 and YCQL on 12000. Names follow <code>___</code>, so <code>handler_latency_yb_ysqlserver_SQLProcessor_SelectStmt</code> is the latency histogram of YSQL SELECT processing, and <code>handler_latency_yb_tserver_TabletServerService_Read</code> is the storage-layer read RPC handler.</p>
<p>Before building dashboards, check what each endpoint actually returns. On clusters with many tablets the tserver endpoint can be large, which is why v2.20.2 added filter parameters such as <code>version=v2</code>, <code>table_blocklist</code> and <code>max_metric_entries</code>.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">#!/usr/bin/env bash
# YugabyteDB performance monitoring: probe every metrics endpoint on one node.
# Read-only. Host names come from the environment; nothing is hardcoded.
set -euo pipefail
: "${YB_NODE:?set YB_NODE to a node address}"

# Ports (defaults): yb-master UI 7000, yb-tserver UI 9000,
# YSQL metrics 13000, YCQL metrics 12000.
for port in 7000 9000 13000; do
  echo "== ${YB_NODE}:${port} =="
  # Prometheus exposition format; count series to size your scrape budget.
  curl -s "http://${YB_NODE}:${port}/prometheus-metrics" | grep -vc '^#'
done

# v2.20.2+: filter the tserver scrape. version=v2 enables the allow/block lists,
# so table-level series can be dropped on clusters with thousands of tablets.
curl -s "http://${YB_NODE}:9000/prometheus-metrics?version=v2&amp;table_blocklist=.*&amp;max_metric_entries=5000" 
  | grep -E '^(handler_latency_yb_tserver_TabletServerService_(Read|Write)|rocksdb_block_cache_(hit|miss)|log_sync_latency)' 
  | head -20

# YSQL statement latency and connection gauges live on the YSQL metrics port.
curl -s "http://${YB_NODE}:13000/prometheus-metrics" 
  | grep -E '^(handler_latency_yb_ysqlserver_SQLProcessor_(SelectStmt|InsertStmt|UpdateStmt)|yb_ysqlserver_(active_connection|connection|max_connection)_total)'</pre>
<p>A Prometheus configuration for YugabyteDB performance monitoring then needs one job per server type, each with <code>metrics_path: /prometheus-metrics</code>:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml"># prometheus.yml - YugabyteDB performance monitoring scrape jobs.
# One job per server type keeps label sets clean and lets you scrape
# the heavy tserver endpoint less often if you need to.
scrape_configs:
  - job_name: yb-master
    metrics_path: /prometheus-metrics
    static_configs:
      - targets: ['yb-node-1:7000', 'yb-node-2:7000', 'yb-node-3:7000']

  - job_name: yb-tserver
    metrics_path: /prometheus-metrics
    params:
      version: ['v2']
      table_blocklist: ['.*']      # drop per-table series; keep server-level
    scrape_interval: 30s
    static_configs:
      - targets: ['yb-node-1:9000', 'yb-node-2:9000', 'yb-node-3:9000']

  - job_name: yb-ysql
    metrics_path: /prometheus-metrics
    static_configs:
      - targets: ['yb-node-1:13000', 'yb-node-2:13000', 'yb-node-3:13000']</pre>
<p>With the data flowing, six queries cover the golden signals: throughput and latency at the YSQL layer, read RPC rate at the storage layer, block cache efficiency, catalog cache misses and connection pressure. The <a href="https://docs.yugabyte.com/stable/launch-and-manage/monitor-and-alert/metrics/throughput/" target="_blank" rel="noopener">throughput and latency metrics page</a> documents the per-statement handlers, the <a href="https://docs.yugabyte.com/stable/launch-and-manage/monitor-and-alert/metrics/cache-storage/" target="_blank" rel="noopener">cache and storage metrics page</a> the RocksDB and WAL series, and the <a href="https://docs.yugabyte.com/stable/launch-and-manage/monitor-and-alert/metrics/connections/" target="_blank" rel="noopener">connection metrics page</a> the YSQL connection gauges.</p>
<pre><code class="language-promql"># YugabyteDB performance monitoring: the golden-signal PromQL set.
# Metric names as documented by Yugabyte; latency values are in microseconds.

# 1. YSQL throughput: SELECTs per second, per node
sum by (instance) (rate(handler_latency_yb_ysqlserver_SQLProcessor_SelectStmt_total_count[1m]))

# 2. YSQL average SELECT latency (us), per node
sum by (instance) (rate(handler_latency_yb_ysqlserver_SQLProcessor_SelectStmt_total_sum[1m]))
  /
sum by (instance) (rate(handler_latency_yb_ysqlserver_SQLProcessor_SelectStmt_total_count[1m]))

# 3. Storage-layer read RPCs per second (DocDB IOPS seen by the tserver)
sum by (instance) (rate(handler_latency_yb_tserver_TabletServerService_Read_total_count[1m]))

# 4. Block cache hit ratio (falls -&gt; RocksDB_ReadBlockFromFile rises in ASH)
sum by (instance) (rate(rocksdb_block_cache_hit[5m]))
  /
(sum by (instance) (rate(rocksdb_block_cache_hit[5m])) + sum by (instance) (rate(rocksdb_block_cache_miss[5m])))

# 5. Catalog cache misses per second (rises with connection churn and DDL)
sum by (instance) (rate(handler_latency_yb_ysqlserver_SQLProcessor_CatalogCacheTableMisses_count[5m]))

# 6. Connection pressure: active vs configured maximum, and rejections
sum by (instance) (yb_ysqlserver_active_connection_total)
  / sum by (instance) (yb_ysqlserver_max_connection_total)
increase(yb_ysqlserver_connection_over_limit_total[10m])</code></pre>
<p>In YugabyteDB performance monitoring, metrics answer “is something wrong, and where” well. They do not answer “why”. A rising average SELECT latency on one node tells you where to look; it does not tell you whether the time went to a lock, a disk read or a remote Raft quorum. That is the job of the next two layers. Alerts should therefore be few and tied to a runbook step:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml"># yb-alerts.yml - YugabyteDB performance monitoring alert rules.
# Thresholds are illustrative starting points; derive yours from a baseline.
groups:
  - name: yugabytedb-performance
    rules:
      - alert: YSQLSelectLatencyHigh
        expr: |
          sum by (instance) (rate(handler_latency_yb_ysqlserver_SQLProcessor_SelectStmt_total_sum[5m]))
          / sum by (instance) (rate(handler_latency_yb_ysqlserver_SQLProcessor_SelectStmt_total_count[5m]))
          &gt; 20000                       # 20 ms average, in microseconds
        for: 10m
        labels: {severity: warning}
        annotations:
          summary: "YSQL SELECT latency high on {{ $labels.instance }}"
          runbook: "Rank statements with pg_stat_statements, then group ASH by wait_event."

      - alert: BlockCacheHitRatioLow
        expr: |
          sum by (instance) (rate(rocksdb_block_cache_hit[10m]))
          / (sum by (instance) (rate(rocksdb_block_cache_hit[10m]))
             + sum by (instance) (rate(rocksdb_block_cache_miss[10m])))  0
        labels: {severity: critical}
        annotations:
          summary: "Connections rejected at ysql_max_connections on {{ $labels.instance }}"</pre>
<p>Two more series deserve a panel. <code>log_sync_latency</code> and <code>log_append_latency</code> show how long the Raft log takes to append and fsync, which bounds write latency on every tablet leader. The UpdateConsensus handler latency measures leader-to-follower replication; the <a href="https://docs.yugabyte.com/stable/launch-and-manage/monitor-and-alert/metrics/raft-dst/" target="_blank" rel="noopener">Raft and distributed system metrics page</a> also warns that hybrid clock skew above 500 ms may compromise consistency guarantees, so skew belongs on the dashboard too.</p>
<h2>Layer 2: statement-level YugabyteDB observability with pg_stat_statements</h2>
<p>YugabyteDB extends the familiar <a href="https://docs.yugabyte.com/stable/launch-and-manage/monitor-and-alert/query-tuning/pg-stat-statements/" target="_blank" rel="noopener">pg_stat_statements</a> view with columns that only make sense in a distributed database: <code>yb_latency_histogram</code>, a JSONB histogram of execution latencies read with <code>yb_get_percentile()</code>, and DocDB RPC counters such as <code>docdb_read_rpcs</code>, <code>docdb_write_rpcs</code>, <code>docdb_rows_scanned</code>, <code>docdb_rows_returned</code> and <code>docdb_wait_time</code>. The RPC statistics are governed by <code>yb_enable_pg_stat_statements_rpc_stats</code>, on by default from v2026.1.1.0.</p>
<p>Averages hide tail latency, and tail latency is what users feel. The histogram lets YugabyteDB performance monitoring rank statements by p99 rather than mean, and the DocDB columns explain whether the time was spent in YSQL or waiting on storage.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- YugabyteDB performance monitoring: rank statements by where the time went.
-- The docdb_* RPC columns are collected when yb_enable_pg_stat_statements_rpc_stats
-- is on (default true from v2026.1.1.0); yb_latency_histogram is YugabyteDB-specific.
SELECT queryid,
       calls,
       round(total_exec_time::NUMERIC, 1)                         AS total_ms,
       round((total_exec_time / NULLIF(calls, 0))::NUMERIC, 2)    AS mean_ms,
       yb_get_percentile(yb_latency_histogram, 99)                AS p99_ms,
       round(docdb_read_rpcs::NUMERIC  / NULLIF(calls, 0), 1)     AS read_rpcs_per_call,
       round(docdb_rows_scanned::NUMERIC / NULLIF(docdb_rows_returned, 0), 1)
                                                                  AS scanned_per_returned,
       round(docdb_wait_time::NUMERIC, 1)                         AS docdb_wait_ms,
       left(query, 70)                                            AS query
FROM pg_stat_statements
WHERE calls &gt; 50
ORDER BY total_exec_time DESC
LIMIT 15;

-- Reading the result:
--   high p99_ms but normal mean_ms    -&gt; tail problem: contention, hot tablet, GC of a node
--   read_rpcs_per_call grows with rows -&gt; per-row RPCs: missing index or no batched join
--   scanned_per_returned &gt;&gt; 1         -&gt; filter applied after the scan: fix the index
--   docdb_wait_ms close to total_ms    -&gt; time is in storage/network, not in YSQL CPU

-- Isolate an incident window (shared memory is per node; reset on each node):
-- SELECT pg_stat_statements_reset();</pre>
<p>Two YugabyteDB observability cautions. pg_stat_statements is per node, so a statement executed through a load balancer has its statistics spread across every YSQL server; collect from all nodes before you conclude. And the default <code>pg_stat_statements.max</code> of 5000 entries can be exhausted by applications that do not use bind parameters, which is itself a finding worth reporting.</p>
<h2>Layer 3: Yugabyte performance troubleshooting with Active Session History</h2>
<p><a href="https://docs.yugabyte.com/stable/explore/observability/active-session-history/" target="_blank" rel="noopener">Active Session History</a> is the most important YugabyteDB observability feature for troubleshooting. It samples sessions that are on CPU or waiting in an RPC, across YSQL backends, YCQL and YB-TServer RPC threads, and stores the samples in a per-node circular buffer exposed as <code>yb_active_session_history</code>. Per the <a href="https://docs.yugabyte.com/stable/launch-and-manage/monitor-and-alert/active-session-history-monitor/" target="_blank" rel="noopener">ASH monitoring guide</a>, <code>ysql_yb_enable_ash</code> is on by default, sampling runs every 1,000 ms (<code>ysql_yb_ash_sampling_interval_ms</code>) with up to 500 events per interval (<code>ysql_yb_ash_sample_size</code>), and the buffer is sized by <code>ysql_yb_ash_circular_buffer_size</code>.</p>
<p>What makes ASH powerful in a distributed system is correlation. Each sample carries a <code>root_request_id</code> shared by the YSQL backend and every tserver RPC it triggered, a <code>query_id</code> that matches <code>pg_stat_statements.queryid</code>, a <code>top_level_node_id</code> that joins to <code>yb_servers()</code>, and for TServer events a <code>wait_event_aux</code> holding the first 15 characters of the tablet ID.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNTY2IiB3aWR0aD0iOTAwIiBoZWlnaHQ9I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JlcXVlc3RfaWQ8L3RleHQ+PHJlY3QgeD0iMjQiIHk9IjQ4OC43MTAwMDAwMDAwMDAwNCIgd2lkdGg9Ijg1MiIgaGVpZ2h0PSI2NCIgcng9IjEwIiBmaWxsPSIjMGExYTJmIiBzdHJva2U9IiMwYTFhMmYiIHN0cm9rZS13aWR0aD0iMSIvPjx0ZXh0IHg9IjQ1MC4wIiB5PSI1MTQuNyIgY2xhc3M9Im1iIiBmb250LXNpemU9IjExLjUiIGZpbGw9IiM3OGE5ZmYiIHRleHQtYW5jaG9yPSJtaWRkbGUiPlJFQUQgSVQgQVM8L3RleHQ+PHRleHQgeD0iNDUwLjAiIHk9IjUzNi43IiBjbGFzcz0iYWIiIGZvbnQtc2l6ZT0iMTQiIGZpbGw9IiNmZmZmZmYiIHRleHQtYW5jaG9yPSJtaWRkbGUiPnRoZSBxdWVyeSB3YWl0ZWQgb24gdGhlIG5ldHdvcmsgd2hpbGUgbm9kZSBCIHJlYWQgZnJvbSBkaXNrIGZvciB0YWJsZXQgM2MxZjllMDJhPC90ZXh0Pjwvc3ZnPg==" width="900" height="566" alt="YugabyteDB observability with Active Session History: one YSQL sample and two YB-TServer samples linked by root_request_id, showing wait events and tablet ids" loading="lazy"><figcaption>Figure 2. ASH correlation: the YSQL wait and the tserver work it caused share one root_request_id.</figcaption></figure>
<p>Start Yugabyte performance troubleshooting with load over time, grouped by wait class. A sudden band of lock or consensus waits on top of a steady CPU baseline is usually the incident. Sum <code>sample_weight</code> rather than counting rows, because a sample can stand for more than one session when sampling is capped.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- YugabyteDB performance monitoring: "database load" by wait class per minute.
-- Each ASH sample represents sample_weight sessions, so sum the weight.
SELECT date_trunc('minute', sample_time)        AS minute,
       wait_event_component,
       wait_event_class,
       round(sum(sample_weight) / 60.0, 2)      AS avg_active_sessions
FROM yb_active_session_history
WHERE sample_time &gt; now() - INTERVAL '30 minutes'
GROUP BY 1, 2, 3
ORDER BY 1, 4 DESC;

-- Top wait events for one statement during the incident window.
SELECT wait_event_component,
       wait_event,
       wait_event_type,
       sum(sample_weight)                       AS weighted_samples
FROM yb_active_session_history
WHERE query_id = -4127719322                   -- queryid from pg_stat_statements
  AND sample_time BETWEEN '2026-10-03 02:10' AND '2026-10-03 02:40'
GROUP BY 1, 2, 3
ORDER BY 4 DESC;</pre>
<p>Then localise. If TServer waits dominate, the tablet prefix in <code>wait_event_aux</code> joined to <a href="https://docs.yugabyte.com/stable/explore/observability/yb-local-tablets/" target="_blank" rel="noopener">yb_local_tablets</a> names the table and tablet. A single tablet with most of the samples is a hot shard, which points back to the key design rather than to hardware.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- YugabyteDB performance monitoring: find the hot tablet behind TServer waits.
-- wait_event_aux holds the first 15 characters of the tablet ID for TServer
-- events; yb_local_tablets maps tablet IDs to tables on THIS node, so run the
-- query on each tserver (or iterate with the collector script further below).
WITH tserver_waits AS (
    SELECT wait_event_aux                AS tablet_prefix,
           wait_event,
           sum(sample_weight)            AS weighted_samples
    FROM yb_active_session_history
    WHERE wait_event_component = 'TServer'
      AND wait_event_aux IS NOT NULL
      AND sample_time &gt; now() - INTERVAL '15 minutes'
    GROUP BY 1, 2
)
SELECT t.namespace_name,
       t.ysql_schema_name,
       t.table_name,
       t.tablet_id,
       w.wait_event,
       w.weighted_samples
FROM tserver_waits AS w
JOIN yb_local_tablets AS t
  ON left(t.tablet_id, 15) = w.tablet_prefix
ORDER BY w.weighted_samples DESC
LIMIT 10;</pre>
<p>If one node is busier than the rest, join on <code>top_level_node_id</code>. Skew by node usually means uneven leader placement, uneven client connections, or a node with a slower disk.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- YugabyteDB performance monitoring: is one node doing more than its share?
-- top_level_node_id joins to the uuid column of yb_servers().
SELECT s.host,
       s.cloud || '/' || s.region || '/' || s.zone  AS placement,
       a.wait_event_class,
       sum(a.sample_weight)                         AS weighted_samples
FROM yb_active_session_history AS a
JOIN yb_servers() AS s
  ON s.uuid = a.top_level_node_id::TEXT
WHERE a.sample_time &gt; now() - INTERVAL '15 minutes'
GROUP BY 1, 2, 3
ORDER BY 4 DESC;

-- Follow one request end to end: every sample that shares its root_request_id,
-- from the YSQL backend down to each tserver RPC it triggered.
SELECT sample_time,
       wait_event_component,
       wait_event,
       wait_event_aux,
       top_level_node_id
FROM yb_active_session_history
WHERE root_request_id = '7f3a0b5e-1d2c-4e8f-9a6b-c3d4e5f6c91e'   -- example value
ORDER BY sample_time;</pre>
<p>ASH is per node. For a cluster-wide view, recent releases provide <code>gv$yb_active_session_history</code>; otherwise collect from each node, as the evidence script later in this guide does.</p>
<h3>Decoding the wait events</h3>
<p>The wait event names are precise once you know the internals behind them. <code>TableRead</code> and <code>IndexRead</code> mean a YSQL backend is waiting on DocDB. <code>Raft_WaitingForReplication</code> means a write is waiting for a majority of replicas. <code>RocksDB_ReadBlockFromFile</code> means a block cache miss turned into a disk read. <code>LockedBatchEntry_Lock</code> and <code>ConflictResolution_WaitOnConflictingTxns</code> are row locks and transaction conflicts. <code>OnCpu_Passive</code> means the work is runnable but waiting for a thread, which is a saturation signal. Figure 3 is the decoder we keep next to every Yugabyte performance troubleshooting session.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNjg0IiB3aWR0aD0iOTAwIiBoZWlnaHQ9IjY4NCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJZdWdhYnl0ZURCIHdhaXQgZXZlbnQgZGVjb2RlciBmb3IgcGVyZm9ybWFuY2UgdHJvdWJsZXNob290aW5nOiB3aGF0IGVhY2ggZG9taW5hbnQgQWN0aXZlIFNlc3Npb24gSGlzdG9yeSB3YWl0IGV2ZW50IG1lYW5zIGFuZCB0aGUgbmV4dCBvYnNlcnZhYmlsaXR5IHN0ZXAiPjx0aXRsZT5ZdWdhYnl0ZURC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mxvZ19zeW5jX2xhdGVuY3ksIHZvbHVtZSBJT1BTPC90ZXh0Pjwvc3ZnPg==" width="900" height="684" alt="YugabyteDB performance troubleshooting wait event decoder: OnCpu, TableRead, CatalogRead, LockedBatchEntry_Lock, ConflictResolution, Raft_WaitingForReplication, RocksDB_ReadBlockFromFile and WAL_Sync with meaning and next step" loading="lazy"><figcaption>Figure 3. Wait event decoder for YugabyteDB performance monitoring.</figcaption></figure>
<h2>Layer 4: live sessions, locks and terminated queries</h2>
<p>Live views complete the YugabyteDB observability picture during an incident.</p>
<p>ASH tells you what happened over the last minutes. During an active incident you also need the present tense. YugabyteDB extends <a href="https://docs.yugabyte.com/stable/explore/observability/pg-stat-activity/" target="_blank" rel="noopener">pg_stat_activity</a> with <code>allocated_mem_bytes</code> and <code>rss_mem_bytes</code> per backend, extends <a href="https://docs.yugabyte.com/stable/explore/observability/pg-locks/" target="_blank" rel="noopener">pg_locks</a> with <code>waitend</code> and a <code>ybdetails</code> JSONB column whose <code>blocked_by</code> attribute names the blocking transaction, and records queries killed by <code>temp_file_limit</code>, SIGSEGV or the OOM killer in <a href="https://docs.yugabyte.com/stable/explore/observability/yb-pg-stat-get-queries/" target="_blank" rel="noopener">yb_terminated_queries</a> (v2024.2 LTS and later).</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- YugabyteDB performance monitoring: what is running, holding or dying right now.

-- 1. Long transactions and leaked "idle in transaction" sessions, with memory.
SELECT pid,
       usename,
       state,
       now() - xact_start                    AS xact_age,
       pg_size_pretty(allocated_mem_bytes)   AS heap,
       pg_size_pretty(rss_mem_bytes)         AS rss,
       left(query, 60)                       AS query
FROM pg_stat_activity
WHERE backend_type = 'client backend'
  AND xact_start &gt; 'transactionid'         AS txn_id,
       ybdetails -&gt; 'blocked_by'             AS blocked_by,
       ybdetails -&gt;&gt; 'tablet_id'             AS tablet_id
FROM pg_locks
WHERE NOT granted;

-- 3. Queries killed by temp_file_limit, SIGSEGV or the OOM killer (v2024.2+).
SELECT query_start_time,
       query_end_time,
       termination_reason,
       databasename,
       left(query_text, 80)                  AS query
FROM yb_terminated_queries
ORDER BY query_end_time DESC
LIMIT 20;</pre>
<p>Sometimes the right Yugabyte performance troubleshooting move during an incident is to remove one blocking transaction. That is a disruptive action: the application receives an error and must retry. We wrap it in verification, an explicit confirmation gate and validation, never a one-liner.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">#!/usr/bin/env bash
# Yugabyte performance troubleshooting, DISRUPTIVE step: cancel a blocking
# distributed transaction found via pg_locks.
# Verification before, operator confirmation gate, validation after.
set -euo pipefail
: "${YB_HOST:?}" "${YB_USER:?}" "${PGPASSWORD:?}" "${TXN_ID:?transaction UUID from ybdetails}"
PSQL=(ysqlsh -h "${YB_HOST}" -p 5433 -U "${YB_USER}" -d yugabyte -At -v ON_ERROR_STOP=1)

# --- Verification BEFORE: is the transaction still there, and who does it block?
"${PSQL[@]}" -c "
  SELECT count(*) AS waiting_on_it
  FROM pg_locks
  WHERE NOT granted
    AND ybdetails -&gt; 'blocked_by' ? '${TXN_ID}';"

read -r -p "Type 'CANCEL ${TXN_ID}' to abort this transaction: " ANSWER
[[ "${ANSWER}" == "CANCEL ${TXN_ID}" ]] || { echo "Aborted, nothing changed."; exit 1; }

# --- Action: the application will receive an error and must retry.
"${PSQL[@]}" -c "SELECT yb_cancel_transaction('${TXN_ID}');"

# --- Validation AFTER: nobody should still be blocked by it.
sleep 2
"${PSQL[@]}" -c "
  SELECT count(*) AS still_waiting_on_it
  FROM pg_locks
  WHERE NOT granted
    AND ybdetails -&gt; 'blocked_by' ? '${TXN_ID}';"</pre>
<h2>Layer 5: plans and Query Diagnostics for YugabyteDB performance monitoring</h2>
<p>Once the evidence points at one statement, prove the hypothesis on an execution plan. <code>EXPLAIN (ANALYZE, DIST)</code> adds Storage Read Requests, Storage Rows Scanned, Storage Read Execution Time and Catalog Read Requests to the plan, so you can see the RPC pattern behind the wait events. Our companion guide on <a href="https://minervadb.com/yugabytedb-performance-tuning/">YugabyteDB performance tuning</a> explains how to act on each counter.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- YugabyteDB performance monitoring: prove the hypothesis on one execution.
EXPLAIN (ANALYZE, DIST, COSTS OFF)
SELECT o.order_id, o.amount
FROM customer_order AS o
WHERE o.customer_id = 4242
  AND o.status = 'OPEN';

-- Counters to compare with what ASH and pg_stat_statements suggested:
--   Storage Read Requests        RPC round trips (should not scale with rows)
--   Storage Rows Scanned         vs rows returned (filter efficiency)
--   Storage Read Execution Time  time waiting on DocDB
--   Catalog Read Requests        cold catalog cache on this backend</pre>
<p>For intermittent problems, a single EXPLAIN is not enough. <a href="https://docs.yugabyte.com/stable/launch-and-manage/monitor-and-alert/query-tuning/query-diagnostics/" target="_blank" rel="noopener">Query Diagnostics</a> (Early Access) captures a bundle for one query_id over an interval: sampled EXPLAIN plans with ANALYZE and DIST, bind variables for slow executions, the matching pg_stat_statements row, the ASH samples and schema details. It needs <code>ysql_yb_enable_query_diagnostics=true</code> on every node.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- YugabyteDB performance monitoring: capture a full Query Diagnostics bundle
-- (Early Access). Requires yb-tserver flags on every node, then a restart:
--   --ysql_yb_enable_query_diagnostics=true          (default false)
--   --yb_query_diagnostics_circular_buffer_size=64   (KB, default 64)

SELECT yb_query_diagnostics(
    query_id                       =&gt; -4127719322,  -- from pg_stat_statements
    diagnostics_interval_sec       =&gt; 120,          -- default 300
    explain_sample_rate            =&gt; 10,           -- % of executions to EXPLAIN, default 1
    explain_analyze                =&gt; true,         -- add actual row counts and timings
    explain_dist                   =&gt; true,         -- add DocDB RPC counters
    bind_var_query_min_duration_ms =&gt; 50            -- log binds for runs slower than 50 ms
);

-- Bundle lands in pg_data/query_diagnostics/// on that node:
--   constants_and_bind_variables.csv, pg_stat_statements.csv, schema_details.txt,
--   active_session_history.csv, explain_plan.txt
SELECT * FROM yb_query_diagnostics_status;

-- Stop early if you already have what you need.
SELECT yb_cancel_query_diagnostics(query_id =&gt; -4127719322);</pre>
<p>For a lightweight permanent safety net, the PostgreSQL slow statement log still works in YSQL, passed through the tserver flag that forwards PostgreSQL settings:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell"># YugabyteDB performance monitoring safety net (yb-tserver flag):
# pass PostgreSQL settings to every YSQL backend.
# Log statements slower than 1 s with their duration; rolling restart to apply.
--ysql_pg_conf_csv="log_min_duration_statement=1000,log_lock_waits=on"</pre>
<h2>Four incident signatures and how YugabyteDB observability exposes them</h2>
<p>Most Yugabyte performance troubleshooting cases we see fall into a handful of patterns. Each leaves a distinct fingerprint across the layers, which is why correlating them matters more than any single chart.</p>
<h3>The hot tablet</h3>
<p>Signature: p99 rises on one node while others are quiet; ASH shows TServer samples concentrated on one <code>wait_event_aux</code> prefix, often with <code>OnCpu_Active</code> or lock waits; <code>yb_local_tablets</code> resolves it to a single table, frequently one with a monotonically increasing range key. The fix is in the schema, and YugabyteDB performance monitoring has done its job once the tablet and key are named.</p>
<h3>The catalog storm after a deploy</h3>
<p>Signature: latency jumps right after an application rollout or a burst of DDL; <code>CatalogRead</code> leads the ASH wait list; the <code>CatalogCacheTableMisses</code> rate climbs and <code>yb_ysqlserver_new_connection_total</code> grows faster than usual. New backends start with a cold catalog cache, so connection churn and DDL both show up here. Pooling, including the built-in YSQL Connection Manager, is the usual remedy.</p>
<h3>The cross-zone or cross-region write</h3>
<p>Signature: write latency rises uniformly on all nodes; <code>Raft_WaitingForReplication</code> dominates ASH for write statements; UpdateConsensus latency follows the network round trip between zones. Nothing is broken; the topology sets the floor. YugabyteDB performance monitoring here feeds a placement decision, such as leader preference or geo-partitioning, rather than a tuning change.</p>
<h3>The disk that fell behind</h3>
<p>Signature: block cache hit ratio drops, <code>RocksDB_ReadBlockFromFile</code> and <code>WAL_Sync</code> rise in ASH, and <code>log_sync_latency</code> climbs; <code>rocksdb_current_version_num_sst_files</code> and compaction bytes may show compaction debt. The remedy can be capacity, a noisy neighbour, or a query that scans far more than it returns, which <code>docdb_rows_scanned</code> in pg_stat_statements will reveal.</p>
<h2>The troubleshooting workflow: from alert to root cause</h2>
<p>With the layers in place, Yugabyte performance troubleshooting becomes a repeatable sequence. Each step narrows the search for the next, and each has one primary source, which keeps the team from arguing over dashboards.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNTI4IiB3aWR0aD0iOTAwIiBoZWlnaHQ9IjUyOCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJZdWdhYnl0ZURCIHBlcmZvcm1hbmNlIHRyb3VibGVzaG9vdGluZyB3b3JrZmxvdyBmb3IgYSBwOTkgbGF0ZW5jeSByZWdyZXNzaW9uOiBjb25maXJtIHdpdGggbWV0cmljcywgcmFuayBzdGF0ZW1lbnRzLCByZWFkIHdhaXQgZXZlbnRzLCBsb2NhbGlzZSB0byBub2RlIGFuZCB0YWJsZXQsIHByb3ZlIHdpdGggYSBwbGFuLCB0aGVuIGZpeCBhbmQgdmVyaWZ5Ij48dGl0bGU+WXVnYWJ5dGVEQiBwZXJmb3JtYW5jZSB0cm91Ymxlc2hvb3Rpbmcgd29ya2Zsb3cgZm9yIGEgcDk5IGxhdGVuY3kgcmVncmVzc2lvbjogY29uZmlybSB3aXRoIG1ldHJpY3MsIHJhbmsgc3RhdGVtZW50cywgcmVhZCB3YWl0IGV2ZW50cywgbG9jYWxpc2UgdG8gbm9kZSBhbmQgdGFibGV0LCBwcm92ZSB3aXRoIGEgcGxhbiwgdGhlbiBmaXggYW5kIHZlcmlmeTwvdGl0bGU+PGRlZnM+PG1hcmtlciBpZD0iYWgiIG1hcmtlcldpZHRoPSI4IiBtYXJrZXJIZWlnaHQ9IjgiIHJlZlg9IjciIHJlZlk9IjQiIG9yaWVudD0iYXV0byIgbWFya2VyVW5pdHM9InVzZXJTcGFjZU9uVXNlIj48cGF0aCBkPSJNMCwwIEw4LDQgTDA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IgeT0iMzkwLjIzIiB3aWR0aD0iNDE2LjAiIGhlaWdodD0iMTE4IiByeD0iMTIiIGZpbGw9IiNmZmYiIHN0cm9rZT0iI2RjZGVlNCIgc3Ryb2tlLXdpZHRoPSIxIi8+PHJlY3QgeD0iNDYxLjAiIHk9IjM5MC4yMyIgd2lkdGg9IjQxNC4wIiBoZWlnaHQ9IjMiIHJ4PSIxLjUiIGZpbGw9IiNiMzI2MWUiLz48Y2lyY2xlIGN4PSI0OTAuMCIgY3k9IjQyNC4yMyIgcj0iMTYiIGZpbGw9IiNiMzI2MWUiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIi8+PHRleHQgeD0iNDkwLjAiIHk9IjQzMC4yIiBjbGFzcz0iYWIiIGZvbnQtc2l6ZT0iMTUiIGZpbGw9IiNmZmZmZmYiIHRleHQtYW5jaG9yPSJtaWRkbGUiPjY8L3RleHQ+PHRleHQgeD0iNTE2LjAiIHk9IjQzMC4yIiBjbGFzcz0iYWIiIGZvbnQtc2l6ZT0iMTciIGZpbGw9IiMwYTE0MjQiPkZpeCArIHZlcmlmeTwvdGV4dD48dGV4dCB4PSI0NzYuMCIgeT0iNDYyLjIiIGNsYXNzPSJhIiBmb250LXNpemU9IjE0Ij5DaGFuZ2Ugb25lIHRoaW5nLCByZS1tZWFzdXJlPC90ZXh0Pjx0ZXh0IHg9IjQ3Ni4wIiB5PSI0OTAuMiIgY2xhc3M9Im1iIiBmb250LXNpemU9IjEyIiBmaWxsPSIjMDA0M2NlIj5zYW1lIHF1ZXJpZXMsIGJlZm9yZSB2cyBhZnRlcjwvdGV4dD48L3N2Zz4=" width="900" height="528" alt="YugabyteDB performance troubleshooting workflow in six steps: confirm, rank, explain, localise, prove, fix and verify" loading="lazy"><figcaption>Figure 4. The six-step YugabyteDB performance monitoring workflow we follow for a p99 regression.</figcaption></figure>
<ol>
<li><strong>Confirm.</strong> Use PromQL on ports 13000 and 9000 to confirm the regression and find the nodes involved.</li>
<li><strong>Rank.</strong> Use pg_stat_statements with <code>yb_get_percentile</code> to find the statements that own the extra time.</li>
<li><strong>Explain.</strong> Group <code>yb_active_session_history</code> by wait event for those query_ids over the incident window.</li>
<li><strong>Localise.</strong> Use <code>top_level_node_id</code>, <code>wait_event_aux</code> and <code>yb_local_tablets</code> to name the node and tablet.</li>
<li><strong>Prove.</strong> Reproduce with <code>EXPLAIN (ANALYZE, DIST)</code> or capture a Query Diagnostics bundle.</li>
<li><strong>Fix and verify.</strong> Change one thing, then rerun the same queries and compare before and after.</li>
</ol>
<p>Evidence disappears, and YugabyteDB performance monitoring without evidence is guesswork: ASH is a circular buffer and pg_stat_statements may be reset. So the first action when an incident opens is to snapshot everything. This read-only collector gathers metrics twice, 60 seconds apart, plus the per-node SQL views, from every node.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">#!/usr/bin/env bash
# YugabyteDB performance monitoring: incident evidence collector (read-only).
# Captures metrics and SQL snapshots from every node into a timestamped folder,
# so the analysis can continue after the incident has cleared.
set -euo pipefail
: "${YB_NODES:?space-separated node list}" "${YB_USER:?}" "${PGPASSWORD:?}"
OUT="yb-evidence-$(date -u +%Y%m%dT%H%M%SZ)"
mkdir -p "${OUT}"

for node in ${YB_NODES}; do
  d="${OUT}/${node}"; mkdir -p "${d}"
  PSQL=(ysqlsh -h "${node}" -p 5433 -U "${YB_USER}" -d yugabyte -v ON_ERROR_STOP=1 --csv)

  # Metric snapshots (two scrapes 60 s apart give you rates offline).
  curl -s "http://${node}:13000/prometheus-metrics" &gt; "${d}/ysql_metrics_t0.prom"
  curl -s "http://${node}:9000/prometheus-metrics?version=v2&amp;table_blocklist=.*" &gt; "${d}/tserver_metrics_t0.prom"

  # Per-node SQL views: ASH, statements, sessions, tablets.
  "${PSQL[@]}" -c "SELECT * FROM yb_active_session_history
                   WHERE sample_time &gt; now() - INTERVAL '60 minutes';" &gt; "${d}/ash.csv"
  "${PSQL[@]}" -c "SELECT * FROM pg_stat_statements;"                   &gt; "${d}/pg_stat_statements.csv"
  "${PSQL[@]}" -c "SELECT * FROM pg_stat_activity;"                     &gt; "${d}/pg_stat_activity.csv"
  "${PSQL[@]}" -c "SELECT * FROM yb_local_tablets;"                     &gt; "${d}/yb_local_tablets.csv"
done

sleep 60
for node in ${YB_NODES}; do
  curl -s "http://${node}:13000/prometheus-metrics" &gt; "${OUT}/${node}/ysql_metrics_t1.prom"
  curl -s "http://${node}:9000/prometheus-metrics?version=v2&amp;table_blocklist=.*" &gt; "${OUT}/${node}/tserver_metrics_t1.prom"
done

# Cluster-wide lock picture once is enough.
ysqlsh -h "${YB_NODES%% *}" -p 5433 -U "${YB_USER}" -d yugabyte --csv 
  -c "SELECT * FROM pg_locks WHERE NOT granted;" &gt; "${OUT}/pg_locks_waiting.csv"

tar czf "${OUT}.tar.gz" "${OUT}" &amp;&amp; echo "Evidence: ${OUT}.tar.gz"</pre>
<h2>Performance Advisor: ASH with a UI</h2>
<p>Yugabyte’s <a href="https://www.yugabyte.com/blog/smarter-observability-with-yugabytedb-performance-advisor/" target="_blank" rel="noopener">Performance Advisor</a> is available as a tech preview in YugabyteDB Aeon for clusters on v2024.2 or higher, with YugabyteDB Anywhere support announced as coming. It builds on <code>yb_active_session_history</code> to chart cluster load by wait type, rank queries by their share of load, and flag anomalies such as catalog read waits or lock contention above 50% of wait time. It is a good front end for the same evidence; the SQL in this guide remains the way to verify what it shows and to work on self-managed clusters.</p>
<h2>A YugabyteDB performance monitoring dashboard that earns its screen space</h2>
<p>Seven panels cover YugabyteDB observability end to end without drowning the on-call engineer.</p>
<table>
<thead>
<tr>
<th>Panel</th>
<th>Source</th>
<th>Question it answers</th>
</tr>
</thead>
<tbody>
<tr>
<td>YSQL ops/s and latency by statement type</td>
<td><code>handler_latency_yb_ysqlserver_SQLProcessor_*</code> on :13000</td>
<td>Is the user-facing layer slower, and on which node?</td>
</tr>
<tr>
<td>DocDB read/write RPC rate</td>
<td><code>handler_latency_yb_tserver_TabletServerService_Read/Write</code> on :9000</td>
<td>Did storage load change with the latency?</td>
</tr>
<tr>
<td>Block cache hit ratio</td>
<td><code>rocksdb_block_cache_hit / miss</code></td>
<td>Is the working set still in memory?</td>
</tr>
<tr>
<td>WAL append and sync latency</td>
<td><code>log_append_latency</code>, <code>log_sync_latency</code></td>
<td>Is the disk bounding writes?</td>
</tr>
<tr>
<td>Connections vs maximum, rejections</td>
<td><code>yb_ysqlserver_*_connection_total</code></td>
<td>Are clients queuing or being refused?</td>
</tr>
<tr>
<td>Database load by wait class</td>
<td><code>yb_active_session_history</code></td>
<td>What is the cluster waiting on right now?</td>
</tr>
<tr>
<td>Top statements by p99</td>
<td><code>pg_stat_statements</code></td>
<td>Which SQL owns the tail?</td>
</tr>
</tbody>
</table>
<h2>How MinervaDB runs YugabyteDB performance monitoring</h2>
<p>MinervaDB is a vendor-neutral database infrastructure company. Our engineers come from PostgreSQL, MySQL and storage-engine internals, which maps directly onto YSQL, DocDB and RocksDB. For YugabyteDB we design the observability stack, write the alert rules and runbooks, and provide 24×7 consultative support when the alert fires, with response targets of 15 minutes for Severity 1, 12 hours for Severity 2, 24 hours for Severity 3 and 48 hours for Severity 4.</p>
<p>We have supported more than 900 enterprises from 46 cities over 15+ years. Our rule is the one this guide follows: every recommendation is anchored to a named metric, view or wait event, and every change is staged with a rollback path.</p>
<h2>Frequently asked questions</h2>
<h3>What is the best tool for YugabyteDB performance monitoring?</h3>
<p>Use Prometheus metrics from ports 13000 and 9000 to detect problems, pg_stat_statements to rank statements, and yb_active_session_history to explain what they were waiting on. No single tool answers all three questions.</p>
<h3>How do I find a hot tablet with YugabyteDB observability tools?</h3>
<p>Group TServer samples in yb_active_session_history by wait_event_aux, which holds the first 15 characters of the tablet ID, and join it to yb_local_tablets on each node to get the table and tablet.</p>
<h3>Does pg_stat_statements work in YugabyteDB?</h3>
<p>Yes. It is installed by default and adds yb_latency_histogram, read with yb_get_percentile(), plus DocDB RPC columns such as docdb_read_rpcs, docdb_rows_scanned and docdb_wait_time.</p>
<h3>Which ports expose YugabyteDB metrics?</h3>
<p>YB-Master on 7000, YB-TServer on 9000, YSQL on 13000 and YCQL on 12000, at /prometheus-metrics for Prometheus format or /metrics for JSON.</p>
<h3>How long does Active Session History keep data?</h3>
<p>ASH keeps samples in a per-node circular buffer sized by ysql_yb_ash_circular_buffer_size, so retention depends on activity. Export samples during an incident if you need them later.</p>
<p><em>All SQL, PromQL, configuration and scripts in this post are illustrative and version-pinned to the YugabyteDB releases named; alert thresholds are starting points, not recommendations for your workload. Test every change in a non-production environment first, confirm your exact server version, and maintain a robust disaster-recovery posture, including verified backups and rehearsed failover, before applying anything to production.</em></p>
<p><strong>Want YugabyteDB observability that finds the root cause before the bridge call ends?</strong> <a href="https://minervadb.com/contact-minervadb-book-an-appointment/">Book a session with a MinervaDB principal architect</a>, or email contact@minervadb.com.</p></p>
<p><a href="https://minervadb.com/yugabytedb-performance-monitoring/">YugabyteDB Performance Monitoring: Kill Slow SQL in 6 Steps</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Foundation: Auto‑Generated User Properties in TAF 4.0 — The Piece for Ensuring Full Test Reproduction</title>
        <link>https://mariadb.org/mariadb-foundation-auto-generated-user-properties-in-taf-4-0-the-piece-for-ensuring-full-test-reproduction/</link>
        <pubDate>Fri, 02 Oct 2026 15:28:59 +0000</pubDate>
        <dc:creator>Jonathan Miller</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-foundation-auto-generated-user-properties-in-taf-4-0-the-piece-for-ensuring-full-test-reproduction/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>TAF’s reproducibility story just gained its most important upgrade: every test case now produces a fully resolved, auto‑generated user properties file.<br />
This file captures exactly what the run used — …<br />
Continue reading "MariaDB Foundation: Auto‑Generated User Properties in TAF 4.0 — The Piece for Ensuring Full Test Reproduction"<br />
MariaDB Foundation: Auto‑Generated User Properties in TAF 4.0 — The Piece for Ensuring Full Test Reproduction appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/mariadb-foundation-auto-generated-user-properties-in-taf-4-0-the-piece-for-ensuring-full-test-reproduction/">MariaDB Foundation: Auto‑Generated User Properties in TAF 4.0 — The Piece for Ensuring Full Test Reproduction</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>TAF’s reproducibility story just gained its most important upgrade: every test case now produces a fully resolved, auto‑generated user properties file.<br />
This file captures exactly what the run used — … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/mariadb-foundation-auto-generated-user-properties-in-taf-4-0-the-piece-for-ensuring-full-test-reproduction/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;MariaDB Foundation: Auto‑Generated User Properties in TAF 4.0 — The Piece for Ensuring Full Test Reproduction&#8221;</span></a></p>
<p><a href="https://mariadb.org/mariadb-foundation-auto-generated-user-properties-in-taf-4-0-the-piece-for-ensuring-full-test-reproduction/">MariaDB Foundation: Auto‑Generated User Properties in TAF 4.0 — The Piece for Ensuring Full Test Reproduction</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/mariadb-foundation-auto-generated-user-properties-in-taf-4-0-the-piece-for-ensuring-full-test-reproduction/">MariaDB Foundation: Auto‑Generated User Properties in TAF 4.0 — The Piece for Ensuring Full Test Reproduction</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>When AI Finds the Bugs We Missed: A Very Busy Year for MariaDB Security</title>
        <link>https://mariadb.org/when-ai-finds-the-bugs-we-missed-a-very-busy-year-for-mariadb-security/</link>
        <pubDate>Fri, 02 Oct 2026 15:03:32 +0000</pubDate>
        <dc:creator>Frédéric Descamps</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/when-ai-finds-the-bugs-we-missed-a-very-busy-year-for-mariadb-security/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>You may have noticed that some recent MariaDB Server releases arrived a little later than expected. Sorry about that! But there is a good reason for it. …<br />
Continue reading "When AI Finds the Bugs We Missed: A Very Busy Year for MariaDB Security"<br />
When AI Finds the Bugs We Missed: A Very Busy Year for MariaDB Security appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/when-ai-finds-the-bugs-we-missed-a-very-busy-year-for-mariadb-security/">When AI Finds the Bugs We Missed: A Very Busy Year for MariaDB Security</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>You may have noticed that some recent MariaDB Server releases arrived a little later than expected. Sorry about that! But there is a good reason for it. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/when-ai-finds-the-bugs-we-missed-a-very-busy-year-for-mariadb-security/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;When AI Finds the Bugs We Missed: A Very Busy Year for MariaDB Security&#8221;</span></a></p>
<p><a href="https://mariadb.org/when-ai-finds-the-bugs-we-missed-a-very-busy-year-for-mariadb-security/">When AI Finds the Bugs We Missed: A Very Busy Year for MariaDB Security</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/when-ai-finds-the-bugs-we-missed-a-very-busy-year-for-mariadb-security/">When AI Finds the Bugs We Missed: A Very Busy Year for MariaDB Security</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Automated Database Failover: Why Homegrown High Availability Struggles At Scale</title>
        <link>https://severalnines.com/blog/automated-database-failover-why-homegrown-high-availability-struggles-at-scale/</link>
        <pubDate>Fri, 02 Oct 2026 07:49:19 +0000</pubDate>
        <dc:creator>Paul Namuag</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/automated-database-failover-why-homegrown-high-availability-struggles-at-scale/</guid>
        <source url="https://severalnines.com/">Severalnines</source>
        <description><![CDATA[<p>I’ve encountered DBAs and ops engineers who shared war stories of running production long before automation and modern tooling went mainstream. Experiencing sudden primary faults during sleeping hours, getting paged, logging in to squint over trace logs that show replication lag on all replicas and working out which one is furthest ahead, promoting it, editing […]<br />
The post Automated Database Failover: Why Homegrown High Availability Struggles At Scale appeared first on Severalnines.</p>
<p><a href="https://severalnines.com/blog/automated-database-failover-why-homegrown-high-availability-struggles-at-scale/">Automated Database Failover: Why Homegrown High Availability Struggles At Scale</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>I’ve encountered DBAs and ops engineers who shared war stories of running production long before automation and modern tooling went mainstream. Experiencing sudden primary faults during sleeping hours, getting paged, logging in to squint over trace logs that show replication lag on all replicas and working out which one is furthest ahead, promoting it, editing an HAProxy config, reloading it, only to spend the next hour figuring out what to do with the old primary that just came back online and is accepting writes — tragic disaster!</p>
<p>If you are lucky, the procedure takes minutes and nobody outside the on-call rotation notices; if you are unlucky, you promoted a replica that was four seconds behind, and those four seconds contained payment records. The cost of downtime is easy to underestimate because it never shows up as one clear number, or simply gets buried across a dozen small things instead of one big number.</p>
<p>The fact is that there is lost revenue, the engineering time spent recovering instead of building, the SLA credit you owe your customers, and the erosion of trust that happens when your status page goes yellow for the third time in a quarter. For a team targeting 99.99% availability, the downtime allowance is approximately 52 minutes and 34 seconds over a 365-day year. One badly handled primary failure can consume a substantial share of that budget.</p>
<p>High availability is not optional at that point. What is worth questioning, is whether you should be building the failover machinery yourself. Most teams start by building it themselves, which is reasonable when you have one primary and one replica in one data center. The problem is that failover complexity does not grow linearly with your footprint. It grows with the number of topology and environment combinations you have to reason about, and that number multiplies fast.</p>
<p>Apart from that, it also forms complexity as the environment changes and the requirements and tooling goes bigger and bigger.</p>
<h2 class="wp-block-heading">Failover Workflow Complexity</h2>
<p>Before deciding whether a homegrown solution scales, you need a complete, thorough inventory of the steps. A reliable, working failover is not just a simple promotion of a replica, but a sequence of decisions, several of which present data loss risk if you get them wrong.</p>
<h3 class="wp-block-heading">1. Node failure detection (heartbeats, thresholds)</h3>
<p>This is the step people underestimate the most.</p>
<p>A single failed health check means nothing — a TCP connection can time out because the database is down, because the host is down, because a switch is being upgraded, because the kernel is thrashing under memory pressure, or because your monitoring host has a routing problem and the database is perfectly healthy. Every one of those looks identical from a single vantage point.</p>
<p>Getting heartbeat and threshold logic right means dealing with four things at once:</p>
<p><strong>Multiple observers.</strong> If only your monitoring server can see the failure, the failure may be in your monitoring server. Real detection logic checks from the perspective of the replicas and the load balancers too. If the replicas can still stream from the primary and only your monitoring node cannot reach it, you almost certainly do not want to fail over.</p>
<p><strong>Thresholds you can defend.</strong> Too aggressive and you fail over during a two second network blip, which is worse than the blip. Too conservative and your thirty second grace period becomes thirty seconds of downtime on every real failure. The number has to be justified against your network and your workload, not copied from a blog post.</p>
<p><strong>Distinguishing down from unhealthy.</strong> A primary that is up but has a full disk, or is stuck behind a long running lock, or has hit max_connections, is not down. It is also not usable. Your logic has to decide whether these count as a failover trigger.</p>
<p><strong>The load balancer’s view.</strong> The database is reachable from your monitoring system but not from your proxy layer. From the application’s perspective the cluster is unavailable; from your health check’s perspective everything is fine. Detection that only looks at the database misses this entirely.</p>
<h3 class="wp-block-heading">2. Identifying the best candidate for promotion (which node has the latest data)</h3>
<p>Once you accept that the primary is gone, you have to decide which node replaces it. Picking wrong here is how you lose transactions. This is also where the logic stops being portable between engines, because every engine tracks replication position differently. Let’s look at four engines that present four different answers to the same question. That is the first place a homegrown solution starts to strain, because the failover script you wrote for Postgres teaches you almost nothing about the one you need for MySQL, Galera Cluster, etc.</p>
<p>On <a href="https://severalnines.com/clustercontrol/databases/postgresql/">PostgreSQL streaming replication</a>, you compare the write ahead log positions on every surviving standby. That means sampling both the replay location and the receive location, because a standby may have received WAL it has not yet applied. The node with the highest LSN is your candidate. If you are running synchronous replication with a quorum, you also need to know which nodes were in the synchronous set, because a node outside that set may be arbitrarily behind.</p>
<p>On <strong>MySQL and MariaDB replication with GTID</strong>, you compare executed GTID sets. The more advanced replica is the obvious candidate, but you also have to check for <a href="https://severalnines.com/blog/mysql-replication-and-gtid-based-failover-deep-dive-errant-transactions/">errant transactions</a>, meaning transactions that exist on a candidate but not on the old primary or the other replicas. Promoting a node with errant transactions will break replication for every other replica the moment they try to sync from it, and the failure will show up minutes later as a confusing duplicate key error rather than as an obvious failover problem.</p>
<p>If you are on file and position based replication instead of GTID, this comparison is considerably worse.</p>
<p>On <strong>Galera Cluster and MySQL Group Replication</strong>, the engine handles this for you. Galera uses quorum calculation and certification based replication, so node loss is resolved at the cluster level and there is no promotion to perform — a script that tries to promote a Galera node is not just unnecessary, it is dangerous. Group Replication elects a new primary in single primary mode on its own. Your job is not to pick a candidate but to</p>
<ul class="wp-block-list">
<li>understand what the cluster decided,</li>
<li>reflect it in your topology map, and</li>
<li>make sure the proxy layer knows which node is now the writer.</li>
</ul>
<p>On <strong>MongoDB replica sets</strong>, the set holds its own election based on priority, optime, and votes. The engine does the promotion, but you still handle the consequences: connection strings and read preferences need to reflect the new primary, and in a sharded cluster the config servers and mongos routers need to converge on the new state.</p>
<p><strong>Then come the data consistency checks</strong>, which is the part homegrown scripts skip most often because it demands the most engine specific knowledge. Having a candidate is not the same as having a cluster that can follow it. On PostgreSQL, you run pg_rewind against the standbys that diverged so their timelines reconcile with the newly promoted node. Skip it and you get standbys that will not attach, or worse, standbys that attach and silently diverge. On MySQL, you confirm the replicas you are about to repoint have no transactions the new primary lacks, create and grant the replication user, and repoint each replica in turn.</p>
<p>All of it serves one rule: exactly one writable node. Two nodes with read_only=OFF is a <a href="https://severalnines.com/blog/eliminating-postgresql-split-brain-multi-cloud-databases/">split brain</a> in progress, and the damage is silent. Any serious failover implementation has to guarantee the old primary cannot accept a write, even if it comes back to life halfway through the promotion. That means fencing it, which in practice means being willing to shut down a database process that looks perfectly healthy.</p>
<h3 class="wp-block-heading">3. Updating load balancers on DNS</h3>
<p>Promotion means nothing until the application follows.</p>
<p>With <strong>a proxy</strong> such as ProxySQL, HAProxy, MaxScale, or PgBouncer, the configuration or backend health state has to be updated to reflect the new writer, and the change has to propagate to every proxy instance you run.</p>
<p>With <strong>DNS</strong>, you are at the mercy of TTLs and of resolvers and JVM clients that cache aggressively and ignore your TTL entirely.</p>
<p>With <strong>a virtual IP</strong> under Keepalived, you have to be sure the VIP cannot end up on two hosts at once.</p>
<p>Most real environments use some combination of all three, plus a set of application connection strings somebody hardcoded in 2021 and forgot about. Every one of those paths is a place where a technically successful promotion still reads as an outage to your users.</p>
<h3 class="wp-block-heading">4. Reintroducing the failed node</h3>
<p>The failover ends when the cluster is redundant again, not when the promotion succeeds. Until you rebuild the failed node, you are running without a spare, which means the next failure is a full outage rather than another failover — reintroduction is its own procedure.</p>
<p>The old node’s data is stale and, on PostgreSQL, likely on a divergent timeline, so it has to be rewound or rebuilt from a fresh base backup off the new primary. It has to come up read-only so it cannot accept writes during the process. Its replication then has to point at the new primary, which on a large data set can mean hours of streaming before you are back to full redundancy.</p>
<p>A single flowchart can help you visualize how the failover process works. The sample diagram below illustrates a simple workflow but each of these process can comprise complex components especially on a hybrid cloud or in a containerized environment.</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="979" src="https://severalnines.com/wp-content/uploads/2026/09/automated-database-failover-workflow-1024x979.png" alt="failover-workflow.png	Database failover workflow showing failure checks, candidate selection, primary fencing, replica promotion, traffic rerouting, and restoration of redundancy, with human intervention when checks or promotion fail." class="wp-image-45462"></figure>
<h2 class="wp-block-heading">DIY Approaches: Cron plus scripts for monitoring, manual intervention for DNS changes</h2>
<p>Nobody sets out to build a fragile failover system. It represents an accumulation of decisions over time; <strong>version one is a cron job</strong>.</p>
<p>A shell script runs every minute, connects to the primary, and if the connection fails it writes to a log and sends an email. A human then does all the hard parts: reading the alert, comparing replication positions by hand, promoting, and editing the DNS record or the proxy config. This is honest, and it works, as long as someone is awake.</p>
<p><strong>Version two automates the easy parts</strong>. The script now compares replication positions and runs the promotion itself. It lives in /usr/local/bin on the monitoring host with the replication credentials in a variable at the top, and it works on the topology it was written for. The DNS change is still manual, because nobody wants a cron job with permission to rewrite a production zone file.</p>
<p><strong>Version three finally automates the traffic layer</strong>, so the script also SSHes into two HAProxy nodes and edits their configs with sed. This is where the special cases start. What happens if only one of the two accepts the change? What happens if the reload fails but the config is already written?</p>
<p><strong>And version four adds a lock file</strong>, because someone discovered the cron job can fire while a previous invocation is still promoting.</p>
<p>Every version is a reasonable response to a real incident. That is exactly why the pattern is so common, and why it is rarely re-examined.</p>
<h3 class="wp-block-heading">Each new node or environment multiplies the complexity</h3>
<p>What makes this approach break down is not code quality; careful engineers write careful scripts. The problem is combinatorial, because every failover implementation is really a function of several independent variables:</p>
<ul class="wp-block-list">
<li><strong>The database engine and version</strong>, e.g., Postgres 13 and Postgres 16 differ in how standby promotion can be triggered. PostgreSQL 16 removed <code>promote_trigger_file</code>, so failover scripts that relied on trigger-file promotion need updating to use <code>pg_ctl promote</code> or <code>pg_promote()</code>. MySQL 5.7 and 8.0 differ on Group Replication behaviour.</li>
<li><strong>The topology</strong>. Primary with two replicas is not the same as primary with a cascading replica, which is not the same as a Galera cluster with an asynchronous replica hanging off it.</li>
<li><strong>The traffic layer</strong>. ProxySQL, HAProxy plus Keepalived, MaxScale, PgBouncer, a cloud load balancer, or plain DNS. Each has different update mechanics and different propagation behaviour.</li>
<li><strong>The environment</strong>. Bare metal, one cloud, another cloud, a Kubernetes cluster, and a staging environment configured slightly differently from production because of a decision no one remembers making.</li>
</ul>
<p>A homegrown solution has to handle the product, not the sum, of these. Two engines, three topologies, and two traffic layers is twelve distinct code paths. Add a second region with different network characteristics and it is twenty four. Add one more replica per cluster and every position comparison, repointing loop, and proxy backend list must account for it. Each path needs to be written, and much more importantly, each path needs to be tested, because failover code is code you least want to discover is broken the moment you need it.</p>
<p>That testing burden is where most homegrown systems quietly fail. No one has time to induce twenty four different failure modes every quarter, so the paths get tested once at build time and then trusted forever. Meanwhile the environment drifts.</p>
<p>Someone upgrades a minor version, another adds a replica, and yet another changes a firewall rule. The script does not know any of this happened, and there is no signal that it has stopped working until the night it is needed.</p>
<p>There is an organizational cost too. The failover logic lives in one engineer’s head, in their bash, with their assumptions. They leave and you’re left with a system everyone is afraid to touch and nobody is willing to delete.</p>
<p><a href="https://severalnines.com/blog/comparing-devops-tooling-approaches-terraform-ansible-chef-puppet-and-diy-scripting/">DIY failover</a> degrades not because the engineering was bad, but because the surface area outgrows the team’s capacity to verify it.</p>
<p><strong>N.B. </strong>A self-managed HA stack is not necessarily a homegrown failover script. <a href="https://severalnines.com/blog/building-high-availability-postgresql-clusters-with-patroni-and-other-integrated-approaches/">Established tools such as Patroni</a> already provide PostgreSQL failover coordination. The remaining question is who maintains, tests, and supports the complete service — including proxies, backups, monitoring, and recovery procedures. Building that stack can be a sound choice when your team has the expertise and capacity to own it. The case for ClusterControl is reducing the integration and lifecycle burden across supported databases and environments, not suggesting that reliable open-source HA is impossible.</p>
<h3 class="wp-block-heading">Automated Failover with ClusterControl: The Work You No Longer Do</h3>
<p><a href="https://severalnines.com/clustercontrol/features/failover/">ClusterControl automates failover</a> in one, streamlined workflow, supporting diverse types of database clusters, from MySQL and PostgreSQL, to MongoDB, ClickHouse and more. Users can operate mostly within its intuitive GUI but can alternatively operate through the <a href="https://docs.severalnines.com/clustercontrol/latest/reference-manuals/components/clustercontrol-cli/?h=cli">s9s CLI</a> for failing over manually. Let’s look at how auto-failover can be done with the click of a button.</p>
<p>In the list of clusters, simply enable auto-recovery either for cluster/node through this toggle switch:</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="420" src="https://severalnines.com/wp-content/uploads/2026/09/clustercontrol-postgresql-auto-recovery-settings-1024x420.png" alt="ClusterControl cluster list showing cluster and node auto-recovery enabled for a PostgreSQL 14 cluster." class="wp-image-45457"></figure>
<p>or within the cluster dashboard itself as shown below:</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="487" src="https://severalnines.com/wp-content/uploads/2026/09/clustercontrol-mariadb-cluster-auto-recovery-1024x487.png" alt="ClusterControl Actions menu showing cluster auto-recovery enabled for a MariaDB replication cluster." class="wp-image-45456"></figure>
<p>Automatic failover becomes active as soon as cluster recovery is toggled on for that cluster; if toggled off node recovery will set off as well. However, toggling node recovery to off/on does not affect cluster recovery state.</p>
<p>What you get from there is one unified interface over several different underlying mechanisms. Where the database already elects a new primary on its own, as Galera Cluster, MySQL Group Replication, MongoDB replica sets, and Redis or Valkey Sentinel do through quorum and heartbeats, ClusterControl defers to the engine. It merely observes the outcome, updates the topology view, and adjusts monitoring and management for the new roles rather than competing with the election.</p>
<p>Where the database has no such mechanism, ClusterControl applies its own failover logic, following the vendor’s documented best practices. MySQL and MariaDB replication, along with PostgreSQL and TimescaleDB streaming replication, fall into that second category. Replication gives them redundancy, but neither ships with built-in fault tolerance or automatic recovery, so nothing in the stack will promote a replica unless something outside the database decides to.</p>
<p>Let’s briefly look at the <a href="https://severalnines.com/blog/how-clustercontrol-performs-automatic-database-recovery-and-failover/">difference between node and cluster recovery</a>. <strong>Node recovery</strong> handles a single process dying.</p>
<p>If a database service, a ProxySQL instance, a HAProxy instance, a Keepalived daemon, a PgBouncer, or a Prometheus exporter stops when it should not have, ClusterControl waits about 30 seconds (default) for systemd to do its job. Then starts the service itself, and raises an alarm if it cannot. Notably, if you stopped the node deliberately through ClusterControl, it will not fight you and restart it.</p>
<p><strong>Cluster recovery</strong> handles the topology being broken, which is the failover case. Both can be toggled independently per cluster.</p>
<h3 class="wp-block-heading">A real failover event from ClusterControl’s perspective</h3>
<p>The useful thing about an automated failover in ClusterControl is that it produces an auditable record of every decision. Logs can be found in <code>/var/log/cmon.log</code> or <code>/var/log/cmon-audit.log</code>. Here is what the sequence actually looks like per engine.</p>
<h4 class="wp-block-heading">PostgreSQL and TimescaleDB streaming replication</h4>
<ul class="wp-block-list">
<li>After 10 seconds of primary unreachability, it raises an alarm.</li>
<li>After an additional 10 second waiting period, it starts the primary failover job.</li>
<li>It samples replayLocation and receiveLocation on every surviving node to find the most advanced one.</li>
<li>It promotes that node as the new primary.</li>
<li>It stops the remaining replicas.</li>
<li>It verifies the synchronization state using pg_rewind.</li>
<li>It restarts the replicas pointing at the new primary.</li>
</ul>
<p>If the promotion fails, the job aborts and raises an alarm rather than continuing into an unknown state. And when the old primary comes back online, ClusterControl forcibly shuts down its PostgreSQL service, because a former primary that restarts in writable mode can accept conflicting writes, and a writable stale primary is exactly the split brain you were trying to avoid.</p>
<p>That fencing behaviour is visible in the database log, the most direct evidence you can show someone who is skeptical that it happens:</p>
<pre class="wp-block-code"><code>2026-07-31 05:06:10.091 UTC [2392] LOG: database system is ready to accept connections
2026-07-31 05:06:27.696 UTC [2392] LOG: received fast shutdown request

2026-07-31 05:06:27.700 UTC [2392] LOG: aborting any active transactions

2026-07-31 05:06:27.703 UTC [2766] FATAL: terminating connection due to administrator command

2026-07-31 05:06:27.704 UTC [2758] FATAL: terminating connection due to administrator command

2026-07-31 05:06:27.709 UTC [2392] LOG: background worker "logical replication launcher" exited with exit code 1

2026-07-31 05:06:27.709 UTC [2414] LOG: shutting down

2026-07-31 05:06:27.735 UTC [2392] LOG: database system is shut down</code></pre>
<p>The instance came up at 05:06:10 and was shut down 17 seconds later. That is the fence closing. Reincorporating that node as a replica is a deliberate user action, which is the right default: you should decide when a formerly diverged node rejoins your cluster.</p>
<h3 class="wp-block-heading"><strong>MySQL and MariaDB replication</strong></h3>
<p>ClusterControl supports recovery for primary-replica and primary-primary setups with MySQL GTID or MariaDB GTID, as well as an asynchronous replica attached to a Galera cluster. The sequence:</p>
<ol class="wp-block-list">
<li>After 3 seconds of the primary being unreachable from multiple vantage points, including the ClusterControl host, the replicas, and the load balancers, it raises an alarm.</li>
<li>It confirms at least one replica is reachable.</li>
<li>It selects a promotion candidate.</li>
<li>With GTID enabled, it calculates the probability of errant transactions.</li>
<li>If none are detected, it promotes the candidate.</li>
<li>It creates and grants the replication user.</li>
<li>It repoints every replica that was following the old primary.</li>
<li>It starts the replicas.</li>
<li>It flushes logs on all nodes.</li>
</ol>
<p>Two details are worth highlighting. First, all nodes are initially started with read_only=ON and super_read_only=ON regardless of role, and only one node is allowed read_only=OFF at a time. If two ever end up writable, ClusterControl sets both back to read only and requires a human to pick the real primary. That is the correct trade: a brief outage beats a silent split brain.</p>
<p>Second, if ProxySQL is in the cluster, ClusterControl also checks whether ProxySQL has any node available for writes. If the proxy layer has lost its writer even though ClusterControl can still reach every database node, the cluster is unavailable from the application’s point of view, and a failover is triggered. This is the failure mode homegrown health checks almost always miss.</p>
<h3 class="wp-block-heading"><strong>Galera Cluster, Group Replication, and MongoDB</strong></h3>
<p>For engines with built in fault tolerance, ClusterControl deliberately does not try to run the election. Galera Cluster, MySQL NDB Cluster, MySQL Group Replication, MongoDB replica sets, Redis/Valkey Sentinel, Redis Cluster, and Elasticsearch all handle node loss natively through quorum, heartbeats, and role switching. </p>
<p>ClusterControl watches that happen, updates the topology view, and adjusts monitoring and management for the new roles; for example, recognising the new primary in a MongoDB replica set and making sure the proxy and exporter configuration follows it. This is the part that is hard to replicate with scripts. Knowing when to act is easy. Knowing when not to act, and instead to observe and reconcile, requires the tool to actually understand the engine.</p>
<h3 class="wp-block-heading">Reliability: less data loss, faster recovery, less manual oversight</h3>
<p>Three things change when the failover path is owned by a topology aware manager rather than by a script.</p>
<p><strong>Data loss goes down</strong> because the promotion decision is based on measured replication position rather than on whichever node the on-call engineer checked first. On PostgreSQL, that is the highest position across replayLocation and receiveLocation, verified with pg_rewind before the replicas reattach. On MySQL, it is the executed GTID set plus an errant transaction check, which is the single most commonly skipped step in homegrown implementations and the one most likely to corrupt replication days after the incident is closed. Fencing the old primary closes the other data loss path, which is writes landing on a stale node nobody remembered to shut down.</p>
<p><strong>Recovery gets faster; and, more usefully, it becomes predictable.</strong> The PostgreSQL path is roughly 20 seconds of alarm and grace period before the promotion job starts; the MySQL path raises its alarm after 3 seconds. Compare that to the human path, where the clock starts when a page is acknowledged rather than when the node fails, and where the difference between a 2 p.m. incident and a 2 a.m. incident is measured in tens of minutes. Predictability is what lets you put a number in an SLA and defend it.</p>
<p><strong>Manual oversight drops to the decisions that genuinely need a human.</strong> Reattaching a diverged old primary, picking the real primary after a double-writable situation, and promoting a replica cluster in another data centre all still require someone to decide, and they should. Everything mechanical between detection and a working single-writer cluster does not.</p>
<p><strong>One honest limitation is worth stating.</strong> Automatic recovery operates within a single cluster and does not extend to <a href="https://docs.severalnines.com/clustercontrol/latest/getting-started/tutorials/day-2-operations/deploy-failover-secondary-cluster/">cluster-to-cluster replication</a>. If your primary cluster in one data centre goes down entirely, promoting the replica cluster in the other data centre is a deliberate user action. For a full data centre failover you are making a business decision about accepting data loss, and that decision should not be made by a heartbeat timeout.</p>
<p>Laid side by side, the differences are less about speed than about which steps exist at all:</p>
<figure class="wp-block-table">
<table class="has-fixed-layout">
<tbody>
<tr>
<td><strong>Concern</strong></td>
<td><strong>Cron plus scripts</strong></td>
<td><strong>ClusterControl</strong></td>
</tr>
<tr>
<td><strong>Detection</strong></td>
<td>Usually one vantage point</td>
<td>Controller, replicas, and load balancers</td>
</tr>
<tr>
<td><strong>Candidate selection</strong></td>
<td>Hand written per engine</td>
<td>Engine specific, LSN or GTID aware</td>
</tr>
<tr>
<td><strong>Errant transaction check</strong></td>
<td>Rarely implemented</td>
<td>Built into MySQL GTID recovery</td>
</tr>
<tr>
<td><strong>Consistency verification</strong></td>
<td>Often skipped</td>
<td>Pg_rewind on PostgreSQL, GTID checks on MySQL</td>
</tr>
<tr>
<td><strong>Old primary fencing</strong></td>
<td>Manual, easy to forget</td>
<td>Automatic, forced shutdown</td>
</tr>
<tr>
<td><strong>Proxy and VIP update</strong></td>
<td>Custom per proxy type</td>
<td>ProxySQL, HAProxy, MaxScale, Keepalived, PgBouncer</td>
</tr>
<tr>
<td><strong>Native quorum engines</strong></td>
<td>Risk of fighting the engine</td>
<td>Observes and reconciles instead</td>
</tr>
<tr>
<td><strong>Cost of a new environment</strong></td>
<td>Another code path to write and test</td>
<td>Configuration, not code</td>
</tr>
<tr>
<td><strong>Audit trail</strong></td>
<td>Whatever the script logged</td>
<td>Job log, alarms, notifications</td>
</tr>
</tbody>
</table>
</figure>
<p>The row that matters most is the second to last one. With scripts, every new environment adds engineering work with no upper bound. With a topology aware manager, adding an environment is a deployment or an import, and the recovery logic you already trust applies to it.</p>
<h2 class="wp-block-heading">Wrapping up</h2>
<p>The bigger the environment, the more critical an automated failover system becomes. That is not a marketing line, it is arithmetic. One primary and one replica in one region is a problem a shell script can solve. Four engines across three regions with mixed proxy layers has more states than your team has time to test, and untested failover logic is indistinguishable from no failover logic until the night it matters.</p>
<p>The useful question is not whether you can build this. Of course you can. The question is whether you want your uptime to depend on code that only runs during your worst hours, that no one has exercised since it was written, and that no one remaining on the team fully understands.</p>
<h3 class="wp-block-heading">Your next step: run a staging failover test</h3>
<p>Do not take anyone’s word for this, including ours. Run the experiment.</p>
<p>Set up two staging clusters with the same topology, one behind your existing scripts and one managed by ClusterControl with cluster recovery enabled. Then intentionally kill the primary on both. Not a graceful shutdown, an actual <code>kill -9</code> on the postmaster or mysqld; or, better yet, drop the network interface so you exercise your detection thresholds too.<br />Time it, and record more than the duration:</p>
<ul class="wp-block-list">
<li>How long until failover started? How long until the application could write again?</li>
<li>Was any committed data lost? Verify it, do not assume it.</li>
<li>Did every replica reattach, or did you have to rebuild one?</li>
<li>Did the traffic layer follow, everywhere, including the proxy instance you forgot about?</li>
<li>What happened when you brought the old primary back? Did it try to accept a write?</li>
<li>How many manual steps were involved from failure to full redundancy?</li>
</ul>
<p>Then repeat the test on a different engine, or with one extra replica in the topology, and see which of the two approaches needed changes to handle it. That second run is usually the one that settles the argument.</p>
<p>ClusterControl is <a href="https://severalnines.com/get-started/">free to try for 30 days</a>, which is more than enough time to break a staging cluster on purpose several times over. If you want to see the failover path before you install anything, the <a href="https://docs.severalnines.com/clustercontrol/latest/user-guide/management/failover-recovery/">recovery documentation</a> walks through the exact sequence for each engine.</p>
<h2 class="wp-block-heading">Database failover FAQ</h2>
<h3 class="wp-block-heading">What is automated database failover?</h3>
<p>Automated database failover restores service after a failure by coordinating failure detection, selection or election of a replacement, and application access to the surviving database. In a single-primary topology, it must also prevent the old primary from continuing to accept conflicting writes. The exact mechanism depends on the database engine and topology.</p>
<h3 class="wp-block-heading">Does automated failover guarantee zero data loss?</h3>
<p>No. With asynchronous replication, transactions acknowledged by the primary may not have reached a surviving replica when it fails. A failover manager cannot recreate those missing transactions on the promoted replica. Data-loss exposure depends on replication mode, acknowledgment settings, replica availability, and the failure scenario—not automation alone.</p>
<h3 class="wp-block-heading">Why must the old primary be fenced during failover?</h3>
<p>In a single-primary system, an unreachable server is not necessarily a stopped server. A network partition can leave the old primary running while another node is promoted. Fencing prevents the old primary from accepting conflicting writes, protecting the cluster from two independent writable primaries.</p>
<h3 class="wp-block-heading">How should you evaluate whether a homegrown failover still meets your needs?</h3>
<p>Test more than replica promotion. Measure the time until applications can write again, whether acknowledged transactions survive, whether traffic reaches the correct node, and whether replicas return to a healthy topology. Revisit the tests after upgrades and topology changes. The decision is whether your team can maintain that verification discipline as the estate evolves.</p>
<p>The post <a href="https://severalnines.com/blog/automated-database-failover-why-homegrown-high-availability-struggles-at-scale/">Automated Database Failover: Why Homegrown High Availability Struggles At Scale</a> appeared first on <a href="https://severalnines.com/">Severalnines</a>.</p>
<p><a href="https://severalnines.com/blog/automated-database-failover-why-homegrown-high-availability-struggles-at-scale/">Automated Database Failover: Why Homegrown High Availability Struggles At Scale</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>YugabyteDB Performance Tuning: 15 Powerful, Proven Tips</title>
        <link>https://minervadb.com/yugabytedb-performance-tuning/</link>
        <pubDate>Fri, 02 Oct 2026 05:25:47 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/yugabytedb-performance-tuning-15-powerful-proven-tips/</guid>
        <source url="https://minervadb.com/">MinervaDB</source>
        <description><![CDATA[<p>In a single-node PostgreSQL server, a slow query usually means a slow plan. In a distributed SQL database, a slow query usually means too many network round trips. That one difference changes almost every rule [...]</p>
<p><a href="https://minervadb.com/yugabytedb-performance-tuning/">YugabyteDB Performance Tuning: 15 Powerful, Proven Tips</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>In a single-node PostgreSQL server, a slow query usually means a slow plan. In a distributed SQL database, a slow query usually means <strong>too many network round trips</strong>. That one difference changes almost every rule of thumb, and it is why <strong>YugabyteDB performance tuning</strong> rewards engineers who understand what happens underneath YSQL: how DocDB shards rows into tablets, how Raft commits a write, and how a per-tablet RocksDB instance serves a read.</p>
<p>This Yugabyte performance optimization guide collects 15 proven YugabyteDB performance tuning tips and tricks, ordered the way we apply them on production clusters: data placement first, then query plans, then writes and transactions, then connections, geography and observability. Every tip names the internal mechanism it exploits, the exact syntax, and the counter that proves it worked. All facts are drawn from the official YugabyteDB documentation and version-pinned; numbers in examples are illustrative, not benchmarks.</p>
<h2>Why YugabyteDB performance behaves differently from PostgreSQL</h2>
<p>YugabyteDB reuses the PostgreSQL query layer (YSQL) on top of DocDB, a distributed document store. Each table and index is split into tablets; each tablet is a Raft group with a leader and followers spread across fault domains; each replica stores its data in a customised RocksDB, an LSM tree. According to the <a href="https://docs.yugabyte.com/stable/architecture/docdb/performance/" target="_blank" rel="noopener">DocDB performance architecture notes</a>, DocDB uses the Raft log in place of the RocksDB write-ahead log, encodes hybrid timestamps into keys for MVCC, uses bloom filters aware of the data model, and shares one scan-resistant block cache across all RocksDB instances on a node.</p>
<p>The practical consequence for YugabyteDB performance: the query layer and the data for a given row are often on different machines. Every time YSQL has to ask DocDB for something, that is an RPC. Effective YugabyteDB performance tuning is therefore a discipline of counting and eliminating RPCs, then making each remaining one cheap. If you want the storage-engine background, our <a href="https://minervadb.com/deep-dive-into-rocksdbs-lsm-tree-architecture/">deep dive into RocksDB’s LSM-tree architecture</a> covers memtables, S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gYmxvY2sgY2FjaGU8L3RleHQ+PHJlY3QgeD0iNjQwIiB5PSI1MjguNzEiIHdpZHRoPSIyMzYiIGhlaWdodD0iNjQiIHJ4PSIxMCIgZmlsbD0iI2U4ZjBmZiIgc3Ryb2tlPSIjYzlkYWZjIiBzdHJva2Utd2lkdGg9IjEiLz48dGV4dCB4PSI2NTYiIHk9IjU1Ni41IiBjbGFzcz0iYWIiIGZvbnQtc2l6ZT0iMTQiIGZpbGw9IiMwMDQzY2UiPmJsb2NrIGNhY2hlIG1pc3Nlcyw8L3RleHQ+PHRleHQgeD0iNjU2IiB5PSI1NzUuMCIgY2xhc3M9ImFiIiBmb250LXNpemU9IjE0IiBmaWxsPSIjMDA0M2NlIj5jb21wYWN0aW9uIGRlYnQ8L3RleHQ+PGxpbmUgeDE9IjYyNiIgeTE9IjU2MC43MSIgeDI9IjYzNyIgeTI9IjU2MC43MSIgc3Ryb2tlPSIjNWI2NDcyIiBzdHJva2Utd2lkdGg9IjEuMiIgbWFya2VyLWVuZD0idXJsKCNhaCkiLz48L3N2Zz4=" width="900" height="610" alt="YugabyteDB performance tuning request path from smart driver and YSQL Connection Manager through the YSQL query layer, DocDB tablet leader, Raft replication and RocksDB, with the latency source at each layer" loading="lazy"><figcaption>Figure 1. The YSQL request path. YugabyteDB performance tuning removes hops and shrinks the work at each layer.</figcaption></figure>
<h2>Part 1: Data placement, the YugabyteDB performance tuning decision you cannot undo later</h2>
<h3>Tip 1: Choose HASH or RANGE per table, explicitly</h3>
<p>The primary key decides the tablet. With <a href="https://docs.yugabyte.com/stable/architecture/docdb-sharding/sharding/" target="_blank" rel="noopener">hash sharding</a>, DocDB hashes the hash columns into the 0x0000 to 0xFFFF space, which caps a table at 64K tablets and spreads writes evenly. Range sharding keeps rows sorted, which makes range scans and ORDER BY cheap, but a range-sharded table starts with one tablet and splits as it grows. YCQL supports only hash sharding.</p>
<p>The default changed across releases: with Enhanced PostgreSQL Compatibility Mode (available from v2024.1, default for new universes in v2025.2), <code>yb_use_hash_splitting_by_default=false</code> makes ASC the default for the first key column. In YugabyteDB performance tuning work we never rely on the default; we declare HASH or ASC/DESC on every key and index.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- YugabyteDB performance tuning, tip 1, explicit sharding per table.
-- YugabyteDB YSQL: choose the sharding strategy per table, explicitly.
-- Never rely on the cluster default (it changed with Enhanced PostgreSQL
-- Compatibility Mode: yb_use_hash_splitting_by_default = false makes ASC the default).

-- 1. HASH: point lookups by customer, writes spread evenly over all tablets.
--    Hash space is 0x0000-0xFFFF; each tablet owns a contiguous slice of it.
CREATE TABLE customer (
    customer_id  BIGINT       NOT NULL,
    email        TEXT         NOT NULL,
    region_code  TEXT         NOT NULL,
    created_at   TIMESTAMPTZ  NOT NULL DEFAULT now(),
    CONSTRAINT customer_pk PRIMARY KEY (customer_id HASH)
) SPLIT INTO 24 TABLETS;            -- presplit: e.g. 3 nodes x 8 tablets, sized for growth

-- 2. HASH + RANGE (compound key): all orders of one customer live in the
--    same tablet, sorted by time, so "latest 20 orders" is one seek + scan.
CREATE TABLE customer_order (
    customer_id  BIGINT         NOT NULL,
    created_at   TIMESTAMPTZ    NOT NULL,
    order_id     BIGINT         NOT NULL,
    status       TEXT           NOT NULL,
    amount       NUMERIC(12,2)  NOT NULL,
    CONSTRAINT customer_order_pk
        PRIMARY KEY ((customer_id) HASH, created_at DESC, order_id ASC)
) SPLIT INTO 24 TABLETS;

-- 3. RANGE: range scans on a naturally bounded key. Presplit at known
--    boundaries so the table does not start life as a single hot tablet.
CREATE TABLE invoice_archive (
    invoice_no   BIGINT  NOT NULL,
    payload      JSONB   NOT NULL,
    CONSTRAINT invoice_archive_pk PRIMARY KEY (invoice_no ASC)
) SPLIT AT VALUES ((1000000), (2000000), (3000000));</pre>
<p>For Yugabyte performance optimization, the compound key in <code>customer_order</code> is the most useful pattern in YSQL schema design: hash on the entity, range on time. A customer’s history is co-located in one tablet and sorted, so the most common query is a single seek followed by a short sequential read.</p>
<h3>Tip 2: Presplit tables you already know will be large</h3>
<p><a href="https://docs.yugabyte.com/stable/architecture/docdb-sharding/tablet-splitting/" target="_blank" rel="noopener">Automatic tablet splitting</a> is enabled by default from v2.18.0, using a low phase (128 MiB threshold, up to 1 shard per node) and a high phase (10 GiB, up to 24 shards per node), with a forced split at 100 GiB. That is excellent for organic growth, but a table about to receive a bulk load benefits from <code>SPLIT INTO N TABLETS</code> or <code>SPLIT AT VALUES</code> so every node takes writes from the first second. A useful starting point is a small multiple of the node count, revisited as the cluster grows.</p>
<h3>Tip 3: Kill hot tablets created by monotonic keys</h3>
<p>A range key on a timestamp or a sequence puts every new row at the end of the key space, so one tablet leader absorbs all inserts, and adding nodes does not help. The fix is to prefix a small bucket column and hash on it, keeping the timestamp as the range component inside each bucket.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- YugabyteDB performance tuning, tip 3, removing a monotonic hot tablet.
-- Anti-pattern: PRIMARY KEY (created_at ASC) on an append-only event stream.
-- Every insert lands on the last tablet: one leader does all the work.

-- Fix: prefix a small, application-chosen bucket and hash on it.
-- 8 buckets -&gt; writes spread over up to 8 tablet leaders, while each bucket
-- stays time-ordered for efficient range scans.
CREATE TABLE device_event (
    bucket      SMALLINT     NOT NULL,          -- 0..7, set by the app: device_id % 8
    created_at  TIMESTAMPTZ  NOT NULL,
    device_id   BIGINT       NOT NULL,
    event_type  TEXT         NOT NULL,
    reading     DOUBLE PRECISION,
    CONSTRAINT device_event_pk
        PRIMARY KEY ((bucket) HASH, created_at ASC, device_id ASC),
    CONSTRAINT device_event_bucket_ck CHECK (bucket BETWEEN 0 AND 7)
) SPLIT INTO 8 TABLETS;

-- Read the last 15 minutes across all buckets: 8 seeks, each a tight range scan.
SELECT device_id, event_type, reading, created_at
FROM device_event
WHERE bucket IN (0, 1, 2, 3, 4, 5, 6, 7)
  AND created_at &gt;= now() - INTERVAL '15 minutes'
ORDER BY created_at DESC
LIMIT 500;</pre>
<p>The YugabyteDB performance trade-off is explicit: reads that need global time order fan out to eight buckets, which YSQL handles as a handful of tight range scans. For write-heavy event streams that is a good bargain, and it is one of the highest-impact YugabyteDB performance tuning changes we make on time-series workloads.</p>
<h3>Tip 4: Colocate small tables to cut tablets and RPCs</h3>
<p>Every tablet costs memory, Raft heartbeats and file handles on every replica. Schemas with hundreds of small tables, typical of SaaS and microservice databases, can drown a cluster in tablets. <a href="https://docs.yugabyte.com/stable/additional-features/colocation/" target="_blank" rel="noopener">Colocation</a> stores all tables of a database in a single colocation tablet, so joins between them stay local. The documented sweet spot is datasets under about 50 GB, mixed estates with a few large tables, and database-per-tenant designs.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- YugabyteDB performance tuning, tip 4, colocation for small tables.
-- Colocation: many small tables share ONE tablet (one Raft group),
-- so joins across them avoid cross-tablet RPCs and the cluster carries
-- far fewer tablets. Good for databases under roughly 50 GB.
CREATE DATABASE saas_app WITH COLOCATION = true;

c saas_app

-- Small reference / configuration tables: colocated automatically.
CREATE TABLE plan (
    plan_id    INT   NOT NULL,
    plan_name  TEXT  NOT NULL,
    CONSTRAINT plan_pk PRIMARY KEY (plan_id ASC)
);

-- The one large, fast-growing table opts out and gets its own tablets,
-- so it can be presplit and split automatically (colocated tables cannot).
CREATE TABLE usage_event (
    tenant_id   BIGINT       NOT NULL,
    event_ts    TIMESTAMPTZ  NOT NULL,
    event_id    UUID         NOT NULL,
    metric      TEXT         NOT NULL,
    qty         BIGINT       NOT NULL,
    CONSTRAINT usage_event_pk PRIMARY KEY ((tenant_id) HASH, event_ts DESC, event_id)
) WITH (COLOCATION = false) SPLIT INTO 12 TABLETS;</pre>
<p>Colocation is a strong YugabyteDB performance tuning lever, but know the limits before you adopt it: tablet splitting is disabled for colocated tables, metrics are reported only for the parent colocation tablet, and concurrent DDL and DML on different tables in the same colocated database may abort. Large tables should opt out with <code>WITH (COLOCATION = false)</code>.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My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va2U9IiNkY2RlZTQiIHN0cm9rZS13aWR0aD0iMSIvPjxyZWN0IHg9IjI0IiB5PSIzMzAuMjMiIHdpZHRoPSI2IiBoZWlnaHQ9IjYwIiByeD0iMyIgZmlsbD0iI2I4NWMwMCIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjAiLz48dGV4dCB4PSI0MCIgeT0iMzY1LjYiIGNsYXNzPSJhYiIgZm9udC1zaXplPSIxNSIgZmlsbD0iIzBhMTQyNCI+UHJlc3BsaXR0aW5nPC90ZXh0Pjx0ZXh0IHg9IjIwMiIgeT0iMzU2LjAiIGNsYXNzPSJhIiBmb250LXNpemU9IjE0Ij5rbm93biBzaXplIGFuZCBrZXkgZGlzdHJpYnV0aW9uPC90ZXh0Pjx0ZXh0IHg9IjIwMiIgeT0iMzc0LjUiIGNsYXNzPSJhIiBmb250LXNpemU9IjE0Ij5hdCBkYXkgb25lPC90ZXh0Pjx0ZXh0IHg9IjQ0MiIgeT0iMzU2LjAiIGNsYXNzPSJhIiBmb250LXNpemU9IjE0Ij53cm9uZyBzcGxpdCBwb2ludHMgc3RpbGwgc2tldzwvdGV4dD48dGV4dCB4PSI0NDIiIHk9IjM3NC41IiBjbGFzcz0iYSIgZm9udC1zaXplPSIxNCI+bG9hZDwvdGV4dD48dGV4dCB4PSI2NzQiIHk9IjM2NS4zIiBjbGFzcz0iYWIiIGZvbnQtc2l6ZT0iMTQiIGZpbGw9IiMwYTE0MjQiPlNQTElUIElOVE8gMjQgVEFCTEVUUzwvdGV4dD48L3N2Zz4=" width="900" height="408" alt="YugabyteDB performance data placement choices: hash sharding, range sharding, colocation and presplitting compared by best use, risk and syntax" loading="lazy"><figcaption>Figure 2. Data placement options. Choose them before any other YugabyteDB performance tuning step.</figcaption></figure>
<h2>Part 2: YugabyteDB performance tuning for query plans that respect the network</h2>
<h3>Tip 5: Make covering and partial indexes your default</h3>
<p>In YugabyteDB a secondary index is itself a distributed table. An Index Scan that must fetch columns from the base table issues a second set of RPCs, often to a different node. A covering index with <code>INCLUDE</code> turns it into an Index Only Scan, and a partial index with <code>WHERE</code> shrinks both the index and the write amplification on rows it excludes. The <a href="https://docs.yugabyte.com/stable/develop/best-practices-develop/data-modeling-perf/" target="_blank" rel="noopener">YSQL data modeling best practices</a> recommend both explicitly.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- YugabyteDB performance tuning, tip 5, covering and partial indexes.
-- Query: open orders of one customer, newest first, showing amount and status.
-- 1. Covering index: INCLUDE carries the selected columns, so YSQL can answer
--    from the index alone (Index Only Scan) with no second RPC to the table.
-- 2. Partial index: only 'OPEN' rows are indexed, so the index is smaller and
--    writes to closed orders never touch it.
CREATE INDEX customer_order_open_ix
    ON customer_order ((customer_id) HASH, created_at DESC)
    INCLUDE (amount, status)
    WHERE status = 'OPEN';

-- Range-friendly secondary index: ASC keeps neighbouring values together,
-- so "between two dates" is one ordered scan, not a fan-out to every tablet.
CREATE INDEX customer_created_ix
    ON customer (created_at ASC)
    INCLUDE (region_code);

-- Verify the plan uses the index alone.
EXPLAIN (ANALYZE, DIST, COSTS OFF)
SELECT created_at, amount, status
FROM customer_order
WHERE customer_id = 4242
  AND status = 'OPEN'
ORDER BY created_at DESC
LIMIT 20;</pre>
<h3>Tip 6: Read EXPLAIN (ANALYZE, DIST), not just EXPLAIN ANALYZE</h3>
<p>The <code>DIST</code> option adds the distributed counters that matter for YugabyteDB performance: Storage Read Requests (RPC round trips), Storage Rows Scanned, Storage Write Requests, Storage Flush Requests and Catalog Read Requests, each with execution time. The <a href="https://docs.yugabyte.com/stable/launch-and-manage/monitor-and-alert/query-tuning/explain-analyze/" target="_blank" rel="noopener">EXPLAIN ANALYZE guide</a> also distinguishes an <code>Index Cond</code>, applied while traversing the index, from a <code>Storage Filter</code>, applied by DocDB after rows are read.</p>
<pre><code class="language-text">-- YugabyteDB performance tuning, tip 6, reading EXPLAIN (ANALYZE, DIST).
-- Illustrative output shape (numbers are examples, not a benchmark):
 Limit (actual time=1.02..1.10 rows=20 loops=1)
   -&gt;  Index Only Scan using customer_order_open_ix on customer_order
         (actual time=1.01..1.08 rows=20 loops=1)
         Index Cond: (customer_id = 4242)
         Heap Fetches: 0
         Storage Index Read Requests: 1        &lt;- one RPC: good
         Storage Index Read Execution Time: 0.85 ms
         Storage Index Rows Scanned: 20        &lt;- rows scanned == rows returned: good
 Planning Time: 0.21 ms
 Execution Time: 1.25 ms
 Storage Read Requests: 1
 Storage Read Execution Time: 0.85 ms
 Storage Rows Scanned: 20
 Storage Write Requests: 0
 Catalog Read Requests: 0
 Catalog Write Requests: 0
 Storage Flush Requests: 0</code></pre>
<p>Our YugabyteDB performance tuning rule of thumb when reading a plan: rows scanned should be close to rows returned, and read requests should not grow with the row count. When either ratio is off, the fix is usually in Figure 3.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNTQwIiB3aWR0aD0iOTAwIiBoZWlnaHQ9IjU0MCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJZdWdhYnl0ZURCIHBlcmZvcm1hbmNlIHRyaWFnZSB3aXRoIEVYUExBSU4gKEFOQUxZWkUsIERJU1QpOiB3aGF0IGVhY2ggZGlzdHJpYnV0ZWQgY291bnRlciBtZWFucyBhbmQgdGhlIGZpeCBpdCBwb2ludHMgdG8iPjx0aXRsZT5ZdWdhYnl0ZURCIHBlcmZvcm1hbmNlIHRyaWFnZSB3aXRoIEVYUExBSU4gKEFOQUxZWkUsIERJU1QpOiB3aGF0IGVhY2ggZGlzdHJpYnV0ZWQgY291bnRlciBtZWFucyBhbmQgdGhlIGZpeCBpdCBwb2ludHMgdG88L3RpdGxlPjxkZWZzPjxtYXJrZXIgaWQ9ImFoIiBtYXJrZXJXaWR0aD0iOCIgbWFya2VySGVpZ2h0PSI4IiByZWZYPSI3IiByZWZZPSI0IiBvcmllbnQ9ImF1dG8iIG1hcm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GQgY2FjaGUgb24gbmV3IGNvbm5lY3Rpb25zPC90ZXh0Pjx0ZXh0IHg9IjU0OCIgeT0iNDg4LjAiIGNsYXNzPSJhYiIgZm9udC1zaXplPSIxNCIgZmlsbD0iIzBhMTQyNCI+cG9vbGluZywgQ29ubmVjdGlvbiBNYW5hZ2VyLCBwcmVwYXJlZDwvdGV4dD48dGV4dCB4PSI1NDgiIHk9IjUwNi41IiBjbGFzcz0iYWIiIGZvbnQtc2l6ZT0iMTQiIGZpbGw9IiMwYTE0MjQiPnN0YXRlbWVudHM8L3RleHQ+PC9zdmc+" width="900" height="540" alt="YugabyteDB performance triage table mapping EXPLAIN ANALYZE DIST counters such as Storage Read Requests, Storage Rows Scanned and Catalog Read Requests to their meaning and fix" loading="lazy"><figcaption>Figure 3. Each DIST counter points to a specific YugabyteDB performance tuning fix.</figcaption></figure>
<h3>Tip 7: Let batched nested loop joins collapse round trips</h3>
<p>A classic nested loop on a distributed database is an RPC storm: one inner lookup per outer row. The <a href="https://docs.yugabyte.com/stable/architecture/query-layer/join-strategies/" target="_blank" rel="noopener">YB Batched Nested Loop Join</a> gathers outer keys and pushes them to DocDB as a single <code>= ANY (ARRAY[...])</code> condition. The batch size is controlled by <code>yb_bnl_batch_size</code>, default 1024, and the feature by <code>yb_enable_batchednl</code>.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- YugabyteDB performance tuning, tip 7, batched nested loop join.
-- Batched nested loop join (BNL): YSQL collects up to yb_bnl_batch_size outer
-- keys and sends them to DocDB as ONE request: key = ANY (ARRAY[...]).
SHOW yb_enable_batchednl;     -- expect: on   (default in v2025.2+ / EPCM)
SHOW yb_bnl_batch_size;       -- expect: 1024 (default)

-- Session-level experiment only; change cluster-wide via ysql_pg_conf_csv
-- after measuring. Larger batches = fewer RPCs but bigger requests.
SET yb_bnl_batch_size = 1024;

EXPLAIN (ANALYZE, DIST, COSTS OFF)
SELECT c.customer_id, c.email, o.order_id, o.amount
FROM customer AS c
JOIN customer_order AS o
  ON o.customer_id = c.customer_id
WHERE c.region_code = 'IN-KA'
  AND o.created_at &gt;= now() - INTERVAL '1 day';

-- What to look for in the plan:
--   YB Batched Nested Loop Join
--     Join Filter: (o.customer_id = c.customer_id)
--     -&gt;  ... scan on customer c
--     -&gt;  Index Scan using customer_order_pk on customer_order o
--           Index Cond: (customer_id = ANY (ARRAY[c.customer_id, $1, $2, ..., $1023]))
-- "Storage Read Requests" on the inner side should be roughly
-- outer_rows / 1024, not outer_rows.</pre>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNDMwIiB3aWR0aD0iOTAwIiBoZWlnaHQ9IjQzMCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJZdWdhYnl0ZURCIGJhdGNoZWQgbmVzdGVkIGxvb3Agam9pbiBjb21wYXJlZCB3aXRoIGEgY2xhc3NpYyBuZXN0ZWQgbG9vcDogb25lIHN0b3JhZ2UgUlBDIHBlciBvdXRlciByb3cgdmVyc3VzIG9uZSBSUEMgcGVyIGJhdGNoIG9mIHVwIHRvIDEwMjQga2V5cyBjb250cm9sbGVkIGJ5IHliX2JubF9iYXRjaF9zaXplIj48dGl0bGU+WXVnYWJ5dGVEQiBiYXRjaGVkIG5lc3RlZCBsb29wIGpvaW4gY29tcGFyZWQgd2l0aCBhIGNsYXNzaWMgbmVzdGVkIGxvb3A6IG9uZSBzdG9yYWdlIFJQQyBwZXIgb3V0ZXIgcm93IHZlcnN1cyBvbmUgUlBDIHBlciBiYXRjaCBvZiB1cCB0byAxMDI0IGtleXMgY29udHJvbGxlZCBieSB5Yl9ibmxfYmF0Y2hfc2l6ZTwvdGl0bGU+PGRlZnM+PG1hcmtlciBpZD0iYWgiIG1hcmtlcldpZHRoPSI4IiBtYXJrZXJIZWlnaHQ9IjgiIHJlZlg9IjciIHJlZlk9IjQiIG9yaWVudD0iYXV0byIgbWF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W5kPSJ1cmwoI2FoKSIvPjxyZWN0IHg9IjU4NC4wIiB5PSIzMTYuMjMiIHdpZHRoPSIyNzQuMCIgaGVpZ2h0PSIzMCIgcng9IjYiIGZpbGw9IiNmNGY1ZjciIHN0cm9rZT0iI2RjZGVlNCIgc3Ryb2tlLXdpZHRoPSIxIi8+PHRleHQgeD0iNTk0LjAiIHk9IjMzNi4yIiBjbGFzcz0ibSIgZm9udC1zaXplPSIxMiIgZmlsbD0iIzBhMTQyNCI+aWQgPSBBTlkgKEFSUkFZWyQ0MDk3IC4uICQ1MDAwXSk8L3RleHQ+PHJlY3QgeD0iNDc4LjAiIHk9IjM2NC4yMyIgd2lkdGg9IjM4MC4wIiBoZWlnaHQ9IjM2IiByeD0iOCIgZmlsbD0iIzFmN2E0ZCIgc3Ryb2tlPSIjMWY3YTRkIiBzdHJva2Utd2lkdGg9IjEiLz48dGV4dCB4PSI2NjguMCIgeT0iMzg3LjIiIGNsYXNzPSJhYiIgZm9udC1zaXplPSIxNSIgZmlsbD0iI2ZmZmZmZiIgdGV4dC1hbmNob3I9Im1pZGRsZSI+NSBzdG9yYWdlIFJQQ3M8L3RleHQ+PC9zdmc+" width="900" height="430" alt="YugabyteDB performance comparison of a classic nested loop issuing one storage RPC per outer row versus the batched nested loop join sending batches of 1024 keys" loading="lazy"><figcaption>Figure 4. Illustrative: batching turns 5,000 storage RPCs into 5.</figcaption></figure>
<h3>Tip 8: Turn on the cost-based optimizer and feed it statistics</h3>
<p>The cost-based optimizer models YugabyteDB’s distributed costs, not just PostgreSQL’s disk model. Per the <a href="https://docs.yugabyte.com/stable/best-practices-operations/ysql-yb-enable-cbo/" target="_blank" rel="noopener">CBO best-practice guide</a>, <code>yb_enable_cbo=on</code> is the default from v2025.2 and also enables Auto Analyze, bitmap scans and parallel append on new universes. On clusters where tables have never been analyzed, run ANALYZE before switching the optimizer on, otherwise it plans with guesses.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- YugabyteDB performance tuning, tip 8, cost-based optimizer and statistics.
-- Cost-based optimizer: on by default for new universes from v2025.2.
SHOW yb_enable_cbo;           -- on | off | legacy_mode | legacy_stats_mode

-- The CBO is only as good as its statistics. After any bulk load,
-- large delete or schema change, refresh statistics explicitly:
ANALYZE customer;
ANALYZE customer_order;

-- Confirm the planner now sees realistic row counts and value distributions.
SELECT relname,
       reltuples::BIGINT AS estimated_rows
FROM pg_class
WHERE relname IN ('customer', 'customer_order');

SELECT attname,
       n_distinct,
       most_common_vals
FROM pg_stats
WHERE tablename = 'customer_order'
  AND attname IN ('status', 'customer_id');

-- Auto Analyze (yb-tserver flag ysql_enable_auto_analyze) keeps stats fresh
-- between manual runs once mutation thresholds are crossed.</pre>
<p>Yugabyte’s engineering team explains the cost model in depth in their <a href="https://www.yugabyte.com/blog/yugabytedb-cost-based-optimizer/" target="_blank" rel="noopener">cost-based optimizer deep dive</a>; it is worth reading before you start forcing plans with hints.</p>
<h2>Part 3: Writes, transactions and bulk work</h2>
<p>Write-path YugabyteDB performance tuning is about amortising the Raft round trip: fewer, larger, shorter-lived transactions.</p>
<h3>Tip 9: Batch writes and keep transactions single-shard where you can</h3>
<p>For YugabyteDB performance tuning on the write path, remember that a write is replicated through Raft before it is acknowledged, so the cost is dominated by round trips, not CPU. Multi-row INSERT, single-statement UPSERT with <code>ON CONFLICT</code>, and <code>RETURNING</code> instead of a follow-up SELECT all remove round trips. Yugabyte suggests starting at 128 rows per batch and measuring. A transaction touching a single row can use the fast single-shard path rather than the full distributed transaction protocol with its provisional records and status tablet.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- YugabyteDB performance tuning, tip 9, batched and single-shard writes.
-- 1. Multi-row INSERT: one statement, one batched write path.
--    Start at ~128 rows per batch and measure (Yugabyte guidance).
INSERT INTO device_event (bucket, created_at, device_id, event_type, reading)
VALUES (3, now(), 1003, 'temp', 21.4),
       (4, now(), 1004, 'temp', 22.1),
       (5, now(), 1005, 'temp', 19.8);
       -- ... up to ~128 rows

-- 2. Batch UPSERT in ONE statement instead of SELECT-then-UPDATE loops.
INSERT INTO customer (customer_id, email, region_code)
VALUES (4242, 'a@example.com', 'IN-KA'),
       (4243, 'b@example.com', 'US-CA')
ON CONFLICT ON CONSTRAINT customer_pk
DO UPDATE SET email       = EXCLUDED.email,
              region_code = EXCLUDED.region_code;

-- 3. Single-row transaction with RETURNING: one round trip, and YugabyteDB
--    can take the fast single-shard path instead of a distributed transaction.
UPDATE customer_order
SET status = 'SHIPPED'
WHERE customer_id = 4242
  AND created_at  = '2026-09-30 10:15:00+00'
  AND order_id    = 900017
RETURNING order_id, status;

-- 4. Sequences: cache values per session so each nextval() is not an RPC.
CREATE SEQUENCE order_id_seq CACHE 100;</pre>
<h3>Tip 10: Load with parallel COPY and ROWS_PER_TRANSACTION</h3>
<p>For bulk loads, the <a href="https://docs.yugabyte.com/stable/api/ysql/the-sql-language/statements/cmd_copy/" target="_blank" rel="noopener">YSQL COPY statement</a> adds YugabyteDB-specific options: <code>ROWS_PER_TRANSACTION</code> to commit in chunks, <code>DISABLE_FK_CHECK</code>, <code>REPLACE</code> and <code>SKIP</code> for resuming. The session default is <code>yb_default_copy_from_rows_per_transaction</code>. For load-time YugabyteDB performance tuning, splitting the input and running several COPY streams in parallel, ideally pre-sorted by primary key, keeps every tablet leader busy.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">#!/usr/bin/env bash
# YugabyteDB performance tuning, tip 10, parallel COPY bulk load.
# Parallel bulk load into YugabyteDB with COPY.
# Credentials come from the environment; never hardcode them.
set -euo pipefail
: "${YB_HOST:?}" "${YB_USER:?}" "${PGPASSWORD:?}"   # PGPASSWORD is read by ysqlsh

DB=saas_app
TABLE=usage_event

# Files pre-split (and ideally pre-sorted by primary key) into chunks:
#   usage_event_00.csv ... usage_event_07.csv
for f in /data/load/usage_event_*.csv; do
  ysqlsh -h "${YB_HOST}" -p 5433 -U "${YB_USER}" -d "${DB}" -v ON_ERROR_STOP=1 -c "
    COPY ${TABLE} (tenant_id, event_ts, event_id, metric, qty)
    FROM STDIN
    WITH (FORMAT csv,
          HEADER,
          ROWS_PER_TRANSACTION 20000,  -- commit in chunks: bounded memory, resumable
          DISABLE_FK_CHECK)            -- only if the source is already consistent
  " &lt; &quot;$f&quot; &amp;
done
wait

# Refresh optimizer statistics once the load completes.
ysqlsh -h &quot;${YB_HOST}&quot; -p 5433 -U &quot;${YB_USER}&quot; -d &quot;${DB}&quot; -c &quot;ANALYZE ${TABLE};&quot;</pre>
<h3>Tip 11: Parallelise large deletes and scans with yb_hash_code()</h3>
<p><code>yb_hash_code()</code> returns the same hash DocDB uses to place rows, and the planner pushes a range predicate on it down to DocDB, so a query touches only the tablets owning that hash slice. That makes it ideal for splitting a large purge or export across workers. For whole-table removal, TRUNCATE drops the underlying files and is far faster than DELETE, but it is not transactional or MVCC-safe, so treat it as a maintenance-window operation.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">#!/usr/bin/env bash
# YugabyteDB performance tuning, tip 11, hash-sliced parallel purge.
# DESTRUCTIVE: purge usage_event rows older than a cutoff, in parallel by
# hash-range slices using yb_hash_code(), so each worker hits a subset of tablets.
set -euo pipefail
: "${YB_HOST:?}" "${YB_USER:?}" "${PGPASSWORD:?}"
DB=saas_app
CUTOFF="2025-10-01"
PSQL=(ysqlsh -h "${YB_HOST}" -p 5433 -U "${YB_USER}" -d "${DB}" -At -v ON_ERROR_STOP=1)

# --- Verification BEFORE: how many rows will go, and how many stay?
TO_DELETE=$("${PSQL[@]}" -c "SELECT count(*) FROM usage_event WHERE event_ts = '${CUTOFF}';")
echo "Rows to delete: ${TO_DELETE}   Rows to keep: ${TO_KEEP}"

# --- Confirmation gate: an operator must type the exact phrase.
read -r -p "Type 'PURGE usage_event' to continue: " ANSWER
[[ "${ANSWER}" == "PURGE usage_event" ]] || { echo "Aborted."; exit 1; }

# --- 4 workers, each owning a quarter of the 0..65535 hash space.
#     Deleting in LIMIT-sized loops keeps each transaction small.
for lo in 0 16384 32768 49152; do
  hi=$((lo + 16383))
  (
    while :; do
      n=$("${PSQL[@]}" -c "
        WITH doomed AS (
          SELECT tenant_id, event_ts, event_id
          FROM usage_event
          WHERE yb_hash_code(tenant_id) BETWEEN ${lo} AND ${hi}
            AND event_ts &lt; &#039;${CUTOFF}&#039;
          LIMIT 5000)
        DELETE FROM usage_event u
        USING doomed d
        WHERE u.tenant_id = d.tenant_id
          AND u.event_ts  = d.event_ts
          AND u.event_id  = d.event_id;&quot; | awk &#039;{print $NF}&#039;)
      [[ &quot;${n}&quot; == &quot;0&quot; ]] &amp;&amp; break
    done
  ) &amp;
done
wait

# --- Validation AFTER: nothing older than the cutoff, and the kept count is unchanged.
LEFT_OLD=$(&quot;${PSQL[@]}&quot; -c &quot;SELECT count(*) FROM usage_event WHERE event_ts = '${CUTOFF}';")
echo "Remaining old rows: ${LEFT_OLD} (expect 0)   Kept rows: ${KEPT} (expect &gt;= ${TO_KEEP})"</pre>
<p>Note the shape of that script, because safe YugabyteDB performance tuning is also safe operations: a verification query before, an operator confirmation gate, small transactions, and a validation query after. Destructive maintenance on a production cluster should never be a one-liner.</p>
<h3>Tip 12: Use read committed with wait-on-conflict for contended OLTP</h3>
<p>Under the default fail-on-conflict policy, conflicting transactions are aborted using a wound-die scheme and retried, which shows up as unpredictable p99 latency on hot rows. With <a href="https://docs.yugabyte.com/stable/architecture/transactions/concurrency-control/" target="_blank" rel="noopener">wait-on-conflict</a> (<code>enable_wait_queues=true</code>), transactions queue behind the holder, with distributed deadlock detection. <a href="https://docs.yugabyte.com/stable/architecture/transactions/read-committed/" target="_blank" rel="noopener">Read committed</a> in YugabyteDB takes a consistent snapshot per statement and retries the statement internally on conflict, which removes most application-side retry code. Together they are a contention-focused YugabyteDB performance tuning pair.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell"># YugabyteDB performance tuning, tip 12, transaction flags.
# yb-tserver flags (set on every tserver; rolling restart required).
# Both are ON by default for new universes from v2025.2; verify on older clusters.
--yb_enable_read_committed_isolation=true   # real READ COMMITTED, not snapshot
--enable_wait_queues=true                   # wait-on-conflict + deadlock detection</pre>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- YugabyteDB performance tuning, tip 12, read committed in practice.
-- With wait-on-conflict, contending writers queue instead of aborting,
-- which flattens p99 latency under contention.
BEGIN ISOLATION LEVEL READ COMMITTED;
SELECT qty FROM inventory WHERE sku = 'SKU-778' FOR UPDATE;   -- waits, no abort storm
UPDATE inventory SET qty = qty - 1 WHERE sku = 'SKU-778';
COMMIT;

-- Long analytical scans and exports: a consistent snapshot that never
-- causes or suffers serialization conflicts with OLTP traffic.
BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY DEFERRABLE;
SELECT region_code, count(*) FROM customer GROUP BY region_code;
COMMIT;</pre>
<h2>Part 4: Connections, geography and observability</h2>
<p>The last group of Yugabyte performance optimization tips works outside the SQL text: how clients connect, where replicas live, and how you measure.</p>
<h3>Tip 13: Pool on the server with the YSQL Connection Manager</h3>
<p>Each YSQL connection is a PostgreSQL backend process with its own catalog cache, and a cold connection pays Catalog Read Requests to the YB-Master before it does useful work. The <a href="https://docs.yugabyte.com/stable/additional-features/connection-manager-ysql/ycm-setup/" target="_blank" rel="noopener">YSQL Connection Manager</a> is a built-in pooler on port 5433 that multiplexes many client connections onto fewer backends. Combine it with Yugabyte smart drivers, which load-balance across nodes and respect topology keys, and recycle client pools so new nodes receive traffic after scale-out.</p>
<pre><code class="language-properties"># YugabyteDB performance tuning, tip 13, connection pooling and smart drivers.
# --- YSQL Connection Manager (built-in pooler), yb-tserver flags ---
--enable_ysql_conn_mgr=true                    # default false; restart required
--ysql_conn_mgr_port=5433                      # clients keep connecting to 5433
--ysql_conn_mgr_max_client_connections=10000   # default 10000
--ysql_conn_mgr_idle_time=180                  # seconds, default 180

# --- Smart driver (YugabyteDB JDBC), cluster- and topology-aware ---
# Prefer us-east-1 nodes, fail over to us-east-2. Password via env/secret store.
jdbc:yugabytedb://${YB_HOST1}:5433,${YB_HOST2}:5433/saas_app?load-balance=true&amp;topology-keys=aws.us-east-1.*:1,aws.us-east-2.*:2

# HikariCP: recycle connections so new nodes receive traffic after scale-out.
maximumPoolSize=20
maxLifetime=1800000      # 30 min, ms
idleTimeout=300000       # 5 min, ms</code></pre>
<p>Watch for sticky connections: some session state, such as certain prepared statements and superuser sessions, pins a client to a backend and erodes the pooling benefit. We audit for that during YugabyteDB performance tuning engagements before sizing pools.</p>
<h3>Tip 14: Serve reads locally with follower reads and geo-partitioning</h3>
<p>In a multi-region cluster, the speed of light dominates YugabyteDB performance. <a href="https://docs.yugabyte.com/stable/explore/going-beyond-sql/follower-reads-ysql/" target="_blank" rel="noopener">Follower reads</a> let read-only transactions read from the nearest replica at a bounded staleness (default 30,000 ms; do not go below twice <code>raft_heartbeat_interval_ms</code>). For data that has a home region, <a href="https://docs.yugabyte.com/stable/explore/multi-region-deployments/row-level-geo-partitioning/" target="_blank" rel="noopener">row-level geo-partitioning</a> pins partitions, replicas and leaders to that region through tablespaces with <code>leader_preference</code>, making both reads and writes local.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- YugabyteDB performance tuning, tip 14, follower reads.
-- Follower reads: serve read-only traffic from the nearest replica,
-- trading bounded staleness for removing the hop to a remote leader.
SET yb_read_from_followers = true;          -- default: false
SET yb_follower_read_staleness_ms = 30000;  -- default: 30000 ms; keep &gt;= 2 x raft_heartbeat_interval_ms

-- Only READ ONLY transactions are eligible.
START TRANSACTION READ ONLY;
SELECT plan_name FROM plan WHERE plan_id = 3;
COMMIT;

-- Or for a whole reporting session / connection pool:
SET SESSION CHARACTERISTICS AS TRANSACTION READ ONLY;</pre>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- YugabyteDB performance tuning, tip 14, geo-partitioning with leader preference.
-- Row-level geo-partitioning: each region's rows, replicas and Raft
-- leaders stay in that region, so reads AND writes are in-region.
CREATE TABLESPACE ts_us_east WITH (replica_placement = '{
  "num_replicas": 3,
  "placement_blocks": [
    {"cloud":"aws","region":"us-east-1","zone":"us-east-1a","min_num_replicas":1,"leader_preference":1},
    {"cloud":"aws","region":"us-east-1","zone":"us-east-1b","min_num_replicas":1,"leader_preference":2},
    {"cloud":"aws","region":"us-east-1","zone":"us-east-1c","min_num_replicas":1}
  ]}');

CREATE TABLESPACE ts_ap_south WITH (replica_placement = '{
  "num_replicas": 3,
  "placement_blocks": [
    {"cloud":"aws","region":"ap-south-1","zone":"ap-south-1a","min_num_replicas":1,"leader_preference":1},
    {"cloud":"aws","region":"ap-south-1","zone":"ap-south-1b","min_num_replicas":1,"leader_preference":2},
    {"cloud":"aws","region":"ap-south-1","zone":"ap-south-1c","min_num_replicas":1}
  ]}');

CREATE TABLE payment (
    geo         TEXT           NOT NULL,
    payment_id  UUID           NOT NULL,
    amount      NUMERIC(12,2)  NOT NULL,
    created_at  TIMESTAMPTZ    NOT NULL DEFAULT now(),
    CONSTRAINT payment_pk PRIMARY KEY ((geo, payment_id) HASH)
) PARTITION BY LIST (geo);

CREATE TABLE payment_us PARTITION OF payment FOR VALUES IN ('US') TABLESPACE ts_us_east;
CREATE TABLE payment_in PARTITION OF payment FOR VALUES IN ('IN') TABLESPACE ts_ap_south;</pre>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNDA4IiB3aWR0aD0iOTAwIiBoZWlnaHQ9IjQwOCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJZdWdhYnl0ZURCIG11bHRpLXJlZ2lvbiBwZXJmb3JtYW5jZSBvcHRpb25zOiBsZWFkZXIgcHJlZmVyZW5jZSwgZm9sbG93ZXIgcmVhZHMsIHJvdy1sZXZlbCBnZW8tcGFydGl0aW9uaW5nIGFuZCByZWFkIHJlcGxpY2FzLCB3aXRoIHJlYWQgbGF0ZW5jeSwgd3JpdGUgbGF0ZW5jeSwgY29uc2lzdGVuY3kgYW5kIHdoZW4gdG8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YiIgZm9udC1zaXplPSIxNCIgZmlsbD0iIzBhMTQyNCI+cmVtb3RlIHJlYWQ8L3RleHQ+PHRleHQgeD0iNzI2IiB5PSIzNzQuNSIgY2xhc3M9ImFiIiBmb250LXNpemU9IjE0IiBmaWxsPSIjMGExNDI0Ij50cmFmZmljPC90ZXh0Pjwvc3ZnPg==" width="900" height="408" alt="YugabyteDB performance options for multi-region clusters: leader preference, follower reads, geo-partitioning and read replicas compared by read latency, write latency and consistency" loading="lazy"><figcaption>Figure 5. Multi-region choices and their latency and consistency trade-offs.</figcaption></figure>
<h3>Tip 15: Find the bottleneck with pg_stat_statements and Active Session History</h3>
<p>Measurement comes before every YugabyteDB performance tuning change. <code>pg_stat_statements</code> tells you which statements consume the time; <a href="https://docs.yugabyte.com/stable/launch-and-manage/monitor-and-alert/active-session-history-monitor/" target="_blank" rel="noopener">Active Session History</a> tells you what those sessions were waiting on, sampled every second across YSQL, the tserver, consensus and RocksDB layers. ASH is per node, so use the cluster-wide <code>gv$yb_active_session_history</code> view when the problem is not local.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- YugabyteDB performance tuning, tip 15, finding the bottleneck.
-- 1. Top statements by total time (pg_stat_statements ships with YSQL).
SELECT queryid,
       calls,
       round(total_exec_time::NUMERIC, 1)               AS total_ms,
       round((total_exec_time / calls)::NUMERIC, 2)     AS mean_ms,
       rows,
       left(query, 80)                                  AS query
FROM pg_stat_statements
ORDER BY total_exec_time DESC
LIMIT 10;

-- 2. Active Session History: what were sessions WAITING on in the last
--    10 minutes on this node? (ysql_yb_enable_ash, 1 s sampling by default)
SELECT wait_event_component,
       wait_event_class,
       wait_event,
       count(*)                AS samples
FROM yb_active_session_history
WHERE sample_time &gt; now() - INTERVAL '10 minutes'
GROUP BY wait_event_component, wait_event_class, wait_event
ORDER BY samples DESC
LIMIT 15;

-- 3. Tie waits back to statements: which query_ids burn the most samples?
SELECT ash.query_id,
       count(*)              AS samples,
       left(pss.query, 80)   AS query
FROM yb_active_session_history AS ash
LEFT JOIN pg_stat_statements AS pss
       ON pss.queryid = ash.query_id
WHERE ash.sample_time &gt; now() - INTERVAL '10 minutes'
GROUP BY ash.query_id, pss.query
ORDER BY samples DESC
LIMIT 10;</pre>
<p>Read ASH output through a YugabyteDB performance lens. If the top wait events are in consensus or RPC classes, look at placement and round trips (Parts 1 and 2). If they are in RocksDB or disk classes, look at block cache hit ratios, compaction and storage throughput.</p>
<h2>Storage-level YugabyteDB performance tuning: packed rows and the block cache</h2>
<p>Since v2.20, <a href="https://docs.yugabyte.com/stable/architecture/docdb/packed-rows/" target="_blank" rel="noopener">packed rows</a> are enabled by default for new YSQL universes: all non-key columns of a row are stored as one key-value pair instead of one pair per column. That lowers storage, speeds INSERTs on wide tables and makes multi-column reads fetch fewer pairs; Yugabyte reports about 2x faster sequential scans and bulk ingestion in their tests. Clusters upgraded from older releases should confirm <code>ysql_enable_packed_row</code> is on.</p>
<p>Because one block cache is shared by every tablet on a node, a single table that scans cold data can still compete with hot OLTP tables for memory. The cache is scan-resistant, but the cleanest YugabyteDB performance tuning fix remains the same as everywhere else in this guide: stop scanning what you do not need, with better keys and covering indexes.</p>
<h2>Configuration summary</h2>
<p>The YugabyteDB performance tuning parameters referenced in this guide, with documented defaults. Always confirm the exact server version first, because several defaults changed with v2025.2 and Enhanced PostgreSQL Compatibility Mode.</p>
<table>
<thead>
<tr>
<th>Parameter (scope)</th>
<th>Default</th>
<th>Proposed</th>
<th>Unit</th>
<th>Apply</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>yb_enable_cbo</code> (YSQL GUC)</td>
<td>on from v2025.2</td>
<td>on, after ANALYZE</td>
<td>enum</td>
<td>session / reconnect</td>
</tr>
<tr>
<td><code>yb_bnl_batch_size</code> (YSQL GUC)</td>
<td>1024</td>
<td>1024, test higher only with evidence</td>
<td>keys</td>
<td>session</td>
</tr>
<tr>
<td><code>yb_read_from_followers</code> (YSQL GUC)</td>
<td>false</td>
<td>true for read-only pools</td>
<td>bool</td>
<td>session</td>
</tr>
<tr>
<td><code>yb_follower_read_staleness_ms</code> (YSQL GUC)</td>
<td>30000</td>
<td>per business tolerance, ≥ 2× Raft heartbeat</td>
<td>ms</td>
<td>session</td>
</tr>
<tr>
<td><code>enable_ysql_conn_mgr</code> (yb-tserver)</td>
<td>false</td>
<td>true</td>
<td>bool</td>
<td>rolling restart</td>
</tr>
<tr>
<td><code>yb_enable_read_committed_isolation</code> (yb-tserver)</td>
<td>true for new v2025.2+ universes</td>
<td>true</td>
<td>bool</td>
<td>rolling restart</td>
</tr>
<tr>
<td><code>enable_wait_queues</code> (yb-tserver)</td>
<td>on in EPCM / v2025.2+ defaults</td>
<td>true</td>
<td>bool</td>
<td>rolling restart</td>
</tr>
<tr>
<td><code>ysql_enable_packed_row</code> (yb-tserver)</td>
<td>true for new universes since v2.20</td>
<td>true</td>
<td>bool</td>
<td>rolling restart</td>
</tr>
</tbody>
</table>
<h2>Yugabyte performance optimization checklist</h2>
<p>Use this list as the order of work for YugabyteDB performance tuning on any new cluster or incident.</p>
<ol>
<li>Confirm the version and which Enhanced PostgreSQL Compatibility Mode defaults are active.</li>
<li>Declare HASH or ASC/DESC on every primary key and index; fix monotonic hot keys with buckets.</li>
<li>Presplit large tables; colocate small ones; keep tablet counts proportional to nodes.</li>
<li>Run ANALYZE after loads and enable the cost-based optimizer.</li>
<li>Read every slow plan with EXPLAIN (ANALYZE, DIST) and chase Storage Read Requests and Rows Scanned.</li>
<li>Make hot queries Index Only Scans with INCLUDE and partial indexes; confirm batched nested loop joins.</li>
<li>Batch writes, prefer single-statement UPSERTs, and load with parallel COPY.</li>
<li>Enable read committed and wait-on-conflict for contended OLTP.</li>
<li>Pool with the YSQL Connection Manager and smart drivers.</li>
<li>Place leaders and data near users with leader preference, follower reads or geo-partitioning.</li>
<li>Track pg_stat_statements and Active Session History before and after every change.</li>
</ol>
<h2>How MinervaDB helps with YugabyteDB performance</h2>
<p>MinervaDB is a vendor-neutral database infrastructure company. Our engineers come from PostgreSQL, MySQL and storage-engine internals backgrounds, which maps directly onto YSQL and DocDB. A YugabyteDB performance tuning engagement starts with measurement, not opinion: we capture pg_stat_statements, Active Session History and EXPLAIN (ANALYZE, DIST) for the critical paths, then work through placement, plans, writes and connections in that order, staging every change with a rollback path.</p>
<p>We have supported more than 900 enterprises from 46 cities over 15+ years, with 24×7 consultative support targets of 15 minutes for Severity 1, 12 hours for Severity 2, 24 hours for Severity 3 and 48 hours for Severity 4. And because we are vendor-neutral, we will also tell you when a workload would be better served by PostgreSQL, ClickHouse or another engine.</p>
<h2>Frequently asked questions</h2>
<h3>What is the single biggest YugabyteDB performance tuning win?</h3>
<p>Reducing network round trips is the biggest Yugabyte performance optimization. Correct HASH or RANGE keys, covering indexes and batched nested loop joins usually cut Storage Read Requests far more than any flag change does.</p>
<h3>Should I use hash or range sharding in YugabyteDB?</h3>
<p>Use hash sharding for point lookups and evenly spread writes, and range sharding for range scans and ordered reads. A compound key that hashes on the entity and ranges on time often gives both.</p>
<h3>When should I use colocation?</h3>
<p>For databases with many small tables, typically under about 50 GB, and for database-per-tenant designs. Large or fast-growing tables should opt out with COLOCATION = false so they can be split.</p>
<h3>How do I see where a YSQL query spends its time?</h3>
<p>Run EXPLAIN (ANALYZE, DIST) to see storage read and write requests, rows scanned and catalog reads, and use pg_stat_statements and yb_active_session_history to find the costliest statements and their wait events.</p>
<h3>Do follower reads return stale data?</h3>
<p>Yes, within a bounded staleness set by yb_follower_read_staleness_ms, default 30,000 ms. They apply only to read-only transactions, so use them where slightly stale data is acceptable.</p>
<p><em>All SQL, flags and scripts in this post are illustrative and version-pinned to the YugabyteDB releases named. Test every change in a non-production environment first, confirm your exact server version, and maintain a robust disaster-recovery posture, including verified backups and rehearsed failover, before applying anything to production.</em></p>
<p><strong>Want a measured YugabyteDB performance review?</strong> <a href="https://minervadb.com/contact-minervadb-book-an-appointment/">Book a session with a MinervaDB principal architect</a>, or email contact@minervadb.com.</p></p>
<p><a href="https://minervadb.com/yugabytedb-performance-tuning/">YugabyteDB Performance Tuning: 15 Powerful, Proven Tips</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Foundation: TAF Now Supports Embedded Database Configuration in User Properties</title>
        <link>https://mariadb.org/mariadb-foundation-taf-now-supports-embedded-database-configuration-in-user-properties/</link>
        <pubDate>Thu, 01 Oct 2026 19:25:55 +0000</pubDate>
        <dc:creator>Jonathan Miller</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-foundation-taf-now-supports-embedded-database-configuration-in-user-properties/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>TAF: One File to Rule Them All<br />
In a one‑on‑one review of TAF with Monty Widenius, the creator of MySQL and MariaDB, he looked at me and said: “I want everything in one user file.” …<br />
Continue reading "MariaDB Foundation: TAF Now Supports Embedded Database Configuration in User Properties"<br />
MariaDB Foundation: TAF Now Supports Embedded Database Configuration in User Properties appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/mariadb-foundation-taf-now-supports-embedded-database-configuration-in-user-properties/">MariaDB Foundation: TAF Now Supports Embedded Database Configuration in User Properties</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>TAF: One File to Rule Them All<br />
In a one‑on‑one review of TAF with Monty Widenius, the creator of MySQL and MariaDB, he looked at me and said: “I want everything in one user file.” … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/mariadb-foundation-taf-now-supports-embedded-database-configuration-in-user-properties/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;MariaDB Foundation: TAF Now Supports Embedded Database Configuration in User Properties&#8221;</span></a></p>
<p><a href="https://mariadb.org/mariadb-foundation-taf-now-supports-embedded-database-configuration-in-user-properties/">MariaDB Foundation: TAF Now Supports Embedded Database Configuration in User Properties</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/mariadb-foundation-taf-now-supports-embedded-database-configuration-in-user-properties/">MariaDB Foundation: TAF Now Supports Embedded Database Configuration in User Properties</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Foundation Newsletter – October 2026</title>
        <link>https://mariadb.org/mariadb-foundation-newsletter-october-2026/</link>
        <pubDate>Thu, 01 Oct 2026 17:25:52 +0000</pubDate>
        <dc:creator>Simona Aleksandrova</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-foundation-newsletter-october-2026/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>September showed what an extensible MariaDB looks like in practice. A Magento report ran 63 times faster once its tables moved to the DuckDB storage engine, which now ships with MariaDB 13.0, Stable since 17 September. …<br />
Continue reading "MariaDB Foundation Newsletter – October 2026"<br />
MariaDB Foundation Newsletter – October 2026 appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/mariadb-foundation-newsletter-october-2026/">MariaDB Foundation Newsletter – October 2026</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>September showed what an extensible MariaDB looks like in practice. A Magento report ran 63 times faster once its tables moved to the DuckDB storage engine, which now ships with MariaDB 13.0, Stable since 17 September. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/mariadb-foundation-newsletter-october-2026/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;MariaDB Foundation Newsletter – October 2026&#8221;</span></a></p>
<p><a href="https://mariadb.org/mariadb-foundation-newsletter-october-2026/">MariaDB Foundation Newsletter – October 2026</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/mariadb-foundation-newsletter-october-2026/">MariaDB Foundation Newsletter – October 2026</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Full-Stack Data Strategy: 3 Proven Layers From MinervaDB</title>
        <link>https://minervadb.com/full-stack-data-strategy/</link>
        <pubDate>Thu, 01 Oct 2026 07:52:20 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/full-stack-data-strategy-3-proven-layers-from-minervadb/</guid>
        <source url="https://minervadb.com/">MinervaDB</source>
        <description><![CDATA[<p>How MinervaDB connects data strategy, governance and operations into one full-stack data strategy, from business outcomes and metrics to database-enforced governance and 24×7 operations. [...]</p>
<p><a href="https://minervadb.com/full-stack-data-strategy/">Full-Stack Data Strategy: 3 Proven Layers From MinervaDB</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Most organisations have a data strategy document, a governance policy and an operations team. Few have them connected. A <strong>full-stack data strategy</strong> from MinervaDB joins the three: business outcomes are traced to the metrics that measure them, the metrics to the data products that feed them, and those products to the pipelines, databases and operating practices that keep them correct, secure and affordable.</p>
<p>This post explains how we deliver a full-stack data strategy in practice: how we set direction, how governance is enforced in the database rather than in a wiki, and how operations keep the whole system reliable around the clock. Where a practice is clearest in code, we include the configuration or SQL we use.</p>
<h2>Why strategy, governance and operations fail when they are owned separately</h2>
<p>A strategy written without the operations team describes platforms nobody can run. Governance owned by a committee produces policies that no database enforces. Operations without strategy keep everything running with no sense of what matters most when two incidents arrive at once.</p>
<p>The symptoms are familiar: three definitions of revenue, sensitive columns readable by anyone with a reporting login, warehouse bills that grow faster than the business, and pipelines that fail quietly until a board report is wrong. A full-stack data strategy treats these as one problem with one owner.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNTUwIiB3aWR0aD0iOTAwIiBoZWlnaHQ9IjU1MCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJGdWxsLXN0YWNrIGRhdGEgc3RyYXRlZ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QgeD0iNzcxLjAiIHk9IjM5NC43IiBjbGFzcz0iYWIiIGZvbnQtc2l6ZT0iMTQiIGZpbGw9IiNmZmZmZmYiIHRleHQtYW5jaG9yPSJtaWRkbGUiPnJldGVudGlvbjwvdGV4dD48cmVjdCB4PSI2ODIiIHk9IjQxNC43MTAwMDAwMDAwMDAwNCIgd2lkdGg9IjE3OCIgaGVpZ2h0PSIzNCIgcng9IjYiIGZpbGw9IiMwZTI0NDAiIHN0cm9rZT0iIzIzMzk1YyIgc3Ryb2tlLXdpZHRoPSIxIi8+PHRleHQgeD0iNzcxLjAiIHk9IjQzNi43IiBjbGFzcz0iYWIiIGZvbnQtc2l6ZT0iMTQiIGZpbGw9IiNmZmZmZmYiIHRleHQtYW5jaG9yPSJtaWRkbGUiPnByaXZhY3kgYW5kIGF1ZGl0PC90ZXh0Pjwvc3ZnPg==" width="900" height="550" alt="Full-stack data strategy line of sight from business outcomes to metrics, data products, pipelines, platforms and operations, with governance across every layer" loading="lazy"><figcaption>Figure 1. The line of sight a full-stack data strategy creates, with governance applied at every layer rather than added at the end.</figcaption></figure>
<h2>Layer one: strategy that starts from decisions</h2>
<p>We start with decisions, not technology. Which decisions does the business make every day, week and quarter, which numbers inform them, and how much does a wrong number cost? That produces a metric tree: a small set of outcome metrics broken down into the drivers teams can act on, each with one definition and one owner.</p>
<p>From the metric tree we derive a portfolio of data products, the curated datasets that feed the metrics, and only then the platforms they need. A full-stack data strategy is vendor-neutral: transactional data may stay on PostgreSQL, SQL Server or Oracle, real-time analytics may belong on ClickHouse, and enterprise reporting on Snowflake, Databricks or BigQuery. We choose by workload, skills and total cost, and we say plainly when the current platform is already the right one.</p>
<p>Definitions only stay consistent when they live in code. A semantic layer turns the metric tree into one governed definition that every dashboard and notebook queries. The example follows the <a href="https://docs.getdbt.com/docs/build/about-metricflow" target="_blank" rel="noopener">dbt MetricFlow specification</a>.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml"># dbt 1.6+ with MetricFlow: one governed definition per number
semantic_models:
  - name: orders
    description: One row per completed order, net of returns.
    model: ref('fct_orders')
    defaults:
      agg_time_dimension: order_date
    entities:
      - name: order_id
        type: primary
      - name: customer_id
        type: foreign
    dimensions:
      - name: order_date
        type: time
        type_params:
          time_granularity: day
      - name: sales_channel
        type: categorical
    measures:
      - name: net_revenue
        agg: sum
        expr: net_amount
      - name: order_count
        agg: count
        expr: order_id

metrics:
  - name: net_revenue
    label: Net revenue
    description: Gross order value minus returns, discounts and tax. Owner - Finance.
    type: simple
    type_params:
      measure: net_revenue
  - name: order_count
    label: Orders
    type: simple
    type_params:
      measure: order_count
  - name: average_order_value
    label: Average order value
    description: Net revenue divided by completed orders. Owner - Commercial.
    type: ratio
    type_params:
      numerator: net_revenue
      denominator: order_count</pre>
<p>For organisations that need senior data leadership without a full-time hire, the strategy layer is often led through our <a href="https://minervadb.com/fractional-chief-data-officer/">Fractional Chief Data Officer</a> service, with the rest of the full-stack data strategy delivered by our engineering team. Our <a href="https://minervadb.com/data-strategy-and-analytics/">data strategy and analytics</a> practice covers the analytical side in more depth.</p>
<h2>Layer two: governance enforced in the database</h2>
<p>Governance that lives only in documents is advisory. In a full-stack data strategy, every policy has a mechanism: ownership is a named person per data product, classification is recorded in the database, access is granted through roles and masked views, quality is measured by checks that run on a schedule, and retention is enforced by the platform.</p>
<p>The first step is deciding who decides. We start from a decision-rights model and adapt it to the organisation, so that every recurring governance decision has exactly one accountable owner.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNTM4IiB3aWR0aD0iOTAwIiBoZWlnaHQ9IjUzOCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJEYXRhIGdvdmVybmFuY2UgZGVjaXNpb24gcmlnaHRzIG1vZGVsIHVzZWQgaW4gYSBNaW5lcnZhREIgZnVsbC1zdGFjayBkYXRhIHN0cmF0ZWd5OiB3aG8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0PSIzMiIgcng9IjYiIGZpbGw9IiNlOGYwZmYiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIwIi8+PHRleHQgeD0iNTU0LjAiIHk9IjUwNS4yIiBjbGFzcz0iYWIiIGZvbnQtc2l6ZT0iMTUiIGZpbGw9IiMwMDQzY2UiIHRleHQtYW5jaG9yPSJtaWRkbGUiPkM8L3RleHQ+PHJlY3QgeD0iNjYyLjgwMDAwMDAwMDAwMDEiIHk9IjQ4My4yMyIgd2lkdGg9IjQwIiBoZWlnaHQ9IjMyIiByeD0iNiIgZmlsbD0iIzBhMWEyZiIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjAiLz48dGV4dCB4PSI2ODIuOCIgeT0iNTA1LjIiIGNsYXNzPSJhYiIgZm9udC1zaXplPSIxNSIgZmlsbD0iI2ZmZmZmZiIgdGV4dC1hbmNob3I9Im1pZGRsZSI+QTwvdGV4dD48cmVjdCB4PSI3OTEuNiIgeT0iNDgzLjIzIiB3aWR0aD0iNDAiIGhlaWdodD0iMzIiIHJ4PSI2IiBmaWxsPSIjMGY2MmZlIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMCIvPjx0ZXh0IHg9IjgxMS42IiB5PSI1MDUuMiIgY2xhc3M9ImFiIiBmb250LXNpemU9IjE1IiBmaWxsPSIjZmZmZmZmIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIj5SPC90ZXh0Pjwvc3ZnPg==" width="900" height="538" alt="Data governance decision rights in a full-stack data strategy: accountable, responsible, consulted and informed roles for metrics, classification, access, quality, retention, platform change and incidents" loading="lazy"><figcaption>Figure 2. The decision-rights model a full-stack data strategy starts from. Every decision has one accountable owner.</figcaption></figure>
<p>Classification and access control then move into the database itself. The example below records the classification of each sensitive column, exposes a masked view to analysts, keeps the base table restricted, and verifies that no restricted column is readable by the analyst role.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- PostgreSQL 13+: classification recorded in the database and enforced by views and grants
CREATE SCHEMA IF NOT EXISTS governance;

CREATE TABLE governance.column_classification (
    table_schema    TEXT NOT NULL,
    table_name      TEXT NOT NULL,
    column_name     TEXT NOT NULL,
    classification  TEXT NOT NULL,
    data_owner      TEXT NOT NULL,
    classified_at   TIMESTAMPTZ NOT NULL DEFAULT now(),
    CONSTRAINT pk_column_classification PRIMARY KEY (table_schema, table_name, column_name),
    CONSTRAINT ck_column_classification_level
        CHECK (classification IN ('public', 'internal', 'confidential', 'restricted_pii'))
);

INSERT INTO governance.column_classification
       (table_schema, table_name, column_name, classification, data_owner)
VALUES ('crm', 'customer', 'email',        'restricted_pii', 'Head of CRM'),
       ('crm', 'customer', 'phone_number', 'restricted_pii', 'Head of CRM'),
       ('crm', 'customer', 'segment',      'internal',       'Head of CRM');

-- Analysts read a masked view; only the owner-approved role reads the base table
-- Default (owner-rights) view: analysts need no privilege on the base table itself
CREATE VIEW crm.v_customer_analytics AS
SELECT customer_id,
       segment,
       country_code,
       LEFT(email, 2) || '***@' || SPLIT_PART(email, '@', 2) AS email_masked,
       created_at
FROM crm.customer;

REVOKE ALL ON crm.customer FROM PUBLIC;
GRANT SELECT ON crm.v_customer_analytics TO role_analyst;
GRANT SELECT ON crm.customer             TO role_crm_operations;

-- Verify: no restricted column is readable by the analyst role
SELECT c.table_name, c.column_name, c.classification,
       has_column_privilege('role_analyst',
                            format('%I.%I', c.table_schema, c.table_name),
                            c.column_name, 'SELECT') AS analyst_can_read
FROM governance.column_classification AS c
WHERE c.classification = 'restricted_pii';</pre>
<p>The same pattern maps to other platforms: dynamic data masking and row-level security in SQL Server, Virtual Private Database and data redaction in Oracle, masking and row access policies in Snowflake, Unity Catalog in Databricks, and policy tags in BigQuery. A full-stack data strategy picks the native mechanism on each platform rather than a lowest-common-denominator layer on top. Our <a href="https://minervadb.com/data-governance-consulting/">data governance consulting</a> practice covers catalogs, lineage and stewardship in more detail.</p>
<h2>Data quality as a measured service</h2>
<p>Quality complaints usually arrive as opinions. In a full-stack data strategy, quality is a service level, measured on five dimensions and reported per data product, with a named data steward accountable for each.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNDU2IiB3aWR0aD0iOTAwIiBoZWlnaHQ9IjQ1NiIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJEYXRhIHF1YWxpdHkgZGltZW5zaW9ucyBpbiBhIGZ1bGwtc3RhY2sgZGF0YSBzdHJhdGVneTogZnJlc2huZXNzLCBjb21wbGV0ZW5lc3MsIHZhbGlkaXR5LCB1bmlxdWVuZXNzIGFuZCBjb25zaXN0ZW5jeSwgd2l0aCB0aGUgY2hlY2sgTWluZXJ2YURCIHJ1bnMgYW5kIGFuIGV4YW1wbGUgb2JqZWN0aXZlIGZvciBlYWNoIj48dGl0bGU+RGF0YSBxdWFsaXR5IGRpbWVuc2lvbnMgaW4gYSBmdWxsLXN0YWNrIGRhdGEgc3RyYXRlZ3k6IGZyZXNobmVzcywgY29tcGxldGVuZXNzLCB2YWxpZGl0eSwgdW5pcXVlbmVzcyBhbmQgY29uc2lzdGVuY3ksIHdpdGggdGhlIGNoZWNrIE1pbmVydmFEQiBydW5zIGFuZCBhbiBleGFtcGxlIG9iamVjdGl2ZSBmb3IgZWFjaDwvdGl0bGU+PGRlZnM+PG1hcmtlciBpZD0iYWgiIG1hcmtlcldpZHRoPSI4IiBtYXJrZXJIZWlnaHQ9IjgiIHJlZlg9IjciIHJlZlk9IjQiIG9yaWVudD0iYXV0byIgbWFya2VyVW5pdHM9InVzZXJTcGFjZU9uVXNlIj48cGF0aCBkPSJNMCwwIEw4LDQgTDAsOCB6IiBmaWxsPSIjNWI2NDcyIi8+PC9tYXJrZXI+PG1hcmtlciBpZD0iYWhiIiBtYXJrZXJXaWR0aD0iOCIgbWFya2VySGVpZ2h0PSI4IiByZWZYPSI3IiByZWZZPSI0IiBvcmllbnQ9ImF1dG8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TE0MjQiPnRvbGVyYW5jZTwvdGV4dD48L3N2Zz4=" width="900" height="456" alt="Data quality dimensions in a full-stack data strategy: freshness, completeness, validity, uniqueness and consistency, with checks and example objectives" loading="lazy"><figcaption>Figure 3. The five data quality dimensions a full-stack data strategy measures, with the check and an example objective for each.</figcaption></figure>
<p>Checks run as code after every load and write their results to a table, so pass rates become a trend rather than an anecdote. The example below covers freshness, completeness and uniqueness for an orders data product and reports a 28-day pass rate.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- PostgreSQL: data quality checks as code, results kept for SLO reporting
CREATE TABLE IF NOT EXISTS governance.dq_result (
    check_name   TEXT        NOT NULL,
    data_product TEXT        NOT NULL,
    dimension    TEXT        NOT NULL,
    passed       BOOLEAN     NOT NULL,
    observed     NUMERIC,
    threshold    NUMERIC,
    checked_at   TIMESTAMPTZ NOT NULL DEFAULT now()
);

INSERT INTO governance.dq_result (check_name, data_product, dimension, passed, observed, threshold)
-- Freshness: minutes since the last successful load
SELECT 'orders_freshness', 'orders', 'freshness',
       EXTRACT(EPOCH FROM now() - MAX(loaded_at)) / 60 = 0.995,
       AVG((customer_id IS NOT NULL)::INT), 0.995
FROM analytics.fct_orders
WHERE order_date = CURRENT_DATE - 1
UNION ALL
-- Uniqueness: duplicate business keys in the published table
SELECT 'orders_unique_key', 'orders', 'uniqueness',
       COUNT(*) = COUNT(DISTINCT order_id),
       COUNT(*) - COUNT(DISTINCT order_id), 0
FROM analytics.fct_orders;

-- Quality SLO per data product over 28 days
SELECT data_product,
       dimension,
       ROUND(100.0 * AVG(passed::INT), 2) AS pass_rate_pct
FROM governance.dq_result
WHERE checked_at &gt;= now() - INTERVAL '28 days'
GROUP BY data_product, dimension
ORDER BY pass_rate_pct;</pre>
<p>We describe the alerting side of this approach, including error budgets and burn-rate alerts for data pipelines, in our post on <a href="https://minervadb.com/data-quality-slos/">data quality SLOs</a>.</p>
<h2>Privacy, compliance and audit</h2>
<p>Regulation sets the floor for governance in any full-stack data strategy. GDPR, India&#8217;s DPDP Act, HIPAA, PCI DSS and SOX each impose obligations on what is collected, who may see it, how long it is kept and what evidence must exist. A full-stack data strategy maps each obligation to a control in the platform and to the evidence an auditor will ask for: access reviews, audit logs, retention jobs and data subject request handling.</p>
<p>Access reviews are the evidence auditors ask for most often, and the easiest to automate. The query below lists every role that can read a table holding restricted personal data, with the privileges it holds, ready for the data owner to approve or revoke each quarter.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- PostgreSQL: quarterly access review evidence for every table holding restricted data
SELECT c.table_schema,
       c.table_name,
       g.grantee,
       string_agg(DISTINCT g.privilege_type, ', ' ORDER BY g.privilege_type) AS privileges,
       r.rolcanlogin                                                         AS is_login_role,
       now()                                                                 AS reviewed_at
FROM (SELECT DISTINCT table_schema, table_name
      FROM governance.column_classification
      WHERE classification = 'restricted_pii') AS c
JOIN information_schema.role_table_grants AS g
  ON g.table_schema = c.table_schema
 AND g.table_name   = c.table_name
LEFT JOIN pg_roles AS r
  ON r.rolname = g.grantee
GROUP BY c.table_schema, c.table_name, g.grantee, r.rolcanlogin
ORDER BY c.table_schema, c.table_name, g.grantee;</pre>
<p>Output from this query is stored with the review decision, so a full-stack data strategy can show not only who has access today but who approved it and when. Equivalent reviews run on SQL Server, Oracle, Snowflake and BigQuery using their own catalog views.</p>
<p>Audit trails are shipped outside the database host, privileged access is just-in-time and recorded, and customer data never leaves the client&#8217;s environment or enters a third-party AI tool. Our <a href="https://minervadb.com/database-security-services/">database security services</a> provide the hardening and evidence layer underneath.</p>
<h2>Data products with owners and contracts</h2>
<p>A data product is a dataset someone is accountable for. In a full-stack data strategy each one has a named owner, a documented schema, published service levels for freshness and quality, and a list of consumers who are told before anything changes.</p>
<p>The contract between producer and consumer is explicit: which columns are guaranteed, what they mean, how late the data may arrive and how breaking changes are announced. Source teams then know which downstream reports depend on them, and analysts stop reverse-engineering tables that were never meant to be public.</p>
<h2>Lineage and safe change</h2>
<p>Lineage answers two questions every data team is asked during an incident: where did this number come from, and what breaks if we change this table? In a full-stack data strategy, lineage is captured from the tools that already move the data, such as dbt manifests, orchestrator metadata and warehouse query history, rather than drawn by hand.</p>
<p>Schema changes then follow the same discipline we apply to production databases: reviewed migrations, backward-compatible steps first, consumers notified through the contract, and a validation query after every deployment.</p>
<h2>Layer three: operations that keep the strategy true</h2>
<p>A strategy is only as good as the operations behind it. The operations layer of a full-stack data strategy runs pipelines and platforms against explicit service levels: freshness and availability objectives for data products, incident response with Severity 1 answered in 15 minutes, monthly governance reviews and quarterly restore and failover drills.</p>
<p>Cost belongs in operations too, and in a full-stack data strategy every cost line has an owner. Cloud warehouse spend tends to grow quietly with every new dashboard, so each workload gets a budget owner and a technical guardrail. On Snowflake that is a resource monitor; on BigQuery, reservations and per-project quotas; on Databricks, cluster policies and budget alerts.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- Snowflake: a cost guardrail per workload, agreed with the budget owner
CREATE OR REPLACE RESOURCE MONITOR rm_analytics_monthly
  WITH CREDIT_QUOTA = 500                  -- illustrative; set from the agreed budget
       FREQUENCY = MONTHLY
       START_TIMESTAMP = IMMEDIATELY
  TRIGGERS ON 75 PERCENT DO NOTIFY
           ON 90 PERCENT DO NOTIFY
           ON 100 PERCENT DO SUSPEND;      -- running queries finish, new ones wait

ALTER WAREHOUSE wh_analytics SET
  RESOURCE_MONITOR = rm_analytics_monthly
  AUTO_SUSPEND = 60;                       -- seconds idle before the warehouse suspends

-- Verify
SHOW RESOURCE MONITORS LIKE 'rm_analytics_monthly';
SHOW WAREHOUSES LIKE 'wh_analytics';</pre>
<p>Thresholds and actions are described in the <a href="https://docs.snowflake.com/en/user-guide/resource-monitors" target="_blank" rel="noopener">Snowflake resource monitor documentation</a>. Operations also close the loop back to strategy. Incidents, quality failures and cost overruns are reviewed against the metric tree, so the next quarter&#8217;s roadmap is driven by evidence from the platform rather than by whoever argues loudest.</p>
<h2>How a full-stack data strategy engagement runs</h2>
<p>Engagements follow the same arc whatever the starting point: assess what exists, lay the governance and platform foundations, scale the data products, then operate against agreed service levels.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNDMyIiB3aWR0aD0iOTAwIiBoZWlnaHQ9IjQzMiIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJGdWxsLXN0YWNrIGRhdGEgc3RyYXRlZ3kgZW5nYWdlbWVudCByb2FkbWFwIGZyb20gTWluZXJ2YURCOiBhc3Nlc3MsIGZvdW5kYXRpb24sIHNjYWxlIGFuZCBvcGVyYXRlIHBoYXNlcyB3aXRoIHRoZSBkZWxpdmVyYWJsZXMgb2YgZWFjaCI+PHRpdGxlPkZ1bGwtc3RhY2sgZGF0YSBzdHJhdGVneSBlbmdhZ2VtZW50IHJvYWRtYXAgZnJvbSBNaW5lcnZhREI6IGFzc2VzcywgZm91bmRhdGlvbiwgc2NhbGUgYW5kIG9wZXJhdGUgcGhhc2VzIHdpdGggdGhlIGRlbGl2ZXJhYmxlcyBvZiBlYWNoPC90aXRsZT48ZGVmcz48bWFya2VyIGlkPSJhaCIgbWFya2VyV2lkdGg9IjgiIG1hcmtlckhlaWdodD0iOCIgcmVmWD0iNyIgcmVmWT0iNCIgb3JpZW50PSJhdXRvIiBtYXJrZXJVbml0cz0idXNlclNwYWNlT25Vc2UiPjxwYXRoIGQ9Ik0wLDAgTDgsNCBMMCw4IHoiIGZpbGw9IiM1YjY0NzIiLz48L21hcmtlcj48bWFya2VyIGlkPSJhaGIiIG1hcmtlcldpZHRoPSI4IiBtYXJrZXJIZWlnaHQ9IjgiIHJlZlg9IjciIHJlZlk9IjQiIG9yaWVudD0iYXV0byIgbWFya2VyVW5pdHM9InVzZXJTcGFjZU9uVXNlIj48cGF0aCBkPSJNMCwwIEw4LDQgTDAsOCB6IiBmaWxsPSIjMGY2MmZlIi8+PC9tYXJrZXI+PC9kZWZzPjxzdHlsZT50ZXh0Om5v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5nPC90ZXh0PjxjaXJjbGUgY3g9IjQ4MC4wIiBjeT0iMzE4LjIzIiByPSIzLjUiIGZpbGw9IiMxZjdhNGQiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIi8+PHRleHQgeD0iNDkyLjAiIHk9IjMyMi4yIiBjbGFzcz0iYSIgZm9udC1zaXplPSIxNC41Ij4yNMOXNyBzdXBwb3J0LCBTMSBpbiAxNSBtaW51dGVzPC90ZXh0PjxjaXJjbGUgY3g9IjQ4MC4wIiBjeT0iMzQ3LjM3IiByPSIzLjUiIGZpbGw9IiMxZjdhNGQiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIi8+PHRleHQgeD0iNDkyLjAiIHk9IjM1MS40IiBjbGFzcz0iYSIgZm9udC1zaXplPSIxNC41Ij5tb250aGx5IGdvdmVybmFuY2UgcmV2aWV3PC90ZXh0PjxjaXJjbGUgY3g9IjQ4MC4wIiBjeT0iMzc2LjUxIiByPSIzLjUiIGZpbGw9IiMxZjdhNGQiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIi8+PHRleHQgeD0iNDkyLjAiIHk9IjM4MC41IiBjbGFzcz0iYSIgZm9udC1zaXplPSIxNC41Ij5xdWFydGVybHkgcm9hZG1hcCBhbmQgZHJpbGxzPC90ZXh0Pjwvc3ZnPg==" width="900" height="432" alt="Full-stack data strategy engagement roadmap: assess, foundation, scale and operate, with deliverables for each phase" loading="lazy"><figcaption>Figure 4. The typical shape of a full-stack data strategy engagement, from assessment to steady-state operations.</figcaption></figure>
<p>In a full-stack data strategy engagement, the assessment inventories systems, data, owners and risks, and produces the first metric tree. The foundation phase assigns decision rights, classifies sensitive data and puts access control into the database. The scale phase adds a semantic layer, lineage and quality checks as code, and cost guardrails. From then on the full-stack data strategy runs as an operating rhythm rather than a project.</p>
<h2>Measuring whether the strategy is working</h2>
<p>A full-stack data strategy is judged by indicators the business can see. We track a small set from the first month: the share of recurring decisions served by governed metrics, the quality pass rate per data product, the time it takes to approve and grant access, cost per data product and per thousand queries, and the number and duration of data incidents.</p>
<p>These indicators are reported to the sponsor monthly, alongside the roadmap. When one stalls, the cause is usually visible in the platform, and the full-stack data strategy makes it someone&#8217;s job to fix it.</p>
<h2>The platforms we cover</h2>
<p>Because the strategy is vendor-neutral, the platforms are whatever the business already runs or genuinely needs. We engineer and operate PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, Db2, MongoDB, ClickHouse, Redis and Valkey, and the managed and analytical services around them: Amazon RDS and Aurora, Azure SQL, Google Cloud SQL and AlloyDB, BigQuery, Redshift, Snowflake and Databricks. A full-stack data strategy is only credible if the same team can run every layer it designs.</p>
<h2>Why organisations choose MinervaDB for a full-stack data strategy</h2>
<ul>
<li><strong>One team from boardroom to database.</strong> Strategy, governance and operations are delivered by the same engineers, so nothing is lost between the deck and the platform.</li>
<li><strong>Governance with mechanisms.</strong> Every policy maps to a control in the database and to evidence an auditor can check.</li>
<li><strong>Vendor neutrality.</strong> We sell no licences, and we will recommend keeping a platform when it is the right one.</li>
<li><strong>Experience at scale.</strong> More than 900 enterprises, delivery from 46 cities, 15+ years of company depth and 200+ years of combined leadership experience.</li>
<li><strong>Response targets that hold.</strong> Severity 1 in 15 minutes, Severity 2 in 12 hours, Severity 3 in 24 hours and Severity 4 in 48 hours.</li>
</ul>
<h2>Frequently asked questions</h2>
<h3>What is a full-stack data strategy?</h3>
<p>It is a data strategy that covers every layer from business outcomes and metrics down to data products, pipelines, databases and day-to-day operations, with governance enforced at each layer rather than documented separately.</p>
<h3>How is it different from a data governance programme?</h3>
<p>A governance programme sets policies. A full-stack data strategy also decides which data products the business needs, which platforms run them, and how they are operated, and it implements governance as controls in those platforms.</p>
<h3>Which platforms does MinervaDB support?</h3>
<p>PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, Db2, MongoDB, ClickHouse, Redis and Valkey, plus Amazon RDS, Aurora, Azure SQL, Cloud SQL, AlloyDB, BigQuery, Redshift, Snowflake and Databricks.</p>
<h3>How long does it take to see results?</h3>
<p>The assessment typically completes in about four weeks, and foundations such as decision rights, classification and the first data products with SLOs usually land within the first three months, depending on the size of the estate.</p>
<p><em>The code in this post is illustrative and version-pinned. Test every change in a non-production environment first, verify backups by restoring them, and maintain a robust disaster-recovery posture before applying anything to production.</em></p>
<p><strong>Ready to connect strategy, governance and operations?</strong> <a href="https://minervadb.com/contact-minervadb-book-an-appointment/">Talk to a MinervaDB principal architect</a>, or email contact@minervadb.com.</p>
<p><a href="https://minervadb.com/full-stack-data-strategy/">Full-Stack Data Strategy: 3 Proven Layers From MinervaDB</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Database Reliability Engineering: 6 Proven Steps MinervaDB Runs on Every Engine</title>
        <link>https://minervadb.com/database-reliability-engineering/</link>
        <pubDate>Thu, 01 Oct 2026 06:01:59 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/database-reliability-engineering-6-proven-steps-minervadb-runs-on-every-engine/</guid>
        <source url="https://minervadb.com/">MinervaDB</source>
        <description><![CDATA[<p>How MinervaDB delivers database reliability engineering across PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, Db2, MongoDB, ClickHouse, Redis, Amazon RDS, Aurora, Cloud SQL, AlloyDB and BigQuery. [...]</p>
<p><a href="https://minervadb.com/database-reliability-engineering/">Database Reliability Engineering: 6 Proven Steps MinervaDB Runs on Every Engine</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><strong>Database reliability engineering</strong> is how we run data platforms at MinervaDB: service level objectives instead of gut feel, error budgets instead of endless change freezes, and automation instead of heroics. We apply the same discipline to <a href="https://minervadb.com/postgresql-consulting/">PostgreSQL</a>, <a href="https://minervadb.com/mysql-consulting/">MySQL</a>, <a href="https://minervadb.com/mariadb-remote-dba/">MariaDB</a>, <a href="https://minervadb.com/sql-server-support/">SQL Server</a>, <a href="https://minervadb.com/oracle-consulting/">Oracle</a>, <a href="https://minervadb.com/db2-consulting/">Db2</a>, <a href="https://minervadb.com/mongodb-consulting/">MongoDB</a>, <a href="https://minervadb.com/clickhouse-consulting/">ClickHouse</a> and <a href="https://minervadb.com/redis-support/">Redis</a>, and to the managed services our clients run on: Amazon RDS, Amazon Aurora, Google Cloud SQL, AlloyDB, Google BigQuery and Azure SQL.</p>
<p>This post explains how we deliver database reliability engineering in practice: how we choose objectives, where we read the truth on each engine, how alerts page people, how incidents close, and how backups, schema changes and failovers are proven rather than assumed. Where a practice is best shown in code, we include the configuration or SQL we use.</p>
<h2>What database reliability engineering means at MinervaDB</h2>
<p>Traditional database administration asks whether the server is up. Database reliability engineering asks whether the service is meeting the promise the business depends on, and how much room is left before it does not. The unit of work is not a server but a service: the orders database, the ledger, the analytics warehouse behind executive dashboards.</p>
<p>Four ideas from site reliability engineering do most of the work. Service level indicators measure what users experience. Service level objectives set the target. The error budget is the gap between perfect and the target, and it decides when reliability work outranks new features. Toil, the manual and repetitive work that scales with load, is treated as a defect to be engineered away.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNDgwIiB3aWR0aD0iOTAwIiBoZWlnaHQ9IjQ4MCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJEYXRhYmFzZSByZWxpYWJpbGl0eSBlbmdpbmVlcmluZyBsb29wIHVzZWQgYnkgTWluZXJ2YURCOiBkZWZpbmUgU0xPcywgaW5zdHJ1bWVudCwgZGV0ZWN0IHdpdGggYnVybi1yYXRlIGFsZXJ0cywgcmVzcG9uZCB3aXRoaW4gc2V2ZXJpdHkgdGFyZ2V0cywgbGVhcm4gdGhyb3VnaCBibGFtZWxlc3Mgcm9vdCBjYXVzZSBhbmFseXNpcyBhbmQgZW5naW5lZXIgYXdheSB0b2ls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WFya2VyLWVuZD0idXJsKCNhaCkiLz48bGluZSB4MT0iNzQ2LjAiIHkxPSIyMzkuNzEiIHgyPSI3NDYuMCIgeTI9IjMyNS43MTAwMDAwMDAwMDAwNCIgc3Ryb2tlPSIjMGY2MmZlIiBzdHJva2Utd2lkdGg9IjIuNSIgbWFya2VyLWVuZD0idXJsKCNhaCkiLz48bGluZSB4MT0iMTU0LjAiIHkxPSIzMjUuNzEwMDAwMDAwMDAwMDQiIHgyPSIxNTQuMCIgeTI9IjIzOS43MTAwMDAwMDAwMDAwNCIgc3Ryb2tlPSIjMGY2MmZlIiBzdHJva2Utd2lkdGg9IjIuNSIgbWFya2VyLWVuZD0idXJsKCNhaCkiLz48cmVjdCB4PSIxNzguMCIgeT0iMjU0LjcxIiB3aWR0aD0iNTQ0IiBoZWlnaHQ9IjU2IiByeD0iMTAiIGZpbGw9IiMwYTFhMmYiIHN0cm9rZT0iIzBhMWEyZiIgc3Ryb2tlLXdpZHRoPSIxIi8+PHRleHQgeD0iNDUwLjAiIHk9IjI3OC43IiBjbGFzcz0ibWIiIGZvbnQtc2l6ZT0iMTEuNSIgZmlsbD0iIzc4YTlmZiIgdGV4dC1hbmNob3I9Im1pZGRsZSI+RVJST1IgQlVER0VUPC90ZXh0Pjx0ZXh0IHg9IjQ1MC4wIiB5PSIyOTkuNyIgY2xhc3M9ImFiIiBmb250LXNpemU9IjE0IiBmaWxsPSIjZmZmZmZmIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIj5idWRnZXQgYnVybmluZzogZnJlZXplIHJpc2t5IGNoYW5nZSwgZnVuZCByZWxpYWJpbGl0eSB3b3JrPC90ZXh0Pjwvc3ZnPg==" width="900" height="480" alt="Database reliability engineering loop: define SLOs, instrument, detect, respond, learn and engineer, governed by an error budget" loading="lazy"><figcaption>Figure 1. The database reliability engineering loop we run for every engine and managed service.</figcaption></figure>
<h2>Step one: service level objectives that mean something</h2>
<p>An objective is only useful if someone would notice when it is missed. For a transactional database we usually define availability as the share of successful probe transactions, latency as a percentile of real query time for named critical statements, and durability as the achieved recovery point in restore drills. Analytical platforms add freshness: how far behind the source the data is allowed to fall.</p>
<p>We measure availability with a synthetic prober that performs a real read and a real write against each service, so a database that is up but refusing writes still counts as down. The rules below turn that probe into multi-window burn-rate alerts, the approach described in the <a href="https://sre.google/workbook/alerting-on-slos/" target="_blank" rel="noopener">Google SRE workbook</a>. A fast burn pages the on-call engineer; a slow burn opens a ticket.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml"># Prometheus 2.x rules: 99.9% availability SLO for one database service.
# db_probe_* counters come from our synthetic prober, which runs a real
# read and write transaction against the service every 10 seconds.
groups:
  - name: slo_orders_db
    rules:
      - record: slo:orders_db_probe_errors:ratio_rate5m
        expr: 1 - (sum(rate(db_probe_success_total{service="orders-db"}[5m]))
                 / sum(rate(db_probe_attempts_total{service="orders-db"}[5m])))
      - record: slo:orders_db_probe_errors:ratio_rate30m
        expr: 1 - (sum(rate(db_probe_success_total{service="orders-db"}[30m]))
                 / sum(rate(db_probe_attempts_total{service="orders-db"}[30m])))
      - record: slo:orders_db_probe_errors:ratio_rate1h
        expr: 1 - (sum(rate(db_probe_success_total{service="orders-db"}[1h]))
                 / sum(rate(db_probe_attempts_total{service="orders-db"}[1h])))
      - record: slo:orders_db_probe_errors:ratio_rate6h
        expr: 1 - (sum(rate(db_probe_success_total{service="orders-db"}[6h]))
                 / sum(rate(db_probe_attempts_total{service="orders-db"}[6h])))

      # Fast burn: 2% of a 30-day budget gone in one hour -&gt; page now
      - alert: OrdersDbErrorBudgetFastBurn
        expr: slo:orders_db_probe_errors:ratio_rate1h &gt; (14.4 * 0.001)
          and slo:orders_db_probe_errors:ratio_rate5m &gt; (14.4 * 0.001)
        labels:
          severity: S1
        annotations:
          runbook: https://runbooks.example.internal/orders-db/availability

      # Slow burn: 5% of the budget gone in six hours -&gt; ticket, same business day
      - alert: OrdersDbErrorBudgetSlowBurn
        expr: slo:orders_db_probe_errors:ratio_rate6h &gt; (6 * 0.001)
          and slo:orders_db_probe_errors:ratio_rate30m &gt; (6 * 0.001)
        labels:
          severity: S2</pre>
<p>Burn-rate alerting is the core of how database reliability engineering avoids alert fatigue. A one-minute CPU spike does not page anyone; a sustained error rate that would exhaust a month of budget in two days does.</p>
<h2>Step two: instrument every engine at the source</h2>
<p>Dashboards built only from host metrics show symptoms, not causes, which is why database reliability engineering is anchored in the engine itself. Database reliability engineering starts from the views each engine exposes about itself: where time goes, what is waiting, how far replicas are behind and how close the system is to a hard limit such as transaction ID wraparound or a full oplog window.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgODg4IiB3aWR0aD0iOTAwIiBoZWlnaHQ9Ijg4OCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJEYXRhYmFzZSByZWxpYWJpbGl0eSBlbmdpbmVlcmluZyB0ZWxlbWV0cnkgbWFwOiB3aGVyZSBNaW5lcnZhREIgcmVhZHMgdGhlIHRydXRoIGFuZCB3aGF0IGl0IGFsZXJ0cyBvbiBmb3IgUG9zdGdyZVNRTCwgTXlTUUwgYW5kIE1hcmlhREIsIFNRTCBTZXJ2ZXIsIE9yYWNsZSwgRGIyLCBNb25nb0RCLCBDbGlja0hvdXNlLCBSZWRpcyBhbmQgVmFsa2V5LCBBbWF6b24gUkRTIGFuZCBBdXJvcmEsIENsb3VkIFNRTCBhbmQgQWxsb3lEQiwgYW5kIEJpZ1F1ZXJ5Ij48dGl0bGU+RGF0YWJhc2UgcmVsaWFiaWxpdHkgZW5naW5lZXJpbmcgdGVsZW1ldHJ5IG1hcDogd2hlcmUgTWluZXJ2YURCIHJlYWRzIHRoZSB0cnV0aCBhbmQgd2hhdCBpdCBhbGVydHMgb24gZm9yIFBvc3RncmVTUUwsIE15U1FMIGFuZCBNYXJpYURCLCBTUUwgU2VydmVyLCBPcmFjbGUsIERiMiwgTW9uZ29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QiPmJpbGxlZDwvdGV4dD48L3N2Zz4=" width="900" height="888" alt="Database reliability engineering telemetry map for PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, Db2, MongoDB, ClickHouse, Redis, Amazon RDS, Aurora, Cloud SQL, AlloyDB and BigQuery" loading="lazy"><figcaption>Figure 2. Where database reliability engineering reads the truth on each engine and managed service, and what it alerts on.</figcaption></figure>
<p>Two details matter in practice. On Oracle, AWR and ASH require the Diagnostics Pack licence, so on unlicensed estates we use Statspack and V$ views instead. On Amazon RDS and Aurora, CloudWatch Database Insights is now the primary performance surface, and we pair it with engine views queried directly, because provider dashboards aggregate away the detail an incident needs.</p>
<h2>Step three: respond within the severity targets</h2>
<p>Every client engagement carries the same response targets: Severity 1 in 15 minutes around the clock, Severity 2 in 12 hours, Severity 3 in 24 hours and Severity 4 in 48 hours. A named engineer takes incident command, one person speaks to the client, and the first minutes go to collecting evidence before anything is changed.</p>
<p>Evidence disappears quickly: the blocking session ends, the long transaction commits, the replica catches up. So the alert itself triggers a read-only capture of the state that matters. This PostgreSQL example records active sessions, blocking chains and replication state into a timestamped folder.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">#!/usr/bin/env bash
# Read-only evidence capture, run automatically when a PostgreSQL alert fires.
# Credentials come from ~/.pgpass or ${PGPASSWORD}; nothing secret lives in this file.
set -euo pipefail
OUT="/var/lib/dre/evidence/$(date -u +%Y%m%dT%H%M%SZ)-${PGHOST}"
mkdir -p "${OUT}"
PSQL="psql -X -A -F, -h ${PGHOST} -U ${PG_USER} -d ${PG_DATABASE} -v ON_ERROR_STOP=1"

${PSQL} -c "SELECT now(), pg_is_in_recovery(), version();" &gt; "${OUT}/server.csv"

${PSQL} -c "SELECT pid, usename, state, wait_event_type, wait_event,
                   now() - xact_start  AS xact_age,
                   now() - query_start AS query_age,
                   LEFT(query, 200)    AS query_head
            FROM pg_stat_activity
            WHERE state  'idle'
            ORDER BY xact_start NULLS LAST;" &gt; "${OUT}/activity.csv"

${PSQL} -c "SELECT blocked.pid  AS blocked_pid,
                   blocking.pid AS blocking_pid,
                   LEFT(blocking.query, 200) AS blocking_query
            FROM pg_stat_activity AS blocked
            JOIN LATERAL unnest(pg_blocking_pids(blocked.pid)) AS b(pid) ON true
            JOIN pg_stat_activity AS blocking ON blocking.pid = b.pid;" &gt; "${OUT}/blocking.csv"

${PSQL} -c "SELECT application_name, state, sync_state, replay_lag
            FROM pg_stat_replication;" &gt; "${OUT}/replication.csv"

echo "evidence written to ${OUT}"</pre>
<p>Equivalent captures exist for each engine: performance_schema and InnoDB status for MySQL and MariaDB, DMV snapshots for SQL Server, ASH or V$ views for Oracle, MON_GET functions for Db2, $currentOp for MongoDB and system tables for ClickHouse. In database reliability engineering, the capture runs first and the fix second.</p>
<h2>Step four: learn from every incident</h2>
<p>In our database reliability engineering practice, every Severity 1 and Severity 2 incident closes with a written, blameless root cause analysis: a timeline, the trigger, the contributing conditions, why detection took as long as it did, and actions with owners and dates. Actions are tracked to closure in the same way as feature work, and the error budget shows whether they are paying off.</p>
<p>Patterns across incidents matter more than any single one. If three incidents in a quarter trace back to unbounded connection growth, the action is not a fourth runbook but pooling, timeouts and a capacity alert that fires weeks earlier.</p>
<h2>Step five: make change safe</h2>
<p>Many production incidents begin with a change: a deployment, a migration, a parameter edit. Database reliability engineering does not slow change down; it makes each change small, observable and reversible. For schema changes on PostgreSQL that means bounded lock waits, constraints added without a full-table lock, and indexes built concurrently.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- PostgreSQL 12+: a schema change that cannot stall production behind a lock queue
SET lock_timeout      = '3s';     -- give up rather than block every writer behind us
SET statement_timeout = '15min';

ALTER TABLE orders
    ADD COLUMN fulfilment_region TEXT;            -- metadata-only, no table rewrite

ALTER TABLE orders
    ADD CONSTRAINT ck_orders_fulfilment_region
    CHECK (fulfilment_region IN ('APAC', 'EMEA', 'AMER')) NOT VALID;   -- new rows only

-- Validates existing rows without blocking reads or writes
ALTER TABLE orders VALIDATE CONSTRAINT ck_orders_fulfilment_region;

-- Built without blocking writes (cannot run inside a transaction block)
CREATE INDEX CONCURRENTLY idx_orders_fulfilment_region
    ON orders (fulfilment_region, created_at);

-- Verify: the index is valid and the constraint is enforced
SELECT indexrelid::regclass AS index_name, indisvalid
FROM pg_index
WHERE indexrelid = 'idx_orders_fulfilment_region'::regclass;

SELECT conname, convalidated
FROM pg_constraint
WHERE conname = 'ck_orders_fulfilment_region';</pre>
<p>The same principles apply elsewhere: online DDL or gh-ost for MySQL, resumable index operations for SQL Server, rolling index builds in MongoDB, and <code>ON CLUSTER</code> changes in ClickHouse rolled out shard by shard. Every change has a verification query before and a validation query after.</p>
<h2>Step six: prove recovery with drills</h2>
<p>A backup that has never been restored is a hypothesis. We schedule restore drills, failover drills and region evacuations, measure the recovery time and recovery point actually achieved, and report the gap against the objective. Drills run in pre-production first and in production only where the safety nets are in place.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNDg2IiB3aWR0aD0iOTAwIiBoZWlnaHQ9IjQ4NiIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJEYXRhYmFzZSByZWxpYWJpbGl0eSBlbmdpbmVlcmluZyBmYWlsdXJlIGRyaWxsIG1hdHJpeDogcHJpbWFyeSBmYWlsb3ZlciwgcmVwbGljYSBsb3NzLCBiYWNrdXAgcmVzdG9yZSwgc3RvcmFnZSBleGhhdXN0aW9uLCByZWdpb24gZXZhY3VhdGlvbiBhbmQgYmFkIGNoYW5nZSByb2xsYmFjaywgd2l0aCB3aGF0IE1pbmVydmFEQiBpbmplY3RzLCBtZWFzdXJlcyBhbmQgaG93IG9mdGVuIj48dGl0bGU+RGF0YWJhc2UgcmVsaWFiaWxpdHkgZW5naW5lZXJpbmcgZmFpbHVyZSBkcmlsbCBtYXRyaXg6IHByaW1hcnkgZmFpbG92ZXIsIHJlcGxpY2EgbG9zcywgYm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wvdGV4dD48dGV4dCB4PSI0MCIgeT0iNDUzLjAiIGNsYXNzPSJhYiIgZm9udC1zaXplPSIxNC41IiBmaWxsPSIjMGExNDI0Ij5yb2xsYmFjazwvdGV4dD48dGV4dCB4PSIyMDgiIHk9IjQzNC4wIiBjbGFzcz0iYSIgZm9udC1zaXplPSIxNCI+c2hpcCBhIGRlbGliZXJhdGVseSBzbG93IHF1ZXJ5PC90ZXh0Pjx0ZXh0IHg9IjIwOCIgeT0iNDUyLjUiIGNsYXNzPSJhIiBmb250LXNpemU9IjE0Ij5vciBtaWdyYXRpb248L3RleHQ+PHRleHQgeD0iNDM0IiB5PSI0NDMuMyIgY2xhc3M9ImEiIGZvbnQtc2l6ZT0iMTQiPmRldGVjdGlvbiB0aW1lLCByb2xsYmFjayB0aW1lPC90ZXh0Pjx0ZXh0IHg9IjczMiIgeT0iNDQzLjMiIGNsYXNzPSJhYiIgZm9udC1zaXplPSIxNCIgZmlsbD0iIzBhMTQyNCI+cGVyIHJlbGVhc2UgdHJhaW48L3RleHQ+PC9zdmc+" width="900" height="486" alt="Database reliability engineering failure drill matrix: primary failover, replica loss, backup restore, storage exhaustion, region evacuation and bad change rollback" loading="lazy"><figcaption>Figure 3. The failure drills behind our database reliability engineering practice, with what we inject, measure and how often.</figcaption></figure>
<p>The restore drill below shows the guard rails we put on anything that writes to disk: an emptiness check, an explicit typed confirmation, a verification before and integrity checks after. It records the achieved recovery time as a number, not an impression.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">#!/usr/bin/env bash
# Quarterly restore drill, pgBackRest 2.x: restore the latest backup to an ISOLATED host
# and record the achieved RTO. Never run this against a production data directory.
set -euo pipefail
STANZA="${PG_STANZA}"
TARGET="/srv/drill/pgdata"

# Confirmation gate: the target must be empty and not belong to a running cluster
if [ -n "$(ls -A "${TARGET}" 2&gt;/dev/null)" ]; then
  echo "ABORT: ${TARGET} is not empty"; exit 1
fi
read -r -p "Restore stanza ${STANZA} into ${TARGET} on $(hostname)? Type RESTORE to continue: " ok
[ "${ok}" = "RESTORE" ] || { echo "aborted"; exit 1; }

pgbackrest --stanza="${STANZA}" info                     # verification before
start=$(date +%s)
pgbackrest --stanza="${STANZA}" --pg1-path="${TARGET}" --type=default restore
pg_ctl -D "${TARGET}" -o "-p 6543" -w start
end=$(date +%s)
echo "achieved RTO: $(( end - start )) seconds"

# Validation after: the restored cluster answers and its data is internally consistent
psql -p 6543 -d "${PG_DATABASE}" -c "SELECT pg_last_xact_replay_timestamp() AS recovered_to;"
psql -p 6543 -d "${PG_DATABASE}" -c "CREATE EXTENSION IF NOT EXISTS amcheck;"
psql -p 6543 -d "${PG_DATABASE}" -c "SELECT bt_index_check(c.oid)
    FROM pg_class AS c JOIN pg_am AS am ON am.oid = c.relam
    WHERE am.amname = 'btree' AND c.relkind = 'i' LIMIT 200;"</pre>
<h2>Database reliability engineering on Amazon RDS, Aurora, Cloud SQL, AlloyDB and BigQuery</h2>
<p>Managed services remove host work, not reliability engineering. The provider operates hardware, storage durability, minor version patching and the failover mechanism. Service level objectives, alerting, capacity, cost, query and schema health, and proof that backups restore remain the customer&#8217;s responsibility, and in our engagements they become ours.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNTgyIiB3aWR0aD0iOTAwIiBoZWlnaHQ9IjU4MiIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJEYXRhYmFzZSByZWxpYWJpbGl0eSBlbmdpbmVlcmluZyBvbiBtYW5hZ2VkIGNsb3VkIGRhdGFiYXNlczogd2hhdCB0aGUgcHJvdmlkZXIgb3BlcmF0ZXMgYW5kIHdoYXQgTWluZXJ2YURCIGVuZ2luZWVycyBvbiBBbWF6b24gUkRTLCBBdXJvcmEsIENsb3VkIFNRTCwgQWxsb3lEQiwgQmlnUXVlcnkgYW5kIEF6dXJlIFNRTCI+PHRpdGxlPkRhdGFiYXNl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I+QWNjZXNzIGFuZCBuZXR3b3JrPC90ZXh0Pjx0ZXh0IHg9IjI3NCIgeT0iNTQ4LjgiIGNsYXNzPSJhIiBmb250LXNpemU9IjE0Ij5jb250cm9scyBhdmFpbGFibGU8L3RleHQ+PHRleHQgeD0iNTU2IiB5PSI1NDguOCIgY2xhc3M9ImFiIiBmb250LXNpemU9IjE0IiBmaWxsPSIjMGExNDI0Ij5sZWFzdCBwcml2aWxlZ2UsIHByaXZhdGUgbmV0d29ya2luZywgYXVkaXQ8L3RleHQ+PC9zdmc+" width="900" height="582" alt="Database reliability engineering shared responsibility on Amazon RDS, Aurora, Cloud SQL, AlloyDB, BigQuery and Azure SQL" loading="lazy"><figcaption>Figure 4. What the cloud provider operates and what MinervaDB database reliability engineering adds on managed databases.</figcaption></figure>
<p>On Amazon RDS and Aurora we time failovers end to end, including application reconnects, and keep backup copies in a separate account. On Cloud SQL and AlloyDB we plan maintenance windows, watch Query Insights for plan regressions and test cross-region replicas. On BigQuery, reliability is about query latency and cost predictability, so we define objectives directly from job metadata.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- BigQuery: a daily latency SLI for an analytics workload, from INFORMATION_SCHEMA.JOBS
SELECT DATE(creation_time)                                              AS run_date,
       COUNT(*)                                                         AS queries,
       APPROX_QUANTILES(TIMESTAMP_DIFF(end_time, start_time, MILLISECOND), 100)[OFFSET(95)]
                                                                        AS p95_ms,
       COUNTIF(TIMESTAMP_DIFF(end_time, start_time, SECOND) = TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 28 DAY)
  AND job_type = 'QUERY'
  AND state    = 'DONE'
  AND error_result IS NULL
  AND EXISTS (SELECT 1 FROM UNNEST(labels) AS l WHERE l.key = 'workload' AND l.value = 'exec_dashboards')
GROUP BY run_date
ORDER BY run_date DESC;</pre>
<p>That query gives a daily p95 and the share of dashboard queries finishing within ten seconds, which becomes the latency SLI for an analytics service. Slot hours alongside it show whether meeting the objective is costing more each week.</p>
<h2>Capacity, toil and the engineering backlog</h2>
<p>Reliability problems that arrive with growth are predictable, and database reliability engineering treats capacity as an objective like any other. We forecast CPU, memory, storage, IOPS and connection headroom from measured trends, and raise capacity actions while there is still room to plan them. On managed services the same forecast covers instance classes, storage autoscaling limits, slot reservations and the cost of each step.</p>
<p>Toil is tracked as a number: hours per month of manual, repetitive operational work. When it grows, it becomes engineering work: automated failover checks, self-service read replicas, scripted user provisioning, alert auto-remediation for well-understood cases. Database reliability engineering exists to keep that number falling while the estate grows.</p>
<h2>How a database reliability engineering engagement starts</h2>
<p>Most engagements begin with a two-to-four-week baseline. We inventory every engine, version and managed service in the estate, map each one to the business services that depend on it, and record the current state of monitoring, backups, high availability and on-call. The output is a ranked list of reliability risks, each tied to the metric or configuration that shows it.</p>
<p>From that baseline we agree a first set of service level objectives with the people who own the business outcome, not only with the database team. Database reliability engineering only works when an objective has an owner who cares when it is missed.</p>
<p>The first quarter usually closes the largest gaps: an untested backup chain, a failover nobody has timed, alerts that page on noise. After that, database reliability engineering settles into a steady rhythm of monthly reviews, quarterly drills and an engineering backlog driven by the error budget.</p>
<h2>Why teams choose MinervaDB for database reliability engineering</h2>
<p>More than 900 enterprises work with MinervaDB. Clients cite the same reasons for choosing our database reliability engineering practice:</p>
<ul>
<li><strong>One practice across every engine and cloud.</strong> PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, Db2, MongoDB, ClickHouse, Redis and Valkey, plus Amazon RDS, Aurora, Cloud SQL, AlloyDB, BigQuery, Azure SQL, Snowflake and Databricks.</li>
<li><strong>Measured, not asserted.</strong> Every recommendation cites the metric or system view behind it, and every change has a verification before and after.</li>
<li><strong>Senior engineers.</strong> Principal-level engineers backed by 200+ years of combined leadership experience and 15+ years of company depth, delivering from 46 cities.</li>
<li><strong>Response targets that hold.</strong> Severity 1 in 15 minutes, Severity 2 in 12 hours, Severity 3 in 24 hours, Severity 4 in 48 hours, on every engine.</li>
<li><strong>Vendor neutrality.</strong> We sell no licences, so we will say when a managed service or engine is the wrong fit.</li>
</ul>
<p>Database reliability engineering is usually delivered alongside our <a href="https://minervadb.com/remote-dba-services/">remote DBA services</a> and <a href="https://minervadb.com/full-stack-database-infrastructure/">full-stack database infrastructure</a> practice, and complements an internal team rather than replacing it.</p>
<h2>Frequently asked questions</h2>
<h3>What is database reliability engineering?</h3>
<p>It applies site reliability engineering to data platforms: service level objectives, error budgets, engine-level observability, structured incident response, blameless root cause analysis, safe change and rehearsed recovery.</p>
<h3>How is database reliability engineering different from a remote DBA service?</h3>
<p>A remote DBA service keeps databases running and handles routine work. Database reliability engineering adds measurable objectives, error budgets and an engineering backlog that removes recurring incidents and toil. We usually deliver both together.</p>
<h3>Does database reliability engineering apply to Amazon RDS, Aurora, Cloud SQL and BigQuery?</h3>
<p>Yes. The provider operates the infrastructure, but objectives, alerting, capacity, cost, schema and query health, and proven recovery remain the customer&#8217;s responsibility, and that is where we work.</p>
<h3>What response times does MinervaDB commit to?</h3>
<p>Severity 1 in 15 minutes, 24×7×365; Severity 2 in 12 hours; Severity 3 in 24 hours; Severity 4 in 48 hours.</p>
<p><em>The configurations and scripts in this post are illustrative and version-pinned. Test every change in a non-production environment first, verify backups by restoring them, and maintain a robust disaster-recovery posture before applying anything to production.</em></p>
<p><strong>Ready to put database reliability engineering behind your data platform?</strong> <a href="https://minervadb.com/contact-minervadb-book-an-appointment/">Talk to a MinervaDB principal architect</a>, or email contact@minervadb.com.</p>
<p><a href="https://minervadb.com/database-reliability-engineering/">Database Reliability Engineering: 6 Proven Steps MinervaDB Runs on Every Engine</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Elestio joins MariaDB Foundation as a Silver Sponsor</title>
        <link>https://mariadb.org/elestio-joins-mariadb-foundation-as-a-silver-sponsor/</link>
        <pubDate>Thu, 01 Oct 2026 04:05:57 +0000</pubDate>
        <dc:creator>Anna Widenius</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/elestio-joins-mariadb-foundation-as-a-silver-sponsor/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB Foundation welcomes Elestio as a Silver Sponsor, supporting the open-source project behind its managed MariaDB offering.<br />
Elestio provides managed MariaDB with automated backups, monitoring and updates, allowing users to choose their cloud provider, region and resources. …<br />
Continue reading "Elestio joins MariaDB Foundation as a Silver Sponsor"<br />
Elestio joins MariaDB Foundation as a Silver Sponsor appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/elestio-joins-mariadb-foundation-as-a-silver-sponsor/">Elestio joins MariaDB Foundation as a Silver Sponsor</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Foundation welcomes <a href="https://mariadb.org/elestio-joins-mariadb-foundation-as-a-silver-sponsor/">Elestio</a> as a Silver Sponsor, supporting the open-source project behind <a href="https://mariadb.org/elestio-joins-mariadb-foundation-as-a-silver-sponsor/">its managed MariaDB offering</a>.<br />
Elestio provides managed MariaDB with automated backups, monitoring and updates, allowing users to choose their cloud provider, region and resources. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/elestio-joins-mariadb-foundation-as-a-silver-sponsor/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;Elestio joins MariaDB Foundation as a Silver Sponsor&#8221;</span></a></p>
<p><a href="https://mariadb.org/elestio-joins-mariadb-foundation-as-a-silver-sponsor/">Elestio joins MariaDB Foundation as a Silver Sponsor</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/elestio-joins-mariadb-foundation-as-a-silver-sponsor/">Elestio joins MariaDB Foundation as a Silver Sponsor</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>AWS and AMD bring 5th generation AMD EPYC processors to Amazon Aurora and Amazon RDS</title>
        <link>https://aws.amazon.com/blogs/database/aws-and-amd-bring-5th-generation-amd-epyc-processors-to-amazon-aurora-and-amazon-rds/</link>
        <pubDate>Wed, 30 Sep 2026 22:06:18 +0000</pubDate>
        <dc:creator>Anum Jang Sher</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/aws-and-amd-bring-5th-generation-amd-epyc-processors-to-amazon-aurora-and-amazon-rds/</guid>
        <source url="https://aws.amazon.com/blogs/database/">RDS for MariaDB – AWS Database Blog</source>
        <description><![CDATA[<p>AWS today announced the general availability of AMD-based R8a and M8a database instances for Amazon Aurora and Amazon RDS, powered by 5th generation AMD EPYC processors. R8a is a memory-optimized instance family available on both Aurora and RDS. M8a is a general-purpose instance family available on RDS.</p>
<p><a href="https://aws.amazon.com/blogs/database/aws-and-amd-bring-5th-generation-amd-epyc-processors-to-amazon-aurora-and-amazon-rds/">AWS and AMD bring 5th generation AMD EPYC processors to Amazon Aurora and Amazon RDS</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>AWS today announced the general availability of AMD-based <a target="_blank" href="https://aws.amazon.com/about-aws/whats-new/2026/09/aurora-rds-amd-r8a" rel="noopener">R8a</a> and <a target="_blank" href="https://aws.amazon.com/about-aws/whats-new/2026/09/aurora-rds-amd-m8a" rel="noopener">M8a</a> database instances for Amazon Aurora and Amazon RDS, powered by 5th generation AMD EPYC processors. R8a is a memory-optimized instance family available on both Aurora and RDS. M8a is a general-purpose instance family available on RDS. Both families expand the choice available for database workloads. Customers can opt for On-Demand or commit to a Database Savings Plan, which applies to both Aurora and RDS, for more control over their spend.</p>
<p>Each vCPU in an R8a or an M8a database instance corresponds to a physical CPU core rather than a hardware thread. For workloads with high I/O requirements, these instances provide up to 75 Gbps of network bandwidth and, on Amazon RDS, up to 60 Gbps of Amazon Elastic Block Store (Amazon EBS) bandwidth. Both families are built on the AWS Nitro System, which offloads I/O, virtualization, and security functions to dedicated hardware and underpins the isolation and security customers expect from a managed database.</p>
<blockquote>
<p><em>“Giving customers choice is central to how we build Aurora and RDS,” said Chad Verbowski, Vice President, Database Services, AWS. “We are excited to partner with AMD to add 5th generation AMD EPYC processor-based R8a and M8a instances, so customers can pick the instance family that fits each workload, on the engines they run today.”</em></p>
</blockquote>
<p>The Aurora and RDS teams worked closely with AMD to bring these families to both services across a range of database engines. We will continue giving customers more choice in how they run their databases.</p>
<blockquote>
<p><em>“Our collaboration with AWS has focused on optimizing the workloads that matter most to customers,” said Raghu Nambiar, Corporate Vice President, Datacenter Ecosystems and Application Engineering, Server BU, AMD. “Support for AMD EPYC processors with Amazon Aurora and Amazon RDS is an important milestone in our work, delivering the impressive CPU performance that AWS customers have come to expect from AWS and AMD.”</em></p>
</blockquote>
<p><strong>Getting started</strong></p>
<p>R8a is available on Aurora MySQL-Compatible Edition, Aurora PostgreSQL-Compatible Edition, and RDS for PostgreSQL, MySQL, and MariaDB. M8a is available on RDS for PostgreSQL, MySQL, and MariaDB.</p>
<p>You can start using R8a and M8a database instances the same way you launch any Aurora or RDS instance today, through the <a target="_blank" href="https://aws.amazon.com/blogs/database/aws-and-amd-bring-5th-generation-amd-epyc-processors-to-amazon-aurora-and-amazon-rds/console.aws.amazon.com/rds/home" rel="noopener">Amazon RDS console</a> or the <a target="_blank" href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.CreateInstance.html?refid=35100cff-4aaa-46ac-bc1d-71576bef47be#Aurora.CreateInstance.Creating" rel="noopener">AWS Command Line Interface</a> (CLI). The instance class names follow the familiar pattern, for example db.r8a.2xlarge for R8a and db.m8a.2xlarge for M8a.</p>
<p><strong>Using the Amazon RDS Console</strong></p>
<ol>
<li>Open the Amazon RDS console and choose Create database.</li>
<li>Select your engine: Aurora (MySQL-Compatible or PostgreSQL-Compatible) for R8a, or RDS for PostgreSQL, MySQL, or MariaDB for either R8a or M8a.</li>
<li>Under Instance configuration, choose the memory-optimized (R8a) or general-purpose (M8a) class and pick the size that matches your workload, such as db.r8a.4xlarge.</li>
<li>Complete the remaining steps and choose Create database.</li>
</ol>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-73718" src="https://d2908q01vomqb2.cloudfront.net/887309d048beef83ad3eabf2a79a64a389ab1c9f/2026/09/30/DBBLOG-5996-img1.png" alt="" width="1984" height="1312"></p>
<p>R8a and M8a are available at launch in US East (N. Virginia, Ohio), US West (Oregon), Asia Pacific (Tokyo), and Europe (Ireland, Frankfurt, Spain). R8a is additionally available in Canada (Central) and Asia Pacific (Taipei). M8a is additionally available in Asia Pacific (Mumbai, Hyderabad). Supported engine versions are listed in the <a target="_blank" href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.DBInstanceClass.SupportAurora.html?refid=35100cff-4aaa-46ac-bc1d-71576bef47be" rel="noopener">Aurora</a> and <a target="_blank" href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.Support.html?refid=35100cff-4aaa-46ac-bc1d-71576bef47be" rel="noopener">RDS</a> documentation. To learn about pricing for these instances, see <a target="_blank" href="https://aws.amazon.com/rds/aurora/pricing/" rel="noopener">Amazon Aurora pricing</a> and <a target="_blank" href="https://aws.amazon.com/rds/pricing/" rel="noopener">Amazon RDS pricing</a>.</p>
<hr>
<h2>About the authors</h2>
<footer>
<div class="blog-author-box">
<div class="blog-author-image">
   <img decoding="async" loading="lazy" class="alignnone size-full" src="https://d2908q01vomqb2.cloudfront.net/887309d048beef83ad3eabf2a79a64a389ab1c9f/2026/09/30/DBBLOG-5996-img2.png" alt="Anum Jang Sher" width="100" height="133">
  </div>
<h3 class="lb-h4">Anum Jang Sher</h3>
<p>Anum is a Senior Manager, Product Management on the Amazon Aurora team. She is passionate about building delightful customer experiences for scalable, cost-effective, and highly available database solutions. In her current role, she is committed to understanding customer needs and translating them into innovative features to enhance Amazon Aurora.</p>
</p></div>
<div class="blog-author-box">
<div class="blog-author-image">
   <img decoding="async" loading="lazy" class="alignnone size-full" src="https://d2908q01vomqb2.cloudfront.net/887309d048beef83ad3eabf2a79a64a389ab1c9f/2026/09/30/DBBLOG-5996-img3.png" alt="Lyle Welsh" width="100" height="133">
  </div>
<h3 class="lb-h4">Lyle Welsh</h3>
<p>Lyle is a Senior Sales Manager at AMD, supporting the company’s partnership with Amazon. His work centers on translating processor-level innovation into real-world price-performance gains for cloud customers. In his current role, he partners with AWS across product, engineering, and go-to-market to expand where and how customers can run on AMD EPYC-powered instances.</p>
</p></div>
</footer>
<p><a href="https://aws.amazon.com/blogs/database/aws-and-amd-bring-5th-generation-amd-epyc-processors-to-amazon-aurora-and-amazon-rds/">AWS and AMD bring 5th generation AMD EPYC processors to Amazon Aurora and Amazon RDS</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Database Infrastructure Partner: 7 Proven Industry Lessons</title>
        <link>https://minervadb.com/database-infrastructure-partner-industries/</link>
        <pubDate>Wed, 30 Sep 2026 20:25:20 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/database-infrastructure-partner-7-proven-industry-lessons/</guid>
        <source url="https://minervadb.com/">MinervaDB</source>
        <description><![CDATA[<p>Why BFSI, FinTech, retail, airlines, telecom and media, ISVs, government and SaaS companies choose MinervaDB as their database infrastructure partner across every major engine and cloud. [...]</p>
<p><a href="https://minervadb.com/database-infrastructure-partner-industries/">Database Infrastructure Partner: 7 Proven Industry Lessons</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Banks, retailers, airlines, telecom operators, software vendors, public-sector agencies and SaaS companies look different from the outside. Underneath, they share one uncomfortable fact: when the data tier stops, the business stops. That is why organisations in these industries choose a <strong>database infrastructure partner</strong> that owns architecture, engineering and 24×7 operations across <a href="https://minervadb.com/postgresql-consulting/">PostgreSQL</a>, <a href="https://minervadb.com/mysql-consulting/">MySQL</a>, <a href="https://minervadb.com/mariadb-remote-dba/">MariaDB</a>, <a href="https://minervadb.com/sql-server-support/">SQL Server</a>, <a href="https://minervadb.com/oracle-consulting/">Oracle</a>, <a href="https://minervadb.com/db2-consulting/">Db2</a>, <a href="https://minervadb.com/mongodb-consulting/">MongoDB</a>, <a href="https://minervadb.com/clickhouse-consulting/">ClickHouse</a>, <a href="https://minervadb.com/redis-support/">Redis</a> and every major cloud DBaaS, instead of stitching together one vendor per engine.</p>
<p>This post explains, industry by industry, what the database layer has to survive, which engineering decisions matter most, and why more than 900 enterprises work with MinervaDB as their database infrastructure partner. Where a design choice is best shown in code, we include the SQL or configuration we would actually use.</p>
<h2>What seven very different industries have in common</h2>
<p>Every estate a database infrastructure partner is asked to take over is polyglot. A core system of record on Oracle, Db2 or SQL Server, newer services on PostgreSQL or MySQL, a document store, a Redis or Valkey cache, an analytical engine and at least one managed cloud database service is the normal shape, not the exception. What changes by industry is the constraint that decides the design: correctness in a ledger, contention on a hot inventory row, a booking system with no maintenance window, or the cost of keeping a year of call detail records online.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNzAxIiB3aWR0aD0iOTAwIiBoZWlnaHQ9IjcwMSIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJEYXRhYmFzZSBpbmZyYXN0cnVjdHVyZSBwYXJ0bmVyIGluZHVzdHJ5IG1hcDogdGhlIHN5c3RlbXMgdGhhdCBjYW5ub3QgZmFpbCwgdGhlIGVuZ2luZXMgdHlwaWNhbGx5IGVuZ2luZWVyZWQgYW5kIHRoZSBjb25zdHJhaW50IHRoYXQgZGVjaWRlcyB0aGUgZGVzaWduIGZvciBCRlNJIGFuZCBGaW5UZWNoLCByZXRhaWwsIGFpcmxpbmVzLCB0ZWxlY29tIGFuZCBtZWRpYSwgSVNWcywgZ292ZXJubWVudCBhbmQgU2FhUyI+PHRpdGxlPkRhdGFiYXNlIGluZnJhc3RydWN0dXJlIHBhcnRuZXIgaW5kdXN0cn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D0iIzBhMTQyNCI+bm9pc3ktbmVpZ2hib3VyIGlzb2xhdGlvbjwvdGV4dD48L3N2Zz4=" width="900" height="701" alt="Database infrastructure partner industry map for BFSI, retail, airlines, telecom and media, ISVs, government and SaaS" loading="lazy"><figcaption>Figure 1. The systems that cannot fail in each industry, the engines typically involved and the constraint a database infrastructure partner has to design around. Typical patterns, not claims about specific clients.</figcaption></figure>
<p>A database infrastructure partner earns its place by knowing those constraints before the first workshop, and by carrying the same engineering discipline across every engine in the estate. The sections below take each industry in turn.</p>
<h2>BFSI and FinTech: correctness is the product</h2>
<p>In banking, payments and insurance, a fast database that is occasionally wrong is worthless. Core ledgers still run on Oracle, Db2 for z/OS and SQL Server; new payment, lending and wallet platforms increasingly run on PostgreSQL. Both need the same guarantees: no double posting when a client retries, no unbalanced journal, and an audit trail that satisfies PCI DSS, SOX and the local regulator.</p>
<p>As a database infrastructure partner we push those guarantees into the database rather than trusting every application path to get them right. The pattern below makes a retried API call a no-op through an idempotency key, and uses a deferred constraint trigger so a journal whose postings do not sum to zero per currency cannot commit.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- PostgreSQL 14+: idempotent postings with a balanced-journal guarantee
CREATE TABLE ledger_journal (
    journal_id       BIGINT GENERATED ALWAYS AS IDENTITY,
    idempotency_key  UUID        NOT NULL,
    created_at       TIMESTAMPTZ NOT NULL DEFAULT now(),
    CONSTRAINT pk_ledger_journal PRIMARY KEY (journal_id),
    CONSTRAINT uq_ledger_journal_idem UNIQUE (idempotency_key)
);

CREATE TABLE ledger_posting (
    posting_id    BIGINT GENERATED ALWAYS AS IDENTITY,
    journal_id    BIGINT  NOT NULL,
    account_id    BIGINT  NOT NULL,
    amount_minor  BIGINT  NOT NULL,          -- signed, in minor currency units
    currency      CHAR(3) NOT NULL,
    CONSTRAINT pk_ledger_posting PRIMARY KEY (posting_id),
    CONSTRAINT fk_ledger_posting_journal FOREIGN KEY (journal_id)
        REFERENCES ledger_journal (journal_id),
    CONSTRAINT ck_ledger_posting_nonzero CHECK (amount_minor  0)
);
CREATE INDEX idx_ledger_posting_journal ON ledger_posting (journal_id);

CREATE FUNCTION fn_assert_journal_balanced() RETURNS trigger
LANGUAGE plpgsql AS $$
BEGIN
    IF EXISTS (
        SELECT 1
        FROM ledger_posting
        WHERE journal_id = NEW.journal_id
        GROUP BY currency
        HAVING SUM(amount_minor)  0
    ) THEN
        RAISE EXCEPTION 'journal % is not balanced', NEW.journal_id;
    END IF;
    RETURN NULL;
END;
$$;

-- Checked at COMMIT, so a journal may be built row by row inside one transaction
CREATE CONSTRAINT TRIGGER trg_ledger_posting_balanced
    AFTER INSERT OR UPDATE ON ledger_posting
    DEFERRABLE INITIALLY DEFERRED
    FOR EACH ROW EXECUTE FUNCTION fn_assert_journal_balanced();

-- A retried API call reuses its idempotency key and becomes a no-op
BEGIN;
INSERT INTO ledger_journal (idempotency_key)
VALUES ('6f1c0f7e-3a41-4d8e-9d5b-1f2a7c9e0b11')
ON CONFLICT ON CONSTRAINT uq_ledger_journal_idem DO NOTHING
RETURNING journal_id;            -- no row back means already posted: stop here
-- INSERT the debit and credit postings for the returned journal_id
COMMIT;                          -- the deferred trigger rejects an unbalanced journal</pre>
<p>The same thinking applies on the legacy side: Data Guard and RMAN for Oracle, HADR for Db2 and Always On availability groups for SQL Server, each designed to a stated recovery point and proven in drills. For a BFSI team, a database infrastructure partner has to be fluent in both worlds, because the modern platform and the core it replaces run side by side for years. Constraint triggers are documented in the <a href="https://www.postgresql.org/docs/current/sql-createtrigger.html" target="_blank" rel="noopener">PostgreSQL CREATE TRIGGER reference</a>.</p>
<h2>Retail and e-commerce: peak day decides everything</h2>
<p>Retail data platforms are sized for the few hours a year that matter most: a festival sale, a product launch, a flash promotion. The failure is rarely total. It is lock queues on a handful of hot inventory rows, a connection pool that saturates, or an analytics query that lands on the primary at the worst moment.</p>
<p>A database infrastructure partner for retail starts with the database mechanics. Two MySQL 8.0 features remove whole classes of peak-day incidents: <code>SKIP LOCKED</code> for work queues, and conditional updates that make overselling impossible without an application-side lock.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- MySQL 8.0+: hand pick tasks to warehouse workers without queueing on row locks
ALTER TABLE fulfilment_task
    ADD INDEX idx_fulfilment_task_ready (warehouse_id, status, priority, created_at);

START TRANSACTION;
SELECT task_id, order_id, sku_id
FROM fulfilment_task
WHERE warehouse_id = 17
  AND status = 'READY'
ORDER BY priority DESC, created_at
LIMIT 10
FOR UPDATE SKIP LOCKED;          -- rows locked by other workers are skipped, not waited on

UPDATE fulfilment_task
SET status = 'CLAIMED',
    claimed_by = 'worker-42',
    claimed_at = NOW(6)
WHERE task_id IN (/* task_id values returned above */);
COMMIT;

-- Stock decrement that can never go negative under concurrency
UPDATE inventory
SET available_qty = available_qty - 1
WHERE sku_id = 884120
  AND warehouse_id = 17
  AND available_qty &gt;= 1;
SELECT ROW_COUNT();              -- 0 means sold out: tell the customer now, not at payment</pre>
<p>Around that core sit a Redis or Valkey tier for sessions and carts, MongoDB for flexible catalogs and ClickHouse for real-time merchandising analytics. As a database infrastructure partner we load-test that whole path before the event, not only the database in isolation, because the bottleneck is often the pool or the cache eviction policy rather than the engine.</p>
<h2>Airlines: no maintenance window, ever</h2>
<p>Reservations, seat inventory, departure control and loyalty run around the clock in every time zone. Availability searches fan out into very large read volumes for every booking that completes, so caches and read replicas carry most of the load while a small set of transactional systems must never lose a write. Much of this estate still runs on Db2 for z/OS and Oracle, with Cassandra, Redis and PostgreSQL around it.</p>
<p>For airline operations the priorities a database infrastructure partner brings are online change and rehearsed failover: online schema change, rolling patching, replication topologies that let a site be taken out of service without downtime, and change data capture that offloads reporting and analytics from the mainframe without a big-bang rewrite. A database infrastructure partner for an airline has to be comfortable on the mainframe and in the cloud on the same day.</p>
<h2>Telecom, media and entertainment: volume and retention</h2>
<p>Operators generate call and data records, network counters and probe data at a scale where retention cost dominates the design. Media and streaming platforms add catalog, entitlement and playback telemetry. ClickHouse is our usual answer for the analytical side, with Cassandra or MongoDB for serving and Kafka for transport. Our ClickHouse work is delivered with our sister company <a href="https://chistadata.com/" target="_blank" rel="noopener">ChistaDATA</a>.</p>
<p>For a telecom or media database infrastructure partner, the design question is how long each byte stays on fast storage. Tiered TTL moves older parts to object storage automatically and deletes them at the end of the retention period.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- ClickHouse 24.8 LTS+: CDR ingest with hot local disk and cold object storage.
-- Assumes a storage policy 'hot_to_s3' with volumes 'hot' and 'cold' in the server config.
CREATE TABLE cdr_events ON CLUSTER telco
(
    event_time   DateTime64(3, 'UTC'),
    event_date   Date MATERIALIZED toDate(event_time),
    msisdn_hash  UInt64,
    cell_id      UInt32,
    event_type   LowCardinality(String),
    duration_ms  UInt32,
    bytes_up     UInt64,
    bytes_down   UInt64
)
ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/cdr_events', '{replica}')
PARTITION BY toYYYYMM(event_date)
ORDER BY (event_type, cell_id, event_time)
TTL event_date + INTERVAL 30 DAY TO VOLUME 'cold',
    event_date + INTERVAL 400 DAY DELETE
SETTINGS storage_policy = 'hot_to_s3',
         index_granularity = 8192;

-- Verify where the data actually lives
SELECT disk_name,
       count()                                AS active_parts,
       formatReadableSize(sum(bytes_on_disk)) AS size_on_disk
FROM system.parts
WHERE database = currentDatabase()
  AND table = 'cdr_events'
  AND active
GROUP BY disk_name;</pre>
<p>The sort key, partition size and TTL policy together decide both query latency and the storage bill, so we validate them against real query patterns before production. The mechanics are described in the <a href="https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree" target="_blank" rel="noopener">MergeTree documentation</a>.</p>
<h2>ISVs: your database runs in your customers&#8217; data centres</h2>
<p>Independent software vendors face a problem most enterprises do not: the product database runs in hundreds of customer environments, on versions and engines the ISV does not control. Support tickets arrive as &#8220;the application is slow&#8221; from an estate nobody on the vendor&#8217;s team has seen.</p>
<p>ISVs work with a database infrastructure partner for three things: a certification matrix of engines and versions that is actually tested; runbooks and diagnostics that customer DBAs can run; and escalation engineers who can read a PostgreSQL, SQL Server, Oracle or MySQL execution plan from an unfamiliar estate and find the cause quickly.</p>
<p>We also help ISVs retire engines from their matrix when the support cost no longer matches the revenue.</p>
<p>We also review how the product creates schemas, manages connections, handles time zones and character sets, and runs its own upgrade scripts inside customer estates, because those behaviours sit behind many of the escalations we see. Fixing them once in the product is far cheaper than fixing them ticket by ticket.</p>
<h2>Government and the public sector: sovereignty and audit</h2>
<p>Citizen registries, tax, benefits and records systems carry the strictest requirements on data residency, auditability and procurement neutrality. Many agencies are moving from proprietary engines to PostgreSQL and MariaDB to remove licence lock-in, while keeping Oracle and Db2 estates running until each workload is migrated. Obligations under India&#8217;s DPDP Act and GDPR shape what can be logged and where.</p>
<p>Public-sector clients expect their database infrastructure partner to treat audit as engineering. Audit has to be precise enough for an investigator and quiet enough not to leak personal data into logs. With pgaudit on PostgreSQL we audit DDL, role changes and writes globally, add read auditing only for the roles that touch sensitive tables, and keep statement parameters out of the log.</p>
<pre><code class="language-ini"># postgresql.conf, PostgreSQL 16 with pgaudit 16.x
# parameter                 proposed value            default    apply
shared_preload_libraries = 'pgaudit'                # ''         restart
pgaudit.log              = 'ddl, role, write'       # none       reload
pgaudit.log_catalog      = off                      # on         reload: less catalog noise
pgaudit.log_parameter    = off                      # off        reload: keeps PII out of logs
pgaudit.log_relation     = on                       # off        reload
log_line_prefix          = '%m [%p] %q%u@%d '       # '%m [%p] ' reload

-- After the restart, in each audited database
CREATE EXTENSION IF NOT EXISTS pgaudit;
ALTER ROLE svc_registry_reader SET pgaudit.log = 'read';   -- session auditing for one role

-- Verify
SHOW pgaudit.log;
SELECT rolname, rolconfig FROM pg_roles WHERE rolname = 'svc_registry_reader';</code></pre>
<p>The <code>shared_preload_libraries</code> change needs a restart; plan it in a maintenance window and test it on a staging copy first. Options are described in the <a href="https://github.com/pgaudit/pgaudit" target="_blank" rel="noopener">pgaudit project documentation</a>.</p>
<h2>SaaS: cost per tenant and the noisy neighbour</h2>
<p>SaaS companies live on multi-tenant economics. The database questions are how many tenants share an instance, what happens when one of them runs a pathological report, and what each tier actually costs to serve on Amazon Aurora, Cloud SQL or Azure Database for PostgreSQL. Role-level limits in PostgreSQL are a cheap first line of isolation, and the first thing a database infrastructure partner checks on a shared instance.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- PostgreSQL 13+: cap the blast radius of one tenant tier at the role level
ALTER ROLE app_tier_free CONNECTION LIMIT 20;
ALTER ROLE app_tier_free SET statement_timeout = '5s';
ALTER ROLE app_tier_free SET idle_in_transaction_session_timeout = '30s';
ALTER ROLE app_tier_free SET work_mem = '16MB';

-- Verify the limits are attached to the role
SELECT rolname, rolconnlimit, rolconfig
FROM pg_roles
WHERE rolname = 'app_tier_free';</pre>
<p>Beyond limits, a database infrastructure partner helps SaaS teams decide when a tenant graduates to its own instance, how to shard without breaking cross-tenant reporting, and how to push in-product analytics to ClickHouse so it stops competing with transactions.</p>
<h2>The estate a database infrastructure partner has to own</h2>
<p>Across all seven industries the picture converges on the same shape: applications, a routing layer, several systems of record, document and cache tiers, change data capture into analytics, and managed cloud database services. The part that fails most often is the plane underneath it all: monitoring, backups, failover, security, change control and cost. That plane is where one accountable team matters most.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgODQyIiB3aWR0aD0iOTAwIiBoZWlnaHQ9Ijg0MiIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJSZWZlcmVuY2UgcG9seWdsb3QgZW50ZXJwcmlzZSBkYXRhYmFzZSBlc3RhdGUgZW5naW5lZXJlZCBieSBhIGRhdGFiYXNlIGluZnJhc3RydWN0dXJlIHBhcnRuZXI6IGFwcGxpY2F0aW9ucywgY29ubmVjdGlvbiByb3V0aW5nLCBzeXN0ZW1zIG9mIHJlY29yZCwgZG9jdW1lbnQgYW5kIGNhY2hlIHRpZXJzLCBjaGFuZ2UgZGF0YSB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Y2xhc3M9ImFiIiBmb250LXNpemU9IjE0LjUiIGZpbGw9IiNmZmZmZmYiPkNoYW5nZTwvdGV4dD48dGV4dCB4PSIzMjcuMyIgeT0iNzk1LjciIGNsYXNzPSJhIiBmb250LXNpemU9IjEzLjUiIGZpbGw9IiNjOWQzZTMiPmdhdGVkLCByZXZlcnNpYmxlPC90ZXh0PjxyZWN0IHg9IjU5Mi42NjY2NjY2NjY2NjY2IiB5PSI3NTIuNzEiIHdpZHRoPSIyNjkuMzMzMzMzMzMzMzMzMyIgaGVpZ2h0PSI1NiIgcng9IjgiIGZpbGw9IiMwZTI0NDAiIHN0cm9rZT0iIzIzMzk1YyIgc3Ryb2tlLXdpZHRoPSIxIi8+PHRleHQgeD0iNjA0LjciIHk9Ijc3NS43IiBjbGFzcz0iYWIiIGZvbnQtc2l6ZT0iMTQuNSIgZmlsbD0iI2ZmZmZmZiI+RmluT3BzPC90ZXh0Pjx0ZXh0IHg9IjYwNC43IiB5PSI3OTUuNyIgY2xhc3M9ImEiIGZvbnQtc2l6ZT0iMTMuNSIgZmlsbD0iI2M5ZDNlMyI+Y29zdCBwZXIgd29ya2xvYWQ8L3RleHQ+PC9zdmc+" width="900" height="842" alt="Polyglot enterprise database estate and operations plane owned by a database infrastructure partner" loading="lazy"><figcaption>Figure 2. The polyglot estate most enterprises run, and the operations plane a database infrastructure partner has to own end to end.</figcaption></figure>
<h2>Why enterprises choose MinervaDB as their database infrastructure partner</h2>
<p>MinervaDB is a specialist database infrastructure partner, not a generalist consultancy with a data practice. The reasons clients give for choosing us are consistent across industries:</p>
<ul>
<li><strong>One team across every engine and cloud.</strong> PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, Db2, MongoDB, SAP HANA, ClickHouse, Trino, Cassandra, Redis, Valkey and Milvus, plus AWS, Azure, Google Cloud, Snowflake and Databricks, under one set of service levels.</li>
<li><strong>Vendor neutrality.</strong> We sell no licences, so we will tell you when an engine or a managed service is the wrong fit, including one we support.</li>
<li><strong>Senior engineers only.</strong> Principal-level engineers design and operate the platform, backed by more than 200 years of combined leadership experience and 15+ years of company depth.</li>
<li><strong>Measured, not asserted.</strong> Every recommendation cites the metric or system view behind it, and every change has a verification before and a validation after.</li>
<li><strong>Global, 24×7 coverage.</strong> Delivery from 46 cities, with Severity 1 answered in 15 minutes, Severity 2 in 12 hours, Severity 3 in 24 hours and Severity 4 in 48 hours.</li>
</ul>
<p>The difference between one database infrastructure partner and a vendor per engine shows up during incidents, not in proposals.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNTQ4IiB3aWR0aD0iOTAwIiBoZWlnaHQ9IjU0OCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJPbmUgZGF0YWJhc2UgaW5mcmFzdHJ1Y3R1cmUgcGFydG5lciBjb21wYXJlZCB3aXRoIGEgc2VwYXJhdGUgdmVuZG9yIGZvciBlYWNoIGVuZ2luZTogaW5jaWRlbnRzIGFjcm9zcyBlbmdpbmVzLCBtdWx0aS10aWVyIGNoYW5nZSwgc2VydmljZSBsZXZlbHMsIGVuZ2luZSBjaG9pY2UsIGtub3dsZWRnZSByZXRlbnRpb24gYW5kIGNvc3QiPjx0aXRsZT5PbmUgZGF0YWJhc2UgaW5mcmFzdHJ1Y3R1cmUgcGFydG5lciBjb21wYXJlZCB3aXRoIGEgc2VwYXJhdGUgdmVuZG9yIGZvciBlYWNoIGVuZ2luZTogaW5jaWRlbnRzIGFjcm9zcyBlbmdpbmVzLCBtdWx0aS10aWVyIGNoYW5nZSwgc2VydmljZSBsZXZlbHMsIGVuZ2luZSBjaG9pY2UsIGtub3dsZWRnZSByZXRlbnRpb24gYW5kIGNvc3Q8L3RpdGxlPjxkZWZzPjxtYXJrZXIgaWQ9ImFoIiBtYXJrZXJXaWR0aD0iOCIgbWFya2VySGVpZ2h0PSI4IiByZWZYPSI3IiByZWZZPSI0Ii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caption>Figure 4. One database infrastructure partner compared with a separate vendor for each engine and cloud.</figcaption></figure>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNjg0IiB3aWR0aD0iOTAwIiBoZWlnaHQ9IjY4NCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJIb3cgYSBmdWxsLXN0YWNrIGRhdGFiYXNlIGluZnJhc3RydWN0dXJlIHBhcnRuZXIgZW5nYWdlczogYXJjaGl0ZWN0dXJlLCBlbmdpbmVlcmluZywgb3BlcmF0aW9ucyBhbmQgYW5hbHl0aWNzIGRlbGl2ZXJlZCBieSBvbmUgdGVhbSwgd2l0aCB0aGUgb3V0cHV0IG9mIGVhY2ggZGlzY2lwbGluZSBhbmQgdGhlIFMxIHRvIFM0IHJlc3BvbnNlIHRhcmdldHMiPjx0aXRsZT5Ib3cgYSBmdWxsLXN0YWNrIGRhdGFiYXNlIGluZnJhc3RydWN0dXJlIHBhcnRuZXIgZW5nYWdlczogYXJjaGl0ZWN0dXJlLCBlbmdpbmVlcmluZywgb3BlcmF0aW9ucyBhbmQgYW5hbHl0aWNzIGRlbGl2ZXJlZCBieSBvbmUgdGVhbSwgd2l0aCB0aGUgb3V0cHV0IG9mIGVhY2ggZGlzY2lwbGluZSBhbmQgdGhlIFMxIHRvIFM0IHJlc3BvbnNlIHRhcmdldHM8L3RpdGxlPjxkZWZzPjxtYXJrZXIgaWQ9ImFoIiBtYXJrZXJXaWR0aD0iOCIgbWFya2VySGVpZ2h0PSI4IiByZWZYPSI3IiByZWZZPSI0IiBvcmllbnQ9ImF1dG8iIG1hcmtlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTTAsMCBMOCw0IEwwLDggeiIgZmlsbD0iIzViNjQ3MiIvPjwvbWFya2VyPjxtYXJrZXIgaWQ9ImFoYiIgbWFya2VyV2lkdGg9IjgiIG1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5PSI2MjQuNyIgY2xhc3M9ImEiIGZvbnQtc2l6ZT0iMTMuNSIgZmlsbD0iI2M5ZDNlMyI+cXVlc3Rpb25zLCBwbGFubmluZywgYWR2aXNvcnk8L3RleHQ+PC9zdmc+" width="900" height="684" alt="Full-stack engagement model of a database infrastructure partner: architecture, engineering, operations and analytics with S1 to S4 response targets" loading="lazy"><figcaption>Figure 3. Architecture, engineering, operations and analytics delivered by one database infrastructure partner, with the same response targets on every engine.</figcaption></figure>
<p>Engagements usually start with a short assessment of the estate, ranked by risk and effort, and continue as projects, <a href="https://minervadb.com/remote-dba-services/">remote DBA services</a> or fully managed operations. Our <a href="https://minervadb.com/full-stack-database-infrastructure/">full-stack database infrastructure</a> practice describes the model in more detail.</p>
<h2>Frequently asked questions</h2>
<h3>Which industries does MinervaDB work with?</h3>
<p>Banking, financial services, insurance and FinTech; retail and e-commerce; airlines and airport operations; telecom, media and entertainment; independent software vendors; government and the public sector; and SaaS companies, among others.</p>
<h3>Does a database infrastructure partner replace our DBA team?</h3>
<p>Usually not. Most clients use us alongside their own team for 24×7 coverage, escalations and specialist work such as HA design, migrations and audits, with knowledge transfer built into every engagement.</p>
<h3>Can MinervaDB support Oracle and Db2 while we modernise?</h3>
<p>Yes. That is a core part of our role as a database infrastructure partner. We operate Oracle, Exadata and Db2 estates under 24×7 support while migrating suitable workloads to PostgreSQL or ClickHouse through rehearsed, reconciled cutovers.</p>
<h3>What response times does MinervaDB commit to as a database infrastructure partner?</h3>
<p>Severity 1 in 15 minutes, 24×7×365; Severity 2 in 12 hours; Severity 3 in 24 hours; Severity 4 in 48 hours.</p>
<p><em>The code in this post is illustrative and version-pinned. Test every change in a non-production environment first, verify backups by restoring them, and maintain a robust disaster-recovery posture before applying anything to production.</em></p>
<p><strong>Looking for a database infrastructure partner for your industry?</strong> <a href="https://minervadb.com/contact-minervadb-book-an-appointment/">Talk to a MinervaDB principal architect</a>, or email contact@minervadb.com.</p>
<p><a href="https://minervadb.com/database-infrastructure-partner-industries/">Database Infrastructure Partner: 7 Proven Industry Lessons</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Foundation: Why Test Case Tags Matter in TAF</title>
        <link>https://mariadb.org/mariadb-foundation-why-test-case-tags-matter-in-taf/</link>
        <pubDate>Wed, 30 Sep 2026 16:39:07 +0000</pubDate>
        <dc:creator>Jonathan Miller</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-foundation-why-test-case-tags-matter-in-taf/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>In performance testing, numbers alone rarely tell the full story.<br />
A benchmark result without context is just a result floating in space disconnected from the intent, and the conditions that produced it. …<br />
Continue reading "MariaDB Foundation: Why Test Case Tags Matter in TAF"<br />
MariaDB Foundation: Why Test Case Tags Matter in TAF appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/mariadb-foundation-why-test-case-tags-matter-in-taf/">MariaDB Foundation: Why Test Case Tags Matter in TAF</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>In performance testing, numbers alone rarely tell the full story.<br />
A benchmark result without context is just a result floating in space disconnected from the intent, and the conditions that produced it. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/mariadb-foundation-why-test-case-tags-matter-in-taf/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;MariaDB Foundation: Why Test Case Tags Matter in TAF&#8221;</span></a></p>
<p><a href="https://mariadb.org/mariadb-foundation-why-test-case-tags-matter-in-taf/">MariaDB Foundation: Why Test Case Tags Matter in TAF</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/mariadb-foundation-why-test-case-tags-matter-in-taf/">MariaDB Foundation: Why Test Case Tags Matter in TAF</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MongoDB Observability: A Complete 4-Stage Monitoring Platform for MongoDB 8.3</title>
        <link>https://minervadb.com/mongodb-observability-monitoring-platform/</link>
        <pubDate>Tue, 29 Sep 2026 20:18:14 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mongodb-observability-a-complete-4-stage-monitoring-platform-for-mongodb-8-3/</guid>
        <source url="https://minervadb.com/">MinervaDB</source>
        <description><![CDATA[<p>A reference MongoDB observability platform for 8.3: per-member exporters, FTDC archiving, a slow-operation dataset ranked by query shape in ClickHouse, and burn-rate SLO alerts. [...]</p>
<p><a href="https://minervadb.com/mongodb-observability-monitoring-platform/">MongoDB Observability: A Complete 4-Stage Monitoring Platform for MongoDB 8.3</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><strong>MongoDB observability</strong> on the current self-managed release, MongoDB 8.3 (8.3.11 shipped on 2026-09-11), no longer suffers from a shortage of signals. The server now reports how its Cost-Based Ranker chose a plan, how much memory each query tracked at peak, how long operations waited for admission, and how far a secondary&#8217;s oplog fetcher is behind, in seconds, without any arithmetic on optimes. The hard part of MongoDB observability has moved. It is no longer collection; it is deciding which few of several thousand series are allowed to wake a person at three in the morning.</p>
<p>This post is the reference design we use for a MongoDB observability platform on 8.3: four native sources, a collection topology that survives the loss of any single pipeline, a slow-operation dataset that ranks query shapes, and an alerting model that pages only on what users feel. Every configuration and query below is complete and runnable. Where we could not verify a detail against MongoDB&#8217;s documentation, we say so instead of guessing.</p>
<h2>Why MongoDB observability is a platform decision, not a dashboard</h2>
<p>Most MongoDB observability we inherit is a Grafana dashboard with forty panels and no owner. It shows cache usage, connections and opcounters, and it is consulted after an incident rather than before one. That is not MongoDB observability; it is a screensaver. A MongoDB observability platform answers three questions on its own schedule: is the service meeting its latency objective right now, which cause is most likely to break that objective next, and which query shape changed when it did.</p>
<p>Answering those questions needs three kinds of MongoDB observability data, each with different economics. Counters and gauges from <code>serverStatus</code> are cheap and continuous but describe the whole server, never a single query. Slow-operation log entries describe individual queries but only the tail. FTDC captures everything at one-second resolution but lives on the node and is not meant for querying. The platform&#8217;s job is to put each where it is cheapest to use and to join them by cluster, member and query shape.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMjAwIDU5OCIgd2lkdGg9IjEyMDAiIGhlaWdodD0iNTk4IiByb2xlPSJpbWciIGFyaWEtbGFiZWw9Ik1vbmdvREIgb2JzZXJ2YWJpbGl0eSBwbGF0Zm9ybSByZWZlcmVuY2UgYXJjaGl0ZWN0dXJlOiBuYXRpdmUgc2lnbmFsIHNvdXJjZXMgb24gZXZlcnkgbW9uZ29kIGFuZCBtb25nb3MsIGNvbGxlY3RvcnMsIHN0b3JhZ2UgdGllcnMgYW5kIHRoZSBhbGVydGluZyBhbmQgZGFzaGJvYXJkIGxheWVyIj48dGl0bGU+TW9uZ29EQiBvYnNlcnZhYmlsaXR5IHBsYXRmb3JtIHJlZmVyZW5jZSBhcmNoaXRlY3R1cmU6IG5hdGl2ZSBzaWduYWwgc291cmNlcyBvbiBldmVyeSBtb25nb2QgYW5kIG1vbmdvcywgY29sbGVjdG9ycywgc3RvcmFnZSB0aWVycyBhbmQgdGhlIGFsZXJ0aW5nIGFuZCBkYXNoYm9hcmQgbGF5ZXI8L3RpdGxlPjxkZWZzPjxtYXJrZXIgaWQ9ImFoIiBtYXJrZXJXaWR0aD0iOCIgbWFya2VySGVpZ2h0PSI4IiByZWZYPSI3IiByZWZZPSI0IiBvcmllbnQ9ImF1dG8iIG1hcmtlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTTAsMCBMOCw0IEwwLDggeiIgZmlsbD0iIzViNjQ3MiIvPjwvbWFya2VyPjxtYXJrZXIgaWQ9ImFoYiIgbWFya2VyV2lkdGg9IjgiIG1hcmtlck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zwvdGV4dD48L3N2Zz4=" width="1200" height="598" alt="MongoDB observability platform reference architecture: native signal sources on every mongod and mongos, collectors, storage tiers and the alerting and dashboard layer" loading="lazy"><figcaption>Figure 1. The MongoDB observability platform: sources on every member, per-member collectors, separate stores for metrics, logs and FTDC, and alerts that name a runbook step.</figcaption></figure>
<h2>The native signal sources in MongoDB 8.3</h2>
<p>There are six MongoDB observability sources worth wiring, and each answers a different question. We keep this table on the first page of every observability design document because it prevents the most common mistake: trying to answer a per-query question with a server-wide counter.</p>
<table>
<thead>
<tr>
<th>Source</th>
<th>Resolution</th>
<th>Answers</th>
<th>What changed recently</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>serverStatus</code></td>
<td>Whatever you scrape at, typically 15 s</td>
<td>Throughput, cache pressure, queueing, connections, replication fetch lag</td>
<td>8.3 adds <code>metrics.query.cbr.*</code>, <code>queues.execution.*</code> delinquency, <code>metrics.ttl.*</code> and selective output with <code>none: 1</code></td>
</tr>
<tr>
<td>FTDC (<code>diagnostic.data</code>)</td>
<td>1 s</td>
<td>What the server looked like in the seconds before an event, after the fact</td>
<td>8.3 raises the directory default to 500 MiB and captures <code>connPoolStats</code> for <code>mongod</code></td>
</tr>
<tr>
<td>Structured JSON log</td>
<td>Per operation above <code>slowms</code></td>
<td>Which query shape was slow, with which plan, examining how much</td>
<td>8.3 adds slow in-progress entries and <code>originalQueryShapeHash</code> for operations routed through <code>mongos</code></td>
</tr>
<tr>
<td>Profiler and <code>currentOp</code></td>
<td>Per operation, on demand</td>
<td>What is running now, and how much memory it holds</td>
<td>8.3 adds <code>inUseTrackedMemBytes</code> and <code>peakTrackedMemBytes</code></td>
</tr>
<tr>
<td><code>$queryStats</code></td>
<td>Per query shape, cumulative</td>
<td>Aggregate latency, CPU and examined counts for every shape, not just slow ones</td>
<td>Atlas M10+ only on 8.x; the 9.0 notes describe it on by default for reads and writes</td>
</tr>
<tr>
<td>Host and cgroup</td>
<td>15 s</td>
<td>CPU steal, memory limits, device latency, filesystem headroom</td>
<td>Unchanged, and still the half of MongoDB observability that storage incidents live in</td>
</tr>
</tbody>
</table>
<p>FTDC deserves a specific note because it is widely misunderstood. According to the <a href="https://www.mongodb.com/docs/manual/administration/full-time-diagnostic-data-capture/" target="_blank" rel="noopener">FTDC documentation</a>, the files never contain query samples, predicates, results or user data; they hold <code>serverStatus</code>, <code>replSetGetStatus</code>, the oplog&#8217;s <code>collStats</code>, <code>connPoolStats</code> and host metrics once per second. That makes FTDC safe to archive off-host as part of MongoDB observability, and the archive is the only one-second history of a node that died. The <a href="https://www.mongodb.com/docs/manual/release-notes/8.3/" target="_blank" rel="noopener">MongoDB 8.3 release notes</a> and the <a href="https://www.mongodb.com/docs/manual/reference/command/serverStatus/" target="_blank" rel="noopener">serverStatus reference</a> list the full set of fields; the sections below cover the ones we collect.</p>
<h2>Collection topology for MongoDB observability: one exporter per member</h2>
<p>We run one exporter per <code>mongod</code>, on the same host, connected to <code>127.0.0.1</code> with a direct connection. Scraping through <code>mongos</code> or through a replica-set connection string looks tidier and is wrong for MongoDB observability: the driver picks a member, and the metrics you receive describe whichever node it picked. Replication fetch lag, cache pressure and admission queueing are per-member properties. A primary under eviction pressure and a healthy secondary average out to a healthy-looking line.</p>
<p>The exporter we deploy is Percona&#8217;s <a href="https://github.com/percona/mongodb_exporter" target="_blank" rel="noopener">mongodb_exporter</a>, which derives metric names mechanically from <code>serverStatus</code> paths, so new 8.3 fields appear as new series without an exporter release. It needs only <code>clusterMonitor</code> on <code>admin</code> and <code>read</code> on <code>local</code>. Give the MongoDB observability identity exactly that and nothing more; a monitoring identity with write privileges is a finding in any audit we run.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="">// Least-privilege identity for the exporter: MongoDB observability needs to read, never to write
use admin
db.createUser({
  user: "svc_mongodb_exporter",
  pwd: passwordPrompt(),                       // supplied from the secret store, never inline
  roles: [
    { role: "clusterMonitor", db: "admin" },   // serverStatus, replSetGetStatus, top, getDiagnosticData
    { role: "read",           db: "local" }    // oplog window: first and last entry of local.oplog.rs
  ],
  mechanisms: ["SCRAM-SHA-256"]
})

// Verify: the role set is exactly what we granted, nothing inherited
db.getUser("svc_mongodb_exporter", { showPrivileges: false }).roles</pre>
<p>The unit below pins the collectors we use. Two of them deserve restraint. <code>collstats</code> and <code>indexstats</code> emit a series per collection and per index, and an unbounded list on a multi-tenant cluster with thousands of collections will do more damage to your Prometheus than to MongoDB. List the collections your MongoDB observability actually alerts or plans capacity on, and let everything else be found through the slow log.</p>
<pre class="EnlighterJSRAW" data-enlighter-language=""># /etc/systemd/system/mongodb_exporter.service — MongoDB observability collector
# One exporter per mongod, on the same host, talking to 127.0.0.1 with directConnection.
[Unit]
Description=Percona mongodb_exporter (MongoDB observability, local member only)
After=network-online.target mongod.service

[Service]
User=mongodb_exporter
# /etc/mongodb_exporter/env holds a single line, rendered by the secret store at deploy time:
# MONGODB_URI=mongodb://svc_mongodb_exporter:${MONGODB_EXPORTER_PASSWORD}@127.0.0.1:27017/admin?tls=true
EnvironmentFile=/etc/mongodb_exporter/env
ExecStart=/usr/local/bin/mongodb_exporter 
  --mongodb.direct-connect 
  --mongodb.global-conn-pool 
  --collector.diagnosticdata 
  --collector.replicasetstatus 
  --collector.topmetrics 
  --collector.collstats 
  --collector.indexstats 
  --mongodb.collstats-colls=shop.orders,shop.events 
  --mongodb.indexstats-colls=shop.orders,shop.events 
  --web.listen-address=:9216
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target</pre>
<p>The cluster label is attached once, in the scrape configuration, so every recording rule can aggregate by it. The second job scrapes the slow-operation counter that the log pipeline exposes; it becomes the numerator of the latency objective later in this post.</p>
<pre class="EnlighterJSRAW" data-enlighter-language=""># prometheus.yml (fragment): the cluster label is attached here, once, so every rule can group by it
scrape_configs:
  - job_name: mongodb
    scrape_interval: 15s
    scrape_timeout: 10s
    static_configs:
      - targets: ["rs-orders-0:9216", "rs-orders-1:9216", "rs-orders-2:9216"]
        labels: { cluster: "orders-prod", role: "replset" }
  - job_name: mongodb-slow-ops          # Vector's log_to_metric counter, see the log pipeline below
    static_configs:
      - targets: ["rs-orders-0:9598", "rs-orders-1:9598", "rs-orders-2:9598"]
        labels: { cluster: "orders-prod" }</pre>
<h2>The MongoDB 8.3 fields worth collecting and deriving</h2>
<p>A field earns a place in the MongoDB observability platform when it maps to one of the four golden signals and has a known direction of failure. Figure 2 is the map we use. It is deliberately small: anything not on it is dashboard material and never an alert.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMjAwIDU2MCIgd2lkdGg9IjEyMDAiIGhlaWdodD0iNTYwIiByb2xlPSJpbWciIGFyaWEtbGFiZWw9Ik1vbmdvREIgb2JzZXJ2YWJpbGl0eSBzaWduYWwgbWFwOiBsYXRlbmN5LCB0cmFmZmljLCBlcnJvcnMgYW5kIHNhdHVyYXRpb24gbWFwcGVkIHRvIHNlcnZlclN0YXR1cywgbG9nIGFuZCBxdWVyeVN0YXRzIGZpZWxkcywgd2l0aCB0aGUgZmllbGRzIGFkZGVkIGluIE1vbmdvREIgOC4yIGFuZCA4LjMgaGlnaGxpZ2h0ZWQiPjx0aXRsZT5Nb25nb0RCIG9ic2VydmFiaWxpdHkgc2lnbmFsIG1hcDogbGF0ZW5jeSwgdHJhZmZpYywgZXJyb3JzIGFuZCBzYXR1cmF0aW9uIG1hcHBlZCB0byBzZXJ2ZXJTdGF0dXMsIGxvZyBhbmQgcXVlcnlTdGF0cyBmaWVsZHMsIHdpdGggdGhlIGZpZWxkcyBhZGRlZCBpbiBNb25nb0RCIDguMiBhbmQgOC4zIGhpZ2hsaWdodGVkPC90aXRsZT48ZGVmcz48bWFya2VyIGlkPSJhaCIgbWFya2VyV2lkdGg9IjgiIG1hcmtlckhlaWdodD0iOCIgcmVmWD0iNyIgcmVmWT0iNCIgb3JpZW50PSJhdXRvIiBtYXJrZXJVbml0cz0idXNlclNwYWNlT25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0iI2Y0ZjVmNyIgc3Ryb2tlPSIjZGNkZWU0IiBzdHJva2Utd2lkdGg9IjEiLz48dGV4dCB4PSI4NTgiIHk9IjQ3MCIgY2xhc3M9Im1iIiBmb250LXNpemU9IjEwLjUiIGZpbGw9IiMwYTE0MjQiPnJlcGwubmV0d29yay5vcGxvZ0ZldGNoZXJMYWdTZWNvbmRzPC90ZXh0Pjx0ZXh0IHg9Ijg1OCIgeT0iNDkyIiBjbGFzcz0iYSIgZm9udC1zaXplPSIxMSI+c2Vjb25kYXJ5IG9wbG9nIGZldGNoIGxhZywgc2Vjb25kcyAobWV0cmljcy4qKTwvdGV4dD48cmVjdCB4PSIxMTE4IiB5PSI0NTYiIHdpZHRoPSIzNiIgaGVpZ2h0PSIyMCIgcng9IjQiIGZpbGw9IiMwZjYyZmUiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIwIi8+PHRleHQgeD0iMTEzNiIgeT0iNDcwIiBjbGFzcz0iYWIiIGZvbnQtc2l6ZT0iMTAuNSIgZmlsbD0iI2ZmZmZmZiIgdGV4dC1hbmNob3I9Im1pZGRsZSI+OC4zPC90ZXh0Pjx0ZXh0IHg9IjExNzYiIHk9IjU1MiIgY2xhc3M9Im0iIGZvbnQtc2l6ZT0iMTAiIGZpbGw9IiM1YjY0NzIiIHRleHQtYW5jaG9yPSJlbmQiPkZpZWxkIHBhdGhzIGFzIHJldHVybmVkIGJ5IGRiLnNlcnZlclN0YXR1cygpIG9uIDguMzsgZXhwb3J0ZXIgbWV0cmljIG5hbWVzIGFyZSBkZXJpdmVkIG1lY2hhbmljYWxseSBmcm9tIHRoZXNlIHBhdGhzPC90ZXh0Pjwvc3ZnPg==" width="1200" height="560" alt="MongoDB observability signal map: latency, traffic, errors and saturation mapped to serverStatus, log and queryStats fields, with the MongoDB 8.2 and 8.3 additions highlighted" loading="lazy"><figcaption>Figure 2. Golden signals mapped to MongoDB observability fields on 8.3. Blue badges mark fields that did not exist before 8.2 or 8.3.</figcaption></figure>
<p>Four of the 8.3 additions change how we build the platform. <code>metrics.query.cbr.*</code> counts Cost-Based Ranker invocations, the time spent ranking and the number of candidate plans, which matters because 8.3 makes multi-planning with a CBR backup the default plan selection mechanism for eligible queries. <code>queues.execution.*</code> exposes admission, deprioritisation and delinquency counters, so queueing is measured rather than inferred from latency. <code>metrics.repl.network.oplogFetcherLagSeconds</code> reports fetch lag directly. And <code>inUseTrackedMemBytes</code> with <code>peakTrackedMemBytes</code> appear in <code>currentOp</code>, the profiler, explain and the slow query log.</p>
<p>Before any of this reaches the MongoDB observability stack, we read it by hand. The script below takes two samples ten seconds apart using 8.3&#8217;s <code>none: 1</code> option, which suppresses every optional <code>serverStatus</code> section and lets you opt back in. On a busy primary that difference in payload size is noticeable, and it is the right habit for any ad hoc poller.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="">// mongosh: a ten-second, two-sample read of the 8.3 MongoDB observability fields that matter.
// none:1 (new in 8.3) drops every optional serverStatus section; we then opt back in to the ones we read.
// Confirm the section list on your build with Object.keys(sample()) before depending on it.
const sample = () =&gt; db.adminCommand({
  serverStatus: 1, none: 1,
  opLatencies: 1, wiredTiger: 1, metrics: 1, queues: 1, connections: 1
});
const n = (v) =&gt; Number(v ?? 0);                 // NumberLong -&gt; Number for arithmetic
const a = sample(); sleep(10000); const b = sample();
const d = (f) =&gt; n(f(b)) - n(f(a));
const wt = b.wiredTiger.cache;

printjson({
  readMeanMicros:  d(s =&gt; s.opLatencies.reads.latency)  / Math.max(1, d(s =&gt; s.opLatencies.reads.ops)),
  writeMeanMicros: d(s =&gt; s.opLatencies.writes.latency) / Math.max(1, d(s =&gt; s.opLatencies.writes.ops)),
  cacheFillPct:    100 * n(wt["bytes currently in the cache"])     / n(wt["maximum bytes configured"]),
  cacheDirtyPct:   100 * n(wt["tracked dirty bytes in the cache"]) / n(wt["maximum bytes configured"]),
  appThreadEvictionsPerSec: d(s =&gt; s.wiredTiger.cache["pages evicted by application threads"]) / 10,
  cbrRankingsPerSec:        d(s =&gt; s.metrics.query?.cbr?.count) / 10,           // 8.3+
  cbrChoseWinningPlanDelta: d(s =&gt; s.metrics.query?.cbr?.choseWinningPlan),    // 8.3+
  oplogFetcherLagSeconds:   b.metrics.repl?.network?.oplogFetcherLagSeconds,     // 8.3+, secondaries
  connections:              b.connections.current + " / " + (b.connections.current + b.connections.available)
});</pre>
<p>Two MongoDB observability cautions from experience. Means from <code>opLatencies</code> are means: they hide the tail completely, which is why the latency objective below is built from the slow log rather than from these counters. And the CBR counters mean little in isolation. Trend them per hour and look for step changes after a deploy or an upgrade; that is the signal, not the absolute value.</p>
<h2>Slow-operation logs as a MongoDB observability dataset</h2>
<p>Every slow operation MongoDB logs is a structured JSON object with component <code>COMMAND</code> and message id <code>51803</code>. It already carries the namespace, the plan summary, the examined counts, <code>queryShapeHash</code> (since 8.0), <code>planCacheShapeHash</code>, and on 8.3 the operation&#8217;s peak tracked memory. Metrics cannot tell you which query regressed. The slow-operation dataset can, provided it is kept, parsed and made aggregatable instead of rotated away.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMjAwIDU2MCIgd2lkdGg9IjEyMDAiIGhlaWdodD0iNTYwIiByb2xlPSJpbWciIGFyaWEtbGFiZWw9Ik1vbmdvREIgb2JzZXJ2YWJpbGl0eSBsb2cgcGlwZWxpbmU6IHN0cnVjdHVyZWQgc2xvdy1vcGVyYXRpb24gbG9nIGxpbmVzIHBhcnNlZCBieSBWZWN0b3IsIGZpbHRlcmVkIGFuZCByZWRhY3RlZCwgc3RvcmVkIGluIGEgQ2xpY2tIb3VzZSBNZXJnZVRyZWUgdGFibGUgYW5kIHJhbmtlZCBieSBxdWVyeSBzaGFwZSI+PHRpdGxlPk1vbmdvREIgb2JzZXJ2YWJpbGl0eSBsb2cgcGlwZWxpbmU6IHN0cnVjdHVyZWQgc2xvdy1vcGVyYXRpb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xMi41Ij5mYWlsdXJlPC90ZXh0Pjx0ZXh0IHg9IjYyMCIgeT0iMzkwLjUiIGNsYXNzPSJhIiBmb250LXNpemU9IjEyLjUiIGZpbGw9IiMwZjYyZmUiPuKAlDwvdGV4dD48dGV4dCB4PSI2MzguMSIgeT0iMzkwLjUiIGNsYXNzPSJhIiBmb250LXNpemU9IjEyLjUiPk5ldyBzaGFwZXMgdGhhdCBlbnRlcmVkIHRoZSB0b3AgMjAgc2luY2UgdGhlIGxhc3QgZGVwbG95LCBhdHRyaWJ1dGFibGUgdG8gYSByZWxlYXNlPC90ZXh0Pjx0ZXh0IHg9IjYyMCIgeT0iNDIxLjAiIGNsYXNzPSJhIiBmb250LXNpemU9IjEyLjUiIGZpbGw9IiMwZjYyZmUiPuKAlDwvdGV4dD48dGV4dCB4PSI2MzguMSIgeT0iNDIxLjAiIGNsYXNzPSJhIiBmb250LXNpemU9IjEyLjUiPlBlci10ZW5hbnQgdGFpbCBsYXRlbmN5IHdoZXJlIHRoZSBzaGFwZSBpbmNsdWRlcyBhIHRlbmFudCBmaWVsZCBhbmQgYXZlcmFnZXMgaGlkZSBpdDwvdGV4dD48L3N2Zz4=" width="1200" height="560" alt="MongoDB observability log pipeline: structured slow-operation log lines parsed by Vector, filtered and redacted, stored in a ClickHouse MergeTree table and ranked by query shape" loading="lazy"><figcaption>Figure 3. The MongoDB observability log pipeline, from <code>mongod.log</code> to a ranked list of query shapes. The record shows field shape only; values are elided.</figcaption></figure>
<p>The MongoDB observability log pipeline depends on a logging contract in <code>mongod.conf</code>. The important line is <code>slowOpThresholdMs</code>: we set it equal to the latency threshold in the service objective, so that every slow-log entry is, by definition, one bad event. The profiler stays off; the slow log is written at profiling level 0.</p>
<pre class="EnlighterJSRAW" data-enlighter-language=""># mongod.conf (fragment) — the logging contract the MongoDB observability pipeline depends on
operationProfiling:
  mode: off                    # profiler collection stays off; the slow log still records slow ops
  slowOpThresholdMs: 100       # = the latency SLO threshold, so every slow entry is one bad event
  slowOpSampleRate: 1.0        # sampling below 1.0 makes the SLO numerator lie
systemLog:
  destination: file
  path: /var/log/mongodb/mongod.log
  logAppend: true
  logRotate: reopen            # logrotate owns rotation; Vector follows the reopened file
setParameter:
  diagnosticDataCollectionDirectorySizeMB: 500   # 8.3 default; state it so drift is visible
# Slow in-progress entries (8.3) are enabled with the mongod start-up option:
#   --defaultSlowInProgMS <ms>   set above the longest legitimate operation, e.g. a nightly batch</pre>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Default on 8.3</th>
<th>Our value</th>
<th>Unit</th>
<th>How it applies</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>operationProfiling.slowOpThresholdMs</code></td>
<td>100</td>
<td>The SLO threshold (100 in the examples)</td>
<td>ms</td>
<td>Runtime with <code>db.setProfilingLevel(0, { slowms: … })</code>; persist in the config file</td>
</tr>
<tr>
<td><code>operationProfiling.slowOpSampleRate</code></td>
<td>1.0</td>
<td>1.0</td>
<td>fraction</td>
<td>Runtime with <code>setProfilingLevel</code>; persist in the config file</td>
</tr>
<tr>
<td><code>diagnosticDataCollectionDirectorySizeMB</code></td>
<td>500</td>
<td>500, stated explicitly</td>
<td>MiB</td>
<td><code>setParameter</code>; persist in the config file</td>
</tr>
<tr>
<td><code>--defaultSlowInProgMS</code></td>
<td>Check <code>db.getProfilingStatus()</code> on your build</td>
<td>Above the longest legitimate operation</td>
<td>ms</td>
<td>Start-up option; restart required</td>
</tr>
</tbody>
</table>
<p>We ship the log with <a href="https://vector.dev/docs/reference/configuration/sinks/clickhouse/" target="_blank" rel="noopener">Vector</a>. The transform keeps only slow-query entries, projects fourteen fields and discards filter literals by construction, because it never copies <code>attr.command</code>. On Enterprise builds that handle regulated data, enable <code>redactClientLogData</code> on the server as well; defence in depth costs nothing here. The same events feed a counter on port 9598, which Prometheus scrapes as the SLO numerator.</p>
<pre class="EnlighterJSRAW" data-enlighter-language=""># /etc/vector/mongodb.toml — tail, parse, shape, then fan out to ClickHouse and to a Prometheus counter
[sources.mongod_log]
type      = "file"
include   = ["/var/log/mongodb/mongod.log"]
read_from = "end"

[transforms.slow_ops]
type           = "remap"
inputs         = ["mongod_log"]
drop_on_abort  = true
source = '''
  e, err = parse_json(.message)
  if err != null { abort }
  e = object!(e)
  if e.c != "COMMAND" || e.id != 51803 { abort }      # 51803 = "Slow query"
  a = object(e.attr) ?? {}
  . = {
    "ts":                     parse_timestamp(e.t."$date", "%+") ?? now(),
    "cluster":                "${MONGO_CLUSTER_NAME}",
    "member":                 get_hostname() ?? "unknown",
    "ns":                     to_string(a.ns) ?? "",
    "app_name":               to_string(a.appName) ?? "",
    "query_shape_hash":       to_string(a.queryShapeHash) ?? "",
    "plan_cache_shape_hash":  to_string(a.planCacheShapeHash) ?? "",
    "plan_summary":           to_string(a.planSummary) ?? "",
    "duration_ms":            to_int(a.durationMillis) ?? 0,
    "planning_time_us":       to_int(a.planningTimeMicros) ?? 0,
    "keys_examined":          to_int(a.keysExamined) ?? 0,
    "docs_examined":          to_int(a.docsExamined) ?? 0,
    "n_returned":             to_int(a.nreturned) ?? 0,
    "peak_tracked_mem_bytes": to_int(a.peakTrackedMemBytes) ?? null
  }
'''

[sinks.clickhouse]
type                = "clickhouse"
inputs              = ["slow_ops"]
endpoint            = "https://${CH_HOST}:8443"
database            = "observability"
table               = "mongodb_slow_ops"
skip_unknown_fields = true
auth.strategy       = "basic"
auth.user           = "${CH_USER}"
auth.password       = "${CH_PASSWORD}"

[transforms.slow_ops_counter]
type   = "log_to_metric"
inputs = ["slow_ops"]
[[transforms.slow_ops_counter.metrics]]
type         = "counter"
field        = "ns"
name         = "mongodb_slow_ops_total"
tags.cluster = "{{ cluster }}"
tags.member  = "{{ member }}"

[sinks.prom]
type    = "prometheus_exporter"
inputs  = ["slow_ops_counter"]
address = "0.0.0.0:9598"</pre>
<p>The table is ordered by cluster, shape and time, so a per-shape question reads a narrow range of a single day&#8217;s partition. <code>ttl_only_drop_parts</code> makes retention a partition drop rather than a row-level mutation.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="">-- ClickHouse: MongoDB observability store, one row per slow operation, ordered for per-shape scans
CREATE TABLE observability.mongodb_slow_ops
(
    ts                      DateTime64(3, 'UTC'),
    cluster                 LowCardinality(String),
    member                  LowCardinality(String),
    ns                      LowCardinality(String),
    app_name                LowCardinality(String),
    query_shape_hash        String,
    plan_cache_shape_hash   String,
    plan_summary            String,
    duration_ms             UInt32,
    planning_time_us        UInt64,
    keys_examined           UInt64,
    docs_examined           UInt64,
    n_returned              UInt64,
    peak_tracked_mem_bytes  Nullable(UInt64)
)
ENGINE = MergeTree
PARTITION BY toYYYYMMDD(ts)
ORDER BY (cluster, query_shape_hash, ts)
TTL toDateTime(ts) + INTERVAL 30 DAY DELETE
SETTINGS index_granularity = 8192,
         ttl_only_drop_parts = 1;</pre>
<p>The daily ranking is the most useful single query in our MongoDB observability platform. <code>keys_per_doc_returned</code> is the index-health signal we trend per shape; <code>distinct_plans</code> above one means the shape has run under more than one plan in the window, which on 8.3 is where we look first for Cost-Based Ranker effects.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="">-- Top 20 query shapes by total slow time in the last day, with the index-health and plan-flip signals
SELECT
    query_shape_hash,
    any(ns)                                                AS ns,
    count()                                                AS slow_execs,
    sum(duration_ms)                                       AS total_ms,
    quantileTDigest(0.95)(duration_ms)                     AS p95_ms,
    round(sum(keys_examined) / greatest(sum(n_returned), 1), 1) AS keys_per_doc_returned,
    max(peak_tracked_mem_bytes)                            AS peak_tracked_mem_bytes,
    uniqExact(plan_summary)                                AS distinct_plans
FROM observability.mongodb_slow_ops
WHERE cluster = {cluster:String}
  AND ts &gt;= now64(3) - INTERVAL 1 DAY
GROUP BY query_shape_hash
ORDER BY total_ms DESC
LIMIT 20;</pre>
<p>Remember what this table is: the tail. It sees only operations above the threshold, so a shape that averages 3 ms and never crosses 100 ms is invisible here, which is exactly why <code>$queryStats</code> on Atlas, and the 9.0 change to collect it by default, matter. For upgrades we keep a second query that isolates every shape whose plan set changed across a timestamp. It is how we compare 8.0 and 8.3 behaviour on the same workload without guessing; our <a href="https://minervadb.com/mongodb-performance-regression-testing/">MongoDB performance regression testing</a> write-up covers the capture side.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="">-- Plan-shape diff across an upgrade (for example 8.0 -&gt; 8.3 and the Cost-Based Ranker):
-- every shape whose plan summary set changed, with its tail latency before and after
SELECT
    query_shape_hash,
    any(ns)                                                        AS ns,
    groupUniqArrayIf(plan_summary, ts = {upgrade_ts:DateTime64(3)}) AS plans_after,
    quantileTDigestIf(0.95)(duration_ms, ts = {upgrade_ts:DateTime64(3)}) AS p95_after_ms
FROM observability.mongodb_slow_ops
WHERE cluster = {cluster:String}
  AND ts &gt;= {upgrade_ts:DateTime64(3)} - INTERVAL 7 DAY
GROUP BY query_shape_hash
HAVING arraySort(plans_before) != arraySort(plans_after)
   AND length(plans_before) &gt; 0
ORDER BY p95_after_ms - p95_before_ms DESC
LIMIT 50;</pre>
<h2>Turning the slow log into a MongoDB observability SLO</h2>
<p>The <code>opLatencies</code> counters only yield means, and a mean-latency alert fires either constantly or never. A MongoDB observability objective needs good and bad events. The design above supplies both without histograms: bad events are slow-log entries at a threshold equal to the objective, counted by Vector; total events are <code>opcounters</code> for the operation types the objective covers. The ratio is the error rate, and the objective turns it into a budget.</p>
<p>With a 99.9% objective over 30 days, we page using the multi-window burn-rate pattern from the <a href="https://sre.google/workbook/alerting-on-slos/" target="_blank" rel="noopener">Google SRE workbook</a>: 14.4 times the budget rate over one hour confirmed over five minutes, and six times over six hours confirmed over thirty minutes. Those multipliers are the workbook&#8217;s, chosen so that a fast burn pages when two per cent of a thirty-day budget has gone in an hour. We did not invent them and we do not tune them per cluster.</p>
<pre class="EnlighterJSRAW" data-enlighter-language=""># mongodb-observability.rules.yml — recording rules first, alerts only on recorded series.
# Metric names follow mongodb_exporter's default naming, derived from serverStatus paths.
# Confirm every name against  curl -s localhost:9216/metrics  on your exporter build before loading.
groups:
  - name: mongodb-observability-recording
    interval: 30s
    rules:
      - record: mongodb:read_latency_mean_micros:rate5m
        expr: |
          rate(mongodb_ss_opLatencies_latency{op_type="reads"}[5m])
            / clamp_min(rate(mongodb_ss_opLatencies_ops{op_type="reads"}[5m]), 1)
      - record: mongodb:wt_cache_fill:ratio
        expr: mongodb_ss_wt_cache_bytes_currently_in_the_cache / mongodb_ss_wt_cache_maximum_bytes_configured
      - record: mongodb:wt_cache_dirty:ratio
        expr: mongodb_ss_wt_cache_tracked_dirty_bytes_in_the_cache / mongodb_ss_wt_cache_maximum_bytes_configured
      # SLO: 99.9% of operations complete under slowOpThresholdMs (100 ms). Bad events = slow-log entries.
      - record: mongodb:slo_bad_ratio:rate5m
        expr: |
          sum by (cluster) (rate(mongodb_slow_ops_total[5m]))
            / clamp_min(sum by (cluster) (rate(mongodb_ss_opcounters{legacy_op_type=~"query|insert|update|delete|getmore"}[5m])), 1)
      - record: mongodb:slo_bad_ratio:rate1h
        expr: |
          sum by (cluster) (rate(mongodb_slow_ops_total[1h]))
            / clamp_min(sum by (cluster) (rate(mongodb_ss_opcounters{legacy_op_type=~"query|insert|update|delete|getmore"}[1h])), 1)
      - record: mongodb:slo_bad_ratio:rate30m
        expr: |
          sum by (cluster) (rate(mongodb_slow_ops_total[30m]))
            / clamp_min(sum by (cluster) (rate(mongodb_ss_opcounters{legacy_op_type=~"query|insert|update|delete|getmore"}[30m])), 1)
      - record: mongodb:slo_bad_ratio:rate6h
        expr: |
          sum by (cluster) (rate(mongodb_slow_ops_total[6h]))
            / clamp_min(sum by (cluster) (rate(mongodb_ss_opcounters{legacy_op_type=~"query|insert|update|delete|getmore"}[6h])), 1)

  - name: mongodb-observability-alerts
    rules:
      - alert: MongoDBLatencySLOFastBurn
        expr: mongodb:slo_bad_ratio:rate1h &gt; (14.4 * 0.001) and mongodb:slo_bad_ratio:rate5m &gt; (14.4 * 0.001)
        labels: { severity: page }
        annotations:
          summary: "{{ $labels.cluster }}: 2% of the 30-day latency budget spent in the last hour"
          runbook: "Step 1: rank shapes for the last hour in ClickHouse; step 2: serverStatus two-sample read on the primary"
      - alert: MongoDBLatencySLOSlowBurn
        expr: mongodb:slo_bad_ratio:rate6h &gt; (6 * 0.001) and mongodb:slo_bad_ratio:rate30m &gt; (6 * 0.001)
        labels: { severity: page }
      - alert: MongoDBWiredTigerCacheFillTrend
        expr: predict_linear(mongodb:wt_cache_fill:ratio[30m], 3600) &gt; 0.95 and mongodb:wt_cache_fill:ratio &gt; 0.80
        for: 15m
        labels: { severity: ticket }
      - alert: MongoDBAppThreadEviction
        expr: rate(mongodb_ss_wt_cache_pages_evicted_by_application_threads[10m]) &gt; 0
        for: 30m
        labels: { severity: ticket }
      - alert: MongoDBOplogFetcherLag       # 8.3+ field; threshold = your agreed staleness bound
        expr: mongodb_ss_metrics_repl_network_oplogFetcherLagSeconds &gt; 30
        for: 10m
        labels: { severity: ticket }</pre>
<p>A word on metric names, which trips up more MongoDB observability rollouts than any design flaw. The exporter derives metric names from <code>serverStatus</code> paths, and naming conventions have shifted between exporter releases and its compatibility mode. The names above match its default mode; check them against your own <code>/metrics</code> output before loading the file, and treat a rule that evaluates to no data as a failed deploy, not a quiet cluster.</p>
<h2>Alert tiers: what pages, what opens a ticket, what stays on a graph</h2>
<p>A MongoDB observability platform lives or dies on alert discipline. We allow exactly three tiers, and the tier is decided by whether the user can feel the condition now, not by how alarming the metric looks.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMjAwIDM3MiIgd2lkdGg9IjEyMDAiIGhlaWdodD0iMzcyIiByb2xlPSJpbWciIGFyaWEtbGFiZWw9Ik1vbmdvREIgb2JzZXJ2YWJpbGl0eSBhbGVydCBoaWVyYXJjaHk6IHBhZ2VzIG9ubHkgb24gc2VydmljZS1sZXZlbCBvYmplY3RpdmUgYnVybiwgdGlja2V0cyBvbiBjYXVzZXMgdGhhdCBwcmVkaWN0IGEgYn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M9ImEiIGZvbnQtc2l6ZT0iMTEuNSI+cHJvZmlsZXIudG90YWxBYmFuZG9uZWRXcml0ZXMgKDguMyk8L3RleHQ+PHRleHQgeD0iODI0IiB5PSIyNDIuNyIgY2xhc3M9ImEiIGZvbnQtc2l6ZT0iMTEuNSIgZmlsbD0iIzBmNjJmZSI+4oCUPC90ZXh0Pjx0ZXh0IHg9Ijg0MC43IiB5PSIyNDIuNyIgY2xhc3M9ImEiIGZvbnQtc2l6ZT0iMTEuNSI+Y29sbGVjdGlvbiBhbmQgaW5kZXggc2l6ZSBncm93dGg8L3RleHQ+PHJlY3QgeD0iMjQiIHk9IjMwOCIgd2lkdGg9IjExNTIiIGhlaWdodD0iNDgiIHJ4PSI4IiBmaWxsPSIjZThmMGZmIiBzdHJva2U9IiM3OGE5ZmYiIHN0cm9rZS13aWR0aD0iMSIvPjx0ZXh0IHg9IjQwIiB5PSIzMzciIGNsYXNzPSJhIiBmb250LXNpemU9IjExLjUiIGZpbGw9IiMwYTE0MjQiPlJ1bGUgd2UgYXBwbHkgdG8gZXZlcnkgbmV3IGFsZXJ0OiBpZiB0aGUgcmVzcG9uZGVyIGNhbm5vdCBuYW1lIHRoZSBmaXJzdCBjb21tYW5kIHRvIHJ1biBmcm9tIHRoZSBhbGVydCB0ZXh0IGFsb25lLCBpdCBpcyBub3QgcmVhZHkgdG8gcGFnZSBhbnlvbmUuPC90ZXh0Pjwvc3ZnPg==" width="1200" height="372" alt="MongoDB observability alert hierarchy: pages only on service-level objective burn, tickets on causes that predict a burn, and dashboard-only signals for investigation" loading="lazy"><figcaption>Figure 4. Three MongoDB observability alert tiers. Pages are symptoms; causes open tickets; the rest is for investigation.</figcaption></figure>
<p>In MongoDB observability, pages are reserved for objective burn, a missing primary beyond the election budget, and an oplog window shorter than the time it takes you to detect and decide on a logical corruption, because that last one silently removes point-in-time recovery. Everything that predicts a burn but has not caused one yet is a ticket: cache fill trending toward the eviction trigger, application threads doing eviction work, rising admission delinquency on 8.3, connection counts near the configured ceiling, and a new query shape entering the top twenty. The 8.3 CBR, tracked-memory and TTL counters live on graphs until you have a quarter of baseline data.</p>
<p>One rule governs every alert we write: if the responder cannot name the first command to run from the alert text alone, it is not ready to page anyone. That is why the fast-burn rule above carries its runbook step in the annotation. When an alert does fire, our <a href="https://minervadb.com/mongodb-performance-troubleshooting/">MongoDB performance troubleshooting guide for 8.3</a> covers the diagnostic sequence that follows.</p>
<h2>What MongoDB observability costs the server</h2>
<p>MongoDB observability has a price, and we would rather state it than pretend otherwise. None of the figures below are benchmarks; they are the mechanisms by which each source consumes resources, so that you can measure them on your own workload.</p>
<table>
<thead>
<tr>
<th>Source</th>
<th>Where the cost lands</th>
<th>How we bound it</th>
</tr>
</thead>
<tbody>
<tr>
<td>Exporter scrape</td>
<td>One <code>serverStatus</code> plus optional collectors per scrape interval</td>
<td>15 s interval; bounded <code>collstats</code> and <code>indexstats</code> lists</td>
</tr>
<tr>
<td>Slow log</td>
<td>Log I/O proportional to the number of operations above <code>slowms</code></td>
<td>Threshold equals the objective; a burst of slow logging is itself the incident signal</td>
</tr>
<tr>
<td>Profiler level 1 or 2</td>
<td>Writes to <code>system.profile</code> on the hot path</td>
<td>Off by default; enabled per incident with a sample rate. 8.3 adds <code>profiler.totalAbandonedWrites</code> and throttling parameters</td>
</tr>
<tr>
<td>FTDC</td>
<td>Up to the directory limit on the data volume</td>
<td>500 MiB default on 8.3; archived off-host and never deleted by our tooling</td>
</tr>
<tr>
<td><code>$queryStats</code> (Atlas)</td>
<td>An in-memory store capped at 1% of system memory</td>
<td>Read with <code>transformIdentifiers</code> when results leave the cluster</td>
</tr>
</tbody>
</table>
<p>The FTDC archive is small enough to be a shell script, and it is the piece of MongoDB observability most teams skip. When a node is lost, its <code>diagnostic.data</code> directory is lost with it, together with the only one-second record of what happened. The script copies closed files only, never touches the source directory, and verifies its own freshness.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="">#!/usr/bin/env bash
# /usr/local/sbin/ftdc-archive.sh — MongoDB observability evidence: copy closed FTDC files off-host every 15 minutes (cron).
# Read-only on the source: nothing in diagnostic.data is modified or deleted by this script.
set -euo pipefail
SRC="/var/lib/mongodb/diagnostic.data"
DST="s3://${FTDC_BUCKET}/$(hostname -s)/"
find "$SRC" -maxdepth 1 -type f -name 'metrics.*' ! -name 'metrics.interim' -mmin +5 -print0 |
  xargs -0 -r -I{} aws s3 cp --only-show-errors --no-progress {} "$DST"
# Verification: the newest archived object should be less than 30 minutes old
aws s3 ls "$DST" | sort | tail -n 1</pre>
<h2>MongoDB 9.0: what changes for the observability platform</h2>
<p>At the time of writing, the <a href="https://www.mongodb.com/docs/upcoming/release-notes/9.0/" target="_blank" rel="noopener">MongoDB 9.0 release notes</a> describe the release as production ready and rolling out incrementally to Atlas clusters on the latest-version track, with Enterprise Advanced and Community availability &#8220;coming soon&#8221;. We therefore build on 8.3 field names today and plan the 9.0 changes as an exporter and dashboard update, not a redesign.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMjAwIDM5NCIgd2lkdGg9IjEyMDAiIGhlaWdodD0iMzk0IiByb2xlPSJpbWciIGFyaWEtbGFiZWw9Ik1vbmdvREIgb2JzZXJ2YWJpbGl0eSBzdXJmYWNlIGJ5IHJlbGVhc2U6IHdoYXQgOC4wLCA4LjIsIDguMyBhbmQgdGhlIHVwY29taW5nIDkuMCBhZGRlZCBmb3IgbW9uaXRvcmluZyBhbmQgZGlhZ25vc3RpY3MiPjx0aXRsZT5Nb25nb0RCIG9ic2VydmFiaWxpdHkgc3VyZmFjZSBieSByZWxlYXNlOiB3aGF0IDguMCwgOC4yLCA4LjMgYW5kIHRoZSB1cGNvbWluZyA5LjAgYWRkZWQgZm9yIG1vbml0b3JpbmcgYW5kIGRpYWdub3N0aWNzPC90aXRsZT48ZGVmcz48bWFya2VyIGlkPSJhaCIgbWFya2VyV2lkdGg9Ijgi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jkxNi4wIiB5PSIyMzEuMCIgY2xhc3M9ImEiIGZvbnQtc2l6ZT0iMTEiPmluaXRpYWxTeW5jU3RhdHVzIHBoYXNlIGRldGFpbDwvdGV4dD48cmVjdCB4PSIyNCIgeT0iMjkwIiB3aWR0aD0iMTE1MiIgaGVpZ2h0PSI4NCIgcng9IjEwIiBmaWxsPSIjZjRmNWY3IiBzdHJva2U9IiNkY2RlZTQiIHN0cm9rZS13aWR0aD0iMSIvPjx0ZXh0IHg9IjQwIiB5PSIzMTYiIGNsYXNzPSJhYiIgZm9udC1zaXplPSIxMi41IiBmaWxsPSIjMGExNDI0Ij5QbGF0Zm9ybSBjb25zZXF1ZW5jZTwvdGV4dD48dGV4dCB4PSI0MCIgeT0iMzM2IiBjbGFzcz0iYSIgZm9udC1zaXplPSIxMSI+RXhwb3J0ZXJzIGRlcml2ZSBtZXRyaWMgbmFtZXMgZnJvbSBzZXJ2ZXJTdGF0dXMgcGF0aHMsIHNvIGVhY2ggcmVsZWFzZSBhZGRzIHNlcmllcyB3aXRob3V0IGJyZWFraW5nIG9sZCBvbmVzOyB0aGUgb25lIHJlbW92YWwgdG88L3RleHQ+PHRleHQgeD0iNDAiIHk9IjM1MyIgY2xhc3M9ImEiIGZvbnQtc2l6ZT0iMTEiPmhhbmRsZSBpcyB0aGUgOC4zIGRlbGV0aW9uIG9mIHRoZSBzZXJ2ZXJTdGF0dXMgJiN4Mjc7c2VydmljZSYjeDI3OyBmaWVsZC4gUGluIGRhc2hib2FyZHMgdG8gcGF0aHMsIHRlc3QgdGhlbSBhZ2FpbnN0IHRoZSB0YXJnZXQgYnVpbGQgYmVmb3JlIHVwZ3JhZGluZy48L3RleHQ+PC9zdmc+" width="1200" height="394" alt="MongoDB observability surface by release: what MongoDB 8.0, 8.2, 8.3 and the upcoming 9.0 added for monitoring and diagnostics" loading="lazy"><figcaption>Figure 5. How the MongoDB observability surface grew from 8.0 to 9.0, and the one removal dashboards must handle.</figcaption></figure>
<p>Three 9.0 changes matter to MongoDB observability. The notes state that <code>$queryStats</code> collects statistics by default for reads and writes, sampled at 1% through <code>internalQueryStatsSampleRate</code> and <code>internalQueryStatsWriteCmdSampleRate</code>. On 8.x the <a href="https://www.mongodb.com/docs/manual/reference/operator/aggregation/queryStats/" target="_blank" rel="noopener">$queryStats stage</a> requires Atlas M10 or above; a default-on version closes the blind spot of a slow-log-only dataset for shapes that never cross the threshold. New <code>metrics.changeStreams.*</code> counters make change stream consumers observable from the server side. And a per-operation memory limit arrives with <code>metrics.query.operationsFailedDueToMemoryLimit</code>, which belongs on the ticket tier from day one. Whether the <code>$queryStats</code> default applies to self-managed builds is something we will confirm when those builds ship, not before.</p>
<h2>FAQ: MongoDB observability on 8.3</h2>
<details>
<summary>Is the Atlas monitoring UI enough for MongoDB observability?</summary>
<p>For Atlas-only estates it covers collection and dashboards well, and <code>$queryStats</code> is available there on M10 and above. It does not give you a service level objective tied to your own latency threshold, a query-shape history you control across upgrades, or a single view across Atlas and self-managed clusters. Most estates we see need all three, which is why we treat Atlas as one MongoDB observability source rather than the platform.</p>
</details>
<details>
<summary>Why one exporter per member instead of one per cluster?</summary>
<p>Because replication lag, cache pressure and admission queueing are properties of a member. An exporter connected through <code>mongos</code> or a replica-set URI reports whichever member the driver selected, and averages hide the one member that is in trouble. Per-member collection is the first rule of MongoDB observability.</p>
</details>
<details>
<summary>Can the profiler replace the slow log for this pipeline?</summary>
<p>Not safely. The profiler writes to <code>system.profile</code> on the hot path and is a capped collection that rotates under load. The slow log is written at profiling level 0, costs log I/O only, and is already structured JSON. We enable the profiler per incident, with a sample rate, and switch it off afterwards; it is a diagnostic tool, not a MongoDB observability feed.</p>
</details>
<details>
<summary>How do we monitor the Cost-Based Ranker after upgrading to 8.3?</summary>
<p>Collect <code>metrics.query.cbr.*</code> from <code>serverStatus</code> and trend it hourly, and run the plan-shape diff query across the upgrade timestamp. A shape whose plan summary changed and whose p95 rose is the evidence to act on; the counters alone only tell you the ranker is busy. MongoDB observability for the optimiser always needs both.</p>
</details>
<details>
<summary>What retention should the MongoDB observability stores have?</summary>
<p>For MongoDB observability we keep metrics at least as long as the longest objective window plus one comparison period, slow-operation events long enough to span an upgrade cycle, and FTDC archives for as long as you would want to answer a vendor escalation. The DDL above uses thirty days for slow events; that number is a starting point, not a recommendation for regulated estates.</p>
</details>
<h2>Where to go from here</h2>
<p>Build MongoDB observability in the order the incidents arrive: the exporter and host metrics first, the slow-operation dataset second, the objective and its burn-rate pages third, the FTDC archive the same afternoon. Test every rule and every configuration change on a staging cluster before applying it to production, and keep your backup and disaster recovery posture current while you do; observability tells you something is wrong, it does not undo it.</p>
<p>If you would rather have this MongoDB observability platform built and operated for you, our <a href="https://minervadb.com/mongodb-support/">MongoDB Support</a> team runs it as part of 24×7 cover, and you can <a href="https://minervadb.com/contact-minervadb-book-an-appointment/">book a technical conversation</a> with an engineer who has built it before.</p>
<p><a href="https://minervadb.com/mongodb-observability-monitoring-platform/">MongoDB Observability: A Complete 4-Stage Monitoring Platform for MongoDB 8.3</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Connector/C 3.4.11, and 3.3.21 now available</title>
        <link>https://mariadb.com/resources/blog/mariadb-connector-c-3-4-11-and-3-3-21-now-available/</link>
        <pubDate>Tue, 29 Sep 2026 18:25:24 +0000</pubDate>
        <dc:creator>Daniel Bartholomew</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-connector-c-3-4-11-and-3-3-21-now-available/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>MariaDB is pleased to announce the immediate availability of MariaDB Connector/C 3.4.11, and 3.3.21. Download Now Release Notes and Changelogs […]</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-connector-c-3-4-11-and-3-3-21-now-available/">MariaDB Connector/C 3.4.11, and 3.3.21 now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB is pleased to announce the immediate availability of MariaDB Connector/C 3.4.11, and 3.3.21. Download Now Notable items: Notable items: See the release notes and changelogs for more details and visit mariadb.com/downloads/connectors to download.</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-connector-c-3-4-11-and-3-3-21-now-available/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/mariadb-connector-c-3-4-11-and-3-3-21-now-available/">MariaDB Connector/C 3.4.11, and 3.3.21 now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>When pt-online-schema-change “where” Meets Galera: Understanding Chunk Auto-Resize and Flow Control</title>
        <link>https://www.percona.com/blog/when-pt-online-schema-change-where-meets-galera-understanding-chunk-auto-resize-and-flow-control/</link>
        <pubDate>Mon, 28 Sep 2026 13:56:53 +0000</pubDate>
        <dc:creator>Corrado Pandiani</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/when-pt-online-schema-change-where-meets-galera-understanding-chunk-auto-resize-and-flow-control/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Percona Toolkit’s pt-online-schema-change (pt-osc) has long been the preferred solution for performing online schema changes with minimal downtime. Its chunk-based copy algorithm is designed to adapt dynamically to the workload, making it suitable for very large tables in production environments. However, under specific conditions, one of its optimization mechanisms can become counterproductive. During a customer … Continued<br />
The post When pt-online-schema-change “where” Meets Galera: Understanding Chunk Auto-Resize and Flow Control appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/when-pt-online-schema-change-where-meets-galera-understanding-chunk-auto-resize-and-flow-control/">When pt-online-schema-change “where” Meets Galera: Understanding Chunk Auto-Resize and Flow Control</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Percona Toolkit’s pt-online-schema-change (pt-osc) has long been the preferred solution for performing online schema changes with minimal downtime. Its chunk-based copy algorithm is designed to adapt dynamically to the workload, making it suitable for very large tables in production environments.</p>
<p>However, under specific conditions, one of its optimization mechanisms can become counterproductive.</p>
<p>During a customer engagement involving <b>Percona XtraDB Cluster (PXC)</b>, we investigated a case where running pt-online-schema-change with a selective –where clause caused severe <b>Galera Flow Control </b>and general overhead, effectively stalling the cluster for an extended period. The issue was not caused by the schema change itself, but by the interaction between:</p>
<ul>
<li>adaptive chunk auto-resizing</li>
<li>highly selective copying of the newest rows</li>
<li>clustered replication in Galera</li>
<li>InnoDB checkpointing</li>
</ul>
<p>This article explains why it happens and proposes a set of practical mitigations that eliminate the root cause.</p>
<p> </p>
<h2><b>The Scenario</b></h2>
<p>Consider a large table containing hundreds of millions of rows.</p>
<p>Instead of rebuilding the entire table, we only want to copy a subset of rows and apply a schema change like adding a new index.</p>
<p>The command looks similar to:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">pt-online-schema-change 
--alter "ADD INDEX idx_status(status)" 
--where "created_at &gt;= NOW() - INTERVAL 30 DAY" 
D=test,t=events 
--execute --force</pre>
<p>This is a common approach when:</p>
<ul>
<li>historical data can be ignored</li>
<li>only active records require modification</li>
<li>performing staged migrations</li>
<li>reducing migration time</li>
</ul>
<p>At first glance this seems perfectly reasonable.</p>
<p>Unfortunately, it exposes an interesting corner case in pt-online-schema-change.</p>
<p> </p>
<h2><b>How Chunk Auto-Resize Works</b></h2>
<p>During the copy phase, pt-osc continuously adjusts the chunk size in order to keep each chunk copy close to the configured execution time (–chunk-time), 0.5 seconds by default.</p>
<p>Simplified, the algorithm works like this:</p>
<ul>
<li>if chunks execute too quickly, increase the next chunk size</li>
<li>if chunks become slower, decrease the size</li>
<li>repeat until reaching a stable value</li>
</ul>
<p>For ordinary table scans this works remarkably well because row density is relatively uniform.</p>
<p>The problem appears when most scanned rows are discarded by –where.</p>
<p> </p>
<h2><b>The Hidden Effect of a Selective WHERE Clause</b></h2>
<p>Imagine a table like this with 1 billion rows:</p>
<table>
<tbody>
<tr>
<td><b>Rows</b></td>
<td><b>Match WHERE</b></td>
</tr>
<tr>
<td>990 million</td>
<td>No</td>
</tr>
<tr>
<td>10 million</td>
<td>Yes</td>
</tr>
</tbody>
</table>
<p>Suppose the matching rows are located at the end of the clustered index — and that was exactly the case here. Keep in mind that chunk selection always relies on the Primary Key boundaries starting from minimum value, but in this case those boundaries were combined (AND) with the condition passed via –where. Since the created_at values increased in step with the Primary Key, all the matching rows ended up clustered at the end of the index.</p>
<p>For a long time pt-osc scans chunks where almost every row is rejected. The copy operation becomes extremely fast.</p>
<p>The adaptive algorithm interprets this as: <strong>“Chunks are too small.”</strong> It therefore keeps increasing the chunk size.</p>
<p>Eventually, when the scan reaches the first matching rows, the chunk size has already grown dramatically. Instead of copying a few thousand rows, pt-osc may suddenly copy hundreds of thousands—or even a million—of rows in a single transaction.</p>
<p>Nothing is technically wrong. But Galera now has a completely different problem.</p>
<p> </p>
<h2><b>Why Galera Suffers</b></h2>
<p>Every copied chunk is replicated as a write set.</p>
<p>Very large transactions produce:</p>
<ul>
<li>large write sets</li>
<li>long certification phases</li>
<li>increased apply queues</li>
<li>longer replication latency</li>
<li>Flow Control activation</li>
</ul>
<p>Once Flow Control starts, cluster throughput decreases dramatically.</p>
<p>Application commits begin waiting.</p>
<p>In extreme situations the cluster appears almost frozen until the oversized transaction has been fully applied by every node.</p>
<p>Ironically, the adaptive algorithm—designed to optimize throughput—ends up creating exactly the workload pattern that Galera dislikes the most.</p>
<h2></h2>
<h2><b>Why InnoDB Suffers too</b></h2>
<p>As soon as the first large chunks began processing, the following messages appeared in the PXC writer node’s error log:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">[Warning] [MY-014084] [InnoDB] Threads are unable to reserve space in redo log which can't be reclaimed 
due to the 'log_checkpointer' consumer still lagging behind at LSN = 852886039088. 
Consider increasing innodb_redo_log_capacity.</pre>
<p>This indicates that InnoDB received a very large transaction, and the writing threads could not find enough free space in the redo logs because the log_checkpointer consumer was falling behind. In practice, this forces the server to trigger checkpoints more frequently and on a larger scale, which increases overall overhead.</p>
<p>After Galera Replication propagated the write set to the other nodes, the same type of message was observed on them as well, during the apply phase of the replicated transaction.</p>
<h2></h2>
<h2><b>Symptoms</b></h2>
<p>Typical symptoms include:</p>
<ul>
<li>Flow Control percentage rapidly increasing</li>
<li>Growing wsrep_local_recv_queue</li>
<li>High replication lag between nodes</li>
<li>Application commits waiting</li>
<li>CPU utilization increasing</li>
<li>Large spikes in transaction apply time</li>
<li>More frequent InnoDB checkpoints on all the nodes</li>
</ul>
<p>The schema change itself may still complete successfully, but the impact on production traffic can be severe. In the worst scenario this can lead to a complete stall of the cluster due to excessive flow control. This actually happened in production, and the cluster had to be restarted after remaining locked for dozens of minutes.</p>
<p> </p>
<h2><b>The Proposed Fixes</b></h2>
<p>Here are a few options, starting with the simplest and most effective one: <b>disable adaptive chunk resizing whenever a selective </b><b>–where</b><b> clause is used.</b></p>
<p>Instead of continuously increasing chunk sizes, keep them fixed throughout the operation.</p>
<p>Simply include the following options in the command:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">--chunk-time = 0
--max-flow-ctl = 0</pre>
<p>If <strong>–chunk-time</strong> option is set to zero, the chunk size doesn’t auto-adjust, so query times will vary, but query chunk sizes will not. Another way to do the same thing is to specify a value for<a href="https://docs.percona.com/percona-toolkit/pt-online-schema-change.html#cmdoption-pt-online-schema-change-chunk-size"> –chunk-size</a> explicitly, instead of leaving it at the default, and omit the option<a href="https://docs.percona.com/percona-toolkit/pt-online-schema-change.html#cmdoption-pt-online-schema-change-chunk-time"> –chunk-time</a>.</p>
<p>The adaptive algorithm is bypassed. Chunk execution becomes predictable. Transaction size remains bounded. Galera never receives unexpectedly massive write sets. The overall schema change may take slightly longer, but cluster stability improves dramatically. For production environments this is usually the preferable trade-off.</p>
<p> </p>
<p>Another parameter you should consider is <strong>–max-flow-ctl</strong>.</p>
<p>With <strong>–max-flow-ctl=PCT</strong>, pt-osc periodically checks wsrep_flow_control_paused (the percentage of time the node has spent paused for flow control) and automatically pauses row copying whenever it exceeds the threshold, resuming once the cluster drops back below it.</p>
<p>Setting –<strong>-max-flow-ctl</strong> to zero (or very close to it, e.g. 1) makes pt-online-schema-change stop copying rows at the very first sign that any node has entered flow control, rather than tolerating some pause time before backing off — which is the safest possible stance for a production cluster, especially one that’s already showing signs of stress (like the checkpointer-lag warnings, where large transactions were pushing InnoDB’s redo log reclamation to its limit): any additional write pressure from the migration’s chunked copy could tip an already struggling node into a much bigger stall, so a near-zero threshold trades migration speed for safety, letting the tool fully defer to the cluster’s real-time capacity and only advance when there’s genuinely no contention, which is generally the right call for critical, latency-sensitive production workloads where a slower-but-safe schema change beats a fast one that risks a cluster-wide write freeze.</p>
<p>A related lever worth mentioning is <strong>–chunk-index</strong>. By default, pt-online-schema-change chunks the table using the primary key (or the most appropriate unique index it can find), which is precisely why, in our case, chunk boundaries tracked the same monotonically increasing column as created_at and produced the long stretch of near-empty chunks described above. If the table has a secondary index whose ordering is not correlated with created_at, forcing the tool to chunk on that index instead (–chunk-index=idx_name) can spread matching and non-matching rows more evenly across chunks, so the adaptive algorithm never sees the extended low-density run that drives chunk size to unsafe levels in the first place. That said, this is not a substitute for <strong>–chunk-time=0</strong> and <strong>–max-flow-ctl</strong>: pt-osc’s own documentation warns that a poorly chosen chunking index can hurt performance, since it forces query plans, and few tables have a convenient index that is both selective enough to chunk on and uncorrelated with the –where condition. In practice, we recommend treating <strong>–chunk-index</strong> as a secondary, table-specific optimization, with fixed chunk sizes and flow-control awareness remaining the primary safeguard.</p>
<p> </p>
<p>A third option is to avoid the –where clause altogether and split the task into two phases instead. First, run <b>pt-archiver</b> solely to delete the rows you no longer need; then run pt-online-schema-change to alter the table. This two-step procedure avoids any risk stemming from the non-uniform distribution of the matching rows.</p>
<p> </p>
<h2><b>Conclusion</b></h2>
<p><strong>pt-online-schema-change</strong> remains one of the best tools available for online schema migrations.</p>
<p>Nevertheless, when using <strong>–where</strong> to copy only a small subset of rows on <b>Percona XtraDB Cluster</b>, adaptive chunk resizing can unintentionally generate oversized transactions that trigger excessive Galera Flow Control and temporarily stall the cluster.</p>
<p>Keeping chunk sizes fixed eliminates this feedback loop, producing smoother replication behaviour and reducing the operational risk of online schema changes. Other fixes are also available.</p>
<p>Sometimes, predictability is a better optimization than aggressiveness.</p>
<p>The post <a href="https://www.percona.com/blog/when-pt-online-schema-change-where-meets-galera-understanding-chunk-auto-resize-and-flow-control/">When pt-online-schema-change “where” Meets Galera: Understanding Chunk Auto-Resize and Flow Control</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/when-pt-online-schema-change-where-meets-galera-understanding-chunk-auto-resize-and-flow-control/">When pt-online-schema-change “where” Meets Galera: Understanding Chunk Auto-Resize and Flow Control</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Foundation’s Test Automation Framework (TAF) 4.0 Release</title>
        <link>https://mariadb.org/mariadb-foundations-test-automation-framework-taf-4-0-release/</link>
        <pubDate>Mon, 28 Sep 2026 12:50:03 +0000</pubDate>
        <dc:creator>Jonathan Miller</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-foundations-test-automation-framework-taf-4-0-release/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB Foundation’s Performance Test Automation Framework (TAF) 4.0 Release represents the biggest changes to the framework since its creation.<br />
This release reshapes how we organize, run, and report database workloads across MariaDB, MySQL, and now PostgreSQL. …<br />
Continue reading "MariaDB Foundation’s Test Automation Framework (TAF) 4.0 Release"<br />
MariaDB Foundation’s Test Automation Framework (TAF) 4.0 Release appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/mariadb-foundations-test-automation-framework-taf-4-0-release/">MariaDB Foundation’s Test Automation Framework (TAF) 4.0 Release</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Foundation’s Performance Test Automation Framework (TAF) 4.0 Release represents the biggest changes to the framework since its creation.<br />
This release reshapes how we organize, run, and report database workloads across MariaDB, MySQL, and now PostgreSQL. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/mariadb-foundations-test-automation-framework-taf-4-0-release/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;MariaDB Foundation’s Test Automation Framework (TAF) 4.0 Release&#8221;</span></a></p>
<p><a href="https://mariadb.org/mariadb-foundations-test-automation-framework-taf-4-0-release/">MariaDB Foundation’s Test Automation Framework (TAF) 4.0 Release</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/mariadb-foundations-test-automation-framework-taf-4-0-release/">MariaDB Foundation’s Test Automation Framework (TAF) 4.0 Release</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Open FIPS Build, Vectors, and Binlog Server: Marco Tusa at Percona Live</title>
        <link>https://percona.community/blog/2026/09/25/open-mysql-fips-build-percona-live/</link>
        <pubDate>Fri, 25 Sep 2026 12:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/open-fips-build-vectors-and-binlog-server-marco-tusa-at-percona-live/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>This post collects the main things Marco Tusa covered in his keynote at Percona Live 2026 in Amsterdam: where Percona stands on MySQL, which features landed in the server, and what holds the MySQL community together.</p>
<p><a href="https://percona.community/blog/2026/09/25/open-mysql-fips-build-percona-live/">Open FIPS Build, Vectors, and Binlog Server: Marco Tusa at Percona Live</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>This post collects the main things Marco Tusa covered in his keynote at Percona Live 2026 in Amsterdam: where Percona stands on MySQL, which features landed in the server, and what holds the MySQL community together.</p>
<p>Watch it here: <a href="https://www.youtube.com/watch?v=cB6iDhdWW8o" target="_blank" rel="noopener noreferrer">“I Was Going to Show You a Roadmap”</a>, about 18 minutes.</p>
<p>Start with the community, because the rest of it follows from there. In 2011, after the Sun and Oracle acquisitions, O’Reilly stopped the MySQL Conference, and Percona kept a conference going when nobody knew what came next. The community scattered again more recently, and Peter Zaitsev and others regrouped it in the <a href="https://oursqlfoundation.org/" target="_blank" rel="noopener noreferrer">OurSQL Foundation</a>. MySQL, MariaDB, and Percona ship competing solutions. The people running and building them are one community, with one shared interest: this environment stays usable and open.</p>
<h2>Oppose the decision, not the people</h2>
<p>MariaDB moved later Galera development inside an enterprise circle. The MariaDB Foundation pushed back. MariaDB keeps its own version, and others can still improve it. Percona keeps shipping Percona XtraDB Cluster (PXC). PXC has been in production since about 2012, and it was not built as a reply to that dispute. The argument is with the decision, not with the people who made it.</p>
<p>The same rule applies inside Percona. A FIPS implementation in the Pro Build program was available to customers and not to everyone else. That broke the mandate to stay open. The code is open now: it is the default, and everyone can get it.</p>
<h2>What is already there</h2>
<p>This is work in progress, not a list of future dates.</p>
<ul>
<li>A binlog server, shown in Yura Sorokin’s talk “Beyond the Dumb Pipe.” It is early: a bicycle that should become a full server.</li>
<li>Vector search inside Percona Server for MySQL, with no separate system beside it.</li>
<li>Monitoring and observability an agent can use to see a query more clearly.</li>
<li>MyRocks and PXC, still in active development. They are first-class parts of the server, not items added to fill a list.</li>
<li>MySQL Enterprise features carried from version to version. Each version needs merges and adjustments. That work stays in the freely available server.</li>
</ul>
<p>The written vision is at <a href="https://www.percona.com/mysqlvision" target="_blank" rel="noopener noreferrer">percona.com/mysqlvision</a>. The roadmap follows it, in public.</p>
<p>Answer the MariaDB questionnaire from Percona Live, and share the answer. MySQL Calculator is an open source project you can try through the operator. If something is wrong, open an issue.</p>
<p>More sessions from the event are in the <a href="https://www.youtube.com/playlist?list=PLOgsvlaOXz2c" target="_blank" rel="noopener noreferrer">Percona Live 2026 Amsterdam playlist</a>. The same recordings are on the conference site, in <a href="https://perconalive.com/2026-amsterdam/videos/" target="_blank" rel="noopener noreferrer">Videos</a>.</p>
<p><a href="https://percona.community/blog/2026/09/25/open-mysql-fips-build-percona-live/">Open FIPS Build, Vectors, and Binlog Server: Marco Tusa at Percona Live</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Kamatera joins MariaDB Foundation as a Silver Sponsor</title>
        <link>https://mariadb.org/kamatera-joins-mariadb-foundation-as-a-silver-sponsor/</link>
        <pubDate>Thu, 24 Sep 2026 14:11:44 +0000</pubDate>
        <dc:creator>Anna Widenius</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/kamatera-joins-mariadb-foundation-as-a-silver-sponsor/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB Foundation welcomes Kamatera, a global cloud infrastructure provider, as its newest Silver Sponsor.<br />
Kamatera provides scalable cloud servers and infrastructure across a worldwide network of data centres, giving developers and organisations control over where and how they run their applications. …<br />
Continue reading "Kamatera joins MariaDB Foundation as a Silver Sponsor"<br />
Kamatera joins MariaDB Foundation as a Silver Sponsor appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/kamatera-joins-mariadb-foundation-as-a-silver-sponsor/">Kamatera joins MariaDB Foundation as a Silver Sponsor</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Foundation welcomes <a href="https://mariadb.org/kamatera-joins-mariadb-foundation-as-a-silver-sponsor/">Kamatera</a>, a global cloud infrastructure provider, as its newest Silver Sponsor.<br />
<a href="https://mariadb.org/kamatera-joins-mariadb-foundation-as-a-silver-sponsor/">Kamatera</a> provides scalable cloud servers and infrastructure across a worldwide network of data centres, giving developers and organisations control over where and how they run their applications. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/kamatera-joins-mariadb-foundation-as-a-silver-sponsor/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;Kamatera joins MariaDB Foundation as a Silver Sponsor&#8221;</span></a></p>
<p><a href="https://mariadb.org/kamatera-joins-mariadb-foundation-as-a-silver-sponsor/">Kamatera joins MariaDB Foundation as a Silver Sponsor</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/kamatera-joins-mariadb-foundation-as-a-silver-sponsor/">Kamatera joins MariaDB Foundation as a Silver Sponsor</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB R2DBC Connector 1.3.2 and 1.2.4 now available</title>
        <link>https://mariadb.com/resources/blog/mariadb-r2dbc-connector-1-3-2-and-1-2-4-now-available/</link>
        <pubDate>Wed, 23 Sep 2026 22:22:57 +0000</pubDate>
        <dc:creator>Daniel Bartholomew</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-r2dbc-connector-1-3-2-and-1-2-4-now-available/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>MariaDB is pleased to announce the immediate availability of the MariaDB Connector/R2DBC 1.3.2 and 1.2.4 releases. Download Now Release Notes […]</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-r2dbc-connector-1-3-2-and-1-2-4-now-available/">MariaDB R2DBC Connector 1.3.2 and 1.2.4 now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB is pleased to announce the immediate availability of the MariaDB Connector/R2DBC 1.3.2 and 1.2.4 releases. Download Now MariaDB Connector/R2DBC 1.3.2 is a Stable (GA) release. Notable items in this release include: MariaDB Connector/R2DBC 1.2.4 is a Stable (GA) release. Notable items in this release include: See the Connector/</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-r2dbc-connector-1-3-2-and-1-2-4-now-available/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/mariadb-r2dbc-connector-1-3-2-and-1-2-4-now-available/">MariaDB R2DBC Connector 1.3.2 and 1.2.4 now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>TideSQL 5 and MariaDB: the Tides Are Moving Fast</title>
        <link>https://mariadb.org/tidesql-5-and-mariadb-the-tides-are-moving-fast/</link>
        <pubDate>Wed, 23 Sep 2026 10:10:15 +0000</pubDate>
        <dc:creator>Frédéric Descamps</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/tidesql-5-and-mariadb-the-tides-are-moving-fast/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>A few months ago, I wrote about my first experiments with TideSQL, the MariaDB storage engine powered by TidesDB.<br />
At that time, getting started meant building the TidesDB library, adding the TideSQL sources to the MariaDB source tree, compiling everything, installing the plugin and finally playing with:<br />
It worked, and I liked what I saw. …<br />
Continue reading "TideSQL 5 and MariaDB: the Tides Are Moving Fast"<br />
TideSQL 5 and MariaDB: the Tides Are Moving Fast appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/tidesql-5-and-mariadb-the-tides-are-moving-fast/">TideSQL 5 and MariaDB: the Tides Are Moving Fast</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>A few months ago, I wrote about <a href="https://mariadb.org/tidesql-5-and-mariadb-the-tides-are-moving-fast/">my first experiments with TideSQL</a>, the MariaDB storage engine powered by <a href="https://mariadb.org/tidesql-5-and-mariadb-the-tides-are-moving-fast/">TidesDB</a>.<br />
At that time, getting started meant building the TidesDB library, adding the TideSQL sources to the MariaDB source tree, compiling everything, installing the plugin and finally playing with:<br />
It worked, and I liked what I saw. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/tidesql-5-and-mariadb-the-tides-are-moving-fast/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;TideSQL 5 and MariaDB: the Tides Are Moving Fast&#8221;</span></a></p>
<p><a href="https://mariadb.org/tidesql-5-and-mariadb-the-tides-are-moving-fast/">TideSQL 5 and MariaDB: the Tides Are Moving Fast</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/tidesql-5-and-mariadb-the-tides-are-moving-fast/">TideSQL 5 and MariaDB: the Tides Are Moving Fast</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Why is Naomi Cannon bashing MariaDB?</title>
        <link>https://www.fromdual.com/blog/why-is-naomi-cannon-criticising-mariadb/</link>
        <pubDate>Mon, 21 Sep 2026 13:25:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/why-is-naomi-cannon-bashing-mariadb/</guid>
        <source url="https://www.fromdual.com/aggregator/categories/9/">FromDual: FromDual all (en)</source>
        <description><![CDATA[<p>10 days ago, an article by Naomi Cannon on Reddit caught my attention; it included a link to the full article on Medium.<br />
As I read through the article, I didn’t notice any major errors or false statements. What surprised me a bit was the detailed, technical knowledge in this article, which is unusual for a typical tech blogger.<br />
What bothered me about this article was that she mainly bashed MariaDB without offering any meaningful or useful conclusions or advice on what to do (e.g., using InnoDB instead of always jumping on the latest bandwagon, or using a different database product, etc.). So, a lot of ranting about MariaDB but no practical outcome.<br />
That annoyed me a bit, even though I’m not exactly the biggest fan of MariaDB (the company!) myself anymore.<br />
In Search of Naomi Cannon<br />
So I set out to find Naomi Cannon…<br />
On Reddit, I saw that this Naomi Cannon had only been registered there for 3 days (September 11!). Her username was a bit strange: Naomi Cannon, CannonAndQuill, Ready_Turnip_8812, and it was her first post on Reddit!<br />
Her self-description on Reddit:</p>
<p>I’m Naomi, an Irish tech blogger who spends half my time writing about software and the other half wondering why I agreed to work in tech at all.</p>
<p>I then followed her on Medium. There, she had also only been registered for 3 days (September 11!) and this was her first post there as well.<br />
Her self-description on Medium:</p>
<p>I’m Naomi Cannon, an Irish blogger based near Dublin. I write about software, data, and the everyday realities of working in Ireland’s tech scene.</p>
<p>Her name was also a bit strange: 58-fidgety-vile.<br />
That sounds like synthetic names that may have been generated.<br />
Social media<br />
OK. For a tech blogger, it’s important to have a presence somewhere—or everywhere—and thus be well-known. So I conducted a search on Goggle, Bing, Yandex, Baidu, Ecosia and DuckDuckGo. Without any notable success. That’s rather strange for a tech blogger.<br />
I also didn’t find a profile on the social networks LinkedIn and Facebook that would match her.<br />
The Google Lens image search did show me a few women who look very similar to Naomi, but none with the same name.</p>
<p> Profile Image Naomi Cannon</p>
<p>AI Opinions<br />
I also asked three AI systems for their opinions.<br />
kimi.com says:</p>
<p>I tried to dig up background on the author, but honestly there’s very little to be found — which is itself telling.<br />
What I can confirm:</p>
<p>The article exists: “MariaDB and the Mystery of the Disappearing Storage Engines” by “Naomi Cannon,” published very recently on Medium (the listing showed it as roughly 2 hours old when indexed).</p>
<p>It discusses how MariaDB has adopted and then abandoned numerous storage engines over the years.<br />
The Reddit discussion about the article’s premise exists on r/mariadb</p>
<p>What I could not find:</p>
<p>Any biography, LinkedIn, GitHub, conference talks, or other publications under the name “Naomi Cannon” related to databases or MariaDB. A search for “Naomi Cannon” together with MariaDB returned zero results.<br />
A few things about the account are unusual: the Medium handle is @58-fidgety-vile, which is the auto-generated style of username Medium assigns to brand-new accounts, and the display name looks like a generic pseudonym rather than an established byline.</p>
<p>So the honest answer: Naomi Cannon appears to be either a brand-new or pseudonymous writer with no discernible public track record — and given the random auto-generated handle plus a polished, timely technical article published on a fresh account, this has the common hallmarks of AI-generated content-farm accounts that have proliferated on Medium. I can’t prove that, but I’d treat the article’s claims as something to verify against MariaDB’s official documentation and mailing lists rather than trusting the author’s credibility. The topic itself (MariaDB’s history of deprecated storage engines like Aria, TokuDB, MyRocks, Spider, etc.) is legitimate and worth reading about from primary sources if it interests you.</p>
<p>The Google search says:</p>
<p>I do not have direct access to live internet browsing or specific Medium user profile details, so I cannot look up information about Naomi Cannon or read the exact contents of the article you linked.<br />
However, looking at the URL you provided, there are a couple of clues that suggest this might not be a real or permanently established person:</p>
<p>The Random URL Handle: The username in the link (@58-fidgety-vile) uses a system-generated, randomized format. This typically points to an anonymous, throwaway, or newly created account rather than a public tech writer or developer.<br />
Potential AI Generation: Technical storytelling titles like “MariaDB and the Mystery of the Disappearing Storage Engines” are frequently generated by AI or written under aliases for SEO, blog spamming, or quick technical tutorials.</p>
<p>If you want to investigate further, could you copy and paste a few paragraphs of the article, or share the author’s bio if one is listed on the page? I can help you analyze the technical context of the MariaDB issue or check if the writing style seems AI-generated.</p>
<p>And DuckDuckGo’s Duck.ai (using GPT-5.6 Luna) says:</p>
<p>I couldn’t find reliable public information establishing who Naomi Cannon is. The Medium link and the associated profile currently return no readable content, and searches for her name and the article title didn’t reveal a verifiable biography, professional profile, or other clearly connected publications.<br />
The only solid information available from the link itself is that an account using the handle @58-fidgety-vile published an article titled MariaDB and the Mystery of the Disappearing Storage Engines. That alone isn’t enough to identify the author or confirm that “Naomi Cannon” is a real-world identity rather than a pen name or an attribution attached to the post.<br />
The article’s technical topic suggests familiarity with MariaDB and database storage engines, but that’s an inference from the subject matter—not evidence of the author’s background.</p>
<p>Thanks to a tip from my sister, I had already tried using the AI tool Pangram to see if this article was generated by an AI. Here’s what Pangram had to say (click on the image for the full screenshot):</p>
<p> The result from Pangram</p>
<p>Personal Contact<br />
To be on the safe side, I also tried to reach out to Naomi personally on Reddit to get her response:</p>
<p>Hi Naomi<br />
I read your article “MariaDB has adopted and abandoned about a dozen storage engines. Any reason TidesDB and DuckDB go differently?” from September 11, 2026. An interesting article! At a quick glance, I couldn’t find any inaccuracies in it. And your article delves quite deeply into the subject, both technically and historically. For an “outsider”, the article is remarkable. You must have spent days researching it, right?<br />
But what’s the point of this critical article? What do I take away from it? What’s the main message?<br />
Naturally, this raises some questions for me:</p>
<p>Did you research all this information yourself, or did someone pass it on to you?<br />
Who are you? You just appeared out of nowhere? I couldn’t find anything about you online. What other technical articles do you publish? For a blogger, that’s pretty sparse information.<br />
What motivated you to write this article? How do you fund your work? The research required for this article is immense!</p>
<p>I’d appreciate it if you could shed some light on this matter.<br />
Best regards,<br />
Oli</p>
<p>Unfortunately, as of today (7 days later), I still haven’t received a reply from Naomi.<br />
I waited a while before publishing this blog post to give her a fair chance to respond.<br />
Conclusion<br />
So we can conclude the following:</p>
<p>It is highly likely that this is a fake account on both Reddit and Medium. Possibly even automatically generated?<br />
The article is very likely AI-generated.</p>
<p>But what’s all this bashing about MariaDB, and who started it?<br />
I suspect the whole thing was a FUD campaign against MariaDB.<br />
According to Google AI, a FUD campaign is:</p>
<p>A FUD campaign (short for Fear, Uncertainty, and Doubt) is a targeted communication or marketing strategy in which negative, vague, or false information is deliberately spread to undermine confidence in a product, company, brand, or technology (such as cryptocurrencies).<br />
Goals of a FUD campaign</p>
<p>Uncertainty: The target audience or investors are meant to doubt the security, quality, or future of an offering.<br />
Competitive advantage: Competitors or differing standards are meant to be portrayed in a negative light in order to better position one’s own products.<br />
Steering Behavior: People are to be pressured into taking a specific action—for example, selling stocks or crypto assets, or switching to another provider.</p>
<p>Typical Characteristics</p>
<p>Use of emotional arguments instead of factual information.<br />
Spreading half-truths, rumors, or exaggerated risk scenarios.<br />
Frequent use in anonymous or hard-to-control online channels and social media.</p>
<p>And who’s supposed to have done this?<br />
Naomi mentions “Ireland” in her profile. Ireland is home to the headquarters of numerous U.S. tech companies… That’s all the clues I have.<br />
We could try contacting Reddit and Medium to get more information. But I’m afraid that won’t yield anything useful.</p>
<p>This page was translated using deepl.com.</p>
<p><a href="https://www.fromdual.com/blog/why-is-naomi-cannon-criticising-mariadb/">Why is Naomi Cannon bashing MariaDB?</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>10 days ago, an article by Naomi Cannon on <a href="https://www.reddit.com/r/mariadb/comments/1wdn11p/mariadb_has_adopted_and_abandoned_about_a_dozen/" target="_blank" title="MariaDB has adopted and abandoned about a dozen storage engines. Any reason TidesDB and DuckDB go differently?">Reddit</a> caught my attention; it included a link to the full article on <a href="https://medium.com/@58-fidgety-vile/mariadb-and-the-mystery-of-the-disappearing-storage-engines-49d0e6600ea3" target="_blank" title="MariaDB and the Mystery of the Disappearing Storage Engines">Medium</a>.</p>
<p>As I read through the article, I didn’t notice any major errors or false statements. What surprised me a bit was the detailed, technical knowledge in this article, which is unusual for a typical tech blogger.</p>
<p>What bothered me about this article was that she mainly bashed MariaDB without offering any meaningful or useful conclusions or advice on what to do (e.g., using InnoDB instead of always jumping on the latest bandwagon, or using a different database product, etc.). So, a lot of ranting about MariaDB but no practical outcome.</p>
<p>That annoyed me a bit, even though I’m not exactly the biggest fan of MariaDB (the company!) myself anymore.</p>
<h2>In Search of Naomi Cannon</h2>
<p>So I set out to find Naomi Cannon…</p>
<p>On Reddit, I saw that this Naomi Cannon had only been registered there for 3 days (September 11!). Her username was a bit strange: Naomi Cannon, CannonAndQuill, <a href="https://www.reddit.com/user/Ready_Turnip_8812/" target="_blank">Ready_Turnip_8812</a>, and it was her first post on Reddit!</p>
<p>Her self-description on Reddit:</p>
<blockquote>
<p>I’m Naomi, an Irish tech blogger who spends half my time writing about software and the other half wondering why I agreed to work in tech at all.</p>
</blockquote>
<p>I then followed her on Medium. There, she had also only been registered for 3 days (September 11!) and this was her first post there as well.</p>
<p>Her self-description on Medium:</p>
<blockquote>
<p>I’m Naomi Cannon, an Irish blogger based near Dublin. I write about software, data, and the everyday realities of working in Ireland’s tech scene.</p>
</blockquote>
<p>Her name was also a bit strange: <a href="https://medium.com/@58-fidgety-vile" target="_blank">58-fidgety-vile</a>.</p>
<p>That sounds like synthetic names that may have been generated.</p>
<h2>Social media</h2>
<p>OK. For a tech blogger, it’s important to have a presence somewhere—or everywhere—and thus be well-known. So I conducted a search on <a href="https://www.google.com/" target="_blank">Goggle</a>, <a href="https://www.bing.com/" target="_blank">Bing</a>, <a href="https://yandex.com/" target="_blank">Yandex</a>, <a href="https://www.baidu.com/" target="_blank">Baidu</a>, <a href="https://www.ecosia.org/" target="_blank">Ecosia</a> and <a href="https://duckduckgo.com/" target="_blank">DuckDuckGo</a>. Without any notable success. That’s rather strange for a tech blogger.</p>
<p>I also didn’t find a profile on the social networks <a href="https://www.linkedin.com/" target="_blank">LinkedIn</a> and <a href="https://www.facebook.com/" target="_blank">Facebook</a> that would match her.</p>
<p>The <a href="https://lens.google/" target="_blank">Google Lens</a> image search did show me a few women who look very similar to Naomi, but none with the same name.</p>
<figure>
<p><img decoding="async" src="https://www.fromdual.com/blog/why-is-naomi-cannon-criticising-mariadb/naomi_cannon.jpeg" alt="Naomi Cannon"></p><figcaption>Profile Image Naomi Cannon</figcaption></figure>
<p> </p>
<h2>AI Opinions</h2>
<p>I also asked three AI systems for their opinions.</p>
<p><a href="https://www.kimi.com/" target="_blank">kimi.com</a> says:</p>
<blockquote>
<p>I tried to dig up background on the author, but honestly there’s very little to be found — which is itself telling.<br />
What I can confirm:</p>
<ul>
<li>
<p>The article exists: “MariaDB and the Mystery of the Disappearing Storage Engines” by “Naomi Cannon,” published very recently on Medium (the listing showed it as roughly 2 hours old when indexed).</p>
</li>
<li>
<p>It discusses how MariaDB has adopted and then abandoned numerous storage engines over the years.<br />
The Reddit discussion about the article’s premise exists on r/mariadb</p>
</li>
</ul>
<p>What I could not find:</p>
<ul>
<li>Any biography, LinkedIn, GitHub, conference talks, or other publications under the name “Naomi Cannon” related to databases or MariaDB. A search for “Naomi Cannon” together with MariaDB returned zero results.</li>
<li>A few things about the account are unusual: the Medium handle is @58-fidgety-vile, which is the auto-generated style of username Medium assigns to brand-new accounts, and the display name looks like a generic pseudonym rather than an established byline.</li>
</ul>
<p>So the honest answer: Naomi Cannon appears to be either a brand-new or pseudonymous writer with no discernible public track record — and given the random auto-generated handle plus a polished, timely technical article published on a fresh account, this has the common hallmarks of AI-generated content-farm accounts that have proliferated on Medium. I can’t prove that, but I’d treat the article’s claims as something to verify against MariaDB’s official documentation and mailing lists rather than trusting the author’s credibility. The topic itself (MariaDB’s history of deprecated storage engines like Aria, TokuDB, MyRocks, Spider, etc.) is legitimate and worth reading about from primary sources if it interests you.</p>
</blockquote>
<p>The <a href="https://www.google.com/" target="_blank">Google</a> search says:</p>
<blockquote>
<p>I do not have direct access to live internet browsing or specific Medium user profile details, so I cannot look up information about Naomi Cannon or read the exact contents of the article you linked.<br />
However, looking at the URL you provided, there are a couple of clues that suggest this might not be a real or permanently established person:</p>
<ul>
<li>The Random URL Handle: The username in the link (@58-fidgety-vile) uses a system-generated, randomized format. This typically points to an anonymous, throwaway, or newly created account rather than a public tech writer or developer.</li>
<li>Potential AI Generation: Technical storytelling titles like “MariaDB and the Mystery of the Disappearing Storage Engines” are frequently generated by AI or written under aliases for SEO, blog spamming, or quick technical tutorials.</li>
</ul>
<p>If you want to investigate further, could you copy and paste a few paragraphs of the article, or share the author’s bio if one is listed on the page? I can help you analyze the technical context of the MariaDB issue or check if the writing style seems AI-generated.</p>
</blockquote>
<p>And <a href="https://duckduckgo.com/" target="_blank">DuckDuckGo</a>’s Duck.ai (using GPT-5.6 Luna) says:</p>
<blockquote>
<p>I couldn’t find reliable public information establishing who Naomi Cannon is. The Medium link and the associated profile currently return no readable content, and searches for her name and the article title didn’t reveal a verifiable biography, professional profile, or other clearly connected publications.</p>
<p>The only solid information available from the link itself is that an account using the handle @58-fidgety-vile published an article titled MariaDB and the Mystery of the Disappearing Storage Engines. That alone isn’t enough to identify the author or confirm that “Naomi Cannon” is a real-world identity rather than a pen name or an attribution attached to the post.</p>
<p>The article’s technical topic suggests familiarity with MariaDB and database storage engines, but that’s an inference from the subject matter—not evidence of the author’s background.</p>
</blockquote>
<p>Thanks to a tip from my sister, I had already tried using the AI tool <a href="https://www.pangram.com/" target="_blank">Pangram</a> to see if this article was generated by an AI. Here’s what Pangram had to say (click on the image for the full screenshot):</p>
<figure>
<p><a href="https://www.fromdual.com/blog/why-is-naomi-cannon-criticising-mariadb/pangram_Screenshot_20260914_140738.png" title="volle Grösse"><img decoding="async" src="https://www.fromdual.com/blog/why-is-naomi-cannon-criticising-mariadb/pangram_Screenshot_20260914_140738_422x739.png" alt="Pangram Result"></a></p><figcaption>The result from Pangram</figcaption></figure>
<p> </p>
<h2>Personal Contact</h2>
<p>To be on the safe side, I also tried to reach out to Naomi personally on Reddit to get her response:</p>
<blockquote>
<p>Hi Naomi</p>
<p>I read your article “MariaDB has adopted and abandoned about a dozen storage engines. Any reason TidesDB and DuckDB go differently?” from September 11, 2026. An interesting article! At a quick glance, I couldn’t find any inaccuracies in it. And your article delves quite deeply into the subject, both technically and historically. For an “outsider”, the article is remarkable. You must have spent days researching it, right?</p>
<p>But what’s the point of this critical article? What do I take away from it? What’s the main message?</p>
<p>Naturally, this raises some questions for me:</p>
<ul>
<li>Did you research all this information yourself, or did someone pass it on to you?</li>
<li>Who are you? You just appeared out of nowhere? I couldn’t find anything about you online. What other technical articles do you publish? For a blogger, that’s pretty sparse information.</li>
<li>What motivated you to write this article? How do you fund your work? The research required for this article is immense!</li>
</ul>
<p>I’d appreciate it if you could shed some light on this matter.</p>
<p>Best regards,<br />
Oli</p>
</blockquote>
<p>Unfortunately, as of today (7 days later), I still haven’t received a reply from Naomi.<br />
I waited a while before publishing this blog post to give her a fair chance to respond.</p>
<h2>Conclusion</h2>
<p>So we can conclude the following:</p>
<ul>
<li>It is highly likely that this is a fake account on both Reddit and Medium. Possibly even automatically generated?</li>
<li>The article is very likely AI-generated.</li>
</ul>
<p>But what’s all this bashing about MariaDB, and who started it?</p>
<p>I suspect the whole thing was a <a href="https://de.wikipedia.org/wiki/Fear,_Uncertainty_and_Doubt" target="_blank">FUD campaign</a> against MariaDB.</p>
<p>According to Google AI, a FUD campaign is:</p>
<blockquote>
<p>A <strong>FUD campaign</strong> (short for <em>Fear, Uncertainty, and Doubt</em>) is a targeted communication or marketing strategy in which negative, vague, or false information is deliberately spread to undermine confidence in a product, company, brand, or technology (such as cryptocurrencies).</p>
<h4>Goals of a FUD campaign</h4>
<ul>
<li><strong>Uncertainty</strong>: The target audience or investors are meant to doubt the security, quality, or future of an offering.</li>
<li><strong>Competitive advantage</strong>: Competitors or differing standards are meant to be portrayed in a negative light in order to better position one’s own products.</li>
<li><strong>Steering Behavior</strong>: People are to be pressured into taking a specific action—for example, selling stocks or crypto assets, or switching to another provider.</li>
</ul>
<h4>Typical Characteristics</h4>
<ul>
<li>Use of emotional arguments instead of factual information.</li>
<li>Spreading half-truths, rumors, or exaggerated risk scenarios.</li>
<li>Frequent use in anonymous or hard-to-control online channels and social media.</li>
</ul>
</blockquote>
<p>And who’s supposed to have done this?</p>
<p>Naomi mentions “Ireland” in her profile. Ireland is home to the headquarters of numerous U.S. tech companies… That’s all the clues I have.</p>
<p>We could try contacting Reddit and Medium to get more information. But I’m afraid that won’t yield anything useful.</p>
<p>This page was translated using <a href="https://www.deepl.com/en/translator" target="_blank">deepl.com</a>.</p>
<p><a href="https://www.fromdual.com/blog/why-is-naomi-cannon-criticising-mariadb/">Why is Naomi Cannon bashing MariaDB?</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>DISTANCE() and VECTOR_DISTANCE(): Vector Similarity in Percona Server for MySQL 9.7</title>
        <link>https://www.percona.com/blog/vector-distance-vector-similarity-search-in-percona-server-for-mysql/</link>
        <pubDate>Mon, 21 Sep 2026 09:57:06 +0000</pubDate>
        <dc:creator>Catalin Besleaga</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/distance-and-vector_distance-vector-similarity-in-percona-server-for-mysql-9-7/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>TL;DR Percona Server for MySQL 9.7.2-2 now supports DISTANCE() for vector similarity scoring directly in SQL (COSINE, EUCLIDEAN, MANHATTAN, DOT metrics). This is the compute primitive you need to rank or filter embeddings by similarity directly in SQL. ANN indexing (e.g. HNSW, IVF) is the next milestone for fast large-scale similarity search; and this function provides … Continued<br />
The post DISTANCE() and VECTOR_DISTANCE(): Vector Similarity in Percona Server for MySQL 9.7 appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/vector-distance-vector-similarity-search-in-percona-server-for-mysql/">DISTANCE() and VECTOR_DISTANCE(): Vector Similarity in Percona Server for MySQL 9.7</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<h2><b>TL;DR</b></h2>
<p><span>Percona Server for </span><span>MySQL 9.7.2-2</span><span> now supports DISTANCE() for vector similarity scoring directly in SQL (COSINE, EUCLIDEAN, MANHATTAN, DOT metrics). This is the compute primitive you need to rank or filter embeddings by similarity directly in SQL. ANN indexing (e.g. HNSW, IVF) is the next milestone for fast large-scale similarity search; and this function provides the scoring layer that indexing strategies will further accelerate.</span></p>
<h2><b>Why we’re adding this</b></h2>
<p><span>MySQL’s native </span><span>DISTANCE()</span><span> and </span><span>VECTOR_DISTANCE()</span><span> functions are only available in HeatWave MySQL on OCI, not included in Community or Commercial MySQL, and limited to three metrics (COSINE, DOT, EUCLIDEAN). Percona is bringing the same capability to anyone running Percona Server for MySQL on any supported platform.</span></p>
<p><span>MySQL 9.7 already supports the </span><span>VECTOR</span><span> data type (</span><span>TO_VECTOR()</span><span> and </span><span>FROM_VECTOR()</span><span> functions) for storing embeddings. </span><span>DISTANCE()</span><span> is the natural next step: it lets you </span><i><span>query</span></i><span> by similarity directly in SQL, ranking or filtering rows based on vector distance, without leaving MySQL.</span></p>
<h2><b>Background on Vectors &amp; Distance Metrics</b></h2>
<h3><b>What’s a vector?</b></h3>
<p><span>A fixed-length list of numbers, an “embedding” produced by an ML model to represent something (text, an image, a product, a user preference). The key insight: “similar” things end up with numerically close vectors, so you can compute their distance to rank or filter them.</span></p>
<h3><b>What’s a distance metric?</b></h3>
<p><span>A mathematical function that turns two vectors into a single number describing similarity. Here are the five metrics this release supports:</span></p>
<ul>
<li><b>EUCLIDEAN (L2):</b><span> Straight-line distance, the intuitive notion of geometric distance. General-purpose; works well when magnitude matters.</span></li>
<li><b>EUCLIDEAN_SQUARED:</b><span> Same ranking as EUCLIDEAN, but skips the square root. Faster for comparisons and </span><span>ORDER BY</span><span> clauses when you only care about ordering, not the actual value.</span></li>
<li><b>MANHATTAN (L1):</b><span> Grid-style distance (like taxicab distance on a city grid). More robust to outliers than Euclidean in some applications.</span></li>
<li><b>COSINE </b><span>similarity: Measures the angle between two vectors. Cosine distance is computed as 1 minus the cosine similarity so that smaller value = more similar.</span></li>
<li><b>DOT (inner product):</b><span> Raw dot product </span><span>sum(a[i] * b[i])</span><span>. Used by models trained specifically for dot-product similarity (e.g., some matrix-factorization systems). Normally higher values mean more similar but since it is common in the industry to multiply by -1 and flip the scale: now smaller values = more similar, in line with the other metrics above.</span></li>
</ul>
<h3><b>What’s SIMD?</b></h3>
<p><span>Single Instruction, Multiple Data: a CPU capability that performs the same arithmetic on many numbers at once instead of one at a time. Distance math over hundreds of dimensions (embedding size) is exactly the kind of repetitive arithmetic that SIMD accelerates. The Percona implementation automatically detects and uses the best SIMD tier available on your hardware at startup, no recompilation needed per target architecture.</span></p>
<h2><b>Meet DISTANCE() / VECTOR_DISTANCE()</b></h2>
<p><b>Function signature:</b></p>
<p><span>DISTANCE(vector1, vector2, metric)</span></p>
<p><span>Where: – </span><span>vector1</span><span> and </span><span>vector2</span><span> are </span><span>VECTOR</span><span> data type or binary string literals (via </span><span>TO_VECTOR()</span><span>). – </span><span>metric</span><span> is a fixed literal string (case-insensitive, not a column nor an expression): </span><span>‘EUCLIDEAN’</span><span>, </span><span>‘EUCLIDEAN_SQUARED’</span><span>, </span><span>‘MANHATTAN’</span><span>, </span><span>‘COSINE’</span><span>, or </span><span>‘DOT’</span><span>. – Returns a </span><span>DOUBLE</span><span> representing the distance/similarity score.</span></p>
<p><b>Synonym:</b> <span>VECTOR_DISTANCE()</span><span> is an alias with identical behavior.</span></p>
<p><b>Choosing a metric:</b><span> Match the metric to how your embedding model was trained. Most modern embedding models (OpenAI, Cohere, etc.) are trained with COSINE similarity, so use </span><span>‘COSINE’</span><span>. If magnitude carries meaning (e.g., you’re working with raw feature vectors, not normalized embeddings), use </span><span>‘EUCLIDEAN’</span><span> or </span><span>‘EUCLIDEAN_SQUARED’</span><span>. When in doubt, check your embedding model’s documentation.</span></p>
<ul>
<li><b>All dimensions must match:</b><span> Both vectors must have the same dimensionality, or the function returns an error.</span></li>
<li><span>If either input is NULL, the result is NULL.</span></li>
</ul>
<h2><b>Getting started: Step-by-step example</b></h2>
<h3><b>1. Create a table with vector embeddings</b></h3>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">CREATE TABLE products (
 id INT PRIMARY KEY,
 name VARCHAR(255),
 embedding VECTOR(1536)  -- Example: 1536-dimensional embedding
);</pre>
</p>
<h3><b>2. Insert some embeddings</b></h3>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">INSERT INTO products VALUES
 (1, 'Product A', TO_VECTOR('[0.1, 0.2, 0.3, ..., 0.384]')),
 (2, 'Product B', TO_VECTOR('[0.15, 0.25, 0.35, ..., 0.385]')),
 (3, 'Product C', TO_VECTOR('[0.5, 0.6, 0.7, ..., 0.800]'));</pre>
</p>
<h3><b>3. Query by similarity</b></h3>
<p><span>Find the top-5 products most similar to a query embedding:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">SELECT id, name, DISTANCE(embedding, TO_VECTOR('[0.12, 0.22, 0.32, ..., 0.382]'), 'EUCLIDEAN') AS similarity_score
FROM products
ORDER BY similarity_score
LIMIT 5;</pre>
<p><b>Results ordered by highest similarity first (best/closest matches first) :</b></p>
<pre class="urvanov-syntax-highlighter-plain-tag">id | name       | similarity_score
---|------------|------------------
2  | Product B  | 0.5432109
1  | Product A  | 0.9654321
3  | Product C  | 0.9876543</pre>
</p>
<h2><b>Under the hood: SIMD dispatch that adapts to your hardware</b></h2>
<p><span>The engineering story behind the performance claim: instead of compiling the binary once for a specific CPU (with </span><span>-march=native</span><span>), Percona’s implementation detects the CPU’s capabilities at startup and selects the best available SIMD tier:</span></p>
<ul>
<li><b>SSE4.2</b><span> (x86_64) or </span><b>NEON</b><span> (aarch64):  128-bit SIMD, ~2–3× speedup over scalar.</span></li>
<li><b>AVX2</b><span> (x86_64):  256-bit SIMD, ~4–6× speedup.</span></li>
<li><b>AVX-512F</b><span> (x86_64): 512-bit SIMD, ~8–12× speedup on CPUs that support it.</span></li>
<li><b>SVE2</b><span> (aarch64): scalable SIMD on ARM, adapts to the CPU’s vector width.</span></li>
<li><b>Scalar</b><span>: unoptimized fallback, works everywhere.</span></li>
</ul>
<p><b>Dimension-aware kernel selection:</b><span> Distance calculations on small vectors (&lt;16 dimensions) uses the narrower 128-bit tier, because the overhead of setting up larger SIMD registers outweighs the benefit. Larger vectors automatically use the widest available tier.</span></p>
<p><b>Unaligned loads by design:</b> <span>VECTOR</span><span> column data isn’t guaranteed to be cache-line aligned (and shouldn’t require alignment). All SIMD kernels use unaligned-load intrinsics as modern CPUs have identical throughput for aligned and unaligned loads when data is in cache. By always using unaligned loads, we avoid faulting on misaligned input without sacrificing performance.</span></p>
<h2><b>Current limitations and what’s coming next</b></h2>
<p><span>DISTANCE()</span><span> is a scalar function that computes the distance between two vectors and returns a single number. </span><b>Without an approximate-nearest-neighbor (ANN) index, a query like </b><b>ORDER BY DISTANCE(…) LIMIT k</b><b> over a large table is a full table scan:</b><span> you call the distance function on every row, then sort. It’s correct and SIMD-accelerated per row, but it scales as O(n), not O(log n).</span></p>
<p><b>The natural next step: ANN indexing.</b><span> To make large-scale similarity search fast (e.g., finding the 10 nearest neighbors in a table of 1 million vectors in milliseconds), you need an approximate-nearest-neighbor index: HNSW (Hierarchical Navigable Small World), IVF (Inverted File with refinement), or similar. These are graph-based or clustering-based structures that prune the search space and return approximate results much faster. This is the direction the vector feature is building toward, and it’s on the roadmap. For now, </span><span>DISTANCE()</span><span> is the scoring primitive that those indexing strategies will accelerate.</span></p>
<p><span>While ANN indexing delivers speed, it relies on approximate results. Should your application require exact precision instead of estimates, the DISTANCE() function is available in Percona Server for MySQL 9.7.2-2</span><span>.</span></p>
<h2><b>We want your feedback</b></h2>
<p><span>Try it out and let us know what you think: – Report bugs or feature ideas on</span> <a href="https://perconadev.atlassian.net/jira/software/c/projects/PS/list"><b>JIRA</b></a><span>.</span><span> – Join the conversation on </span><a href="https://forums.percona.com/c/mysql-mariadb/36"><b>Percona community forum</b></a><span>. – Questions about usage or performance? <a href="https://percona.community/contribute/contact/">Reach out to us</a></span><span>.</span></p>
<p><span>Your feedback shapes the roadmap, especially use cases you’d like to see (e.g., specific ANN index strategies, embedding model integrations, performance tuning for your workload).</span></p>
<h2><b>See also</b></h2>
<ul>
<li><a href="https://dev.mysql.com/doc/refman/9.7/en/vector.html"><span>VECTOR</span><span> data type documentation</span></a></li>
<li><a href="https://dev.mysql.com/doc/refman/9.1/en/vector-functions.html"><span>DISTANCE()</span><span> / </span><span>VECTOR_DISTANCE()</span><span> reference</span></a></li>
<li><span>Getting started with vector search in Percona Server for MySQL (coming soon)</span></li>
<li><a href="https://www.percona.com/blog/an-introduction-to-vector-databases/">An Introduction to Vector Databases</a></li>
</ul>
<p> </p>
<hr>
<p><em>Written by Catalin Besleaga. Reviewed by Dennis Kittrell and Peter Zaitsev.</em><br />
<em>Percona® is a registered trademark of Percona LLC. MySQL® is a registered trademark of Oracle Corporation.</em></p>
<p>The post <a href="https://www.percona.com/blog/vector-distance-vector-similarity-search-in-percona-server-for-mysql/">DISTANCE() and VECTOR_DISTANCE(): Vector Similarity in Percona Server for MySQL 9.7</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/vector-distance-vector-similarity-search-in-percona-server-for-mysql/">DISTANCE() and VECTOR_DISTANCE(): Vector Similarity in Percona Server for MySQL 9.7</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>“Verify, Measure, and Get Your Hands Dirty”: Two Decades of Database Support with Sveta Smirnova</title>
        <link>https://mariadb.org/sveta-smirnova-interview/</link>
        <pubDate>Fri, 18 Sep 2026 15:44:43 +0000</pubDate>
        <dc:creator>Simona Aleksandrova</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/verify-measure-and-get-your-hands-dirty-two-decades-of-database-support-with-sveta-smirnova/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>At Percona Live Amsterdam I caught up with Sveta Smirnova, a world-renowned MySQL expert, author of “MySQL Troubleshooting” and “MySQL Cookbook, 4th Edition”, and a frequent speaker at events from Oracle OpenWorld and FOSDEM to HighLoad. …<br />
Continue reading "“Verify, Measure, and Get Your Hands Dirty”: Two Decades of Database Support with Sveta Smirnova"<br />
“Verify, Measure, and Get Your Hands Dirty”: Two Decades of Database Support with Sveta Smirnova appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/sveta-smirnova-interview/">“Verify, Measure, and Get Your Hands Dirty”: Two Decades of Database Support with Sveta Smirnova</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>At Percona Live Amsterdam I caught up with Sveta Smirnova, a world-renowned MySQL expert, author of “MySQL Troubleshooting” and “MySQL Cookbook, 4th Edition”, and a frequent speaker at events from Oracle OpenWorld and FOSDEM to HighLoad. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/sveta-smirnova-interview/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;“Verify, Measure, and Get Your Hands Dirty”: Two Decades of Database Support with Sveta Smirnova&#8221;</span></a></p>
<p><a href="https://mariadb.org/sveta-smirnova-interview/">“Verify, Measure, and Get Your Hands Dirty”: Two Decades of Database Support with Sveta Smirnova</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/sveta-smirnova-interview/">“Verify, Measure, and Get Your Hands Dirty”: Two Decades of Database Support with Sveta Smirnova</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Galera Cluster Remains An Integral Part of MariaDB Server</title>
        <link>https://mariadb.com/resources/blog/galera-cluster-remains-an-integral-part-of-mariadb-server/</link>
        <pubDate>Thu, 17 Sep 2026 19:32:12 +0000</pubDate>
        <dc:creator>Max Mether</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/galera-cluster-remains-an-integral-part-of-mariadb-server/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>As we reach the final release of the MySQL version of Galera Cluster, we want to provide clarity around the […]</p>
<p><a href="https://mariadb.com/resources/blog/galera-cluster-remains-an-integral-part-of-mariadb-server/">Galera Cluster Remains An Integral Part of MariaDB Server</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>As we reach the final release of the MySQL version of Galera Cluster, we want to provide clarity around the long-term options for Galera Cluster users. In May 2025, MariaDB acquired Codership and its Galera Cluster technology. Galera Cluster, at the time, existed across two primary distributions: We are committed to maintaining MariaDB Galera Cluster within MariaDB Community…</p>
<p><a href="https://mariadb.com/resources/blog/galera-cluster-remains-an-integral-part-of-mariadb-server/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/galera-cluster-remains-an-integral-part-of-mariadb-server/">Galera Cluster Remains An Integral Part of MariaDB Server</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>The database world grew up — notes from Percona Live Amsterdam</title>
        <link>https://mariadb.org/the-database-world-grew-up-notes-from-percona-live-amsterdam/</link>
        <pubDate>Thu, 17 Sep 2026 13:09:27 +0000</pubDate>
        <dc:creator>Kaj Arnö</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/the-database-world-grew-up-notes-from-percona-live-amsterdam/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Last week I spent a few days in Amsterdam at Percona Live. It was the first Percona Live in Europe since before the pandemic, and you could feel it in the room: a slightly disbelieving happiness at simply being together again. …<br />
Continue reading "The database world grew up — notes from Percona Live Amsterdam"<br />
The database world grew up — notes from Percona Live Amsterdam appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/the-database-world-grew-up-notes-from-percona-live-amsterdam/">The database world grew up — notes from Percona Live Amsterdam</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Last week I spent a few days in Amsterdam at Percona Live. It was the first Percona Live in Europe since before the pandemic, and you could feel it in the room: a slightly disbelieving happiness at simply being together again. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/the-database-world-grew-up-notes-from-percona-live-amsterdam/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;The database world grew up — notes from Percona Live Amsterdam&#8221;</span></a></p>
<p><a href="https://mariadb.org/the-database-world-grew-up-notes-from-percona-live-amsterdam/">The database world grew up — notes from Percona Live Amsterdam</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/the-database-world-grew-up-notes-from-percona-live-amsterdam/">The database world grew up — notes from Percona Live Amsterdam</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Evaluating LLM models for DBA tasks</title>
        <link>https://www.percona.com/blog/evaluating-llm-models-for-dba-tasks/</link>
        <pubDate>Thu, 17 Sep 2026 11:50:07 +0000</pubDate>
        <dc:creator>Vadim Tkachenko</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/evaluating-llm-models-for-dba-tasks/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>  Evaluating LLM Models for DBA Tasks Large language models are increasingly capable of performing practical systems-administration tasks. I wanted to understand how well they could handle something more specialized: database administration. To explore this, I developed a harness for evaluating the ability of different LLMs to execute real DBA tasks on remote systems. My … Continued<br />
The post Evaluating LLM models for DBA tasks appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/evaluating-llm-models-for-dba-tasks/">Evaluating LLM models for DBA tasks</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p> </p>
<h1>Evaluating LLM Models for DBA Tasks</h1>
<p>Large language models are increasingly capable of performing practical systems-administration tasks. I wanted to understand how well they could handle something more specialized: <strong>database administration</strong>.</p>
<p>To explore this, I developed a harness for evaluating the ability of different LLMs to execute real DBA tasks on remote systems.</p>
<p>My primary focus is on <strong>open-weight models</strong> because of their deployment flexibility and cost efficiency. Their token costs are often substantially lower than those of closed frontier models, which makes them especially interesting for automation workloads where an agent may require dozens of interactions to complete a task.</p>
<h2>Models Tested</h2>
<p>The models I am currently evaluating fall into two broad categories.</p>
<h3>Heavy, Full-Size Models</h3>
<ul>
<li><code>qwen/qwen3.8-max</code></li>
<li><code>moonshotai/kimi-k3</code></li>
<li><code>z-ai/glm-5.3</code></li>
<li><code>deepseek/deepseek-v4-pro-0813</code></li>
</ul>
<h3>Lighter or Flash Models</h3>
<ul>
<li><code>deepseek/deepseek-v4-flash-0731</code></li>
<li><code>qwen/qwen3.8-27b</code></li>
<li><code>meta/muse-glimmer-30b</code></li>
<li><code>google/gemma-4-31b-it</code></li>
</ul>
<p>I use <strong>OpenRouter</strong> to manage requests and responses across the different models.</p>
<h2>How the DBA AI Harness Works</h2>
<p>The project is available here:</p>
<p><a href="https://github.com/Percona-Lab/dbaai_bench">https://github.com/Percona-Lab/dbaai_bench</a></p>
<p>The workflow is intentionally straightforward.</p>
<ol>
<li>The harness receives a task, for example:<code>Install Percona Server for MySQL 8.4</code></li>
<li>It sends the task to the selected LLM and asks the model to translate the request into command-line operations or Bash scripts.</li>
<li>The harness executes those commands over SSH on the target system.</li>
<li>Command output, errors, and system state are sent back to the LLM.</li>
<li>The model evaluates the result and generates the next commands.</li>
<li>The process continues until one of several conditions is reached:
<ul>
<li>The task is completed.</li>
<li>A timeout occurs.</li>
<li>The maximum number of steps is reached.</li>
<li>The configured cost limit is reached.</li>
</ul>
</li>
</ol>
<h3>Harness Workflow</h3>
<p> </p>
<figure aria-describedby="caption-attachment-53653" class="wp-caption aligncenter"><a href="https://www.percona.com/wp-content/uploads/2026/09/llm_harness_dba_tasks_preview_final.png"><img loading="lazy" decoding="async" class="size-large wp-image-53653" src="https://www.percona.com/wp-content/uploads/2026/09/llm_harness_dba_tasks_preview_final-1024x704.png" alt="" width="1024" height="704"></a><figcaption class="wp-caption-text">The DBA AI benchmark harness converts natural-language DBA tasks into commands, executes them remotely over SSH, returns the results to the LLM, and continues iterating until the task completes or a configured limit is reached.</figcaption></figure>
<h2>Example</h2>
<p>Here is an example of running the harness against two hosts:</p>
<pre class="urvanov-syntax-highlighter-plain-tag"><code class="language-bash">uv run dba.py 
  -m qwen/qwen3.8-max 
  --host 165.22.191.129 
  --host 68.183.121.153 
  --task "Install MySQL 9.7 Replication with encrypted traffic" 
  --max-steps 200 
  --mode unattended
</code></pre>
<p>The model is responsible for deciding how to interpret the request, what commands to execute, how to react to errors, and when the task has been completed.</p>
<h2>Some Interesting Findings</h2>
<p>So far, <strong>almost all models have successfully executed the tasks</strong>, with only a few individual exceptions.</p>
<p>One of the more interesting findings is that smaller and cheaper models are often just as capable of completing the task as much larger models.</p>
<p>The main difference is usually the number of steps.</p>
<p>Smaller models may require more iterations to arrive at the correct configuration, but the overall cost can still be dramatically lower.</p>
<p>In several tests, smaller models completed the same work at roughly <strong>one-tenth of the cost</strong> of larger models.</p>
<p>You can see examples of benchmark output here:</p>
<p><a href="https://github.com/Percona-Lab-results/dbaai_bench-results">https://github.com/Percona-Lab-results/dbaai_bench-results</a></p>
<p>For example, here is a run using <code>deepseek/deepseek-v4-flash-0731</code> to install MySQL 8.4 in replication mode:</p>
<p><a href="https://github.com/Percona-Lab-results/dbaai_bench-results/blob/main/20260822-031748-157.245.92.158-plus1/report.md">https://github.com/Percona-Lab-results/dbaai_bench-results/blob/main/20260822-031748-157.245.92.158-plus1/report.md</a></p>
<h2>When the Model Uses Its Own Judgment</h2>
<p>One particularly interesting behavior appears when the requested task cannot be completed exactly as specified.</p>
<p>For example, I asked <code>deepseek/deepseek-v4-pro-0813</code> to:</p>
<blockquote>
<p>Install MySQL 9.7</p>
</blockquote>
<p>The model responded:</p>
<blockquote>
<p>“MySQL 8.4 is available (not 9.7 as requested, but 8.4 is what Ubuntu provides; will use it). Installing MySQL server on node1 (primary).”</p>
</blockquote>
<p>Instead of simply failing, the model interpreted the situation, selected an available version, and continued with the task.</p>
<p>Whether this behavior is desirable depends on the automation scenario, but it demonstrates an important characteristic of LLM-driven infrastructure automation: <strong>the model may make operational decisions rather than blindly execute instructions</strong>.</p>
<p>That makes validation and guardrails particularly important.</p>
<h2>Batch Runner for Comparing Models</h2>
<p>Running one model at a time is useful during development, but it becomes inconvenient when comparing many models and configurations.</p>
<p>To simplify this, I created a second project:</p>
<p><a href="https://github.com/Percona-Lab/dbaai_runner">https://github.com/Percona-Lab/dbaai_runner</a></p>
<p>The batch runner executes <code>dba.py</code> across multiple models and configurations and collects the results in a format that makes comparison easier.</p>
<p>Example results are available here:</p>
<p><a href="https://github.com/Percona-Lab-results/dbaai_runner_results">https://github.com/Percona-Lab-results/dbaai_runner_results</a></p>
<h2>Example: Percona Server 8.4 Replication</h2>
<p>One test asks the models to perform the following task:</p>
<blockquote>
<p>These two servers are identical and freshly built. Install Percona Server 8.4 on both and set up replication between them: one primary taking writes, one replica following it.</p>
<p>Decide which server takes which role and say which you chose. Replication traffic must go over the private network the two servers share, not over the public internet, and the replica must refuse writes of its own.</p>
</blockquote>
<p>The corresponding leaderboard is available here:</p>
<p><a href="https://github.com/Percona-Lab-results/dbaai_runner_results/blob/main/20260824-030110/leaderboard.md">https://github.com/Percona-Lab-results/dbaai_runner_results/blob/main/20260824-030110/leaderboard.md</a></p>
<h3>Results</h3>
<table>
<thead>
<tr>
<th>Model</th>
<th align="right">Result</th>
<th align="right">Mean</th>
<th align="right">Clean</th>
<th align="right">Cost</th>
<th align="right">Steps</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>deepseek/deepseek-v4-flash-0731</code></td>
<td align="right">100%</td>
<td align="right">100%</td>
<td align="right">1/1</td>
<td align="right">$0.0082</td>
<td align="right">35</td>
</tr>
<tr>
<td><code>deepseek/deepseek-v4-pro-0813</code></td>
<td align="right">100%</td>
<td align="right">100%</td>
<td align="right">1/1</td>
<td align="right">$0.2639</td>
<td align="right">27</td>
</tr>
<tr>
<td><code>meta/muse-glimmer-30b</code></td>
<td align="right">100%</td>
<td align="right">100%</td>
<td align="right">1/1</td>
<td align="right">$0.0479</td>
<td align="right">74</td>
</tr>
<tr>
<td><code>moonshotai/kimi-k3</code></td>
<td align="right">100%</td>
<td align="right">100%</td>
<td align="right">1/1</td>
<td align="right">$0.2888</td>
<td align="right">17</td>
</tr>
<tr>
<td><code>qwen/qwen3.8-max</code></td>
<td align="right">100%</td>
<td align="right">100%</td>
<td align="right">1/1</td>
<td align="right">$0.4200</td>
<td align="right">22</td>
</tr>
<tr>
<td><code>z-ai/glm-5.3</code></td>
<td align="right">100%</td>
<td align="right">100%</td>
<td align="right">1/1</td>
<td align="right">$0.2176</td>
<td align="right">20</td>
</tr>
<tr>
<td><code>google/gemma-4-31b-it</code></td>
<td align="right">94%</td>
<td align="right">94%</td>
<td align="right">0/1</td>
<td align="right">$0.0289</td>
<td align="right">46</td>
</tr>
<tr>
<td><code>qwen/qwen3.8-27b</code></td>
<td align="right"><em>timeout</em></td>
<td align="right">0%</td>
<td align="right">0/1</td>
<td align="right">$0.5116</td>
<td align="right">78</td>
</tr>
</tbody>
</table>
<p>The cost difference is especially interesting.</p>
<p>For example:</p>
<ul>
<li><code>meta/muse-glimmer-30b</code> required <strong>74 steps</strong> but cost only <strong>$0.0479</strong>.</li>
<li><code>qwen/qwen3.8-max</code> completed the task in <strong>22 steps</strong> but cost <strong>$0.4200</strong>.</li>
<li><code>deepseek/deepseek-v4-flash-0731</code> completed the task in <strong>35 steps</strong> for only <strong>$0.0082</strong>.</li>
</ul>
<p>This illustrates an important point for agentic infrastructure workloads:</p>
<p><strong>The model that uses the fewest steps is not necessarily the most economical model.</strong></p>
<p>A smaller model can require significantly more iterations while still being dramatically cheaper overall.</p>
<h2>Handling Impossible Tasks</h2>
<p>Another useful test is to deliberately give the models an impossible request.</p>
<p>For example:</p>
<blockquote>
<p>Install Percona Server for MySQL 9.7.2.</p>
</blockquote>
<p>That release does not exist.</p>
<p>The responses were interesting.</p>
<p>Most models decided to install the closest available version, <strong>9.7.1</strong>, instead.</p>
<p>DeepSeek behaved differently and completed the run <strong>without performing an installation</strong>.</p>
<p>These cases are useful because they test more than a model’s ability to generate shell commands. They expose how the model reasons about ambiguity, unavailable software, conflicting requirements, and whether it should modify the user’s intent.</p>
<p>For production automation, those behaviors may be just as important as raw task-completion rates.</p>
<h2>More Than MySQL</h2>
<p>The examples above focus primarily on MySQL and Percona Server, but the framework is not limited to MySQL.</p>
<p>The same approach can be used for:</p>
<ul>
<li>MySQL</li>
<li>Percona Server for MySQL</li>
<li>PostgreSQL</li>
<li>MongoDB</li>
<li>Other database and Linux administration tasks</li>
</ul>
<p>In practice, the harness is testing whether an LLM can act as an iterative systems operator:</p>
<p><strong>plan → execute → observe → adjust → verify</strong></p>
<h2>What I Am Learning</h2>
<p>The early results suggest several things.</p>
<p>First, modern LLMs are already surprisingly capable of performing multi-step database administration tasks when they have access to command execution and system feedback.</p>
<p>Second, model size is not necessarily the best predictor of practical usefulness.</p>
<p>A smaller model that requires twice as many steps may still be significantly more economical than a larger model.</p>
<p>Third, the ability of models to exercise judgment introduces both opportunities and risks. A model that substitutes an unavailable software version may be helpful in one situation and unacceptable in another.</p>
<p>This means future evaluation should look beyond simple task completion.</p>
<p>Useful dimensions include:</p>
<ul>
<li>Task completion rate</li>
<li>Number of steps</li>
<li>Total inference cost</li>
<li>Execution time</li>
<li>Correctness of the final configuration</li>
<li>Number of unnecessary operations</li>
<li>Recovery from command failures</li>
<li>Handling of ambiguous requirements</li>
<li>Handling of impossible requirements</li>
<li>Security of generated configurations</li>
<li>Whether the final system actually matches the user’s intent</li>
</ul>
<p>I expect these characteristics to become increasingly important as LLMs move from answering DBA questions to actually <strong>operating database infrastructure</strong>.</p>
<h2>Projects and Results</h2>
<p><strong>DBA AI Benchmark</strong></p>
<p><a href="https://github.com/Percona-Lab/dbaai_bench">https://github.com/Percona-Lab/dbaai_bench</a></p>
<p><strong>DBA AI Benchmark Results</strong></p>
<p><a href="https://github.com/Percona-Lab-results/dbaai_bench-results">https://github.com/Percona-Lab-results/dbaai_bench-results</a></p>
<p><strong>DBA AI Batch Runner</strong></p>
<p><a href="https://github.com/Percona-Lab/dbaai_runner">https://github.com/Percona-Lab/dbaai_runner</a></p>
<p><strong>Batch Runner Results</strong></p>
<p><a href="https://github.com/Percona-Lab-results/dbaai_runner_results">https://github.com/Percona-Lab-results/dbaai_runner_results</a></p>
<h2>Interested in Contributing?</h2>
<p>These projects are still evolving.</p>
<p>There are many interesting areas to explore, including additional database platforms, more complex failure scenarios, security evaluation, cost optimization, model comparison, and better automated scoring.</p>
<p>If you are interested in cooperating, testing additional models, adding DBA workloads, or improving the benchmark framework, please let me know.</p>
<p> </p>
<p>The post <a href="https://www.percona.com/blog/evaluating-llm-models-for-dba-tasks/">Evaluating LLM models for DBA tasks</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/evaluating-llm-models-for-dba-tasks/">Evaluating LLM models for DBA tasks</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Group Replication Beyond a Single Cluster: DC-DR with Percona (PS MySQL) Operator</title>
        <link>https://www.percona.com/blog/group-replication-beyond-a-single-cluster-dc-dr-with-percona-ps-mysql-operator/</link>
        <pubDate>Thu, 17 Sep 2026 06:43:32 +0000</pubDate>
        <dc:creator>Anil Joshi</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/group-replication-beyond-a-single-cluster-dc-dr-with-percona-ps-mysql-operator/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>A while ago, we discussed the cross-site replication feature of the Percona PXC operator. Recently, a similar cross-site replication feature was introduced in the Percona (PS MySQL) operator v1.2.0, a topology based on Group Replication/InnoDB Cluster. In this blog post, we will explore how to add a DR Cluster to an existing DC Cluster to … Continued<br />
The post Group Replication Beyond a Single Cluster: DC-DR with Percona (PS MySQL) Operator appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/group-replication-beyond-a-single-cluster-dc-dr-with-percona-ps-mysql-operator/">Group Replication Beyond a Single Cluster: DC-DR with Percona (PS MySQL) Operator</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>A while ago, we discussed the cross-site replication feature of the <a href="https://www.percona.com/blog/deploying-cross-site-replication-in-percona-operator-for-mysql-pxc/">Percona PXC operator</a>. Recently, a similar cross-site replication feature was introduced in the Percona (PS MySQL) operator <a href="https://docs.percona.com/percona-operator-for-mysql/1.2.0/ReleaseNotes/Kubernetes-Operator-for-PS-RN1.2.0.html#cross-site-replication-for-group-replication-clusters">v1.2.0</a>, a topology based on <b>Group Replication/InnoDB Cluster.</b></p>
<p><span>In this blog post, we will explore how to add a </span><strong>DR Cluster</strong><span> to an existing </span><b>DC Cluster </b><span>to form a </span><b>ClusterSet</b><span> environment, which provides a seamless switchover between DC/DR members. The good part is that all the complexity and configuration will be managed by the Percona operator, with very few setup steps required.</span></p>
<figure aria-describedby="caption-attachment-53590" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-53590" src="https://www.percona.com/wp-content/uploads/2026/09/image1.png" alt="Group Replication (DC-DR) using Innodb ClusterSet" width="960" height="540"><figcaption class="wp-caption-text">Group Replication (DC-DR) using Innodb ClusterSet</figcaption></figure>
<p> </p>
<p><span>Let’s discuss how we can implement a cross-site replication (DC-DR) topology across two separate database clusters.</span></p>
<h3><span>Environment used for Demonstration</span></h3>
<ul>
<li><span>Two separate database clusters (</span><b>pscluster1</b><span> and </span><b>pscluster2</b><span>) are deployed within a single GCP/Kubernetes environment, each managed by a dedicated operator.</span></li>
<li><span>Percona Operator for MySQL( based on Percona Server for MySQL) has a version. 1.2.0</span></li>
<li><span>MySQL version 8.4.10.</span></li>
<li><span>Network connectivity between DC/DR components.</span></li>
</ul>
<h3><span>DC (</span><b>pscluster1</b><span>) configuration</span></h3>
<p><strong>Step 1: </strong> <a href="https://docs.percona.com/percona-operator-for-mysql/1.2.0/gke.html">Deploying the cluster</a> on the DC side.</p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl get ps -n ps
NAME          REPLICATION         ENDPOINT                 STATE   MYSQL   ORCHESTRATOR   HAPROXY   ROUTER   AGE
ps-cluster1   group-replication   ps-cluster1-haproxy.ps   ready   3                      3                  28m</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl get pods -n ps
NAME                                             READY   STATUS    RESTARTS   AGE
percona-server-mysql-operator-6b78d5f68c-bzg6r   1/1     Running   0          30m
ps-cluster1-haproxy-0                            2/2     Running   0          28m
ps-cluster1-haproxy-1                            2/2     Running   0          27m
ps-cluster1-haproxy-2                            2/2     Running   0          27m
ps-cluster1-mysql-0                              2/2     Running   0          29m
ps-cluster1-mysql-1                              2/2     Running   0          28m
ps-cluster1-mysql-2                              2/2     Running   0          26m</pre>
<p><strong>Step 2:</strong> Retrieve the DC’s InnoDB cluster name, which will be required later to construct the ClusterSet.</p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl get ps ps-cluster1 -n ps -o jsonpath='{.status.innodbClusterName}{"n"}'
pscluster1</pre>
<p><strong>Step 3:</strong><span> Get a service endpoint which is used when setting up the ClusterSet environment. We will use </span><strong>ps-cluster1-mysql-primary</strong>,<span> which is mapped to the current Primary node in the existing cluster.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl get services -n ps

NAME                        TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                                           AGE
ps-cluster1-haproxy         ClusterIP   34.118.225.215           3306/TCP,3307/TCP,3309/TCP,33060/TCP,33062/TCP    29m
ps-cluster1-mysql           ClusterIP   None                     3306/TCP,33062/TCP,33060/TCP,6450/TCP,33061/TCP   29m
ps-cluster1-mysql-primary   ClusterIP   34.118.229.137           3306/TCP,33062/TCP,33060/TCP,6450/TCP,33061/TCP   29m
ps-cluster1-mysql-proxy     ClusterIP   None                     3306/TCP,33062/TCP,33060/TCP,6450/TCP,33061/TCP   29m
ps-cluster1-mysql-unready   ClusterIP   None                     3306/TCP,33062/TCP,33060/TCP,6450/TCP,33061/TCP   29m</pre>
<p><b>Step 4: </b><span>The DR site should have the same credentials as DC. We need to export the DC secret containing the credentials and import it into the DR cluster.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl get secret ps-cluster1-secrets -n ps -o yaml &gt; source-secret.yaml</pre>
<p><span>We also need to perform a couple of cleanups in the exported secret file.</span></p>
<ul>
<li><span>Remove the annotations, creationTimestamp, resourceVersion, selfLink, and uid metadata fields.</span></li>
<li><span>As per the requirement, change the namespace/instance and other unwanted details as per your replica site.</span></li>
</ul>
<p><span>E.g,</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; yq eval 'del(.metadata.ownerReferences, .metadata.annotations, .metadata.creationTimestamp, .metadata.resourceVersion, .metadata.selfLink, .metadata.uid)' source-secret.yaml &gt; replica-secret.yaml</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; yq eval '.metadata.namespace = "ps-dr"' -i replica-secret.yaml</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; sed -i '' 's/ps-cluster1/ps-cluster2/g' replica-secret.yaml</pre>
<p><span>The final ready secret file looks like this. </span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">apiVersion: v1
data:
  clusterset: XVpMQz0+LEVDe3kyQGR6TQ==
  heartbeat: YmFONW1KTE8oLTxdVVB7Kg==
  monitor: UC1oOHokRksoMnpSMWsmJg==
  operator: SDMrblpSQm0yRHdhV3dteX0=
  orchestrator: cEVqMEUlaGp5fShudyZURHtl
  replication: ZjldZlkwa3ZwNWU8KVpsag==
  root: e3BycEl+LlcrPFVUUTwpaG4=
  xtrabackup: eFhNNENIRF4wJXZ7bjxbKi11ag==
kind: Secret
metadata:
  labels:
    app.kubernetes.io/component: database
    app.kubernetes.io/instance: ps-cluster2
    app.kubernetes.io/managed-by: percona-server-mysql-operator
    app.kubernetes.io/name: mysql
    app.kubernetes.io/part-of: percona-server
  name: ps-cluster2-secrets
  namespace: ps-dr
type: Opaque</pre>
</p>
<h3></h3>
<h3><span>DR (</span><b>pscluster2</b><span>) Cluster configuration</span></h3>
<p><strong>Step 1:</strong><span> First, we need to import the modified secret file </span><strong>replica-secret.yaml</strong> <span>and initialise the DR cluster.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl apply -f deploy/replica-secret.yaml -n ps-dr
secret/ps-cluster2-secrets created</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl get secrets -n ps-dr
NAME                      TYPE     DATA   AGE
...
ps-cluster2-secrets   Opaque   8      12s
...</pre>
<p><span>Also, we need to make some modifications to the custom resource file </span><b>cr.yaml</b><span> to initialise the DR cluster.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">metadata:
  finalizers:
    - percona.com/delete-mysql-pods-in-order
#    - percona.com/delete-ssl
#    - percona.com/delete-mysql-pvc
  name: ps-cluster2

spec:
  crVersion: 1.2.0
  secretsName: ps-cluster2-secrets</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql:
    clusterType: group-replication
    size: 3
    image: percona/percona-server:8.4.10-10.1
    bootstrap:
      mode: manual</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl apply -f deploy/cr.yaml -n ps</pre>
<p><b>Note</b><span>: We set </span><b>spec.mysql.bootstrap.mode</b><span> to </span><b>manual</b><span> so Pod </span><b>mysql-0 </b><span>does not form a Group Replication group until the ClusterSet adopts it and references the secret file we copied from the DC.</span></p>
<p><span>It is also expected that after applying the Custom Resource file </span><b>cr.yaml,</b><span> the Pod </span><b>mysql-0 </b><span>starts but stays </span><b>NotReady</b><span>. The cluster </span><b>ps-cluster2 </b><span>reports the Initialising state and the </span><b>AwaitingExternalBootstrap</b><span> condition in status. Pods </span><b>mysql-1 </b><span>and </span><b>mysql-2 </b><span>do not start until Pod </span><b>mysql-0</b><span>  joins the Group Replication.</span></p>
<p><span>Once we deploy the custom resource, we can notice the status below. </span><b>Please note that </b><span>the complete Pods will be ready only once DR successfully syncs and joins the DC cluster. </span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl get ps -n ps-dr
NAME          REPLICATION         ENDPOINT                    STATE          MYSQL   ORCHESTRATOR   HAPROXY   ROUTER   AGE
ps-cluster2   group-replication   ps-cluster2-haproxy.ps-dr   initializing                                             17m</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl get pods -n ps-dr
NAME                                             READY   STATUS    RESTARTS   AGE
percona-server-mysql-operator-6b78d5f68c-4gsm9   1/1     Running   0          28m
ps-cluster2-mysql-0</pre>
<p><b>Step 2:</b><span> We need to note down the DR InnoDB cluster name, which will later be used by the ClusterSet.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl get ps ps-cluster2 -n ps -o jsonpath='{.status.innodbClusterName}{"n"}'
pscluster2</pre>
<p><b>Step 3:</b><span> We need to identify the DR cluster endpoint that is reachable from the DC. This endpoint will be used to feed the clone and perform other management operations.</span></p>
<p><span>We will use the local FQDN </span><b>ps-cluster2-mysql-0.ps-cluster2-mysql.ps-dr.svc.cluster.local</b><span> of the </span><b>ps-cluster2-mysql-0 </b><span>Pod, which is currently initialised and awaiting the ready state.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl get pods -n ps-dr
NAME                                             READY   STATUS    RESTARTS   AGE
percona-server-mysql-operator-6b78d5f68c-4gsm9   1/1     Running   0          48m
ps-cluster2-mysql-0                              1/2     Running   0          37m</pre>
<p><span>By connecting to the DC Primary Pod, we can verify cross-communication between the DC and the DR.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl exec -it ps-cluster1-mysql-0 -n ps -- sh</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">sh-5.1$ curl -v ps-cluster2-mysql-0.ps-cluster2-mysql.ps-dr.svc.cluster.local:3306
*   Trying 10.60.1.7:3306...
* Connected to ps-cluster2-mysql-0.ps-cluster2-mysql.ps-dr.svc.cluster.local (10.60.1.7) port 3306 (#0)
&gt; GET / HTTP/1.1
&gt; Host: ps-cluster2-mysql-0.ps-cluster2-mysql.ps-dr.svc.cluster.local:3306
&gt; User-Agent: curl/7.76.1
&gt; Accept: */*</pre>
</p>
<h3><span>Data Restoration Part</span></h3>
<p><span>By default, when the DR site initialises and attempts to join the ClusterSet, it receives data from the source/DC via the </span><a href="https://dev.mysql.com/doc/mysql-shell/26.7/en/mysql-innodb-cluster-clone-deployment.html"><span>clone recovery </span></a><span>method.</span></p>
<p><span>The Operator uses </span><b>MySQL Shell</b><span> to create a physical snapshot of the dataset from the Source/DC and transfer it to the DR Replica.</span></p>
<p><span>Alternatively, we can manually perform a </span><a href="https://docs.percona.com/percona-operator-for-mysql/1.2.0/backups-ondemand.html"><span>backup</span></a><span> and </span><a href="https://docs.percona.com/percona-operator-for-mysql/1.2.0/backups-restore-to-new-cluster.html"><span>restore</span></a><span> on the target cluster. This strategy helps when integrating the DR site into the ClusterSet, as pre-populating the data and GTID history allows it to apply only delta changes rather than performing a full initial synchronisation. For large datasets or to prevent excessive load and performance degradation on the donor node, a backup-and-restore approach can be considered.</span></p>
<p><span>Here, we will use the clone recovery method to sync the DR cluster.</span></p>
<p><span>Next, we will deploy the ClusterSet configurations so that DR joins the DC cluster via a data clone and connects via Asynchronous Replication to stay in sync.</span></p>
<p><span>Below is the </span><b>clusterset.yaml </b><span>file where we pass the various information like (<strong>S</strong></span><b>ecrets</b><span>, </span><b>DC/DR Endpoints</b><span>, </span><b>Cluster Name </b><span>etc) , which we fetched in some of the above steps earlier.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">kind: PerconaServerMySQLClusterSet
metadata:
  name: my-cluster-set
  finalizers:
    - percona.com/clusterset-dissolve
spec:
#  unsafeFlags:
#    forcedFailover: false
#    forcedClusterRemoval: false
  primaryCluster: pscluster1
  credentialsSecret:
    name: ps-cluster1-secrets
    key: clusterset
  sslMode: AUTO
  createReplicaClusterOptions:
    recoveryMethod: clone
  clusters:
    - innodbClusterName: pscluster1
      endpoints:
      - host: ps-cluster1-mysql-primary.ps.svc.cluster.local
        port: 3306
    - innodbClusterName: pscluster2
      endpoints:
      - host: ps-cluster2-mysql-0.ps-cluster2-mysql.ps-dr.svc.cluster.local
        port: 3306
  mysqlshellRunner:
    image: percona/percona-server:8.4.10-10.1</pre>
<p>We will apply the changes <span>only to the <strong>DC node</strong></span>.</p>
<pre class="urvanov-syntax-highlighter-plain-tag">kubectl apply -f deploy/clusterset.yaml</pre>
<p><b>Please note: </b><span>Member</span><b> “ps-cluster2-mysql-0” </b><span>on the DR side will connect to the DC via </span><b>asynchronous replication</b><span>. While the local members of the DR will join via the </span><b>Group Replication</b><span> mechanism. </span></p>
<p><span>This action will also start a separate backend job on DC, which creates an associated Pod to perform the ClusterSet activity.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl get jobs -n ps
NAME                                    STATUS    COMPLETIONS   DURATION   AGE
my-cluster-set-pscluster2-add-replica   Complete             1/1           23s        53s</pre>
<p><span>….</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl get pods -n ps
NAME                                             READY   STATUS    RESTARTS   AGE
my-cluster-set-pscluster2-add-replica-wk7xd      1/1     Running             0          3s</pre>
<p><span>As soon as the process completes successfully, the job and associated Pod will be removed from the list.</span></p>
<p><span>There is one extra pod that can be noticed, and it persists. This provides a utility/client for running MySQL Shell commands against the MySQL ClusterSet.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl get pods -n ps
NAME                                             READY   STATUS    RESTARTS   AGE
my-cluster-set-runner-5d68fbcc74-svmpw           1/1     Running   0          10h</pre>
<p><span>If the job fails or errors occur, we need to investigate the exact problem using the information below.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">kubectl describe job 
kubectl describe pod 
kubectl logs </pre>
<p><span>Finally, we can check the Pod status on the DR cluster. It will now reflect all MySQL and haproxy pods in the fully completed/ready state.  </span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl get pods -n ps-dr
NAME                                             READY   STATUS    RESTARTS      AGE
percona-server-mysql-operator-6b78d5f68c-4gsm9   1/1     Running   0             11h
ps-cluster2-haproxy-0                            2/2     Running   0             36m
ps-cluster2-haproxy-1                            2/2     Running   0             36m
ps-cluster2-haproxy-2                            2/2     Running   0             36m
ps-cluster2-mysql-0                              2/2     Running   1 (37m ago)   11h
ps-cluster2-mysql-1                              2/2     Running   1 (36m ago)   36m
ps-cluster2-mysql-2                              2/2     Running   1 (34m ago)   35m</pre>
</p>
<h3><span>Verification of ClusterSet completion</span></h3>
<p><span>We can check the </span><span>ClusterSet information below if it has been processed successfully without any errors.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl get ps-clusterset my-cluster-set -n ps
NAME             PRIMARY      ENDPOINT                                        READY
my-cluster-set   pscluster1   ps-cluster1-mysql-0.ps-cluster1-mysql.ps:3306   True</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl get ps-clusterset my-cluster-set -n ps -o yaml
apiVersion: ps.percona.com/v1
kind: PerconaServerMySQLClusterSet
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"ps.percona.com/v1","kind":"PerconaServerMySQLClusterSet","metadata":{"annotations":{},"finalizers":["percona.com/clusterset-dissolve"],"name":"my-cluster-set","namespace":"ps"},"spec":{"clusters":[{"endpoints":[{"host":"ps-cluster1-mysql-primary.ps.svc.cluster.local","port":3306}],"innodbClusterName":"pscluster1"},{"endpoints":[{"host":"ps-cluster2-mysql-0.ps-cluster2-mysql.ps-dr.svc.cluster.local","port":3306}],"innodbClusterName":"pscluster2"}],"createReplicaClusterOptions":{"recoveryMethod":"clone"},"credentialsSecret":{"key":"clusterset","name":"ps-cluster1-secrets"},"mysqlshellRunner":{"image":"percona/percona-server:8.4.10-10.1"},"primaryCluster":"pscluster1","sslMode":"AUTO"}}
  creationTimestamp: "2026-09-11T05:20:08Z"
  finalizers:
  - percona.com/clusterset-dissolve
  generation: 5
  name: my-cluster-set
  namespace: ps
  resourceVersion: "1789143099049519007"
  uid: 6cfdce40-e1e0-47c8-bdae-1cd847938f29
spec:
  clusters:
  - endpoints:
    - host: ps-cluster1-mysql-primary.ps.svc.cluster.local
      port: 3306
    innodbClusterName: pscluster1
  - endpoints:
    - host: ps-cluster2-mysql-0.ps-cluster2-mysql.ps-dr.svc.cluster.local
      port: 3306
    innodbClusterName: pscluster2
  createReplicaClusterOptions:
    recoveryMethod: clone
  credentialsSecret:
    key: clusterset
    name: ps-cluster1-secrets
  mysqlshellRunner:
    image: percona/percona-server:8.4.10-10.1
  primaryCluster: pscluster1
  sslMode: AUTO
status:
  clusters:
    pscluster1:
      clusterRole: PRIMARY
      globalStatus: OK
      primary: ps-cluster1-mysql-0.ps-cluster1-mysql.ps:3306
    pscluster2:
      clusterRole: REPLICA
      globalStatus: OK
      primary: ""
  conditions:
  - lastTransitionTime: "2026-09-11T05:25:07Z"
    message: ""
    reason: DeploymentReady
    status: "True"
    type: MySQLShellRunnerReady
  - lastTransitionTime: "2026-09-11T05:25:10Z"
    message: ""
    reason: ClusterSetBootstrapped
    status: "True"
    type: ClusterSetBootstrapped
  - lastTransitionTime: "2026-09-11T05:25:13Z"
    message: All Clusters available.
    reason: ClusterSetHealthy
    status: "True"
    type: Ready
  lastObservedAt: "2026-09-11T16:11:39Z"
  lastObservedGeneration: 5
  primaryCluster: pscluster1
  primaryClusterEndpoint: ps-cluster1-mysql-0.ps-cluster1-mysql.ps:3306</pre>
<p><span>Also, we can manually access any running MySQL Pod and confirm the ClusterSet status.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl exec -it ps-cluster1-mysql-0 -n ps -- sh</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">sh-5.1$ mysqlsh --uri=root@localhost:3306</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">MySQL  localhost:3306 ssl  JS &gt; var clusterset =  dba.getClusterSet()
 MySQL  localhost:3306 ssl  JS &gt; clusterset.status({extended:1})
{
    "clusters": {
        "pscluster1": {
            "clusterRole": "PRIMARY", 
            "globalStatus": "OK", 
            "primary": "ps-cluster1-mysql-0.ps-cluster1-mysql.ps:3306", 
            "status": "OK", 
            "statusText": "Cluster is ONLINE and can tolerate up to ONE failure.", 
            "topology": {
                "ps-cluster1-mysql-0.ps-cluster1-mysql.ps:3306": {
                    "address": "ps-cluster1-mysql-0.ps-cluster1-mysql.ps:3306", 
                    "memberRole": "PRIMARY", 
                    "mode": "R/W", 
                    "readReplicas": {}, 
                    "role": "HA", 
                    "status": "ONLINE", 
                    "version": "8.4.10"
                }, 
                "ps-cluster1-mysql-1.ps-cluster1-mysql.ps:3306": {
                    "address": "ps-cluster1-mysql-1.ps-cluster1-mysql.ps:3306", 
                    "memberRole": "SECONDARY", 
                    "mode": "R/O", 
                    "readReplicas": {}, 
                    "replicationLagFromImmediateSource": "", 
                    "replicationLagFromOriginalSource": "", 
                    "role": "HA", 
                    "status": "ONLINE", 
                    "version": "8.4.10"
                }, 
                "ps-cluster1-mysql-2.ps-cluster1-mysql.ps:3306": {
                    "address": "ps-cluster1-mysql-2.ps-cluster1-mysql.ps:3306", 
                    "memberRole": "SECONDARY", 
                    "mode": "R/O", 
                    "readReplicas": {}, 
                    "replicationLagFromImmediateSource": "", 
                    "replicationLagFromOriginalSource": "", 
                    "role": "HA", 
                    "status": "ONLINE", 
                    "version": "8.4.10"
                }
            }, 
            "transactionSet": "50cc4081-ad9a-11f1-b815-1602eb3926cb:1-4,65edbac6-ad9a-11f1-9dbe-1602eb3926cb:1-139"
        }, 
        "pscluster2": {
            "clusterRole": "REPLICA", 
            "clusterSetReplication": {
                "applierStatus": "APPLIED_ALL", 
                "applierThreadState": "Waiting for an event from Coordinator", 
                "applierWorkerThreads": 4, 
                "receiver": "ps-cluster2-mysql-0.ps-cluster2-mysql.ps-dr:3306", 
                "receiverStatus": "ON", 
                "receiverThreadState": "Waiting for source to send event", 
                "replicationSsl": "TLS_AES_128_GCM_SHA256 TLSv1.3", 
                "replicationSslMode": "REQUIRED", 
                "source": "ps-cluster1-mysql-0.ps-cluster1-mysql.ps:3306"
            }, 
            "clusterSetReplicationStatus": "OK", 
            "globalStatus": "OK", 
            "status": "OK", 
            "statusText": "Cluster is ONLINE and can tolerate up to ONE failure.", 
            "topology": {
                "ps-cluster2-mysql-0.ps-cluster2-mysql.ps-dr:3306": {
                    "address": "ps-cluster2-mysql-0.ps-cluster2-mysql.ps-dr:3306", 
                    "memberRole": "PRIMARY", 
                    "mode": "R/O", 
                    "readReplicas": {}, 
                    "replicationLagFromImmediateSource": "", 
                    "replicationLagFromOriginalSource": "", 
                    "role": "HA", 
                    "status": "ONLINE", 
                    "version": "8.4.10"
                }, 
                "ps-cluster2-mysql-1.ps-cluster2-mysql.ps-dr:3306": {
                    "address": "ps-cluster2-mysql-1.ps-cluster2-mysql.ps-dr:3306", 
                    "memberRole": "SECONDARY", 
                    "mode": "R/O", 
                    "readReplicas": {}, 
                    "replicationLagFromImmediateSource": "", 
                    "replicationLagFromOriginalSource": "", 
                    "role": "HA", 
                    "status": "ONLINE", 
                    "version": "8.4.10"
                }, 
                "ps-cluster2-mysql-2.ps-cluster2-mysql.ps-dr:3306": {
                    "address": "ps-cluster2-mysql-2.ps-cluster2-mysql.ps-dr:3306", 
                    "memberRole": "SECONDARY", 
                    "mode": "R/O", 
                    "readReplicas": {}, 
                    "replicationLagFromImmediateSource": "", 
                    "replicationLagFromOriginalSource": "", 
                    "role": "HA", 
                    "status": "ONLINE", 
                    "version": "8.4.10"
                }
            }, 
            "transactionSet": "50cc4081-ad9a-11f1-b815-1602eb3926cb:1-4,65edbac6-ad9a-11f1-9dbe-1602eb3926cb:1-139", 
            "transactionSetConsistencyStatus": "OK", 
            "transactionSetErrantGtidSet": "", 
            "transactionSetMissingGtidSet": ""
        }
    }, 
    "domainName": "my-cluster-set", 
    "globalPrimaryInstance": "ps-cluster1-mysql-0.ps-cluster1-mysql.ps:3306", 
    "metadataServer": "ps-cluster1-mysql-0.ps-cluster1-mysql.ps:3306", 
    "primaryCluster": "pscluster1", 
    "status": "HEALTHY", 
    "statusText": "All Clusters available."
}</pre>
</p>
<h3><span>Validate Replication </span></h3>
<ul>
<li><span>Log in to the Primary member and perform some writes.</span></li>
</ul>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; export PRIMARY=$(kubectl get pods -n ps -l mysql.percona.com/primary=true -o jsonpath='{.items[0].metadata.name}')
shell&gt; echo $PRIMARY;
ps-cluster1-mysql-0

shell&gt; kubectl exec -it ps-cluster1-mysql-0 -n ps -- sh
shell&gt; mysql -uroot -p</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; CREATE DATABASE IF NOT EXISTS test;
mysql&gt; CREATE TABLE IF NOT EXISTS test.t1 (id INT PRIMARY KEY); INSERT INTO test.t1 VALUES (1);</pre>
</p>
<ul>
<li><span>Connect to the DR and verify the sync.</span></li>
</ul>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl exec -it ps-cluster2-mysql-0 -n ps-dr -- sh
shell&gt; mysql -uroot -p</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; SELECT * FROM test.t1;
+----+
| id |
+----+
|  1 |
+----+</pre>
<p><span>We can also visit any MySQL Pod and run the following command to get the Primary member and group replication details.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; select * from performance_schema.replication_group_members;
+---------------------------+--------------------------------------+------------------------------------------+-------------+--------------+-------------+----------------+----------------------------+
| CHANNEL_NAME              | MEMBER_ID                            | MEMBER_HOST                              | MEMBER_PORT | MEMBER_STATE | MEMBER_ROLE | MEMBER_VERSION | MEMBER_COMMUNICATION_STACK |
+---------------------------+--------------------------------------+------------------------------------------+-------------+--------------+-------------+----------------+----------------------------+
| group_replication_applier | 50cc4081-ad9a-11f1-b815-1602eb3926cb | ps-cluster1-mysql-0.ps-cluster1-mysql.ps |        3306 | ONLINE       | PRIMARY     | 8.4.10         | MySQL                      |
| group_replication_applier | 87137873-ad9a-11f1-ae3f-36b4b899b0ff | ps-cluster1-mysql-1.ps-cluster1-mysql.ps |        3306 | ONLINE       | SECONDARY   | 8.4.10         | MySQL                      |
| group_replication_applier | b952f0d3-ad9a-11f1-95a5-d6e7036e522a | ps-cluster1-mysql-2.ps-cluster1-mysql.ps |        3306 | ONLINE       | SECONDARY   | 8.4.10         | MySQL                      |
+---------------------------+--------------------------------------+------------------------------------------+-------------+--------------+-------------+----------------+----------------------------+
3 rows in set (0.00 sec)</pre>
</p>
<h3><span>DC-DR switchover/failover</span></h3>
<p><span>Performing a planned switchover or an ad hoc failover process is quite simple here. All we need to execute the operations below.</span></p>
<p><b>Switchover:</b><b><br />
</b></p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl patch ps-clusterset my-cluster-set -n $SOURCE_NS 
  --type=merge -p '{"spec":{"primaryCluster":"replicacluster"}}'</pre>
<p><b>Forced Failover:</b></p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl patch ps-clusterset my-cluster-set -n $SOURCE_NS --type=merge -p '{
  "spec": {
    "primaryCluster": "replicacluster",
    "unsafeFlags": {
      "forcedFailover": true
    }
  }
}'</pre>
<p><span>So let’s try a Primary switchover activity from DC </span><b>pscluster1</b><span> to DR </span><b>pscluster2. </b><span>Currently</span><b>, </b><span>pscluster2 has a </span><b>REPLICA</b><span> role.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">MySQL  localhost:3306 ssl  JS &gt; clusterset.status()
{
    "clusters": {
        "pscluster1": {
            "clusterRole": "PRIMARY", 
            "globalStatus": "OK", 
            "primary": "ps-cluster1-mysql-0.ps-cluster1-mysql.ps:3306"
        }, 
        "pscluster2": {
            "clusterRole": "REPLICA", 
            "clusterSetReplicationStatus": "OK", 
            "globalStatus": "OK"
        }
    }, 
    "domainName": "my-cluster-set", 
    "globalPrimaryInstance": "ps-cluster1-mysql-0.ps-cluster1-mysql.ps:3306", 
    "primaryCluster": "pscluster1", 
    "status": "HEALTHY", 
    "statusText": "All Clusters available."
}</pre>
</p>
<h4><span>Run Switchover command:</span></h4>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl patch ps-clusterset my-cluster-set -n ps 
  --type=merge -p '{"spec":{"primaryCluster":"pscluster2"}}'

perconaservermysqlclusterset.ps.percona.com/my-cluster-set patched</pre>
</p>
<h4><span>Watch the progress:</span></h4>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl get ps-clusterset my-cluster-set -n ps -w
shell&gt; kubectl get jobs -n ps | grep switchover</pre>
<p><span>After some time, we can see </span><b>pscluster2</b><span> become the </span><b>Primary</b><span> cluster.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl get ps-clusterset my-cluster-set -n ps -w
NAME             PRIMARY      ENDPOINT                                           NAME             PRIMARY      ENDPOINT   READY
my-cluster-set   pscluster1              False
my-cluster-set   pscluster2   ps-cluster2-mysql-0.ps-cluster2-mysql.ps-dr:3306   True</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">kubectl exec -it ps-cluster1-mysql-0 -n ps -- sh
sh-5.1$ mysqlsh --uri=root@localhost:3306</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">MySQL  localhost:3306 ssl  JS &gt; clusterset.status()
{
    "clusters": {
        "pscluster1": {
            "clusterRole": "REPLICA", 
            "clusterSetReplicationStatus": "OK", 
            "globalStatus": "OK"
        }, 
        "pscluster2": {
            "clusterRole": "PRIMARY", 
            "globalStatus": "OK", 
            "primary": "ps-cluster2-mysql-0.ps-cluster2-mysql.ps-dr:3306"
        }
    }, 
    "domainName": "my-cluster-set", 
    "globalPrimaryInstance": "ps-cluster2-mysql-0.ps-cluster2-mysql.ps-dr:3306", 
    "primaryCluster": "pscluster2", 
    "status": "HEALTHY", 
    "statusText": "All Clusters available."
}</pre>
<p><span>Once the switchover finishes successfully, all new writes now go to the new Primary cluster </span><b>ps-cluster2 </b><span>and the old DC </span><b>“ps-cluster1</b><span>” will automatically become the Async Replica. The application should connect with</span><b> a load balancer (Haproxy/MySQL Router) </b><span>endpoint, e.g., (</span><b>ps-cluster2-haproxy</b><span>), which will forward all requests to the backend node (by default) to the Primary member.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">shell&gt; kubectl get svc ps-cluster2-haproxy -n ps-dr
NAME                  TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                                          AGE
ps-cluster2-haproxy   ClusterIP   34.118.226.22           3306/TCP,3307/TCP,3309/TCP,33060/TCP,33062/TCP   12h</pre>
</p>
<h2><span>Key Takeaways</span></h2>
<p><span>Configuring and managing a</span><a href="https://docs.percona.com/percona-operator-for-mysql/1.2.0/replication.html"><span> multi-region topology </span></a><span>manually or on virtual machines can be quite challenging. By packaging these components within the </span><b>Percona PS Operator/K8S</b><span>, setting up cross-region environments becomes far simpler. This streamlined deployment is critical for establishing robust disaster recovery solutions, offloading production workloads, or scaling read operations. Furthermore, built-in support for seamless DC-DR switchovers and ad hoc failovers adds significant value to the architecture.</span></p>
<p><b>Before deploying these topologies into production environments</b><span>, it is strongly advised to thoroughly test and validate their behaviour in lower or non-production environments. Proceed with production deployment only after achieving full confidence in the setup. </span></p>
<p>The post <a href="https://www.percona.com/blog/group-replication-beyond-a-single-cluster-dc-dr-with-percona-ps-mysql-operator/">Group Replication Beyond a Single Cluster: DC-DR with Percona (PS MySQL) Operator</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/group-replication-beyond-a-single-cluster-dc-dr-with-percona-ps-mysql-operator/">Group Replication Beyond a Single Cluster: DC-DR with Percona (PS MySQL) Operator</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB 13.0 Is Now Stable</title>
        <link>https://mariadb.org/mariadb-13-0-is-now-stable/</link>
        <pubDate>Thu, 17 Sep 2026 06:30:30 +0000</pubDate>
        <dc:creator>Frédéric Descamps</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-13-0-is-now-stable/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB Server 13.0 is now Stable!<br />
The 13.0 series started its journey in March 2026 with the Preview. It then progressed through the Release Candidate phase and is now ready for general use as MariaDB’s latest Stable rolling release. …<br />
Continue reading "MariaDB 13.0 Is Now Stable"<br />
MariaDB 13.0 Is Now Stable appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/mariadb-13-0-is-now-stable/">MariaDB 13.0 Is Now Stable</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Server 13.0 is now Stable!<br />
The 13.0 series started its journey in <a href="https://mariadb.org/mariadb-13-0-is-now-stable/">March 2026 with the Preview</a>. It then progressed through the Release Candidate phase and is now ready for general use as MariaDB’s latest Stable rolling release. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/mariadb-13-0-is-now-stable/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;MariaDB 13.0 Is Now Stable&#8221;</span></a></p>
<p><a href="https://mariadb.org/mariadb-13-0-is-now-stable/">MariaDB 13.0 Is Now Stable</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/mariadb-13-0-is-now-stable/">MariaDB 13.0 Is Now Stable</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Too many GCache Page Files in MySQL Data Directory</title>
        <link>https://www.percona.com/blog/too-many-gcache-page-files-in-mysql-data-directory/</link>
        <pubDate>Thu, 17 Sep 2026 05:29:14 +0000</pubDate>
        <dc:creator>Kedar Vaijanapurkar</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/too-many-gcache-page-files-in-mysql-data-directory/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Learn why PXC accumulates thousands of gcache.page.* files, how frozen GCache purging causes disk growth, and how to safely recover and rejoin using IST.<br />
The post Too many GCache Page Files in MySQL Data Directory appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/too-many-gcache-page-files-in-mysql-data-directory/">Too many GCache Page Files in MySQL Data Directory</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p class="isSelectedEnd">A few thousand <code dir="ltr">gcache.page.*</code> files in a Percona XtraDB Cluster (PXC) data directory is not something you see every day. We came across a case where these files had been accumulating over time and slowly consuming disk space. So, let’s dig into what happened.</p>
<p>At first glance, it looked like GCache had simply stopped cleaning itself up. The investigation started by answering two simple questions: <b>when did the files start appearing,</b> and <b>what changed in the cluster at that time?</b></p>
<h2><b>Finding the starting point</b></h2>
<p>The oldest files showed the issue started on July 9.</p>
<pre class="urvanov-syntax-highlighter-plain-tag">[hostx] percona@hostx: ~ $ ls -lh /var/lib/mysql/mysql-data/gcache.page.*
-rw-r----- 1 mysql mysql 128M Jul 9 21:42 /var/lib/mysql/mysql-data/gcache.page.000000
-rw-r----- 1 mysql mysql 128M Jul 9 21:42 /var/lib/mysql/mysql-data/gcache.page.000001
-rw-r----- 1 mysql mysql 128M Jul 9 21:42 /var/lib/mysql/mysql-data/gcache.page.000002
...
-rw-r----- 1 mysql mysql 128M Jul 26 07:45 /var/lib/mysql/mysql-data/gcache.page.005976
-rw-r----- 1 mysql mysql 128M Jul 26 07:50 /var/lib/mysql/mysql-data/gcache.page.005977
-rw-r----- 1 mysql mysql 128M Jul 26 07:56 /var/lib/mysql/mysql-data/gcache.page.005978</pre>
<p>The newest files showed they stopped being created on July 26, which immediately provided a timeline to investigate.</p>
<p>The creation of GCache page files wasn’t random. It started at a specific point in time and stopped after the next MySQL restart.</p>
<h2><b>Can large transactions cause this?</b></h2>
<p>Normally, you don’t see thousands of GCache page files unless Galera cannot reclaim old pages or an exceptionally large writeset forces additional page allocation. In this environment, the GCache ring file was around <b>60 GB</b>, making the large writeset theory very unlikely – actually Impossible! Because there’s a hard limit of the largest transaction size at 2GB.</p>
<p>That pushed the investigation toward the error log, where Galera was found logging:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">2026-07-09T21:41:04.617132Z 91699 [Note] [MY-000000] [Galera] Freezing gcache purge at 16198595494
2026-07-09T21:41:04.622051Z 0 [Note] [MY-000000] [Galera] Created page /var/lib/mysql/mysql-data/gcache.page.000000 of size 134217728 bytes</pre>
<p>This was the first strong clue. When gcache.freeze_purge_at_seqno is active, Galera stops reclaiming old GCache pages. As replication continues, new page files are allocated while existing ones remain on disk.</p>
<h2><b>Correlating with cluster activity</b></h2>
<p>Looking a few seconds later in the error log revealed a cluster partition. The timing is difficult to ignore: Galera froze GCache purging, created the first page file, and then recorded the membership change.</p>
<pre class="urvanov-syntax-highlighter-plain-tag">2026-07-09T21:41:04.617132Z 91699 [Note] [MY-000000] [Galera] Freezing gcache purge at 16198595494
2026-07-09T21:41:04.622051Z 0 [Note] [MY-000000] [Galera] Created page /var/lib/mysql/mysql-data/gcache.page.000000 of size 134217728 bytes
2026-07-09T21:41:14.537019Z 53033 [Note] [MY-010559] [Repl] Multi-threaded replica statistics for channel '': seconds elapsed = 122; events assigned = 110401704; worker queues filled over overrun level = 0; waited due a Worker queue full = 0; waited due the total size = 0; waited at clock conflicts = 7659954362300 waited (count) when Workers occupied = 47189196 waited when Workers occupied = 22964040282100
2026-07-09T21:42:02.139966Z 91770 [Note] [MY-010914] [Server] Aborted connection 91770 to db: 'unconnected' user: 'percona' host: '10.1.163.3' (Got an error reading communication packets).
2026-07-09T21:42:17.061513Z 0 [Note] [MY-000000] [Galera] forgetting c3acab8a-8a74 (ssl://10.1.21.5:4567)
2026-07-09T21:42:17.061596Z 0 [Note] [MY-000000] [Galera] Node 7e3c8f1e-ad75 state primary
2026-07-09T21:42:17.061615Z 0 [Note] [MY-000000] [Galera] Current view of cluster as seen by this node
view (view_id(PRIM,7e3c8f1e-ad75,11)
memb {
        7e3c8f1e-ad75,1
        }
joined {
        }
left {
        }
partitioned {
        c3acab8a-8a74,1
        }
)</pre>
<p>Although the logs do not explicitly state why purge was frozen, the sequence of events strongly suggests that Galera retained the writesets so the partitioned node could potentially perform an IST when it rejoined.</p>
<h2>How could the purge have been frozen?</h2>
<p>Further investigation into the codebase and documentation hinted that it is practically impossible that Galera can actually invoke the gcache pages purge pause and only practical way to do it is using:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">SET GLOBAL wsrep_provider_options='gcache.freeze_purge_at_seqno=XYZ';</pre>
<p>Reference: <a href="https://github.com/percona/galera/pull/132">https://github.com/percona/galera/pull/132</a></p>
<p>Related reading: <a href="https://www.percona.com/blog/no-sst-node-rejoins/">No SST node rejoins in PXC</a></p>
<h2><b>Reproducing the behavior</b></h2>
<p>Rather than stopping with a theory, Peter Sylvester (SoS) reproduced the behavior in the lab by manually setting gcache.freeze_purge_at_seqno and generating workload with Sysbench. The result matched what we observed in the production.</p>
<p>Additionally, even though gcache.keep_pages_count=3, Galera continued creating additional page files because purging was frozen.</p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; show global status like  'wsrep_last_committed';
+----------------------+-------+
| Variable_name        | Value |
+----------------------+-------+
| wsrep_last_committed | 94559 |
+----------------------+-------+
1 row in set (0.00 sec)

mysql&gt; SET GLOBAL wsrep_provider_options="gcache.freeze_purge_at_seqno=94559";
Query OK, 0 rows affected (0.00 sec)</pre>
<p>Sysbench was then run on the cluster’s source host to generate logs…</p>
<pre class="urvanov-syntax-highlighter-plain-tag">[root@CENTOS9-1 ~]# sysbench oltp_read_write --db-driver=mysql --mysql-db=sysbench --mysql-user=sysbench --mysql-password=password --mysql-port=3306 --table_size=1000 --tables=4 --threads=4 --rand-type=uniform --range_size=100 --time=0 --rate=0 --report_interval=5 run
WARNING: Both event and time limits are disabled, running an endless test
sysbench 1.0.20 (using system LuaJIT 2.1.0-beta3)

Running the test with following options:
Number of threads: 4
Report intermediate results every 5 second(s)
Initializing random number generator from current time

Initializing worker threads...
Threads started!

[ 5s ] thds: 4 tps: 311.80 qps: 6246.62 (r/w/o: 4373.81/1248.40/624.40) lat (ms,95%): 16.71 err/s: 0.00 reconn/s: 0.00</pre>
<p>Following page files are present in datadir</p>
<pre class="urvanov-syntax-highlighter-plain-tag">[root@CENTOS9-3 ~]# ls -lh /var/lib/mysql/*cache*
-rw-r----- 1 mysql mysql 11M Aug  6 14:14 /var/lib/mysql/galera.cache
-rw-r----- 1 mysql mysql 10M Aug  6 14:14 /var/lib/mysql/gcache.page.000000
-rw-r----- 1 mysql mysql 10M Aug  6 14:14 /var/lib/mysql/gcache.page.000001
-rw-r----- 1 mysql mysql 10M Aug  6 14:15 /var/lib/mysql/gcache.page.000002
-rw-r----- 1 mysql mysql 10M Aug  6 14:15 /var/lib/mysql/gcache.page.000003
-rw-r----- 1 mysql mysql 10M Aug  6 14:15 /var/lib/mysql/gcache.page.000004
-rw-r----- 1 mysql mysql 10M Aug  6 14:16 /var/lib/mysql/gcache.page.000005
-rw-r----- 1 mysql mysql 10M Aug  6 14:16 /var/lib/mysql/gcache.page.000006</pre>
<p>After the load completed, the mysqld was restarted to observe if the page files were then cleared! But they were not.</p>
<pre class="urvanov-syntax-highlighter-plain-tag">[root@CENTOS9-3 ~]# systemctl stop mysql
[root@CENTOS9-3 ~]# systemctl start mysql
[root@CENTOS9-3 ~]# ls -lh /var/lib/mysql/*cache*
-rw-r----- 1 mysql mysql 11M Aug  6 14:17 /var/lib/mysql/galera.cache
-rw-r----- 1 mysql mysql 10M Aug  6 14:14 /var/lib/mysql/gcache.page.000000
-rw-r----- 1 mysql mysql 10M Aug  6 14:14 /var/lib/mysql/gcache.page.000001
-rw-r----- 1 mysql mysql 10M Aug  6 14:15 /var/lib/mysql/gcache.page.000002
-rw-r----- 1 mysql mysql 10M Aug  6 14:15 /var/lib/mysql/gcache.page.000003
-rw-r----- 1 mysql mysql 10M Aug  6 14:15 /var/lib/mysql/gcache.page.000004
-rw-r----- 1 mysql mysql 10M Aug  6 14:16 /var/lib/mysql/gcache.page.000005
-rw-r----- 1 mysql mysql 10M Aug  6 14:17 /var/lib/mysql/gcache.page.000006</pre>
</p>
<h2><b>Another interesting observation</b></h2>
<p>Later the MySQL was restarted, expecting the startup to reclaim the unused pages. It didn’t. Every page file remained on disk after a restart. Even after the explicit configuration of gcache.freeze_purge_at_seqno=-1.</p>
<p>This suggests that startup recovery does not automatically remove these accumulated page files simply because gcache.freeze_purge_at_seqno has been cleared. At least in testing, once purge has been frozen and page files accumulate, restarting MySQL alone is not enough to reclaim the space.</p>
<p>We have a new bug in place for getting this behaviour sorted: <a href="https://perconadev.atlassian.net/browse/PXC-5323">PXC-5323</a></p>
<h2><b>Can the files be deleted?</b></h2>
<p>To answer that, MySQL was stopped, the local GCache files were removed and the node was started again.</p>
<p>Galera recreated the required cache structures automatically. More importantly, the node successfully completed an <b>IST</b>; and in our tests,  deleting the local page files did <b>not</b> force an SST.</p>
<p>Before removing the files, make sure the node is stopped and the cluster has another healthy node that can provide the required writesets. Always validate this behavior in your own environment before using it operationally. Our testing showed that an IST was sufficient.</p>
<h2><b>Conclusion</b></h2>
<p>Based on both the production logs and our lab testing, the accumulation of gcache.page.* files was caused by GCache purging being frozen. Restarting MySQL did not reclaim the accumulated files in our testing. The behavior where a PXC node continuously creates new GCache page files is already fixed under: <a href="https://perconadev.atlassian.net/browse/PXC-4495">PXC-4495</a>.</p>
<p>The practical workaround is to stop MySQL, remove the local galera.cache and gcache.page.* files, and start the node again. In our testing, the node rejoined the cluster using IST without requiring a full SST. As always, make sure another healthy node has the required writesets before performing this cleanup.</p>
<p>The post <a href="https://www.percona.com/blog/too-many-gcache-page-files-in-mysql-data-directory/">Too many GCache Page Files in MySQL Data Directory</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/too-many-gcache-page-files-in-mysql-data-directory/">Too many GCache Page Files in MySQL Data Directory</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>On JSONPath in MariaDB and MySQL</title>
        <link>https://petrunia.net/2026/09/16/on-jsonpath-in-mariadb-and-mysql/</link>
        <pubDate>Wed, 16 Sep 2026 16:06:49 +0000</pubDate>
        <dc:creator>spetrunia2</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/on-jsonpath-in-mariadb-and-mysql/</guid>
        <source url="https://petrunia.net/">Sergei Petrunia’s blog</source>
        <description><![CDATA[<p>JSONPath is a part of SQL Standard. MySQL and MariaDB support a subset of it: “lax mode” only, no support for predicates, etc. But even the lax mode implementation has behavior different from the standard: MDEV-40746: JSON Path computation doesn’t do lax mode unboxing. The same non-standard behavior can be observed in MariaDB, MySQL, and […]</p>
<p><a href="https://petrunia.net/2026/09/16/on-jsonpath-in-mariadb-and-mysql/">On JSONPath in MariaDB and MySQL</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p class="wp-block-paragraph">JSONPath is a part of SQL Standard. MySQL and MariaDB support a subset of it: “<em><strong>lax mode</strong></em>” only, no support for predicates, etc.</p>
<p class="wp-block-paragraph">But even the <strong><em>lax mode</em></strong> implementation has behavior different from the standard: <a href="https://jira.mariadb.org/browse/MDEV-40746">MDEV-40746: JSON Path computation doesn’t do lax mode unboxing</a>. The same non-standard behavior can be observed in MariaDB, MySQL, and MS SQL Server.</p>
<p class="wp-block-paragraph">I’m pretty sure MariaDB has inherited MySQL’s behavior (despite having its own JSONPath engine). What I’d like to know if MySQL did this intentionally (and why?) or it is just a bug. </p>
<p class="wp-block-paragraph">
<p><a href="https://petrunia.net/2026/09/16/on-jsonpath-in-mariadb-and-mysql/">On JSONPath in MariaDB and MySQL</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Trying DuckDB for Magento Analytics: An Experiment with One Million Orders</title>
        <link>https://mariadb.org/trying-duckdb-for-magento-analytics-an-experiment-with-one-million-orders/</link>
        <pubDate>Wed, 16 Sep 2026 16:00:03 +0000</pubDate>
        <dc:creator>Roman Nozdrin</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/trying-duckdb-for-magento-analytics-an-experiment-with-one-million-orders/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Magento normally uses InnoDB for orders, order items, invoices, and other transactional data. However, analytical reports have another workload. I wanted to check whether DuckDB can improve a real Magento report without replacing the operational database. …<br />
Continue reading "Trying DuckDB for Magento Analytics: An Experiment with One Million Orders"<br />
Trying DuckDB for Magento Analytics: An Experiment with One Million Orders appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/trying-duckdb-for-magento-analytics-an-experiment-with-one-million-orders/">Trying DuckDB for Magento Analytics: An Experiment with One Million Orders</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Magento normally uses InnoDB for orders, order items, invoices, and other transactional data. However, analytical reports have another workload. I wanted to check whether DuckDB can improve a real Magento report without replacing the operational database. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/trying-duckdb-for-magento-analytics-an-experiment-with-one-million-orders/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;Trying DuckDB for Magento Analytics: An Experiment with One Million Orders&#8221;</span></a></p>
<p><a href="https://mariadb.org/trying-duckdb-for-magento-analytics-an-experiment-with-one-million-orders/">Trying DuckDB for Magento Analytics: An Experiment with One Million Orders</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/trying-duckdb-for-magento-analytics-an-experiment-with-one-million-orders/">Trying DuckDB for Magento Analytics: An Experiment with One Million Orders</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB adoption is growing, and the way people get it is changing – Adoption Index 2026-09</title>
        <link>https://mariadb.org/mariadb-adoption-is-growing-and-the-way-people-get-it-is-changing-adoption-index-2026-09/</link>
        <pubDate>Wed, 16 Sep 2026 11:47:36 +0000</pubDate>
        <dc:creator>Robert Silén</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-adoption-is-growing-and-the-way-people-get-it-is-changing-adoption-index-2026-09/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>The MariaDB Adoption Index is up 126% in a year. More people are downloading MariaDB, more people are contributing to it, and more projects are building on it than at any point since we started measuring. …<br />
Continue reading "MariaDB adoption is growing, and the way people get it is changing – Adoption Index 2026-09"<br />
MariaDB adoption is growing, and the way people get it is changing – Adoption Index 2026-09 appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/mariadb-adoption-is-growing-and-the-way-people-get-it-is-changing-adoption-index-2026-09/">MariaDB adoption is growing, and the way people get it is changing – Adoption Index 2026-09</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>The MariaDB Adoption Index is up 126% in a year. More people are downloading MariaDB, more people are contributing to it, and more projects are building on it than at any point since we started measuring. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/mariadb-adoption-is-growing-and-the-way-people-get-it-is-changing-adoption-index-2026-09/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;MariaDB adoption is growing, and the way people get it is changing – Adoption Index 2026-09&#8221;</span></a></p>
<p><a href="https://mariadb.org/mariadb-adoption-is-growing-and-the-way-people-get-it-is-changing-adoption-index-2026-09/">MariaDB adoption is growing, and the way people get it is changing – Adoption Index 2026-09</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/mariadb-adoption-is-growing-and-the-way-people-get-it-is-changing-adoption-index-2026-09/">MariaDB adoption is growing, and the way people get it is changing – Adoption Index 2026-09</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>PostgreSQL as a Workflow Engine: Building Reliable Long-Running AI Jobs Without Kafka</title>
        <link>https://percona.community/blog/2026/09/16/postgresql-workflow-engine-long-running-jobs/</link>
        <pubDate>Wed, 16 Sep 2026 11:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/postgresql-as-a-workflow-engine-building-reliable-long-running-ai-jobs-without-kafka/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>Every document-processing system I have worked on arrives at the same shape. Something uploads a file, something else has to read it, run it through an extraction or inference step that takes seconds to minutes, and store a result. The work is slow, it fails sometimes, and the answer has to be auditable afterwards.</p>
<p><a href="https://percona.community/blog/2026/09/16/postgresql-workflow-engine-long-running-jobs/">PostgreSQL as a Workflow Engine: Building Reliable Long-Running AI Jobs Without Kafka</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Every document-processing system I have worked on arrives at the same shape. Something uploads a file, something else has to read it, run it through an extraction or inference step that takes seconds to minutes, and store a result. The work is slow, it fails sometimes, and the answer has to be auditable afterwards.</p>
<p>The default advice is to put a message broker in front of it. That advice is not wrong, but it is usually given before anyone has measured whether the database already sitting in the stack can do the job. So I built the thing and measured it: a job queue inside PostgreSQL, four different claim strategies, workers scaled from 1 to 16, a worker killed mid-job on purpose, and query plans checked against a queue table buried under half a million completed rows.</p>
<p>This is what came out of it, including the two places my own harness lied to me.</p>
<h2>The workload I was modelling</h2>
<p>Concretely: a <code>jobs</code> table that other services insert into, workers that pick jobs up and spend somewhere between 200 ms and a few minutes on each one, and a requirement that a crashed worker must not silently lose a job. Roughly the shape of an OCR or document-extraction pipeline.</p>
<p>Three properties matter more than throughput here:</p>
<ul>
<li><strong>Jobs are long.</strong> If a job takes 200 ms, the coordination overhead is what dominates. If it takes 40 seconds, almost nothing about dequeue speed matters, and everything about crash behaviour does.</li>
<li><strong>Effects are external.</strong> Calling a model endpoint twice costs money and may produce two records downstream. “Roughly once” is not good enough.</li>
<li><strong>Operators need to see state.</strong> When something is stuck at 2 a.m., someone has to be able to ask <em>what is stuck, since when, and what was the error</em> — and get an answer.</li>
</ul>
<p>That last point is the one that quietly favours a database. Queue depth in a broker is a metric. Queue depth in a table is a query, and so is “show me every job that has failed three times with a timeout in the last hour”.</p>
<h2>Why I did not start with a Kafka broker</h2>
<p>Not because brokers are complicated. Because adding one to this particular design buys capability I would not use, and costs state I would have to keep consistent in two places.</p>
<p>If job state lives in Kafka and job results live in PostgreSQL, then every transition has two homes, and the interesting failures are the ones where those two disagree. Keeping the queue in the same database as the results means a worker can mark a job complete and write its output in one transaction, and that pairing is either both true or neither.</p>
<p>That is the trade I wanted to test, not a claim that one tool beats the other.</p>
<h2>The schema</h2>
<p>The table carries the job, its lifecycle, and enough forensic detail to answer questions later.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">CREATE</span><span class="w"> </span><span class="k">TYPE</span><span class="w"> </span><span class="n">job_status</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="n">ENUM</span><span class="w"> </span><span class="p">(</span><span class="s1">'pending'</span><span class="p">,</span><span class="s1">'running'</span><span class="p">,</span><span class="s1">'succeeded'</span><span class="p">,</span><span class="s1">'failed'</span><span class="p">,</span><span class="s1">'dead'</span><span class="p">);</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">CREATE</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">jobs</span><span class="w"> </span><span class="p">(</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">id</span><span class="w"> </span><span class="nb">bigint</span><span class="w"> </span><span class="k">GENERATED</span><span class="w"> </span><span class="n">ALWAYS</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="k">IDENTITY</span><span class="w"> </span><span class="k">PRIMARY</span><span class="w"> </span><span class="k">KEY</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">job_type</span><span class="w"> </span><span class="nb">text</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">payload</span><span class="w"> </span><span class="n">jsonb</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="w"> </span><span class="k">DEFAULT</span><span class="w"> </span><span class="s1">'{}'</span><span class="p">::</span><span class="n">jsonb</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">status</span><span class="w"> </span><span class="n">job_status</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="w"> </span><span class="k">DEFAULT</span><span class="w"> </span><span class="s1">'pending'</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">priority</span><span class="w"> </span><span class="nb">smallint</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="w"> </span><span class="k">DEFAULT</span><span class="w"> </span><span class="mi">100</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">attempt_count</span><span class="w"> </span><span class="nb">smallint</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="w"> </span><span class="k">DEFAULT</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">max_attempts</span><span class="w"> </span><span class="nb">smallint</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="w"> </span><span class="k">DEFAULT</span><span class="w"> </span><span class="mi">5</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">created_at</span><span class="w"> </span><span class="n">timestamptz</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="w"> </span><span class="k">DEFAULT</span><span class="w"> </span><span class="n">now</span><span class="p">(),</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">available_at</span><span class="w"> </span><span class="n">timestamptz</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="w"> </span><span class="k">DEFAULT</span><span class="w"> </span><span class="n">now</span><span class="p">(),</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">started_at</span><span class="w"> </span><span class="n">timestamptz</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">completed_at</span><span class="w"> </span><span class="n">timestamptz</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">lease_owner</span><span class="w"> </span><span class="nb">text</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">lease_expires_at</span><span class="w"> </span><span class="n">timestamptz</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">heartbeat_at</span><span class="w"> </span><span class="n">timestamptz</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">last_error</span><span class="w"> </span><span class="nb">text</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">idempotency_key</span><span class="w"> </span><span class="nb">text</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">result</span><span class="w"> </span><span class="n">jsonb</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">CONSTRAINT</span><span class="w"> </span><span class="n">jobs_running_leased</span><span class="w"> </span><span class="k">CHECK</span><span class="w"> </span><span class="p">(</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">status</span><span class="w"> </span><span class="o"></span><span class="w"> </span><span class="s1">'running'</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">OR</span><span class="w"> </span><span class="p">(</span><span class="n">lease_owner</span><span class="w"> </span><span class="k">IS</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="w"> </span><span class="k">AND</span><span class="w"> </span><span class="n">lease_expires_at</span><span class="w"> </span><span class="k">IS</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="p">);</span></span></span></code></pre>
</div>
</div>
</div>
<p><figure><img decoding="async" width="1400" height="995" src="https://percona.community/blog/2026/09/postgresql-workflow-engine-long-running-jobs-job-state-machine_hu_90e76216ffb9fb80.webp" alt="Job state machine: pending, running, succeeded, failed, dead" loading="lazy"></figure>
</p>
<p><em>The five states and the transitions between them. A crashed worker does not create a new state — it leaves a RUNNING row whose lease stops being renewed.</em></p>
<p>Two decisions in there are worth defending.</p>
<p><code>available_at</code> rather than a separate retry table. Backoff is just “not visible until later”, and a timestamp expresses that without another moving part. Every claim query carries <code>available_at &lt;= now()</code>, and a retry is an update that pushes the timestamp forward.</p>
<p>The <code>jobs_running_leased</code> check constraint. A row that says <code>running</code> but carries no lease is unrecoverable by any automated process — you cannot tell a live job from an abandoned one. Making that state impossible to write means orphan detection is a predicate rather than a heuristic. It also caught two bugs in my own worker code during the lab, which is a reasonable argument for constraints that encode invariants rather than just types.</p>
<h2>The naive version, and what it actually costs</h2>
<p><figure><img decoding="async" width="1400" height="849" src="https://percona.community/blog/2026/09/postgresql-workflow-engine-long-running-jobs-jobs-table-schema_hu_febfb95332c9b88d.webp" alt="The jobs table as PostgreSQL describes it" loading="lazy"></figure>
</p>
<p><em>The table as PostgreSQL sees it, including the constraint that makes a lease-less RUNNING row impossible to write.</em></p>
<p>The obvious implementation reads a pending row and then updates it:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SELECT</span><span class="w"> </span><span class="n">id</span><span class="p">,</span><span class="w"> </span><span class="n">payload</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">jobs</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'pending'</span><span class="w"> </span><span class="k">AND</span><span class="w"> </span><span class="n">available_at</span><span class="w"> </span><span class="o">&lt;=</span><span class="w"> </span><span class="n">now</span><span class="p">()</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">ORDER</span><span class="w"> </span><span class="k">BY</span><span class="w"> </span><span class="n">priority</span><span class="p">,</span><span class="w"> </span><span class="n">available_at</span><span class="p">,</span><span class="w"> </span><span class="n">id</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">LIMIT</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">UPDATE</span><span class="w"> </span><span class="n">jobs</span><span class="w"> </span><span class="k">SET</span><span class="w"> </span><span class="n">status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'running'</span><span class="p">,</span><span class="w"> </span><span class="n">lease_owner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="err">$</span><span class="mi">1</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">attempt_count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">attempt_count</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="err">$</span><span class="mi">2</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>I expected this to produce occasional duplicates under concurrency. It is worse than occasional. At Read Committed, two workers running that <code>SELECT</code> as separate statements both see the same row, both update it, and both run the job. Nothing errors. No constraint fires. The queue drains correctly and every job reports success — several of them more than once.</p>
<p>400 jobs, 200 ms of simulated work each:</p>
<table>
<thead>
<tr>
<th>Workers</th>
<th>Run time (s)</th>
<th>Jobs/s</th>
<th>Claims for 400 jobs</th>
<th>Jobs run 2+ times</th>
<th>Wasted runs</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>84.38</td>
<td>4.74</td>
<td>400</td>
<td>0</td>
<td>0</td>
</tr>
<tr>
<td>2</td>
<td>73.28</td>
<td>5.46</td>
<td>695</td>
<td>295</td>
<td>295</td>
</tr>
<tr>
<td>4</td>
<td>41.65</td>
<td>9.60</td>
<td>787</td>
<td>233</td>
<td>387</td>
</tr>
<tr>
<td>8</td>
<td>26.08</td>
<td>15.34</td>
<td>979</td>
<td>286</td>
<td>579</td>
</tr>
<tr>
<td>16</td>
<td>17.34</td>
<td>23.07</td>
<td>1286</td>
<td>322</td>
<td>886</td>
</tr>
</tbody>
</table>
<p>The second worker increased throughput by 15% while performing 74% more work. At 16 workers the pool did 1,286 job executions to complete 400 jobs, and still finished at a third of the rate the locking version managed.</p>
<p>Reading the claim log back shows how tight the window is. In a smaller run — 8 workers, 200 jobs — the same job was routinely handed out five or six times, and job 47 went to six different workers inside 2.2 ms.</p>
<p>Six workers, six full executions of the same document, inside 2.2 ms. When every worker is idle and polling — which is the normal state of a queue that has just been fed — they all run that <code>SELECT</code> at effectively the same instant and all get the same row. The race is not a rare interleaving; it is the default behaviour of an empty worker pool meeting a new job.</p>
<p><figure><img decoding="async" width="1400" height="569" src="https://percona.community/blog/2026/09/postgresql-workflow-engine-long-running-jobs-naive-claim-race_hu_528e8e33d19b2e6d.webp" alt="Naive claim versus SKIP LOCKED on the same 200 jobs" loading="lazy"></figure>
</p>
<p><em>Both strategies against the same 200 jobs. The lower block is the same run reading the claim log back: individual jobs handed to six different workers inside 2.2 ms.</em></p>
<p>There is a quieter form of damage in the same table. The colliding <code>UPDATE</code> runs <code>attempt_count = attempt_count + 1</code> once per collision, so the counter climbs without any failure having happened. I observed jobs sitting at <code>attempt_count</code> 3 and 4 on their first execution. Any retry limit reading that column is making decisions on corrupted state — a job could be buried as “failed too many times” having never once raised an error.</p>
<h2>Claiming safely: one statement, one row</h2>
<p>The fix is to make selection and marking a single atomic statement, and to tell PostgreSQL that a row already locked by someone else should be skipped rather than waited for:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-2" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">UPDATE</span><span class="w"> </span><span class="n">jobs</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">SET</span><span class="w"> </span><span class="n">status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'running'</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">started_at</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">now</span><span class="p">(),</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">attempt_count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">attempt_count</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">lease_owner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="err">$</span><span class="mi">1</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">lease_expires_at</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">now</span><span class="p">()</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="err">$</span><span class="mi">2</span><span class="p">::</span><span class="nb">interval</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">heartbeat_at</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">now</span><span class="p">()</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">SELECT</span><span class="w"> </span><span class="n">id</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">jobs</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'pending'</span><span class="w"> </span><span class="k">AND</span><span class="w"> </span><span class="n">available_at</span><span class="w"> </span><span class="o">&lt;=</span><span class="w"> </span><span class="n">now</span><span class="p">()</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">ORDER</span><span class="w"> </span><span class="k">BY</span><span class="w"> </span><span class="n">priority</span><span class="p">,</span><span class="w"> </span><span class="n">available_at</span><span class="p">,</span><span class="w"> </span><span class="n">id</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">FOR</span><span class="w"> </span><span class="k">UPDATE</span><span class="w"> </span><span class="n">SKIP</span><span class="w"> </span><span class="n">LOCKED</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">LIMIT</span><span class="w"> </span><span class="mi">1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="n">RETURNING</span><span class="w"> </span><span class="n">id</span><span class="p">,</span><span class="w"> </span><span class="n">payload</span><span class="p">,</span><span class="w"> </span><span class="n">attempt_count</span><span class="p">,</span><span class="w"> </span><span class="n">max_attempts</span><span class="p">,</span><span class="w"> </span><span class="n">idempotency_key</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p><code>SKIP LOCKED</code> has been in PostgreSQL since 9.5 and is documented as row-level locking behaviour: rows that cannot be locked immediately are omitted from the result rather than blocking the transaction. For a queue that is exactly the semantic you want — a worker that finds the head of the queue busy should take the next row, not queue up behind it.</p>
<p>Same workload, same hardware:</p>
<table>
<thead>
<tr>
<th>Workers</th>
<th>Run Time (s)</th>
<th>Throughput (Jobs/s)</th>
<th>Speed-up</th>
<th>Claims</th>
<th>Duplicate Jobs</th>
<th>Claim p50 (ms)</th>
<th>Claim p95 (ms)</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>84.08</td>
<td>4.76</td>
<td>1.00×</td>
<td>400</td>
<td>0</td>
<td>1.32</td>
<td>2.12</td>
</tr>
<tr>
<td>2</td>
<td>42.14</td>
<td>9.49</td>
<td>1.99×</td>
<td>400</td>
<td>0</td>
<td>1.48</td>
<td>2.21</td>
</tr>
<tr>
<td>4</td>
<td>21.05</td>
<td>19.00</td>
<td>3.99×</td>
<td>400</td>
<td>0</td>
<td>1.55</td>
<td>2.94</td>
</tr>
<tr>
<td>8</td>
<td>10.58</td>
<td>37.80</td>
<td>7.94×</td>
<td>400</td>
<td>0</td>
<td>1.77</td>
<td>3.52</td>
</tr>
<tr>
<td>16</td>
<td>5.34</td>
<td>74.87</td>
<td>15.73×</td>
<td>400</td>
<td>0</td>
<td>1.68</td>
<td>3.14</td>
</tr>
</tbody>
</table>
<p>Exactly 400 claims for 400 jobs at every worker count, and scaling within 2% of linear to 16 workers.</p>
<p><figure><img decoding="async" width="1400" height="680" src="https://percona.community/blog/2026/09/postgresql-workflow-engine-long-running-jobs-skip-locked-claims_hu_58ae290b8631ffac.webp" alt="Four workers claiming under FOR UPDATE SKIP LOCKED" loading="lazy"></figure>
</p>
<p><em>Four workers under SKIP LOCKED. Every running row has a different owner, and no job id appears twice across the whole run.</em></p>
<p>The number I keep coming back to is the claim latency. At 16 workers the median claim took 1.68 ms against 200 ms of work — under 1% overhead, and it barely moved as concurrency grew. Whatever eventually limits a design like this, the cost of asking PostgreSQL for the next job is not it.</p>
<p><figure><img decoding="async" width="1400" height="715" src="https://percona.community/blog/2026/09/postgresql-workflow-engine-long-running-jobs-benchmark-results_hu_bb8db649651b8493.webp" alt="Benchmark tables generated from results/benchmark.csv" loading="lazy"></figure>
</p>
<p><em>The tables above, generated directly from <code>results/benchmark.csv</code> rather than typed by hand.</em></p>
<h2>The transaction-scope mistake, and what it actually costs</h2>
<p>There is a version of this design that looks tidier and is wrong for reasons that took me a while to pin down. Instead of committing the claim and then working, you keep one transaction open across the whole thing:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">python</span><button class="code-block__copy" type="button" data-copy-target="codeblock-3" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="k">with</span> <span class="n">conn</span><span class="o">.</span><span class="n">transaction</span><span class="p">():</span>
</span></span><span class="line"><span class="cl"> <span class="n">job</span> <span class="o">=</span> <span class="n">claim_one_job</span><span class="p">()</span> <span class="c1"># takes a row lock</span>
</span></span><span class="line"><span class="cl"> <span class="n">result</span> <span class="o">=</span> <span class="n">run_inference</span><span class="p">(</span><span class="n">job</span><span class="p">)</span> <span class="c1"># 200 ms, or 40 seconds</span>
</span></span><span class="line"><span class="cl"> <span class="n">mark_succeeded</span><span class="p">(</span><span class="n">job</span><span class="p">,</span> <span class="n">result</span><span class="p">)</span></span></span></code></pre>
</div>
</div>
</div>
<p>It is appealing because it is atomic: if the worker dies, the transaction rolls back and the job is instantly available again. No lease, no reaper, no orphan states.</p>
<p>I expected this to be visibly slower under concurrency and built the benchmark to show that. It did not show that.</p>
<h3>The throughput argument does not hold</h3>
<table>
<thead>
<tr>
<th>Workers</th>
<th>Claim + work outside (jobs/s)</th>
<th>Work inside the transaction (jobs/s)</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>4.76</td>
<td>4.79</td>
</tr>
<tr>
<td>2</td>
<td>9.49</td>
<td>9.61</td>
</tr>
<tr>
<td>4</td>
<td>19.00</td>
<td>19.32</td>
</tr>
<tr>
<td>8</td>
<td>37.80</td>
<td>38.71</td>
</tr>
<tr>
<td>16</td>
<td>74.87</td>
<td>78.21</td>
</tr>
</tbody>
</table>
<p>Holding the transaction open was consistently a shade <em>faster</em> — about 4% at 16 workers — and its claim latency was lower too (0.86 ms median at 1 worker against 1.32 ms), which makes sense: there is one round trip fewer, because the claim never has to commit on its own.</p>
<p>So if you argue against this pattern on throughput grounds, the measurement will not back you up. I had to go and find what the benchmark could not see.</p>
<h3>What the benchmark could not see</h3>
<p>I re-ran both designs with 8 workers while sampling <code>pg_stat_activity</code>, looking at connection state and at how far back the oldest snapshot each worker held was sitting.</p>
<table>
<thead>
<tr>
<th>Job length</th>
<th>Approach</th>
<th>Connections idle in transaction</th>
<th>Longest open transaction (s)</th>
<th>Snapshot age (transactions)</th>
</tr>
</thead>
<tbody>
<tr>
<td>200 ms</td>
<td>claim, commit, then work</td>
<td>0</td>
<td>0.00</td>
<td>0</td>
</tr>
<tr>
<td>200 ms</td>
<td>work inside the transaction</td>
<td>8</td>
<td>0.20</td>
<td>10</td>
</tr>
<tr>
<td>3000 ms</td>
<td>claim, commit, then work</td>
<td>0</td>
<td>0.00</td>
<td>0</td>
</tr>
<tr>
<td>3000 ms</td>
<td>work inside the transaction</td>
<td>8</td>
<td>2.52</td>
<td>16</td>
</tr>
</tbody>
</table>
<p>That is the actual cost, and it is not throughput. Every worker holds a connection in <code>idle in transaction</code> for as long as the job runs, and the open transaction pins the snapshot horizon for that whole time.</p>
<p>Notice how the numbers move with job length. At 200 ms the longest transaction was 0.2 s. At 3 s it was 2.52 s. The relationship is linear and unbounded, which is the problem: these were <code>time.sleep</code> calls, but the workload this models is a model endpoint that might take 30 or 60 seconds. At that point every worker is holding a transaction open for a minute at a time, and <code>VACUUM</code> cannot clean up any row version newer than the oldest of them.</p>
<p>There is a second cost that does not appear in either table. A connection sitting inside a transaction cannot be handed back to a pool. With a transaction-mode pooler in front of the database, this design pins one server connection per in-flight job for the entire duration of the job — so worker concurrency and database connection count become the same number, and you have given up the thing the pooler was for.</p>
<p>None of this hurts at 200 ms. All of it hurts at 60 seconds. The benchmark ran short jobs, so it measured the case where the mistake is invisible — which is exactly why the throughput table is not sufficient evidence on its own.</p>
<h3>The shape that works</h3>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-4" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">BEGIN</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">claim</span><span class="w"> </span><span class="n">one</span><span class="w"> </span><span class="n">job</span><span class="p">,</span><span class="w"> </span><span class="n">take</span><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="n">lease</span><span class="p">,</span><span class="w"> </span><span class="n">mark</span><span class="w"> </span><span class="n">it</span><span class="w"> </span><span class="n">running</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">COMMIT</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="n">run</span><span class="w"> </span><span class="n">the</span><span class="w"> </span><span class="n">expensive</span><span class="w"> </span><span class="k">work</span><span class="w"> </span><span class="c1">-- no transaction open, heartbeat renewing the lease
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">BEGIN</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">write</span><span class="w"> </span><span class="n">the</span><span class="w"> </span><span class="k">result</span><span class="p">,</span><span class="w"> </span><span class="n">mark</span><span class="w"> </span><span class="n">it</span><span class="w"> </span><span class="n">succeeded</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">COMMIT</span></span></span></code></pre>
</div>
</div>
</div>
<p>Two short transactions with a long gap between them. This is what the benchmark’s “skiplocked” numbers came from, and it is the version I would ship.</p>
<p>It does introduce a failure window that the single-transaction version does not have. If the worker dies during the gap, nothing rolls back: the row is left saying <code>running</code>, owned by a process that no longer exists. That is not a flaw in the pattern so much as the price of it, and it is what leases and idempotency exist to handle.</p>
<h2>Indexing the queue: the history problem</h2>
<p>A queue table has an awkward property. The rows you query are a small, roughly constant set — the backlog — while the table itself grows without limit as completed jobs accumulate. An index that covers the whole table gets steadily more expensive to maintain in order to serve a working set that never grows.</p>
<p>So the claim index is partial:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-5" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">CREATE</span><span class="w"> </span><span class="k">INDEX</span><span class="w"> </span><span class="n">jobs_claim_idx</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="n">jobs</span><span class="w"> </span><span class="p">(</span><span class="n">priority</span><span class="p">,</span><span class="w"> </span><span class="n">available_at</span><span class="p">,</span><span class="w"> </span><span class="n">id</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'pending'</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>The column order matches the <code>ORDER BY</code> in the claim, so the scan can stop at the first qualifying row instead of sorting.</p>
<p>To check whether that predicate earns its place I ran <code>EXPLAIN (ANALYZE, BUFFERS)</code> on the claim against 500 pending jobs, then inserted 500,000 completed rows underneath them and ran it again.</p>
<p>On the 240 kB table the plan is an index scan over <code>jobs_claim_idx</code>: seven shared buffer hits, 0.032 ms. After inserting 500,000 completed rows the table is 91 MB, and the plan is the same index scan at four buffer hits and 0.021 ms.</p>
<p>The plan does not change and neither does the cost, because the index the claim touches only ever contains pending rows. History is invisible to it.</p>
<p>Dropping the partial index on that same table is the control. The planner falls back to a sequential scan with a sort on top, filters out all 500,000 completed rows to reach the 500 pending ones, and spends 10,216 buffer hits and 27.648 ms doing it.</p>
<p>27.6 ms and 10,216 buffers to find one job, versus 0.02 ms and four. With workers polling this query continuously, that difference is the whole design.</p>
<p><figure><img decoding="async" width="1400" height="845" src="https://percona.community/blog/2026/09/postgresql-workflow-engine-long-running-jobs-explain-partial-index_hu_ec97012a8678127e.webp" alt="EXPLAIN ANALYZE for the claim query in three conditions" loading="lazy"></figure>
</p>
<p><em>The same query in three conditions. The middle plan is the one that matters: adding half a million completed rows changed nothing.</em></p>
<p>The size comparison is the other half of the argument. On the 500,000-row table:</p>
<table>
<thead>
<tr>
<th>Index</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>jobs_claim_idx</code> — partial, <code>WHERE status = 'pending'</code></td>
<td>40 kB</td>
</tr>
<tr>
<td>the same index without the predicate</td>
<td>19 MB</td>
</tr>
<tr>
<td><code>jobs_lease_expiry_idx</code> — partial, <code>WHERE status = 'running'</code></td>
<td>8 kB</td>
</tr>
</tbody>
</table>
<p>The partial index is roughly 475 times smaller and answers the same query, because it indexes the backlog rather than the archive. The lease-expiry index is smaller still: the number of running jobs is bounded by the number of workers, so it holds a handful of entries no matter how large the table gets.</p>
<p><figure><img decoding="async" width="1400" height="313" src="https://percona.community/blog/2026/09/postgresql-workflow-engine-long-running-jobs-index-sizes_hu_59fd685809cd2507.webp" alt="Index sizes on the queue table" loading="lazy"></figure>
</p>
<p><em>Index sizes on the queue table. The claim index is the smallest thing on it.</em></p>
<p>This is the one recommendation from the lab I would make without hedging. If you build a queue in PostgreSQL, make the claim index partial on the pending predicate.</p>
<h2>What a crashed worker actually leaves behind</h2>
<p><code>status = 'running'</code> is not information. It is an assertion that some process was alive when it wrote the row, and nothing about the row tells you whether that is still true. A job that has been running for four minutes is either a slow job or a dead worker, and the table cannot distinguish them.</p>
<p>That is what the lease is for. Claiming a job writes an owner and an expiry:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-6" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="n">lease_owner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'worker-7'</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="n">lease_expires_at</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">now</span><span class="p">()</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="nb">interval</span><span class="w"> </span><span class="s1">'30 seconds'</span></span></span></code></pre>
</div>
</div>
</div>
<p>and a background thread in the worker renews the expiry while the job runs:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-7" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">UPDATE</span><span class="w"> </span><span class="n">jobs</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">SET</span><span class="w"> </span><span class="n">heartbeat_at</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">now</span><span class="p">(),</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">lease_expires_at</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">now</span><span class="p">()</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="err">$</span><span class="mi">1</span><span class="p">::</span><span class="nb">interval</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="err">$</span><span class="mi">2</span><span class="w"> </span><span class="k">AND</span><span class="w"> </span><span class="n">lease_owner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="err">$</span><span class="mi">3</span><span class="w"> </span><span class="k">AND</span><span class="w"> </span><span class="n">status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'running'</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>The <code>lease_owner = $3</code> predicate matters. If the lease has already been reclaimed and handed to someone else, this update matches nothing, and a worker that wakes up from a long stall cannot extend a lease it no longer holds.</p>
<p>Without a heartbeat the lease has to be longer than the longest job you will ever run, which means a worker that dies leaves its job stuck for that entire window. With one, the lease can be short — 30 seconds here — and still safe, because it only lapses when the worker genuinely stops renewing it.</p>
<h3>Killing a worker to see what happens</h3>
<p>Two workers, three jobs of 24 seconds each, a 10-second lease and a 3-second heartbeat. Both workers pick up a job, then I sent <code>SIGKILL</code> to whichever one held the first row.</p>
<p><figure><img decoding="async" width="1400" height="1297" src="https://percona.community/blog/2026/09/postgresql-workflow-engine-long-running-jobs-crash-lease-recovery_hu_7275fba842d08d3e.webp" alt="Worker kill, orphaned row, lease expiry, reclaim, completion" loading="lazy"></figure>
</p>
<p><em>The whole sequence in one run: kill, orphan, lease expiry, reclaim, completion.</em></p>
<p>Six seconds in, both rows are held, both leases have about seven seconds left, and both heartbeats are two seconds old.</p>
<p>One second after the kill, nothing has changed. Job 1 still claims to be running, still names w2 as its owner, and its lease still has six seconds on it. This is the state that makes <code>status = 'running'</code> insufficient on its own: job 1’s owner no longer exists, and the row is indistinguishable from job 2, whose owner is fine.</p>
<p>Twelve seconds later they have separated, and the thing that separates them is the heartbeat rather than the status. Job 2’s lease still shows nine seconds remaining with a zero-second-old heartbeat, because w1 is alive and renewing it. Job 1’s lease is five seconds overdue and its heartbeat is fifteen seconds stale, because nothing has touched it since the process died. Orphan detection is then a plain predicate:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-8" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SELECT</span><span class="w"> </span><span class="n">id</span><span class="p">,</span><span class="w"> </span><span class="n">lease_owner</span><span class="p">,</span><span class="w"> </span><span class="n">now</span><span class="p">()</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">lease_expires_at</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="n">expired_for</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">jobs</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'running'</span><span class="w"> </span><span class="k">AND</span><span class="w"> </span><span class="n">lease_expires_at</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="n">now</span><span class="p">();</span></span></span></code></pre>
</div>
</div>
</div>
<p>which returned exactly one row: <code>(1, 'w2', '05s overdue')</code>.</p>
<p>The reaper puts it back:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-9" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">UPDATE</span><span class="w"> </span><span class="n">jobs</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">SET</span><span class="w"> </span><span class="n">status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'pending'</span><span class="p">,</span><span class="w"> </span><span class="n">available_at</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">now</span><span class="p">(),</span><span class="w"> </span><span class="n">started_at</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">NULL</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">lease_owner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">lease_expires_at</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">NULL</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">last_error</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">coalesce</span><span class="p">(</span><span class="n">last_error</span><span class="p">,</span><span class="s1">''</span><span class="p">)</span><span class="w"> </span><span class="o">||</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">format</span><span class="p">(</span><span class="s1">'[lease expired, reclaimed from %s at %s] '</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">lease_owner</span><span class="p">,</span><span class="w"> </span><span class="n">now</span><span class="p">())</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'running'</span><span class="w"> </span><span class="k">AND</span><span class="w"> </span><span class="n">lease_expires_at</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="n">now</span><span class="p">();</span></span></span></code></pre>
</div>
</div>
</div>
<p>The row returns to <code>pending</code> with its attempt count intact, which matters: a job that has already burned an attempt should not get a fresh budget just because the worker holding it crashed. Otherwise a job that reliably kills its worker retries forever.</p>
<p>The surviving worker then picked it up and finished it. Final state: all three jobs succeeded, job 1 with <code>attempt_count = 2</code>, and three result rows.</p>
<p>Note that the reaper runs against the partial index on <code>status = 'running'</code>, which holds one entry per in-flight job. It stays cheap regardless of table size.</p>
<h2>Retries, backoff, and knowing when to stop</h2>
<p>A failure updates the row rather than deleting it. There is no separate retry table and no separate dead-letter queue — <code>available_at</code> and <code>status</code> carry both.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-10" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="c1">-- still has attempts left: push it into the future
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="k">UPDATE</span><span class="w"> </span><span class="n">jobs</span><span class="w"> </span><span class="k">SET</span><span class="w"> </span><span class="n">status</span><span class="o">=</span><span class="s1">'pending'</span><span class="p">,</span><span class="w"> </span><span class="n">last_error</span><span class="o">=</span><span class="err">$</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">started_at</span><span class="o">=</span><span class="k">NULL</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">available_at</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">now</span><span class="p">()</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">make_interval</span><span class="p">(</span><span class="n">secs</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="err">$</span><span class="mi">2</span><span class="p">),</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">lease_owner</span><span class="o">=</span><span class="k">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">lease_expires_at</span><span class="o">=</span><span class="k">NULL</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">id</span><span class="o">=</span><span class="err">$</span><span class="mi">3</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="c1">-- attempts exhausted: stop, and keep the evidence
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="k">UPDATE</span><span class="w"> </span><span class="n">jobs</span><span class="w"> </span><span class="k">SET</span><span class="w"> </span><span class="n">status</span><span class="o">=</span><span class="s1">'dead'</span><span class="p">,</span><span class="w"> </span><span class="n">completed_at</span><span class="o">=</span><span class="n">now</span><span class="p">(),</span><span class="w"> </span><span class="n">last_error</span><span class="o">=</span><span class="err">$</span><span class="mi">1</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">lease_owner</span><span class="o">=</span><span class="k">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">lease_expires_at</span><span class="o">=</span><span class="k">NULL</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">id</span><span class="o">=</span><span class="err">$</span><span class="mi">2</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>Backoff is <code>base * 2^(attempt-1)</code> seconds, expressed entirely as a future <code>available_at</code>. No worker needs to know it is a retry; the claim query already filters on <code>available_at &lt;= now()</code>.</p>
<p>Three jobs: one that succeeds immediately, one that fails twice then succeeds, one that always fails with <code>max_attempts = 3</code>. After three worker passes the first is <code>succeeded</code> at 1/5 attempts, the flaky one is <code>succeeded</code> at 3/5, and the broken one is <code>dead</code> at 3/3 with <code>model backend returned 503</code> still attached to the row.</p>
<p><figure><img decoding="async" width="1400" height="798" src="https://percona.community/blog/2026/09/postgresql-workflow-engine-long-running-jobs-retry-outcomes_hu_9b998703d154e666.webp" alt="Three jobs, three outcomes: succeeded, retried, dead" loading="lazy"></figure>
</p>
<p><em>Three jobs, three outcomes. The attempts column and last_error are the whole audit trail.</em></p>
<p>The operational questions answer themselves once the state is in the table:</p>
<ul>
<li><em>What failed?</em> <code>SELECT ... WHERE status = 'dead'</code>, with <code>last_error</code> attached.</li>
<li><em>Can I retry it?</em> Set <code>status = 'pending'</code>, <code>available_at = now()</code>, and optionally raise <code>max_attempts</code>. A dead job is a row, not a lost message.</li>
<li><em>Why did it stop?</em> Because <code>attempt_count</code> reached <code>max_attempts</code> — the row says so.</li>
<li><em>How do I avoid an infinite retry loop?</em> The <code>dead</code> state is the answer, and it exists precisely so that “retry forever” is not the default.</li>
</ul>
<p>Keeping dead jobs in the same table as live ones is deliberate. A separate dead-letter store is another thing to build, monitor, and reconcile, and the partial index means buried rows cost the claim query nothing.</p>
<h2>Idempotency, not exactly-once</h2>
<p>The design above delivers <strong>at least once</strong>. A job can run more than once, and the crash test showed exactly when: the worker finished the work but died before committing the status, so the lease lapsed and someone else ran it again. Nothing in PostgreSQL prevents that, because the expensive work happens outside the database and cannot be rolled back.</p>
<p>Exactly-once execution is not available here and it would be dishonest to imply otherwise. What is available is making the second execution harmless — the effect lands once even though the work ran twice.</p>
<p>The mechanism is a unique key on the effect, not on the job:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-11" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">CREATE</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">job_results</span><span class="w"> </span><span class="p">(</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">idempotency_key</span><span class="w"> </span><span class="nb">text</span><span class="w"> </span><span class="k">PRIMARY</span><span class="w"> </span><span class="k">KEY</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">job_id</span><span class="w"> </span><span class="nb">bigint</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="w"> </span><span class="k">REFERENCES</span><span class="w"> </span><span class="n">jobs</span><span class="p">(</span><span class="n">id</span><span class="p">),</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">produced_by</span><span class="w"> </span><span class="nb">text</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">produced_at</span><span class="w"> </span><span class="n">timestamptz</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="w"> </span><span class="k">DEFAULT</span><span class="w"> </span><span class="n">now</span><span class="p">(),</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">result</span><span class="w"> </span><span class="n">jsonb</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="p">);</span></span></span></code></pre>
</div>
</div>
</div>
<p>and the completion writes through it:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-12" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">INSERT</span><span class="w"> </span><span class="k">INTO</span><span class="w"> </span><span class="n">job_results</span><span class="w"> </span><span class="p">(</span><span class="n">idempotency_key</span><span class="p">,</span><span class="w"> </span><span class="n">job_id</span><span class="p">,</span><span class="w"> </span><span class="n">produced_by</span><span class="p">,</span><span class="w"> </span><span class="k">result</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">VALUES</span><span class="w"> </span><span class="p">(</span><span class="err">$</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="err">$</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="err">$</span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="err">$</span><span class="mi">4</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">ON</span><span class="w"> </span><span class="n">CONFLICT</span><span class="w"> </span><span class="p">(</span><span class="n">idempotency_key</span><span class="p">)</span><span class="w"> </span><span class="k">DO</span><span class="w"> </span><span class="k">NOTHING</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>To check this behaves under the failure it is meant to survive, I ran a job to completion, forced its row back to <code>pending</code> — standing in for a worker that died after the work but before the commit — and let a second worker reclaim it. The second worker did the work again and then reported <code>result already existed, skipped</code>: its insert hit the conflict and did nothing. The job row ends at <code>attempts=2</code> while <code>job_results</code> holds a single row for <code>invoice-2026-000412</code>, produced by worker-a.</p>
<p><figure><img decoding="async" width="1400" height="427" src="https://percona.community/blog/2026/09/postgresql-workflow-engine-long-running-jobs-idempotent-effect_hu_1acb94632b8c2609.webp" alt="The job ran twice and the effect was written once" loading="lazy"></figure>
</p>
<p><em>The job ran twice. The effect was written once.</em></p>
<p><code>attempts=2</code> is the honest record: the job really did run twice. One result row survives, and it is attributed to the worker that got there first.</p>
<p>Three terms worth keeping distinct:</p>
<ul>
<li><strong>At least once</strong> — what this system guarantees. A job runs one or more times.</li>
<li><strong>Exactly once</strong> — what it does not guarantee, and what no system with an external side effect can guarantee on its own.</li>
<li><strong>Effectively once</strong> — at-least-once execution plus a uniqueness constraint on the effect, so repeats do not accumulate.</li>
</ul>
<p>The important part is where the key comes from. <code>invoice-2026-000412</code> is derived from the work, not generated by the worker, so two independent executions produce the same key. A UUID minted at claim time would produce two different keys and two rows, which is a constraint that looks like idempotency and provides none of it.</p>
<p>If the real side effect is outside PostgreSQL — a payment, an email, a write to another service — the same reasoning applies, and the idempotency key has to travel to that system so it can do the deduplication.</p>
<h2>Operational visibility</h2>
<p>This is the part that is hard to give up once you have had it. The queue is a table, so answering questions about it is just SQL.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-13" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="c1">-- how far behind are we, and what is the oldest thing waiting
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="k">SELECT</span><span class="w"> </span><span class="k">count</span><span class="p">(</span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="n">ready_now</span><span class="p">,</span><span class="w"> </span><span class="k">max</span><span class="p">(</span><span class="n">now</span><span class="p">()</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">created_at</span><span class="p">)</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="n">oldest_wait</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">jobs</span><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'pending'</span><span class="w"> </span><span class="k">AND</span><span class="w"> </span><span class="n">available_at</span><span class="w"> </span><span class="o">&lt;=</span><span class="w"> </span><span class="n">now</span><span class="p">();</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="c1">-- who is holding what, and how much lease is left
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="k">SELECT</span><span class="w"> </span><span class="n">id</span><span class="p">,</span><span class="w"> </span><span class="n">lease_owner</span><span class="p">,</span><span class="w"> </span><span class="n">attempt_count</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">lease_expires_at</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">now</span><span class="p">()</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="n">lease_remaining</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">now</span><span class="p">()</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">heartbeat_at</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="n">since_heartbeat</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">jobs</span><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'running'</span><span class="w"> </span><span class="k">ORDER</span><span class="w"> </span><span class="k">BY</span><span class="w"> </span><span class="n">lease_expires_at</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="c1">-- jobs burning through their attempts
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="k">SELECT</span><span class="w"> </span><span class="n">id</span><span class="p">,</span><span class="w"> </span><span class="n">attempt_count</span><span class="p">,</span><span class="w"> </span><span class="n">max_attempts</span><span class="p">,</span><span class="w"> </span><span class="n">available_at</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">now</span><span class="p">()</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="n">retry_in</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">left</span><span class="p">(</span><span class="n">last_error</span><span class="p">,</span><span class="w"> </span><span class="mi">60</span><span class="p">)</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="n">last_error</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">jobs</span><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'pending'</span><span class="w"> </span><span class="k">AND</span><span class="w"> </span><span class="n">attempt_count</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="mi">0</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">ORDER</span><span class="w"> </span><span class="k">BY</span><span class="w"> </span><span class="n">attempt_count</span><span class="w"> </span><span class="k">DESC</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="c1">-- the dead letter queue
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="k">SELECT</span><span class="w"> </span><span class="n">id</span><span class="p">,</span><span class="w"> </span><span class="n">attempt_count</span><span class="p">,</span><span class="w"> </span><span class="n">completed_at</span><span class="p">,</span><span class="w"> </span><span class="k">left</span><span class="p">(</span><span class="n">last_error</span><span class="p">,</span><span class="w"> </span><span class="mi">80</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">jobs</span><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'dead'</span><span class="w"> </span><span class="k">ORDER</span><span class="w"> </span><span class="k">BY</span><span class="w"> </span><span class="n">completed_at</span><span class="w"> </span><span class="k">DESC</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p><code>since_heartbeat</code> is the alert worth having. A growing heartbeat age on a running job means a worker is wedged rather than slow, and it fires before the lease expires rather than after.</p>
<p><figure><img decoding="async" width="1400" height="844" src="https://percona.community/blog/2026/09/postgresql-workflow-engine-long-running-jobs-transaction-scope_hu_4c864e65c5668e19.webp" alt="The worker loop and the two short transactions in it" loading="lazy"></figure>
</p>
<p><em>The finished shape. The two grey blocks are the only times a transaction is open.</em></p>
<h2>Where this design holds up</h2>
<p>On the evidence from this lab, a PostgreSQL-backed queue is a reasonable default when:</p>
<ul>
<li><strong>Jobs are slow.</strong> The claim cost 1.68 ms against 200 ms of work. Against a 30-second inference call it disappears entirely. Coordination overhead only matters when the work is trivial, and this workload is the opposite.</li>
<li><strong>PostgreSQL is already in the stack.</strong> The queue adds one table, one partial index and a reaper. There is no new system to deploy, secure, upgrade, back up or learn.</li>
<li><strong>Job state and business data must agree.</strong> Marking a job complete and writing its output in one transaction removes an entire category of failure.</li>
<li><strong>You need to interrogate the backlog.</strong> Everything in the previous section is a <code>SELECT</code>.</li>
<li><strong>There is one logical consumer group.</strong> Work is distributed among workers, not broadcast to independent subscribers.</li>
</ul>
<h2>Where I would stop</h2>
<p>The lab did not find a throughput wall, but it was not built to. These are the signals I would treat as a reason to move to a dedicated broker, and I want to be clear that they are architectural rather than measured here:</p>
<ul>
<li><strong>Sustained high-rate event streams.</strong> This lab ran at tens of jobs per second with 200 ms jobs. A queue table at tens of thousands of events per second is a different problem, and one that pushes hard on vacuum and on index churn.</li>
<li><strong>Fan-out to many independent consumers.</strong> A <code>jobs</code> table hands each row to one worker. Several unrelated systems that all need to see every event is a different shape, and emulating it with per-consumer state in SQL is a rebuild of a broker with worse tooling.</li>
<li><strong>Replay.</strong> Kafka retains a log you can re-read from an offset. Once a queue row is processed it is a completed row; if you need “reprocess everything from last Tuesday”, the queue is not your event store.</li>
<li><strong>Retention semantics.</strong> A broker is designed to hold and expire a stream. A queue table holds rows until you delete them, and someone has to own that.</li>
<li><strong>Cross-system distribution.</strong> Once producers and consumers span teams and deployments, a broker is the integration contract. A shared queue table is shared internals.</li>
</ul>
<p><figure><img decoding="async" width="1400" height="923" src="https://percona.community/blog/2026/09/postgresql-workflow-engine-long-running-jobs-broker-decision_hu_d58d4fa0b32b78d3.webp" alt="Deciding between a PostgreSQL queue and a broker" loading="lazy"></figure>
</p>
<p><em>How I would decide it now.</em></p>
<p>The distinction that stayed with me is between a <strong>work queue</strong> and an <strong>event log</strong>. This design is a good work queue. It is not an event log, and most of the arguments for introducing Kafka are really arguments for an event log.</p>
<p>Two caveats about the numbers, so they are not carried further than they support. The work was <code>time.sleep</code>, so workers were never CPU-bound and 16 of them fit comfortably on 12 cores; real inference would compete for CPU and the scaling curve would bend earlier. And this is one laptop with one database and no replication, network hop, or connection pooler in the path. The measurements are about coordination behaviour and correctness, not about capacity on your hardware.</p>
<h2>Conclusion</h2>
<p>I set out to find where PostgreSQL stops being enough for coordinating long-running asynchronous work, and I did not find that wall on this workload. What I found instead was that the interesting failures are not about throughput at all.</p>
<p>The naive claim was the sharpest result: not a rare race but 886 wasted job executions out of 400 jobs at 16 workers, with a corrupted <code>attempt_count</code> on top, and PostgreSQL reporting complete success throughout. <code>FOR UPDATE SKIP LOCKED</code> fixed it exactly, with zero duplicates at every worker count and scaling within 2% of linear.</p>
<p>The transaction-scope question was the one that taught me most, because the benchmark argued the wrong way. Holding the transaction open across the work was slightly <em>faster</em>. The cost only appeared when I stopped measuring throughput and looked at connection state: eight connections pinned in <code>idle in transaction</code>, and an open transaction whose duration tracks job length linearly. That cost is invisible at 200 ms and severe at 60 seconds, which is precisely the workload this design is for.</p>
<p>And the partial index is the one thing I would not build without. Same query, same backlog: 0.02 ms and four buffers with it, 27.6 ms and 10,216 buffers without, on a table that was 99.9% history.</p>
<p>If your jobs are slow, your volume is moderate, and PostgreSQL is already running, the queue table is a legitimate architecture rather than a stepping stone — provided you take the short claim transaction, the lease with heartbeats, the idempotent effect and the dead-letter state as a package. Skip any one of them and you have built something that works in testing and loses jobs in production. Reach for a broker when you need fan-out, replay or retention, not because a queue in the database feels like cheating.</p>
<h2>Reproducing this</h2>
<table>
<thead>
<tr>
<th>Component</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Hardware</td>
<td>Apple M2 Pro, 12 cores, 16 GB</td>
</tr>
<tr>
<td>OS</td>
<td>macOS 26.4 (arm64)</td>
</tr>
<tr>
<td>Database</td>
<td>Percona Server for PostgreSQL 18.6.1 (PostgreSQL 18.6), official container image</td>
</tr>
<tr>
<td>Container runtime</td>
<td>Docker Desktop 29.3.1, VM limited to 12 CPUs / ~8 GB</td>
</tr>
<tr>
<td>Client</td>
<td>Python 3.12.13, psycopg 3.3.5</td>
</tr>
<tr>
<td>PostgreSQL config</td>
<td>image defaults, unmodified</td>
</tr>
<tr>
<td>Workload</td>
<td>400 jobs, 200 ms simulated work, workers 1/2/4/8/16</td>
</tr>
<tr>
<td>Lease / heartbeat</td>
<td>30 s lease, renewed every 3–5 s (10 s lease in the crash test)</td>
</tr>
<tr>
<td>Retries</td>
<td><code>max_attempts</code> 5, backoff <code>1s * 2^(attempt-1)</code></td>
</tr>
</tbody>
</table>
<p><figure><img decoding="async" width="1400" height="486" src="https://percona.community/blog/2026/09/postgresql-workflow-engine-long-running-jobs-test-environment_hu_c10bc9812e8d0d5c.webp" alt="The database and environment under test" loading="lazy"></figure>
</p>
<p><em>The database under test.</em></p>
<p>One trap worth flagging: the official image initialises its default database as <code>SQL_ASCII</code>. Under that encoding psycopg 3 returns <code>bytes</code> rather than <code>str</code> for text columns, so <code>status::text</code> comes back as <code>b'succeeded'</code> and every comparison against <code>'succeeded'</code> silently fails. The lab uses a database created explicitly with <code>ENCODING 'UTF8' TEMPLATE template0</code>.</p>
<p>Timings are measured from the database — first claim to last completion — rather than from the wall clock around the worker processes, because workers idle briefly before exiting and that idle time inflated the fast runs by up to 30%.</p>
<h2>References</h2>
<ul>
<li>PostgreSQL documentation, Row-Level Locking — <code>FOR UPDATE</code>, <code>SKIP LOCKED</code> and <code>NOWAIT</code> semantics</li>
<li>PostgreSQL documentation, Transaction Isolation — Read Committed behaviour, which is what makes the naive claim unsafe</li>
<li>PostgreSQL documentation, Partial Indexes</li>
<li>PostgreSQL documentation, Routine Vacuuming — why long-running transactions delay cleanup</li>
<li>PostgreSQL documentation, <code>INSERT ... ON CONFLICT</code></li>
<li>psycopg 3 documentation</li>
<li>Percona Distribution for PostgreSQL documentation</li>
</ul>
<p><em>This post is part of the <a href="https://percona.community/blog/write-for-percona-community/">Percona Community Writers Program</a>.</em></p>
<p><a href="https://percona.community/blog/2026/09/16/postgresql-workflow-engine-long-running-jobs/">PostgreSQL as a Workflow Engine: Building Reliable Long-Running AI Jobs Without Kafka</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Implementing GitOps from Infrastructure to DB Operators to Unify Ops for Kubernetes Databases</title>
        <link>https://severalnines.com/blog/implementing-gitops-from-infrastructure-to-db-operators-to-unify-ops-for-kubernetes-databases/</link>
        <pubDate>Wed, 16 Sep 2026 08:57:10 +0000</pubDate>
        <dc:creator>Sucahyo Ardy Prasetiyo</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/implementing-gitops-from-infrastructure-to-db-operators-to-unify-ops-for-kubernetes-databases/</guid>
        <source url="https://severalnines.com/">Severalnines</source>
        <description><![CDATA[<p>Most platform teams already use GitOps for their Kubernetes apps. The config lives in Git, Argo CD applies it, and deployments are predictable. But look one layer down and things get messy. Infrastructure setup is often still done by hand, running Terraform locally or through scattered scripts. Database operations, especially for databases running through Kubernetes […]<br />
The post Implementing GitOps from Infrastructure to DB Operators to Unify Ops for Kubernetes Databases appeared first on Severalnines.</p>
<p><a href="https://severalnines.com/blog/implementing-gitops-from-infrastructure-to-db-operators-to-unify-ops-for-kubernetes-databases/">Implementing GitOps from Infrastructure to DB Operators to Unify Ops for Kubernetes Databases</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Most platform teams already use GitOps for their <a href="https://severalnines.com/clustercontrol/solutions/kubernetes/">Kubernetes</a> apps. The config lives in Git, Argo CD applies it, and deployments are predictable. But look one layer down and things get messy.</p>
<p>Infrastructure setup is often still done by hand, running Terraform locally or through scattered scripts. Database operations, especially for databases running through Kubernetes operators, are handled through a different set of tools and dashboards.</p>
<p>So you end up with one layer that’s fully GitOps, and everything under it or beside it is still manual. Every environment turns into its own special case, and when something breaks, you’re checking three or four different systems just to figure out what changed.<br />This post walks through a simple way to fix that, using three layers that work together:</p>
<ol class="wp-block-list">
<li>GitOps for infrastructure, using Terraform or OpenTofu.</li>
<li>GitOps for Kubernetes, using Argo CD.</li>
<li>A consistent way to run day-to-day database operations for operator-managed databases, using ClusterControl.</li>
</ol>
<p>The point isn’t to add another tool just to have one. It’s to end up with fewer parts of your stack running on manual steps and tribal knowledge.</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="519" src="https://severalnines.com/wp-content/uploads/2026/08/kubernetes-gitops-diagram4-1024x519.png" alt="" class="wp-image-44609"></figure>
<h2 class="wp-block-heading">The GitOps model: what stays the same across layers</h2>
<p>No matter which layer you’re looking at, GitOps comes down to three things:</p>
<ul class="wp-block-list">
<li>Git holds the desired state.</li>
<li>Config is declarative, not a list of commands to run in order.</li>
<li>Something keeps checking the real state against Git and fixes drift automatically.</li>
</ul>
<p>Where the layers differ is <em>how</em> that fixing happens. Terraform works in plan-then-apply steps: you generate a plan, someone reviews it, then it’s applied. Argo CD works as a loop: it keeps comparing live state to Git and corrects drift on its own, without anyone pressing a button.</p>
<p>Both are valid. The problem shows up when teams assume they work the same way, or when they stop doing GitOps once they get past the Kubernetes layer.</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="445" src="https://severalnines.com/wp-content/uploads/2026/08/kubernetes-gitops-diagram5-1024x445.png" alt="" class="wp-image-44610"></figure>
<h2 class="wp-block-heading">Layer 1: GitOps for infrastructure</h2>
<p>This is usually the first layer teams try to automate, and the one where picking the right tool matters most.</p>
<h3 class="wp-block-heading">Atlantis vs Flux tf-controller vs CI</h3>
<p><strong>Atlantis</strong> is a good fit if you want every infra change reviewed like a pull request: someone opens a PR, Atlantis posts the terraform plan as a comment, and <code>apply</code> only runs after approval. Good for teams that want the same review habits for infra as they have for app code. Downside: it’s one more service you have to run.</p>
<p><strong>Flux’s tf-controller</strong> fits teams already living in Kubernetes. Terraform state becomes a custom resource inside the cluster, reconciled the same way as everything else. You skip running a separate CI runner for infra, but your Terraform workflow is now tied to Kubernetes.</p>
<p><strong>A plain CI pipeline</strong>, like GitLab CI, is the simplest choice if you already have CI running and don’t want a new tool. The catch is you build plan/apply logic, locking, and approvals yourself instead of getting them for free.</p>
<figure class="wp-block-table">
<table class="has-fixed-layout">
<tbody>
<tr>
<td> </td>
<td>Atlantis</td>
<td>Flux tf-controller</td>
<td>CI pipeline</td>
</tr>
<tr>
<td>Best for</td>
<td>Teams that want PR review on infra</td>
<td>Kubernetes-native teams</td>
<td>Teams already standardized on CI</td>
</tr>
<tr>
<td>How it runs</td>
<td>Plan/apply via PR comments</td>
<td>Reconciliation loop via CRDs</td>
<td>Plan/apply as pipeline steps</td>
</tr>
<tr>
<td>Extra thing to run</td>
<td>Atlantis itself</td>
<td>Nothing extra (runs in-cluster)</td>
<td>Nothing extra (reuses CI)</td>
</tr>
<tr>
<td>Who approves changes</td>
<td>PR approval</td>
<td>RBAC + CRD review</td>
<td>Pipeline approval gate</td>
</tr>
</tbody>
</table>
</figure>
<h3 class="wp-block-heading">A repo layout that doesn’t fall apart later</h3>
<p>Keep environments separate from shared modules, so a change to one module gets reviewed once instead of copy-pasted into three places:</p>
<pre class="wp-block-code"><code>infra/
   modules/
 	network/
 	compute/
 	database/
   environments/
 	dev/
 	staging/
 	prod/</code></pre>
<h3 class="wp-block-heading">State and secrets: the part everyone forgets</h3>
<p>Once more than one person or pipeline touches the same infra, local Terraform state isn’t good enough. You need a remote backend. An S3-compatible one works the same whether you’re on AWS, MinIO, or another provider:</p>
<pre class="wp-block-code"><code>terraform {
   backend "s3" {
 	bucket   = "example-tfstate"
 	key      = "prod/network/terraform.tfstate"
 	region   = "us-east-1"
 	endpoint = "https://s3.example-provider.com"
   }
 }</code></pre>
<p>The other half is secrets. Plan output often gets posted straight into a PR comment or CI log, so anything not marked sensitive can leak.</p>
<pre class="wp-block-code"><code>variable "db_password" {
   type      = string
   sensitive = true
 }</code></pre>
<p><strong>N.B. Don’t post secrets in plan output.</strong> Check how your plan output actually renders in Atlantis or CI before you wire up any automation that posts it.</p>
<h2 class="wp-block-heading">Layer 2: GitOps for Kubernetes</h2>
<h3 class="wp-block-heading">How Argo CD reconciliation works</h3>
<p>Argo CD watches a Git repo and keeps the cluster matching it. There’s no separate “apply” step like Terraform. Drift gets caught and fixed automatically, based on your sync policy.</p>
<pre class="wp-block-code"><code>apiVersion: argoproj.io/v1alpha1
 kind: Application
 metadata:
   name: platform-apps
 spec:
   source:
 	repoURL: https://github.com/example-org/platform-gitops
 	path: apps/production
 	targetRevision: main
   destination:
 	server: https://kubernetes.default.svc
 	namespace: platform
   syncPolicy:
 	automated:
   	prune: true
   	selfHeal: true</code></pre>
<h3 class="wp-block-heading">Where teams get stuck</h3>
<p>The problem usually isn’t Argo CD, it’s that Argo CD ends up as one island among several: Terraform running its own way, database operators managed through a separate dashboard, and nothing tells you the full picture of what changed across all of it.</p>
<h2 class="wp-block-heading">Layer 3: Running operator-managed databases without the mess</h2>
<h3 class="wp-block-heading">Operators deploy. They don’t operate.</h3>
<p>Kubernetes operators are good at one job: turning a config into a running database. That’s deployment. It says nothing about whether backups are actually restorable, who’s watching replication lag, or what happens during an incident.</p>
<p>Deploying a database and running a database are two different jobs.</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="396" src="https://severalnines.com/wp-content/uploads/2026/08/kubernetes-gitops-diagram-1024x396.png" alt="Diagram depicting what  an operator does vs what day-2 ops needs
" class="wp-image-44606"></figure>
<h3 class="wp-block-heading">ClusterControl as the operations layer</h3>
<p>There are two ways to run databases on Kubernetes through <a href="https://severalnines.com/clustercontrol">ClusterControl</a>: manage them directly through the UI, or run them through GitOps. GitOps is optional, not required.</p>
<p>When GitOps is enabled, the split looks like this: Git holds the truth, Argo CD keeps the cluster matching it, and ClusterControl gives you the workflow interface and day-to-day operations on top of whatever operator is running. Cluster deployments, backup schedule changes, and add-on changes all go through a Git pull request that you review and merge before they take effect, not applied straight to the cluster.</p>
<p>In practice, setting up the GitOps path is four steps:</p>
<ol class="wp-block-list">
<li>Connect ClusterControl to the Kubernetes cluster.</li>
<li>Connect the Git repo holding operator config.</li>
<li>Connect or install Argo CD.</li>
<li>Deploy and manage the operator through ClusterControl.</li>
</ol>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="168" src="https://severalnines.com/wp-content/uploads/2026/08/kubernetes-gitops-diagram3-1024x168.png" alt="From intent to a running operator: pull request, review, merge, then Argo CD syncs it" class="wp-image-44608"></figure>
<h3 class="wp-block-heading">What ClusterControl actually supports right now</h3>
<p>•         Supported operators: CloudNativePG and MOCO.</p>
<p>•         Deploy and manage operator lifecycle from the ClusterControl UI.</p>
<p>•         Change operator settings through the UI or YAML.</p>
<p>•         Run MySQL and PostgreSQL operations through a GitOps-based workflow.</p>
<p>•         Set backup retention policies against S3-compatible storage.</p>
<figure class="wp-block-table">
<table class="has-fixed-layout">
<tbody>
<tr>
<td> </td>
<td>VM database ops</td>
<td>Kubernetes operator database ops</td>
</tr>
<tr>
<td>Deployment</td>
<td>ClusterControl deploy wizard</td>
<td>Operator + ClusterControl lifecycle management</td>
</tr>
<tr>
<td>Config</td>
<td>ClusterControl UI</td>
<td>UI or YAML</td>
</tr>
<tr>
<td>Backups</td>
<td>ClusterControl scheduling</td>
<td>Retention policy, S3-compatible storage</td>
</tr>
<tr>
<td>Day-2 visibility</td>
<td>ClusterControl dashboard</td>
<td>ClusterControl dashboard</td>
</tr>
</tbody>
</table>
</figure>
<h3 class="wp-block-heading">What GitOps covers once it’s turned on</h3>
<p>To be precise about scope, once GitOps is enabled on an environment:</p>
<ul class="wp-block-list">
<li>Database cluster deployments are proposed as a pull request, not applied directly.</li>
<li>Backup schedule changes follow the same pull-request flow.</li>
<li>Add-on changes made in the deployment wizard are also proposed through Git.</li>
<li>Secrets referenced by the generated manifests are handled through the Git workflow, with cluster configuration and certificates stored as Kubernetes Secrets rather than local config files.</li>
<li>You can trigger an on-demand sync from Git at any time, instead of waiting for the next automatic reconciliation.</li>
</ul>
<p>Deploying an operator through the UI generated a pull request automatically, and the operator’s status stayed Pending with a condition reading PendingMerge: AwaitingGitMerge, along with a direct link to the PR still waiting on review. After merging, Argo CD picked up the change and moved the status to Ready: Healthy.</p>
<p>Screenshot 1: the pull request generated automatically for the AppBundle deployment.</p>
<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="875" height="681" src="https://severalnines.com/wp-content/uploads/2026/08/image2.png" alt="" class="wp-image-44611"></figure>
<p>Screenshot 2: status held at PendingMerge, reason AwaitingGitMerge, with a direct link to the open PR.</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="455" src="https://severalnines.com/wp-content/uploads/2026/08/image3-1024x455.png" alt="" class="wp-image-44613"></figure>
<p>Screenshot 3: status after the PR is merged and Argo CD syncs, now Ready and Healthy.</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="431" src="https://severalnines.com/wp-content/uploads/2026/08/image8-1024x431.png" alt="" class="wp-image-44612"></figure>
<p>This matches what the documentation describes: the deployment is proposed as a pull request, and only takes effect once it’s reviewed and merged.</p>
<h2 class="wp-block-heading">Putting it all together</h2>
<h3 class="wp-block-heading">The reference setup</h3>
<ul class="wp-block-list">
<li>Infrastructure provisioned through Terraform GitOps.</li>
<li>Kubernetes kept in sync through Argo CD.</li>
<li>Operator lifecycle and database ops run through ClusterControl.</li>
</ul>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="705" src="https://severalnines.com/wp-content/uploads/2026/08/kubernetes-gitops-diagram2-1024x705.png" alt="Reference architecture: GitHub, Atlantis/Flux, Argo CD, infrastructure, operator, and ClusterControl as the ops layer" class="wp-image-44607"></figure>
<p><strong>One change, start to finish:</strong> someone opens a PR to add a new database cluster. That triggers a Terraform plan for anything infra needs, gets reviewed, and applies. Argo CD picks up the manifest changes and syncs the operator config into the cluster. ClusterControl picks up the resulting operator and cluster, and the team gets visibility, backups, and monitoring without setting any of that up by hand.</p>
<h3 class="wp-block-heading">A repo layout that matches this</h3>
<pre class="wp-block-code"><code>infra/      # Terraform: networking, compute, storage
 platform/  # Argo CD applications, namespaces, policies
 data/   	 # Operator configs, managed through ClusterControl's Git integration</code></pre>
<p>The data/ row above is the general idea. In practice, if you point ClusterControl’s GitOps integration at an empty repository, it doesn’t ask you to design a folder structure at all. The agent lays one out itself, with a fixed convention starting from the repo root:</p>
<pre class="wp-block-code"><code>severalnines/
   kuber-agent/
     /
   	apps/
         platform/base/
           namespaces/
             /
               namespace.yaml
           operators/argo/
             .application.yaml</code></pre>
<p>Each operator and dependency gets its own Argo CD Application manifest under <code>operators/argo/</code>, and each database namespace gets its own folder under <code>namespaces/</code>. This is generated and maintained by the agent, not something you nest under your own data/ folder by hand. If you’re using the same repository for infra and platform GitOps too, plan for ClusterControl to own its own subtree rather than trying to fit it into a layout you designed yourself.</p>
<h3 class="wp-block-heading"><strong>A rollout checklist</strong></h3>
<figure class="wp-block-table">
<table class="has-fixed-layout">
<tbody>
<tr>
<td>Phase</td>
<td>What to do</td>
<td>Who owns it</td>
</tr>
<tr>
<td>1</td>
<td>Infrastructure GitOps basics: remote state, secrets, PR workflow</td>
<td>Platform</td>
</tr>
<tr>
<td>2</td>
<td>Argo CD reconciliation baseline</td>
<td>SRE</td>
</tr>
<tr>
<td>3</td>
<td>Operator lifecycle and day-2 ops with ClusterControl</td>
<td>DBA</td>
</tr>
</tbody>
</table>
</figure>
<p>Start with phase 1 even if phases 2 and 3 are still months out. A clean state and secrets setup is what the other two phases depend on.</p>
<h2 class="wp-block-heading">Conclusion</h2>
<p>GitOps isn’t a tool you install once. It’s a way of working, and it only pays off when you apply it consistently across infrastructure, Kubernetes, and database operations, rather than stopping at the app layer.</p>
<p>If you haven’t already, start with infra and Kubernetes. Then bring your operator-managed databases into the same model, using ClusterControl to handle lifecycle and day-to-day ops instead of adding one more disconnected dashboard.</p>
<p><strong>See a private walkthrough</strong> or <strong>try ClusterControl free for 30 days</strong> to see this running on your own stack.</p>
<h2 class="wp-block-heading">Install ClusterControl and try its Kubernetes management panel free for 30 days</h2>
<h3 class="wp-block-heading">Script Installation Instructions</h3>
<p>The installer script is the simplest way to get ClusterControl up and running. Run it on your chosen host, and it will take care of installing all required packages and dependencies.</p>
<p>Offline environments are supported as well. See the <a href="https://docs.severalnines.com/clustercontrol/latest/getting-started/installation/offline-installation/">Offline Installation</a> guide for more details.</p>
<p>On the ClusterControl server, run the following commands:</p>
<pre class="wp-block-code"><code>wget https://severalnines.com/downloads/cmon/install-cc
chmod +x install-cc
sudo ./install-cc     # omit sudo if you run as root</code></pre>
<p>After the installation is complete, open a web browser, navigate to <code>https:///</code>, and create the first admin user by entering a username (note that “admin” is reserved) and a password on the <a href="https://docs.severalnines.com/clustercontrol/latest/getting-started/quickstart/#step-2-create-the-first-admin-user">welcome page</a>. Once you’re in, you can <a href="https://docs.severalnines.com/clustercontrol/latest/user-guide/deployment/create-database-cluster/">deploy</a> a new database cluster or <a href="https://docs.severalnines.com/clustercontrol/latest/user-guide/deployment/import-database-cluster/">import</a> an existing one.</p>
<p>The installer script supports a range of environment variables for advanced setup. You can define them using export or by prefixing the install command.</p>
<p>See the <a href="https://docs.severalnines.com/clustercontrol/latest/getting-started/installation/online-installation/#environment-variables">list of supported variables</a> and <a href="https://docs.severalnines.com/clustercontrol/latest/getting-started/installation/online-installation/#example-use-cases">example use cases</a> to tailor your installation.</p>
<h2 class="wp-block-heading">FAQ</h2>
<p><strong>Do I need Argo CD already?</strong> No. The infra layer and the ClusterControl ops layer are useful on their own. Argo CD matters once you have Kubernetes workloads you want automatically kept in sync with Git.</p>
<p><strong>Which operators are supported today?</strong> CloudNativePG and MOCO, through ClusterControl’s <a href="https://severalnines.com/clustercontrol/solutions/kubernetes/">Kubernetes Database Operator Management</a>.</p>
<p><strong>Can I deploy a database cluster through GitOps?</strong> Yes, once GitOps is enabled on the environment. The deployment is proposed as a Git pull request, and it only takes effect after you review and merge it, the same way backup schedule and add-on changes work.</p>
<p><strong>How do I stop secrets leaking into plan output?</strong> Mark sensitive variables and outputs with sensitive = true, and check how your plan output actually renders in PR comments or CI logs before automating anything.</p>
<p><strong>Where should Terraform state live?</strong> In a remote, S3-compatible backend. This works the same in cloud, on-prem, or hybrid setups.</p>
<p>The post <a href="https://severalnines.com/blog/implementing-gitops-from-infrastructure-to-db-operators-to-unify-ops-for-kubernetes-databases/">Implementing GitOps from Infrastructure to DB Operators to Unify Ops for Kubernetes Databases</a> appeared first on <a href="https://severalnines.com/">Severalnines</a>.</p>
<p><a href="https://severalnines.com/blog/implementing-gitops-from-infrastructure-to-db-operators-to-unify-ops-for-kubernetes-databases/">Implementing GitOps from Infrastructure to DB Operators to Unify Ops for Kubernetes Databases</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Vibe Coding a Database Lab: How I Built DBCanvas to Stop Rebuilding the Same Test Environment</title>
        <link>https://percona.community/blog/2026/09/16/vibe-coding-a-database-lab/</link>
        <pubDate>Wed, 16 Sep 2026 00:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/vibe-coding-a-database-lab-how-i-built-dbcanvas-to-stop-rebuilding-the-same-test-environment/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>Percona gives us room to work on our own AI-assisted projects, and I used mine to fix a problem I kept running into. Every time I wanted to try a new database feature, debug something tricky, or reproduce a customer issue, I ended up rebuilding much of the same infrastructure: DNS, TLS, Docker networking, database topologies, users and test data. Over the years, I wrote scripts to automate this but I still found myself copying and pasting post-installation steps from one lab to the next.</p>
<p><a href="https://percona.community/blog/2026/09/16/vibe-coding-a-database-lab/">Vibe Coding a Database Lab: How I Built DBCanvas to Stop Rebuilding the Same Test Environment</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Percona gives us room to work on our own AI-assisted projects, and I used mine to fix a problem I kept running into. Every time I wanted to try a new database feature, debug something tricky, or reproduce a customer issue, I ended up rebuilding much of the same infrastructure: DNS, TLS, Docker networking, database topologies, users and test data. Over the years, I wrote scripts to automate this but I still found myself copying and pasting post-installation steps from one lab to the next.</p>
<p>That repetition is what turned into <a href="https://github.com/jaimesicam/dbcanvas" target="_blank" rel="noopener noreferrer">DBCanvas</a>, a self-hosted lab for designing, deploying, operating, and stress-testing multi-node database stacks on my own machine. Just design a topology on a canvas, click Deploy, and get real running nodes connected to the services and supporting infrastructure your test requires. Then, use the tools built into it or third party tools to load those databases, watch them work, and figure out why they’re misbehaving.</p>
<p>The code is up at <a href="https://github.com/jaimesicam/dbcanvas" target="_blank" rel="noopener noreferrer">github.com/jaimesicam/dbcanvas</a>.</p>
<p><figure><img decoding="async" width="1678" height="1004" src="https://percona.community/blog/2026/09/dbcanvas-mysql-topology_hu_5854cf9bde1b4546.webp" alt=" " loading="lazy"></figure>
</p>
<p><em>Figure 1: Deploying a multi-node MySQL topology with monitoring and orchestration</em></p>
<h2>It’s vibe coded, and that’s the point</h2>
<p>I want to be upfront about this that DBCanvas is vibe coded and built conversationally with an AI coding assistant rather than hand-written line by line. That turned out to be exactly the right approach for a tool whose whole job is to remove setup friction.</p>
<p>My initial loop or workflow looked like this. I started by asking the assistant to generate UI/UX demos for the frontend with React, a backend with Go, a drag-and-drop node canvas, a user management system and I iterated it until it felt right. Once I was satisfied, I asked it to turn those requirements into a <code>SCAFFOLD.md</code> which contained a full blueprint precise enough for the coding agent to rebuild the app from scratch as it contained the tech stack, naming conventions, directory tree, backend behavior, frontend behavior and the interactive details of the node editor itself.</p>
<p><figure><img decoding="async" width="1783" height="841" src="https://percona.community/blog/2026/09/dbcanvas-ui-prototype_hu_3f0f68d5369a8831.webp" alt=" " loading="lazy"></figure>
</p>
<p><em>Figure 2: The initial interface prototype that established the visual direction</em></p>
<p><figure><img decoding="async" width="1485" height="657" src="https://percona.community/blog/2026/09/dbcanvas-node-editor-prototype_hu_e6ecbcb1d23abb2.webp" alt=" " loading="lazy"></figure>
</p>
<p><em>Figure 3: The initial node-editor prototype for composing connected services</em></p>
<p>From there, I added features incrementally, budgeted by whatever tokens I had available in a session and logged every change in an <code>IMPLEMENTATION.md</code> so that I have a record of what it took to go from the original scaffold to wherever the project currently stood.</p>
<p><figure><img decoding="async" width="1431" height="1027" src="https://percona.community/blog/2026/09/dbcanvas-implementation-md_hu_f030e69352e74b8c.webp" alt=" " loading="lazy"></figure>
</p>
<p><em>Figure 4: IMPLEMENTATION.md records each feature added after the initial scaffold</em></p>
<p>If I ever needed to rebuild the project from nothing, those two files are essentially the whole story. I know it is crude, but it’s my first time building with this many moving parts. It has held up so far at least for me.</p>
<p>The current loop looks like this:</p>
<ol>
<li>Hit friction while testing, debugging, or learning something new.</li>
<li>Describe the environment that would remove that friction.</li>
<li>Let the assistant scaffold the automation: versions, configuration, identity, data, and tooling for that environment.</li>
<li>Keep whatever turned out to be reusable inside DBCanvas for next time.</li>
<li>Turn the whole workflow into something you can drive from a browser.</li>
</ol>
<p>When Percona Server 8.4.11-11 shipped OpenID Connect authentication, I didn’t want to manually set up a Keycloak instance, wire up realms and clients, create sample identities, and configure Percona Server’s OIDC plugin every time I wanted to poke at it. Instead, that became a new DBCanvas setup. Deploy Keycloak + Percona Server + sample identities with a few clicks. You can inspect the generated OIDC configuration, authenticate with an ID token, and verify the mapped MySQL role, all without setting this up yourself. Vibe coding is what made it fast enough to build that scaffolding the same day the feature landed, and DBCanvas turned it into a reusable setup I can deploy again whenever I need it.</p>
<p><figure><img decoding="async" width="1622" height="1025" src="https://percona.community/blog/2026/09/dbcanvas-oidc-keycloak_hu_f57326a16f706a8f.webp" alt=" " loading="lazy"></figure>
</p>
<p><em>Figure 5: A Percona Server OIDC lab with Keycloak and a success mapped-role login</em></p>
<h2>It’s not just about one feature… it’s a whole lab</h2>
<p>OIDC with Keycloak is just one example. DBCanvas can also build a broader range of database environments:</p>
<ul>
<li><strong>MySQL:</strong> Percona XtraDB Cluster, Percona Server, MySQL Community, asynchronous replication, InnoDB Cluster and Group Replication, and MariaDB</li>
<li><strong>PostgreSQL:</strong> standalone, Patroni, repmgr, Spock multi-master, CloudNativePG or Crunchy PGO on Kubernetes</li>
<li><strong>MongoDB:</strong> Percona Server for MongoDB as standalone, replica set, or sharded cluster</li>
<li><strong>Valkey:</strong> standalone and cluster</li>
</ul>
<p>And around them, the infrastructure that makes a stack behave like a real environment. An Intranet node can provide DNS, mail, OpenLDAP, a Squid proxy and a certificate authority. Other nodes provide PMM, ProxySQL, HAProxy, Orchestrator, SeaweedFS S3, Keycloak, OpenBao, Samba AD DC, and a Kubernetes frame that runs any of six database operators.</p>
<p>A useful lab also needs activity. DBCanvas ships application simulators for a hotel booking system, an airline, a car rental fleet, and a stock exchange. Spin up a MongoDB replica set and point the stock market simulator at it and writes begin flowing through the set. You can observe elections and inspect real oplog activity instead of manually generating load against an idle cluster.</p>
<p><figure><img decoding="async" width="1858" height="934" src="https://percona.community/blog/2026/09/dbcanvas-mongodb-stock-market_hu_b81b4d5aaeb10d8f.webp" alt=" " loading="lazy"></figure>
</p>
<p><em>Figure 6: A MongoDB replica set running the stock market simulator with diagnostic tools attached</em></p>
<h2>Leaning on tools other people already built</h2>
<p>DBCanvas can make deployments more useful by integrating tools my colleagues have built for managing, troubleshooting and analyzing database environments. I can add them as part of the deployment workflow and place it alongside the database it is intended to work with.</p>
<ul>
<li><strong><a href="https://github.com/PrzemekMalkowski/mclusteradmin" target="_blank" rel="noopener noreferrer">MClusterAdmin</a></strong>, a MongoDB administration panel created by Przemek Malkowski, runs as its own node alongside a MongoDB deployment. It displays topology and replica-set status, sharding and the balancer, slow queries with explain, indexes, users and roles, all in a browser tab.</li>
</ul>
<p><figure><img decoding="async" width="1594" height="943" src="https://percona.community/blog/2026/09/dbcanvas-mclusteradmin_hu_1bb9d6571de1276a.webp" alt=" " loading="lazy"></figure>
</p>
<p><em>Figure 7: MClusterAdmin displaying the replica-set state for a DBCanvas deployment</em></p>
<ul>
<li><strong><a href="https://github.com/zelmario/Big-hole" target="_blank" rel="noopener noreferrer">Big Hole</a></strong>, an FTDC viewer, developed by Zelmar Michelini that decodes <code>diagnostic.data</code>. Drag in a folder and Big Hole charts every metric it can find. In DBCanvas, collecting the data is just as straightforward: right-click a MongoDB node, open the context menu, and download a compressed archive containing its logs and diagnostic data. Simply decompress the archive to your download directory, then drag the folder into Big Hole to visualize FTDC metrics alongside related log events.</li>
</ul>
<p><figure><img decoding="async" width="1595" height="992" src="https://percona.community/blog/2026/09/dbcanvas-big-hole_hu_7f5878becf0ad507.webp" alt=" " loading="lazy"></figure>
</p>
<p><em>Figure 8: Big Hole visualizing FTDC metrics downloaded from a MongoDB node</em></p>
<p>The same principle applies to deeper diagnostic work. DBCanvas automates the setup around proven tools instead of replacing them.</p>
<p>For example, the Operator Debugger uses Delve to step through Kubernetes operators with breakpoints, call stacks and variables.</p>
<p><figure><img decoding="async" width="1671" height="1091" src="https://percona.community/blog/2026/09/dbcanvas-operator-debugger_hu_c10fd70a85f605bc.webp" alt=" " loading="lazy"></figure>
</p>
<p><em>Figure 9: Operator Debugger paused at a breakpoint inside a Percona operator</em></p>
<p>There’s also the Core Dump Analyzer where you can mount a core dump and matching binaries read-only, then inspect it with GDB.</p>
<p><figure><img decoding="async" width="1674" height="1042" src="https://percona.community/blog/2026/09/dbcanvas-core-dump-analyzer_hu_8d2e7ebbf7d41842.webp" alt=" " loading="lazy"></figure>
</p>
<p><em>Figure 10: Web-based Core Dump Analyzer with equivalent terminal command for manual troubleshooting</em></p>
<h2>Ease of Use</h2>
<p>While DBCanvas makes it easy to deploy environments but for troubleshooting, you still need to look deeper into the implementation within the nodes. Accessing the deployment via web terminal, regular terminal or web-based Filemanager would be helpful to have command of the deployment.</p>
<p><figure><img decoding="async" width="1648" height="1026" src="https://percona.community/blog/2026/09/dbcanvas-file-manager_hu_37006883d5ec663.webp" alt=" " loading="lazy"></figure>
</p>
<p><em>Figure 11: The file manager inspecting a MongoDB configuration inside a deployed node</em></p>
<p>The node menu provides the exact Docker exec command for direct access from a regular terminal.</p>
<p><figure><img decoding="async" width="1303" height="811" src="https://percona.community/blog/2026/09/dbcanvas-docker-exec_hu_1b3260e390025326.webp" alt=" " loading="lazy"></figure>
</p>
<p><em>Figure 12: Direct container access from a Docker exec command copied from the node menu</em></p>
<h2>Testing beyond deployment</h2>
<p>DBCanvas also comes with a data generator, a parallel query runner, a benchmark tool (OLTP/OLAP, read-write and read-only), and a packet inspector that decodes MySQL, PostgreSQL, MongoDB and Valkey traffic off the wire.</p>
<p><figure><img decoding="async" width="1418" height="1081" src="https://percona.community/blog/2026/09/dbcanvas-data-generator_hu_eaf1ffab93205438.webp" alt=" " loading="lazy"></figure>
</p>
<p><em>Figure 13: Data Generator creating sample rows for a deployed database</em></p>
<p><figure><img decoding="async" width="1467" height="797" src="https://percona.community/blog/2026/09/dbcanvas-packet-inspector_hu_a3fb6877ab50ffc2.webp" alt=" " loading="lazy"></figure>
</p>
<p><em>Figure 14: Packet Inspector decoding MongoDB traffic from the lab network</em></p>
<p>Together, these tools help reproduce problems facing a real deployment as I can generate data, apply load, inspect queries and examine network traffic.</p>
<h2>Try it</h2>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">git clone https://github.com/jaimesicam/dbcanvas.git <span class="o">&amp;&amp;</span> <span class="nb">cd</span> dbcanvas
</span></span><span class="line"><span class="cl">make install</span></span></code></pre>
</div>
</div>
</div>
<p>That builds the node images and starts DBCanvas at <code>http://localhost:8080</code>. The first run takes a while since it’s building docker images from scratch and learning which software versions are available for each OS.</p>
<p>Three important caveats:</p>
<p>DBCanvas creates disposable labs for previewing, testing and learning. It’s not a production software. It uses default credentials and favors setup speed over production security.</p>
<p>My workstation remains its primary test environment. If you run it elsewhere and encounter a bug or rough edge, please open a GitHub issue.</p>
<p>Some features are still maturing. I chose to bring many capabilities into one project, which means a few areas still need additional refinement and testing. For example, the Core Dump analyzer could benefit from more sophisticated variable extraction as well as the automatic detection of the appropriate operating system and compatible debug libraries to deploy.</p>
<p>If you’ve ever rebuilt the same test cluster for the third time this month, or wished you could hand a colleague a working reproduction instead of a page of setup instructions, try DBCanvas as it might save you some of the time it has saved me.</p>
<p><a href="https://percona.community/blog/2026/09/16/vibe-coding-a-database-lab/">Vibe Coding a Database Lab: How I Built DBCanvas to Stop Rebuilding the Same Test Environment</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Announcing MariaDB Community Server 13.0 GA</title>
        <link>https://mariadb.com/resources/blog/announcing-mariadb-community-server-13-0-ga/</link>
        <pubDate>Tue, 15 Sep 2026 22:43:41 +0000</pubDate>
        <dc:creator>Ralf Gebhardt</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/announcing-mariadb-community-server-13-0-ga/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>MariaDB Community Server 13.0 GA deepens Oracle PL/SQL compatibility with REF CURSORs and RECORD types, gives developers UPDATE…RETURNING, expands manageability […]</p>
<p><a href="https://mariadb.com/resources/blog/announcing-mariadb-community-server-13-0-ga/">Announcing MariaDB Community Server 13.0 GA</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Community Server 13.0 GA deepens Oracle PL/SQL compatibility with REF CURSORs and RECORD types, gives developers UPDATE…RETURNING, expands manageability across INFORMATION_SCHEMA and SHOW VARIABLES, extends the new-style optimizer hint framework, and adds InnoDB log archiving for backup and point-in-time recovery. We are excited to announce the General…</p>
<p><a href="https://mariadb.com/resources/blog/announcing-mariadb-community-server-13-0-ga/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/announcing-mariadb-community-server-13-0-ga/">Announcing MariaDB Community Server 13.0 GA</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Enterprise Server 12.3 Beta: Conflict-Aware Replication, Raft-Based Cluster, and Passwordless TLS Authentication</title>
        <link>https://mariadb.com/resources/blog/mariadb-enterprise-server-12-3-beta-conflict-aware-replication-raft-based-cluster-and-passwordless-tls-authentication/</link>
        <pubDate>Tue, 15 Sep 2026 17:03:41 +0000</pubDate>
        <dc:creator>Ralf Gebhardt</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-enterprise-server-12-3-beta-conflict-aware-replication-raft-based-cluster-and-passwordless-tls-authentication/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>MariaDB Enterprise Server 12.3.3-0 ES BETA is now available for testing, the first beta build of the upcoming MariaDB Enterprise […]</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-enterprise-server-12-3-beta-conflict-aware-replication-raft-based-cluster-and-passwordless-tls-authentication/">MariaDB Enterprise Server 12.3 Beta: Conflict-Aware Replication, Raft-Based Cluster, and Passwordless TLS Authentication</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Enterprise Server 12.3.3-0 ES BETA is now available for testing, the first beta build of the upcoming MariaDB Enterprise Server 12.3 release line. Built on the foundation of MariaDB Community Server 12.3 LTS, this Enterprise beta adds a set of commercial-only capabilities built for mission-critical, multi-node deployments: conflict handling for replication, a new Raft-based clustering…</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-enterprise-server-12-3-beta-conflict-aware-replication-raft-based-cluster-and-passwordless-tls-authentication/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/mariadb-enterprise-server-12-3-beta-conflict-aware-replication-raft-based-cluster-and-passwordless-tls-authentication/">MariaDB Enterprise Server 12.3 Beta: Conflict-Aware Replication, Raft-Based Cluster, and Passwordless TLS Authentication</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Performance improvements in Percona Server 8.4.11-11</title>
        <link>https://www.percona.com/blog/performance-improvements-in-percona-server-8-4-11-11/</link>
        <pubDate>Tue, 15 Sep 2026 11:52:54 +0000</pubDate>
        <dc:creator>Bogdan Degtyariov</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/performance-improvements-in-percona-server-8-4-11-11/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Focusing on Percona Server 8.4.11-11 My previous post (Performance Progression of Percona Server for MySQL 8.4) did a brief review of the performance changes in Percona Server for MySQL 8.4 released in 2026. I recommend reading it first to better understand the material in this post. Version 8.4.11-11 includes patches that deliver significant improvements in … Continued<br />
The post Performance improvements in Percona Server 8.4.11-11 appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/performance-improvements-in-percona-server-8-4-11-11/">Performance improvements in Percona Server 8.4.11-11</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<h2><span>Focusing on Percona Server 8.4.11-11</span></h2>
<p><span>My previous post (</span><a href="https://www.percona.com/blog/performance-progression-of-percona-server-for-mysql-8-4/" target="_blank" rel="noopener"><span>Performance Progression of Percona Server for MySQL 8.4</span></a><span>) did a brief review of the performance changes in Percona Server for MySQL 8.4 released in 2026. I recommend reading it first to better understand the material in this post.</span></p>
<p><span>Version 8.4.11-11 includes patches that deliver significant improvements in performance and scalability.</span></p>
<p><span>One of the most impressive illustrations of the performance bump is reflected in the following graph:</span></p>
<p><b>Graph 1 – Percona-Server 8.4.X with 8G buffer </b><span> [ </span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=graph&amp;mem=8" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=table&amp;mem=8" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]</span><br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-52471" src="https://www.percona.com/wp-content/uploads/2026/08/graph-8g.png" alt="" width="1013" height="621"></p>
<p><span>There are two separate improvements in the version 8.4.11-11:</span></p>
<ul>
<li><span>Faster speed for the number of threads smaller than the number of CPU cores. On a host with 40 CPU cores + hyperthreading, which enables simultaneous execution of 80 threads, all versions of the server keep increasing TPS up to 64 threads. However, the version 8.4.11-11 does a noticeably better job in this section.</span></li>
<li><span>Prevent abrupt performance degradation for high thread numbers, which is an issue in the versions 8.4.8-8 and 8.4.10-10. Also, a similar degradation is observed in Upstream MySQL 8.4.11.</span></li>
</ul>
<p><span>All code changes improved the performance of the InnoDB buffer pool and the way it handled pages flushing.</span></p>
<p> </p>
<h2><span>Why is this important?</span></h2>
<p><span>InnoDB is the default storage engine in Percona Server for MySQL. Therefore, InnoDB performance influences the overall performance of the database server.</span></p>
<p><span>The InnoDB engine has a buffer pool, which is basically a data cache in RAM. Instead of reading from disk for every query, the server keeps the most-used data pages in memory.</span></p>
<p><span>Its performance matters because:</span></p>
<ul>
<li><span>RAM is many times faster than disk – the more queries get results from the buffer pool, the faster the database works.</span></li>
<li><span>Every query uses the buffer pool. If its internal locks are slow, all queries queue up behind each other.</span></li>
<li><span>The buffer pool must constantly free space for new data. So, the queries do not stall because they need to do extra cleanup work themselves.</span></li>
</ul>
<p><span>InnoDB stores data in fixed-size pages (16 KB by default). Tables and indexes are split into pages, and a page is the unit that moves between disk and the buffer pool – it never reads a single row from disk, always the whole page containing it.</span></p>
<p><span>To better understand the mechanism responsible for the InnoDB buffer pool handling of pages we need to explain the Least Recently Used (LRU) concept.</span></p>
<p><span>LRU is the strategy used to decide which pages should be removed from the buffer pool when space runs low. All pages in memory reside in a list ordered by usage: recently accessed pages stay near the “hot” end, untouched ones drift to the “cold” end, and get evicted first. This keeps frequently used data in fast memory, while rarely used data is written back to disk.</span></p>
<p> </p>
<h2><span>The implementation.</span></h2>
<p><span>The code is available in the GitHub repository for anyone to see:</span></p>
<p><a href="https://github.com/percona/percona-server/" target="_blank" rel="noopener"><span>https://github.com/percona/percona-server/</span></a></p>
<p> </p>
<h4><span>PS-11444: Narrow the LRU mutex scope in buf_page_init_for_read()<br />
(GitHub: </span><a href="https://github.com/percona/percona-server/commit/52d875574dad6df0f9c3beda3245500858fbb1ed" target="_blank" rel="noopener"><span>52d87557</span></a><span>)</span></h4>
<p><span>Significant improvement for read-heavy (IO-bound) workloads. Previously, every physical page read held the pool-wide LRU list mutex while doing extra work, including zeroing a 16 KB page frame – so all reads on a buffer pool instance were serialized on one lock. Now the mutex only covers the actual LRU list insertion, and the rest runs under a much finer-grained page-hash latch. As a result, pages could temporarily become visible in the page hash table prior to their insertion into the LRU list, which requires careful handling in the codebase. Physical reads can now proceed in parallel rather than queueing behind one another. It also fixes a related race (PS-9837) and removes LRU-mutex contention from the purge thread.</span></p>
<p><span>NOTE: This improvement was possible by analyzing the lock waits in the profiling data, which pointed to the most contended mutex, which was in LRU list.</span></p>
<p> </p>
<h4><span>PS-11445: LRU optimization: LRU manager threads are restored</span></h4>
<p><span>In this multi-patch ticket the LRU threads were restored to their original state and a few other performance improvements were done.</span></p>
<p> </p>
<h4><span>Restore per-buffer-pool LRU manager thread</span></h4>
<p><span>(GitHub: </span><a href="https://github.com/percona/percona-server/commit/53bb2f0f8c4e34e9e437f5465299c0c4fd72d34c" target="_blank" rel="noopener"><span>53bb2f0f</span></a><span>)</span></p>
<p><span>With this patch each buffer pool instance gets its own background thread that evicts and flushes cold pages to keep free pages available. When this is not done, user queries needing a free page might start  doing cleanup work inline during the query execution, which increases the execution time.</span></p>
<p> </p>
<h4><span>Close a shutdown/invalidation race</span></h4>
<p><span>(GitHub: </span><a href="https://github.com/percona/percona-server/commit/37cdd537d1364253d2b30363ffedb1c1fa66a4d9" target="_blank" rel="noopener"><span>37cdd537</span></a><span>)</span></p>
<p><span>This commit has no direct performance impact.</span></p>
<p> </p>
<h4><span>Add innodb_lru_threads sysvar</span></h4>
<p><span>(GitHub: </span><a href="https://github.com/percona/percona-server/commit/1a1185b4ca28ff6b6bd8e5f8ae2eef12933c84b9" target="_blank" rel="noopener"><span>1a1185b4</span></a><span>)</span></p>
<p><span>Adds the ON/OFF switching for the LRU manager through innodb_lru_threads system variable. Also, the patch restructures flush statistics, so LRU threads don’t need to synchronize with each other when updating counters – stats are aggregated by a single coordinator thread.</span></p>
<p> </p>
<h4><span>Count evictions as adaptive-sleep progress</span></h4>
<p><span>(GitHub: </span><a href="https://github.com/percona/percona-server/commit/c80f165574e1d24c60a3b5cb5301465ca112688f" target="_blank" rel="noopener"><span>c80f16557</span></a><span>)</span></p>
<p><span>The LRU thread adapts how long it sleeps based on whether it is “making progress”. In the previous implementation only flushing pages counted as progress, so freeing memory by evicting clean pages looked like failure and made the thread back off wrongly. Now evictions count as progress too, so the LRU thread avoids backing off under clean-page workloads.</span></p>
<p> </p>
<h4><span>Single-page-flush concurrency cap</span></h4>
<p><span>(GitHub: </span><a href="https://github.com/percona/percona-server/commit/2624d1168cf1b74fcd5bcc3e9cb32648ab2e39b8" target="_blank" rel="noopener"><span>2624d116</span></a><span>)</span></p>
<p><span>Fixes a low-concurrency throughput drop: when a background LRU batch was already running, a user thread needing a free page always sat waiting for the whole batch to finish. Now the thread first scans for a page it can free immediately, only waits when it truly has to, and never waits twice in one call (avoiding starvation). Adds two monitoring counters for observability.</span></p>
<p> </p>
<h4><span>PS-11446: Fix inverted old/young check in LRU scan iterator</span></h4>
<p><span>(GitHub: </span><a href="https://github.com/percona/percona-server/commit/dc344fba7e3d272ac18e8d6589b37c678f1e1ad5" target="_blank" rel="noopener"><span>dc344fba</span></a><span>)</span></p>
<p><span>This improvement fixes a bug when the background flusher wasted CPU time re-scanning the same pages over and over because it started from LRU tail each time. After the fix, the LRU scan iterator remembers where it left off and continues from there.</span></p>
<p><span>NOTE: This bug existed in MySQL and Percona Server for MySQL for a long time unnoticed. It was discovered only because the LRU code was re-assessed for possible performance improvements.</span></p>
<p> </p>
<h2><span>Summary</span></h2>
<p><span>The overall performance improvements were delivered by: faster physical reads through much less lock contention (PS-11444), background threads keeping free pages ready so queries don’t stall on evictions (PS-11445) and no wasted rescanning in the flusher (PS-11446).</span></p>
<p>The post <a href="https://www.percona.com/blog/performance-improvements-in-percona-server-8-4-11-11/">Performance improvements in Percona Server 8.4.11-11</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/performance-improvements-in-percona-server-8-4-11-11/">Performance improvements in Percona Server 8.4.11-11</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Data Quality SLOs: 5 Proven Indicators, Error Budgets and Burn-Rate Alerts on dbt and Airflow</title>
        <link>https://minervadb.com/data-quality-slos/</link>
        <pubDate>Tue, 15 Sep 2026 04:53:00 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/data-quality-slos-5-proven-indicators-error-budgets-and-burn-rate-alerts-on-dbt-and-airflow/</guid>
        <source url="https://minervadb.com/">MinervaDB</source>
        <description><![CDATA[<p>Every data platform we take over has data quality checks. Hundreds of them, usually: not_null tests on every column, row-count assertions, a freshness dashboard nobody looks at, and a Slack channel where the failures scroll [...]</p>
<p><a href="https://minervadb.com/data-quality-slos/">Data Quality SLOs: 5 Proven Indicators, Error Budgets and Burn-Rate Alerts on dbt and Airflow</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Every data platform we take over has data quality checks. Hundreds of them, usually: <code>not_null</code> tests on every column, row-count assertions, a freshness dashboard nobody looks at, and a Slack channel where the failures scroll past unread because there are forty a day and none of them says whether anyone should care. The checks exist; the discipline that turns them into a promise does not.</p>
<p>Data quality SLOs are that discipline, borrowed directly from the way SRE teams run services: a small number of measured indicators per dataset, an explicit target for each, an error budget that says how much failure is tolerable before work stops, and alerts that fire on the rate at which the budget is burning rather than on every individual miss.</p>
<p>This post sets out the data quality SLOs we implement for customers running dbt and Airflow on PostgreSQL, ClickHouse, Snowflake, BigQuery or Databricks. It takes one dataset, an order-line fact table, and follows it through the five indicators we measure, the SQL that produces each, the SLO table that stores the targets and their owners, the burn-rate alerts that replace per-test noise, and the incident and review loop that keeps the targets honest. All the code runs on PostgreSQL 16 or later and dbt Core 1.8 or later; the ClickHouse variants are noted where they differ. Targets and figures are illustrative unless a measurement source is named.</p>
<p><img loading="lazy" decoding="async" src="https://minervadb.com/wp-content/uploads/2026/09/data-quality-slos-one-dataset-five-indicators.png" alt="Data quality SLOs for one dataset: consumers and consequences, five indicators with targets, observation log, error budget and burn-rate alerting" width="1100" height="420" class="aligncenter size-full wp-image-93257"></p>
<h2>An SLO is a promise to a consumer, so start with the consumer</h2>
<p>The first mistake in data quality SLOs is writing them for the pipeline rather than for the people who depend on it. A freshness target of &#8220;loaded by 06:00&#8221; means nothing until someone says what breaks at 06:01. So each dataset gets a named consumer and a stated consequence: finance closes on <code>fct_order_line</code> at 07:00 on the third working day; the pricing service reads it every fifteen minutes; the board pack is built from it on the first Monday.</p>
<p>Those three consumers want different things, and the SLO records the strictest requirement each dimension actually has, with the consumer and the consequence written beside it. That is what makes the target defensible when the on-call engineer is woken at 03:00.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- Data quality SLOs live in a table, per dataset and indicator, with owner and consequence
CREATE TABLE dq.slo (
    dataset            TEXT        NOT NULL,          -- 'marts.fct_order_line'
    indicator          TEXT        NOT NULL
                       CONSTRAINT dq_slo_indicator_chk
                       CHECK (indicator IN ('freshness','completeness','validity','consistency','lineage')),
    target             NUMERIC(6,4) NOT NULL,         -- 0.9950 = 99.5 % of evaluation windows meet the SLI
    window_days        SMALLINT    NOT NULL DEFAULT 28,
    sli_threshold      TEXT        NOT NULL,          -- '45 minutes', '0.999', '0.0010'
    consumer           TEXT        NOT NULL,          -- 'finance close', 'pricing service'
    consequence        TEXT        NOT NULL,          -- what breaks when the SLI misses
    owner_email        TEXT        NOT NULL,
    set_at             TIMESTAMPTZ NOT NULL DEFAULT now(),
    CONSTRAINT dq_slo_pk PRIMARY KEY (dataset, indicator)
);

INSERT INTO dq.slo VALUES
  ('marts.fct_order_line','freshness',   0.9950, 28, '45 minutes', 'pricing service',
   'pricing falls back to yesterday''s margins; measurable revenue impact per hour', 'data-platform-lead@example.com', now()),
  ('marts.fct_order_line','completeness',0.9990, 28, '0.999',      'finance close',
   'close reconciliation fails; controllers work manually', 'fpa-lead@example.com', now()),
  ('marts.fct_order_line','validity',    0.9990, 28, '0.0010',     'all',
   'downstream models produce nulls in margin', 'data-platform-lead@example.com', now()),
  ('marts.fct_order_line','consistency', 0.9900, 28, '0.0010',     'finance close',
   'ledger variance above tolerance blocks sign-off', 'fpa-lead@example.com', now()),
  ('marts.fct_order_line','lineage',     0.9990, 28, 'all upstream succeeded', 'all',
   'silently stale or partial upstream; every consumer affected', 'data-platform-lead@example.com', now());</pre>
<p>Five rows of data quality SLOs for the most important table in the warehouse, and that is deliberate. Data quality SLOs are meant to be few: the twenty or thirty datasets that consumers actually depend on, five indicators each, and nothing else promised. The other four hundred models keep their dbt tests, but a failing test on an intermediate model is a build failure for the engineer, not a page, and not a breach of anything.</p>
<h2>Five data quality SLOs indicators, and the query behind each</h2>
<p>An SLI behind data quality SLOs is a measurement, taken on a schedule, that yields a pass or fail against a threshold. Data quality SLOs collapse the hundreds of possible checks on a dataset into five that between them cover what a consumer can be harmed by: the data is late, incomplete, malformed, inconsistent with another source of truth, or built on something that did not succeed. Each is computed by the platform from its own tables and written to one evaluation log, so the SLO attainment and the error budget are queries over that log rather than a dashboard someone assembles.</p>
<p><img loading="lazy" decoding="async" src="https://minervadb.com/wp-content/uploads/2026/09/data-quality-slos-five-indicators.png" alt="Data quality SLOs five indicators: freshness, completeness, validity, consistency and lineage integrity with what each catches" width="1100" height="400" class="aligncenter size-full wp-image-93258"></p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- One evaluation log for every SLI observation
CREATE TABLE dq.sli_observation (
    dataset            TEXT        NOT NULL,
    indicator          TEXT        NOT NULL,
    observed_at        TIMESTAMPTZ NOT NULL DEFAULT now(),
    value              NUMERIC,                       -- minutes of lag, ratio, count
    passed             BOOLEAN     NOT NULL,
    detail             JSONB,                         -- what was compared, for the incident
    CONSTRAINT dq_sli_observation_pk PRIMARY KEY (dataset, indicator, observed_at)
);

-- 1. Freshness: age of the newest business event versus its own expected cadence
INSERT INTO dq.sli_observation (dataset, indicator, value, passed, detail)
SELECT 'marts.fct_order_line', 'freshness',
       EXTRACT(EPOCH FROM (now() - MAX(order_ts))) / 60                       AS lag_minutes,
       EXTRACT(EPOCH FROM (now() - MAX(order_ts))) / 60 = 0.999                                  AS passed,
       jsonb_build_object('mart_rows', m.n, 'source_rows', s.n, 'window', 'yesterday')
FROM (SELECT count(*) AS n FROM marts.fct_order_line
      WHERE order_ts &gt;= CURRENT_DATE - 1 AND order_ts = CURRENT_DATE - 1 AND event_ts &lt; CURRENT_DATE) AS s;

-- 3. Validity: share of rows violating the dataset&#039;s own invariants
INSERT INTO dq.sli_observation (dataset, indicator, value, passed, detail)
SELECT &#039;marts.fct_order_line&#039;, &#039;validity&#039;,
       count(*) FILTER (WHERE net_amount IS NULL OR landed_cost &lt; 0 OR (customer_id IS NULL AND channel  'guest'))::NUMERIC
         / NULLIF(count(*), 0)                                                 AS invalid_ratio,
       count(*) FILTER (WHERE net_amount IS NULL OR landed_cost &lt; 0 OR (customer_id IS NULL AND channel  'guest'))::NUMERIC
         / NULLIF(count(*), 0) = CURRENT_DATE - 1;</pre>
<p>In data quality SLOs, freshness is measured against the business timestamp, not the load timestamp; a pipeline that runs on time and loads nothing new is late, and only the business timestamp shows it. Completeness compares against the source&#8217;s own count for the same window, which is the only comparison that catches a CDC connector silently dropping a partition. Validity checks the dataset&#8217;s invariants as a ratio rather than a boolean, so a single bad row in ten million does not fail the SLI while a thousand do.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- 4. Consistency: reconciliation to an external truth, here the finance ledger for the last closed month
INSERT INTO dq.sli_observation (dataset, indicator, value, passed, detail)
SELECT 'marts.fct_order_line', 'consistency',
       ABS(m.net - g.net) / NULLIF(g.net, 0)                                   AS variance_ratio,
       ABS(m.net - g.net) / NULLIF(g.net, 0) = date_trunc('month', CURRENT_DATE - INTERVAL '1 month')
        AND order_ts &lt;  date_trunc(&#039;month&#039;, CURRENT_DATE)) AS m,
     (SELECT SUM(amount) AS net FROM finance.gl_revenue_by_period
      WHERE period = date_trunc(&#039;month&#039;, CURRENT_DATE - INTERVAL &#039;1 month&#039;)
        AND account_class = &#039;NET_REVENUE&#039;) AS g;

-- 5. Lineage integrity: every upstream model in this dataset&#039;s DAG succeeded in the run that produced it
-- (dq.run_result is loaded from dbt&#039;s run_results.json after every run)
INSERT INTO dq.sli_observation (dataset, indicator, value, passed, detail)
SELECT &#039;marts.fct_order_line&#039;, &#039;lineage&#039;,
       count(*) FILTER (WHERE status  'success')                            AS failed_upstream,
       count(*) FILTER (WHERE status  'success') = 0                        AS passed,
       jsonb_build_object('run_id', MAX(run_id),
                          'failed', jsonb_agg(node_name) FILTER (WHERE status  'success'))
FROM dq.run_result
WHERE run_id = (SELECT MAX(run_id) FROM dq.run_result WHERE node_name = 'marts.fct_order_line')
  AND node_name IN (SELECT upstream FROM dq.lineage WHERE downstream = 'marts.fct_order_line');</pre>
<p>Lineage integrity is the data quality SLOs indicator most teams do not have and most incidents trace back to. A mart can build successfully from a staging model that failed silently and was skipped, or from a source that loaded yesterday&#8217;s file twice. Loading dbt&#8217;s <code>run_results.json</code> and <code>manifest.json</code> into two small tables after every run makes &#8220;did everything this table depends on actually succeed this time&#8221; a query, and it is the query that runs first when a consumer reports a wrong number.</p>
<h2>Data quality SLOs attainment and error budget are queries, not opinions</h2>
<p>With targets in one table and observations in another, data quality SLOs become arithmetic. Attainment over the window is the share of observations that passed. The error budget is the shortfall the target permits, and the budget remaining is how much of it has been spent. A freshness SLO of 99.5 percent over 28 days with an observation every fifteen minutes allows about thirteen failed observations, roughly three and a quarter hours of lateness, in the window. Once that is spent, the dataset is in breach and the policy in the next section applies.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- Attainment and error budget remaining, per dataset and indicator, over each SLO's own window
SELECT
    s.dataset,
    s.indicator,
    s.target,
    count(o.*)                                                    AS observations,
    count(o.*) FILTER (WHERE o.passed)                            AS passed,
    round(count(o.*) FILTER (WHERE o.passed)::NUMERIC / NULLIF(count(o.*), 0), 5) AS attainment,
    round((1 - s.target) * count(o.*))                            AS budget_total_obs,
    round((1 - s.target) * count(o.*)) - count(o.*) FILTER (WHERE NOT o.passed) AS budget_remaining_obs,
    s.owner_email
FROM dq.slo AS s
LEFT JOIN dq.sli_observation AS o
       ON o.dataset = s.dataset AND o.indicator = s.indicator
      AND o.observed_at &gt;= now() - make_interval(days =&gt; s.window_days)
GROUP BY s.dataset, s.indicator, s.target, s.owner_email
ORDER BY budget_remaining_obs ASC;</pre>
<p>That view is the weekly data quality SLOs review. A dataset with budget to spare can take a risky migration this sprint; one with none cannot, and the change freeze is a number rather than an argument. On ClickHouse the same two tables and the same query work unchanged apart from <code>make_interval</code>, which becomes <code>INTERVAL s.window_days DAY</code>.</p>
<h2>Alert on burn rate, not on every miss</h2>
<p>The reason forty data quality Slack messages a day go unread is that each one is a single failed check with no sense of proportion. Data quality SLOs replace that with the SRE multi-window burn-rate alert: page when the budget is being consumed fast enough that it will be exhausted long before the window ends, and warn when it is being consumed steadily faster than the target allows. Two windows per alert, a long one for significance and a short one to confirm the problem is still happening, keep a transient blip from paging anyone and a slow bleed from being ignored.</p>
<p><img loading="lazy" decoding="async" src="https://minervadb.com/wp-content/uploads/2026/09/data-quality-slos-burn-rate-alerting.png" alt="Data quality SLOs burn-rate alerting: multi-window page and warn thresholds versus per-check alerting" width="1100" height="400" class="aligncenter size-full wp-image-93259"></p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- Multi-window burn-rate alert for the freshness SLO (illustrative: page at 14.4x over 1h and 5m; warn at 6x over 6h and 30m)
WITH s AS (
    SELECT dataset, indicator, target, window_days FROM dq.slo
    WHERE dataset = 'marts.fct_order_line' AND indicator = 'freshness'
),
rates AS (
    SELECT
        (SELECT (1 - target) FROM s)                                                   AS allowed_fail_rate,
        AVG((NOT passed)::int) FILTER (WHERE observed_at &gt;= now() - INTERVAL '1 hour')   AS fail_1h,
        AVG((NOT passed)::int) FILTER (WHERE observed_at &gt;= now() - INTERVAL '5 minutes') AS fail_5m,
        AVG((NOT passed)::int) FILTER (WHERE observed_at &gt;= now() - INTERVAL '6 hours')  AS fail_6h,
        AVG((NOT passed)::int) FILTER (WHERE observed_at &gt;= now() - INTERVAL '30 minutes') AS fail_30m
    FROM dq.sli_observation
    WHERE dataset = 'marts.fct_order_line' AND indicator = 'freshness'
      AND observed_at &gt;= now() - INTERVAL '6 hours'
)
SELECT
    CASE
        WHEN fail_1h / allowed_fail_rate &gt;= 14.4 AND fail_5m  / allowed_fail_rate &gt;= 14.4 THEN 'page'
        WHEN fail_6h / allowed_fail_rate &gt;= 6.0  AND fail_30m / allowed_fail_rate &gt;= 6.0  THEN 'warn'
        ELSE 'ok'
    END AS level,
    round(fail_1h / allowed_fail_rate, 1) AS burn_1h,
    round(fail_6h / allowed_fail_rate, 1) AS burn_6h
FROM rates;</pre>
<p>For data quality SLOs, a burn rate of 14.4 over an hour means the dataset is failing at a pace that would exhaust a 28-day budget in about two days; that is worth waking someone for. A burn rate of six over six hours exhausts it in under five days and is worth a ticket in the morning. The constants are the ones <a href="https://sre.google/workbook/alerting-on-slos/" target="_blank" rel="noopener">Google&#8217;s SRE workbook</a> popularised and they are a starting point, not a law; the right ones for a dataset come from looking at its own history of misses and asking which of them the consumer would have wanted to know about at 03:00.</p>
<h2>Wiring data quality SLOs into dbt and Airflow</h2>
<p>Data quality SLOs need no new platform. The five data quality SLOs queries are dbt models or singular tests that write to <code>dq.sli_observation</code>; the attainment view is a dbt model; the burn-rate query is an Airflow task that runs every five minutes and routes on its result. The one addition that matters is loading dbt&#8217;s run artefacts into the warehouse after every run, because that is what makes the lineage indicator and the incident investigation possible.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="python"># Airflow 2.9+: burn-rate check every five minutes, routed by level; run artefacts loaded after every dbt run
from datetime import timedelta
from airflow.decorators import dag, task
from airflow.providers.postgres.hooks.postgres import PostgresHook

@dag(schedule=timedelta(minutes=5), catchup=False, max_active_runs=1, tags=["dq", "slo"])
def dq_burn_rate():

    @task
    def evaluate() -&gt; list[dict]:
        hook = PostgresHook(postgres_conn_id="warehouse")
        rows = hook.get_records(open("/opt/airflow/sql/dq_burn_rate_all.sql").read())
        return [dict(dataset=r[0], indicator=r[1], level=r[2], burn_1h=r[3], owner=r[4]) for r in rows]

    @task
    def route(results: list[dict]) -&gt; None:
        for r in results:
            if r["level"] == "page":
                page_oncall(service="data-platform", summary=f"{r['dataset']} {r['indicator']} burn {r['burn_1h']}x", owner=r["owner"])
            elif r["level"] == "warn":
                open_ticket(queue="data-quality", summary=f"{r['dataset']} {r['indicator']} burning {r['burn_1h']}x", owner=r["owner"])

    route(evaluate())

dq_burn_rate()</pre>
<pre class="EnlighterJSRAW" data-enlighter-language="shell"># After every dbt run: load run_results.json and manifest.json so lineage integrity is a query
dbt run --select +marts.fct_order_line
python load_dbt_artifacts.py --target-path target/ --schema dq   # writes dq.run_result and dq.lineage</pre>
<p>The pager and ticket functions are whatever the estate already uses for data quality SLOs; the point is that the page carries the dataset, the indicator, the burn rate and the owner from the SLO table, so the person woken knows in the first line whether the pricing service is about to fall back to stale margins or a controller will have a bad morning.</p>
<h2>The incident and the review are part of the SLO</h2>
<p>A page on data quality SLOs is an incident and is run as one: acknowledged, mitigated, resolved, reviewed. The review has one question the pipeline-check world never asks, which is whether the SLO was right. If the freshness page fired and nobody downstream noticed the lateness, the target is stricter than the consumer needs and it should loosen.</p>
<p>If a consumer reported a wrong number and no indicator fired, an indicator is missing or a threshold is too loose, and the review adds or tightens it. Quarterly, the owner of every one of the data quality SLOs confirms the consumer and consequence still hold, and datasets nobody depends on any longer lose their SLOs rather than accumulating.</p>
<p><img decoding="async" loading="lazy" src="https://minervadb.com/wp-content/uploads/2026/09/data-quality-slos-review-loop.png" alt="Data quality SLOs operating loop: observe, evaluate, respond, review, recertify, with the error budget policy" width="1100" height="380" class="aligncenter size-full wp-image-93260"></p>
<div>
<table>
<thead>
<tr>
<th>Review finding</th>
<th>What it says about the SLO</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td>Page fired, no consumer impact</td>
<td>Target stricter than the consequence justifies</td>
<td>Loosen target or threshold; record the consumer&#8217;s real tolerance</td>
</tr>
<tr>
<td>Consumer reported a defect, nothing fired</td>
<td>Missing indicator or threshold too loose</td>
<td>Add the indicator that would have caught it; backfill observations to confirm</td>
</tr>
<tr>
<td>Budget exhausted three months running</td>
<td>Pipeline cannot meet the promise as built</td>
<td>Reliability work takes priority over features until budget is positive</td>
</tr>
<tr>
<td>Budget never touched</td>
<td>Either excellent, or the SLI is not measuring what breaks</td>
<td>Check the SLI against a known past incident; tighten if it would have missed it</td>
</tr>
<tr>
<td>Owner cannot name the consumer</td>
<td>SLO has outlived its purpose</td>
<td>Retire it; keep the dbt tests</td>
</tr>
</tbody>
</table>
</div>
<h2>Where data quality SLOs go wrong</h2>
<p>Three data quality SLOs failure modes recur. Over-instrumentation: a team promises SLOs on every model, the budget arithmetic becomes noise, and the pager fires for datasets nobody reads. Twenty to thirty datasets with data quality SLOs is the range we see work. Measuring the pipeline instead of the data: a freshness SLI on &#8220;last job run time&#8221; passes while the job loads nothing, which is why every SLI here reads the business data or an external truth. And SLOs without consequences: a target with no named consumer and no stated impact will be argued down the first time it pages, so the consequence column is not optional.</p>
<h2>Working with MinervaDB on data quality SLOs</h2>
<p>Data quality SLOs are the operating discipline inside our <a href="https://minervadb.com/data-governance-consulting/">data governance consulting</a> practice and the Data SRE layer of our <a href="https://minervadb.com/data-engineering/">data engineering</a> work: a typical engagement selects the datasets that matter with their consumers, writes the five indicators and targets for each, wires the observation log and burn-rate alerts into the existing dbt and Airflow estate, and runs the first quarterly review with the owners. The same data quality SLOs evaluation-log pattern underpins the reconciliation tests in our <a href="https://minervadb.com/metrics-layer-dbt/">metrics layer</a> post and the freshness SLIs in our <a href="https://minervadb.com/feature-store-architecture/">feature store architecture</a>.</p>
<p>Under managed operations the burn-rate pager routes to our 24×7 teams under the standard S1 to S4 commitments, with an exhausted error budget on a finance-close dataset treated as an S2 and a lineage-integrity failure on a production model as an S1. As always: test every query, threshold and constant here against your own datasets and history before applying them to production, and keep the observation log itself under a restore posture; it is the evidence behind every promise.</p>
<p><a href="https://minervadb.com/data-quality-slos/">Data Quality SLOs: 5 Proven Indicators, Error Budgets and Burn-Rate Alerts on dbt and Airflow</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Percona and HexaCluster: Faster, Safer Oracle Migration</title>
        <link>https://www.percona.com/blog/percona-and-hexacluster-faster-safer-oracle-migration/</link>
        <pubDate>Mon, 14 Sep 2026 22:19:16 +0000</pubDate>
        <dc:creator>Percona Team</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/percona-and-hexacluster-faster-safer-oracle-migration/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Percona and HexaCluster have partnered to remove the hardest part of an open source database migration: getting off Oracle, SQL Server, DB2 or Sybase ASE with confidence, on a predictable timeline, without a multi-year consulting program. Percona brings open source expertise, its own distributions, operators and enterprise support. HexaCluster brings the assessment and migration engineering … Continued<br />
The post Percona and HexaCluster: Faster, Safer Oracle Migration appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/percona-and-hexacluster-faster-safer-oracle-migration/">Percona and HexaCluster: Faster, Safer Oracle Migration</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><a href="https://www.percona.com/"><span>Percona</span></a><span> and HexaCluster have partnered to remove the hardest part of an open source database migration: getting off Oracle, SQL Server, DB2 or Sybase ASE with confidence, on a predictable timeline, without a multi-year consulting program. Percona brings open source expertise, its own distributions, operators and enterprise support. HexaCluster brings the assessment and migration engineering that gets workloads onto those supported databases.</span></p>
<p><span>In this Q&amp;A, Avi Vallarapu, CEO of </span><a href="https://hexacluster.ai/"><span>HexaCluster</span></a><span>, explains what the partnership changes for organizations planning an Oracle migration, why a database migration assessment is the single most valuable step, and how a joint engagement runs from first assessment through long-term support.</span></p>
<p> </p>
<h2><b>Quick answer: what is the Percona and HexaCluster partnership?</b></h2>
<p><span>Percona and HexaCluster is a joint database migration partnership that moves organizations off Oracle, SQL Server, DB2 and Sybase ASE onto Percona-supported open source databases, primarily PostgreSQL. HexaCluster runs the assessment and migration engineering, using its own DMAT and HexaRocket tooling. Percona runs the resulting database long term through its distributions, operators and support.</span></p>
<ul>
<li><b>Problem it solves:</b><span> disconnected migration tools and skipped assessments, which is where most Oracle migrations fail</span></li>
<li><b>What HexaCluster does:</b><span> database migration assessment, automatic schema conversion, data migration, and live replication, with validation &amp; rollback</span></li>
<li><b>What Percona does:</b><span> the open source database destination, plus operators, distributions and expert support</span></li>
<li><b>Typical use case:</b><span> Oracle, SQL Server, DB2 or Sybase ASE exits, data center exits, and hybrid cloud migrations</span></li>
</ul>
<p><span>Short version: HexaCluster gets you to open source. Percona keeps you running on it. Together, that’s one path from a proprietary database to a fully supported open source one.</span></p>
<p> </p>
<h2><b>Q: What does HexaCluster do differently?</b></h2>
<p><b>Avi:</b><span> HexaCluster comes from the same place Percona does. We’re open source contributors first. Our team has contributed to more than 50 popular PostgreSQL extensions, and over 90 percent of what we build is open source.</span></p>
<p><span>The best known example is Ora2Pg, the most widely used open source Oracle-to-PostgreSQL migration tool, created and maintained by our team. Google Cloud, Microsoft Azure and AWS have all pointed customers to it for complex schema conversions. We’ve also built extensions that emulate Oracle and SQL Server behavior inside PostgreSQL, making application code portable instead of rewritten.</span></p>
<p><span>That work taught us where migrations actually break, which is where HexaRocket came from. Almost every existing migration tool is partial: some handle schema conversion, some handle data migration and change data capture, very few do both, and almost none give a credible rollback. Customers end up stitching disconnected tools together, and the seams between them are exactly where migrations fail.</span></p>
<p><span>HexaRocket runs the whole path in one platform: schema migration with validation, data migration with validation, change data capture for live replication, and reverse replication so you can roll back if something goes wrong. Rollback is what lets a CIO approve a cutover date.</span></p>
<p> </p>
<h2><b>Q: Why does the partnership with Percona matter?</b></h2>
<p><b>Avi:</b><span> Because neither company covers the whole journey alone. Percona is the master of open source on the services and product side: Percona Distribution for PostgreSQL, Percona MySQL, Percona Software for MongoDB, the Percona Operators, and enterprise support. That’s hard to replicate.</span></p>
<p><span>What Percona hasn’t done is move workloads off Oracle, SQL Server, DB2 or Sybase in the first place. That’s the gap HexaCluster bridges.</span></p>
<p><span>Put simply: HexaCluster gets you to open source, Percona keeps you running on it. That’s the whole journey covered by two open source companies, not a general-purpose systems integrator learning your database on your budget. It works in reverse for us too: when customers ask what they’re landing on, pointing at Percona’s distribution, with built-in transparent data encryption, makes that conversation simpler.</span></p>
<p> </p>
<h2><b>Q: How did this relationship start?</b></h2>
<p><b>Avi:</b><span> It’s not new. I joined Percona in 2018 to start and lead the PostgreSQL practice there. The relationship continued through everything I’ve built since, first through MigOps and now through HexaCluster. This partnership formalizes a working relationship that’s existed for years.</span></p>
<p> </p>
<h2><b>Q: What’s actually driving companies to do this right now?</b></h2>
<p><b>Avi:</b><span> Three things, stacking on top of each other.</span></p>
<p><b>Cost optimization.</b><span> Commercial database licensing is one of the largest and least defensible line items in most infrastructure budgets. When finance looks for structural savings, this is where they land.</span></p>
<p><b>Scale in the AI era.</b><span> Organizations are scaling data volumes faster than planned. Per-core commercial licensing turns growth into a penalty; open source turns it into a hardware conversation instead of a procurement one.</span></p>
<p><b>Features and performance.</b><span> PostgreSQL isn’t the pragmatic compromise anymore. It’s the target: extensions, JSON, logical replication, partitioning, and now transparent data encryption through Percona’s work on the Distribution. The question has shifted from whether to adopt PostgreSQL to how fast the rest of the estate can follow.</span></p>
<p> </p>
<h2><b>Q: Where do companies most often go wrong in migrations?</b></h2>
<p><b>Avi:</b><span> They skip the assessment.</span></p>
<p><span>Migrations fail long before cutover, at the point someone estimates the effort without knowing what’s actually inside the databases. Some carry genuine complexity: heavy PL/SQL, embedded business logic, dependencies nobody has read in a decade. Others are almost trivial. Without an assessment, you can’t tell those apart, so both estimates are wrong.</span></p>
<p><span>Two mistakes compound that one: choosing a partner who treats your migration as a learning exercise, and choosing disconnected tools that leave the integration risk with you. Assessment first. Everything else gets easier after that.</span></p>
<p> </p>
<h2><b>Q: What does a Percona and HexaCluster engagement look like for a customer?</b></h2>
<p><b>Avi:</b><span> It’s one team across the full lifecycle. The engagement starts the moment someone first thinks about migrating: assessment, then roadmap and sequencing, then schema and data migration with validation at every stage, then cutover with rollback available, then production, then support for as long as the database lives.</span></p>
<p><span>The customer isn’t managing a handoff between an assessment vendor, a tooling vendor, a migration integrator and a support provider. That’s where cost, delay and blame usually live. The result is cost-effective and easier, because the people who build the tools are the same people who support the databases afterward.</span></p>
<p> </p>
<h2><b>Q: Can you make that concrete? What has this looked like in practice?</b></h2>
<p><b>Avi:</b><span> Two examples.</span></p>
<p><span>A leading Middle East bank had a very large Oracle footprint. We assessed 120 Oracle databases in 30 minutes, then handed them a complete migration roadmap within two days. Individual databases ranged from 30 minutes to four days of work to them out of Oracle each, roughly 40 person-days across the whole estate. We also ran a proof of concept in two days and showed a working migration, not just a demo.</span></p>
<p><span>A global enterprise moved 800 TB of databases from Oracle Standard Edition to Amazon Aurora PostgreSQL, covering more than 6,000 customers, as part of an acquisition strategy, completed over two years with validation and direct customer coordination throughout.</span></p>
<p><span>Both examples share the same pattern: unknowns get resolved at the start, not discovered in the middle.</span></p>
<p> </p>
<h2><b>Q: So what does the customer actually get out of this partnership?</b></h2>
<p><b>Avi:</b><span> The most valuable thing is that the customer doesn’t have to invent migration from scratch. It’s a solved problem they can buy: no unknowns, because the assessment tells you what’s in the estate before you commit to a plan; validation at every stage, so schema and data are verified, not assumed; rollback through reverse replication, which is what makes teams willing to schedule a cutover; and committed timelines, which is often the real blocker for leadership.</span></p>
<p> </p>
<h2><b>Q: If I’m a CIO reading this, what should I be asking myself?</b></h2>
<p><b>Avi:</b><span> Three questions, in this order.</span></p>
<p><span>Did I pick the right database to migrate first? Starting with the hardest one is the most common self-inflicted wound. It burns budget and demoralizes leadership before any value is delivered.</span></p>
<p><span>Have we actually assessed our databases, so we know which ones are low-hanging fruit and which need real engineering? Without that, you’re guessing.</span></p>
<p><span>Did we pick the right tooling: a platform genuinely built for end-to-end migration, not a set of disconnected tools stitched together? Get those three right, and the migration is largely an execution problem.</span></p>
<p> </p>
<h2><b>Q: What are the biggest migration goals you’re seeing?</b></h2>
<p><b>Avi:</b><span> Four exits dominate the conversations we’re in: Oracle, SQL Server, DB2 and Sybase ASE. Sybase ASE deserves a special mention, since customers there are being pushed toward SAP or SQL Server, trading one proprietary database for another. Through this partnership, PostgreSQL becomes a realistic, cheaper target instead.</span></p>
<p><span>Many of these tie into data center exits and hybrid cloud programs, where a single platform pays off most. We cover homogeneous migrations (PostgreSQL to PostgreSQL, MySQL to MySQL, any platform to any platform), heterogeneous migrations (Oracle, SQL Server, DB2 and Sybase ASE to PostgreSQL), and same-engine platform moves, like Azure Managed SQL to SQL Server on VMs. A data center exit is rarely one type of migration. It’s usually all three at once, under a deadline set by a lease or a contract.</span></p>
<p> </p>
<h2><b>Q: What are the next steps for someone reading this?</b></h2>
<p><b>Avi:</b><span> Start with the assessment. It’s fast, it’s concrete, and it’s the step that de-risks everything after it.</span></p>
<p><span>We invite organizations to run a DMAT database migration assessment across their estate and get back a detailed roadmap: which databases to move first, what effort each one takes, and what the cost savings look like. From there, Percona and HexaCluster can take it through to production and support it long term.</span></p>
<p><span>You don’t need to commit to a migration to find out what one would cost you. That’s the point of assessing first.</span></p>
<p><span>To start an assessment or discuss an Oracle, SQL Server, DB2 or Sybase ASE exit,</span><a href="https://www.percona.com/about/contact"> <span>contact your Percona representative</span></a><span> or reach out to HexaCluster directly.</span></p>
<p>The post <a href="https://www.percona.com/blog/percona-and-hexacluster-faster-safer-oracle-migration/">Percona and HexaCluster: Faster, Safer Oracle Migration</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/percona-and-hexacluster-faster-safer-oracle-migration/">Percona and HexaCluster: Faster, Safer Oracle Migration</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>AWS renews Diamond sponsorship of MariaDB Foundation for a fourth consecutive year</title>
        <link>https://mariadb.org/aws-renews-diamond-sponsorship-of-mariadb-foundation-for-a-fourth-consecutive-year/</link>
        <pubDate>Mon, 14 Sep 2026 16:35:33 +0000</pubDate>
        <dc:creator>Anna Widenius</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/aws-renews-diamond-sponsorship-of-mariadb-foundation-for-a-fourth-consecutive-year/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB Foundation is pleased to announce that Amazon Web Services (AWS) has renewed its Diamond sponsorship for a fourth consecutive year. …<br />
Continue reading "AWS renews Diamond sponsorship of MariaDB Foundation for a fourth consecutive year"<br />
AWS renews Diamond sponsorship of MariaDB Foundation for a fourth consecutive year appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/aws-renews-diamond-sponsorship-of-mariadb-foundation-for-a-fourth-consecutive-year/">AWS renews Diamond sponsorship of MariaDB Foundation for a fourth consecutive year</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Foundation is pleased to announce that <a href="https://mariadb.org/aws-renews-diamond-sponsorship-of-mariadb-foundation-for-a-fourth-consecutive-year/">Amazon Web Services (AWS</a>) has renewed its <a href="https://mariadb.org/aws-renews-diamond-sponsorship-of-mariadb-foundation-for-a-fourth-consecutive-year/">Diamond sponsorship</a> for a fourth consecutive year. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/aws-renews-diamond-sponsorship-of-mariadb-foundation-for-a-fourth-consecutive-year/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;AWS renews Diamond sponsorship of MariaDB Foundation for a fourth consecutive year&#8221;</span></a></p>
<p><a href="https://mariadb.org/aws-renews-diamond-sponsorship-of-mariadb-foundation-for-a-fourth-consecutive-year/">AWS renews Diamond sponsorship of MariaDB Foundation for a fourth consecutive year</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/aws-renews-diamond-sponsorship-of-mariadb-foundation-for-a-fourth-consecutive-year/">AWS renews Diamond sponsorship of MariaDB Foundation for a fourth consecutive year</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Prove the Backup: A Percona Distribution for PostgreSQL Restore Drill on Windows</title>
        <link>https://percona.community/blog/2026/09/14/percona-postgresql-restore-drill-on-windows/</link>
        <pubDate>Mon, 14 Sep 2026 11:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/prove-the-backup-a-percona-distribution-for-postgresql-restore-drill-on-windows/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>A backup is only useful if it can be restored. This lab seeds a source database, takes a logical archive, deliberately deletes the source database, restores into a clean target, and checks the recovered state. Percona Distribution for PostgreSQL does not provide a native Windows package. Windows is only the Docker Desktop host; PostgreSQL and its utilities run in Linux containers.</p>
<p><a href="https://percona.community/blog/2026/09/14/percona-postgresql-restore-drill-on-windows/">Prove the Backup: A Percona Distribution for PostgreSQL Restore Drill on Windows</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>A backup is only useful if it can be restored. This lab seeds a source database, takes a logical archive, deliberately deletes the source database, restores into a clean target, and checks the recovered state. Percona Distribution for PostgreSQL does not provide a native Windows package. Windows is only the Docker Desktop host; PostgreSQL and its utilities run in Linux containers.</p>
<p>The current Percona 17 Docker documentation uses <code>percona/percona-distribution-postgresql:17.11</code>, requires <code>POSTGRES_PASSWORD</code>, and exposes PostgreSQL on container port 5432. Docker Desktop is the recommended way to obtain Docker Engine, the CLI, and Compose on Windows. <a href="https://docs.percona.com/postgresql/17/docker.html" target="_blank" rel="noopener noreferrer">Percona Docker guide</a> · <a href="https://docs.docker.com/compose/install/" target="_blank" rel="noopener noreferrer">Docker Compose installation</a></p>
<h2>1. Create the Compose project</h2>
<p>Start Docker Desktop, open PowerShell, and make a uniquely named lab directory. The timestamp gives Compose a new project name, so an old named volume cannot silently turn a rerun into a test of stale data.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">powershell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl"><span class="nv">$ErrorActionPreference</span> <span class="p">=</span> <span class="s2">"Stop"</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">docker</span> <span class="n">version</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(</span><span class="nv">$LASTEXITCODE</span> <span class="o">-ne</span> <span class="mf">0</span><span class="p">)</span> <span class="p">{</span> <span class="k">throw</span> <span class="s2">"Docker Engine is unavailable."</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">docker</span> <span class="n">compose</span> <span class="n">version</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(</span><span class="nv">$LASTEXITCODE</span> <span class="o">-ne</span> <span class="mf">0</span><span class="p">)</span> <span class="p">{</span> <span class="k">throw</span> <span class="s2">"Docker Compose is unavailable."</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nv">$lab</span> <span class="p">=</span> <span class="s2">"percona-restore-lab-{0}"</span> <span class="o">-f</span> <span class="p">(</span><span class="nb">Get-Date</span> <span class="n">-Format</span> <span class="s2">"yyyyMMdd-HHmmss"</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="nb">New-Item</span> <span class="n">-ItemType</span> <span class="n">Directory</span> <span class="n">-Path</span> <span class="nv">$lab</span> <span class="p">|</span> <span class="nb">Out-Null</span>
</span></span><span class="line"><span class="cl"><span class="nb">Set-Location</span> <span class="nv">$lab</span>
</span></span><span class="line"><span class="cl"><span class="nb">New-Item</span> <span class="n">-ItemType</span> <span class="n">Directory</span> <span class="n">-Path</span> <span class="n">backups</span> <span class="p">|</span> <span class="nb">Out-Null</span></span></span></code></pre>
</div>
</div>
</div>
<p>Save this as <code>compose.yaml</code>. Separate named volumes prevent the recovery target from sharing source data; the archive will be copied through the Windows filesystem.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">yaml</span><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">services</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">source</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l">percona/percona-distribution-postgresql:17.11</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">environment</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">POSTGRES_USER</span><span class="p">:</span><span class="w"> </span><span class="l">drill</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">POSTGRES_PASSWORD</span><span class="p">:</span><span class="w"> </span><span class="l">lab-only-change-me</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">POSTGRES_DB</span><span class="p">:</span><span class="w"> </span><span class="l">drill</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">ports</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="s2">"127.0.0.1:55432:5432"</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">volumes</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">source-data:/data/db</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">healthcheck</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">test</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"CMD-SHELL"</span><span class="p">,</span><span class="w"> </span><span class="s2">"pg_isready -q -U $${POSTGRES_USER} -d $${POSTGRES_DB}"</span><span class="p">]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">interval</span><span class="p">:</span><span class="w"> </span><span class="l">5s</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">timeout</span><span class="p">:</span><span class="w"> </span><span class="l">5s</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">retries</span><span class="p">:</span><span class="w"> </span><span class="m">12</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">start_period</span><span class="p">:</span><span class="w"> </span><span class="l">10s</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">target</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l">percona/percona-distribution-postgresql:17.11</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">environment</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">POSTGRES_USER</span><span class="p">:</span><span class="w"> </span><span class="l">drill</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">POSTGRES_PASSWORD</span><span class="p">:</span><span class="w"> </span><span class="l">lab-only-change-me</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">POSTGRES_DB</span><span class="p">:</span><span class="w"> </span><span class="l">restore_drill</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">ports</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="s2">"127.0.0.1:55433:5432"</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">volumes</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">target-data:/data/db</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">healthcheck</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">test</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"CMD-SHELL"</span><span class="p">,</span><span class="w"> </span><span class="s2">"pg_isready -q -U $${POSTGRES_USER} -d $${POSTGRES_DB}"</span><span class="p">]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">interval</span><span class="p">:</span><span class="w"> </span><span class="l">5s</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">timeout</span><span class="p">:</span><span class="w"> </span><span class="l">5s</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">retries</span><span class="p">:</span><span class="w"> </span><span class="m">12</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">start_period</span><span class="p">:</span><span class="w"> </span><span class="l">10s</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">volumes</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">source-data</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="l">target-data:</span></span></span></code></pre>
</div>
</div>
</div>
<p>This password is disposable; use proper secret handling outside a lab. Percona’s v17 Dockerfile sets <code>/data/db</code> as <code>PGDATA</code>. Compose does not otherwise equate “running” with “ready,” so health checks matter. <a href="https://github.com/percona/percona-docker/blob/main/percona-distribution-postgresql-17/Dockerfile" target="_blank" rel="noopener noreferrer">Percona v17 Dockerfile</a> · <a href="https://docs.docker.com/compose/how-tos/startup-order/" target="_blank" rel="noopener noreferrer">Docker startup-order guidance</a></p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">powershell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-2" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl"><span class="n">docker</span> <span class="n">compose</span> <span class="n">config</span> <span class="p">-</span><span class="n">-quiet</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(</span><span class="nv">$LASTEXITCODE</span> <span class="o">-ne</span> <span class="mf">0</span><span class="p">)</span> <span class="p">{</span> <span class="k">throw</span> <span class="s2">"Compose validation failed."</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">docker</span> <span class="n">compose</span> <span class="n">pull</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(</span><span class="nv">$LASTEXITCODE</span> <span class="o">-ne</span> <span class="mf">0</span><span class="p">)</span> <span class="p">{</span> <span class="k">throw</span> <span class="s2">"Image pull failed."</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">docker</span> <span class="n">compose</span> <span class="n">up</span> <span class="n">-d</span> <span class="p">-</span><span class="n">-wait</span> <span class="p">-</span><span class="n">-wait-timeout</span> <span class="mf">60</span> <span class="n">source</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(</span><span class="nv">$LASTEXITCODE</span> <span class="o">-ne</span> <span class="mf">0</span><span class="p">)</span> <span class="p">{</span> <span class="k">throw</span> <span class="s2">"Source failed to become healthy."</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nv">$serverVersion</span> <span class="p">=</span> <span class="n">docker</span> <span class="n">compose</span> <span class="n">exec</span> <span class="n">-T</span> <span class="n">source</span> <span class="n">psql</span> <span class="n">-U</span> <span class="n">drill</span> <span class="n">-d</span> <span class="n">drill</span> <span class="n">-Atc</span> <span class="s2">"SELECT version();"</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(</span><span class="nv">$LASTEXITCODE</span> <span class="o">-ne</span> <span class="mf">0</span><span class="p">)</span> <span class="p">{</span> <span class="k">throw</span> <span class="s2">"Version query failed."</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="nv">$serverVersion</span></span></span></code></pre>
</div>
</div>
</div>
<p>Record the actual version string. Do not infer it from the tag alone.</p>
<h2>2. Seed known data and prove the baseline</h2>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">powershell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-3" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl"><span class="sh">@'
</span></span></span><span class="line"><span class="cl"><span class="sh">CREATE TABLE orders (
</span></span></span><span class="line"><span class="cl"><span class="sh"> id integer GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
</span></span></span><span class="line"><span class="cl"><span class="sh"> customer text NOT NULL,
</span></span></span><span class="line"><span class="cl"><span class="sh"> amount numeric(10,2) NOT NULL CHECK (amount &gt;= 0)
</span></span></span><span class="line"><span class="cl"><span class="sh">);
</span></span></span><span class="line"><span class="cl"><span class="sh">INSERT INTO orders (customer, amount)
</span></span></span><span class="line"><span class="cl"><span class="sh">VALUES ('Ada', 10.25), ('Grace', 20.00), ('Linus', 30.00);
</span></span></span><span class="line"><span class="cl"><span class="sh">'@</span> <span class="p">|</span> <span class="n">docker</span> <span class="n">compose</span> <span class="n">exec</span> <span class="n">-T</span> <span class="n">source</span> <span class="n">psql</span> <span class="n">-U</span> <span class="n">drill</span> <span class="n">-d</span> <span class="n">drill</span> <span class="n">-v</span> <span class="n">ON_ERROR_STOP</span><span class="p">=</span><span class="mf">1</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(</span><span class="nv">$LASTEXITCODE</span> <span class="o">-ne</span> <span class="mf">0</span><span class="p">)</span> <span class="p">{</span> <span class="k">throw</span> <span class="s2">"Seed step failed."</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nv">$baseline</span> <span class="p">=</span> <span class="n">docker</span> <span class="n">compose</span> <span class="n">exec</span> <span class="n">-T</span> <span class="n">source</span> <span class="n">psql</span> <span class="n">-U</span> <span class="n">drill</span> <span class="n">-d</span> <span class="n">drill</span> <span class="n">-Atc</span> <span class="s2">"SELECT count(*) || '|' || sum(amount) FROM orders;"</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(</span><span class="nv">$LASTEXITCODE</span> <span class="o">-ne</span> <span class="mf">0</span> <span class="o">-or</span> <span class="nv">$baseline</span><span class="p">.</span><span class="py">Trim</span><span class="p">()</span> <span class="o">-ne</span> <span class="s2">"3|60.25"</span><span class="p">)</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="k">throw</span> <span class="s2">"Baseline check failed: </span><span class="nv">$baseline</span><span class="s2">"</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre>
</div>
</div>
</div>
<p><strong>Pass:</strong> the command returns <code>3|60.25</code>. Anything else is a stop condition.</p>
<h2>3. Create and export the archive</h2>
<p><code>pg_dump -Fc</code> creates a custom-format archive for <code>pg_restore</code>; PostgreSQL describes this format as flexible and compressed by default. Write it inside the Linux container, inspect its table of contents, and copy it to Windows:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">powershell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-4" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl"><span class="n">docker</span> <span class="n">compose</span> <span class="n">exec</span> <span class="n">-T</span> <span class="n">source</span> <span class="n">pg_dump</span> <span class="n">-U</span> <span class="n">drill</span> <span class="n">-d</span> <span class="n">drill</span> <span class="n">-Fc</span> <span class="o">-f</span> <span class="p">/</span><span class="n">tmp</span><span class="p">/</span><span class="n">drill</span><span class="p">.</span><span class="py">dump</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(</span><span class="nv">$LASTEXITCODE</span> <span class="o">-ne</span> <span class="mf">0</span><span class="p">)</span> <span class="p">{</span> <span class="k">throw</span> <span class="s2">"pg_dump failed."</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">docker</span> <span class="n">compose</span> <span class="n">exec</span> <span class="n">-T</span> <span class="n">source</span> <span class="n">pg_restore</span> <span class="p">-</span><span class="n">-list</span> <span class="p">/</span><span class="n">tmp</span><span class="p">/</span><span class="n">drill</span><span class="p">.</span><span class="py">dump</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(</span><span class="nv">$LASTEXITCODE</span> <span class="o">-ne</span> <span class="mf">0</span><span class="p">)</span> <span class="p">{</span> <span class="k">throw</span> <span class="s2">"Archive inspection failed."</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">docker</span> <span class="n">compose</span> <span class="nb">cp </span><span class="n">source</span><span class="err">:</span><span class="p">/</span><span class="n">tmp</span><span class="p">/</span><span class="n">drill</span><span class="p">.</span><span class="py">dump</span> <span class="p">.</span><span class="n">backups</span><span class="p"></span><span class="n">drill</span><span class="p">.</span><span class="py">dump</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(</span><span class="nv">$LASTEXITCODE</span> <span class="o">-ne</span> <span class="mf">0</span><span class="p">)</span> <span class="p">{</span> <span class="k">throw</span> <span class="s2">"Archive export failed."</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nv">$backup</span> <span class="p">=</span> <span class="nb">Get-Item</span> <span class="p">.</span><span class="n">backups</span><span class="p"></span><span class="n">drill</span><span class="p">.</span><span class="py">dump</span> <span class="n">-ErrorAction</span> <span class="n">Stop</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(</span><span class="nv">$backup</span><span class="p">.</span><span class="py">Length</span> <span class="o">-le</span> <span class="mf">0</span><span class="p">)</span> <span class="p">{</span> <span class="k">throw</span> <span class="s2">"Backup file is empty."</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="nv">$backup</span> <span class="p">|</span> <span class="nb">Select-Object</span> <span class="n">FullName</span><span class="p">,</span> <span class="n">Length</span><span class="p">,</span> <span class="n">LastWriteTime</span>
</span></span><span class="line"><span class="cl"><span class="nb">Get-FileHash</span> <span class="p">.</span><span class="n">backups</span><span class="p"></span><span class="n">drill</span><span class="p">.</span><span class="py">dump</span> <span class="n">-Algorithm</span> <span class="n">SHA256</span></span></span></code></pre>
</div>
</div>
</div>
<p>Copying avoids routing a binary archive through PowerShell’s output pipeline. <code>docker compose cp</code> transfers files between a service container and the local filesystem. The hash identifies this particular file; it is not a universal expected value. Two clean image-side validation runs each produced a 2,360-byte archive but different SHA-256 hashes because the archives contain run-specific metadata. Record the hash so the same file can be checked after another transfer. <a href="https://www.postgresql.org/docs/17/app-pgdump.html" target="_blank" rel="noopener noreferrer">PostgreSQL <code>pg_dump</code></a> · <a href="https://docs.docker.com/reference/cli/docker/compose/cp/" target="_blank" rel="noopener noreferrer">Docker Compose <code>cp</code></a></p>
<h2>4. Inject failure, then recover</h2>
<p>This is the destructive step. Confirm that the current timestamped lab directory is disposable before continuing.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">powershell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-5" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl"><span class="n">docker</span> <span class="n">compose</span> <span class="n">exec</span> <span class="n">-T</span> <span class="n">source</span> <span class="n">psql</span> <span class="n">-U</span> <span class="n">drill</span> <span class="n">-d</span> <span class="n">postgres</span> <span class="n">-v</span> <span class="n">ON_ERROR_STOP</span><span class="p">=</span><span class="mf">1</span> <span class="n">-c</span> <span class="s2">"DROP DATABASE drill;"</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(</span><span class="nv">$LASTEXITCODE</span> <span class="o">-ne</span> <span class="mf">0</span><span class="p">)</span> <span class="p">{</span> <span class="k">throw</span> <span class="s2">"Failure injection command failed."</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Windows PowerShell 5.1 treats redirected native stderr as an error record.</span>
</span></span><span class="line"><span class="cl"><span class="c"># This one command is expected to fail; capture it, then restore strict handling.</span>
</span></span><span class="line"><span class="cl"><span class="nv">$previousErrorActionPreference</span> <span class="p">=</span> <span class="nv">$ErrorActionPreference</span>
</span></span><span class="line"><span class="cl"><span class="k">try</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nv">$ErrorActionPreference</span> <span class="p">=</span> <span class="s2">"Continue"</span>
</span></span><span class="line"><span class="cl"> <span class="nv">$missingDb</span> <span class="p">=</span> <span class="n">docker</span> <span class="n">compose</span> <span class="n">exec</span> <span class="n">-T</span> <span class="n">source</span> <span class="n">psql</span> <span class="n">-U</span> <span class="n">drill</span> <span class="n">-d</span> <span class="n">drill</span> <span class="n">-c</span> <span class="s2">"SELECT 1;"</span> <span class="mf">2</span><span class="p">&gt;&amp;</span><span class="mf">1</span> <span class="p">|</span> <span class="nb">Out-String</span>
</span></span><span class="line"><span class="cl"> <span class="nv">$missingDbExit</span> <span class="p">=</span> <span class="nv">$LASTEXITCODE</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span> <span class="k">finally</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nv">$ErrorActionPreference</span> <span class="p">=</span> <span class="nv">$previousErrorActionPreference</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="nv">$missingDb</span><span class="p">.</span><span class="py">Trim</span><span class="p">()</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(</span><span class="nv">$missingDbExit</span> <span class="o">-eq</span> <span class="mf">0</span> <span class="o">-or</span> <span class="nv">$missingDb</span> <span class="o">-notmatch</span> <span class="s1">'databases+"drill"s+doess+nots+exist'</span><span class="p">)</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="k">throw</span> <span class="s2">"Unexpected failure probe result: </span><span class="nv">$missingDb</span><span class="s2">"</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">docker</span> <span class="n">compose</span> <span class="n">stop</span> <span class="n">source</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(</span><span class="nv">$LASTEXITCODE</span> <span class="o">-ne</span> <span class="mf">0</span><span class="p">)</span> <span class="p">{</span> <span class="k">throw</span> <span class="s2">"Could not stop the failed source."</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">docker</span> <span class="n">compose</span> <span class="n">up</span> <span class="n">-d</span> <span class="p">-</span><span class="n">-wait</span> <span class="p">-</span><span class="n">-wait-timeout</span> <span class="mf">60</span> <span class="n">target</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(</span><span class="nv">$LASTEXITCODE</span> <span class="o">-ne</span> <span class="mf">0</span><span class="p">)</span> <span class="p">{</span> <span class="k">throw</span> <span class="s2">"Target failed to become healthy."</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">docker</span> <span class="n">compose</span> <span class="nb">cp </span><span class="p">.</span><span class="n">backups</span><span class="p"></span><span class="n">drill</span><span class="p">.</span><span class="py">dump</span> <span class="n">target</span><span class="err">:</span><span class="p">/</span><span class="n">tmp</span><span class="p">/</span><span class="n">drill</span><span class="p">.</span><span class="py">dump</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(</span><span class="nv">$LASTEXITCODE</span> <span class="o">-ne</span> <span class="mf">0</span><span class="p">)</span> <span class="p">{</span> <span class="k">throw</span> <span class="s2">"Archive import failed."</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">docker</span> <span class="n">compose</span> <span class="n">exec</span> <span class="n">-T</span> <span class="n">target</span> <span class="n">pg_restore</span> <span class="n">-U</span> <span class="n">drill</span> <span class="p">-</span><span class="n">-dbname</span><span class="p">=</span><span class="n">restore_drill</span> <span class="p">-</span><span class="n">-clean</span> <span class="p">-</span><span class="n">-if-exists</span> <span class="p">-</span><span class="n">-single-transaction</span> <span class="p">/</span><span class="n">tmp</span><span class="p">/</span><span class="n">drill</span><span class="p">.</span><span class="py">dump</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(</span><span class="nv">$LASTEXITCODE</span> <span class="o">-ne</span> <span class="mf">0</span><span class="p">)</span> <span class="p">{</span> <span class="k">throw</span> <span class="s2">"Restore failed."</span> <span class="p">}</span></span></span></code></pre>
</div>
</div>
</div>
<p><strong>Failure check passes</strong> only when the post-drop connection fails specifically because <code>drill</code> does not exist. The regular expression tolerates whitespace because Windows PowerShell 5.1 can wrap native error text across lines. Stopping the now-unhealthy source keeps it out of the target’s readiness check. The target has a deliberately different database name, so the restore omits <code>--create</code> and loads directly into <code>restore_drill</code>. <code>--clean --if-exists</code> makes replacement explicit without missing-object noise. For this small lab, <code>--single-transaction</code> makes the restore all-or-nothing and implies exit-on-error. <a href="https://www.postgresql.org/docs/17/app-pgrestore.html" target="_blank" rel="noopener noreferrer">PostgreSQL <code>pg_restore</code></a></p>
<h2>5. Verify the recovered state</h2>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">powershell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-6" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl"><span class="nv">$verifySql</span> <span class="p">=</span> <span class="sh">@'
</span></span></span><span class="line"><span class="cl"><span class="sh">SELECT concat_ws('|',
</span></span></span><span class="line"><span class="cl"><span class="sh"> (SELECT string_agg(id::text || ':' || customer || ':' || amount::text, ',' ORDER BY id) FROM orders),
</span></span></span><span class="line"><span class="cl"><span class="sh"> (SELECT count(*) FROM pg_constraint WHERE conrelid = 'public.orders'::regclass),
</span></span></span><span class="line"><span class="cl"><span class="sh"> (SELECT is_identity FROM information_schema.columns
</span></span></span><span class="line"><span class="cl"><span class="sh"> WHERE table_schema = 'public' AND table_name = 'orders' AND column_name = 'id'),
</span></span></span><span class="line"><span class="cl"><span class="sh"> (SELECT last_value || ':' || is_called FROM public.orders_id_seq)
</span></span></span><span class="line"><span class="cl"><span class="sh">);
</span></span></span><span class="line"><span class="cl"><span class="sh">'@</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nv">$restored</span> <span class="p">=</span> <span class="nv">$verifySql</span> <span class="p">|</span> <span class="n">docker</span> <span class="n">compose</span> <span class="n">exec</span> <span class="n">-T</span> <span class="n">target</span> <span class="n">psql</span> <span class="n">-U</span> <span class="n">drill</span> <span class="n">-d</span> <span class="n">restore_drill</span> <span class="n">-At</span> <span class="n">-v</span> <span class="n">ON_ERROR_STOP</span><span class="p">=</span><span class="mf">1</span>
</span></span><span class="line"><span class="cl"><span class="nv">$expected</span> <span class="p">=</span> <span class="s2">"1:Ada:10.25,2:Grace:20.00,3:Linus:30.00|2|YES|3:true"</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(</span><span class="nv">$LASTEXITCODE</span> <span class="o">-ne</span> <span class="mf">0</span> <span class="o">-or</span> <span class="nv">$restored</span><span class="p">.</span><span class="py">Trim</span><span class="p">()</span> <span class="o">-ne</span> <span class="nv">$expected</span><span class="p">)</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="k">throw</span> <span class="s2">"Restore verification failed: </span><span class="nv">$restored</span><span class="s2">"</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="s2">"PASS: rows, constraints, identity definition, and sequence state recovered."</span></span></span></code></pre>
</div>
</div>
</div>
<p>The drill passes only if readiness succeeds, the baseline matches, the archive is nonempty and parseable, the expected missing-database error is observed, <code>pg_restore</code> exits zero, and the final row, constraint, identity, and sequence signature matches exactly.</p>
<h2>When a check fails</h2>
<p>Treat a thrown error as evidence, not an invitation to skip ahead. If the source never becomes healthy, run <code>docker compose ps</code> and <code>docker compose logs --no-color source</code>; initialization and permission errors normally appear there. A “port is already allocated” error concerns the host side of 55432 or 55433, not container port 5432. If <code>pg_restore --list</code> fails, discard the archive and create a new one rather than attempting a hopeful restore.</p>
<p>Ownership errors usually mean that source and target roles differ. This lab intentionally creates the <code>drill</code> superuser in both containers, avoiding that variable; a production restore needs an explicit role and privilege plan. A final signature mismatch is also a failed restore even when <code>pg_restore</code> returned zero. Preserve the logs and archive, identify the difference, fix the procedure, and repeat from a new timestamped project. Do not label the backup usable until every check passes.</p>
<h2>PowerShell and Docker Desktop gotchas</h2>
<ul>
<li>Use <code>docker compose</code>, not the legacy <code>docker-compose</code> executable.</li>
<li>Run from the directory containing <code>compose.yaml</code>. Keep Windows paths such as <code>.backups</code> separate from container paths such as <code>/tmp</code>.</li>
<li>Keep <code>$LASTEXITCODE</code> checks immediately after native commands. <code>-T</code> disables pseudo-TTY allocation for noninteractive execution.</li>
<li>Avoid PowerShell backtick line continuations: an invisible trailing space can break them.</li>
<li>If host port 55432 or 55433 is occupied, change only the left side of that mapping. The container port remains 5432.</li>
<li><code>docker compose down</code> preserves named volumes. For this lab only, <code>docker compose down -v</code> deletes both disposable data volumes; never apply <code>-v</code> casually elsewhere. <a href="https://docs.docker.com/reference/cli/docker/compose/down/" target="_blank" rel="noopener noreferrer">Docker Compose <code>down</code></a></li>
</ul>
<h2>What this drill does not prove</h2>
<p>This is a logical, single-database restore—not physical backup, point-in-time recovery, replication, failover, or a performance test. <code>pg_dump</code> does not capture cluster-wide roles and tablespaces; PostgreSQL directs those cases to <code>pg_dumpall</code>. A backup kept on the same laptop is not disaster-resilient. The lab also does not exercise application reconnects, large datasets, extensions, encryption, or remote object storage. Restore only archives from trusted sources: PostgreSQL warns that restoring can execute code chosen by source superusers. <a href="https://www.postgresql.org/docs/17/app-pgdump.html" target="_blank" rel="noopener noreferrer">PostgreSQL <code>pg_dump</code> limitations and warning</a></p>
<h2>Validation scope</h2>
<p>On September 5, 2026, this workflow completed one clean, AI-assisted automated run on the author’s Windows 11 Pro 25H2 laptop (build 26200.9168), using Docker Desktop 4.89.0, Docker Engine 29.7.2, Compose 5.5.0, and Windows PowerShell 5.1.26100.9168. The run used a fresh Compose project and separate new source and target data volumes. Linux amd64 containers from <code>percona/percona-distribution-postgresql:17.11</code> reported PostgreSQL 17.11 — Percona Server for PostgreSQL 17.11.1.</p>
<p>Plain <code>docker compose pull</code> succeeded. Both services became healthy within the article’s 60-second timeout. The source returned the <code>3|60.25</code> baseline, and <code>pg_restore --list</code> parsed the exported 2,360-byte archive. Both <code>docker compose cp</code> transfers passed through the Windows filesystem. The Windows archive and imported target copy had the same SHA-256: <code>bb521cadcca1547c39d3d3a161a65228300a68f0905badf09b79011236c5311d</code>.</p>
<p>After the source database was dropped, its connection probe returned exit 2 with the expected missing-database error. The source was stopped, <code>pg_restore</code> into the clean target exited zero, and the recovered signature matched exactly: <code>1:Ada:10.25,2:Grace:20.00,3:Linus:30.00|2|YES|3:true</code>.</p>
<p>Execution used a PowerShell evidence wrapper around the article’s Compose layout and database commands, adding explicit project scoping, container ownership checks, command-output capture, and the imported-archive hash comparison. The expected-error probe was corrected for Windows PowerShell 5.1: temporary <code>Continue</code> handling preserves the native error and exit code, and a whitespace-tolerant pattern accepts line-wrapped error text. The saved transcript, command outputs, status record, and backup support these results. This was automated execution on the author’s Windows laptop; no manual command-by-command execution is claimed.</p>
<h2>AI-assistance disclosure</h2>
<p>AI assistance was used to structure this lab, cross-check commands against official documentation, edit the prose, and prepare and execute the automated PowerShell validation on the author’s Windows laptop. The author remains responsible for reviewing the evidence, correcting the article, and approving it for publication.</p>
<p><em>This post is part of the <a href="https://percona.community/blog/write-for-percona-community/">Percona Community Writers Program</a>.</em></p>
<p><a href="https://percona.community/blog/2026/09/14/percona-postgresql-restore-drill-on-windows/">Prove the Backup: A Percona Distribution for PostgreSQL Restore Drill on Windows</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Percona releases Galera Cluster Version 9.7</title>
        <link>https://www.fromdual.com/blog/percona/percona-xtradb-galera-cluster-9-7-released/</link>
        <pubDate>Mon, 14 Sep 2026 09:33:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/percona-releases-galera-cluster-version-9-7/</guid>
        <source url="https://www.fromdual.com/aggregator/categories/9/">FromDual: FromDual all (en)</source>
        <description><![CDATA[<p>Finally, some good news again!<br />
What has happened so far<br />
After MariaDB Corp. acquired Codership OY—and with it, Galera Cluster for MySQL—in May 2025 [ 1 ], then announced the discontinuation of support for Galera Cluster for MySQL 8.4 at the end of September 2026 [ 2 ], and subsequently stated that it would no longer support Galera Cluster (for MariaDB!) in the Community Edition [ 3 ], there was a loud outcry from the community. MariaDB Corp. then made a partial retreat (“We’ve thoroughly considered your feedback and decided that now is not the time for a major change,”). A clear commitment to continued support for Galera Cluster in the Community Edition sounds different.<br />
Shortly thereafter, the MariaDB Foundation announced that it did not intend to fork Galera Cluster (“Thus the Foundation does not see a need for forking Galera and does not support or encourage such action.”) [ 4 ].<br />
So, until Friday (2026-09-10), the future of Galera Cluster for MySQL was very uncertain!<br />
Percona’s announcement yesterday<br />
But fortunately, there’s still Percona with its Percona XtraDB Cluster (PXC), which is an improved branch/fork of both MySQL and Galera Cluster.<br />
And Percona finally announced the release of Percona XtraDB Cluster 9.7 on Friday (September 10, 2026) [ 5 ]. For us, this was the long-awaited and hoped-for signal from Percona!<br />
It would be nice if Percona could provide a clearer statement regarding Galera Cluster so that we can better plan for it in terms of timing…<br />
Installation<br />
Of course, we couldn’t resist and immediately downloaded the latest release [ 6 ] and set up a Percona XtraDB test cluster.<br />
Due to our standard Galera installation process, we had to make a few adjustments here and there to ensure that the Percona XtraDB Cluster ran smoothly.<br />
We’ve described the details here: Migration from MySQL Galera Cluster 8.4 to Percona XtraDB Cluster 9.7<br />
Further tests will follow in the coming days and weeks…<br />
Now would actually be a good time for commercially oriented Galera Cluster users to sponsor Percona…? For a vibrant and healthy MySQL open-source ecosystem: The Future of the MySQL Ecosystem.<br />
Sources</p>
<p>Percona XtraDB Cluster 9.7 Documentation</p>
<p>This page was translated using deepl.com.</p>
<p><a href="https://www.fromdual.com/blog/percona/percona-xtradb-galera-cluster-9-7-released/">Percona releases Galera Cluster Version 9.7</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Finally, some good news again!</p>
<h2>What has happened so far</h2>
<p>After MariaDB Corp. acquired Codership OY—and with it, Galera Cluster for MySQL—in May 2025 [ <a href="https://www.infoworld.com/article/3999634/mariadbs-acquisition-of-codership-why-enterprises-should-care.html" target="_blank" title="MariaDB’s acquisition of Codership: Why enterprises should care">1</a> ], then announced the discontinuation of support for Galera Cluster for MySQL 8.4 at the end of September 2026 [ <a href="https://www.theregister.com/databases/2026/07/30/mariadb-again-faces-questions-over-galeras-open-source-future/5280975" target="_blank" title="MariaDB again faces questions over Galera&apos;s open source future">2</a> ], and subsequently stated that it would no longer support Galera Cluster (for MariaDB!) in the Community Edition [ <a href="https://www.theregister.com/software/2026/03/09/mariadb-backs-down-on-galera-removal-after-community-outcry/5224684" target="_blank" title="MariaDB backs down on Galera removal after community outcry">3</a> ], there was a loud outcry from the community. MariaDB Corp. then made a partial retreat (“<em>We’ve thoroughly considered your feedback and decided that <strong>now is not the time</strong> for a major change</em>,”). A clear commitment to continued support for Galera Cluster in the Community Edition sounds different.</p>
<p>Shortly thereafter, the MariaDB Foundation announced that it did not intend to fork Galera Cluster (“<em>Thus the Foundation <strong>does not see a need for forking Galera</strong> and does not support or encourage such action.</em>”) [ <a href="https://mariadb.org/galera-continuity-and-responsibility-how-the-foundation-and-mariadb-plc-move-forward/" target="_blank" title="Galera, continuity, and responsibility: how the Foundation and MariaDB plc move forward">4</a> ].</p>
<p>So, until Friday (2026-09-10), the future of Galera Cluster for MySQL was very uncertain!</p>
<h2>Percona’s announcement yesterday</h2>
<p>But fortunately, there’s still Percona with its <a href="https://www.percona.com/resource/percona-xtradb-cluster/" target="_blank">Percona XtraDB Cluster (PXC)</a>, which is an improved branch/fork of both MySQL and Galera Cluster.</p>
<p>And Percona finally announced the release of Percona XtraDB Cluster 9.7 on Friday (September 10, 2026) [ <a href="https://docs.percona.com/new/2026/09/10/percona-xtradb-cluster-971-1-has-been-released/" target="_blank" title="Percona XtraDB Cluster 9.7.1-1 has been released">5</a> ]. For us, this was the long-awaited and hoped-for signal from Percona!</p>
<p>It would be nice if Percona could provide a clearer statement regarding Galera Cluster so that we can better plan for it in terms of timing…</p>
<h2>Installation</h2>
<p>Of course, we couldn’t resist and immediately downloaded the latest release [ <a href="https://www.percona.com/downloads/" target="_blank" title="Percona Download">6</a> ] and set up a Percona XtraDB test cluster.</p>
<p>Due to our standard Galera installation process, we had to make a few adjustments here and there to ensure that the Percona XtraDB Cluster ran smoothly.</p>
<p>We’ve described the details here: <a href="https://www.fromdual.com/blog/mysql-mariadb-migration/#migration-from-mysql-galera-cluster-84-to-percona-xtradb-cluster-97">Migration from MySQL Galera Cluster 8.4 to Percona XtraDB Cluster 9.7</a></p>
<p>Further tests will follow in the coming days and weeks…</p>
<p>Now would actually be a good time for commercially oriented Galera Cluster users to sponsor Percona…? For a vibrant and healthy MySQL open-source ecosystem: <a href="https://oursqlfoundation.org/" target="_blank">The Future of the MySQL Ecosystem</a>.</p>
<h2>Sources</h2>
<ul>
<li><a href="https://docs.percona.com/percona-xtradb-cluster/9.7/" target="_blank">Percona XtraDB Cluster 9.7 Documentation</a></li>
</ul>
<p>This page was translated using <a href="https://www.deepl.com/en/translator" target="_blank">deepl.com</a>.</p>
<p><a href="https://www.fromdual.com/blog/percona/percona-xtradb-galera-cluster-9-7-released/">Percona releases Galera Cluster Version 9.7</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Optimising Multi-Range Queries with Logical Charts</title>
        <link>https://vettabase.com/optimising-multi-range-queries-with-logical-charts/</link>
        <pubDate>Mon, 14 Sep 2026 09:12:22 +0000</pubDate>
        <dc:creator>Federico Razzoli</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/optimising-multi-range-queries-with-logical-charts/</guid>
        <source url="https://vettabase.com/">Vettabase</source>
        <description><![CDATA[<p>Regular database indexes cannot be used for queries that contain conditions based on two or more ranges. But there are unconventional ways to solve this problem and make queries faster. In this post we’ll explore a conceptually simple way: logical charts. The Problem Suppose we need to find the customers in a certain age band who made a certain number of orders in the last 12 months. We have both these values in the same table, and we have an index covering both columns and nothing else. Do you expect the following query to use the index? Depending on which database you use, there are a few options: Why? A B-Tree index optimises queries because it’s an ordered data structure. But the order of values doesn’t help making a search on multiple ranges. For more information about what a B-Tree can do, see Query Optimisation: Using indexes for WHERE with multiple conditions. I call queries like this Double-Range Queries. A Solution: GIS Data Think of the data in the only way that feels natural for a human: a point chart where the axes represent the date of birth and the number of orders in the last year. The following image, […]</p>
<p><a href="https://vettabase.com/optimising-multi-range-queries-with-logical-charts/">Optimising Multi-Range Queries with Logical Charts</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p class="wp-block-paragraph">Regular database indexes cannot be used for queries that contain conditions based on two or more ranges. But there are unconventional ways to solve this problem and make queries faster. In this post we’ll explore a conceptually simple way: logical charts.</p>
<h2 class="wp-block-heading">The Problem</h2>
<p class="wp-block-paragraph">Suppose we need to find the customers in a certain age band who made a certain number of orders in the last 12 months. We have both these values in the same table, and we have an index covering both columns and nothing else. Do you expect the following query to use the index?</p>
<pre class="wp-block-code"><code>SELECT id, email
    FROM customer
    WHERE
        (date_of_birth BETWEEN DATE '1994-01-01' AND DATE '2004-01-01')
        AND (last_year_orders BETWEEN 5 AND 10)
;</code></pre>
<p class="wp-block-paragraph">Depending on which database you use, there are a few options:</p>
<ul class="wp-block-list">
<li>The index isn’t used at all.</li>
<li>The index is used for the first column stored in the index, but to read the second the database makes additional reads from the data. Depending on your data distribution, this is probably slower than a full table scan (which is usually slow, unless the table is very small).
<ul class="wp-block-list">
<li>If the first column in the index has lower selectivity than the second, the query execution will be even slower than it should be.</li>
</ul>
</li>
<li>The whole index is scanned. This is probably as slow as a full table scan, or slightly faster.</li>
</ul>
<p class="wp-block-paragraph">Why? A B-Tree index optimises queries because it’s an ordered data structure. But the order of values doesn’t help making a search on multiple ranges. For more information about what a B-Tree can do, see <a href="https://vettabase.com/query-optimisation-using-indexes-for-where-with-multiple-conditions/" data-type="post" data-id="360103">Query Optimisation: Using indexes for WHERE with multiple conditions</a>.</p>
<p class="wp-block-paragraph">I call queries like this <strong>Double-Range Queries</strong>.</p>
<h2 class="wp-block-heading">A Solution: GIS Data</h2>
<p class="wp-block-paragraph">Think of the data in the only way that feels natural for a human: a point chart where the axes represent the date of birth and the number of orders in the last year. The following image, created by Nano Banana 2, represents this way of visualising the data:</p>
<figure class="wp-block-image size-large"><img decoding="async" src="https://vettabase.com/wp-content/uploads/2026/08/2d_data_representation-1024x559.jpeg" alt="" class="wp-image-awgt_b14846fa1ba0"></figure>
<p class="wp-block-paragraph">Each point represents a customer, and therefore a point we need to select. Conceptually, to select the right points we only need to draw a rectangle on the chart:</p>
<figure class="wp-block-image size-large"><img decoding="async" src="https://vettabase.com/wp-content/uploads/2026/08/2d_data_and_query_representation-1024x559.jpeg" alt="" class="wp-image-awgt_b14846fa1ba0"></figure>
<p class="wp-block-paragraph">Now the concept should be clear, but we need to write the SQL. Let’s see the table definition, and then comment it:</p>
<pre class="wp-block-code"><code>CREATE TABLE customer (
    id INT AUTO_INCREMENT PRIMARY KEY,
    date_of_birth DATE NOT NULL,
    last_year_orders INT NOT NULL,
    -- ...probably more columns here...
    dob_orders_chart POINT GENERATED ALWAYS AS (
        POINT(TO_DAYS(date_of_birth), last_year_orders)
    ) STORED NOT NULL,
    SPATIAL INDEX sp_idx_dob_orders (dob_orders_chart)
) ENGINE=InnoDB;</code></pre>
<p class="wp-block-paragraph">Things to note in the above snippet:</p>
<ul class="wp-block-list">
<li>We added a column called <code>dob_orders_chart</code>.</li>
<li>The new column could have been of <code>GEOMETRY</code> type. That would work. But all the values we’re going to have are points, so we choose the more efficient <code>POINT</code> type instead.</li>
<li><code>dob_orders_chart</code> is a <em>generated column</em>. This means that when a row is inserted, or one of (<code>date_of_birth</code>, <code>last_year_orders</code>) is updated, a new value for <code>dob_orders_chart</code> is calculated automatically. Users cannot change these values manually.</li>
<li>While <code>last_year_orders</code> is an <code>INTEGER</code>, <code>date_of_birth</code> is a <code>DATE</code> and its raw values cannot be used as coordinates for GIS data. The problem is easy to solve: <code>TO_DAYS(date_of_birth)</code> returns an <code>INTEGER</code>, so it’s a valid coordinate. More specifically, <code><a href="https://mariadb.com/docs/server/reference/sql-functions/date-time-functions/to_days" rel="noopener">TO_DAYS()</a></code> returns the number of days passed from the beginning of the <a href="https://en.wikipedia.org/wiki/Gregorian_calendar" rel="noopener">Gregorian calendar</a> (Friday, 15 October 1582).</li>
<li>We index this column with a <code>SPATIAL INDEX</code>, which uses an <a href="https://en.wikipedia.org/wiki/R-tree" rel="noopener">R-Tree</a> data structure. An R-Tree index partitions a space in nested areas with boundaries that depend on data distribution.</li>
</ul>
<p class="wp-block-paragraph">Now let’s see the query that will find the desired data from the above table:</p>
<pre class="wp-block-code"><code>SELECT id
    FROM customer
    WHERE MBRWITHIN(
        dob_orders_chart,
        ST_GEOMFROMTEXT(
            CONCAT(
                'POLYGON((',
                    TO_DAYS('1994-01-01'), ' 5, ',
                    TO_DAYS('2004-01-01'), ' 5, ',
                    TO_DAYS('2004-01-01'), ' 10, ',
                    TO_DAYS('1994-01-01'), ' 10, ',
                    TO_DAYS('1994-01-01'), ' 5',
                '))'
            )
        )
    )
;</code></pre>
<p class="wp-block-paragraph">Things to note about the above query:</p>
<ul class="wp-block-list">
<li><code><a href="https://mariadb.com/docs/server/reference/sql-statements/geometry-constructors/mbr-minimum-bounding-rectangle/mbrwithin" rel="noopener">MBRWITHIN()</a></code> can often be described as an approximate function, because MBR stands for Minimum Bounding Rectangle. For example, if you use it with a circle, it will return all points that are contained in the smallest square that can contain the circle – not just the circle itself. But in our case it’s used with a rectangle that is aligned with the space axis, so this function will return precise results.</li>
<li><code><a href="https://mariadb.com/docs/server/reference/sql-statements/geometry-constructors/wkt/st_geomfromtext" rel="noopener">ST_GEOMFROMTEXT()</a></code> accepts a text representation of a geometric shape and its coordinates. To build this representation, we can use <code><a href="https://vettabase.com/how-to-compose-strings-in-mariadb/#CONCAT">CONCAT()</a></code>.</li>
<li>We have 5 coordinates, and that is intended. The last coordinate matches the first, and it’s there to close the shape.</li>
</ul>
<p class="wp-block-paragraph">To concatenate strings, we can also use <code><a href="https://vettabase.com/how-to-compose-strings-in-mariadb/#SFORMAT">SFORMAT()</a></code>:</p>
<pre class="wp-block-code"><code>ST_PolyFromText(
    SFORMAT(
        'POLYGON(({0} {1}, {2} {1}, {2} {3}, {0} {3}, {0} {1}))',
        TO_DAYS('1994-01-01'), 
        5,
        TO_DAYS('2004-01-01'), 
        10
    )
)</code></pre>
<p class="wp-block-paragraph">These syntaxes are equivalent. Just use the one that you and your team find easier to understand. For more details, see <a href="https://vettabase.com/how-to-compose-strings-in-mariadb/" data-type="post" data-id="267070">How to compose strings in MariaDB</a>.</p>
<h2 class="wp-block-heading">Multi-Dimensional Charts</h2>
<p class="wp-block-paragraph">Most databases, including MariaDB and MySQL, can’t deal with multi-dimensional geospatial data.</p>
<h3 class="wp-block-heading">Up to 4 Dimensions on PostgreSQL</h3>
<p class="wp-block-paragraph">PostgreSQL users are luckier here: PostGIS supports multi-dimensional data, and can include up to 4 dimensions in a GiST index, thanks to the idx_spatial_nd operator class. The syntax to use for creating such an index is the following:</p>
<pre class="wp-block-code"><code>CREATE INDEX idx_spatial_nd 
    ON customer_3d 
    USING GIST (geom gist_geometry_ops_nd)
;</code></pre>
<p class="wp-block-paragraph">PostGIS doesn’t require us to specify the list of columns to index.</p>
<div class="awgt-alert-content-wrap">
<fieldset class="awgt-alert-box awgt-lay-one">
<legend class="awgt-alert-icon"></legend>
<div class="awgt-alert-content">
<p>Note that the number of dimensions affects the performance of a GiST index.</p>
</div>
</fieldset>
</div>
<h3 class="wp-block-heading">More Than 3 Dimensions on Other Databases</h3>
<p class="wp-block-paragraph">If we have more than two range conditions and we use a database that limits spatial indexes to 2 dimensions (or doesn’t support GIS at all), we need to find an alternative solution.</p>
<p class="wp-block-paragraph">In several cases, you can come up with a math expression that turns the columns you need to search into a single score of type <code>INTEGER</code> or <code>FLOAT</code>. However, this is beyond the scope of this article. If you want me to cover this topic in a future article, leave a comment here.</p>
<h2 class="wp-block-heading">Conclusions</h2>
<p class="wp-block-paragraph">We’ve discussed the type of queries I call Double-Range queries and why they can’t make an optimal use of a B-Tree index. We’ve seen a solution that works well in most cases. Our example even covers the case when one of the ranges is a date. I have briefly mentioned which solutions exist for queries with more than two ranges – this might be a topic for a future article.</p>
<p class="wp-block-paragraph"><em>Federico Razzoli</em></p>
<p class="wp-block-paragraph">
<p><a href="https://vettabase.com/optimising-multi-range-queries-with-logical-charts/">Optimising Multi-Range Queries with Logical Charts</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>The Perfect Serve: What Tennis Taught Me About Reading PMM Like a Coach Instead of Guessing</title>
        <link>https://percona.community/blog/2026/09/10/the-perfect-serve/</link>
        <pubDate>Thu, 10 Sep 2026 12:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/the-perfect-serve-what-tennis-taught-me-about-reading-pmm-like-a-coach-instead-of-guessing/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>When I started learning tennis as an adult, I realized that what made tennis difficult was not learning the tennis strokes, instead it was learning to realize the value of the feedback loop: racket vibrations, tennis ball sounds, and the way my balance shifted before I even realized it. None of this information is obvious on the court. However, without it I would continue to make the same significant error, and be frustrated that “trying harder” doesn’t seem to aid.</p>
<p><a href="https://percona.community/blog/2026/09/10/the-perfect-serve/">The Perfect Serve: What Tennis Taught Me About Reading PMM Like a Coach Instead of Guessing</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>When I started learning tennis as an adult, I realized that what made tennis difficult was not learning the tennis strokes, instead it was learning to realize the value of the feedback loop: racket vibrations, tennis ball sounds, and the way my balance shifted before I even realized it. None of this information is obvious on the court. However, without it I would continue to make the same significant error, and be frustrated that “trying harder” doesn’t seem to aid.</p>
<p>A similar realization came to me a few months ago, although this time was pretty different. Think of Percona Monitoring and Management (PMM) as the tennis racket and Percona Server for MySQL 8.0 as the tennis court. The measured result was a 95.0% reduction in average query time, from 54.17 ms to 2.71 ms. The only thing that changed was my perspective, not the setup.</p>
<h2>The Setup</h2>
<p>Very basic setup. One Percona Server for MySQL 8.0 primary, two EC2 read replicas, and PMM 2.x running in a Docker container, with QAN through performance_schema. Nothing special. The symptom was also standard: an internal analytics service joined three tables (orders, order_items, and users) and polled the primary every few minutes for recent order activity. None of the tables were big.</p>
<p>The screenshots and measurements in this walkthrough come from a lab environment created to reproduce the query pattern, not from a production incident.</p>
<p>In the baseline window, the query ran at 0.16 QPS and averaged 54.17 ms. It also lined up closely with CPU spikes and occasional replica-lag warnings.</p>
<p>My “power play” instinct kicked in, and I thought about increasing the resources for the primary, or moving the analytic workload totally over to a replica. Both ideas had potential, but at the end of the day, they would just hide the problem. None of the ideas actually would have helped me understand what the problem was.</p>
<h2>Reading the Court: QAN Sorted by Load, Not Raw Query Time</h2>
<p>The first real change in my mindset came from how I was sorting Query Analytics. The usual way to do this is to look for the query with the maximum or mean query time, and sort the results that way.</p>
<p>For this reason, PMM’s QAN dashboard has a Load column. Load is the average number of simultaneous executions of a query. Instead of looking at how long a query takes when executed, a better way to look at this is how much of the server’s attention is this query consuming, on average, right now. When sorting by Load, the three-table join jumped to the top. An average execution time of 54.17 ms does not look problematic until you realize the query is executed multiple times a minute, over and over again, continuously throughout the day.</p>
<p>That’s the first lesson: If a query never stops running, a query that is “fast enough” can still be your biggest rival.</p>
<p><figure><img decoding="async" width="2506" height="918" src="https://percona.community/blog/2026/09/baseline_qan_hu_ac4be93c5ac16a26.webp" alt=" " loading="lazy"></figure>
</p>
<p><em>Figure 1: PMM Query Analytics showing the three-table join at the top of the workload, with an average query time of 54.17 ms before optimization.</em></p>
<h2>Film Review Before Stepping on the Court: EXPLAIN</h2>
<p>Once QAN pointed at the query, the next step was to observe EXPLAIN, as a coach would observe game film: review it before making any changes in production.</p>
<p>The query, in simplified form, looked like this:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SELECT</span><span class="w"> </span><span class="n">o</span><span class="p">.</span><span class="n">id</span><span class="p">,</span><span class="w"> </span><span class="n">o</span><span class="p">.</span><span class="n">created_at</span><span class="p">,</span><span class="w"> </span><span class="n">o</span><span class="p">.</span><span class="n">total_amount</span><span class="p">,</span><span class="w"> </span><span class="n">u</span><span class="p">.</span><span class="n">email</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="n">oi</span><span class="p">.</span><span class="n">product_id</span><span class="p">,</span><span class="w"> </span><span class="n">oi</span><span class="p">.</span><span class="n">quantity</span><span class="p">,</span><span class="w"> </span><span class="n">oi</span><span class="p">.</span><span class="n">price</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">FROM</span><span class="w"> </span><span class="n">orders</span><span class="w"> </span><span class="n">o</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">JOIN</span><span class="w"> </span><span class="n">order_items</span><span class="w"> </span><span class="n">oi</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="n">oi</span><span class="p">.</span><span class="n">order_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">o</span><span class="p">.</span><span class="n">id</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">JOIN</span><span class="w"> </span><span class="n">users</span><span class="w"> </span><span class="n">u</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="n">u</span><span class="p">.</span><span class="n">id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">o</span><span class="p">.</span><span class="n">user_id</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">WHERE</span><span class="w"> </span><span class="n">o</span><span class="p">.</span><span class="n">created_at</span><span class="w"> </span><span class="o">&gt;=</span><span class="w"> </span><span class="n">NOW</span><span class="p">()</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="nb">INTERVAL</span><span class="w"> </span><span class="mi">15</span><span class="w"> </span><span class="k">MINUTE</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">ORDER</span><span class="w"> </span><span class="k">BY</span><span class="w"> </span><span class="n">o</span><span class="p">.</span><span class="n">created_at</span><span class="w"> </span><span class="k">DESC</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>EXPLAIN confirmed this was a perfect example for a full table scan on orders (type: ALL). MySQL had to read every row to filter for the time window, then it used a nested loop to join order_items and users, which exacerbated the original issue.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">orders:
</span></span><span class="line"><span class="cl">type: ALL
</span></span><span class="line"><span class="cl">key: NULL
</span></span><span class="line"><span class="cl">rows: 199875
</span></span><span class="line"><span class="cl">Extra: Using where; Using filesort
</span></span><span class="line"><span class="cl">users:
</span></span><span class="line"><span class="cl">type: eq_ref
</span></span><span class="line"><span class="cl">key: PRIMARY
</span></span><span class="line"><span class="cl">order_items:
</span></span><span class="line"><span class="cl">type: ref
</span></span><span class="line"><span class="cl">key: idx_order_items_order_id</span></span></code></pre>
</div>
</div>
</div>
<p>Thanks to PMM’s rows examined to rows sent ratio, the query’s inefficiency actually showed itself where it could not in raw EXPLAIN output. The query would even return a reasonably sized and useful result. The issue was that the ratio of rows examined and rows sent to the client was totally lopsided. Each execution examined about 201,370 rows while returning 819 rows, or 245.87 rows examined for every row sent. This would not trigger any system alerts, but it showed that the database was doing SO much work for a trivial result. I’m calling this “invisible” inefficiency, and the more the query becomes used, the more detrimental it becomes.</p>
<p><figure><img decoding="async" width="2548" height="1334" src="https://percona.community/blog/2026/09/baseline_examined_hu_a5d12ec61d5a6df9.webp" alt=" " loading="lazy"></figure>
</p>
<p><em>Figure 2: Before optimization, each execution examined about 201,370 rows while returning 819 rows, or 245.87 rows examined for every row sent. PMM also recorded a full scan and no index used on every execution.</em></p>
<h2>The Fix: Small, Targeted Adjustments</h2>
<p>This was actually the best example of tennis in the real world for me. The tendency in this sort of query optimization is to swing harder (a bigger instance, more read replicas, etc.), but this was more like lightly changing the grip by a few grams.</p>
<p>Two index changes, one query change, and that was it.</p>
<p>A composite index on orders that matches the access pattern:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-2" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">CREATE</span><span class="w"> </span><span class="k">INDEX</span><span class="w"> </span><span class="n">idx_orders_created_at_id</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">ON</span><span class="w"> </span><span class="n">orders</span><span class="w"> </span><span class="p">(</span><span class="n">created_at</span><span class="p">,</span><span class="w"> </span><span class="n">id</span><span class="p">);</span></span></span></code></pre>
</div>
</div>
</div>
<p>The composite index on (created_at, id) allowed MySQL to use a range scan on the created_at predicate instead of scanning the entire orders table. In EXPLAIN, the orders access changed from type: ALL with roughly 199,875 rows estimated to type: range using idx_orders_created_at_id. The id column does not make this access covering, because the query still needs total_amount and user_id from the orders row.</p>
<p>A covering index on order_items:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-3" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">CREATE</span><span class="w"> </span><span class="k">INDEX</span><span class="w"> </span><span class="n">idx_order_items_covering</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">ON</span><span class="w"> </span><span class="n">order_items</span><span class="w"> </span><span class="p">(</span><span class="n">order_id</span><span class="p">,</span><span class="w"> </span><span class="n">product_id</span><span class="p">,</span><span class="w"> </span><span class="n">quantity</span><span class="p">,</span><span class="w"> </span><span class="n">price</span><span class="p">);</span></span></span></code></pre>
</div>
</div>
</div>
<p>The covering index on (order_id, product_id, quantity, price) allowed MySQL to satisfy the join and requested item columns from the index itself. EXPLAIN reported Using index.</p>
<p>The last change was to split the users lookup from the main join. The first query returned user_id, and a second query used WHERE id IN (…) to fetch the email addresses from users.</p>
<p>None of these improvements required any downtime, schema redesigns, or having to talk about sizing the instances. Each improvement was the kind of adjustment where it looked like, on its own, nothing particularly important was actually done.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-4" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">orders:
</span></span><span class="line"><span class="cl">type: range
</span></span><span class="line"><span class="cl">key: idx_orders_created_at_id
</span></span><span class="line"><span class="cl">rows: 40
</span></span><span class="line"><span class="cl">Extra: Using index condition; Backward index scan
</span></span><span class="line"><span class="cl">users:
</span></span><span class="line"><span class="cl">type: eq_ref
</span></span><span class="line"><span class="cl">key: PRIMARY
</span></span><span class="line"><span class="cl">order_items:
</span></span><span class="line"><span class="cl">type: ref
</span></span><span class="line"><span class="cl">key: idx_order_items_covering
</span></span><span class="line"><span class="cl">Extra: Using index</span></span></code></pre>
</div>
</div>
</div>
<h2>The Results</h2>
<p>The same normalized query remained at the top of the selected QAN workload after optimization, now running at 0.99 QPS and averaging 2.71 ms per execution.</p>
<p><figure><img decoding="async" width="2040" height="822" src="https://percona.community/blog/2026/09/optimised_qan_hu_ef292a84f6950e70.webp" alt=" " loading="lazy"></figure>
</p>
<p><em>Figure 3: The same normalized query after optimization, now averaging 2.71 ms per execution in the post-index sampling window.</em></p>
<p><figure><img decoding="async" width="2034" height="620" src="https://percona.community/blog/2026/09/optimised_metrics_hu_990c9680b2429206.webp" alt=" " loading="lazy"></figure>
</p>
<p><em>Figure 4: After the changes, average query time fell to 2.71 ms and rows examined dropped to about 1,460 per execution. The rows-examined-to-rows-sent ratio fell to 1.67, and executions used range access instead of a full scan.</em></p>
<p>Regarding the query, QAN indicated that average query time decreased from 54.17 ms to 2.71 ms, yielding a 95.0% reduction and making the query about 20 times faster. Rows examined per query fell from 201.37k to 1.46k, a 99.27% reduction, or about 138 times fewer rows examined. The ratio of rows examined to rows sent fell from 245.87 to 1.67, a 99.32% reduction. Full scan and no index used disappeared from the optimized sampling window, while Select Range reached 1.00 per query.</p>
<p>Improvements were the result of a number of incremental changes rather than a single large scale change. Composite indexing of orders and covering indexing of order_items helped rationalize the query to a considerable extent. Together, the changes rationalized the query and had an impact that would otherwise have been easy to chase with additional hardware.</p>
<h2>Shifting Your Mindset</h2>
<p>Beyond the specific indexes, the key point of this case study is how the investigation was framed at the outset.</p>
<p>QAN was sorted by Load. This let me identify the query that consumed the most attention from the primary. Unlike the query that had the most problematic single execution time.</p>
<p>Taking time to analyze EXPLAIN and the rows-examined-to-rows-sent ratio before implementing the fix let me focus on the cause of the problem. A full scan on orders. Instead of a symptom, which was a CPU spike with a concurrent lag on the replica.</p>
<p>By implementing two specific indexes and a small query rewrite, I ended up with measurable, attributable, and repeatable results. And if something was negatively impacted after the implementation of the fix, I would be able to identify which specific change caused the problem.</p>
<p>The engineer that looks as if they are moving the least in a tennis match, because they have already anticipated the next three shots, is the one doing the most invisible work, and that is exactly what this kind of production database work looks like from the outside.</p>
<p>PMM didn’t perform the optimization, but it made the invisible work just visible enough to act on the changes, and the rest was patience, and a willingness to implement incremental changes rather than larger changes.</p>
<h2>About the author</h2>
<p>Shivank Pandey is one of two engineers managing PMM at his company. He works with Percona Server for MySQL 8.0 in a primary-replica setup on EC2 and writes about database observability and query optimization.</p>
<p><em>This post is part of the <a href="https://percona.community/blog/write-for-percona-community/">Percona Community Writers Program</a>.</em></p>
<p><a href="https://percona.community/blog/2026/09/10/the-perfect-serve/">The Perfect Serve: What Tennis Taught Me About Reading PMM Like a Coach Instead of Guessing</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Enabling TLS in PXC without Downtime</title>
        <link>https://www.percona.com/blog/enabling-tls-in-pxc-without-downtime/</link>
        <pubDate>Wed, 09 Sep 2026 23:32:15 +0000</pubDate>
        <dc:creator>Juan Arruti</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/enabling-tls-in-pxc-without-downtime/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Starting with Percona XtraDB Cluster (PXC) 8.0, replication traffic encryption is enabled by default. That said, it’s common to find clusters running without TLS that suddenly need it: a new compliance requirement, an audit finding, a network segment that is no longer considered trusted. PXC has a variable for exactly that case, pxc-encrypt-cluster-traffic, which handles … Continued<br />
The post Enabling TLS in PXC without Downtime appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/enabling-tls-in-pxc-without-downtime/">Enabling TLS in PXC without Downtime</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><span>Starting with Percona XtraDB Cluster (PXC) 8.0, replication traffic encryption is enabled by default. That said, it’s common to find clusters running without TLS that suddenly need it: a new compliance requirement, an audit finding, a network segment that is no longer considered trusted. </span></p>
<p><span>PXC has a variable for exactly that case, pxc-encrypt-cluster-traffic, which handles SSL encryption for inter-node traffic, including State Snapshot Transfer (SST), Incremental State Transfer (IST), and the group communication the nodes use for replication.</span></p>
<p><span>The variable is not dynamic, and turning it on normally costs a full cluster restart since the node that encrypts traffic listens on ssl:// while its peers are still on tcp://. If a node joins the cluster with TLS enabled while remaining nodes don’t, the restarting node fails to reach out to the other peers with the following error:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">2026-09-02T02:16:02.359992Z 0 [Note] [MY-000000] [Galera] Failed to establish connection: wrong version number</pre>
<p><span>This is a common OpenSSL error seen when a client sends encrypted TLS traffic to a server that expects unencrypted plaintext.</span></p>
<p><span>Starting with PXC 8.0.28 and in all PXC 8.4 versions, there is a way to work around the full cluster restart, which relies on the Galera socket.dynamic option. In this post I’ll go through how this option works and how it can be used to enable TLS without downtime.</span></p>
<h3><span>The socket.dynamic Option</span></h3>
<p><span>This provider option lets a node establish communication with other peers using both encrypted and plaintext connections. The instance will initially open an encrypted connection, and if it fails since the other nodes are not using TLS, it will retry to establish an unencrypted connection.</span></p>
<p><span>The Joiner error log will show the following sequence:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">2026-09-02T02:16:43.321209Z 0 [Note] [MY-000000] [Galera] Failed to establish connection: wrong version number
2026-09-02T02:16:43.321521Z 0 [Note] [MY-000000] [Galera] (565f0a92-8283, 'tcp://0.0.0.0:4567') connection established to 1c72fb64-ac57 tcp://172.18.0.3:4567
2026-09-02T02:16:43.321566Z 0 [Note] [MY-000000] [Galera] (565f0a92-8283, 'tcp://0.0.0.0:4567') connection established to 2001e9dd-a09a tcp://172.18.0.4:4567</pre>
<p><span>The first line is the same error we saw previously: our node initiated a TLS handshake, but the peer responded with something that was not TLS. Without socket.dynamic, the node would stop at that point and never join, but with it, it retries (without encryption) and is able to establish a connection.</span></p>
<p><span>This Galera option can’t be changed at runtime, so you need to restart the node to enable it.</span></p>
<h3><span>The Procedure</span></h3>
<p><span>In this procedure, we consider a typical PXC architecture with 3 nodes. Enabling encryption requires two rolling restarts: the first turns TLS on while still allowing plaintext connections, and the second removes that option and forces only TLS connections.</span></p>
<ol>
<li><span> Distribute the same certificate files across all nodes:</span></li>
</ol>
<p><span>Whether the certificates are auto-generated by MySQL or issued by us, every member of the cluster has to use the same key and certificate files. It’s recommended to keep the certificates outside the data directory for security and configuration clarity, and to keep them clear of SST since a joiner wipes its data directory before a full state transfer, and only files matching the [sst] cpat pattern survive. That default covers *.pem, so the MySQL-generated names are safe, but a .crt or .key left in the data directory is deleted.</span></p>
<ol start="2">
<li><span> Update the my.cnf on every node:</span></li>
</ol>
<p><span>– pxc-encrypt-cluster-traffic=ON, this switch adds TLS for group communication, IST, and SST.</span></p>
<p><span>– socket.dynamic=YES option inside the wsrep_provider_options variable, so each node can speak both protocols while the rollout is in progress.</span></p>
<p><span>– The ssl-* variables, in case we’re setting the certificates outside the default path, which is the data directory.</span></p>
<p><span>– An [sst] section with the encrypt=4 option and the ssl-* variables. Since pxc-encrypt-cluster-traffic enforces SST channel to encrypt=4, this is a safety measure for those that did not yet performed the change, so donor and joiner can communicate over TLS while the change has not been applied in all nodes. Even though nothing has been restarted, the SST script re-reads my.cnf on every transfer, so as soon as the file is in place the donors encrypt SST whether or not they have been restarted.</span></p>
<p><span>The my.cnf file shows the following values:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">[mysqld]
pxc-encrypt-cluster-traffic=ON
wsrep_provider_options="socket.dynamic=YES"
ssl-ca=/etc/mysql/certs/ca.pem
ssl-cert=/etc/mysql/certs/server-cert.pem
ssl-key=/etc/mysql/certs/server-key.pem

[sst]
encrypt=4
ssl-ca=/etc/mysql/certs/ca.pem
ssl-cert=/etc/mysql/certs/server-cert.pem
ssl-key=/etc/mysql/certs/server-key.pem</pre>
</p>
<ol start="3">
<li><span> Restart node #1 and node #2, one at a time:</span></li>
</ol>
<p><span>Wait for each node to rejoin and report Synced before moving to the next. A restarted node will try TLS first and then fall back.</span></p>
<p><span>You can verify the change was correctly applied by running the following query. Since the SSL settings are in the wsrep_provider_options variable, which is a long string of key/value pairs, we pull out only the ones we are interested in:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; SELECT
    -&gt; REGEXP_SUBSTR(@@wsrep_provider_options, 'socket\.dynamic = [^;]+')  AS socket_dynamic,
    -&gt; REGEXP_SUBSTR(@@wsrep_provider_options, 'socket\.ssl = [^;]+')      AS socket_ssl,
    -&gt; REGEXP_SUBSTR(@@wsrep_provider_options, 'socket\.ssl_ca = [^;]+')   AS socket_ssl_ca,
    -&gt; REGEXP_SUBSTR(@@wsrep_provider_options, 'socket\.ssl_cert = [^;]+') AS socket_ssl_cert,
    -&gt; REGEXP_SUBSTR(@@wsrep_provider_options, 'socket\.ssl_key = [^;]+')  AS socket_ssl_keyG
*************************** 1. row ***************************
 socket_dynamic: socket.dynamic = YES
     socket_ssl: socket.ssl = YES
  socket_ssl_ca: socket.ssl_ca = /etc/mysql/certs/ca.pem
socket_ssl_cert: socket.ssl_cert = /etc/mysql/certs/server-cert.pem
 socket_ssl_key: socket.ssl_key = /etc/mysql/certs/server-key.pem
1 row in set (0.00 sec)</pre>
<p><span>The provider option socket.ssl and ssl certificates are passed down from MySQL to the provider because pxc-encrypt-cluster-traffic is on.</span></p>
<p><span>That confirms the settings reached the provider. That said, the replication traffic is not encrypted yet.</span></p>
<p><span>We can check this by using tcpdump on node #1 to listen on the replication port (4567) packets coming from node #2:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">$ tcpdump -i any -nn -A -s0 "tcp port 4567 and host node2" -c 2000 | grep -a table_test</pre>
<p><span>On node #2 we create the table_test that will be replicated to the other nodes:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; create table test.table_test (c1 integer primary key);
Query OK, 0 rows affected (0.10 sec)</pre>
<p><span>Since in PXC DDLs are replicated as a statement, tcpdump on node #1 shows the create table command in plaintext:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">...x..x.j.....y............................ ..E......std............test.create table test.table_test (c1 integer primary key).......</pre>
</p>
<ol start="4">
<li><span> Restart the third node with socket.dynamic=NO:</span></li>
</ol>
<p><span>Node #3 does not need the socket.dynamic option since the other two nodes are already capable of talking either TLS or plaintext.</span></p>
<p><span>We modify the my.cnf option file as below:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">[mysqld]
wsrep_provider_options="socket.dynamic=NO"</pre>
<p><span>And restart the node. This node will start and request only TLS from the other nodes, which they can respond to, since they already have all the changes in place.</span></p>
<p><span>The node will show reaching out to cluster peers over ssl://</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">2026-09-02T02:19:03.640009Z 0 [Note] [MY-000000] [Galera] (aac049fc-a401, 'ssl://0.0.0.0:4567') connection established to 8d5f826f-8dd1 ssl://172.18.0.3:4567
2026-09-02T02:19:03.640410Z 0 [Note] [MY-000000] [Galera] (aac049fc-a401, 'ssl://0.0.0.0:4567') connection established to 565f0a92-8283 ssl://172.18.0.2:4567</pre>
</p>
<ol start="5">
<li><span> Restart node #1 and node #2, turning off the socket.dynamic option:</span></li>
</ol>
<p><span>In order to disallow the non-encrypted option and to establish a TLS connection with the other nodes, nodes #1 and #2 should be restarted.</span></p>
<p><span>Similar to the previous step, when restarting, the nodes will establish communication on TLS.</span></p>
<p><span>Node #1</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">2026-09-02T02:20:12.565801Z 0 [Note] [MY-000000] [Galera] (d3d58399-9ea2, 'ssl://0.0.0.0:4567') connection established to aac049fc-a401 ssl://172.18.0.4:4567
2026-09-02T02:20:12.565855Z 0 [Note] [MY-000000] [Galera] (d3d58399-9ea2, 'ssl://0.0.0.0:4567') connection established to 8d5f826f-8dd1 ssl://172.18.0.3:4567</pre>
<p><span>Node #2</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">2026-09-02T02:21:20.911318Z 0 [Note] [MY-000000] [Galera] (fc923848-a6d1, 'ssl://0.0.0.0:4567') connection established to d3d58399-9ea2 ssl://172.18.0.2:4567
2026-09-02T02:21:20.911339Z 0 [Note] [MY-000000] [Galera] (fc923848-a6d1, 'ssl://0.0.0.0:4567') connection established to aac049fc-a401 ssl://172.18.0.4:4567</pre>
<p><span>To confirm the replication traffic is encrypted, we can perform the same check as in step 3, by running tcpdump on node #1 and listening on the replication port (4567) for packets coming from node #2:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">$ tcpdump -i any -nn -A -s0 "tcp port 4567 and host node2" -c 2000 | grep -a table_test</pre>
<p><span>On node #2 we drop the table_test previously created:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; drop table test.table_test;
Query OK, 0 rows affected (0.04 sec)</pre>
<p><span>tcpdump does not show a matching pattern since the replication traffic is now encrypted.</span></p>
<h3><span>Disabling TLS</span></h3>
<p><span>We can use the same mechanism to disable TLS for whatever reason. As with enabling it, this takes two rolling restarts. Starting from a cluster where every node has pxc-encrypt-cluster-traffic=ON we perform the following steps:</span></p>
<p><span>– Restart nodes #1 and #2 with socket.dynamic=YES, keeping pxc-encrypt-cluster-traffic=ON, so they accept plaintext connections again. </span></p>
<p><span>– Restart node #3 with pxc-encrypt-cluster-traffic=OFF, it will come up in plaintext only, and the other two nodes will accept it because they are back to accepting both protocols.</span></p>
<p><span>– Restart nodes #1 and #2 with pxc-encrypt-cluster-traffic=OFF and without socket.dynamic, which leaves the whole cluster in plaintext.</span></p>
<p><span>– Finally, remove from the sst section the encrypt and SSL related variables.</span></p>
<h3><span>Conclusion</span></h3>
<p><span>Enabling TLS for inter-node traffic can be done without stopping the whole cluster. The socket.dynamic option lets a node accept both encrypted and plaintext connections during the transition, so the change can be rolled out one node at a time. Please note we’ll need at least two rolling restarts to achieve that the cluster fully communicates via TLS.</span></p>
<p>The post <a href="https://www.percona.com/blog/enabling-tls-in-pxc-without-downtime/">Enabling TLS in PXC without Downtime</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/enabling-tls-in-pxc-without-downtime/">Enabling TLS in PXC without Downtime</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Percona Operator for PostgreSQL 3.1.0: Transparent Data Encryption, Logical Replicas, and Persistent Logging</title>
        <link>https://www.percona.com/blog/percona-operator-for-postgresql-3-1-0-transparent-data-encryption-logical-replicas-persistent-logging/</link>
        <pubDate>Wed, 09 Sep 2026 16:08:31 +0000</pubDate>
        <dc:creator>Slava Sarzhan</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/percona-operator-for-postgresql-3-1-0-transparent-data-encryption-logical-replicas-and-persistent-logging/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Percona Operator for PostgreSQL 3.1.0 takes on three things that decide whether a PostgreSQL platform passes review: is the data encrypted at rest, can it serve reads without straining the primary, and are the logs there when you need them. This release answers all three inside the custom resource, so none of them is a … Continued<br />
The post Percona Operator for PostgreSQL 3.1.0: Transparent Data Encryption, Logical Replicas, and Persistent Logging appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/percona-operator-for-postgresql-3-1-0-transparent-data-encryption-logical-replicas-persistent-logging/">Percona Operator for PostgreSQL 3.1.0: Transparent Data Encryption, Logical Replicas, and Persistent Logging</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="alignnone wp-image-53160 size-full" src="https://www.percona.com/wp-content/uploads/2026/09/Cover-1000-x-420-1.png" alt="" width="1001" height="420"></p>
<p><b>Percona Operator for PostgreSQL 3.1.0</b><span> takes on three things that decide whether a PostgreSQL platform passes review: is the data encrypted at rest, can it serve reads without straining the primary, and are the logs there when you need them. This release answers all three inside the custom resource, so none of them is a bolt-on you maintain yourself.</span></p>
<p><span>The three headline features are </span><b>transparent data encryption with </b><b>pg_tde</b><span>, </span><b>logical replicas</b><span>, and </span><b>persistent logging</b><span>. </span><span>pg_tde</span><span> encrypts your data on disk, including the write-ahead log. Logical replicas add a read-only copy inside the cluster for reporting and analytics. Persistent logging keeps PostgreSQL and pgBackRest logs across Pod restarts.</span></p>
<p><span>The operator is open source and runs on any CNCF-certified Kubernetes distribution. This release also widens where it runs, adding official Rancher Kubernetes Engine (RKE2) support and full ARM64 images. Much of what shipped here comes from requests on </span><a href="https://forums.percona.com/"><span>forums.percona.com</span></a><span> and the public issue tracker.</span></p>
<p><span>In this post, you’ll learn about:</span></p>
<ul>
<li><span>Transparent data encryption with pg_tde</span></li>
<li><span>Logical replicas for read-only workloads</span></li>
<li><span>Persistent logging for PostgreSQL and pgBackRest</span></li>
<li><span>Other improvements worth knowing about<br />
</span></li>
</ul>
<p> </p>
<h2><b>Transparent data encryption with pg_tde</b></h2>
<p><span>Encryption at rest is usually the line item that blocks a database from going into a regulated environment. Storage-level encryption from the cloud provider covers the disk, but it does not protect a copied volume, a leaked backup, or a stray WAL segment, and auditors increasingly want encryption the database itself controls. This release adds transparent data encryption through </span><span>pg_tde</span><span>, Percona’s open source TDE extension for PostgreSQL.</span></p>
<p> </p>
<h3><b>Why it matters</b></h3>
<p><span>With </span><span>pg_tde</span><span>, the data in tables, indexes, temporary tables, and the write-ahead log stays encrypted on disk, and PostgreSQL decrypts it only in memory for a session that holds the key. That closes the gaps storage encryption leaves open: a snapshot of the volume, a backup shipped to object storage, or a WAL file replicated off-node is ciphertext without the key. Because the key lives in an external provider rather than next to the data, you separate who runs the database from who controls the keys. In practice this is what lets a team bring PostgreSQL on Kubernetes into scope for a standard like PCI DSS or HIPAA without moving the workload off the platform: the encryption the auditor asks about lives in the database, and key custody lives in Vault under a different team’s control.</span></p>
<p> </p>
<h3><b>How it works</b></h3>
<p><span>The operator wires </span><span>pg_tde</span><span> to HashiCorp Vault as the key provider. You enable the extension in the custom resource and point it at your Vault instance and a token Secret. The operator handles loading the extension and configuring the key set on the PostgreSQL instances. WAL encryption is a separate switch, so you can encrypt table data and the write-ahead log together. </span><span>pg_tde</span><span> uses a two-tier key model: a principal key in Vault wraps the internal data keys, so rotating the principal key is a key-management operation in Vault rather than a full re-encryption of the database.</span></p>
<h3><b><br />
Wiring it up</b></h3>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">apiVersion: pgv2.percona.com/v2
kind: PerconaPGCluster
metadata:
  name: cluster1
spec:
  extensions:
    pg_tde:
      enabled: true
      walEncryption: true
      vault:
        host: https://vault-service:8200
        mountPath: tde
        tokenSecret:
          name: pg-tde-vault-secret
          key: token
        caSecret:
          name: pg-tde-vault-secret
          key: ca.crt</pre>
<p> </p>
<p><em><span>enabled: true</span></em><span> loads </span><em><span>pg_tde</span></em><span> and turns on encryption for the cluster, and </span><em><span>walEncryption: true</span></em><span> extends it to the write-ahead log. The </span><span>vault</span><span> block points at your key provider: </span><em><span>host</span></em><span> and </span><em><span>mountPath</span></em><span> locate the secrets engine, </span><em><span>tokenSecret</span></em><span> holds the Vault token, and </span><em><span>caSecret</span></em><span> carries the CA certificate so the operator trusts the Vault endpoint. Keep the Vault token and CA in Kubernetes Secrets, not in the manifest.</span></p>
<p> </p>
<blockquote>
<p><b>Note:</b><span> pg_tde in 3.1.0 is available for PostgreSQL 17 and 18. Encryption applies to data written after you enable it, so plan enablement as part of provisioning a cluster rather than as a switch on a full production database.</span></p>
</blockquote>
<h2><span><br />
<b>Logical replicas for read-only workloads</b></span></h2>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-53161 size-medium_large" src="https://www.percona.com/wp-content/uploads/2026/09/logical-replica-topology-768x404.png" alt="" width="768" height="404"></p>
<p> </p>
<p><span>A PostgreSQL cluster under the operator is a primary with streaming physical replicas that Patroni manages for high availability. Those replicas exist to take over on failover, not to be a stable place to point a reporting tool, because their role can change at any time. Teams that want a durable read endpoint for analytics have had to run a second cluster or wire up replication by hand. This release adds a logical replica you declare inside the same cluster.</span></p>
<p><span> </span></p>
<h3><b>Why it matters</b></h3>
<p><span>Reporting and analytics queries have a different shape than transactional traffic: they scan more, run longer, and arrive in bursts when a dashboard refreshes or a nightly job starts. Pointed at the primary, they compete with the writes that keep the application responsive. A logical replica gives that traffic its own copy and its own compute, so a heavy analytics query slows down a chart, not a checkout. Because the endpoint is stable, you set the reporting tool’s connection string once and leave it.</span></p>
<h3><b><br />
How it works</b></h3>
<p><span>A logical replica is a read-only copy with its own volume and its own Service, seeded from a pgBackRest backup and kept current through logical replication. Patroni does not manage it, so it never gets promoted and its endpoint stays stable: a reporting query or a dashboard can point at it and stay pointed at it. You can target specific databases or replicate all of them, and size the replica independently of the primary.</span></p>
<h3><span><br />
<b>Wiring it up</b></span></h3>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">spec:
  logicalReplicas:
  - name: analytics
    databases: []  # empty = all non-template databases except "postgres"
    bootstrapMethod: pgbackrest
    dataVolumeClaimSpec:
      accessModes:
      - ReadWriteOnce
      resources:
        requests:
          storage: 1Gi
    resources:
      limits:
        cpu: 2.0
        memory: 4Gi
    expose:
      type: LoadBalancer</pre>
<p><span><br />
<em>name</em></span><span> becomes the replica’s identity and the basis for its Service. </span><span>databases</span><span> selects what to replicate, where an empty list means every non-template <em>database</em> except </span><em><span>postgres</span></em><span>. </span><em>bootstrapMethod: pgbackrest</em><span> seeds the replica from a backup rather than from the live primary, which keeps the initial sync off the primary’s back. </span><em><span>dataVolumeClaimSpec</span></em><span> and </span><span>resources</span><span> size it for the read workload, and </span><span>expose</span><span> publishes the read endpoint.</span></p>
<p> </p>
<blockquote>
<p><b>Note:</b><span> Logical replicas are a tech preview in 3.1.0 and require PostgreSQL 17 or later. Logical replication does not copy schema changes automatically, so treat DDL on the primary as something you coordinate with the replica.</span></p>
</blockquote>
<p><span> </span></p>
<h2><b>Persistent logging for PostgreSQL and pgBackRest</b></h2>
<p><span>Logs matter most right after something goes wrong, which is exactly when a Pod is most likely to have restarted and taken its logs with it. When PostgreSQL logs only to a container’s stdout, a crash-loop or a reschedule erases the evidence you need to explain it. The classic case is a crash-looping instance: by the time you exec into a fresh Pod, the stdout from the crash is gone, but an on-disk log still holds the panic and the queries around it. This release keeps PostgreSQL and pgBackRest logs on the instance data volume, so they survive Pod restarts.</span></p>
<p><span> </span></p>
<h3><b>How it works</b></h3>
<p><span>The operator runs a Fluent Bit log collector as a sidecar that reads the on-disk logs and emits them as structured JSON lines. Because the logs live on the data volume, they persist across restarts and rescheduling. From there you can forward them off-cluster: the collector can ship to S3 or over OpenTelemetry to whatever aggregation stack you already run, configured through the custom resource. The same on-disk logs that help you debug an incident become the audit trail your security team retains, without a second logging agent to install.</span></p>
<h3><span><br />
<b>Wiring it up</b><br />
</span></h3>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">spec:
  logcollector:
    enabled: true
    image: docker.io/perconalab/fluentbit:main-logcollector
#    configuration: |
#      pipeline:
#        filters:
#          - name: record_modifier
#            match: "*"
#            record:
#              - cluster_name cluster1</pre>
<p> </p>
<p><em><span>enabled: true</span></em><span> turns on the Fluent Bit collector, and </span><em><span>image</span></em><span> pins the collector build. The commented </span><em><span>configuration</span></em><span> block is a Fluent Bit pipeline you can supply to filter, enrich, or route logs: the example tags every record with a </span><em><span>cluster_name</span></em><span>, and the same mechanism adds an output to forward logs to S3 or an OpenTelemetry endpoint. You can also tune log rotation so retention matches your operational windows and compliance rules.</span></p>
<p> </p>
<blockquote>
<p><b>Note:</b><span> Persistent logs consume space on the instance data volume. Set a rotation policy that fits the volume so logs do not compete with the database for storage.</span></p>
</blockquote>
<p><span> </span></p>
<h2><b>Other improvements</b></h2>
<p><span>Beyond the three headline features, 3.1.0 ships a set of enhancements that smooth day-two operations:</span></p>
<ul>
<li><b>Community PostgreSQL images and custom registries</b><span> (</span><a href="https://perconadev.atlassian.net/browse/K8SPG-1056"><span>K8SPG-1056</span></a><span>): run Percona Distribution for PostgreSQL, community PostgreSQL, or your own images by setting </span><span>spec.image</span><span>, </span><span>proxy.pgBouncer.image</span><span>, and </span><span>spec.backups.pgbackrest.image</span><span>.</span></li>
<li><b>Auto-growable pgBackRest disks</b><span> (</span><a href="https://perconadev.atlassian.net/browse/K8SPG-691"><span>K8SPG-691</span></a><span>): let backup repository volumes grow to a limit instead of filling up and failing a backup.</span></li>
<li><b>Pause and resume pgBouncer</b><span> (</span><a href="https://perconadev.atlassian.net/browse/K8SPG-1115"><span>K8SPG-1115</span></a><span>): set </span><span>proxy.pgBouncer.paused</span><span> to hold client traffic without dropping application connections.</span></li>
<li><b>mTLS for pgBouncer</b><span> (</span><a href="https://perconadev.atlassian.net/browse/K8SPG-952"><span>K8SPG-952</span></a><span>): extend the pgBouncer trust bundle with your external CA through </span><span>proxy.pgBouncer.additionalTrustedCAs</span><span> while the operator keeps rotating cluster TLS.</span></li>
<li><b>cert-manager Issuer and TLS policy</b><span> (</span><a href="https://perconadev.atlassian.net/browse/K8SPG-951"><span>K8SPG-951</span></a><span>, </span><a href="https://perconadev.atlassian.net/browse/K8SPG-1045"><span>K8SPG-1045</span></a><span>): point the operator at your own Issuer, and use </span><span>certManagementPolicy</span><span> to decide who owns certificate lifecycle.</span></li>
<li><b>Extra volume mounts</b><span> (</span><a href="https://perconadev.atlassian.net/browse/K8SPG-440"><span>K8SPG-440</span></a><span>): mount extra ConfigMap, Secret, PVC, or emptyDir volumes into the PostgreSQL container through </span><span>instances.extraVolumes</span><span>.</span></li>
<li><b>pg_cron</b><b> and </b><b>set_user</b><b> are now built-in</b><span> (</span><a href="https://perconadev.atlassian.net/browse/K8SPG-1040"><span>K8SPG-1040</span></a><span>): enable them through </span><span>extensions</span><span> without supplying a custom build.</span></li>
<li><b>PostgreSQL 19 tech preview</b><span> (</span><a href="https://perconadev.atlassian.net/browse/K8SPG-1051"><span>K8SPG-1051</span></a><span>) and </span><b>full ARM64 support</b><span> (</span><a href="https://perconadev.atlassian.net/browse/K8SPG-881"><span>K8SPG-881</span></a><span>): evaluate the next major early, and run the operator natively on ARM.</span></li>
</ul>
<p><span>One deprecation to plan for: this release removes PMM2 support (</span><a href="https://perconadev.atlassian.net/browse/K8SPG-944"><span>K8SPG-944</span></a><span>), so move monitoring to </span><a href="https://docs.percona.com/percona-monitoring-and-management/"><span>PMM3</span></a><span>. The </span><span>extensions.builtin</span><span> field is deprecated in favor of </span><span>extensions..enabled</span><span>; migrate before 3.4.0.</span></p>
<p> </p>
<h2><b>Conclusion</b></h2>
<p><span>Percona Operator for PostgreSQL 3.1.0 tightens the parts of a PostgreSQL platform that reviews and on-call rotations care about most: </span><span>pg_tde</span><span> encrypts data at rest under keys you control, logical replicas give analytics a stable read endpoint without a second cluster, and persistent logging keeps the evidence when a Pod restarts. With RKE2 and full ARM64 support, more of that runs on the platforms teams actually use. If there is a workflow you still script around the operator, tell us on the forum, since that is where releases like this one come from.</span></p>
<h2><b><br />
Try Percona Operator for PostgreSQL 3.1.0</b></h2>
<ul>
<li><b>Release notes</b><span>: </span><a href="https://docs.percona.com/percona-operator-for-postgresql/ReleaseNotes/Kubernetes-Operator-for-PostgreSQL-RN3.1.0.html"><span>Percona Operator for PostgreSQL 3.1.0 Release Notes</span></a></li>
<li><b>Documentation</b><span>: </span><a href="https://docs.percona.com/percona-operator-for-postgresql/latest/"><span>Percona Operator for PostgreSQL docs</span></a></li>
<li><b>GitHub</b><span>: </span><a href="https://github.com/percona/percona-postgresql-operator"><span>percona/percona-postgresql-operator</span></a></li>
<li><b>Community Forum</b><span>: </span><a href="https://forums.percona.com/"><span>forums.percona.com</span></a><span>: share your feedback, ask questions, or report issues</span></li>
</ul>
<p> </p>
<p><span> </span></p>
<p>The post <a href="https://www.percona.com/blog/percona-operator-for-postgresql-3-1-0-transparent-data-encryption-logical-replicas-persistent-logging/">Percona Operator for PostgreSQL 3.1.0: Transparent Data Encryption, Logical Replicas, and Persistent Logging</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/percona-operator-for-postgresql-3-1-0-transparent-data-encryption-logical-replicas-persistent-logging/">Percona Operator for PostgreSQL 3.1.0: Transparent Data Encryption, Logical Replicas, and Persistent Logging</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>SQL Server 2025 Expensive Queries: 7 Proven Ways to Find and Fix Them by Latency and Resource Cost</title>
        <link>https://minervadb.com/sql-server-expensive-queries/</link>
        <pubDate>Wed, 09 Sep 2026 15:20:44 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/sql-server-2025-expensive-queries-7-proven-ways-to-find-and-fix-them-by-latency-and-resource-cost/</guid>
        <source url="https://minervadb.com/">MinervaDB</source>
        <description><![CDATA[<p>"Expensive queries" is a phrase that hides two different problems. One is response time: a statement the application waits too long for. The other is resource efficiency: a statement that burns CPU, logical reads and [...]</p>
<p><a href="https://minervadb.com/sql-server-expensive-queries/">SQL Server 2025 Expensive Queries: 7 Proven Ways to Find and Fix Them by Latency and Resource Cost</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>&#8220;Expensive queries&#8221; is a phrase that hides two different problems. One is response time: a statement the application waits too long for. The other is resource efficiency: a statement that burns CPU, logical reads and tempdb out of proportion to the rows it returns, whether or not anyone is waiting on it. On SQL Server 2025 the second kind is the one that quietly sets your core count, and the first kind is the one that generates the ticket. They need different evidence, and often different fixes, and the mistake I see most is tuning one while measuring the other.</p>
<p>This post is the method I use for expensive queries on SQL Server 2025 (17.x, CU8 at the time of writing, database compatibility level 170) to find them both ways, read what the plan is really doing, and fix them with the index or the rewrite the evidence points at. Where SQL Server 2022 behaves differently I say so inline. Every query here runs against Query Store or the DMVs and is safe to run on a production instance; the sample outputs are illustrative and labelled as such, because the numbers that matter are yours.</p>
<h2>Expensive queries are two problems, and the axis you pick decides the fix</h2>
<p>For expensive queries, response time is what the user experiences: duration, including every wait the session accumulated while blocked, while waiting for a memory grant, or while the client drained a large result set. Resource efficiency is what the engine spent: CPU time, logical reads, tempdb pages and worker threads, per execution and per row returned. A statement can be slow and cheap, when it spends its life in LCK_M_X or ASYNC_NETWORK_IO. A statement can be fast and ruinously expensive, when a two-millisecond lookup runs five thousand times a second with two hundred logical reads per call.</p>
<p><img loading="lazy" decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvM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GVydmFsLCBub3QgcGVyIGNhbGw8L3RleHQ+PHRleHQgeD0iNjgwLjAiIHk9IjQxMi41NzUiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZvbnQtZmFtaWx5PSJTYXJhbGEsIEFyaWFsLCBIZWx2ZXRpY2EsIHNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTEiIGZpbGw9IiMxYTIzMzIiPmZpeDogY292ZXJpbmcgaW5kZXgsIHByZWRpY2F0ZSByZXdyaXRlPC90ZXh0Pjwvc3ZnPg==" alt="Expensive queries in SQL Server classified into four quadrants by response time and resource cost per row, with the evidence source and fix family for each quadrant" width="960" height="520"><br /><em>Figure 1. Expensive queries on two axes. The top-right quadrant gets all the attention; the bottom-right quadrant is where the licence cores go.</em></p>
<p>The reason the distinction matters for expensive queries in practice is that the fixes do not overlap much. Waits are fixed with concurrency design, isolation level, batch sizing and the application&#8217;s fetch pattern. Resource cost is fixed with plan shape: predicates, statistics, indexes and, occasionally, a hint. If you rank by duration and the top entry is a query blocked behind a long transaction, adding an index to it changes nothing except the maintenance cost of every insert on that table.</p>
<h2>Query Store is the evidence chain, and on SQL Server 2025 it is on everywhere</h2>
<p>Query Store has been the right place to find expensive queries since SQL Server 2016, but two things changed in 2025 that make it the only place I look first. It is enabled by default for new databases, and it now runs on readable secondaries by default, so an Always On read-scale workload is no longer invisible. The runtime statistics are aggregated per plan per interval, which is exactly the granularity that separates response time from resource cost: duration, CPU, logical reads, rowcount, tempdb and DOP all sit in the same row.</p>
<p><img loading="lazy" decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAwIDQzMCIgd2lkdGg9IjEwMDAiIGhlaWdodD0iNDMwIiByb2xlPSJpbWciIGFyaWEtbGFiZWxsZWRieT0idDQ0OTExIGQ0NDkxMSI+PHRpdGxlIGlkPSJ0NDQ5MTEiPlF1ZXJ5IFN0b3JlIHZpZXd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zMjUiIHgyPSI2MjQiIHkyPSIzNTMiIHN0cm9rZT0iIzNkNGY2MiIgc3Ryb2tlLXdpZHRoPSIxLjQiIG1hcmtlci1lbmQ9InVybCgjYXJyKSIvPjxsaW5lIHgxPSI4NzAiIHkxPSIzMjUiIHgyPSI4NzAiIHkyPSIzNTMiIHN0cm9rZT0iIzNkNGY2MiIgc3Ryb2tlLXdpZHRoPSIxLjQiIG1hcmtlci1lbmQ9InVybCgjYXJyKSIvPjwvc3ZnPg==" alt="Query Store views for expensive queries on SQL Server 2025: query, plan, runtime stats and wait stats chained together, then four rankings by response time, CPU, I/O efficiency and variance" width="1000" height="430"><br /><em>Figure 2. The evidence chain for expensive queries. Every ranking resolves to a query_id and a plan_id, and those two numbers are what you act on.</em></p>
<p>Before ranking expensive queries, confirm Query Store is capturing what you need. QUERY_CAPTURE_MODE of AUTO skips trivial and infrequent statements, which is fine for finding expensive queries and wrong for auditing everything. Check the operation mode, the interval length and how much of the allocated space is used, because a Query Store that has flipped to READ_ONLY under space pressure is silently stale.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="Query Store health before you trust its rankings (SQL Server 2022 and 2025)">SELECT   actual_state_desc,
         desired_state_desc,
         readonly_reason,
         current_storage_size_mb,
         max_storage_size_mb,
         interval_length_minutes,
         query_capture_mode_desc,
         stale_query_threshold_days,
         wait_stats_capture_mode_desc
FROM     sys.database_query_store_options;

-- If actual_state_desc is READ_ONLY with readonly_reason 65536, storage is full:
-- ALTER DATABASE CURRENT SET QUERY_STORE (MAX_STORAGE_SIZE_MB = 2048);   -- online, no restart</pre>
<p>Then rank the expensive queries. The query below is the one I keep in a snippet. It aggregates the last N hours of runtime intervals per query and plan and computes the four numbers the quadrant diagram asks for: total duration weighted by executions, total CPU, logical reads per row returned, and the coefficient of variation of duration. Sort by whichever question you are answering. The ORDER BY is the whole point of the query, so I leave all four options in and comment out three.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="Expensive queries from Query Store, rankable by response time, CPU, I/O efficiency or variance">DECLARE @hours INT = 24;

WITH rs AS (
    SELECT   rs.plan_id,
             SUM(rs.count_executions)                                          AS executions,
             SUM(rs.count_executions * rs.avg_duration)        / 1000.0        AS total_duration_ms,
             SUM(rs.count_executions * rs.avg_cpu_time)        / 1000.0        AS total_cpu_ms,
             SUM(rs.count_executions * rs.avg_logical_io_reads)                AS total_logical_reads,
             SUM(rs.count_executions * rs.avg_rowcount)                        AS total_rows,
             SUM(rs.count_executions * rs.avg_tempdb_space_used)               AS total_tempdb_pages,
             MAX(rs.max_duration)                              / 1000.0        AS max_duration_ms,
             MAX(rs.stdev_duration)                            / 1000.0        AS max_stdev_duration_ms,
             MAX(rs.max_dop)                                                   AS max_dop
    FROM     sys.query_store_runtime_stats          AS rs
    JOIN     sys.query_store_runtime_stats_interval AS i
          ON i.runtime_stats_interval_id = rs.runtime_stats_interval_id
    WHERE    i.start_time &gt;= DATEADD(HOUR, -@hours, SYSUTCDATETIME())
    GROUP BY rs.plan_id
)
SELECT   TOP (25)
         q.query_id,
         p.plan_id,
         p.is_forced_plan,
         p.compatibility_level,
         rs.executions,
         CAST(rs.total_duration_ms / NULLIF(rs.executions, 0) AS DECIMAL(18, 2))   AS avg_duration_ms,
         CAST(rs.max_duration_ms AS DECIMAL(18, 2))                                  AS max_duration_ms,
         CAST(rs.total_cpu_ms AS DECIMAL(18, 2))                                     AS total_cpu_ms,
         CAST(rs.total_logical_reads / NULLIF(rs.total_rows, 0) AS DECIMAL(18, 1))  AS reads_per_row,
         CAST(rs.max_stdev_duration_ms / NULLIF(rs.total_duration_ms / NULLIF(rs.executions, 0), 0) AS DECIMAL(9, 3)) AS duration_cv,
         rs.total_tempdb_pages,
         rs.max_dop,
         LEFT(qt.query_sql_text, 160)                                                AS query_text
FROM     rs
JOIN     sys.query_store_plan       AS p  ON p.plan_id  = rs.plan_id
JOIN     sys.query_store_query      AS q  ON q.query_id = p.query_id
JOIN     sys.query_store_query_text AS qt ON qt.query_text_id = q.query_text_id
ORDER BY rs.total_duration_ms DESC;       -- response time, weighted by how often it runs
-- ORDER BY rs.total_cpu_ms DESC;         -- resource cost: the core-count question
-- ORDER BY reads_per_row DESC;           -- efficiency: reads per row returned
-- ORDER BY duration_cv DESC;             -- variance: parameter sensitivity and plan flips</pre>
<p>Two of those columns do more work for expensive queries than the rest. reads_per_row is the efficiency ratio: a query returning ten rows at 40,000 logical reads per execution is doing 4,000 reads for each row it hands back, and no amount of hardware makes that reasonable. duration_cv, the standard deviation of duration divided by the mean, is how you find parameter-sensitive expensive queries before a user does; a value above 1 on a frequently executed statement almost always means more than one plan shape is being used for the same query_id.</p>
<p>The output below is illustrative, not from a customer system, and shows the shape I am looking for: one query high on every axis, one high on CPU only, and one whose variance gives it away.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="text" data-enlighter-title="Illustrative output (not measured on a real instance) ordered by total duration">query_id plan_id executions avg_duration_ms max_duration_ms total_cpu_ms reads_per_row duration_cv max_dop
-------- ------- ---------- --------------- --------------- ------------ ------------- ----------- -------
   40217    9912      18240          412.8         8391.2     6204812.1        3892.4       1.812       8
   11203    2210    1928400            1.9           24.7     3517110.6         206.0       0.220       1
   40391   10044       2210         1290.5         2011.0       81023.9          12.3       0.140       4
...</pre>
<p>Among those three expensive queries, query_id 40217 is the classic top-right quadrant: slow, expensive and unstable. query_id 11203 is the bottom-right one, two milliseconds a call and the second-largest CPU consumer on the instance because it runs 1.9 million times a day with 206 reads per row. Sorting by average duration would never have shown it. query_id 40391 is slow and steady with a modest read ratio, which usually means it is waiting rather than working, and the wait stats view settles that.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="Wait categories per plan: is the expensive query working or waiting?">SELECT   ws.plan_id,
         ws.wait_category_desc,
         SUM(ws.total_query_wait_time_ms)                    AS total_wait_ms,
         MAX(ws.max_query_wait_time_ms)                      AS max_wait_ms
FROM     sys.query_store_wait_stats               AS ws
JOIN     sys.query_store_runtime_stats_interval   AS i
      ON i.runtime_stats_interval_id = ws.runtime_stats_interval_id
WHERE    ws.plan_id IN (9912, 2210, 10044)
AND      i.start_time &gt;= DATEADD(HOUR, -24, SYSUTCDATETIME())
GROUP BY ws.plan_id, ws.wait_category_desc
ORDER BY ws.plan_id, total_wait_ms DESC;</pre>
<p>If an expensive query&#8217;s duration is mostly Lock, Network IO or Memory waits, it belongs in the slow-but-cheap quadrant and the index conversation is over before it starts. On SQL Server 2025 there is a wait category worth new attention: the LCK_M_*_XACT waits that appear once optimized locking is enabled, where sessions wait on the transaction resource rather than on individual rows. Baseline lock waits before turning that feature on, or you will not be able to tell whether it helped.</p>
<h2>Expensive queries from the plan cache DMVs: still useful for one thing</h2>
<p>sys.dm_exec_query_stats still has a place, mainly on instances where Query Store is off or on ad hoc workloads where it captures little. Its numbers reset on plan eviction and restart, it has no interval history, and on a busy instance it undercounts anything that recompiles often. I use it for one thing Query Store does not do well: finding expensive queries by the memory grant they requested, which is the fastest route to the RESOURCE_SEMAPHORE waits that stall everything else.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="Grant-hungry statements from the plan cache: the RESOURCE_SEMAPHORE suspects">SELECT   TOP (20)
         qs.execution_count,
         qs.max_grant_kb,
         qs.max_used_grant_kb,
         qs.max_ideal_grant_kb,
         qs.max_spills,
         qs.total_worker_time / 1000 / NULLIF(qs.execution_count, 0)  AS avg_cpu_ms,
         qs.total_logical_reads / NULLIF(qs.execution_count, 0)       AS avg_logical_reads,
         qs.query_hash,
         SUBSTRING(st.text, (qs.statement_start_offset / 2) + 1,
                   ((CASE qs.statement_end_offset WHEN -1 THEN DATALENGTH(st.text)
                     ELSE qs.statement_end_offset END - qs.statement_start_offset) / 2) + 1) AS statement_text
FROM     sys.dm_exec_query_stats AS qs
CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) AS st
WHERE    qs.max_grant_kb &gt; 65536
ORDER BY qs.max_grant_kb DESC;</pre>
<p>A max_used_grant_kb far below max_grant_kb is an over-estimate that starves other sessions; a max_spills above zero with used close to granted is an under-estimate that spilled. Both come back to cardinality, which is where reading the plans of expensive queries starts.</p>
<h2>Reading the plan of an expensive query without flattering it</h2>
<p>The actual execution plan is where a ranking of expensive queries becomes a diagnosis. Estimated plans are useful for review; they are useless for troubleshooting, because the whole problem is usually that the estimate was wrong. Query Store keeps the plan XML per plan_id, and on SQL Server 2019 and later the LAST_QUERY_PLAN_STATS database-scoped configuration keeps the last actual plan with runtime counters for cached statements, which is the cheapest way to get an actual plan for something you cannot re-run at will.</p>
<p><img loading="lazy" decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5NjAgNDA1IiB3aWR0aD0iOTYwIiBoZWlnaHQ9IjQwNSIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsbGVkYnk9InQxODUzNyBkMTg1MzciPjx0aXRsZSBpZD0idDE4NTM3Ij5GaXZlIGV4cGVuc2l2ZSBwbGFuIG9wZXJhdG9yIHBhdHRlcm5zIGluIFNRTCBTZXJ2ZXIgYW5kIHRoZSBldmlkZW5jZSBmb3IgZWFjaDwvdGl0bGU+PGRlc2MgaWQ9ImQxODUzNyI+Rml2ZSBjb2x1bW5zOiBrZXkgbG9va3VwLCBub24tU0FSR2FibGUgc2Nhbiwgc3BpbGwsIHNwb29sIGFuZCBlc3RpbWF0ZSBnYXAsIGVhY2ggd2l0aCBob3cgaXQgc2hvd3MgaW4gdGhlIHBsYW4gYW5kIHRoZSBkaXJlY3Rpb24gb2YgdGhlIGZpeC48L2Rlc2M+PGRlZnM+PG1hcmtlciBpZD0iYXJyIiB2aWV3Qm94PSIwIDAgMTAgMTAiIHJlZlg9IjguNSIgcmVmWT0iNSIgbWFya2VyV2lkdGg9IjciIG1hcmtlckhlaWdodD0iNyIgb3JpZW50PSJhdXRvLXN0YXJ0LXJldmVyc2UiIG1hcmtlclVuaXRzPSJ1c2VyU3BhY2VPbl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1mYW1pbHk9IlNhcmFsYSwgQXJpYWwsIEhlbHZldGljYSwgc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMSIgZmlsbD0iIzFhMjMzMiI+VGhlIHJhdGlvIGJldHdlZW4gdGhlbSBpcyB0aGUgZWZmaWNpZW5jeSBvZiB0aGF0IG9wZXJhdG9yLjwvdGV4dD48L3N2Zz4=" alt="Five expensive plan operator patterns in SQL Server: key lookup, non-SARGable clustered index scan, sort or hash spill, table spool and estimate versus actual gap, with the evidence and fix for each" width="960" height="405"><br /><em>Figure 3. Five plan shapes that account for most expensive queries, and the number in the plan that exposes each.</em></p>
<p>Rather than opening every one of the expensive queries in a plan viewer, I pull the warnings and the operator inventory out of the XML for the top plan_ids in one pass. The query below flags the four things I want to know before I look at anything else: is there a key lookup, a spill, an implicit conversion, or a scan on a table the predicate should have seeked.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="Plan triage from Query Store XML: lookups, spills, implicit conversions and scans for a set of plan_ids">;WITH XMLNAMESPACES (DEFAULT 'http://schemas.microsoft.com/sqlserver/2004/07/showplan')
SELECT   p.plan_id,
         p.query_id,
         x.value('count(//IndexScan[@Lookup="true"])', 'INT')                       AS key_lookups,
         x.value('count(//RelOp[@PhysicalOp="Clustered Index Scan" or @PhysicalOp="Index Scan" or @PhysicalOp="Table Scan"])', 'INT')
                                                                                   AS scans,
         x.value('count(//Warnings/SpillToTempDb)', 'INT')                        AS spills,
         x.value('count(//Warnings/PlanAffectingConvert[@ConvertIssue="Seek Plan"])', 'INT')
                                                                                   AS implicit_conversions,
         x.value('count(//RelOp[@PhysicalOp="Table Spool" or @PhysicalOp="Index Spool"])', 'INT')
                                                                                   AS spools,
         x.value('(//StmtSimple/@StatementOptmEarlyAbortReason)[1]', 'NVARCHAR(50)') AS optimizer_abort_reason,
         x.value('(//QueryPlan/@CachedPlanSize)[1]', 'INT')                       AS cached_plan_kb
FROM     sys.query_store_plan AS p
CROSS APPLY (SELECT TRY_CONVERT(XML, p.query_plan)) AS c(x)
WHERE    p.plan_id IN (9912, 2210, 10044)
ORDER BY p.plan_id;</pre>
<p>For the expensive queries that survive triage, the operator-level view is where the efficiency ratio lives. Two properties on every operator in an actual plan tell you what it cost: Number of Rows Read, which is how many rows the operator touched, and Actual Number of Rows, which is how many came out. A seek that reads 900,000 rows to output 40 is a seek in name only; it is a range scan with a residual predicate, and the residual is nearly always a non-SARGable expression or a column that should have been in the key. STATISTICS IO gives the same information per table when you can run the statement yourself.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="Measuring one expensive query directly: reads and CPU per table, with the actual plan">SET STATISTICS IO, TIME ON;
SET STATISTICS XML ON;

DECLARE @customer_id INT = 48213, @from DATE = '2026-08-01';

SELECT   o.order_id, o.order_date, o.status, ol.sku, ol.qty, ol.line_total
FROM     dbo.orders      AS o
JOIN     dbo.order_lines AS ol ON ol.order_id = o.order_id
WHERE    o.customer_id = @customer_id
AND      CONVERT(DATE, o.order_date) &gt;= @from        -- non-SARGable: function on the column
ORDER BY o.order_date DESC;

SET STATISTICS XML OFF;
SET STATISTICS IO, TIME OFF;

-- Illustrative STATISTICS IO line (not a measured result):
-- Table 'orders'. Scan count 1, logical reads 184112, ... lob logical reads 0
-- Table 'order_lines'. Scan count 61, logical reads 244, ...</pre>
<p>That CONVERT on order_date is the single most common reason an otherwise well-indexed statement becomes one of the expensive queries on an instance. The optimizer cannot seek on a function of the column, so it scans the whole customer&#8217;s range, or the whole table, and filters afterwards. The rewrite is a half-open range on the raw column, and the reads collapse to whatever the index range actually covers. The same demotion happens with implicit conversions between NVARCHAR parameters and VARCHAR columns, with ISNULL(col, x) = y, with LIKE &#8216;%&#8217; + @p, and with arithmetic on the column side of a comparison.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="The SARGable rewrite: same rows, a seekable predicate">WHERE    o.customer_id = @customer_id
AND      o.order_date  &gt;= CAST(@from AS DATETIME2(0))   -- compare the raw column, match its type
ORDER BY o.order_date DESC;</pre>
<h2>What SQL Server 2025 changed for expensive queries, and where 2022 differs</h2>
<p>Intelligent Query Processing is the umbrella for the optimizer features that adjust plans from runtime feedback, and SQL Server 2025 extended it in ways that change how expensive queries behave after an upgrade. I pin each item to the version and the compatibility level it needs, because a database restored onto a 2025 instance at compatibility level 150 gets almost none of this.</p>
<table>
<caption>SQL Server 2025 optimizer behaviour that affects expensive queries, against SQL Server 2022</caption>
<thead>
<tr>
<th>Feature</th>
<th>SQL Server 2022</th>
<th>SQL Server 2025</th>
<th>What to check</th>
</tr>
</thead>
<tbody>
<tr>
<td>Parameter Sensitive Plan optimization</td>
<td>New in 2022, compat 160; up to three plan variants per parameterised predicate</td>
<td>Same mechanism; variant queries appear as their own query_ids linked to the parent in sys.query_store_query_variant</td>
<td>Join runtime stats through sys.query_store_query_variant; high duration_cv on a query with a single plan means PSP did not engage</td>
</tr>
<tr>
<td>Optional Parameter Plan Optimization (OPPO)</td>
<td>Not available</td>
<td>Multiple plans per statement chosen on which optional parameters are NULL; the answer to the &#8220;WHERE (@a IS NULL OR col = @a)&#8221; pattern</td>
<td>Compat 170; on by default via the OPTIONAL_PARAMETER_OPTIMIZATION database-scoped configuration; DISABLE_OPTIONAL_PARAMETER_OPTIMIZATION hint per query</td>
</tr>
<tr>
<td>Cardinality estimation feedback</td>
<td>Correlation, join containment and row goal scenarios; compat 160, Query Store required</td>
<td>Extended to expressions; CE_FEEDBACK database-scoped configuration and the DISABLE_CE_FEEDBACK hint</td>
<td>Build number: a CE feedback defect in an early CU caused plan cache growth and CPU; confirm the fix is in your CU before relying on it</td>
</tr>
<tr>
<td>DOP feedback</td>
<td>Opt-in via DOP_FEEDBACK</td>
<td>On by default; parallel expensive queries that gained nothing from parallelism get their DOP reduced over successive executions</td>
<td>max_dop in runtime_stats dropping across intervals for the same plan_id is feedback working, not a regression</td>
</tr>
<tr>
<td>Query Store on readable secondaries</td>
<td>Preview, off by default</td>
<td>On by default, with persisted statistics on secondaries</td>
<td>Rank expensive queries on the reporting replica too; the secondary no longer loses its stats on failover</td>
</tr>
<tr>
<td>Query Store hint ABORT_QUERY_EXECUTION</td>
<td>Not available</td>
<td>Block a query shape at compile time without touching application code; raises error 8778 to the caller</td>
<td>A circuit breaker for the runaway report at 02:00, reversible with sp_query_store_clear_hints</td>
</tr>
<tr>
<td>Optimized locking</td>
<td>Not available on-premises</td>
<td>Opt-in per database; requires ADR, needs RCSI for lock-after-qualification; new LCK_M_*_XACT waits</td>
<td>Changes the wait profile of slow-but-cheap expensive queries; review write-ordering assumptions before enabling</td>
</tr>
</tbody>
</table>
<p>The compatibility-level point deserves its own sentence. Microsoft&#8217;s rule is that cardinality estimator changes only activate at the default compatibility level of the version that introduced them, so a database left at 150 after a 2025 upgrade keeps its old plans and gains none of the feedback mechanisms above, which is sometimes exactly what you want for the first weeks and is never what you want permanently. Microsoft&#8217;s <a href="https://learn.microsoft.com/en-us/sql/sql-server/what-s-new-in-sql-server-2025" target="_blank" rel="noopener">What&#8217;s new in SQL Server 2025</a> page is the reference for the table, and the <a href="https://learn.microsoft.com/en-us/sql/relational-databases/performance/intelligent-query-processing-details" target="_blank" rel="noopener">Intelligent Query Processing details</a> page carries the per-feature compatibility requirements.</p>
<h2>Indexing expensive queries: the decision, then the proof</h2>
<p>Only after the predicate is SARGable and the statistics are current does an index change for expensive queries make sense; an index built around a bad predicate fossilises the bad predicate. The design sequence I follow is short and I follow it in order every time, because the order is what decides whether the index seeks or scans.</p>
<p><img decoding="async" loading="lazy" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5NjAgNDQwIiB3aWR0aD0iOTYwIiBoZWlnaHQ9IjQ0MCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsbGVkYnk9InQ3Mjg0OSBkNzI4NDkiPjx0aXRsZSBpZD0idDcyODQ5Ij5JbmRleCBkZXNpZ24gZGVjaXNpb24gc2VxdWVu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yPSJtaWRkbGUiIGZvbnQtZmFtaWx5PSJTYXJhbGEsIEFyaWFsLCBIZWx2ZXRpY2EsIHNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTEiIGZvbnQtd2VpZ2h0PSI3MDAiIGZpbGw9IiNmZmYiPlByb3ZlIGl0IGJlZm9yZSBpdCBzaGlwczwvdGV4dD48dGV4dCB4PSI0ODAuMCIgeT0iMzg4LjAyNTAwMDAwMDAwMDAzIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmb250LWZhbWlseT0iU2FyYWxhLCBBcmlhbCwgSGVsdmV0aWNhLCBzYW5zLXNlcmlmIiBmb250LXNpemU9IjExIiBmaWxsPSIjZmZmIj5SdW4gdGhlIHF1ZXJ5IHdpdGggdGhlIGluZGV4IGluIGEgY29weSBvZiB0aGUgZGF0YWJhc2UsIGNvbXBhcmUgbG9naWNhbCByZWFkcyBhbmQgQ1BVIGZyb20gU1RBVElTVElDUyBJTy9USU1FLDwvdGV4dD48dGV4dCB4PSI0ODAuMCIgeT0iNDAyLjg3NSIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZm9udC1mYW1pbHk9IlNhcmFsYSwgQXJpYWwsIEhlbHZldGljYSwgc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMSIgZmlsbD0iI2ZmZiI+dGhlbiBDUkVBVEUgSU5ERVggLi4uIFdJVEggKE9OTElORSA9IE9OKSBpbiBwcm9kdWN0aW9uIGFuZCByZS1yZWFkIFF1ZXJ5IFN0b3JlIGFmdGVyIGEgZnVsbCBidXNpbmVzcyBjeWNsZS48L3RleHQ+PC9zdmc+" alt="Index design decision sequence for expensive queries in SQL Server: equality columns first, one range column, order columns, INCLUDE for the select list, then write amplification, overlap, filtered and columnstore checks, then proof before production" width="960" height="440"><br /><em>Figure 4. Indexing expensive queries: key design from the predicate, cost checks from the DMVs, proof before CREATE INDEX reaches production.</em></p>
<p>The missing index DMVs are a starting point for expensive queries and nothing more. They propose one index per query shape, never consolidate, over-include, and ignore the write side entirely. I read them together with the usage stats, so every proposal is weighed against what the table already carries and how hard it is written.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="Missing index proposals weighed against existing index usage on the same table">SELECT   OBJECT_SCHEMA_NAME(mid.object_id) + '.' + OBJECT_NAME(mid.object_id)   AS table_name,
         mid.equality_columns,
         mid.inequality_columns,
         mid.included_columns,
         migs.user_seeks + migs.user_scans                                          AS would_have_used,
         CAST(migs.avg_total_user_cost * migs.avg_user_impact / 100.0
              * (migs.user_seeks + migs.user_scans) AS DECIMAL(18, 1))              AS improvement_measure,
         (SELECT COUNT(*) FROM sys.indexes i WHERE i.object_id = mid.object_id AND i.index_id &gt; 0) AS existing_indexes,
         (SELECT SUM(us.user_updates) FROM sys.dm_db_index_usage_stats us
           WHERE us.object_id = mid.object_id AND us.database_id = DB_ID())          AS index_writes_since_restart
FROM     sys.dm_db_missing_index_details AS mid
JOIN     sys.dm_db_missing_index_groups  AS mig  ON mig.index_handle = mid.index_handle
JOIN     sys.dm_db_missing_index_group_stats AS migs ON migs.group_handle = mig.index_group_handle
WHERE    mid.database_id = DB_ID()
ORDER BY improvement_measure DESC;</pre>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="Indexes that cost writes and return nothing: candidates to drop before adding more">SELECT   OBJECT_SCHEMA_NAME(i.object_id) + '.' + OBJECT_NAME(i.object_id)   AS table_name,
         i.name                                                              AS index_name,
         i.type_desc,
         i.is_unique,
         i.has_filter,
         us.user_seeks, us.user_scans, us.user_lookups, us.user_updates,
         us.last_user_seek, us.last_user_scan,
         ps.used_page_count * 8 / 1024                                       AS size_mb
FROM     sys.indexes AS i
LEFT JOIN sys.dm_db_index_usage_stats AS us
       ON us.object_id = i.object_id AND us.index_id = i.index_id AND us.database_id = DB_ID()
JOIN     sys.dm_db_partition_stats AS ps
      ON ps.object_id = i.object_id AND ps.index_id = i.index_id
WHERE    i.index_id &gt; 1                 -- nonclustered only
AND      i.is_primary_key = 0
AND      i.is_unique_constraint = 0
AND      OBJECTPROPERTY(i.object_id, 'IsUserTable') = 1
ORDER BY ISNULL(us.user_seeks, 0) + ISNULL(us.user_scans, 0) + ISNULL(us.user_lookups, 0) ASC,
         us.user_updates DESC;</pre>
<p>Index usage stats reset on restart, so read them against the instance uptime from sys.dm_os_sys_info, and never drop an index on the strength of a counter that has only seen a fortnight; the quarter-end report that uses it is real. When I do add an index for one of the expensive queries, the DDL follows the design sequence exactly, and it goes in online and resumable so the operation can be paused if it starts hurting.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="Covering index for the orders query: equality, then range, then INCLUDE; online and resumable on SQL Server 2022 and 2025 Enterprise">CREATE NONCLUSTERED INDEX ix_orders_customer_date
    ON dbo.orders (customer_id, order_date DESC)
    INCLUDE (status)
    WITH (ONLINE = ON, RESUMABLE = ON, MAX_DURATION = 60 MINUTES,
          SORT_IN_TEMPDB = ON, DATA_COMPRESSION = PAGE);

-- Pause and resume without losing progress if the window closes:
-- ALTER INDEX ix_orders_customer_date ON dbo.orders PAUSE;
-- ALTER INDEX ix_orders_customer_date ON dbo.orders RESUME;

-- Filtered variant when only open orders are ever queried this way:
CREATE NONCLUSTERED INDEX ix_orders_customer_date_open
    ON dbo.orders (customer_id, order_date DESC)
    INCLUDE (status)
    WHERE status IN ('NEW', 'PICKING', 'PACKED')
    WITH (ONLINE = ON, DATA_COMPRESSION = PAGE);</pre>
<p>Three notes on that DDL. The descending key on order_date lets the ORDER BY come straight off the index without a sort, which matters more than it looks on a statement that runs thousands of times an hour. </p>
<p>The filtered variant is smaller and cheaper to maintain, but it only serves queries whose predicate the optimizer can prove is contained in the filter, and a parameterised status predicate usually cannot be proved, so I check the plan rather than assume. And if the expensive query is an aggregation over millions of rows rather than a lookup of dozens, no rowstore key fixes it; a nonclustered columnstore index on the same table, with batch mode, is the right tool and does not interfere with the OLTP path.</p>
<h2>The fix ladder: reversible first, permanent second</h2>
<p><img decoding="async" loading="lazy" src="image/sv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IGNoYW5nZXMgYXMgdGhlIGZpcnN0IHN0ZXA8L3RleHQ+PHRleHQgeD0iNDgwIiB5PSIzMDAiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZvbnQtZmFtaWx5PSJTYXJhbGEsIEFyaWFsLCBIZWx2ZXRpY2EsIHNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTEiIGZvbnQtc3R5bGU9Iml0YWxpYyIgZmlsbD0iIzNkNGY2MiI+KGNvZGUgY2hhbmdlcyBhcmUgc3RpbGwgdGhlIHJpZ2h0IGxvbmctdGVybSBmaXg7IHRoZXkganVzdCBhcmUgbm90IHRoZSBmaXJzdCBtb3ZlIGF0IDAyOjAwKTwvdGV4dD48L3N2Zz4=" alt="Expensive query troubleshooting loop for SQL Server: rank in Query Store, read the actual plan, change one thing, verify against the next interval, keep or roll back with unforce plan, drop index or clear hint" width="960" height="330"><br /><em>Figure 5. The loop for expensive queries: one change per iteration, verified against the same query_id in the next Query Store interval, with the rollback named before the change is made.</em></p>
<p>What makes SQL Server unusual among the engines I work on is how much of the fix ladder for expensive queries is reversible without a deployment. Query Store hints attach OPTION clauses to a query_id without touching application code; plan forcing pins a known-good plan_id while the real fix is engineered; and on 2025 ABORT_QUERY_EXECUTION stops a query shape outright. All three are undone with one procedure call. I use them as the first move and the index or rewrite as the second, because at 02:00 the reversible fix is the safe one, and because a forced plan buys the time to do the permanent fix properly.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="Reversible fixes for an expensive query: hint, force, or block, and how each is undone">-- 1. A hint without a code change: cap the memory grant and pin the estimator behaviour
EXEC sys.sp_query_store_set_hints
     @query_id = 40217,
     @query_hints = N'OPTION (MAX_GRANT_PERCENT = 10, USE HINT(''DISABLE_CE_FEEDBACK''))';

-- Verify it took: hint_id and the query_hints text
SELECT query_id, query_hint_text, source_desc FROM sys.query_store_query_hints WHERE query_id = 40217;

-- Undo
EXEC sys.sp_query_store_clear_hints @query_id = 40217;

-- 2. Force the plan that behaved, while the permanent fix is built
EXEC sys.sp_query_store_force_plan @query_id = 40217, @plan_id = 9877;

-- Verify: is_forced_plan = 1 and no force_failure_count growth
SELECT plan_id, is_forced_plan, force_failure_count, last_force_failure_reason_desc
FROM   sys.query_store_plan WHERE query_id = 40217;

-- Undo
EXEC sys.sp_query_store_unforce_plan @query_id = 40217, @plan_id = 9877;

-- 3. SQL Server 2025 only: stop a runaway query shape at compile time (circuit breaker, not a fix)
EXEC sys.sp_query_store_set_hints
     @query_id = 40217,
     @query_hints = N'OPTION (USE HINT(''ABORT_QUERY_EXECUTION''))';
-- Undo with sp_query_store_clear_hints as above</pre>
<p>Two cautions from experience with expensive queries and forced plans. A forced plan that references an index you later drop fails silently to force and the query falls back to whatever the optimizer picks; force_failure_count is the only place that shows it, so I alert on it. And hints that disable feedback mechanisms should be dated and reviewed, because the whole reason the mechanism existed was to fix the class of problem the hint is masking.</p>
<p>Verification is the same ranking of expensive queries that found the problem, filtered to the query_id, one interval later. I want to see avg_duration_ms and reads_per_row move in the right direction and duration_cv fall, on the same executions count; if executions also collapsed, someone changed the application and I have not measured anything. I keep the before and after rows in the ticket, because the next time someone asks whether the index was worth its write cost, those two rows are the answer.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="Before and after for one query_id, interval by interval">SELECT   i.start_time,
         rs.plan_id,
         rs.count_executions,
         CAST(rs.avg_duration / 1000.0 AS DECIMAL(18, 2))                                    AS avg_duration_ms,
         CAST(rs.avg_cpu_time / 1000.0 AS DECIMAL(18, 2))                                    AS avg_cpu_ms,
         CAST(rs.avg_logical_io_reads / NULLIF(rs.avg_rowcount, 0) AS DECIMAL(18, 1))        AS reads_per_row,
         CAST(rs.stdev_duration / NULLIF(rs.avg_duration, 0) AS DECIMAL(9, 3))               AS duration_cv,
         rs.max_dop
FROM     sys.query_store_runtime_stats          AS rs
JOIN     sys.query_store_runtime_stats_interval AS i ON i.runtime_stats_interval_id = rs.runtime_stats_interval_id
JOIN     sys.query_store_plan                   AS p ON p.plan_id = rs.plan_id
WHERE    p.query_id = 40217
AND      i.start_time &gt;= DATEADD(DAY, -3, SYSUTCDATETIME())
ORDER BY i.start_time, rs.plan_id;</pre>
<h2>Expensive queries: fixes that did not help, and the ones I do not do any more</h2>
<p>Adding MAXDOP hints to expensive queries that were slow because of a spill did nothing except make them serial and slower. Rebuilding indexes to fix an expensive query has, in my experience, fixed the query exactly as often as the rebuild happened to refresh statistics that were the actual problem, which is why I now update statistics with FULLSCAN first and rebuild only for fragmentation that the plan shows is hurting. </p>
<p>Turning off parameter sniffing instance-wide traded one set of expensive queries for another and made every plan mediocre; PSP optimization and OPPO exist precisely so that trade is no longer necessary on 2022 and 2025. And clearing the plan cache &#8220;to see if it helps&#8221; is a way of losing the evidence you needed while creating a compilation storm.</p>
<h2>Where MinervaDB fits</h2>
<p>MinervaDB delivers <a href="https://minervadb.com/sql-server-support/">SQL Server consulting, 24&#215;7 consultative support and remote DBA services</a> for on-premises, Always On and Azure SQL estates. Work on expensive queries is a standing part of it: Query Store based performance health checks, 2019 and 2022 to 2025 upgrade assessments that stage the compatibility level jump behind Query Store and review optimized locking before it is enabled, and index estate reviews that remove the dead weight before adding anything. We work alongside your DBAs and your Microsoft support agreement rather than in place of either.</p>
<p>Test every query, hint, forced plan and index in this post on a non-production copy of your database with a representative workload before you apply it to production, keep backups and a tested restore path current so that every change has a rollback, and maintain your disaster recovery posture throughout. The method for expensive queries holds across workloads. Which of these fixes pays on yours is something only your Query Store can tell you.</p>
<p><a href="https://minervadb.com/sql-server-expensive-queries/">SQL Server 2025 Expensive Queries: 7 Proven Ways to Find and Fix Them by Latency and Resource Cost</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>A Fail-Fast PostgreSQL Migration Preflight for CI</title>
        <link>https://percona.community/blog/2026/09/08/postgresql-migration-preflight-ci/</link>
        <pubDate>Tue, 08 Sep 2026 11:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/a-fail-fast-postgresql-migration-preflight-for-ci/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>A database migration can be syntactically correct and still be a poor release candidate. A regular index build can block writes, an ALTER TABLE may wait behind a conflicting lock or hold a strong lock longer than expected, and a large data modification can turn a routine deployment into an incident.</p>
<p><a href="https://percona.community/blog/2026/09/08/postgresql-migration-preflight-ci/">A Fail-Fast PostgreSQL Migration Preflight for CI</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>A database migration can be syntactically correct and still be a poor release candidate. A regular index build can block writes, an <code>ALTER TABLE</code> may wait behind a conflicting lock or hold a strong lock longer than expected, and a large data modification can turn a routine deployment into an incident.</p>
<p>Static analysis cannot determine whether a migration is safe in production. It does not know table size, traffic, open transactions, data distribution, or how the migration runner executes the file. But it can catch a smaller class of mistakes where the SQL itself provides strong evidence of operational risk.</p>
<p>I built <a href="https://github.com/yZangEren/postgres-migration-preflight" target="_blank" rel="noopener noreferrer">postgres-migration-preflight</a> as an experiment in that narrower problem. It parses PostgreSQL SQL into an abstract syntax tree (AST), evaluates statements in source order, and exits non-zero when configured blocking rules fire. The examples and documentation references below use PostgreSQL 18.</p>
<p>The goal is not to certify a migration as production-safe. It is to make obvious hazards difficult to merge unnoticed.</p>
<h2>Focus on risks visible from SQL</h2>
<p>The first version deliberately limits itself to rules that can be explained from the migration text:</p>
<ul>
<li>regular <code>CREATE INDEX</code> and <code>DROP INDEX</code> operations;</li>
<li>selected lock-sensitive <code>ALTER TABLE</code> operations;</li>
<li>destructive DDL such as <code>DROP TABLE</code> and <code>TRUNCATE</code>;</li>
<li><code>UPDATE</code> or <code>DELETE</code> statements without a <code>WHERE</code> clause;</li>
<li>DDL without a preceding non-zero session-level <code>lock_timeout</code>;</li>
<li>SQL that the parser cannot understand.</li>
</ul>
<p>These rules are heuristics, not proofs. A normal <code>CREATE INDEX</code> allows reads but blocks inserts, updates, and deletes while the index is built. <code>CREATE INDEX CONCURRENTLY</code> avoids blocking those writes, but PostgreSQL performs two table scans, waits for relevant transactions, does more total work, and can leave an invalid index after certain failures. It also cannot run inside a transaction block. A migration framework may create such a transaction even when the SQL file contains no <code>BEGIN</code>, so the finding asks the reviewer to check both the index operation and the runner.</p>
<p>A normal <code>DROP INDEX</code> acquires an <code>ACCESS EXCLUSIVE</code> lock on the table. Its concurrent form reduces that interference but cannot run in a transaction block, cannot use <code>CASCADE</code>, and cannot remove an index that supports a <code>UNIQUE</code> or <code>PRIMARY KEY</code> constraint.</p>
<p><code>ALTER TABLE</code> is a family of operations rather than one risk category. A column type change normally rewrites the table, but PostgreSQL can avoid the rewrite for some binary-compatible conversions. <code>SET NOT NULL</code> ordinarily scans existing rows, but can skip the scan when a valid <code>CHECK</code> constraint proves that no <code>NULL</code> can exist. A foreign key added as <code>NOT VALID</code> can enforce new writes before a separate <code>VALIDATE CONSTRAINT</code> checks existing rows with a less disruptive lock.</p>
<p>The current lab still blocks every column type change conservatively because it has no catalog context. That severity is a policy choice for review, not proof that a particular conversion will rewrite a table.</p>
<h2>Preserve order and fail closed</h2>
<p>Some protections matter only when they appear before the statement they are meant to protect:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">ALTER</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">users</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">ALTER</span><span class="w"> </span><span class="k">COLUMN</span><span class="w"> </span><span class="n">email</span><span class="w"> </span><span class="k">TYPE</span><span class="w"> </span><span class="nb">varchar</span><span class="p">(</span><span class="mi">320</span><span class="p">);</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">SET</span><span class="w"> </span><span class="n">lock_timeout</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'2s'</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>The timeout does not protect the preceding <code>ALTER TABLE</code>. The analyzer walks statements in source order and tracks the session-level <code>lock_timeout</code>. A non-zero value counts only for subsequent DDL, and setting it back to <code>0</code> disables the protection again.</p>
<p>This is a review signal, not a claim that a timeout makes DDL safe. <code>lock_timeout</code> limits only time spent waiting to acquire a lock. After the lock is acquired, an operation can continue much longer. An equal or shorter <code>statement_timeout</code> can also fire first.</p>
<p>The analyzer uses <code>pgsql-ast-parser</code> instead of regular expressions so supported rules operate on statement structure. It can distinguish an <code>UPDATE</code> with a predicate, a concurrent index declaration, and individual <code>ALTER TABLE</code> actions. An AST still does not provide catalog state or workload context. If the parser cannot understand valid PostgreSQL syntax, the tool emits <code>SQL_PARSE_ERROR</code> at blocker severity and exits non-zero. Parser failures are coverage gaps requiring review, not evidence that PostgreSQL would reject the migration.</p>
<h2>Compare passing and blocked migrations</h2>
<p>A deliberately small passing example is:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SET</span><span class="w"> </span><span class="n">lock_timeout</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'2s'</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">SET</span><span class="w"> </span><span class="n">statement_timeout</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'15min'</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">CREATE</span><span class="w"> </span><span class="k">INDEX</span><span class="w"> </span><span class="n">CONCURRENTLY</span><span class="w"> </span><span class="n">idx_users_last_seen_at</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="n">users</span><span class="w"> </span><span class="p">(</span><span class="n">last_seen_at</span><span class="p">);</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">UPDATE</span><span class="w"> </span><span class="n">users</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">SET</span><span class="w"> </span><span class="n">archived</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">true</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">WHERE</span><span class="w"> </span><span class="n">id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">42</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>The checker parses four statements and reports no findings. That result does not make the migration automatically safe: the caller still has to ensure the concurrent index statement is not executed inside a transaction block.</p>
<p>The blocked example contains stronger static signals:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-2" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">CREATE</span><span class="w"> </span><span class="k">INDEX</span><span class="w"> </span><span class="n">idx_users_email</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="n">users</span><span class="w"> </span><span class="p">(</span><span class="n">email</span><span class="p">);</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">ALTER</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">users</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">ALTER</span><span class="w"> </span><span class="k">COLUMN</span><span class="w"> </span><span class="n">email</span><span class="w"> </span><span class="k">TYPE</span><span class="w"> </span><span class="nb">varchar</span><span class="p">(</span><span class="mi">320</span><span class="p">);</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">DELETE</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">audit_events</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>The checker reports five findings: two critical, one high, and two medium. The critical findings cover the column type change and unbounded delete. The regular index build is high severity, while the medium findings identify DDL without a preceding non-zero <code>lock_timeout</code>. The process exits with code <code>1</code>, so CI can stop before deployment.</p>
<p>The examples test rule behavior, not the hardest PostgreSQL migration problems. A <code>WHERE</code> clause can still affect most rows of a large table, and a binary-compatible type change can be much cheaper than another statement with similar syntax. Production-scale changes still require workload-aware review.</p>
<h2>Give CI a simple contract</h2>
<p>The CLI exits with <code>0</code> when no blocking finding exists, <code>1</code> when the migration is blocked, and <code>2</code> for invalid command usage. A minimal workflow is:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">yaml</span><button class="code-block__copy" type="button" data-copy-target="codeblock-3" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl">- <span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">Install migration preflight</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">run</span><span class="p">:</span><span class="w"> </span><span class="l">npm ci</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span>- <span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">Test the analyzer</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">run</span><span class="p">:</span><span class="w"> </span><span class="l">npm test</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span>- <span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">Check the pending migration</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">run</span><span class="p">:</span><span class="w"> </span><span class="l">node src/check-migration.mjs path/to/migration.sql</span></span></span></code></pre>
</div>
</div>
</div>
<p>JSON output can feed CI annotations or review tooling. The current test suite covers the passing case, the risky case, ordered timeout handling, and parser failure. I would introduce a gate gradually: start with rules supported by strong SQL evidence, measure false positives, and only then make broader organization-specific policies blocking.</p>
<p>The checker reports findings rather than rewriting migrations. Adding <code>CONCURRENTLY</code> can change transaction requirements and recovery steps, while splitting constraint creation and validation changes deployment sequencing. Those decisions still belong to the developer and reviewer.</p>
<h2>Keep the boundary explicit</h2>
<p>SQL text cannot reveal relation size, data distribution, long-running transactions, current lock holders, replica lag, WAL capacity, application traffic, or a migration framework’s transaction policy. PostgreSQL versions also differ in DDL behavior and available optimizations.</p>
<p>A passing preflight should therefore be followed by production-sized rehearsal and runtime verification for consequential migrations. That may include checking expected scans or rewrites, monitoring locks and replica lag, planning rollback procedures, and verifying constraints and indexes afterward. Following a failed concurrent index build, catalog state such as <code>pg_index.indisvalid</code> also needs inspection.</p>
<p>The value of a static gate is not that it understands production. Its value is that some mistakes do not require production knowledge to recognize. Catching those mistakes in CI leaves reviewers more time for the harder questions that static analysis cannot answer.</p>
<p>That is the boundary I want <code>postgres-migration-preflight</code> to maintain: a small, explainable first line of defense for PostgreSQL migrations, not a production-readiness oracle.</p>
<h2>References</h2>
<ul>
<li><a href="https://www.postgresql.org/docs/18/indexes-intro.html" target="_blank" rel="noopener noreferrer">PostgreSQL 18: Introduction to indexes</a></li>
<li><a href="https://www.postgresql.org/docs/18/sql-createindex.html" target="_blank" rel="noopener noreferrer">PostgreSQL 18: CREATE INDEX</a></li>
<li><a href="https://www.postgresql.org/docs/18/sql-dropindex.html" target="_blank" rel="noopener noreferrer">PostgreSQL 18: DROP INDEX</a></li>
<li><a href="https://www.postgresql.org/docs/18/sql-altertable.html" target="_blank" rel="noopener noreferrer">PostgreSQL 18: ALTER TABLE</a></li>
<li><a href="https://www.postgresql.org/docs/18/runtime-config-client.html" target="_blank" rel="noopener noreferrer">PostgreSQL 18: Client connection defaults, including <code>lock_timeout</code></a></li>
<li><a href="https://www.postgresql.org/docs/18/catalog-pg-index.html" target="_blank" rel="noopener noreferrer">PostgreSQL 18: <code>pg_index</code> catalog</a></li>
</ul>
<p><em>This post is part of the <a href="https://percona.community/blog/write-for-percona-community/">Percona Community Writers Program</a>.</em></p>
<p><a href="https://percona.community/blog/2026/09/08/postgresql-migration-preflight-ci/">A Fail-Fast PostgreSQL Migration Preflight for CI</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Enterprise Server Maintenance Releases</title>
        <link>https://mariadb.com/resources/blog/mariadb-enterprise-server-maintenance-releases/</link>
        <pubDate>Mon, 07 Sep 2026 17:50:25 +0000</pubDate>
        <dc:creator>Daniel Bartholomew</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-enterprise-server-maintenance-releases/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>New security maintenance releases for MariaDB Enterprise Server: 11.8.9-6, 11.4.13-10, and 10.6.28-24 are now available. Download Now Notable Release Updates […]</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-enterprise-server-maintenance-releases/">MariaDB Enterprise Server Maintenance Releases</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>New security maintenance releases for MariaDB Enterprise Server: 11.8.9-6, 11.4.13-10, and 10.6.28-24 are now available. Download Now MariaDB Enterprise Server is an enhanced, hardened and secured version of MariaDB Community Server that delivers enterprise reliability, stability and long-term support as well as greater operational efficiency when…</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-enterprise-server-maintenance-releases/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/mariadb-enterprise-server-maintenance-releases/">MariaDB Enterprise Server Maintenance Releases</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>SQL Server 2025 Performance, Scalability and High Availability: What Changed On-Premises and in the Cloud</title>
        <link>https://minervadb.com/sql-server-2025-performance-scalability-ha/</link>
        <pubDate>Mon, 07 Sep 2026 11:13:51 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/sql-server-2025-performance-scalability-and-high-availability-what-changed-on-premises-and-in-the-cloud/</guid>
        <source url="https://minervadb.com/">MinervaDB</source>
        <description><![CDATA[<p>SQL Server 2025 went generally available on 18 November 2025 and, as of this writing, sits at Cumulative Update 8 (build 17.0.4075.5, 13 August 2026). Strip away the AI features that took most of the [...]</p>
<p><a href="https://minervadb.com/sql-server-2025-performance-scalability-ha/">SQL Server 2025 Performance, Scalability and High Availability: What Changed On-Premises and in the Cloud</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><img decoding="async" loading="lazy" src="https://minervadb.com/wp-content/uploads/2026/09/sql-server-2025-performance-scalability-high-availability.png" alt="SQL Server 2025 performance, scalability and high availability on-premises and in the cloud" width="1200" height="630" class="aligncenter size-full wp-image-93027"></p>
<p>SQL Server 2025 went generally available on 18 November 2025 and, as of this writing, sits at Cumulative Update 8 (build 17.0.4075.5, 13 August 2026). Strip away the AI features that took most of the launch coverage and there are four changes in this release that alter how a production SQL Server behaves under load and during a failover.</p>
<p>The first is optimized locking, which replaces per-row locks held to commit with a single transaction-ID lock. The second is tempdb space governance and ADR in tempdb, which turn the most common cause of a 3 a.m. outage into a per-workload error. The third is a set of Always On availability group knobs (a configurable group commit time, endpoint flow control, immediate failover on persistent health issues, full and differential backups on secondaries). The fourth is a new Standard edition ceiling of 32 cores and 256 GB of buffer pool with Resource Governor included, which is the largest scalability change for mid-market estates since 2016 SP1.</p>
<p>This post works through each of them for SQL Server 2025 performance, scalability and high availability, with the T-SQL to enable and verify them, and then lays out what is and is not available when the same engine runs in Azure SQL Managed Instance, Azure SQL Database, and Amazon RDS.</p>
<p>Everything here is version-pinned to 17.x and was checked against the current Microsoft Learn documentation. Where a feature is preview-only behind <code>PREVIEW_FEATURES</code>, I say so, because those are not production features however good the demo looks.</p>
<h2>Which SQL Server 2025 build you should be on</h2>
<p>The release cadence has settled into a monthly CU. The builds that matter for a production plan:</p>
<div>
<table>
<thead>
<tr>
<th>Build</th>
<th>Version</th>
<th>Date</th>
<th>Why it matters</th>
</tr>
</thead>
<tbody>
<tr>
<td>RTM (GA)</td>
<td>17.0.1000.x</td>
<td>18 Nov 2025</td>
<td>Lifecycle start; mainstream support ends 7 Jan 2031, extended 7 Jan 2036</td>
</tr>
<tr>
<td>CU3</td>
<td>17.0.4025.3</td>
<td>12 Mar 2026</td>
<td>Microsoft Entra authentication for Change Event Streaming on Arc-enabled and Azure VM instances</td>
</tr>
<tr>
<td>CU6 + GDR</td>
<td>17.0.4060.2</td>
<td>14 Jul 2026</td>
<td>Security-only branch for estates that cannot take CUs</td>
</tr>
<tr>
<td>CU8</td>
<td>17.0.4075.5</td>
<td>13 Aug 2026</td>
<td>Current CU at time of writing; the baseline I recommend for a new deployment</td>
</tr>
</tbody>
</table>
</div>
<p>Two edition facts change the sizing conversation before any feature does. Standard edition now runs on the lesser of 4 sockets or 32 cores and addresses 256 GB of buffer pool, up from 24 cores and 128 GB in 2022, and it gets Resource Governor for the first time. Web edition is discontinued, and Express grows to a 50 GB database limit with the Advanced Services features folded in. A great many Enterprise licences in the field exist only because a 24-core or 128 GB ceiling was in the way; on SQL Server 2025 that argument needs re-examining with the actual workload numbers.</p>
<h2>Performance: optimized locking is the feature to plan around</h2>
<p>Optimized locking arrived in Azure SQL Database in 2023 and is on by default there. SQL Server 2025 brings it on-premises as an opt-in per database, and it is the single largest change to the engine&#8217;s concurrency behaviour since row versioning. It has two parts. Transaction ID (TID) locking: every row already carries the transaction ID of the last writer, so instead of holding an X lock on every modified row until commit, the engine takes an X lock on the transaction ID itself and releases the row and page locks as soon as each row is written; anyone who needs to wait for that row takes an S lock on the TID.</p>
<p>Lock after qualification (LAQ): with read committed snapshot isolation on, an UPDATE or DELETE evaluates its predicate against the latest committed row version without taking a U lock first, and only locks rows that actually qualify.</p>
<figure>
<img decoding="async" loading="lazy" src="https://minervadb.com/wp-content/uploads/2026/09/sql-server-2025-optimized-locking-lock-lifetime.png" alt="SQL Server 2025 optimized locking: lock lifetime for a 1,000-row UPDATE with and without TID locking and lock after qualification" width="1800" height="800" class="aligncenter size-full wp-image-93028"><figcaption>With SQL Server 2025 optimized locking the lock count for a large UPDATE goes from proportional to rows touched to constant. That is why lock memory and escalation both fall away.</figcaption></figure>
<p>Enabling it on SQL Server 2025 is three statements, in this order, because optimized locking requires accelerated database recovery (the persistent version store is what makes releasing row locks early safe) and LAQ only works under RCSI:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- SQL Server 2025: enable optimized locking on one database, in dependency order.
-- ADR is a prerequisite; RCSI is required for the LAQ half of the feature.
-- ALTER DATABASE ... SET READ_COMMITTED_SNAPSHOT needs exclusive access: schedule it.
ALTER DATABASE [ops] SET ACCELERATED_DATABASE_RECOVERY = ON;
ALTER DATABASE [ops] SET READ_COMMITTED_SNAPSHOT = ON WITH ROLLBACK IMMEDIATE;
ALTER DATABASE [ops] SET OPTIMIZED_LOCKING = ON;

-- Verify all three; every column must be 1
SELECT name,
       is_accelerated_database_recovery_on,
       is_read_committed_snapshot_on,
       is_optimized_locking_on
FROM   sys.databases
WHERE  name = N'ops';

-- Rollback path: reverse order. Optimized locking must be off before ADR can be turned off.
-- ALTER DATABASE [ops] SET OPTIMIZED_LOCKING = OFF;
-- ALTER DATABASE [ops] SET ACCELERATED_DATABASE_RECOVERY = OFF;</pre>
<p>What you see afterwards in <code>sys.dm_tran_locks</code> is a single <code>XACT</code> resource per writing transaction instead of a list of <code>KEY</code> and <code>PAGE</code> entries. Blocking shows up as the three new wait types, and the waiting session&#8217;s <code>wait_resource</code> reads <code>XACT:</code> followed by the transaction ID:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- SQL Server 2025: who is holding the TID lock, and who is waiting on it
SELECT l.request_session_id  AS spid,
       l.resource_type,          -- XACT for TID locks
       l.request_mode,           -- X = writer, S = waiter
       l.request_status,
       l.resource_description,
       r.wait_type,              -- LCK_M_S_XACT_MODIFY / LCK_M_S_XACT_READ / LCK_M_S_XACT
       r.wait_time
FROM   sys.dm_tran_locks AS l
LEFT JOIN sys.dm_exec_requests AS r
       ON r.session_id = l.request_session_id
WHERE  l.resource_type = N'XACT'
ORDER  BY l.request_status, l.request_session_id;

-- Is LAQ being skipped on your workload? locking_stats fires every few minutes per database
CREATE EVENT SESSION [laq_watch] ON SERVER
ADD EVENT sqlserver.locking_stats,
ADD EVENT sqlserver.lock_after_qual_stmt_abort
ADD TARGET package0.event_file (SET filename = N'laq_watch')
WITH (STARTUP_STATE = ON);
ALTER EVENT SESSION [laq_watch] ON SERVER STATE = START;</pre>
<p>Now the part that has to be in the change ticket. LAQ changes the answer a query can return under concurrent writes, because it evaluates the predicate against the last committed version rather than blocking on the uncommitted one. Microsoft&#8217;s own example is the honest one: transaction one runs <code>UPDATE t SET b = 2 WHERE a = 1</code> and has not committed; transaction two runs <code>UPDATE t SET b = 3 WHERE b = 2</code>. Without LAQ, two blocks, then sees <code>b = 2</code> and updates it. With LAQ, two reads the committed <code>b = 1</code>, the predicate fails, and it updates nothing.</p>
<p>Neither result is wrong under READ COMMITTED, but any application that silently depended on the blocking order will behave differently. If a workload relies on that order, it needs REPEATABLE READ or SERIALIZABLE on those statements, not a global rollback of the feature. LAQ also steps aside on its own for statements with <code>UPDLOCK</code>, <code>XLOCK</code>, <code>HOLDLOCK</code> or <code>READCOMMITTEDLOCK</code> hints, on tables with a columnstore index, for MERGE, and for statements with variable assignment or an OUTPUT clause; the <code>locking_stats</code> event above is how you find out how often that is happening.</p>
<p>My deployment stance: enable on one busy OLTP database at a time, after ADR has been on for at least a full business cycle so the persistent version store size is known, with the deadlock and blocking monitors already comparing against a pre-change baseline. Expect the first thing to disappear to be lock escalation on wide UPDATEs, and the wait type that appears in its place to be <code>LCK_M_S_XACT_MODIFY</code> where <code>LCK_M_U</code> used to be.</p>
<h3>The rest of the query-processing list</h3>
<p>Optional parameter plan optimization extends the parameter-sensitive plan machinery from 2022 to the <code>WHERE (@p IS NULL OR col = @p)</code> pattern that every reporting stored procedure has; it compiles separate plans for the NULL and non-NULL cases instead of one plan that is wrong for one of them. Degree of parallelism feedback, which was off by default in 2022, is now on: Query Store watches repeated executions and lowers MAXDOP for queries whose parallelism is not paying for itself.</p>
<p>Cardinality estimation feedback now covers expressions, not just join and containment assumptions. All three are compatibility level 170 behaviours with Query Store on, which is the pattern since 2022: the intelligent query processing features are Query Store features, so a database with Query Store off gets none of them.</p>
<p>The <code>ABORT_QUERY_EXECUTION</code> hint is small and useful. Attached through Query Store hints, it stops a known-bad query shape from executing at all until someone fixes it, which is the right answer to the runaway report that a business user re-runs every ten minutes:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- Find the query_id from Query Store, then pin the hint to it. Nobody can run this shape now.
EXEC sys.sp_query_store_set_hints
     @query_id      = 4711,
     @query_hints   = N'OPTION (ABORT_QUERY_EXECUTION)';

-- Verify, and remove when the query is rewritten
SELECT query_id, query_hint_text, source_desc
FROM   sys.query_store_query_hints;

EXEC sys.sp_query_store_clear_hints @query_id = 4711;</pre>
<h3>tempdb: governance and ADR</h3>
<p>Two tempdb changes in SQL Server 2025, and the first is the one I would put on every SQL Server 2025 instance on day one. Resource Governor can now cap the tempdb data space a workload group may use, and a session that crosses the cap gets error 1138 instead of filling the drive for everyone. The trap is that a percentage limit is only in force when the tempdb data files are either all capped with autogrow, or all uncapped with autogrow off; the default install (unlimited MAXSIZE, autogrow on) silently satisfies neither, and you get warning 10989 rather than a working limit. Use the MB form unless you have re-laid tempdb.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- SQL Server 2025 tempdb governance: cap ad hoc reporting at 64 GB of tempdb data; leave the OLTP group unlimited
CREATE WORKLOAD GROUP [wg_reporting]
    WITH (GROUP_MAX_TEMPDB_DATA_MB = 65536,
          MAX_DOP = 8)
    USING [default];
ALTER RESOURCE GOVERNOR RECONFIGURE;

-- What each group is using right now, and how often the cap has fired
SELECT g.name,
       g.tempdb_data_space_kb / 1024                AS tempdb_mb_now,
       g.peak_tempdb_data_space_kb / 1024           AS tempdb_mb_peak,
       g.total_tempdb_data_limit_violation_count    AS cap_hits
FROM   sys.dm_resource_governor_workload_groups AS g
ORDER  BY g.peak_tempdb_data_space_kb DESC;

-- Error the offending session sees:
-- Msg 1138, Level 17: Could not allocate a new page for database 'tempdb'
-- because that would exceed the limit set for workload group 'wg_reporting'.</pre>
<p>What is counted: temp tables, table variables, table-valued parameters, cursors, and every spill (sorts, hash, spools). What is not: the version store, including the ADR persistent version store, and the tempdb log. Global temp tables are charged to whichever group inserted the first row, which is a fairness problem you should know about before you cap a shared ETL group. Standard edition has Resource Governor now, so this applies to the mid-market estate too.</p>
<p>The second change is accelerated database recovery inside tempdb. Long rollbacks of temp-table-heavy batches used to hold the engine hostage exactly the way long rollbacks in user databases did before 2019; with ADR in tempdb they become instant. On Linux, tempdb can additionally sit on <code>tmpfs</code>, which is worth measuring on a memory-rich host before assuming NVMe is fast enough.</p>
<h3>Backups: ZSTD and immutable targets</h3>
<p>SQL Server 2025 backup compression gains a ZSTD option alongside the MS_XPRESS default and QAT. Microsoft&#8217;s claim is faster and smaller than MS_XPRESS; measure your own backup and restore windows before switching a fleet, because ZSTD trades CPU for ratio and a CPU-bound instance will notice:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">BACKUP DATABASE [ops]
TO URL = N'https://${STORAGE_ACCOUNT}.blob.core.windows.net/backups/ops_full.bak'
WITH COMPRESSION (ALGORITHM = ZSTD),
     CHECKSUM,
     STATS = 5;

-- Compression ratio per backup, to justify the change with a number
SELECT TOP (20) b.database_name, b.backup_start_date,
       b.backup_size / 1048576.0            AS size_mb,
       b.compressed_backup_size / 1048576.0 AS compressed_mb,
       b.backup_size * 1.0 / NULLIF(b.compressed_backup_size, 0) AS ratio
FROM   msdb.dbo.backupset AS b
WHERE  b.type = 'D'
ORDER  BY b.backup_start_date DESC;</pre>
<p>Backup to URL now works against immutable blob storage, which is the ransomware answer that used to require a third-party product, and on an availability group secondary it can now be a full or differential backup rather than copy-only, which changes how the backup preference on an AG should be set. More on that below.</p>
<h2>Scalability: the Standard edition ceiling and read scale-out</h2>
<p>The scalability story in SQL Server 2025 is less about a single engine change than about where the walls moved. A 32-core, 256 GB Standard edition instance is a serious OLTP server. Combined with Resource Governor to protect it from itself, tempdb governance, and optimized locking to keep lock memory flat, the workload that needed Enterprise for headroom reasons in 2022 frequently does not in SQL Server 2025.</p>
<p>The features that remain Enterprise-only and still matter for scale are the ones that always did: online index operations at full scope, partitioned table parallelism at its best, unlimited memory, and the full Always On availability group feature set (Standard is limited to basic availability groups with one database per group and no readable secondary).</p>
<p>For read scale-out on Enterprise, two small changes make readable secondaries first-class rather than a compromise. Query Store is now on by default for readable secondaries, so the plan regressions on the reporting replica are visible and fixable with the same hints mechanism as the primary. And SQL Server 2025 creates persisted statistics on readable secondaries; before this, statistics the secondary needed but the primary never built lived in tempdb on the secondary and evaporated on restart, which is why reporting on a secondary was slow every Monday morning after patching.</p>
<p>Columnstore gets ordered nonclustered columnstore indexes (the ordered clustered form arrived in 2022), online build for them, and a batch-mode path for a set of built-in functions and <code>DATETRUNC</code>. For an HTAP-style operational reporting table that is the combination that lets a single instance carry both the OLTP write path and the aggregate reads without a separate analytics copy:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- SQL Server 2025 ordered NCCI, built online, on a hot OLTP table used for operational reporting.
-- ORDER controls rowgroup elimination on the reporting predicate; keep it to one or two columns.
CREATE NONCLUSTERED COLUMNSTORE INDEX ncci_order_line_reporting
    ON sales.order_line (order_date, region_id, sku_id, quantity, net_amount)
    ORDER (order_date)
    WITH (ONLINE = ON, MAXDOP = 4, COMPRESSION_DELAY = 10 MINUTES);

-- Rowgroup elimination evidence after a day of load
SELECT rg.state_desc, COUNT(*) AS rowgroups,
       MIN(rg.total_rows) AS min_rows, MAX(rg.total_rows) AS max_rows
FROM   sys.dm_db_column_store_row_group_physical_stats AS rg
WHERE  rg.object_id = OBJECT_ID(N'sales.order_line')
GROUP  BY rg.state_desc;</pre>
<h2>High availability: what changed in Always On</h2>
<p>None of the availability group changes in SQL Server 2025 is a headline feature and together they are the most useful HA release since 2016. Each one is a knob for a specific failure we have all watched happen.</p>
<figure>
<img decoding="async" loading="lazy" src="https://minervadb.com/wp-content/uploads/2026/09/sql-server-2025-availability-group-new-knobs.png" alt="SQL Server 2025 availability group topology showing where commit time, flow control, restart threshold, backups on secondary and TDS 8 apply" width="1800" height="860" class="aligncenter size-full wp-image-93029"><figcaption>Nothing here is new topology. Every box carries a SQL Server 2025 change that shortens a specific part of the failover or offloads a specific job from the primary.</figcaption></figure>
<p>Availability group commit time is the one to test carefully, and the first thing to know is which way it works. The primary already batches commits for up to 10 milliseconds before shipping the log block to secondaries; that grouping is what keeps a busy AG from saturating the network with tiny sends. SQL Server 2025 exposes the window as an instance-level <code>sp_configure</code> option (default 0, meaning the built-in 10 ms), and the use case is lowering it: a latency-sensitive workload with modest transaction volume can shave up to 10 ms off synchronous commit at the cost of more, smaller sends.</p>
<p>On a high-volume system leave it alone; the batching is doing you a favour. Measure with <code>HADR_SYNC_COMMIT</code> waits per transaction before and after, at the same time of day:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- SQL Server 2025 AG commit time: baseline first
SELECT wait_type, waiting_tasks_count, wait_time_ms,
       wait_time_ms * 1.0 / NULLIF(waiting_tasks_count, 0) AS avg_ms
FROM   sys.dm_os_wait_stats
WHERE  wait_type IN (N'HADR_SYNC_COMMIT', N'WRITELOG');

-- Then shorten the group commit window on the primary instance and re-measure
-- (advanced option; 0 = engine default of 10 ms; no restart required)
EXEC sys.sp_configure N'show advanced options', 1;  RECONFIGURE;
EXEC sys.sp_configure N'availability group commit time', 2;  RECONFIGURE;

-- Flow control between HADR endpoints, also instance-wide; the primary uses it to
-- detect a secondary falling behind. Check the option's current name and default
-- with sp_configure before scripting it: it is new in 17.x.
EXEC sys.sp_configure N'ucs_flow_control';</pre>
<p>SQL Server 2025&#8217;s fast failover for persistent health issues closes a gap that has existed since 2012. When the AG resource&#8217;s health check fails, WSFC&#8217;s default is to try restarting the resource in place before failing it over, which on a node with a genuine problem adds a minute or more of unavailability while a restart that cannot succeed is attempted. Setting the restart threshold to zero on the AG resource tells the cluster to fail over immediately. This is set through the cluster, and the release notes document it alongside better health-check timeout diagnostics so that you can tell a genuine hang from a synchronisation stall:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="powershell"># On any WSFC node: fail over the AG resource immediately on a persistent health failure
# instead of attempting an in-place restart first (default RestartThreshold is 3 within RestartPeriod)
Get-ClusterResource -Name 'ag_ops' | Set-ClusterParameter -Name RestartThreshold -Value 0

# Verify
Get-ClusterResource -Name 'ag_ops' | Get-ClusterParameter -Name RestartThreshold, RestartPeriod, HealthCheckTimeout</pre>
<p>SQL Server 2025 backups on secondaries are no longer restricted to copy-only. That sentence changes the design of every Enterprise AG&#8217;s backup plan: the full and differential chain can now run entirely on a secondary, with the log backups wherever the backup preference sends them, and the primary&#8217;s I/O is left for the workload. Set <code>AUTOMATED_BACKUP_PREFERENCE = SECONDARY_ONLY</code> and make sure the backup job checks <code>sys.fn_hadr_backup_is_preferred_replica</code> before running, as it always should have.</p>
<p>The remaining items are operational quality of life: a listener IP can be removed without dropping the listener, read-only and read-write routing can be set to NONE to pull traffic back to the primary during maintenance, distributed availability groups now work between two contained availability groups (which makes the contained AG, introduced in 2022, usable for DR rather than only for HA), the asynchronous commit path in distributed AGs is less prone to saturating the link, and every replication and HA channel, including WSFC, AG endpoints, FCI, log shipping and linked servers, can run TDS 8.0 over TLS 1.3.</p>
<p>Databases that fail to read their persisted AG configuration during a network interruption now move to RESOLVING rather than staying in an ambiguous state, which is a small change that removes a confusing manual step from more than one runbook we maintain.</p>
<h2>On-premises versus cloud: where each feature actually runs</h2>
<p>The same 17.x engine appears in four shapes, and the feature list is not the same in each. The table is what I hand to clients deciding where a SQL Server 2025 workload should live.</p>
<figure>
<img decoding="async" loading="lazy" src="https://minervadb.com/wp-content/uploads/2026/09/sql-server-2025-deployment-shapes-on-premises-cloud.png" alt="SQL Server 2025 deployment shapes: self-managed, Azure SQL Managed Instance, Azure SQL Database and Amazon RDS, and which control surfaces each exposes" width="1800" height="600" class="aligncenter size-full wp-image-93031"><figcaption>Pick the shape by which control surface your failure modes need, not by feature list.</figcaption></figure>
<div>
<table>
<thead>
<tr>
<th>Capability</th>
<th>SQL Server 2025 self-managed (on-prem, Azure VM, EC2, Arc-enabled)</th>
<th>Azure SQL Managed Instance</th>
<th>Azure SQL Database</th>
<th>Amazon RDS for SQL Server</th>
</tr>
</thead>
<tbody>
<tr>
<td>Engine version and patching</td>
<td>17.x, you apply CUs; CU8 current</td>
<td>Always-up-to-date policy already carried most SQL Server 2025 features before GA; SQL Server 2025 update policy pins the surface</td>
<td>Continuously updated; ahead of the boxed product</td>
<td>SQL Server 2025 supported since 21 Jul 2026 (Enterprise, Standard, Developer); CU applied on the AWS schedule</td>
</tr>
<tr>
<td>Optimized locking</td>
<td>Opt-in per database; ADR then RCSI then enable</td>
<td>Always on (update policy 2025 or always-up-to-date)</td>
<td>Always on since 2023</td>
<td>Opt-in per database, same T-SQL; verify against the RDS feature list for your engine version</td>
</tr>
<tr>
<td>tempdb space governance</td>
<td>Resource Governor, Standard and Enterprise</td>
<td>Available; MI exposes Resource Governor</td>
<td>Not applicable; per-database resource limits instead</td>
<td>Resource Governor is available on RDS; workload-group DDL runs as the master user</td>
</tr>
<tr>
<td>Always On AG</td>
<td>Full control: commit time, flow control, restart threshold, backups on secondary, contained and distributed AGs</td>
<td>Managed failover groups and built-in HA; AG internals not exposed</td>
<td>Built-in HA, geo-replication, failover groups</td>
<td>Multi-AZ uses AGs (Enterprise) or DBM (Standard) managed by AWS; readable secondaries on Enterprise; AG knobs not exposed</td>
</tr>
<tr>
<td>Backups</td>
<td>ZSTD, immutable blob, full/diff on secondaries</td>
<td>Automated; compression and targets managed</td>
<td>Automated</td>
<td>Automated snapshots plus native backup to S3 via <code>rds_backup_database</code>; compression option set by RDS</td>
</tr>
<tr>
<td>Standard edition 32-core / 256 GB</td>
<td>Yes, plus Resource Governor</td>
<td>Not applicable (vCore tiers)</td>
<td>Not applicable</td>
<td>Yes; instance class sets the ceiling below that anyway on most classes</td>
</tr>
<tr>
<td>Change Event Streaming, Fabric mirroring</td>
<td>Preview; targets are Azure Event Hubs / Fabric; Entra auth from CU3 on Arc or Azure VM</td>
<td>Fabric mirroring supported</td>
<td>Fabric mirroring supported</td>
<td>Not applicable; CDC to Kinesis/MSK via DMS or Debezium instead</td>
</tr>
<tr>
<td>Vector search, DiskANN index</td>
<td>Vector type GA; vector index and VECTOR_SEARCH are preview</td>
<td>Vector type available</td>
<td>Vector type available; index status follows the service</td>
<td>Vector type available; treat the index as preview until AWS documents otherwise</td>
</tr>
</tbody>
</table>
</div>
<p>The pattern is the one you would expect. Self-managed SQL Server 2025 gives you every knob in this post and makes you responsible for using them. Managed Instance gives you the engine-level features (optimized locking, the query processing improvements, columnstore changes) with the HA internals taken away and replaced with failover groups; if your reason for wanting SQL Server 2025 is the AG knobs, MI is not where you get them. Azure SQL Database had most of the performance features first and has never exposed an AG at all. RDS is a self-managed engine with a managed control plane: the database-scoped features work, the instance-level and cluster-level ones are AWS&#8217;s to configure, and the Azure-targeted integrations do not apply.</p>
<h2>Where I would deploy SQL Server 2025, and where I would wait</h2>
<p>As of September 2026, with CU8 out: for a new self-managed deployment, SQL Server 2025 on CU8 is the version, and the migration from 2019 in particular should not wait, given that 2019 has been on extended support only since February 2025. For an in-place upgrade of a stable 2022 estate, the case is strongest where the workload suffers from lock escalation or tempdb exhaustion, or where a Standard edition instance is capped at 24 cores or 128 GB; if none of those is true, 2022 is supported to 2033 and there is no urgency.</p>
<p>Turn on optimized locking one database at a time with the wait-stat baseline described above, put tempdb governance on every instance, and leave the preview features (vector indexes, Change Event Streaming, the fuzzy-matching functions, optimized <code>sp_executesql</code>) off in production until they lose the <code>PREVIEW_FEATURES</code> gate. In Azure, Managed Instance on the SQL Server 2025 update policy is the shape that keeps your on-premises and cloud feature surfaces aligned, which matters more than any single feature if you run both.</p>
<p>Test all of this against your own workload in a staging environment with production data volumes and production concurrency before it goes anywhere near production, keep a verified backup and a rehearsed restore in place before enabling any database-scoped option, and treat the LAQ semantic change as an application test item, not a database one. If you want a second pair of eyes on a SQL Server 2025 upgrade, an AG design, or a Standard-versus-Enterprise decision with the new ceilings, that is the work the <a href="https://minervadb.com/sql-server-support/">MinervaDB SQL Server support</a> team does every week, on-premises and in Azure and AWS.</p>
<h2>References</h2>
<p><a href="https://learn.microsoft.com/en-us/sql/sql-server/what-s-new-in-sql-server-2025" rel="noopener" target="_blank">What&#8217;s new in SQL Server 2025</a> · <a href="https://learn.microsoft.com/en-us/sql/sql-server/sql-server-2025-release-notes" rel="noopener" target="_blank">SQL Server 2025 release notes</a> · <a href="https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2025/build-versions" rel="noopener" target="_blank">SQL Server 2025 build versions</a> · <a href="https://learn.microsoft.com/en-us/lifecycle/products/sql-server-2025" rel="noopener" target="_blank">SQL Server 2025 lifecycle</a> · <a href="https://learn.microsoft.com/en-us/sql/relational-databases/performance/optimized-locking" rel="noopener" target="_blank">Optimized locking</a> · <a href="https://learn.microsoft.com/en-us/sql/relational-databases/resource-governor/tempdb-space-resource-governance" rel="noopener" target="_blank">tempdb space resource governance</a> · <a href="https://learn.microsoft.com/en-us/sql/sql-server/editions-and-components-of-sql-server-2025" rel="noopener" target="_blank">Editions and supported features of SQL Server 2025</a> · <a href="https://techcommunity.microsoft.com/blog/sqlserver/sql-server-2025-is-now-generally-available/4470570" rel="noopener" target="_blank">SQL Server 2025 is now generally available</a> · <a href="https://aws.amazon.com/about-aws/whats-new/2026/07/rds-sqlserver-supports-sqlserver-2025/" rel="noopener" target="_blank">Amazon RDS for SQL Server now supports SQL Server 2025</a> · <a href="https://learn.microsoft.com/en-us/azure/azure-sql/managed-instance/update-policy" rel="noopener" target="_blank">Azure SQL Managed Instance update policy</a></p>
<p><a href="https://minervadb.com/sql-server-2025-performance-scalability-ha/">SQL Server 2025 Performance, Scalability and High Availability: What Changed On-Premises and in the Cloud</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>ProxySQL HA with BGP ECMP Anycast</title>
        <link>https://percona.community/blog/2026/09/07/proxysql-ha-with-bgp-ecmp-anycast/</link>
        <pubDate>Mon, 07 Sep 2026 11:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/proxysql-ha-with-bgp-ecmp-anycast/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>When setting up a new database for an application, high availability (HA) is one of the main priorities. Let’s assume for this example that you chose to use a Percona XtraDB (PXC) cluster to host your database. But how does the application know which PXC node is healthy and can receive application traffic? Introducing a cluster of ProxySQLs can solve this problem, as ProxySQL will healthcheck the database nodes and route the application traffic to the healthy nodes. However, now the HA problem comes up again: how does the application know which ProxySQL host is healthy?</p>
<p><a href="https://percona.community/blog/2026/09/07/proxysql-ha-with-bgp-ecmp-anycast/">ProxySQL HA with BGP ECMP Anycast</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>When setting up a new database for an application, high availability (HA) is one of the main priorities. Let’s assume for this example that you chose to use a Percona XtraDB (PXC) cluster to host your database.<br />
But how does the application know which PXC node is healthy and can receive application traffic? Introducing a cluster of ProxySQLs can solve this problem, as ProxySQL will healthcheck the database nodes and route the application traffic to the healthy nodes.<br />
However, now the HA problem comes up again: how does the application know which ProxySQL host is healthy?</p>
<p>Putting “one more component” in front of your servers to make them highly available just shifts the problem up by one layer.<br />
From making the database HA, to making ProxySQL HA, to needing to make HAProxy HA and so on…</p>
<p>At some point, you may land on the common HA strategy, keepalived, but BGP ECMP is a powerful alternative worth considering.</p>
<h2>What is BGP, what is ECMP?</h2>
<p>As a brief summary, Border Gateway Protocol (BGP) is a routing protocol which operates over TCP. Equal-Cost Multi-Path (ECMP) defines that we want the traffic to be loadbalanced equally across the given routes.<br />
Routers acting as BGP speakers are configured to accept routes for defined IP ranges and Autonomous System (AS) numbers, storing information about the networks that the router can reach in a Routing Information Base (RIB) table.<br />
To benefit from Anycast, we will assign both/all ProxySQL nodes the same virtual IP address. BGP is then used to let the router know multiple routes to reach that IP. Configuring ECMP will cause the router to balance the traffic over these routes.</p>
<p>User defined health checks are executed by a BGP-speaking daemon, such as ExaBGP, running on the host to ensure that the router has the correct information about the status of a route.<br />
As soon as a health check fails, ExaBGP will trigger a BGP update to withdraw the route. The router will remove the entry from its RIB table and stop forwarding packets to that host.<br />
The traffic will be redistributed to the remaining healthy ProxySQL nodes.</p>
<p>For a more in depth guide about BGP please refer to <a href="https://www.ciscopress.com/articles/article.asp?p=2738462&amp;seqNum=2" target="_blank" rel="noopener noreferrer">Cisco press</a>.</p>
<h2>How ECMP based on BGP works</h2>
<p>For our setup we can’t have the applications connect to the normal IPs of the ProxySQL nodes, as these are assigned to one node and fixed.<br />
Instead we need a single separate anycast IP (let’s take 10.5.200.1/32) that we can assign to both ProxySQL nodes. This IP will be assigned to the loopback interface and has to be of a separate network, not overlapping with the IP-Range the normal ProxySQL node IPs are from.</p>
<p>When a packet with the destination set to the ProxySQL anycast IP (10.5.200.1) arrives at the router, the router checks its internal routing table to determine the next hop for the packet.<br />
The router will see the two ProxySQL nodes in the cluster as potential next hop (as they both have the same anycast IP) and will pick one of the ProxySQL nodes, based on ECMP, to forward the packet to.<br />
In ECMP the next hop is dynamically decided based on a 5-tuple hash from the packet header fields:</p>
<p><code>{ source IP address | destination IP address | protocol | source port | destination port }</code></p>
<p>Because the IP address and ports are in the hash, this ensures that the packets belonging to the same TCP stream are kept on the same path, to prevent packets of the same TCP connection ending up on multiple ProxySQL nodes.</p>
<p>You can visualise the setup like this:</p>
<p><figure><img decoding="async" width="1383" height="1024" src="https://percona.community/blog/2026/09/proxysql-ha-with-bgp-ecmp-anycast-diagram_hu_fb1e65d520c6a31d.webp" alt="Diagram" loading="lazy"></figure>
</p>
<p>By doing so, we have achieved high availability by leveraging BGP ECMP to loadbalance traffic in an active/active configuration across the ProxySQL nodes.<br />
Additionally, the application config can be simplified, as only the single anycast IP (or DNS record for that IP) needs to be used for the ProxySQL cluster, and the logic of routing will be handled by the router.<br />
Failures of a ProxySQL host are automatically handled by ExaBGP; a BGP update is sent to the router, and the route to the failed ProxySQL is withdrawn. The router redirects traffic to the remaining healthy ProxySQL, with no manual interventions required.<br />
Extra infrastructure components (such as internal loadbalancers) can be avoided, eliminating additional network hops and improving network latency.</p>
<h2>Alternative strategies for using BGP with databases</h2>
<p>Of course, a ProxySQL cluster is not the only way to leverage BGP ECMP in order to achieve high availability for your databases. Some other strategies could be to use it for read-replica routing, local traffic routing, or for routing towards loadbalancers (e.g. haproxy).</p>
<h3>Routing towards the database loadbalancer</h3>
<p>Using BGP ECMP does not mean that you have to forego a database loadbalancer. You can configure your database servers to sit behind a database loadbalancer,<br />
such as HAproxy or ProxySQL, and implement BGP ECMP in order to route traffic towards the loadbalancers and operate them highly available as true active/active pair.<br />
If one of the loadbalancer instances dies, then BGP automatically takes care of routing the traffic to the remaining healthy peers for you.</p>
<h3>Read replica routing</h3>
<p>You can use BGP ECMP to distribute MySQL-Connections over multiple read replicas without using any Loadbalancer / ProxySQL at all. This saves you the additional latency and network hops of using a loadbalancer/ProxySQL.<br />
If you need to ensure that you do not read from a replica which is lagging behind or has stopped replicating, you can implement this logic in the BGP health checks.</p>
<h3>BGP Local Preference</h3>
<p>If you have a multi-datacenter setup, you can choose to use local preference to keep traffic localised within the same datacenter. For example if you have an application server and a proxysql host in one datacenter (datacenter A), and an application server and proxysql host in a second datacenter (datacenter B),<br />
you can tell the router to send traffic from the application to the proxysql within the same datacenter. The advantage of this is that it keeps network latency low, and avoids cross-site transit. Configuring this in BGP means that the application does not need to be aware of which datacenter it is running in. The BGP router handles localised routing for you.<br />
If the local route would disappear, then the BGP router would automatically divert traffic from the application in datacenter A to the proxysql in the datacenter B.</p>
<p><figure><img decoding="async" width="1619" height="971" src="https://percona.community/blog/2026/09/proxysql-ha-with-bgp-ecmp-anycast-lpref_hu_6bf20dfe86744131.webp" alt="Diagram BGP local preference" loading="lazy"></figure>
</p>
<h2>Advantages of BGP</h2>
<ul>
<li>One advantage of BGP over keepalived is that your anycast-nodes don’t need to be in the same subnet (especially useful for multi-datacenter setups). Keepalived instead requires the nodes to be part of the same Layer 2 Network.</li>
<li>BGP ECMP supports active/active, unlike keepalived which only supports active/passive architectures.</li>
<li>In BGP, the router has the overview of which node is healthy or unhealthy. In keepalived this knowledge resides in the keepalived process running on the node itself.<br />
As long as the nodes running keepalived can see each other, keepalived thinks everything is fine, but the nodes might have lost connection to the router.<br />
Whereas with BGP, health checks ensure that BGP is aware of the state of the route. In case there would be a network problem that would make the node unreachable, the route would disappear from the router.</li>
<li>You can horizontally scale the nodes with BGP.</li>
<li>BGP Local preference allows you to automatically route traffic within a datacenter, without the application needing to configure logic like “use ProxySQL-A when running in datacenter-A, otherwise ProxySQL-B.”</li>
<li>You can set BGP to eliminate additional hops of infrastructure components, for example connecting to a pool of read replicas, without needing to connect over a loadbalancer.</li>
</ul>
<h2>Caveats with BGP</h2>
<p>BGP ECMP is not connection-state aware, so if instances disappear/die or new instances join and the RIB table is rebuilt, the hashing algorithm will most likely forward packets for existing connections to a different instance than before. As that instance will not be aware of this TCP-Connection, it will send an RST-packet and the application will have to re-open its database connection.</p>
<p>In the next post, we will explain the technical details of setting up BGP ECMP for our ProxySQL cluster using OPNsense as Router.</p>
<p><em>This post is part of the <a href="https://percona.community/blog/write-for-percona-community/">Percona Community Writers Program</a>.</em></p>
<p><a href="https://percona.community/blog/2026/09/07/proxysql-ha-with-bgp-ecmp-anycast/">ProxySQL HA with BGP ECMP Anycast</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Oracle Exadata to PostgreSQL 18 Migration: An Airline Operations Case Study from the MinervaDB Data Migration Team</title>
        <link>https://minervadb.com/oracle-exadata-to-postgresql-18-migration-airline/</link>
        <pubDate>Mon, 07 Sep 2026 09:44:58 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/oracle-exadata-to-postgresql-18-migration-an-airline-operations-case-study-from-the-minervadb-data-migration-team/</guid>
        <source url="https://minervadb.com/">MinervaDB</source>
        <description><![CDATA[<p>This is the MinervaDB Data Migration Team's write-up of an Oracle Exadata to PostgreSQL 18 migration for an airline operations platform: crew scheduling, flight status, aircraft rotation and the reporting that hangs off them. The [...]</p>
<p><a href="https://minervadb.com/oracle-exadata-to-postgresql-18-migration-airline/">Oracle Exadata to PostgreSQL 18 Migration: An Airline Operations Case Study from the MinervaDB Data Migration Team</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><img loading="lazy" decoding="async" src="https://minervadb.com/wp-content/uploads/2026/09/oracle-exadata-to-postgresql-18-migration-airline-case-study.png" alt="Oracle Exadata to PostgreSQL 18 migration for airline operations: MinervaDB Data Migration Team case study" width="1200" height="630" class="aligncenter size-full wp-image-93019"></p>
<p>This is the MinervaDB Data Migration Team&#8217;s write-up of an Oracle Exadata to PostgreSQL 18 migration for an airline operations platform: crew scheduling, flight status, aircraft rotation and the reporting that hangs off them. The system left an Exadata X9M-2 quarter rack running Oracle 19c RAC and landed on community PostgreSQL 18 on bare metal in the airline&#8217;s own data centres, under Patroni, with pgBackRest for backup and point-in-time recovery. The client is anonymised and every figure below is rounded, but the method, the SQL, the PL/SQL mapping and the sizing arithmetic are exactly what we used.</p>
<p>The short version of the outcome: the workload met the p95 latency and peak-throughput targets we set from the Oracle AWR baselines, on three commodity servers, without a compatibility layer, and with the PL/SQL estate rewritten rather than emulated. The longer version, which is the useful one, is below. It is organised the way the engagement was: assessment, target selection, capacity planning and sizing, schema mapping, SQL mapping, PL/SQL to PL/pgSQL, data movement and cutover, and what we would do differently.</p>
<h2>Starting state: the Exadata estate and the forcing constraint</h2>
<p>The source was an Exadata X9M-2 quarter rack: two database servers, each with two 32-core Intel Xeon Platinum 8358 sockets and 1 TB of memory, and three High Capacity storage servers, each with sixteen-core Xeon storage CPUs, PMem in front of NVMe flash in front of 18 TB disks, all on the RoCE fabric. Oracle 19c ran as a two-node RAC with three pluggable databases, of which one, the operations PDB, was the migration scope. Allocated size was around 12 TB with roughly 9 TB of live data, the rest being free space inside tablespaces, undo and a large temp.</p>
<p>The workload profile that sized the PostgreSQL 18 target came from AWR, not from interviews. Peak periods (early morning rotation building and the evening crew-legality run) showed roughly 9,000 executions per second, of which about 70 percent were single-row lookups and short-range scans by flight, tail number or crew ID, the remainder being the legality and pairing logic that runs inside PL/SQL. </p>
<p>Around 2,400 concurrent sessions, most of them idle in application pools. Redo generation peaked near 40 MB/s. Physical reads were low because the buffer cache absorbed almost everything; the storage cells were doing very little smart scan for this PDB, which turned out to be the most important sizing fact of the whole engagement and I will come back to it.</p>
<figure>
<img loading="lazy" decoding="async" src="https://minervadb.com/wp-content/uploads/2026/09/exadata-x9m-2-source-topology-oracle-19c-rac.png" alt="Source Oracle Exadata X9M-2 quarter rack topology: two 19c RAC database servers and three storage servers, with the operations PDB in scope" width="1800" height="720" class="aligncenter size-full wp-image-93020"><figcaption>The important number in this picture is not the hardware, it is how little of the storage tier the operations PDB was actually using.</figcaption></figure>
<p>The forcing constraint was commercial and contractual rather than technical: the Exadata support renewal and the Oracle licence position were coming up together, and the airline&#8217;s platform group had already standardised on PostgreSQL for new services. The technical question we were hired to answer was whether the operations platform, with its PL/SQL and its RAC dependency, could move without the performance regression everyone assumed came with leaving Exadata.</p>
<h2>Assessment: inventory first, opinions later</h2>
<p>Every Oracle Exadata to PostgreSQL 18 migration we run starts from the Oracle catalog, because interviews undercount PL/SQL by a factor of two or three. The inventory queries are short:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- Object inventory for the schemas in scope
SELECT object_type,
       COUNT(*) AS objects
FROM   dba_objects
WHERE  owner IN ('OPS', 'CREW', 'FLT', 'RPT')
GROUP  BY object_type
ORDER  BY objects DESC;

-- PL/SQL volume by unit
SELECT owner, name, type,
       COUNT(*) AS loc
FROM   dba_source
WHERE  owner IN ('OPS', 'CREW', 'FLT', 'RPT')
GROUP  BY owner, name, type
ORDER  BY loc DESC;

-- Feature dependencies that have no direct community-PostgreSQL equivalent
SELECT owner, name, type, text
FROM   dba_source
WHERE  owner IN ('OPS', 'CREW', 'FLT', 'RPT')
AND    REGEXP_LIKE(UPPER(text),
       'PRAGMA AUTONOMOUS_TRANSACTION|DBMS_AQ|DBMS_SCHEDULER|UTL_FILE|DBMS_LOB|BULK COLLECT|FORALL|CONNECT BY|DBMS_SQL|UTL_HTTP|DBMS_RLS|FLASHBACK');</pre>
<p>The rounded inventory for the operations PDB, and the conversion route we assigned to each class, is the matrix that the effort estimate came from:</p>
<div>
<table>
<thead>
<tr>
<th>Object class</th>
<th>Count (rounded)</th>
<th>Route</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>Tables</td>
<td>~640</td>
<td>Automatic (ora2pg)</td>
<td>38 range/interval-partitioned; 12 with LOBs</td>
</tr>
<tr>
<td>Indexes</td>
<td>~1,900</td>
<td>Automatic, then pruned</td>
<td>~400 were redundant prefixes; skip scan (PostgreSQL 18) let us drop more</td>
</tr>
<tr>
<td>Sequences</td>
<td>~210</td>
<td>Automatic</td>
<td>CACHE semantics differ; identity columns where the table allowed</td>
</tr>
<tr>
<td>Views</td>
<td>~380</td>
<td>Assisted</td>
<td>(+) joins, DECODE, NVL, CONNECT BY inside views</td>
</tr>
<tr>
<td>Materialised views</td>
<td>22</td>
<td>Manual</td>
<td>6 were ON COMMIT fast refresh; redesigned</td>
</tr>
<tr>
<td>Packages</td>
<td>110 (~90k lines)</td>
<td>Manual rewrite</td>
<td>Legality, pairing, rotation engines; 14 with autonomous transactions</td>
</tr>
<tr>
<td>Standalone procedures/functions</td>
<td>~260</td>
<td>Assisted</td>
<td>Mostly wrappers; ora2pg output usable after review</td>
</tr>
<tr>
<td>Triggers</td>
<td>~150</td>
<td>Assisted</td>
<td>Audit triggers reviewed for the PostgreSQL 18 AFTER-trigger role change</td>
</tr>
<tr>
<td>Types (object/collection)</td>
<td>~40</td>
<td>Manual</td>
<td>Composite types plus arrays; methods became functions</td>
</tr>
<tr>
<td>Scheduler jobs</td>
<td>~70</td>
<td>Manual</td>
<td>pg_cron plus an application scheduler for chains</td>
</tr>
<tr>
<td>AQ queues</td>
<td>4</td>
<td>Manual</td>
<td>Two moved to Kafka (already in the estate), two to pgmq</td>
</tr>
<tr>
<td>VPD policies</td>
<td>9</td>
<td>Manual</td>
<td>Row-level security</td>
</tr>
<tr>
<td>DB links</td>
<td>3</td>
<td>Manual</td>
<td>oracle_fdw during coexistence, retired after</td>
</tr>
</tbody>
</table>
</div>
<p>Two findings from this phase changed the plan. First, the RAC dependency was an availability requirement, not a scale requirement; the second instance was there to survive a node failure, and inter-instance traffic showed it was carrying a fraction of the load. That maps to a Patroni-managed replica set, not to a distributed PostgreSQL. Second, the six ON COMMIT fast-refresh materialised views were load-bearing for the reporting schema and PostgreSQL 18 has no incremental refresh in core; they needed a design decision, not a conversion.</p>
<p>ora2pg 25.0 did the mechanical part of the assessment. Its migration-cost report is a useful floor for the estimate, not the estimate:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell"># ora2pg 25.0, assessment mode against the operations PDB
ora2pg -c ora2pg.conf -t SHOW_REPORT --estimate_cost --dump_as_html 
       -O "SCHEMA=OPS,CREW,FLT,RPT" &gt; ops_pdb_assessment.html

# Object-level detail for the matrix
ora2pg -c ora2pg.conf -t SHOW_TABLE   -O "SCHEMA=OPS"
ora2pg -c ora2pg.conf -t SHOW_COLUMN  -O "SCHEMA=OPS"</pre>
<h2>Why community PostgreSQL 18, and what we rejected</h2>
<p>We considered four targets and wrote down why three lost, because this section is what the client&#8217;s architecture board actually wanted to read.</p>
<p>EDB Postgres Advanced Server with its Oracle-compatible PL/SQL dialect would have cut the package rewrite substantially. We rejected it because the airline&#8217;s stated goal was to remove vendor lock-in, and EPAS trades Oracle lock-in for EDB lock-in. That is a legitimate trade when the rewrite budget is the binding constraint; here it was not, and 90,000 lines of PL/SQL is a rewrite a team of four can do in a quarter with the right tooling. We said so in writing and the board agreed.</p>
<p>PostgreSQL 17 was the safer-looking landing zone when we started scoping in early 2026, with 18 only a few minors old. We chose 18 for three reasons specific to a migration, not because it was newer. The <code>pg_upgrade</code> statistics carry-over matters for the next major upgrade rather than this cutover, but it means the client is not planning a stats-cold upgrade during stabilisation. PostgreSQL 18&#8217;s asynchronous I/O and the default <code>effective_io_concurrency</code> of 16 change how a multi-terabyte table scans on NVMe, which affected sizing. And 18&#8217;s end of life is November 2030, four years from cutover. PostgreSQL 19 was still in beta throughout the project and is not a production target until it has a couple of minors behind it.</p>
<p>A managed cloud PostgreSQL 18 was rejected on data residency and on the airline&#8217;s requirement to run the operations platform in its own two data centres. Distributed PostgreSQL (Citus, or a YugabyteDB-style fork) was rejected because the workload is not sharded by nature and, as the AWR numbers showed, does not need to be; a single well-sized primary with synchronous standbys covers it with headroom.</p>
<h2>Capacity planning and sizing the PostgreSQL 18 stack</h2>
<p>The mistake we see most often on an Exadata exit is sizing the PostgreSQL 18 hardware from Exadata&#8217;s CPU utilisation. Exadata CPU utilisation on the database servers understates the work because smart scan, storage indexes and flash cache absorb I/O and filtering on the cells. On a PostgreSQL 18 target every one of those bytes comes back to the database host. So we size from logical work, not from host utilisation. The inputs, all from AWR and ASH over a four-week window covering month-end and a schedule change:</p>
<div>
<table>
<thead>
<tr>
<th>AWR / ASH input</th>
<th>Rounded value (peak hour)</th>
<th>What it sizes on PostgreSQL 18</th>
</tr>
</thead>
<tbody>
<tr>
<td>DB CPU per second</td>
<td>~22 CPU-seconds/s across both instances</td>
<td>Core count, after correcting for Oracle-side overheads that do not exist in PostgreSQL (RAC cache fusion, ASM) and PostgreSQL-side work that does not exist in Oracle (vacuum, checkpoints, per-connection processes)</td>
</tr>
<tr>
<td>Logical reads per second</td>
<td>~1.4 million</td>
<td><code>shared_buffers</code> and total RAM: the working set must fit in memory or PostgreSQL 18 will do the physical reads Exadata&#8217;s cells were hiding</td>
</tr>
<tr>
<td>Physical reads per second (host)</td>
<td>~3,000</td>
<td>Deceptively low: cell flash cache served most of them. We measured the true cold working set on a restored copy instead</td>
</tr>
<tr>
<td>Redo bytes per second</td>
<td>~40 MB/s peak</td>
<td>WAL volume, WAL device throughput, archive bandwidth, pgBackRest repo and the synchronous replica network</td>
</tr>
<tr>
<td>Executions per second</td>
<td>~9,000</td>
<td>Transaction rate; with PostgreSQL&#8217;s per-connection process model this drives PgBouncer pool sizing</td>
</tr>
<tr>
<td>Concurrent sessions / active sessions</td>
<td>~2,400 / ~60 active</td>
<td>PgBouncer client connections vs server pool size; <code>max_connections</code> is sized from the 60, not the 2,400</td>
</tr>
<tr>
<td>Segment sizes (DBA_SEGMENTS)</td>
<td>~9 TB live, ~2.2 TB of that index</td>
<td>Data volume after type mapping, with a bloat allowance and index rebuild space</td>
</tr>
<tr>
<td>Top SQL by elapsed and by executions</td>
<td>Top 50 captured</td>
<td>The regression test set for post-migration plan comparison</td>
</tr>
</tbody>
</table>
</div>
<h3>CPU</h3>
<p>Twenty-two Oracle CPU-seconds per second is about 22 fully busy cores at peak. We remove the RAC and ASM overhead (measured from the instance-level wait profile at around 10 percent), then add PostgreSQL&#8217;s own background work. Autovacuum on a 9 TB estate with a 40 MB/s write rate is real CPU, checkpointing is real CPU, and PostgreSQL&#8217;s connection processes carry per-process overhead that Oracle&#8217;s shared server does not.</p>
<p>Our working rule from previous exits is 1.3 to 1.5 times the corrected Oracle CPU figure for headroom on a single primary, so 28 to 30 cores at peak. We specified 64 cores per node (two 32-core sockets) to leave room for reporting queries that were about to lose smart scan, and because NVMe throughput on a modern two-socket box is wasted with fewer cores driving it.</p>
<h3>Memory</h3>
<p>The working set was measured, not assumed. We restored the PDB to a scratch server, ran the captured top-50 SQL plus the batch jobs against a cold cache with <code>pg_buffercache</code> and <code>pg_stat_io</code> sampling, and watched the buffer pool stabilise at roughly 380 GB of distinct blocks touched in a peak hour. That set the memory floor: 1 TB per node, with <code>shared_buffers</code> at 256 GB and the remainder left to the OS page cache, <code>work_mem</code> allocations and maintenance operations. We do not go past a quarter of RAM for <code>shared_buffers</code> on a mixed workload without a measured reason, and here the double-buffering cost of going higher was not worth the marginal hit-rate gain we saw in testing.</p>
<h3>Storage</h3>
<p>Nine terabytes of Oracle data does not become nine terabytes of PostgreSQL 18 data. NUMBER-to-numeric mapping, the absence of Oracle&#8217;s row-level compression on a few large tables, and PostgreSQL&#8217;s per-tuple header made the converted data about 10 percent larger; the index estate shrank because we dropped redundant indexes. We plan for the converted size times a 1.3 bloat and maintenance factor, plus WAL retention for the synchronous replica and PITR, plus space to rebuild the largest table&#8217;s indexes concurrently.</p>
<p>The specification per node was six 7.68 TB NVMe drives in RAID 10 (about 23 TB usable), a separate pair of 1.92 TB NVMe for WAL, and the pgBackRest repository on object storage at the DR site. The WAL device was sized for sustained 40 MB/s writes with fsync latency under a millisecond, which any current enterprise NVMe delivers; we measured it with <code>pg_test_fsync</code> before accepting the hardware.</p>
<h3>Connections</h3>
<p>Twenty-four hundred sessions cannot become 2,400 PostgreSQL 18 backends. PgBouncer in transaction pooling mode fronts the primary with a server pool sized from active sessions, not connected sessions: 60 active at peak became a default pool of 96 with a reserve, and <code>max_connections</code> on the server was set to 300 to leave room for replication, monitoring and administrative sessions. The application team had to remove session-state assumptions (temporary tables and <code>SET</code> commands that assumed a sticky session) that transaction pooling breaks, and PgBouncer 1.24 and later enable prepared statements by default, which the JDBC driver configuration had to account for.</p>
<figure>
<img loading="lazy" decoding="async" src="https://minervadb.com/wp-content/uploads/2026/09/postgresql-18-target-topology-patroni-pgbackrest.png" alt="Target PostgreSQL 18 topology: PgBouncer pair, three-node Patroni cluster with etcd, synchronous replica, DR standby cluster and pgBackRest repositories" width="1800" height="940" class="aligncenter size-full wp-image-93021"><figcaption>Three PostgreSQL 18 nodes in the primary site replace two RAC nodes and three storage cells; the DR site runs as a Patroni standby cluster.</figcaption></figure>
<h3>The postgresql.conf that came out of the sizing</h3>
<p>Only the parameters we changed from the PostgreSQL 18 defaults, with the reasoning and the restart requirement, because that is the format the client&#8217;s change board needed:</p>
<div>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>PostgreSQL 18 default</th>
<th>Set to</th>
<th>Unit</th>
<th>Reload / restart</th>
<th>Why</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>shared_buffers</code></td>
<td>128</td>
<td>262144 (256 GB)</td>
<td>MB</td>
<td>restart</td>
<td>Measured 380 GB peak-hour working set; rest to page cache</td>
</tr>
<tr>
<td><code>huge_pages</code></td>
<td>try</td>
<td>on</td>
<td>enum</td>
<td>restart</td>
<td>Fail loudly if the kernel reservation is missing</td>
</tr>
<tr>
<td><code>effective_cache_size</code></td>
<td>4 GB</td>
<td>720 GB</td>
<td>MB</td>
<td>reload</td>
<td>Planner hint: shared_buffers plus page cache</td>
</tr>
<tr>
<td><code>work_mem</code></td>
<td>4</td>
<td>64</td>
<td>MB</td>
<td>reload</td>
<td>Set per role: reporting role gets 512 MB via <code>ALTER ROLE</code></td>
</tr>
<tr>
<td><code>maintenance_work_mem</code></td>
<td>64</td>
<td>4096</td>
<td>MB</td>
<td>reload</td>
<td>PostgreSQL 17+ TidStore actually uses it; fewer index passes per vacuum</td>
</tr>
<tr>
<td><code>autovacuum_work_mem</code></td>
<td>-1</td>
<td>2048</td>
<td>MB</td>
<td>reload</td>
<td>Six workers times 2 GB, bounded</td>
</tr>
<tr>
<td><code>autovacuum_max_workers</code></td>
<td>3</td>
<td>6</td>
<td>workers</td>
<td>restart</td>
<td>640 tables, 38 partitioned; 3 is not enough</td>
</tr>
<tr>
<td><code>autovacuum_worker_slots</code></td>
<td>16</td>
<td>16</td>
<td>slots</td>
<td>restart</td>
<td>Left at default so workers can be raised at runtime later</td>
</tr>
<tr>
<td><code>autovacuum_vacuum_scale_factor</code></td>
<td>0.2</td>
<td>0.02</td>
<td>ratio</td>
<td>reload</td>
<td>Per-table overrides on the hot tables; 20% of a 900 GB table is not a threshold</td>
</tr>
<tr>
<td><code>autovacuum_vacuum_max_threshold</code></td>
<td>100000000</td>
<td>5000000</td>
<td>tuples</td>
<td>reload</td>
<td>PostgreSQL 18: hard cap on dead tuples before a vacuum triggers</td>
</tr>
<tr>
<td><code>max_wal_size</code></td>
<td>1 GB</td>
<td>64 GB</td>
<td>MB</td>
<td>reload</td>
<td>40 MB/s peak redo; keep checkpoints on the schedule, not on the size limit</td>
</tr>
<tr>
<td><code>checkpoint_timeout</code></td>
<td>5 min</td>
<td>15 min</td>
<td>s</td>
<td>reload</td>
<td>Recovery time budget agreed with the client</td>
</tr>
<tr>
<td><code>checkpoint_completion_target</code></td>
<td>0.9</td>
<td>0.9</td>
<td>ratio</td>
<td>reload</td>
<td>Default kept</td>
</tr>
<tr>
<td><code>wal_compression</code></td>
<td>off</td>
<td>lz4</td>
<td>enum</td>
<td>reload</td>
<td>Cuts WAL volume for full-page writes; CPU is cheap here</td>
</tr>
<tr>
<td><code>wal_buffers</code></td>
<td>-1</td>
<td>256</td>
<td>MB</td>
<td>restart</td>
<td>pg_stat_io showed wal_buffers_full events at the default</td>
</tr>
<tr>
<td><code>synchronous_commit</code></td>
<td>on</td>
<td>on</td>
<td>enum</td>
<td>reload</td>
<td>With <code>synchronous_standby_names</code> managed by Patroni (synchronous_mode)</td>
</tr>
<tr>
<td><code>io_method</code></td>
<td>worker</td>
<td>worker</td>
<td>enum</td>
<td>restart</td>
<td>io_uring not in the distro build; sync is the documented rollback</td>
</tr>
<tr>
<td><code>io_workers</code></td>
<td>3</td>
<td>12</td>
<td>workers</td>
<td>reload</td>
<td>Default is low for NVMe; justified from pg_stat_io read counts under the batch test</td>
</tr>
<tr>
<td><code>effective_io_concurrency</code></td>
<td>16</td>
<td>64</td>
<td>requests</td>
<td>reload</td>
<td>NVMe RAID10 sustains far deeper queues than the default</td>
</tr>
<tr>
<td><code>maintenance_io_concurrency</code></td>
<td>16</td>
<td>64</td>
<td>requests</td>
<td>reload</td>
<td>Same reasoning, vacuum and index builds</td>
</tr>
<tr>
<td><code>random_page_cost</code></td>
<td>4.0</td>
<td>1.1</td>
<td>cost</td>
<td>reload</td>
<td>NVMe; the default assumes spinning disk and pushes the planner to sequential scans</td>
</tr>
<tr>
<td><code>max_connections</code></td>
<td>100</td>
<td>300</td>
<td>conns</td>
<td>restart</td>
<td>PgBouncer pool plus replication, monitoring, admin</td>
</tr>
<tr>
<td><code>max_parallel_workers_per_gather</code></td>
<td>2</td>
<td>6</td>
<td>workers</td>
<td>reload</td>
<td>Reporting queries lost smart scan; parallelism gives some of it back</td>
</tr>
<tr>
<td><code>max_worker_processes</code></td>
<td>8</td>
<td>48</td>
<td>processes</td>
<td>restart</td>
<td>Parallel workers, io workers, pg_cron, logical replication</td>
</tr>
<tr>
<td><code>max_locks_per_transaction</code></td>
<td>64</td>
<td>512</td>
<td>locks</td>
<td>restart</td>
<td>38 partitioned tables; planning across many partitions exhausts 64 fast</td>
</tr>
<tr>
<td><code>track_io_timing</code></td>
<td>off</td>
<td>on</td>
<td>bool</td>
<td>reload</td>
<td>Needed for the AWR-vs-pg_stat_statements comparison to mean anything</td>
</tr>
<tr>
<td><code>log_min_duration_statement</code></td>
<td>-1</td>
<td>500</td>
<td>ms</td>
<td>reload</td>
<td>Slow-query capture during stabilisation, raised to 2000 after</td>
</tr>
<tr>
<td><code>shared_preload_libraries</code></td>
<td>&#8221;</td>
<td>pg_stat_statements, pg_cron, auto_explain</td>
<td>list</td>
<td>restart</td>
<td>auto_explain at 2 s with buffers during stabilisation only</td>
</tr>
</tbody>
</table>
</div>
<p>Two of those need a warning. <code>random_page_cost</code> at 1.1 is right for local NVMe and wrong for anything network-attached; it is the first thing we check when a client copies a config between environments. And <code>io_workers</code> at 12 was arrived at by measuring, starting from the default of 3, doubling, and watching <code>pg_stat_io</code> and the I/O wait events; it is not a formula, and on a smaller box 6 was enough.</p>
<h2>Schema mapping: Oracle to PostgreSQL 18</h2>
<p>The type mapping is the part of an Oracle Exadata to PostgreSQL 18 migration that ora2pg gets mostly right and that we still review column by column on the hot tables, because the defaults are conservative in a way that costs performance.</p>
<div>
<table>
<thead>
<tr>
<th>Oracle</th>
<th>ora2pg default</th>
<th>What we used</th>
<th>Why</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>NUMBER</code> (no precision)</td>
<td><code>numeric</code></td>
<td><code>numeric</code>, but <code>bigint</code> on keys and counters</td>
<td><code>numeric</code> is variable-width and slow in joins; every ID column that held only integers became <code>bigint</code>, proven by <code>MAX(ABS(col - TRUNC(col)))</code> = 0 on the source</td>
</tr>
<tr>
<td><code>NUMBER(p,0)</code>, p ≤ 9 / ≤ 18</td>
<td><code>integer</code> / <code>bigint</code></td>
<td>same</td>
<td>ora2pg does this correctly</td>
</tr>
<tr>
<td><code>NUMBER(p,s)</code></td>
<td><code>numeric(p,s)</code></td>
<td>same</td>
<td>Money and fuel quantities stay exact</td>
</tr>
<tr>
<td><code>VARCHAR2(n)</code></td>
<td><code>varchar(n)</code></td>
<td><code>varchar(n)</code>, <code>text</code> where n was a guess</td>
<td>Length checks kept where the application relied on them</td>
</tr>
<tr>
<td><code>CHAR(n)</code></td>
<td><code>char(n)</code></td>
<td><code>varchar(n)</code> or <code>text</code></td>
<td><code>char</code> padding semantics differ and cause equality surprises</td>
</tr>
<tr>
<td><code>DATE</code></td>
<td><code>timestamp(0)</code></td>
<td><code>timestamp(0)</code>, <code>timestamptz</code> for departure/arrival times</td>
<td>Oracle DATE has a time component; airline times are inherently zoned</td>
</tr>
<tr>
<td><code>TIMESTAMP WITH TIME ZONE</code></td>
<td><code>timestamptz</code></td>
<td>same</td>
<td></td>
</tr>
<tr>
<td><code>CLOB</code> / <code>BLOB</code></td>
<td><code>text</code> / <code>bytea</code></td>
<td>same; TOAST with <code>lz4</code></td>
<td>No large-object API; nothing exceeded the 1 GB field limit</td>
</tr>
<tr>
<td><code>RAW(16)</code> GUIDs</td>
<td><code>bytea</code></td>
<td><code>uuid</code></td>
<td>Native type, 16 bytes, indexable; new rows use <code>uuidv7()</code> (PostgreSQL 18) for insert locality</td>
</tr>
<tr>
<td><code>ROWID</code> logic</td>
<td>n/a</td>
<td>Surrogate <code>bigint</code> keys, <code>ctid</code> never</td>
<td><code>ctid</code> changes on update</td>
</tr>
<tr>
<td>Sequences with <code>CACHE 20</code></td>
<td><code>CACHE 20</code></td>
<td><code>CACHE 1</code> or identity columns</td>
<td>PostgreSQL 18 caches per session, not per instance; gaps behaved differently</td>
</tr>
<tr>
<td>Virtual columns</td>
<td>generated column</td>
<td><code>GENERATED ALWAYS AS (...) STORED</code> explicitly</td>
<td>PostgreSQL 18 defaults to virtual; we wanted indexable stored columns and said so in the DDL</td>
</tr>
</tbody>
</table>
</div>
<p>The crew assignment table is a good example of where PostgreSQL 18 gave us something Oracle did not have in the schema at all. Crew legality rules forbid overlapping assignments for the same crew member. On Oracle this was enforced by a trigger and a package. On PostgreSQL 18 it is a temporal primary key:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- PostgreSQL 18: temporal primary key replaces the Oracle trigger + package pair
CREATE EXTENSION IF NOT EXISTS btree_gist;

CREATE TABLE crew.assignment (
    assignment_id   bigint GENERATED ALWAYS AS IDENTITY,
    crew_member_id  bigint      NOT NULL,
    pairing_id      bigint      NOT NULL,
    duty_period     tstzrange   NOT NULL,
    base_iata       char(3)     NOT NULL,
    duty_hours      numeric(5,2)
        GENERATED ALWAYS AS (
            EXTRACT(EPOCH FROM (upper(duty_period) - lower(duty_period))) / 3600.0
        ) STORED,
    created_at      timestamptz NOT NULL DEFAULT now(),
    row_uid         uuid        NOT NULL DEFAULT uuidv7(),
    CONSTRAINT pk_assignment
        PRIMARY KEY (crew_member_id, duty_period WITHOUT OVERLAPS),
    CONSTRAINT fk_assignment_crew
        FOREIGN KEY (crew_member_id) REFERENCES crew.member (crew_member_id),
    CONSTRAINT ck_assignment_period
        CHECK (NOT isempty(duty_period))
);

-- range-partitioned tables (flight_leg, by operating_date) keep their monthly layout;
-- assignment stays unpartitioned so the temporal primary key can be a single GiST index
CREATE INDEX ix_assignment_pairing
    ON crew.assignment (pairing_id, crew_member_id);</pre>
<p>The table is deliberately not partitioned. A unique or primary key on a partitioned table has to include the partition key, and a temporal key over a range column cannot do that cleanly, so the 38 partitioned tables in the estate are the big append-only ones (<code>flight_leg</code> by <code>operating_date</code>, the movement log, the audit tables) and the assignment table, at a few hundred million rows, stays whole. The <code>WITHOUT OVERLAPS</code> constraint removed a 300-line trigger and package pair, and a set of race conditions that had been patched around for years, because a constraint is checked under the same lock the row insert takes and the trigger was not.</p>
<p>Virtual Private Database policies became row-level security. This is the pattern for the nine policies, shown for the base-scoped one:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- Oracle: DBMS_RLS.ADD_POLICY(... policy_function =&gt; 'sec.base_predicate' ...)
-- PostgreSQL 18: the predicate becomes a policy on the table

ALTER TABLE ops.flight_leg ENABLE ROW LEVEL SECURITY;
ALTER TABLE ops.flight_leg FORCE ROW LEVEL SECURITY;   -- applies to the table owner too

CREATE POLICY p_flight_leg_base ON ops.flight_leg
    FOR ALL
    TO ops_app, ops_reporting
    USING (
        origin_base = current_setting('app.base_iata', true)
        OR pg_has_role(current_user, 'ops_network_control', 'member')
    );

-- the application sets the context once per transaction through PgBouncer:
-- SET LOCAL app.base_iata = 'BLR';</pre>
<p>The <code>SET LOCAL</code> is deliberate. Under transaction pooling a plain <code>SET</code> leaks to whichever client next gets the server connection; <code>SET LOCAL</code> dies with the transaction, which is the property VPD&#8217;s session context gave you for free and PgBouncer takes away.</p>
<h3>Materialised views</h3>
<p>The six ON COMMIT fast-refresh materialised views had no equivalent and we did not pretend otherwise. Three were replaced by summary tables maintained by statement-level triggers on the base tables (the same mechanism Oracle used underneath, made explicit). Two were replaced by ordinary views once we confirmed PostgreSQL 18 ran the underlying aggregate fast enough with parallel query and a covering index, which Oracle&#8217;s design predated. One, the crew-hours ledger, kept its trigger-maintained summary plus a nightly <code>REFRESH MATERIALIZED VIEW CONCURRENTLY</code> reconciliation so drift could be detected and corrected rather than assumed away.</p>
<h3>The empty-string audit</h3>
<p>Oracle treats <code>''</code> as NULL; PostgreSQL 18 does not. Every migration has this, and it is a silent-corruption class rather than an error class, so we treat it as a test-suite item. The audit query against the Oracle source found the columns that could ever carry the ambiguity:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- On Oracle: which VARCHAR2 columns are nullable and are compared to '' or wrapped in NVL in code
SELECT DISTINCT c.table_name, c.column_name
FROM   dba_tab_columns c
JOIN   dba_source s
       ON s.owner = c.owner
       AND REGEXP_LIKE(UPPER(s.text), '(NVLs*(s*' || c.column_name || '|' || c.column_name || 's*(=||!=)s*'''')')
WHERE  c.owner = 'OPS'
AND    c.data_type = 'VARCHAR2'
AND    c.nullable = 'Y';</pre>
<p>Every column that came back got a <code>CHECK (col  '')</code> constraint on the PostgreSQL 18 side and a load-time transform that turned empty strings into NULL, so the converted code could keep its <code>IS NULL</code> semantics without a per-predicate rewrite.</p>
<h2>SQL mapping: the patterns that actually appeared</h2>
<p>ora2pg converts the syntactic Oracle-isms. What it cannot do is tell you which converted statement will plan badly. We took the AWR top 50 by elapsed time and by executions, converted them, and ran each under <code>EXPLAIN (ANALYZE, BUFFERS)</code> (buffers are on by default in PostgreSQL 18&#8217;s <code>EXPLAIN ANALYZE</code>) against the restored data. The recurring patterns:</p>
<p>Old-style outer joins were the most common conversion, and ora2pg handles them. <code>CONNECT BY</code> appeared in the pairing engine for building multi-leg duty chains and became a recursive CTE; the performance was comparable because both are effectively iterative. <code>ROWNUM</code> pagination became <code>FETCH FIRST n ROWS ONLY</code>, but the fifteen queries that used <code>ROWNUM</code> as a row-number-in-order-of-arrival had to be checked one by one because that behaviour is undefined without <code>ORDER BY</code> in both engines and Oracle happened to be consistent about it.</p>
<p>The interesting case was the flight-status lookup, the single most executed statement in the system. On Oracle it used a composite index on <code>(operating_date, carrier_code, flight_number, leg_sequence)</code> and was usually called with all four columns. A second, heavily used variant called it without <code>carrier_code</code> because the caller had the flight number from a codeshare feed. Oracle satisfied that with an index skip scan. PostgreSQL before 18 would not, and the standard fix was a second index. PostgreSQL 18 added skip scan for multicolumn B-tree indexes, and the plan shows it:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">EXPLAIN (ANALYZE, COSTS OFF, TIMING OFF)
SELECT leg_id, status_code, eta_utc
FROM   ops.flight_leg
WHERE  operating_date = DATE '2026-09-07'
AND    flight_number  = 1207
AND    leg_sequence   = 1;

-- Index Only Scan using ix_flight_leg_lookup on flight_leg
--   Index Cond: ((operating_date = '2026-09-07'::date) AND (flight_number = 1207) AND (leg_sequence = 1))
--   Index Searches: 6          &lt;-- one search per distinct carrier_code on that date: the skip scan
--   Heap Fetches: 0
--   Buffers: shared hit=31
-- (abridged; the Index Searches line is new EXPLAIN output in PostgreSQL 18)</pre>
<p>Six index searches instead of a second 40 GB index. The condition for skip scan to pay off is a low-cardinality leading column being skipped, which <code>carrier_code</code> is (the airline plus a handful of codeshare partners). We checked the <code>Index Searches</code> count under load rather than trusting the plan shape; when the skipped column has thousands of distinct values, skip scan is worse than a dedicated index and the planner usually, but not always, knows it.</p>
<p>Hints were the other PostgreSQL 18 conversation. The PL/SQL estate carried around 80 <code>/*+ ... */</code> hints, most of them stale. Community PostgreSQL 18 has no hints and we did not install <code>pg_hint_plan</code>; we fixed the underlying statistics problems instead, which in four cases meant <code>CREATE STATISTICS</code> on correlated columns (base and carrier, date and season) and in one case a partial index. PostgreSQL 19&#8217;s in-core plan advice will change this conversation for future migrations; it was not an option for this one.</p>
<h2>PL/SQL to PL/pgSQL: how 110 packages became schemas and functions</h2>
<p>Packages do not exist in community PostgreSQL 18. The mechanical mapping is one schema per package, one function or procedure per package member, and a decision about package state. Ninety of the 110 packages were stateless once we looked, which meant the mapping was mechanical. The other 20 held session state in package variables (the current legality rule set, cached lookup tables, a &#8220;current run ID&#8221; for the rotation engine). Those became either <code>SET LOCAL</code> custom GUCs read with <code>current_setting()</code> for scalar state, or a session-scoped unlogged table keyed by <code>pg_backend_pid()</code> for anything larger. The GUC route is the one that survives transaction pooling correctly, so it was the default.</p>
<p>Here is a cut-down member of the legality package as it ran on Oracle and as it runs on PostgreSQL 18. It computes the cumulative duty hours for a crew member inside a rolling window, using <code>BULK COLLECT</code> because that was the idiom:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- Oracle PL/SQL (abridged), CREW.LEGALITY package
FUNCTION duty_hours_in_window (
    p_crew_member_id IN NUMBER,
    p_window_end     IN TIMESTAMP WITH TIME ZONE,
    p_window_days    IN NUMBER DEFAULT 7
) RETURN NUMBER IS
    TYPE t_hours IS TABLE OF NUMBER;
    l_hours  t_hours;
    l_total  NUMBER := 0;
BEGIN
    SELECT duty_hours
    BULK COLLECT INTO l_hours
    FROM   crew.assignment
    WHERE  crew_member_id = p_crew_member_id
    AND    duty_start &gt;= p_window_end - p_window_days
    AND    duty_start &lt;  p_window_end;

    FOR i IN 1 .. l_hours.COUNT LOOP
        l_total := l_total + l_hours(i);
    END LOOP;
    RETURN l_total;
EXCEPTION
    WHEN NO_DATA_FOUND THEN RETURN 0;
    WHEN OTHERS THEN
        crew.errlog.log_error(&#039;duty_hours_in_window&#039;, SQLERRM);   -- autonomous transaction inside
        RAISE;
END duty_hours_in_window;</pre>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- PostgreSQL 18 PL/pgSQL, schema crew_legality (one schema per former package)
CREATE OR REPLACE FUNCTION crew_legality.duty_hours_in_window (
    p_crew_member_id bigint,
    p_window_end     timestamptz,
    p_window_days    integer DEFAULT 7
) RETURNS numeric
LANGUAGE plpgsql
STABLE
PARALLEL SAFE
AS $$
DECLARE
    l_total numeric := 0;
BEGIN
    -- BULK COLLECT + loop collapses to a set-based aggregate; the planner does the loop
    SELECT COALESCE(SUM(a.duty_hours), 0)
    INTO   l_total
    FROM   crew.assignment AS a
    WHERE  a.crew_member_id = p_crew_member_id
    AND    a.duty_period &amp;&amp; tstzrange(p_window_end - make_interval(days =&gt; p_window_days),
                                      p_window_end, '[)');
    RETURN l_total;
EXCEPTION
    WHEN OTHERS THEN
        -- no autonomous transactions, and a STABLE function cannot write anyway:
        -- the NOTICE goes to the server log (shipped centrally); the durable errlog row
        -- is written by the calling procedure using the savepoint pattern below
        RAISE NOTICE 'crew_legality.duty_hours_in_window failed: % (%)', SQLERRM, SQLSTATE;
        RAISE;
END;
$$;</pre>
<p>Three things in that conversion are the whole story of the PL/SQL work. The <code>BULK COLLECT</code> and loop became a single aggregate, which is what almost every <code>BULK COLLECT</code> in the estate wanted to be; the Oracle idiom exists to avoid context switches between the SQL and PL/SQL engines, and PL/pgSQL does not have that boundary in the same way. The <code>NO_DATA_FOUND</code> handler disappeared because <code>SELECT ... INTO</code> in PL/pgSQL leaves the variable NULL rather than raising when no row is found (the opposite of Oracle; this is the second most common behavioural trap after the empty-string one, and we grep for every <code>SELECT INTO</code> and decide whether it needs <code>STRICT</code>). And the autonomous-transaction error log is gone.</p>
<p>Autonomous transactions were the one Oracle feature with no clean answer, and we had 14 packages using them, all for the same purpose: write an error or audit row that survives the rollback of the enclosing transaction. We rejected <code>dblink</code> loopback connections for this, because under a 9,000-transaction-per-second workload a loopback connection per error is a connection storm waiting for a bad day. The pattern we used instead: the error row is inserted in the enclosing transaction, and the enclosing transaction is not rolled back on a business exception; the exception is caught at the procedure boundary, the work is undone with a savepoint, and the log row is kept.</p>
<p>For the two cases where the transaction had to abort entirely, the application logs, not the database.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- PostgreSQL 18 savepoint pattern replacing PRAGMA AUTONOMOUS_TRANSACTION for audit-on-failure
CREATE OR REPLACE PROCEDURE crew_ops.apply_pairing (p_pairing_id bigint)
LANGUAGE plpgsql
AS $$
BEGIN
    BEGIN
        -- the unit of work that may fail
        PERFORM crew_ops.assign_pairing_members(p_pairing_id);
        PERFORM crew_legality.validate_pairing(p_pairing_id);
    EXCEPTION
        WHEN check_violation OR exclusion_violation THEN
            -- inner block acts as a savepoint: its writes are rolled back, the outer transaction survives
            INSERT INTO crew_ops.errlog (unit_name, sqlstate, message, ref_id, logged_at)
            VALUES ('crew_ops.apply_pairing', SQLSTATE, SQLERRM, p_pairing_id, clock_timestamp());
            RETURN;   -- caller commits: the audit row persists, the pairing does not
    END;
END;
$$;</pre>
<p>The remaining constructs mapped as follows. <code>DBMS_SCHEDULER</code> jobs became <code>pg_cron</code> entries for anything that is a single SQL statement or procedure call, and moved to the airline&#8217;s existing application scheduler for the twelve job chains with dependencies, because <code>pg_cron</code> does not do chains and pretending otherwise produces fragile shell scripts. <code>UTL_FILE</code> writes (crew reports to a shared filesystem) moved to the application tier with <code>COPY ... TO STDOUT</code> feeding it; the database no longer touches the filesystem.</p>
<p><code>DBMS_LOB</code> calls became ordinary <code>text</code> and <code>bytea</code> operations. <code>REF CURSOR</code> outputs became <code>refcursor</code> or, more often, set-returning functions, which the JDBC layer handles better. <code>DBMS_AQ</code> is covered above. Object types with methods became composite types plus functions taking the composite as the first argument, which PostgreSQL&#8217;s function-call syntax lets you write as <code>value.method()</code> anyway.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- Partition maintenance that used to be a DBMS_SCHEDULER job, now pg_cron on PostgreSQL 18
SELECT cron.schedule(
    'flight_leg_partitions',
    '0 2 1 * *',                       -- 02:00 on the 1st, server time zone UTC
    $$ CALL ops_maint.create_month_partition('ops.flight_leg', date_trunc('month', now() + interval '2 months')) $$
);

-- Monthly reconciliation of the crew-hours ledger against its summary
SELECT cron.schedule(
    'crew_hours_ledger_refresh',
    '30 3 * * *',
    $$ REFRESH MATERIALIZED VIEW CONCURRENTLY rpt.crew_hours_ledger $$
);</pre>
<p>Every converted unit was tested on PostgreSQL 18 against the Oracle original with a differential harness: the same inputs, both engines, results compared, and every mismatch classified as a defect in the conversion or a defect in the original that Oracle had been hiding. The second category was not empty.</p>
<h2>Data movement and cutover</h2>
<p>The nine terabytes moved twice: once in bulk for the parallel-run environment, and once more through change data capture for the cutover. Bulk load used ora2pg&#8217;s parallel COPY export straight into PostgreSQL 18 with indexes and foreign keys dropped, then rebuilt in parallel afterwards; on the target hardware the load ran at a rate bounded by the Oracle-side extract, not by PostgreSQL 18.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell"># ora2pg 25.0 bulk data export, direct to PostgreSQL 18, 16 parallel table jobs, 8 parallel per-partition jobs
ora2pg -c ora2pg.conf -t COPY 
       -O "SCHEMA=OPS" 
       -O "PG_DSN=dbi:Pg:dbname=ops;host=pg-node1;port=5432" 
       -O "PG_USER=${PG_MIG_USER}" -O "PG_PWD=${PG_MIG_PASSWORD}" 
       -O "JOBS=8" -O "ORACLE_COPIES=8" -O "PARALLEL_TABLES=16" 
       -O "DROP_INDEXES=1" -O "DROP_FKEY=1" -O "TRUNCATE_TABLE=1" 
       -O "DATA_LIMIT=20000" -O "BLOB_LIMIT=500" 
       -O "EMPTY_LOB_NULL=1" -O "REPLACE_ZERO_DATE=-INFINITY"

# then rebuild, in parallel, with the maintenance memory sized above
psql -h pg-node1 -d ops -c "SET maintenance_work_mem = '8GB'; SET max_parallel_maintenance_workers = 8;" 
     -f ops_indexes.sql</pre>
<p>Validation after every load into PostgreSQL 18 was row counts per table plus a content checksum on the 40 critical tables, computed the same way on both sides so the numbers are comparable:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- Oracle side
SELECT COUNT(*) AS rows_,
       SUM(ORA_HASH(leg_id || '|' || flight_number || '|' || TO_CHAR(std_utc, 'YYYYMMDDHH24MISS') || '|' || status_code)) AS chk
FROM   ops.flight_leg
WHERE  operating_date &gt;= DATE '2026-01-01';

-- PostgreSQL 18 side: same columns, same formatting, a 64-bit hash folded to match ranges
SELECT COUNT(*) AS rows_,
       SUM(hashtextextended(leg_id::text || '|' || flight_number::text || '|' ||
                            to_char(std_utc AT TIME ZONE 'UTC', 'YYYYMMDDHH24MISS') || '|' || status_code, 0)) AS chk
FROM   ops.flight_leg
WHERE  operating_date &gt;= DATE '2026-01-01';</pre>
<p>The hash functions differ, so the checksum is compared per row on a sample and by count and aggregate on the whole; what matters is that the row-shape string is identical on both sides, including the timestamp formatting, because that is where the DATE-to-timestamptz mapping shows up if it is wrong.</p>
<figure>
<img decoding="async" loading="lazy" src="https://minervadb.com/wp-content/uploads/2026/09/exadata-to-postgresql-18-cutover-flow.png" alt="Oracle Exadata to PostgreSQL 18 cutover flow: bulk load, CDC catch-up, parallel run, go/no-go gate, write freeze, switch, reverse CDC rollback path" width="1800" height="660" class="aligncenter size-full wp-image-93022"><figcaption>The rollback path is the part of the PostgreSQL 18 cutover plan that makes the rest of it possible to approve.</figcaption></figure>
<p>The change-data-capture bridge was Debezium&#8217;s Oracle connector reading LogMiner, started from the SCN recorded at the bulk export, into Kafka (already in the estate) and then into PostgreSQL 18 through a sink with the type mapping applied in the sink. Three weeks of parallel run gave us three weeks of reconciliation reports and three weeks of the converted PL/SQL running against real change volume.</p>
<p>The cutover itself was the boring part: application pools drained, writes frozen on Oracle, CDC lag watched to zero, sequences on PostgreSQL 18 advanced past the Oracle high-water marks, connection strings switched at PgBouncer, and reverse CDC from PostgreSQL 18 to Oracle running so that a rollback in the first week would have been a connection-string change and not a data-loss event.</p>
<p>It was never needed. It was drilled twice.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- Sequence advance at cutover: PostgreSQL 18 value must exceed every Oracle value ever issued
-- (Oracle CACHE means the last issued value can exceed LAST_NUMBER; use the data, not the catalog)
SELECT setval('ops.flight_leg_leg_id_seq',
              (SELECT COALESCE(MAX(leg_id), 0) + 1000 FROM ops.flight_leg),
              false);

-- Verification after, generated per owned sequence from pg_depend and run as one script:
-- every row must return ok = true before the connection strings are switched
SELECT 'ops.flight_leg_leg_id_seq' AS sequence_name,
       (SELECT last_value FROM ops.flight_leg_leg_id_seq)           AS seq_value,
       (SELECT MAX(leg_id) FROM ops.flight_leg)                     AS table_max,
       (SELECT last_value FROM ops.flight_leg_leg_id_seq)
         &gt; (SELECT MAX(leg_id) FROM ops.flight_leg)                 AS ok;</pre>
<h2>Performance and scalability on the PostgreSQL 18 stack: what we measured</h2>
<p>We do not publish the client&#8217;s numbers, so this section describes what was measured and how, and states the outcome against the targets rather than as absolute figures. The targets were set from Oracle: for each of the top 50 statements, the AWR p95 elapsed time in the peak hour, and for the system, the peak execution rate with 25 percent headroom. The PostgreSQL 18 side of the comparison came from <code>pg_stat_statements</code> with <code>track_io_timing</code> on, sampled at the same hours over the parallel run, and from the load test that replayed captured traffic at 1.25 times peak rate.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- PostgreSQL 18 post-cutover top SQL, comparable to the AWR "SQL ordered by Elapsed Time" section (PG 17+ column names)
SELECT queryid,
       calls,
       ROUND(total_exec_time::numeric / 1000, 1)               AS total_s,
       ROUND(mean_exec_time::numeric, 3)                       AS mean_ms,
       ROUND((shared_blk_read_time + shared_blk_write_time)::numeric, 1) AS io_ms,
       shared_blks_hit,
       shared_blks_read,
       ROUND(100.0 * shared_blks_hit / NULLIF(shared_blks_hit + shared_blks_read, 0), 2) AS hit_pct,
       LEFT(query, 80)                                          AS query
FROM   pg_stat_statements
WHERE  dbid = (SELECT oid FROM pg_database WHERE datname = 'ops')
ORDER  BY total_exec_time DESC
LIMIT  50;

-- Where the time goes at the I/O layer (PostgreSQL 18: WAL I/O included here, per backend type)
SELECT backend_type, object, context,
       reads, read_time, writes, write_time, fsyncs, fsync_time
FROM   pg_stat_io
WHERE  reads &gt; 0 OR writes &gt; 0
ORDER  BY read_time + write_time DESC;</pre>
<p>The outcome against the targets: all 50 statements met their p95 target at 1.25 times peak; the legality batch, which had been the item everyone expected to regress without Exadata, ran inside its window with margin once the <code>BULK COLLECT</code> loops were set-based; and the three reporting queries that had leaned on smart scan were the only ones that needed design work, which parallel query and one covering index resolved. The cache-hit ratio on <code>pg_stat_io</code> at peak sat where the working-set measurement predicted it would, which is the check that the sizing method was sound rather than lucky.</p>
<p>On scalability, the design has two levers left unpulled. Read scaling goes to the standbys through Patroni&#8217;s replica routing, and the reporting workload already runs there. Write scaling on a single primary is bounded by the 64 cores and the WAL device; at 1.25 times peak the primary was under half utilised on CPU and the WAL device was under a quarter of its measured throughput.</p>
<p>The airline&#8217;s growth plan does not reach the point where a single primary becomes the constraint inside the PostgreSQL 18 support window, and we wrote the trigger conditions (sustained CPU over 60 percent at peak, WAL write latency over 2 ms) into the handover so the conversation about partitioning across nodes starts from a measurement, not a feeling.</p>
<h2>What we would do differently</h2>
<p>Three things. We would run the working-set measurement before agreeing the hardware specification with procurement rather than in parallel with it; it confirmed the 1 TB nodes but it could have told us 768 GB was enough and saved money. We would convert the six materialised views before the PL/SQL rather than after, because the reporting team&#8217;s acceptance testing was gated on them and it became the critical path. And we would have put the AFTER-trigger role change in PostgreSQL 18 on the assessment checklist from the start; two audit triggers written for Oracle assumed the committing role, PostgreSQL 18 runs them as the role that queued the event, and we found it in test rather than in review.</p>
<p>One thing we would not change: rewriting the PL/SQL instead of emulating it. It cost a quarter of a four-person team and it produced code the airline&#8217;s own engineers can read, which is the point of leaving a proprietary platform.</p>
<h2>Reproducibility and caveats</h2>
<p>Versions, so the claims above can be checked: Oracle Database 19c on Exadata X9M-2; PostgreSQL 18.6 (the current minor at time of writing, released 13 August 2026); ora2pg 25.0; Patroni 4.1.x with etcd 3.5; pgBackRest 2.59; PgBouncer 1.25.2; pg_cron 1.6 or later; Debezium 3.x Oracle connector with LogMiner. Every sizing figure is rounded and the client is anonymised; the arithmetic applies to your estate only after you have replaced our AWR numbers with yours.</p>
<p>Test every conversion pattern here against your own PL/SQL and your own data in a staging environment that mirrors production topology, keep a verified backup and a rehearsed restore in place before any cutover, and keep the reverse CDC path warm until sign-off; a migration without a rollback path is a bet, not a plan.</p>
<p>If you are planning an Exadata exit and want the assessment matrix, the sizing method, or the PL/SQL conversion patterns applied to your estate, that is the work the <a href="https://minervadb.com/postgresql-consulting/">MinervaDB PostgreSQL consulting</a> team does, on-premises and in the cloud, with the same rule we apply to ourselves: the numbers come from the catalog and the AWR, never from the sales deck.</p>
<h2>References</h2>
<p><a href="https://www.postgresql.org/docs/18/release-18.html" rel="noopener" target="_blank">PostgreSQL 18 release notes</a> · <a href="https://www.postgresql.org/docs/release/" rel="noopener" target="_blank">PostgreSQL release history</a> · <a href="https://www.postgresql.org/docs/18/indexes-multicolumn.html" rel="noopener" target="_blank">Multicolumn indexes and skip scan</a> · <a href="https://www.postgresql.org/docs/18/ddl-constraints.html" rel="noopener" target="_blank">Constraints, including WITHOUT OVERLAPS</a> · <a href="https://www.postgresql.org/docs/18/runtime-config-resource.html" rel="noopener" target="_blank">Resource consumption parameters (io_method, io_workers)</a> · <a href="https://www.postgresql.org/docs/18/monitoring-stats.html" rel="noopener" target="_blank">pg_stat_io and cumulative statistics</a> · <a href="https://www.postgresql.org/docs/18/ddl-rowsecurity.html" rel="noopener" target="_blank">Row security policies</a> · <a href="https://ora2pg.darold.net/" rel="noopener" target="_blank">ora2pg</a> · <a href="https://patroni.readthedocs.io/" rel="noopener" target="_blank">Patroni</a> · <a href="https://pgbackrest.org/" rel="noopener" target="_blank">pgBackRest</a> · <a href="https://www.pgbouncer.org/" rel="noopener" target="_blank">PgBouncer</a> · <a href="https://github.com/citusdata/pg_cron" rel="noopener" target="_blank">pg_cron</a> · <a href="https://debezium.io/documentation/reference/stable/connectors/oracle.html" rel="noopener" target="_blank">Debezium Oracle connector</a> · <a href="https://blogs.oracle.com/exadata/exadata-x9m" rel="noopener" target="_blank">Oracle Exadata X9M</a> · <a href="https://www.oracle.com/a/ocom/docs/engineered-systems/exadata/exadata-x9m-2-ds.pdf" rel="noopener" target="_blank">Exadata X9M-2 data sheet</a></p>
<p><a href="https://minervadb.com/oracle-exadata-to-postgresql-18-migration-airline/">Oracle Exadata to PostgreSQL 18 Migration: An Airline Operations Case Study from the MinervaDB Data Migration Team</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MongoDB 8.3 High Availability and Scalability: What Changed On-Premises and in Atlas</title>
        <link>https://minervadb.com/mongodb-8-3-high-availability-and-scalability/</link>
        <pubDate>Mon, 07 Sep 2026 08:22:35 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mongodb-8-3-high-availability-and-scalability-what-changed-on-premises-and-in-atlas/</guid>
        <source url="https://minervadb.com/">MinervaDB</source>
        <description><![CDATA[<p>MongoDB 8.3 shipped on 4 May 2026, and for anyone who runs sharded clusters it is the first minor release where the self-managed builds get the same sharding lifecycle tooling that Atlas has been driving [...]</p>
<p><a href="https://minervadb.com/mongodb-8-3-high-availability-and-scalability/">MongoDB 8.3 High Availability and Scalability: What Changed On-Premises and in Atlas</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MongoDB 8.3 shipped on 4 May 2026, and for anyone who runs sharded clusters it is the first minor release where the self-managed builds get the same sharding lifecycle tooling that Atlas has been driving behind the scenes since 8.0. Three changes matter operationally: the <code>removeShard</code> command is deprecated in favour of a four-step draining workflow you can pause and inspect, a replica set can now be turned directly into a sharded cluster with an embedded config shard in one rolling restart, and a set of overload controls (targeted mirrored reads in 8.2, connection establishment rate limiting, overload-aware retry targeting in MongoDB 8.3) closes the gap that used to open up in the minutes after an election.</p>
<p>This post walks through each of those for MongoDB 8.3 high availability and scalability work, on-premises and in Atlas, and ends with where I would and would not deploy MongoDB 8.3 today.</p>
<p>One thing to get out of the way first, because it changes the whole decision: MongoDB 8.3 is a <em>minor</em> release, not the next long-term line. That has consequences on-premises that Atlas customers never see.</p>
<p><img decoding="async" loading="lazy" src="https://minervadb.com/wp-content/uploads/2026/09/mongodb-8-3-high-availability-scalability.png" alt="MongoDB 8.3 high availability and scalability on-premises and in Atlas" width="1200" height="630" class="aligncenter size-full wp-image-93008"></p>
<h2>Which MongoDB 8.x are you actually running?</h2>
<p>MongoDB&#8217;s cadence since 8.0 has two tracks. Major releases (7.0, 8.0) arrive roughly every two years, run on Atlas and on-premises, and carry a five-year lifecycle. Minor releases (8.1, 8.2, 8.3) arrive quarterly-ish and until 8.2 were Atlas-only. Starting with 8.2 the minor track is downloadable for Community and Enterprise Advanced, which is how MongoDB 8.3 ends up on an on-prem server in the first place.</p>
<p>The support policy for minors is the part people miss: once a new minor ships, the previous one stops receiving patches. 8.2 reached end of life on 31 July 2026, ten months after it was released. If you deployed 8.2 on-premises last autumn you are already off support unless you have moved to MongoDB 8.3.</p>
<figure>
<img decoding="async" loading="lazy" src="https://minervadb.com/wp-content/uploads/2026/09/mongodb-8-3-release-tracks.png" alt="MongoDB 8.3 release tracks: the 8.0 major line versus the 8.1, 8.2 and 8.3 minor line, with support windows" width="1800" height="600" class="aligncenter size-full wp-image-93009"><figcaption>The 8.0 line is the only one with a multi-year patch horizon. MongoDB 8.3 is current, but its patch window ends the day 8.4 (or 9.0) ships.</figcaption></figure>
<p>Three more rules from the versioning policy that shape a self-managed upgrade plan. Minor-to-minor upgrades are strictly sequential, so an 8.1 cluster goes through 8.2 before it can reach MongoDB 8.3, and each hop is a binary upgrade plus an FCV bump. Going from a minor back to a major is a downgrade, and binary downgrades are not supported on Community Edition at all. And two features are explicitly unsupported on the minor track: Atlas Live Migration and <code>mongosync</code>. If you have a cluster-to-cluster sync running for DR, or you are planning a migration into Atlas next year, a MongoDB 8.3 source takes those tools off the table.</p>
<p>The 8.0 line, by contrast, is the one that receives backports. The connection rate limiter that I cover below is documented as available in 8.0.12, and the initial sync index memory controls in 8.0.13. Percona Server for MongoDB, which is what most of our self-managed customers run, is built on the 7.0 and 8.0 lines only; the 8.0.29-13 build from 20 August 2026 carries the same CVE fixes as upstream 8.0.29. There is no Percona build of MongoDB 8.3.</p>
<h2>MongoDB 8.3 scalability: what changed in the sharded cluster lifecycle</h2>
<h3>Config shards, and the three-shard rule</h3>
<p>Since 8.0 a sharded cluster no longer needs a dedicated config server replica set. One shard can carry the cluster metadata alongside application data; MongoDB calls this a config shard or embedded config server. On a small cluster that removes three nodes of infrastructure, which is the difference between nine <code>mongod</code> processes and six for a two-shard deployment.</p>
<p>The documentation&#8217;s guidance is blunt, and I agree with it from operating both shapes: use a config shard at three shards or fewer, and move to a dedicated CSRS beyond that, or earlier if the workload is latency-sensitive enough that you do not want metadata reads and refreshes competing with user I/O on the same WiredTiger cache. Queryable Encryption collections and on-prem queryable backups also require a dedicated config server.</p>
<figure>
<img decoding="async" loading="lazy" src="https://minervadb.com/wp-content/uploads/2026/09/mongodb-8-3-config-shard-vs-dedicated-csrs.png" alt="MongoDB 8.3 sharded cluster topology: embedded config shard versus dedicated config server replica set" width="1800" height="760" class="aligncenter size-full wp-image-93010"><figcaption>The embedded shape saves three nodes; the dedicated shape isolates metadata I/O. The transition between them is online in both directions.</figcaption></figure>
<p>In Atlas the decision is made for you. Atlas-Managed Config Servers is on by default for every 8.0+ sharded cluster: at five shards or fewer Atlas runs an embedded config server, and when you add a sixth shard it transitions to a dedicated config server automatically, draining user data off <code>config-0</code> with chunk migrations and <code>moveCollection</code>, waiting out <code>orphanCleanupDelaySecs</code>, and then adding a replacement shard to keep your shard count.</p>
<p>That transition is online but it is not free: receiving shards see elevated CPU, memory and I/O for the duration, you cannot change the cluster tier while it runs, and Atlas tells you not to cancel it. On a multi-terabyte cluster it can run for days. Clusters using Atlas Search, unsharded time series collections or Queryable Encryption are pinned to whichever config type they started with.</p>
<h3>MongoDB 8.3: replica set to sharded cluster in one rolling restart</h3>
<p>This is the change I am most pleased about for self-managed estates. Before MongoDB 8.3, converting a replica set into a sharded cluster with a config shard meant first turning it into a dedicated config server and then transitioning, which was awkward because a dedicated CSRS is not supposed to hold user data. MongoDB 8.3 adds <code>--replicaSetConfigShardMaintenanceMode</code>, which relaxes the startup checks so the members can be restarted as <code>--configsvr</code> while still carrying application data.</p>
<p>The sequence, on a three-member replica set <code>rs0</code>, secondaries first:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell"># Step 1: rolling restart, one member at a time, in maintenance mode
mongod --config /etc/mongod.conf --configsvr --replicaSetConfigShardMaintenanceMode
# wait for rs.status() to show the member back in SECONDARY before the next one</pre>
<pre class="EnlighterJSRAW" data-enlighter-language="javascript">// Step 2: on the primary, flag the replica set as a config server
var conf = rs.conf();
conf.configsvr = true;
conf.version += 1;
rs.reconfig(conf);

// confirm every member has applied it before going further
db.aggregate([
  { $documents: rs.status().members },
  { $group: { _id: null, allConfigSvr: { $min: { $eq: ["$configsvr", true] } } } }
]);
// expected: { _id: null, allConfigSvr: true }</pre>
<pre class="EnlighterJSRAW" data-enlighter-language="shell"># Step 3: second rolling restart WITHOUT the maintenance flag
mongod --config /etc/mongod.conf --configsvr

# Step 4: start a router pointing at the set
mongos --config /etc/mongos.conf   # sharding.configDB: rs0/host1:27017,host2:27017,host3:27017</pre>
<pre class="EnlighterJSRAW" data-enlighter-language="javascript">// Step 5: through mongos, make rs0 both config server and first shard
db.adminCommand({ transitionFromDedicatedConfigServer: 1 });
// { ok: 1 }

sh.isConfigShardEnabled();          // enabled: true
db.adminCommand({ listShards: 1 }); // shard _id "config" is rs0</pre>
<p>Two things to write into the runbook before you run this. First, the application connection string changes from the replica set seed list to the <code>mongos</code> address, so plan the cutover with the application team rather than discovering it during the change window. Second, and this is new in MongoDB 8.3: a replica set that has been a sharded cluster cannot be converted back to a plain replica set. The shard identity document survives, and clearing it is a support-assisted procedure. Treat the conversion as one-way and rehearse it on a restored backup first.</p>
<h3>Draining a shard without <code>removeShard</code></h3>
<p><code>removeShard</code> has been the same opaque call since 2.x: issue it, poll it, and hope the balancer keeps moving. MongoDB 8.3 deprecates it and splits the operation into four commands, all run through <code>mongos</code> with the <code>clusterManager</code> role.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="javascript">// 1. begin draining; the balancer does the actual chunk moves, so it must be enabled
db.adminCommand({ balancerStatus: 1 });          // mode: "full"
db.adminCommand({ startShardDraining: "shard04" });

// 2. poll; this is the part removeShard never gave you cleanly
db.adminCommand({ shardDrainingStatus: "shard04" });
/* abridged from the MongoDB 8.3 reference:
{
  shard: "shard04",
  remainingCriticalSectionChunks: 0,
  totalChunksToDrain: 15,
  chunksLeftToDrain: 8,
  databases: [ { name: "orders", isPrimary: true, collections: [ ... ] } ],
  ok: 1
} */

// 3. anything the balancer cannot move has to be moved by hand:
//    databases that have shard04 as primary shard ...
db.adminCommand({ movePrimary: "orders", to: "shard03" });
//    ... and unsharded collections that live on shard04
db.adminCommand({ moveCollection: "orders.fx_rates", toShard: "shard03" });

// 4. commit only when chunksLeftToDrain is 0 and databases is empty
db.adminCommand({ commitShardRemoval: "shard04" });

// change of plan? draining is reversible until you commit
db.adminCommand({ stopShardDraining: "shard04" });</pre>
<p>The operational gain is not the syntax; it is that draining is now an inspectable, stoppable state. On a cluster where the balancer window is restricted to nights, you can start the drain on Monday, watch <code>chunksLeftToDrain</code> fall over the week, and commit on Friday without ever holding the old command open. Two constraints carry over from <code>removeShard</code> and are worth restating: you cannot take a cluster backup while a drain is in progress, and open change stream cursors may close and not resume across it. None of these commands exist on Atlas, where shard removal is a cluster-configuration change that Atlas executes for you.</p>
<h3>Moving data without changing the shard key</h3>
<p>The rest of the data-movement toolbox arrived in 8.0 and is unchanged in MongoDB 8.3, but it is what makes the draining workflow usable, so it belongs here. <code>moveCollection</code> relocates an unsharded collection to a named shard. <code>unshardCollection</code> collapses a sharded collection onto one shard. And <code>reshardCollection</code> with <code>forceRedistribution: true</code> rebalances a collection across the current shard set on its existing key, which is how you spread a collection onto a newly added shard without waiting for the balancer&#8217;s chunk-by-chunk pace.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="javascript">// spread orders.events across all shards on the same key after adding shard05
db.adminCommand({
  reshardCollection: "orders.events",
  key: { tenant_id: "hashed" },
  forceRedistribution: true
});

// progress: remainingOperationTimeEstimatedSecs is -1 until the clone phase has run long enough to extrapolate
db.getSiblingDB("admin").aggregate([
  { $currentOp: { allUsers: true, localOps: false } },
  { $match: { type: "op", "originatingCommand.reshardCollection": "orders.events" } },
  { $project: { shard: 1, desc: 1, totalOperationTimeElapsedSecs: 1, remainingOperationTimeEstimatedSecs: 1 } }
]);</pre>
<p>All three run on the resharding machinery, so all three inherit its preconditions, and these are the numbers I check before approving one on a production cluster: each participating shard needs free storage of at least twice the collection size plus indexes divided by the shard count, I/O utilisation under 50 percent, CPU under 80 percent, and <code>writeConcernMajorityJournalDefault</code> set to <code>true</code>. The operation has a floor of about five minutes even for a tiny collection, and it ends with a critical section where writes to the collection are blocked for roughly two seconds. Applications with aggressive client-side timeouts notice that. Index builds started during the operation can fail silently, so freeze DDL on the namespace for the duration.</p>
<h3>The orphan cleanup change that kills your reporting queries</h3>
<p>This one is easy to miss in the 8.2 notes and it is the change most likely to show up as a mystery ticket after an upgrade. After a chunk migration the donor shard has to delete the range it gave away. Two defaults changed in 8.2. <code>orphanCleanupDelaySecs</code> went from 900 to 3600 seconds, so orphans now sit on the donor for an hour before deletion. And <code>terminateSecondaryReadsOnOrphanCleanup</code> was introduced with a default of <code>true</code>: when the range deletion finally runs, any long-running read on a secondary that could still be reading the orphaned range is terminated first.</p>
<p>The intent is correctness, because a secondary read that spans a range deletion could return partial results. The effect is that hour-long analytics queries pinned to secondaries with <code>readPreference: secondary</code> die at unpredictable times after every migration. The counter to watch is <code>serverStatus().metrics.operation.killedDueToRangeDeletion</code>; if it climbs, either move those queries to a dedicated analytics node with a balancer window that avoids them, or raise <code>orphanCleanupDelaySecs</code> beyond the longest legitimate query. Note that a new value only applies to range deletions created after the change; existing ones keep the old delay until you step the primary down.</p>
<div>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Pre-8.2</th>
<th>8.2 / 8.3 default</th>
<th>Unit</th>
<th>Change requires</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>orphanCleanupDelaySecs</code></td>
<td>900</td>
<td>3600</td>
<td>seconds</td>
<td>runtime <code>setParameter</code>; applies to new range deletions only</td>
</tr>
<tr>
<td><code>terminateSecondaryReadsOnOrphanCleanup</code></td>
<td>n/a</td>
<td>true</td>
<td>boolean</td>
<td>runtime <code>setParameter</code></td>
</tr>
<tr>
<td><code>mirrorReads.targetedMirroring.tag</code></td>
<td>n/a</td>
<td>{} (off)</td>
<td>document</td>
<td>runtime <code>setParameter</code>, primary only</td>
</tr>
<tr>
<td><code>ingressConnectionEstablishmentRateLimiterEnabled</code></td>
<td>n/a (8.0.12+)</td>
<td>false</td>
<td>boolean</td>
<td>runtime <code>setParameter</code></td>
</tr>
<tr>
<td><code>initialSyncIndexBuildMemoryPercentage</code></td>
<td>n/a (8.0.13+)</td>
<td>10.0</td>
<td>percent of RAM</td>
<td>runtime <code>setParameter</code></td>
</tr>
<tr>
<td><code>overloadAwareServerSelectionEnabled</code></td>
<td>n/a</td>
<td>false (8.3)</td>
<td>boolean</td>
<td>runtime <code>setParameter</code></td>
</tr>
</tbody>
</table>
</div>
<h2>MongoDB 8.3 high availability: closing the post-election gap</h2>
<p>Elections in MongoDB have been fast for years; a healthy replica set picks a new primary in well under ten seconds. The availability loss that actually hurts is what happens in the two or three minutes afterwards: the new primary has a cold cache, every application pool reconnects at once, and the retry logic in drivers and in <code>mongos</code> hammers whichever node answered first. The changes in MongoDB 8.2 and MongoDB 8.3 target exactly that window.</p>
<figure>
<img decoding="async" loading="lazy" src="https://minervadb.com/wp-content/uploads/2026/09/mongodb-8-3-failover-controls.png" alt="MongoDB 8.3 high availability controls and where they act during a failover" width="1800" height="660" class="aligncenter size-full wp-image-93011"><figcaption>None of the MongoDB 8.3 controls shorten the election. They shorten what comes after it.</figcaption></figure>
<h3>Targeted mirrored reads (8.2)</h3>
<p>Mirrored reads have been on by default since 4.4: the primary forwards one percent of eligible reads (<code>find</code>, <code>count</code>, <code>distinct</code>, and the filter portion of <code>update</code> and <code>findAndModify</code>) to electable secondaries, fire-and-forget, so their caches are not stone cold when one of them wins an election. The limitation was that it sprayed evenly across every electable member and could not reach hidden nodes. 8.2 adds <code>targetedMirroring</code>, which mirrors to members matching a replica set tag, at its own sampling rate, and hidden members are allowed.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="javascript">// tag the member you intend to fail over to (a DR-site member, or the one with priority 2)
var cfg = rs.conf();
cfg.members[2].tags = { warm: "standby" };
cfg.version += 1;
rs.reconfig(cfg);

// on the primary: keep the 1% general mirroring, and additionally mirror 25% of reads to the tagged member
db.adminCommand({
  setParameter: 1,
  mirrorReads: {
    samplingRate: 0.01,
    maxTimeMS: 1000,
    targetedMirroring: { tag: { warm: "standby" }, samplingRate: 0.25, maxTimeMS: 1000 }
  }
});

// confirm it is doing something
db.serverStatus({ mirroredReads: 1 }).mirroredReads;</pre>
<p>A few cautions from running this. The setting lives on the primary only, so after a failover the new primary has whatever <code>mirrorReads</code> value it was started with; put it in <code>mongod.conf</code> under <code>setParameter</code> on every member, not just the current primary. Only one tag can be supplied, and every member carrying that tag is targeted. Mirrored reads consume connections from a pool capped by <code>mirrorReadsMaxConnPoolSize</code> (default 4, new in 8.2), so a high targeted sampling rate on a busy primary will start dropping mirrors rather than slowing the primary, which is the right failure mode but means the warm-up is best-effort.</p>
<p>And it warms the WiredTiger cache, not the filesystem cache or the plan cache in any guaranteed way; on a member with much less RAM than the primary it cannot do much.</p>
<h3>Connection establishment rate limiting (8.2, in 8.0.12)</h3>
<p>Of everything in this post, this is the change I would enable first on a production replica set, and the fact that it is backported to 8.0.12 means you do not need the minor track to get it. When a primary steps down, every application server&#8217;s pool detects the topology change and reconnects. A fleet of 400 application pods with 50-connection pools is 20,000 TLS handshakes and SCRAM exchanges landing on the new primary inside a few seconds, and on a mid-sized node that alone can push CPU to saturation and delay the very operations the pools are reconnecting to run.</p>
<p>Before 8.2 the only knobs were <code>maxIncomingConnections</code>, which is a hard cap, and driver-side jitter, which you do not control across every team.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml"># mongod.conf: admit 500 new connections/sec, absorb a 4-second burst above that,
# queue up to 2000 more, reject the rest with a retryable error
setParameter:
  ingressConnectionEstablishmentRateLimiterEnabled: true
  ingressConnectionEstablishmentRatePerSec: 500
  ingressConnectionEstablishmentBurstCapacitySecs: 4
  ingressConnectionEstablishmentMaxQueueDepth: 2000</pre>
<pre class="EnlighterJSRAW" data-enlighter-language="javascript">// what to graph after enabling it
var s = db.serverStatus();
printjson({
  queued:   s.connections.queuedForEstablishment,
  rejected: s.connections.establishmentRateLimit.rejected,
  exempted: s.connections.establishmentRateLimit.exempted,
  avgQueuedMicros: s.queues.ingressSessionEstablishment.averageTimeQueuedMicros,
  tlsHandshakeMicros: s.metrics.network.averageTimeToCompletedTLSHandshakeMicros,
  authMicros:         s.metrics.network.averageTimeToCompletedAuthMicros
});</pre>
<p>The numbers above are a starting shape, not a recommendation; size the rate from your own measured reconnect behaviour. The way to get that number is to look at <code>averageTimeToCompletedTLSHandshakeMicros</code> and <code>averageTimeToCompletedAuthMicros</code> during a planned stepdown in staging with the limiter off, then set the rate so the queue drains in a few seconds rather than letting the handshakes starve the oplog appliers. The default <code>MaxQueueDepth</code> of 0 rejects anything that would queue, which is almost never what you want once the limiter is on; pick a real depth. And test the driver behaviour: a rejected connection surfaces as a network error the driver retries with backoff, which is fine for modern drivers and not fine for anything hand-rolled.</p>
<h3>Overload-aware server selection (8.3)</h3>
<p>MongoDB 8.3 adds <code>overloadAwareServerSelectionEnabled</code>, off by default. It changes how a <code>mongos</code> or a <code>mongod</code> acting as an internal client picks a target when an operation fails with an error labelled <code>SystemOverloadedError</code>: instead of retrying against the same member it prefers one that has not recently reported overload. Alongside it, MongoDB 8.3 gives the internal retry path a token bucket (<code>shardRetryTokenBucketCapacity</code>, <code>shardRetryTokenReturnRate</code>) and explicit backoff controls (<code>defaultClientRetryAttempts</code>, default 3, plus base and max backoff in milliseconds).</p>
<p>Together these are the sharded-cluster equivalent of the connection limiter: they stop a mongos fleet from converting one slow shard secondary into a cluster-wide retry storm. I have not yet run this one under a production-shaped load test, so I am reporting what it does rather than how much it helps; it is on my list for the next MongoDB 8.3 lab pass.</p>
<h3>Rebuilding a member faster</h3>
<p>Initial sync is the other place where HA quietly degrades: while a replaced member is syncing, a three-member set is running with a majority of two out of two live members, and a second failure means read-only. 8.2 lets index builds during initial sync use a percentage of RAM (<code>initialSyncIndexBuildMemoryPercentage</code>, default 10, bounded by <code>initialSyncIndexBuildMemoryMinMB</code> 200 and <code>MaxMB</code> 16384) instead of the old fixed budget. On a 256 GB node that is 16 GB for index builds instead of a few hundred megabytes, and it is backported to 8.0.13 and 7.0.26. Raise it during a rebuild and drop it back afterwards; 40 percent on a member that is otherwise idle during sync is a reasonable ceiling.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="javascript">// on the syncing member, before it reaches the index build phase
db.adminCommand({ setParameter: 1, initialSyncIndexBuildMemoryPercentage: 40 });

// catch-up visibility, new in MongoDB 8.3
db.serverStatus().metrics.repl.network.oplogFetcherLagSeconds;
db.serverStatus().metrics.repl.network.oplogGetMoresProcessed;</pre>
<h3>What &#8220;majority&#8221; means since 8.0</h3>
<p>One 8.0 change still surprises teams moving from 7.0 and it matters for how you read HA metrics. <code>w: "majority"</code> now acknowledges when a majority of members have <em>written</em> the oplog entry, not when they have <em>applied</em> it. Writes get faster; a read from a secondary immediately after an acknowledged write, without causal consistency, can still miss it. <code>rs.status()</code> exposes the distinction per member as <code>optimeWritten</code> alongside <code>optime</code>, and if you alert on replication lag you should decide which of the two you mean. For application correctness, sessions with causal consistency or <code>readConcern: "majority"</code> behave exactly as before.</p>
<h2>MongoDB 8.3 high availability and scalability on-premises versus Atlas</h2>
<p>The same server code runs in both places, but the operational surface for MongoDB 8.3 high availability and scalability is different enough that the runbooks do not transfer. The table is how I frame it for customers deciding where a new sharded workload should live.</p>
<div>
<table>
<thead>
<tr>
<th>Concern</th>
<th>Self-managed (Community / EA / Percona)</th>
<th>Atlas</th>
</tr>
</thead>
<tbody>
<tr>
<td>Version track</td>
<td>8.0.x for a multi-year patch horizon; MongoDB 8.3 only if you need its features and accept sequential minor upgrades and no <code>mongosync</code></td>
<td>Pin &#8220;major version&#8221; (8.0) or opt into auto-upgrade to latest; once auto-upgraded onto a minor you cannot return to the major until the next major ships</td>
</tr>
<tr>
<td>Config server type</td>
<td>Your call; embedded up to 3 shards, dedicated beyond, with <code>transitionTo/FromDedicatedConfigServer</code> and the MongoDB 8.3 direct conversion</td>
<td>Atlas-managed; embedded to 5 shards, automatic online transition beyond, blocked for Search/QE/unsharded time series</td>
</tr>
<tr>
<td>Adding or removing shards</td>
<td><code>addShard</code>; MongoDB 8.3 draining workflow; you own balancer windows and <code>movePrimary</code></td>
<td>Change shard count in the cluster config; draining commands are not exposed</td>
</tr>
<tr>
<td>Vertical scaling</td>
<td>Rolling hardware or VM changes, your rolling-restart runbook</td>
<td>Tier change with rolling restart; reactive and predictive compute auto-scaling, storage auto-scaling</td>
</tr>
<tr>
<td>Post-failover overload</td>
<td>Configure the 8.2/8.3 parameters above yourself, per member, in <code>mongod.conf</code></td>
<td>Server parameters largely not user-settable; rely on Atlas tier headroom and driver settings</td>
</tr>
<tr>
<td>Cross-region HA</td>
<td>Replica set members across sites with priorities and tags; zone sharding by hand</td>
<td>Multi-region and multi-cloud replica sets, Global Clusters (always dedicated config servers)</td>
</tr>
<tr>
<td>Kubernetes</td>
<td>Percona Operator for MongoDB or the MongoDB Enterprise operator; you own storage classes and PDBs</td>
<td>Atlas Kubernetes Operator manages Atlas resources, not pods</td>
</tr>
</tbody>
</table>
</div>
<p>The honest summary is that Atlas removes the sharding lifecycle work, which is where most self-managed sharded clusters go wrong, and in exchange takes away the server-parameter surface that lets you tune the post-election window. If your failure mode is &#8220;we mis-sized a shard migration&#8221;, Atlas is the safer place. If your failure mode is &#8220;a reconnect storm took the primary to 100 percent CPU&#8221;, self-managed 8.0.12+ with the connection limiter is the more controllable one. For most of the estates we run, a self-managed 8.0.x line on Percona builds with the backported controls enabled is where the risk is lowest today.</p>
<h2>Where I would deploy MongoDB 8.3, and where I would not</h2>
<p>As of September 2026: on Atlas, take MongoDB 8.3 on non-production and on production clusters that do not depend on Live Migration, and keep production sharded clusters pinned to the 8.0 major until you have read the no-revert rule twice. On-premises, stay on the 8.0 line for anything that has to be supportable in 2028, and reach for MongoDB 8.3 only when a feature forces it: the direct replica set to config shard conversion, the shard draining workflow, or the search, vector search and Queryable Encryption capabilities that are the stated reason the minor track exists on-prem at all.</p>
<p>If you do go to MongoDB 8.3 self-managed, budget for a binary upgrade every quarter, because the patch window closes the day the next minor ships, and check the Linux kernel: 8.2 carried a TCMalloc incompatibility with kernels 6.19 through 7.0.13 that crashed the process, and the fix was to move the kernel, not the database.</p>
<p>Whichever version you land on, MongoDB 8.3 high availability and scalability still come down to operations. The four things that decide availability in most MongoDB incidents I get called into are not version features. They are an oplog window shorter than the longest maintenance operation, a balancer running during peak hours, secondaries with less RAM than the primary they were expected to replace, and nobody having rehearsed the failover. MongoDB 8.3 gives you better tools for the aftermath of an election; it does not replace the drill.</p>
<p>Everything above should be tested against your own workload in a staging environment that mirrors production topology before any of it is applied to production, with a verified backup and a rehearsed restore in place. If you want a second pair of eyes on a sharded cluster design, an 8.0 to MongoDB 8.3 upgrade plan, or a failover drill, that is the kind of work the <a href="https://minervadb.com/mongodb-consulting/">MinervaDB MongoDB consulting</a> team does every week, on-premises and in Atlas.</p>
<h2>References</h2>
<p><a href="https://www.mongodb.com/docs/manual/release-notes/8.3/" rel="noopener" target="_blank">Release Notes for MongoDB 8.3</a> · <a href="https://www.mongodb.com/docs/manual/release-notes/8.2/" rel="noopener" target="_blank">Release Notes for MongoDB 8.2</a> · <a href="https://www.mongodb.com/docs/manual/reference/versioning/" rel="noopener" target="_blank">MongoDB Versioning</a> · <a href="https://www.mongodb.com/docs/manual/core/config-shard/" rel="noopener" target="_blank">Config Shard</a> · <a href="https://www.mongodb.com/docs/manual/tutorial/convert-replica-set-to-embedded-config-server/" rel="noopener" target="_blank">Convert Replica Set to an Embedded Config Shard</a> · <a href="https://www.mongodb.com/docs/manual/reference/command/startShardDraining/" rel="noopener" target="_blank">startShardDraining</a> · <a href="https://www.mongodb.com/docs/manual/reference/command/moveCollection/" rel="noopener" target="_blank">moveCollection</a> · <a href="https://www.mongodb.com/docs/manual/core/sharding-reshard-a-collection/" rel="noopener" target="_blank">Reshard a Collection</a> · <a href="https://www.mongodb.com/docs/manual/reference/parameters/" rel="noopener" target="_blank">Server Parameters</a> · <a href="https://www.mongodb.com/docs/atlas/transition-to-dedicated-config-servers/" rel="noopener" target="_blank">Atlas: Transition to Dedicated Config Servers</a> · <a href="https://www.mongodb.com/docs/atlas/architecture/current/scalability/" rel="noopener" target="_blank">Atlas Architecture Center: Scalability</a> · <a href="https://www.mongodb.com/legal/support-policy/lifecycles" rel="noopener" target="_blank">MongoDB Software Lifecycle Schedules</a> · <a href="https://docs.percona.com/new/2026/08/20/percona-server-for-mongodb-7040-22-and-8029-13-have-been-released/" rel="noopener" target="_blank">Percona Server for MongoDB 8.0.29-13</a></p>
<p><a href="https://minervadb.com/mongodb-8-3-high-availability-and-scalability/">MongoDB 8.3 High Availability and Scalability: What Changed On-Premises and in Atlas</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Rethinking PAM</title>
        <link>https://mariadb.org/rethinking-pam/</link>
        <pubDate>Mon, 07 Sep 2026 06:59:17 +0000</pubDate>
        <dc:creator>Daniel Black</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/rethinking-pam/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>PAM, Pluggable Authentication Modules, originated in Solaris and became common place in all Linux, BSDs, and AIX, HP-UX and macOS. MariaDB has had PAM support as an option since MariaDB 5.2.10 becoming stable in 10.0.11. …<br />
Continue reading "Rethinking PAM"<br />
Rethinking PAM appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/rethinking-pam/">Rethinking PAM</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>PAM, Pluggable Authentication Modules, originated in Solaris and became common place in all Linux, BSDs, and AIX, HP-UX and macOS. MariaDB has had PAM support as an option since MariaDB <a href="https://mariadb.org/rethinking-pam/" data-type="&quot;post&quot;" data-id="&quot;721&quot;">5.2.10</a> becoming stable in 10.0.11. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/rethinking-pam/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;Rethinking PAM&#8221;</span></a></p>
<p><a href="https://mariadb.org/rethinking-pam/">Rethinking PAM</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/rethinking-pam/">Rethinking PAM</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>From a Chocolate Wrapper to Concurrent InnoDB Page Splits</title>
        <link>https://mariadb.org/from-a-chocolate-wrapper-to-concurrent-innodb-page-splits/</link>
        <pubDate>Sat, 05 Sep 2026 20:24:39 +0000</pubDate>
        <dc:creator>Roman Nozdrin</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/from-a-chocolate-wrapper-to-concurrent-innodb-page-splits/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>This work started from a conversation with Monty Widenius at Meet Magento Czech in August. We discussed possible ways to improve the scalability of the InnoDB B+Tree, especially its insert path and page splits. …<br />
Continue reading "From a Chocolate Wrapper to Concurrent InnoDB Page Splits"<br />
From a Chocolate Wrapper to Concurrent InnoDB Page Splits appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/from-a-chocolate-wrapper-to-concurrent-innodb-page-splits/">From a Chocolate Wrapper to Concurrent InnoDB Page Splits</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>This work started from a conversation with Monty Widenius at Meet Magento Czech in August. We discussed possible ways to improve the scalability of the InnoDB B+Tree, especially its insert path and page splits. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/from-a-chocolate-wrapper-to-concurrent-innodb-page-splits/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;From a Chocolate Wrapper to Concurrent InnoDB Page Splits&#8221;</span></a></p>
<p><a href="https://mariadb.org/from-a-chocolate-wrapper-to-concurrent-innodb-page-splits/">From a Chocolate Wrapper to Concurrent InnoDB Page Splits</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/from-a-chocolate-wrapper-to-concurrent-innodb-page-splits/">From a Chocolate Wrapper to Concurrent InnoDB Page Splits</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Polyglot Persistence: The Proven Case for 5 Data Models</title>
        <link>https://minervadb.com/polyglot-persistence/</link>
        <pubDate>Sat, 05 Sep 2026 06:07:42 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/polyglot-persistence-the-proven-case-for-5-data-models/</guid>
        <source url="https://minervadb.com/">MinervaDB</source>
        <description><![CDATA[<p>Your transactional database is not failing you. It is doing precisely what it was engineered to do: take a write, make it durable, isolate it from every other write, and never lie about it. The [...]</p>
<p><a href="https://minervadb.com/polyglot-persistence/">Polyglot Persistence: The Proven Case for 5 Data Models</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Your transactional database is not failing you. It is doing precisely what it was engineered to do: take a write, make it durable, isolate it from every other write, and never lie about it. The problem is that a consumer-facing business no longer has one data consumption model. It has at least five, and each of them wants a storage layout and a consistency contract that contradicts the others. That contradiction is the whole argument for polyglot persistence, and this post makes it with measurements rather than slogans.</p>
<p>We will show, on a real PostgreSQL 16 and a real ClickHouse 26 build, why the same table and the same question cost 1.79 GB of I/O in one engine and 22 MiB in the other, why sixty-four writers queue behind a single row no matter how many cores you buy, why eventually consistent platforms exist at all, and why a vector index is a different kind of object from anything in the relational world. Then we lay out the polyglot persistence decision frame a CTO or an investor should apply before believing any &#8220;one database for everything&#8221; story, including ours.</p>
<h2>What polyglot persistence actually claims</h2>
<p>Martin Fowler gave the pattern its name in 2011: <a href="https://martinfowler.com/bliki/PolyglotPersistence.html" target="_blank" rel="noopener">polyglot persistence</a> means using different data storage technologies for different data, chosen by how the application reads and writes that data. The idea of polyglot persistence predates the term. Every large internet company arrived at polyglot persistence independently, usually after an outage, and usually after trying very hard not to.</p>
<p>The version of polyglot persistence that matters to a board is narrower. A business that serves consumers on the internet runs four or five workload classes with incompatible physics: transactions that must be exactly right, interactive traffic that must be fast everywhere, analytics that must scan everything, retrieval that must be semantically close, and the elastic cloud substrate underneath all of it. No single engine is optimal for more than one or two of those. Each additional engine is a real cost, so the decision is about which contradictions you can afford to paper over and which you cannot.</p>
<p><img loading="lazy" decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5NjAiIGhlaWdodD0iNTgwIiB2aWV3Qm94PSIwIDAgOTYwIDU4MCIgZm9udC1mYW1pbHk9IkhlbHZldGljYSxBcmlhbCxzYW5zLXNlcmlmIj4KPHJlY3Qgd2lkdGg9Ijk2MCIgaGVpZ2h0PSI1ODAiIGZpbGw9IiNmZmZmZmYiLz4KPHRleHQgeD0iNDgwIiB5PSIzNCIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZm9udC1zaXplPSIyMCIgZm9udC13ZWlnaHQ9ImJvbGQiIGZpbGw9IiMwYTE0MjQiPk9uZSBidXNpbmVzcywgZml2ZSBkYXRhIG1vZGVsczogdGhlIHBvbHlnbG90IHBlcnNpc3RlbmNlIGxhbmRzY2FwZTwvdGV4dD4KPHRleHQgeD0iNDgwIiB5PSI1OCIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZm9udC1zaXplPSIxMiIgZmlsbD0iIzZiNzI4MCI+UGxhY2VtZW50IGlzIHF1YWxpdGF0aXZlLiBFYWNoIGVuZ2luZSBpcyBlbmdpbmVlcmVkIGZvciBpdHMgcmVnaW9uIG9mIHRoZSBwbGFuZTsgbm9uZSBjb3ZlcnMgYWxsIG9mIGl0LjwvdGV4dD4KPCEtLSBheGVzIC0tPgo8bGluZSB4MT0iOTAiIHkxPSI1MjAiIHgyPSI5MTAiIHkyPSI1MjAiIHN0cm9rZT0iIzBhMTQyNCIgc3Ryb2tlLXdpZHRoPSIyIi8+CjxsaW5lIHgxPSI5MCIgeTE9IjUyMCIgeDI9IjkwIiB5Mj0iODAiIHN0cm9rZT0iIzBhMTQyNCIgc3Ryb2tlLXdpZHRoPSIyIi8+Cjx0ZXh0IHg9IjUwMCIgeT0iNTUyIiB0ZXh0LWFuY2hvcj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NzY1IiB5PSI0MzciIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZvbnQtc2l6ZT0iMTIiIGZpbGw9IiMzZDNkNDQiPlNwYW5uZXIsIEF1cm9yYSwgQWxsb3lEQiwgQ29ja3JvYWNoREI8L3RleHQ+Cjx0ZXh0IHg9Ijc2NSIgeT0iNDU3IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmb250LXNpemU9IjEyIiBmaWxsPSIjM2QzZDQ0Ij5EaXNhZ2dyZWdhdGVkIHN0b3JhZ2UsIGNvbnNlbnN1cyB3cml0ZXM8L3RleHQ+Cjx0ZXh0IHg9Ijc2NSIgeT0iNDc3IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmb250LXNpemU9IjEyIiBmaWxsPSIjM2QzZDQ0Ij5HbG9iYWwgT0xUUCB3aXRoIGVsYXN0aWMgY2FwYWNpdHk8L3RleHQ+CjwvZz4KPC9zdmc+Cg==" alt="Polyglot persistence landscape mapping OLTP row stores, eventually consistent key-value stores, columnar OLAP, vector databases and cloud-native distributed SQL against read shape and write contract" width="960" height="580"><br /><em>Figure 1. The polyglot persistence landscape: five workload classes, five storage contracts.</em></p>
<h2>The OLTP engine is keeping a promise, not hitting a wall</h2>
<p>A transaction-processing database sells one thing: ACID. Atomicity, consistency, isolation and durability are not marketing features; they are mechanisms with costs that show up in specific catalog views. Durability is a synchronous write to the write-ahead log before a commit is acknowledged. Isolation is a row-level lock, or in MVCC engines a tuple version chain plus a lock on the row being updated. Atomicity is the ability to roll every one of those back. In <a href="https://www.postgresql.org/docs/16/mvcc.html" target="_blank" rel="noopener">PostgreSQL&#8217;s MVCC implementation</a>, two sessions that update the same row serialise on that row by design, because that is the only way to keep the second update from clobbering the first.</p>
<p>The cleanest way to see the cost is to measure it. The runs below are on a two-vCPU sandbox with PostgreSQL 16.13, <code>synchronous_commit = off</code> to remove disk latency from the picture, and pgbench driving a single-statement transaction for ten seconds. This is a demonstration of a mechanism, not a benchmark; the absolute numbers are meaningless outside this box, and the shape of the curve is the point.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="Two workloads: one hot row versus writes spread over 1,000 rows">CREATE TABLE inventory (
    sku_id   INT PRIMARY KEY,
    on_hand  INT NOT NULL
);
INSERT INTO inventory
SELECT g, 1000000000
FROM generate_series(1, 1000) g;

-- hot.sql: every client decrements the same SKU
UPDATE inventory SET on_hand = on_hand - 1 WHERE sku_id = 1;

-- spread.sql: clients decrement a random SKU
set sku random(1, 1000)
UPDATE inventory SET on_hand = on_hand - 1 WHERE sku_id = :sku;</pre>
<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-title="pgbench, 10-second runs, output trimmed to tps and latency">$ for c in 1 8 32 64; do pgbench -n -f hot.sql -c $c -j 2 -T 10; done
clients=1    latency average = 0.065 ms   tps = 15298
clients=8    latency average = 0.260 ms   tps = 30790
clients=32   latency average = 2.020 ms   tps = 15838
clients=64   latency average = 5.871 ms   tps = 10900

$ for c in 1 8 32 64; do pgbench -n -f spread.sql -c $c -j 2 -T 10; done
clients=1    latency average = 0.066 ms   tps = 15238
clients=8    latency average = 0.190 ms   tps = 42089
clients=32   latency average = 0.932 ms   tps = 34339
clients=64   latency average = 2.080 ms   tps = 30774</pre>
<p>Both workloads saturate two cores by eight clients, so the interesting comparison is what happens after that. The spread workload holds three quarters of its peak at sixty-four clients. The hot-row workload loses two thirds of its peak and its latency grows ninety-fold. A snapshot of <code>pg_stat_activity</code> during the sixty-four-client hot-row run shows where the time went.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="Where 64 sessions are waiting, mid-run">SELECT wait_event_type,
       wait_event,
       COUNT(*)
FROM pg_stat_activity
WHERE backend_type = 'client backend'
  AND query LIKE 'UPDATE inventory%'
GROUP BY 1, 2
ORDER BY 3 DESC;

 wait_event_type |  wait_event   | count
-----------------+---------------+-------
 Lock            | tuple         |    38
 LWLock          | BufferContent |     7
 LWLock          | LockManager   |     6
 Lock            | transactionid |     6
                 |               |     5
 Client          | ClientRead    |     2</pre>
<p><img loading="lazy" decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5NjAiIGhlaWdodD0iMzMwIiB2aWV3Qm94PSIwIDAgOTYwIDMzMCIgZm9udC1mYW1pbHk9IkhlbHZldGljYSxBcmlhbCxzYW5zLXNlcmlmIj4KPHJlY3Qgd2lkdGg9Ijk2MCIgaGVpZ2h0PSIzMzAiIGZpbGw9IiNmZmZmZmYiLz4KPHRleHQgeD0iNDgwIiB5PSIzMiIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZm9udC1zaXplPSIyMCIgZm9udC13ZWlnaHQ9ImJvbGQiIGZpbGw9IiMwYTE0MjQiPldoeSB0aGUgaG90IHJvdyBzZXJpYWxpc2VzOiB3aGF0IEFDSUQgY29zdHMgdW5kZXIgNjQgY29uY3VycmVudCB3cml0ZXJzPC90ZXh0Pgo8dGV4dCB4PSI0ODAiIHk9IjU0IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmb250LXNpemU9IjEyIiBmaWxsPSIjNmI3MjgwIj5wZ19zdGF0X2FjdGl2aXR5IHNuYXBzaG90IHRha2VuIG1pZC1ydW4gaW4gdGhlIGxhYiBhYm92ZSAoUG9zdGdyZVNRTCAxNi4xMywgNjQgY2xpZW50cywgb25lIHNrdV9pZCk8L3RleHQ+CjxnIGZvbnQtc2l6ZT0iMTMiIGZpbGw9IiMwYTE0MjQiPgo8dGV4dCB4PSI2MCIgeT0iMTAwIj5Mb2NrOiB0dXBsZTwvdGV4dD48cmVjdCB4PSIyMzAiIHk9Ijg2IiB3aWR0aD0iNTcwIiBoZWlnaHQ9IjIwIiBmaWxsPSIjMGY2MmZlIi8+PHRleHQgeD0iODEwIiB5PSIxMDEiIGZvbnQtc2l6ZT0iMTIiPjM4IGJhY2tlbmRzPC90ZXh0Pgo8dGV4dCB4PSI2MCIgeT0iMTM1Ij5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l6ZT0iMTIiPjI8L3RleHQ+CjwvZz4KPHRleHQgeD0iNDgwIiB5PSIzMTIiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZvbnQtc2l6ZT0iMTIiIGZpbGw9IiMzZDNkNDQiPkZpZnR5IG9mIHNpeHR5LWZvdXIgc2Vzc2lvbnMgYXJlIHF1ZXVlZCBiZWhpbmQgdGhlIHJvdyBsb2NrLiBUaGUgZW5naW5lIGlzIGVuZm9yY2luZyBleGFjdGx5IHRoZSBpc29sYXRpb24gaXQgcHJvbWlzZWQ7IGNvbmN1cnJlbmN5IGNhbm5vdCBmaXggYSBzZXJpYWwgY29udHJhY3QuPC90ZXh0Pgo8L3N2Zz4K" alt="Bar chart of PostgreSQL wait events under 64 concurrent writers on one row, dominated by Lock:tuple" width="960" height="330"><br /><em>Figure 2. Wait events under hot-row contention, the first measurement behind polyglot persistence.</em></p>
<p>Fifty of sixty-four sessions are queued on the tuple lock or the transaction ID of the session holding it. Nothing here is a bug, a missing index or a tuning gap. The engine is serialising updates to one row because you asked it to guarantee that no decrement is lost. Sharding does not change the arithmetic for a single hot key; it only spreads the keys that are not hot. This is the first fundamental limit that forces polyglot persistence: an ACID row store&#8217;s throughput on a contended key is bounded by the serial critical section, and that is exactly what a consumer flash sale, a viral post&#8217;s like counter or a global leaderboard produces.</p>
<h2>What the consumer internet changed</h2>
<p>Enterprise applications of the previous era had a bounded number of users, a business-hours load curve and a tolerance for a few hundred milliseconds. Consumer applications have none of those properties. The traffic is spiky and global, the read-to-write ratio is often a thousand to one, and the product team measures latency at the 99th percentile in a region the database was never deployed in.</p>
<p>Amazon documented the consequences in the <a href="https://www.allthingsdistributed.com/files/amazon-dynamo-sosp2007.pdf" target="_blank" rel="noopener">Dynamo paper</a>. When a network partition happens, and it will, a system can keep accepting writes or it can keep every replica in agreement, but not both. A shopping cart that refuses to accept an item because a replica is unreachable costs more than a cart that briefly shows a stale item. Cassandra, DynamoDB, Riak and the key-value tier of most large platforms descend from that decision, and polyglot persistence at internet scale starts with it. The write contract becomes &#8220;this will converge&#8221;, enforced by quorum arithmetic and a conflict rule, rather than &#8220;this is true now&#8221;, enforced by a lock.</p>
<p>The trade is explicit and tunable. In Cassandra, a read at <code>LOCAL_QUORUM</code> against a replication factor of three touches two of three replicas in the local datacenter and returns the newest timestamped value it sees; the <a href="https://cassandra.apache.org/doc/latest/cassandra/architecture/dynamo.html" target="_blank" rel="noopener">consistency documentation</a> spells out the read-plus-write-greater-than-replication-factor rule that makes that read see the latest acknowledged write. What you give up is any notion of a multi-row transaction, a join or an ad hoc query, which is why the data model is designed backwards from the queries.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="Query-first modelling in CQL: the table is the query (Cassandra 5.x)">CREATE KEYSPACE consumer
WITH replication = {
    'class'      : 'NetworkTopologyStrategy',
    'us-east-1'  : 3,
    'ap-south-1' : 3
};

-- One partition per user, newest activity first, bounded by TTL.
CREATE TABLE consumer.activity_feed_by_user (
    user_id      UUID,
    event_ts     TIMEUUID,
    event_type   TEXT,
    payload      TEXT,
    PRIMARY KEY ((user_id), event_ts)
)
WITH CLUSTERING ORDER BY (event_ts DESC)
 AND default_time_to_live = 2592000
 AND compaction = {
    'class'                : 'TimeWindowCompactionStrategy',
    'compaction_window_unit': 'DAYS',
    'compaction_window_size': 1
 };

-- The application reads at LOCAL_QUORUM and writes at LOCAL_QUORUM:
-- 2 + 2 &gt; 3, so a read observes the latest acknowledged write in-region.
CONSISTENCY LOCAL_QUORUM;
SELECT event_ts, event_type, payload
FROM consumer.activity_feed_by_user
WHERE user_id = 7a3f1c2e-4d5b-4e6f-8a9b-0c1d2e3f4a5b
LIMIT 50;</pre>
<p>Notice what is missing. There is no foreign key to a users table, no join to the events catalog, no way to ask &#8220;which users had the most events this week&#8221; without a full cluster scan or a second table maintained by the application. That is the mirror image of the OLTP limit. An eventually consistent platform buys availability and horizontal write scale by refusing every feature that would require global coordination. Polyglot persistence is what happens when you stop pretending one of these contracts can substitute for the other.</p>
<h2>Analytics is columnar because the questions are columnar</h2>
<p>An analytical question is a function of a few columns over a very large number of rows. A row store answers it by reading every byte of every row, because the tuple is the unit of storage. A column store keeps each column in its own file, so a scan opens only the columns the query names, and compresses each column with a codec suited to that column&#8217;s distribution. This is the second fundamental limit behind polyglot persistence, and it is easy to measure.</p>
<p>The lab table is a 5-million-row, 24-column <code>orders</code> table with realistic width: two free-text addresses, a UUID session ID, a referrer URL, optional notes. It was generated in PostgreSQL 16.13, exported to CSV, and loaded unchanged into ClickHouse 26.7 through chdb, so both engines hold identical data. The question is the one every product dashboard asks first: revenue and order count by region and channel for the last ninety days.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="PostgreSQL 16.13: the same aggregate, warm cache, EXPLAIN (ANALYZE, BUFFERS)">EXPLAIN (ANALYZE, BUFFERS, COSTS OFF, TIMING OFF)
SELECT region,
       channel,
       COUNT(*)    AS orders,
       SUM(amount) AS revenue
FROM orders
WHERE order_ts &gt;= now() - interval '90 days'
GROUP BY region, channel
ORDER BY revenue DESC;

 Sort (actual rows=20 loops=1)
   Sort Key: (sum(amount)) DESC
   Buffers: shared hit=123593 read=105740
   I/O Timings: shared read=219.788
   -&gt;  Finalize GroupAggregate (actual rows=20 loops=1)
         -&gt;  Gather Merge (actual rows=60 loops=1)
               Workers Planned: 2
               Workers Launched: 2
               ...
               -&gt;  Partial HashAggregate (actual rows=20 loops=3)
                     -&gt;  Parallel Seq Scan on orders (actual rows=408674 loops=3)
                           Filter: (order_ts &gt;= (now() - '90 days'::interval))
                           Rows Removed by Filter: 1257993
                           Buffers: shared hit=123574 read=105740
 Execution Time: 674.381 ms

-- pg_class.relpages for orders: 229314  (229314 x 8 KB = 1.79 GB heap)</pre>
<p>The planner did nothing wrong. There is an index on <code>order_ts</code>, but a quarter of the table matches, so a parallel sequential scan is the right plan, and it is the right plan in every row store. The cost is structural: to sum one <code>NUMERIC</code> column across 1.2 million qualifying rows, the executor pulled all 229,314 heap pages through shared buffers, 105,740 of them from the operating system, because <code>ship_address</code>, <code>session_id</code> and <code>notes</code> live in the same 8 KB pages as <code>amount</code>.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="ClickHouse 26.7 (chdb): identical data, explicit MergeTree declaration">CREATE TABLE lab.orders
(
    order_id        UInt64,
    customer_id     UInt64,
    order_ts        DateTime64(6, 'UTC'),
    region          LowCardinality(String),
    channel         LowCardinality(String),
    status          LowCardinality(String),
    currency        FixedString(3),
    amount          Decimal(12, 2),
    -- ... 16 further columns identical to the PostgreSQL table
    carrier         LowCardinality(String),
    updated_at      DateTime64(6, 'UTC')
)
ENGINE = MergeTree
PARTITION BY toYYYYMM(order_ts)
ORDER BY (region, order_ts, order_id)
SETTINGS index_granularity = 8192;</pre>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="ClickHouse 26.7: EXPLAIN indexes = 1 for the same aggregate">EXPLAIN indexes = 1
SELECT region,
       channel,
       count()     AS orders,
       sum(amount) AS revenue
FROM lab.orders
WHERE order_ts &gt;= now() - INTERVAL 90 DAY
GROUP BY region, channel
ORDER BY revenue DESC;

Aggregating
   Keys: region, channel
   Aggregates: count(), sum(amount)
   ReadFromMergeTree (lab.orders)
      Parts: 4 | Granules: 166
      Output: region, channel, amount
      Prewhere filter column: order_ts &gt;= '2026-06-07 04:05:17'
      Indexes:
         Partition   Parts: 4/4    Granules: 173/173
         Min-Max     Parts: 4/13   Granules: 173/652
         PrimaryKey  Parts: 4/4    Granules: 166/173

-- 20 rows returned in 0.032 s on the same 2-vCPU sandbox</pre>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="system.parts_columns: why the column store reads so little">SELECT column,
       formatReadableSize(sum(column_data_compressed_bytes))   AS compressed,
       formatReadableSize(sum(column_data_uncompressed_bytes)) AS uncompressed
FROM system.parts_columns
WHERE database = 'lab' AND table = 'orders' AND active
  AND column IN ('region','channel','amount','order_ts','ship_address','session_id')
GROUP BY column
ORDER BY sum(column_data_compressed_bytes) DESC;

   ┌─column───────┬─compressed─┬─uncompressed─┐
1. │ ship_address │ 185.17 MiB │ 290.35 MiB   │
2. │ session_id   │ 76.61 MiB  │ 76.29 MiB    │
3. │ amount       │ 19.25 MiB  │ 38.15 MiB    │
4. │ channel      │ 2.73 MiB   │ 4.78 MiB     │
5. │ order_ts     │ 190.29 KiB │ 38.15 MiB    │
6. │ region       │ 26.85 KiB  │ 4.78 MiB     │
   └──────────────┴────────────┴──────────────┘</pre>
<p><img loading="lazy" decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5NjAiIGhlaWdodD0iNDcwIiB2aWV3Qm94PSIwIDAgOTYwIDQ3MCIgZm9udC1mYW1pbHk9IkhlbHZldGljYSxBcmlhbCxzYW5zLXNlcmlmIj4KPHJlY3Qgd2lkdGg9Ijk2MCIgaGVpZ2h0PSI0NzAiIGZpbGw9IiNmZmZmZmYiLz4KPHRleHQgeD0iNDgwIiB5PSIzMiIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZm9udC1zaXplPSIyMCIgZm9udC13ZWlnaHQ9ImJvbGQiIGZpbGw9IiMwYTE0MjQiPlNhbWUgNSBNLXJvdyB0YWJsZSwgc2FtZSA0LWNvbHVtbiBhZ2dyZWdhdGU6IHJvdyBzdG9yZSB2cyBjb2x1bW4gc3RvcmU8L3RleHQ+Cjx0ZXh0IHg9IjQ4MCIgeT0iNTQiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZvbnQtc2l6ZT0iMTIiIGZpbGw9IiM2YjcyODAiPk1lYXN1cmVkIGluIHRoZSBsYWIgYWJvdmU6IFBvc3RncmVTUUwgMTYuMTMgaGVhcCBwYWdlcyB2cyBDbGlja0hvdXNlIDI2LjcgTWVyZ2VUcmVlIGdyYW51bGVzPC90ZXh0Pgo8IS0tIFJvdyBzdG9yZSAtLT4KPHRleHQgeD0iMjQwIiB5PSI5MCIg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I+U2FtZSBhbnN3ZXIgaW4gMzIgbXMgb24gdGhlIHNhbWUgMi12Q1BVIHNhbmRib3g8L3RleHQ+CjxyZWN0IHg9IjYwIiB5PSIzODUiIHdpZHRoPSI4NDAiIGhlaWdodD0iNjAiIHJ4PSI2IiBmaWxsPSIjZjRmNWY3IiBzdHJva2U9IiNkY2RlZTQiLz4KPHRleHQgeD0iNDgwIiB5PSI0MTAiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZvbnQtc2l6ZT0iMTMiIGZpbGw9IiMwYTE0MjQiPk5laXRoZXIgZW5naW5lIGlzIHdyb25nLiBUaGUgcm93IHN0b3JlIGtlZXBzIGEgdHVwbGUgY29udGlndW91cyBzbyBhIHRyYW5zYWN0aW9uIGNhbiBsb2NrLCB1cGRhdGUgYW5kIGxvZyBpdCBhdG9taWNhbGx5LjwvdGV4dD4KPHRleHQgeD0iNDgwIiB5PSI0MzAiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZvbnQtc2l6ZT0iMTMiIGZpbGw9IiMwYTE0MjQiPlRoZSBjb2x1bW4gc3RvcmUga2VlcHMgYSBjb2x1bW4gY29udGlndW91cyBzbyBhIHNjYW4gcmVhZHMgb25seSB3aGF0IHRoZSBhZ2dyZWdhdGUgbmVlZHMuIFRoYXQgaXMgdGhlIHdob2xlIGRpZmZlcmVuY2UuPC90ZXh0Pgo8L3N2Zz4K" alt="Row store versus column store I/O for the same 5 million row aggregate: PostgreSQL scans 229,314 heap pages while ClickHouse MergeTree opens four column files and 166 of 652 granules" width="960" height="470"><br /><em>Figure 3. Row store versus column store for one aggregate, the second measurement behind polyglot persistence.</em></p>
<p>The four columns the query needs compress to about 22 MiB for the entire table, and the partition, min-max and primary-key indexes cut that to 166 of 652 granules before a byte of <code>amount</code> is decoded. The twenty columns the query does not need, including the 185 MiB of addresses, are never opened. Thirty milliseconds versus seven hundred is not ClickHouse being clever; it is the <a href="https://clickhouse.com/docs/engines/table-engines/mergetree-family/mergetree" target="_blank" rel="noopener">MergeTree storage layout</a> being shaped like the question. The same layout is why ClickHouse is a poor system of record: a single-row <code>UPDATE</code> is a mutation that rewrites parts, and there is no row lock to serialise two of them.</p>
<h2>Cloud-native data platforms changed the unit of scale</h2>
<p>The third shift in polyglot persistence is not a data model but an operating model. Aurora, AlloyDB, Spanner, Snowflake, BigQuery and ClickHouse Cloud separate compute from storage, put the storage on a replicated log or an object store, and let capacity change in minutes. For a founder the argument is time to market: a team of four can stand up a multi-AZ PostgreSQL-compatible cluster with automated failover before lunch. For a CFO the argument is that capacity becomes an operating expense that tracks demand.</p>
<p>The trade-offs are just as concrete, and a vendor-neutral practice has to name them. Managed services diverge from the open-source engine they are compatible with: extension allow-lists, superuser removal, version lag behind community releases, and storage layers whose performance characteristics (Aurora&#8217;s quorum writes, Spanner&#8217;s TrueTime commit wait) differ from the engine&#8217;s documentation.</p>
<p>Egress and cross-region replication are priced per byte, which matters precisely when the polyglot persistence topology is moving change streams between stores. And the exit cost is asymmetric: getting a terabyte in is a weekend, getting it out with zero downtime is a project. None of this argues against cloud platforms. It argues for choosing them per workload, which is polyglot persistence applied to the operating model, with the same rigour as the engine itself.</p>
<h2>Vector platforms and RAG are a different kind of object</h2>
<p>A relational index answers &#8220;is this key present&#8221; exactly. A B-tree, a hash, a bitmap: the answer is deterministic and complete. A vector index answers &#8220;which stored vectors are nearest to this one&#8221; approximately, because exact nearest-neighbour search in a thousand dimensions is a full scan. HNSW and IVF indexes trade recall for latency with explicit knobs, and a retrieval-augmented generation pipeline lives or dies on that trade plus the metadata filters applied before or after the approximate search.</p>
<p>That makes vector search a distinct workload class in any polyglot persistence design rather than a feature bolted onto an existing engine, even when it ships inside one. <a href="https://github.com/pgvector/pgvector" target="_blank" rel="noopener">pgvector</a> 0.8 on PostgreSQL 16+ is an excellent choice while the corpus fits in memory, the filter predicates are selective and the embedding refresh rate is modest, because it keeps the vectors transactionally next to the rows they describe. A dedicated platform such as Milvus 2.6 earns its place when index build and query serving need to scale independently, when collections reach hundreds of millions of vectors, or when the workload needs GPU indexes, tiered storage and multi-tenant isolation that a general-purpose engine will not prioritise.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="pgvector 0.8 on PostgreSQL 16+: HNSW with a partial index for the hot tenant">CREATE EXTENSION IF NOT EXISTS vector;

CREATE TABLE support_chunks (
    chunk_id    BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    tenant_id   INT          NOT NULL,
    ticket_id   BIGINT       NOT NULL,
    chunk_text  TEXT         NOT NULL,
    embedding   VECTOR(1024) NOT NULL,
    updated_at  TIMESTAMPTZ  NOT NULL DEFAULT now()
);

-- Recall/latency trade-off is explicit: m and ef_construction at build time,
-- hnsw.ef_search at query time. Test on your corpus before fixing these.
CREATE INDEX idx_support_chunks_embedding_hnsw
    ON support_chunks
 USING hnsw (embedding vector_cosine_ops)
  WITH (m = 16, ef_construction = 128);

SET hnsw.ef_search = 80;
SELECT chunk_id,
       ticket_id,
       1 - (embedding  $1::vector) AS cosine_similarity
FROM support_chunks
WHERE tenant_id = $2
ORDER BY embedding  $1::vector
LIMIT 8;</pre>
<pre class="EnlighterJSRAW" data-enlighter-language="python" data-enlighter-title="RAG retrieval loop: the vector store is a derived index, never the source of truth">import psycopg
from openai import OpenAI   # any embedding provider; keep it in-VPC for regulated data

EMBED_MODEL = "text-embedding-3-large"
client = OpenAI()

def embed(text: str) -&gt; list[float]:
    return client.embeddings.create(model=EMBED_MODEL, input=text).data[0].embedding

def retrieve(conn: psycopg.Connection, tenant_id: int, question: str, k: int = 8):
    qvec = embed(question)
    with conn.cursor() as cur:
        cur.execute("SET LOCAL hnsw.ef_search = 80")
        cur.execute(
            """
            SELECT chunk_id, ticket_id, chunk_text,
                   1 - (embedding  %s::vector) AS score
            FROM support_chunks
            WHERE tenant_id = %s
            ORDER BY embedding  %s::vector
            LIMIT %s
            """,
            (qvec, tenant_id, qvec, k),
        )
        return cur.fetchall()

# The ticket text itself is owned by the OLTP schema; this table is rebuilt
# from it when the embedding model changes. Treat it like a materialised view.</pre>
<p>Two operational facts follow for any polyglot persistence estate. First, an embedding model change invalidates every vector, so the vector store must be rebuildable from the system of record; it is a derived index, not a database of record. Second, recall is a measured quantity. A RAG pipeline that has never had its retrieval recall measured against a labelled set is not in production, whatever the dashboard says.</p>
<h2>The polyglot persistence decision frame</h2>
<p>Executives do not need to memorise storage internals. They need a frame that turns &#8220;which database&#8221; into a question about the workload, so that the answer can be checked against measurement. These are the dimensions that decide it in practice.</p>
<table>
<caption>Polyglot persistence decision matrix by workload profile</caption>
<thead>
<tr>
<th>Workload dimension</th>
<th>ACID row store</th>
<th>Eventually consistent KV / wide-column</th>
<th>Columnar OLAP</th>
<th>Vector platform</th>
</tr>
</thead>
<tbody>
<tr>
<td>Correctness contract</td>
<td>Exact, now, multi-row</td>
<td>Converges; single-partition atomicity</td>
<td>Exact over a snapshot; eventual after merge</td>
<td>Approximate by design (recall &lt; 100%)</td>
</tr>
<tr>
<td>Hot-key write scaling</td>
<td>Serial on the key (measured above)</td>
<td>Linear across partitions; hot partition still hurts</td>
<td>Append-only batches; updates are mutations</td>
<td>Batch upserts; index rebuild cost dominates</td>
</tr>
<tr>
<td>Wide scan / aggregate</td>
<td>Reads whole tuples (1.79 GB above)</td>
<td>Unsupported without a second table</td>
<td>Reads named columns only (22 MiB above)</td>
<td>Not a query shape it serves</td>
</tr>
<tr>
<td>Global low-latency reads</td>
<td>Read replicas with lag; or distributed SQL</td>
<td>Native multi-DC with LOCAL_QUORUM</td>
<td>Replicated per region for dashboards</td>
<td>Replicated collections; rebuild per region</td>
</tr>
<tr>
<td>Ad hoc queries and joins</td>
<td>Full SQL, cost-based optimiser</td>
<td>Query-first schema; no joins</td>
<td>Full analytical SQL; joins need care</td>
<td>Similarity plus metadata filters</td>
</tr>
<tr>
<td>Typical system-of-record role</td>
<td>Yes</td>
<td>Only for data that is naturally per-key</td>
<td>No; derived copy</td>
<td>No; rebuildable index</td>
</tr>
</tbody>
</table>
<p>Read the rows, not the columns. If a workload needs two cells that live in different columns, that is a second engine, and the honest polyglot persistence question is how the data gets from the first to the second and how stale it is allowed to be on arrival.</p>
<h2>What a polyglot persistence topology looks like when it works</h2>
<p><img decoding="async" loading="lazy" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5NjAiIGhlaWdodD0iNTYwIiB2aWV3Qm94PSIwIDAgOTYwIDU2MCIgZm9udC1mYW1pbHk9IkhlbHZldGljYSxBcmlhbCxzYW5zLXNlcmlmIj4KPHJlY3Qgd2lkdGg9Ijk2MCIgaGVpZ2h0PSI1NjAiIGZpbGw9IiNmZmZmZmYiLz4KPGRlZnM+PG1hcmtlciBpZD0iYSIgbWFya2VyV2lkdGg9IjEwIiBtYXJrZXJIZWlnaHQ9IjgiIHJlZlg9IjkiIHJlZlk9IjQiIG9yaWVudD0iYXV0byI+PHBhdGggZD0iTTAsMCBMMTAsNCBMMCw4IHoiIGZpbGw9IiMzZDNkNDQiLz48L21hcmtlcj48L2RlZnM+Cjx0ZXh0IHg9IjQ4MCIgeT0iMzIiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZvbnQtc2l6ZT0iMjAiIGZvbnQtd2VpZ2h0PSJib2xkIiBmaWxsPSIjMGExNDI0Ij5SZWZlcmVuY2UgcG9seWdsb3QgcGVyc2lzdGVuY2UgdG9wb2xvZ3kgZm9yIGEgY29uc3VtZXItZmFjaW5nIHBsYXRmb3JtPC90ZXh0Pgo8dGV4dCB4PSI0ODAiIHk9IjU0IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmb250LXNpemU9IjEyIiBmaWxsPSIjNmI3MjgwIj5UaGUgc3lzdGVtIG9mIHJlY29yZCBzdGF5cyBBQ0lELiBFdmVyeSBvdGhlciBzdG9yZSBpcyBhIGRlcml2ZWQsIHB1cnBvc2Utc2hhcGVkIGNvcHkgZmVkIGJ5IGNoYW5nZSBkYXRhIGNhcHR1cmUuPC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D0iIzNkM2Q0NCI+b25seSB3aGVuIG9uZSByZWdpb24gY2Fubm90IGhvbGQgdGhlIGxlZGdlcjwvdGV4dD4KPHRleHQgeD0iMjAwIiB5PSIzMDAiIGZvbnQtc2l6ZT0iMTEiIGZpbGw9IiM2YjcyODAiPndyaXRlLXRocm91Z2ggLyByZWFkLWFzaWRlPC90ZXh0Pgo8dGV4dCB4PSI0OTAiIHk9IjI5MCIgZm9udC1zaXplPSIxMSIgZmlsbD0iIzZiNzI4MCI+bG9naWNhbCBkZWNvZGluZyBzbG90PC90ZXh0Pgo8L3N2Zz4K" alt="Reference polyglot persistence topology: PostgreSQL system of record feeding Valkey and Cassandra on the hot path, and Debezium plus Kafka change data capture into ClickHouse, a vector store and an Iceberg lakehouse" width="960" height="560"><br /><em>Figure 4. Reference polyglot persistence topology with one system of record and derived stores.</em></p>
<p>The polyglot persistence pattern that survives contact with production has one rule: exactly one store owns each fact, and every other store holds a derived, purpose-shaped copy that can be rebuilt from the owner. The system of record stays an ACID engine, usually PostgreSQL or MySQL with proper HA, because ledgers, orders and inventory are the facts a regulator will ask about. Change data capture through logical decoding and Kafka fans those facts out. The analytics store receives them into a <code>ReplacingMergeTree</code> keyed by the primary key so that CDC updates collapse on merge. The vector store receives the subset that needs embedding. The lakehouse receives everything for retention and model training.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="Landing a Debezium CDC topic in ClickHouse 26.x: derived copy, rebuildable, explicit engine">CREATE TABLE analytics.orders_cdc
(
    order_id     UInt64,
    customer_id  UInt64,
    order_ts     DateTime64(6, 'UTC'),
    region       LowCardinality(String),
    channel      LowCardinality(String),
    status       LowCardinality(String),
    amount       Decimal(12, 2),
    _version     UInt64,          -- Debezium source.lsn or ts_ms
    _deleted     UInt8            -- 1 when op = 'd'
)
ENGINE = ReplicatedReplacingMergeTree(
    '/clickhouse/tables/{shard}/analytics/orders_cdc',
    '{replica}',
    _version,
    _deleted
)
PARTITION BY toYYYYMM(order_ts)
ORDER BY (region, order_ts, order_id)
SETTINGS index_granularity = 8192;

-- Dashboards read with FINAL or through a materialised view that
-- pre-aggregates; the raw table is never the source of truth.
SELECT region,
       channel,
       sum(amount) AS revenue
FROM analytics.orders_cdc FINAL
WHERE order_ts &gt;= now() - INTERVAL 90 DAY
  AND _deleted = 0
GROUP BY region, channel
ORDER BY revenue DESC;</pre>
<p>The cost of this architecture is real and should be stated to a board plainly. Every arrow is a replication lag to monitor, a schema contract to version, a backfill procedure to rehearse and an on-call surface to staff. Polyglot persistence multiplies the number of things that can be wrong at three in the morning, which is why the number of stores must be the smallest that the workload contradictions force, and never one more.</p>
<h2>Questions a CIO, a founder or an investor should ask about polyglot persistence</h2>
<p>The technical argument for polyglot persistence above reduces to a handful of questions that a non-specialist can put to any engineering team or any vendor, and that a diligence process should insist on getting answered with evidence.</p>
<p>Which store owns each fact, and can every other store be rebuilt from it without downtime? What is the measured replication lag between the system of record and the analytics store at peak, and who is paged when it exceeds the agreed staleness? What is the hot-key throughput ceiling of the transactional engine on its current hardware, measured the way we measured it above, and how far is peak traffic from that ceiling? What does the cloud bill look like per workload class, including egress between stores, and what is the exit plan for each managed service? What is the recall of the retrieval pipeline against a labelled set, and when was it last measured?</p>
<p>A team that can answer those with catalog views, <code>system.*</code> tables and dated measurements is running polyglot persistence deliberately. A team that answers with a vendor&#8217;s architecture slide is running it by accident, and the accident is usually discovered during a growth spike, an audit or an acquisition.</p>
<h2>Why a polyglot persistence partner has to be vendor-neutral</h2>
<p>Every engine in a polyglot persistence estate is sold by a company whose revenue depends on you choosing it for as much of your estate as possible. The transactional vendor will add columnar indexes and vector types and tell you the second and third engines are unnecessary. The columnar vendor will add row-level updates and tell you it can be the system of record. The cloud vendor will bundle all of them and tell you the topology question is solved. Each claim is partly true, and each is a conflict of interest, because the vendor is paid for the engine and not for the outcome.</p>
<p><a href="https://minervadb.com/">MinervaDB</a> is paid for the outcome. We are data platform practitioners rather than a product company: our engineers have run <a href="https://minervadb.com/postgresql-consulting/">PostgreSQL</a>, MySQL, SQL Server, MongoDB, Cassandra, <a href="https://minervadb.com/redis-support/">Redis and Valkey</a>, <a href="https://minervadb.com/clickhouse-consulting/">ClickHouse</a>, Milvus and the managed cloud editions of all of them in production, across more than 900 enterprises, and we have no licence to sell.</p>
<p>That independence is what lets us tell a client that pgvector is enough for their corpus, that their Cassandra cluster should be a PostgreSQL partition, or that the columnar migration they were sold will not fix a hot-row problem. The measurements in this post are the kind of evidence we bring to every architecture review, and the polyglot persistence decision frame above is the one we apply.</p>
<p>If you are designing, funding or acquiring a business that runs on a consumer-facing data platform, the polyglot persistence conversation is the one to have before the growth spike rather than after it. <a href="https://minervadb.com/contact-minervadb-book-an-appointment/">Talk to MinervaDB</a> about an independent architecture review of your data platform, from the system of record to the retrieval layer. As always: test every change on your own workload before it reaches production, and keep a rehearsed disaster-recovery posture for every store in the topology, derived copies included.</p>
<h2>Frequently asked questions about polyglot persistence</h2>
<p><strong>Is polyglot persistence just over-engineering for a startup?</strong> Usually, at first. A single well-run PostgreSQL with a cache in front of it carries most products to meaningful scale. Polyglot persistence becomes necessary when a specific measurement, such as the hot-row ceiling or the analytics scan cost shown above, contradicts a specific product requirement. Add the second store when the measurement says so, not when a slide does.</p>
<p><strong>Can a multi-model database replace polyglot persistence?</strong> A multi-model engine reduces the operational surface of polyglot persistence, which is valuable, but it does not change the physics. A row store with a columnar index still reads tuples for transactional work and still serialises on a hot key; a columnar engine with row updates still performs mutations. Evaluate multi-model features by measuring the specific workload against a dedicated engine and pricing the difference.</p>
<p><strong>Does the cloud make the polyglot persistence decision for me?</strong> No. Cloud platforms make each engine easier to provision and scale, and they make moving data between engines more expensive. The workload contradictions are the same on-premises and in the cloud; what changes is the operating model and the cost structure of the arrows between stores.</p>
<p><strong>Where does the vector database sit in a polyglot persistence design?</strong> As a derived, rebuildable index over facts owned by the system of record. Embedding model changes and recall regressions are routine, so the pipeline that rebuilds the vector store must be as tested as the backup that restores the ledger.</p>
<p><em>Lab notes for the polyglot persistence measurements: PostgreSQL 16.13 (Ubuntu build), shared_buffers 1 GB, synchronous_commit off, two vCPUs, 7 GB RAM; ClickHouse 26.7.2 embedded via chdb on the same host; 5,000,000 rows generated with generate_series and exported unchanged between engines; pgbench 10-second runs; all outputs are verbatim with trims marked. Figures are mechanism demonstrations from a sandbox and are not vendor benchmarks. Reproduce on your own hardware before drawing capacity conclusions.</em></p>
<p><a href="https://minervadb.com/polyglot-persistence/">Polyglot Persistence: The Proven Case for 5 Data Models</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Launching MariaDB’s Database Survey 2026</title>
        <link>https://mariadb.org/launching-mariadbs-database-survey-2026/</link>
        <pubDate>Fri, 04 Sep 2026 10:03:41 +0000</pubDate>
        <dc:creator>Robert Silén</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/launching-mariadbs-database-survey-2026/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>We want to know how you’re really using MariaDB — and databases in general. Not the marketing version or the one-off case study. The real story: what you’re building, how you are using it, what’s working, and what’s frustrating. …<br />
Continue reading "Launching MariaDB’s Database Survey 2026"<br />
Launching MariaDB’s Database Survey 2026 appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/launching-mariadbs-database-survey-2026/">Launching MariaDB’s Database Survey 2026</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>We want to know how you’re really using MariaDB — and databases in general. Not the marketing version or the one-off case study. The real story: what you’re building, how you are using it, what’s working, and what’s frustrating. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/launching-mariadbs-database-survey-2026/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;Launching MariaDB’s Database Survey 2026&#8221;</span></a></p>
<p><a href="https://mariadb.org/launching-mariadbs-database-survey-2026/">Launching MariaDB’s Database Survey 2026</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/launching-mariadbs-database-survey-2026/">Launching MariaDB’s Database Survey 2026</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Plugins Beyond C++: What the Community Told Us</title>
        <link>https://mariadb.org/mariadb-plugins-beyond-c-what-the-community-told-us/</link>
        <pubDate>Fri, 04 Sep 2026 09:56:31 +0000</pubDate>
        <dc:creator>Frédéric Descamps</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-plugins-beyond-c-what-the-community-told-us/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>A few weeks ago, we asked a simple question:<br />
Which language would you use to write MariaDB plugins?<br />
The question related to MDEV-40189 (Support plugins written in various languages), an idea we introduced earlier this summer to lower the barrier to MariaDB plugin development by supporting languages other than C and C++. …<br />
Continue reading "MariaDB Plugins Beyond C++: What the Community Told Us"<br />
MariaDB Plugins Beyond C++: What the Community Told Us appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/mariadb-plugins-beyond-c-what-the-community-told-us/">MariaDB Plugins Beyond C++: What the Community Told Us</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>A few weeks ago, we asked a simple question:<br />
Which language would you use to write MariaDB plugins?<br />
The question related to <a href="https://mariadb.org/mariadb-plugins-beyond-c-what-the-community-told-us/">MDEV-40189</a> (Support plugins written in various languages), an idea we introduced earlier this summer to lower the barrier to MariaDB plugin development by supporting languages other than C and C++. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/mariadb-plugins-beyond-c-what-the-community-told-us/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;MariaDB Plugins Beyond C++: What the Community Told Us&#8221;</span></a></p>
<p><a href="https://mariadb.org/mariadb-plugins-beyond-c-what-the-community-told-us/">MariaDB Plugins Beyond C++: What the Community Told Us</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/mariadb-plugins-beyond-c-what-the-community-told-us/">MariaDB Plugins Beyond C++: What the Community Told Us</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>BYOC Database Security: A Measurable Standard in 7 Domains</title>
        <link>https://minervadb.com/byoc-database-security-standard/</link>
        <pubDate>Thu, 03 Sep 2026 13:30:42 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/byoc-database-security-a-measurable-standard-in-7-domains/</guid>
        <source url="https://minervadb.com/">MinervaDB</source>
        <description><![CDATA[<p>BYOC database security conversations usually stall on the same question: is this deployment secure? Asked like that, the question has no answer. A ClickHouse cluster or a PostgreSQL fleet running in your own AWS account [...]</p>
<p><a href="https://minervadb.com/byoc-database-security-standard/">BYOC Database Security: A Measurable Standard in 7 Domains</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><strong>BYOC database security</strong> conversations usually stall on the same question: is this deployment secure? Asked like that, the question has no answer. A ClickHouse cluster or a PostgreSQL fleet running in your own AWS account under a vendor&#8217;s control plane is neither secure nor insecure in the abstract. It is conformant, or not, to a standard you wrote down. If the standard exists and every control in it is measurable, then a sentence like &#8220;analytics-ch-prod is 77.4% conformant to MDB-SEC-2026-09-BYOC v1.0, non-conformant on one gate&#8221; is a fact you can defend to an auditor, a CISO and the vendor. Without the standard, &#8220;secure&#8221; is an opinion.</p>
<p>This post shows how to write that BYOC database security standard so it can be scored, how to collect evidence from the database and the cloud account rather than from a questionnaire, and how to turn the evidence into a percentage and a verdict that behave sensibly. Everything below is runnable. The evaluator output shown later is a real run against a hand-built evidence file, not a mock-up.</p>
<h2>What BYOC actually splits, and why BYOC database security has to be scored differently</h2>
<p>Bring Your Own Cloud (BYOC) is a specific deployment model, and the security argument hinges on its shape. The vendor&#8217;s control plane, meaning the orchestrator, the tenant console, billing and support tooling, runs in the vendor&#8217;s account. The data plane, meaning the database nodes, the block storage, the object storage holding data and backups, the network boundary and the KMS keys, runs in your account. ClickHouse describes its BYOC data plane as running <a href="https://clickhouse.com/docs/cloud/reference/byoc/overview" target="_blank" rel="noopener">entirely in your cloud account</a> with the control plane in ClickHouse&#8217;s VPC; Redpanda&#8217;s <a href="https://docs.redpanda.com/cloud-data-platform/get-started/byoc-arch/" target="_blank" rel="noopener">BYOC architecture</a> follows the same split, and so do most of the other vendors offering the model. </p>
<p>The bridge between the two halves is a cross-account IAM role the control-plane agent assumes, plus whatever break-glass path the vendor&#8217;s operators use when something needs hands.</p>
<p>That split is what makes BYOC database security scoreable at all. In a fully managed service you can only attest: read the SOC 2 report, accept the shared-responsibility matrix, move on. In BYOC, every object in the data plane is queryable through your own cloud APIs and your own database catalog. You can measure it, and if you can measure it you can score it. The control plane stays opaque, and the standard has to be honest about that boundary rather than pretending a SOC 2 PDF is the same kind of evidence as a security-group rule you read from the API.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5MjAiIGhlaWdodD0iNTcwIiB2aWV3Qm94PSIwIDAgOTIwIDU3MCIgZm9udC1mYW1pbHk9Ik1lbmxvLCBDb25zb2xhcywgJ0RlamFWdSBTYW5zIE1vbm8nLCBtb25vc3BhY2UiIGZvbnQtc2l6ZT0iMTEiIGZpbGw9IiMxZjIzMjgiPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9ImhhdGNoIiB3aWR0aD0iOCIgaGVpZ2h0PSI4IiBwYXR0ZXJuVW5pdHM9InVzZXJTcGFjZU9uVXNlIiBwYXR0ZXJuVHJhbnNmb3JtPSJyb3RhdGUoNDUpIj4KICAgICAgPGxpbmUgeDE9IjAiIHkxPSIwIiB4Mj0iMCIgeTI9IjgiIHN0cm9rZT0iI2M5YzJiNiIgc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IjMWYyMzI4IiBzdHJva2Utd2lkdGg9IjEuMiIgbWFya2VyLWVuZD0idXJsKCNhcnIpIi8+CgogIDwhLS0gbGVnZW5kIC8gY2FwdGlvbiBzdHJpcCAtLT4KICA8bGluZSB4MT0iMzAiIHkxPSI1MzAiIHgyPSI4OTAiIHkyPSI1MzAiIHN0cm9rZT0iIzFmMjMyOCIgc3Ryb2tlLXdpZHRoPSIwLjgiLz4KICA8dGV4dCB4PSIzMCIgeT0iNTQ1IiBmaWxsPSIjNTc2MDZhIj5GSUcuIDEgICBCWU9DIHJlc3BvbnNpYmlsaXR5IHNwbGl0LCB3aXRoIE1EQi1TRUMtMjAyNi0wOS1CWU9DIGNvbnRyb2wgSURzIHBsYWNlZCBvbiB0aGUgb2JqZWN0IGVhY2ggb25lIG1lYXN1cmVzLjwvdGV4dD48dGV4dCB4PSIzMCIgeT0iNTU4IiBmaWxsPSIjNTc2MDZhIj5IYXRjaGVkIGFyZWEgaXMgb3BhcXVlIHRvIHlvdTogYXR0ZXN0IGl0LCBkbyBub3QgcHJldGVuZCB0byBtZWFzdXJlIGl0LjwvdGV4dD4KPC9zdmc+Cg==" alt="BYOC database security responsibility split between vendor control plane and customer data plane with control IDs" width="920"><figcaption>Fig. 1 — The BYOC database security responsibility split, with the control IDs from the standard below placed on the object each one measures. The hatched region is the part you attest rather than measure.</figcaption></figure>
<h2>Writing a BYOC database security standard that produces a number</h2>
<p>Most BYOC database security policies fail the measurability test for a mundane reason: their controls are sentences, not predicates. &#8220;Access to production databases must be appropriately restricted&#8221; cannot be scored. A control becomes scoreable when it has four properties. It is atomic, testing exactly one thing. It binds to exactly one evidence key, a value some collector can produce without a human interpreting it. It carries an expectation expressed as an operator and a value. And it carries a weight, because a wildcard IAM policy on the control-plane agent and a SOC 2 report that is thirteen months old are not the same size of problem.</p>
<p>The BYOC database security standard below has seven domains and eighteen controls. It is deliberately short. A standard with two hundred controls, half of which nobody can collect evidence for, produces a number nobody trusts. Eighteen controls with real collectors produce a number you can put in a board pack. Add controls only when a collector exists for them.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml"># MDB-SEC-2026-09-BYOC  --  BYOC database security standard, v1.0
# Every control is atomic, has exactly one evidence key, and carries a weight.
# gate: true means a FAIL caps the whole target at "non-conformant" regardless of score.
standard: MDB-SEC-2026-09-BYOC
version: "1.0"
weights: {critical: 5, high: 3, medium: 1}

domains:
  - id: IAM
    name: Identity and access
    controls:
      - id: IAM-01
        title: No shared superuser / default admin account enabled for application use
        severity: critical
        gate: true
        evidence: db.superuser_logins_last_30d
        expect: {op: eq, value: 0}
      - id: IAM-02
        title: Database authentication is federated (IAM / OIDC / cert), not password-only
        severity: high
        evidence: db.password_only_roles
        expect: {op: eq, value: 0}
      - id: IAM-03
        title: Vendor cross-account role uses an ExternalId and is scoped to the data-plane account only
        severity: critical
        gate: true
        evidence: cloud.vendor_role_external_id_enforced
        expect: {op: eq, value: true}

  - id: NET
    name: Network boundary
    controls:
      - id: NET-01
        title: Database endpoints have no 0.0.0.0/0 ingress on any port
        severity: critical
        gate: true
        evidence: cloud.public_ingress_rules
        expect: {op: eq, value: 0}
      - id: NET-02
        title: Client access only through PrivateLink / Private Service Connect / peering
        severity: high
        evidence: cloud.private_connectivity_only
        expect: {op: eq, value: true}
      - id: NET-03
        title: Egress from the data plane is allow-listed (vendor control-plane CIDRs + object storage only)
        severity: high
        evidence: cloud.egress_allowlisted
        expect: {op: eq, value: true}

  - id: ENC
    name: Encryption
    controls:
      - id: ENC-01
        title: Storage volumes and object-storage buckets encrypted with a customer-managed key
        severity: critical
        gate: true
        evidence: cloud.cmk_encryption
        expect: {op: eq, value: true}
      - id: ENC-02
        title: TLS 1.2+ enforced on every client-facing listener
        severity: high
        evidence: db.tls_min_version
        expect: {op: gte, value: 1.2}
      - id: ENC-03
        title: Backups encrypted with the same or a dedicated CMK, never vendor-default keys
        severity: high
        evidence: cloud.backup_cmk
        expect: {op: eq, value: true}

  - id: CPL
    name: Control-plane access
    controls:
      - id: CPL-01
        title: Vendor operator access to the data plane is break-glass, ticketed, and time-boxed
        severity: high
        evidence: vendor.breakglass_ttl_hours
        expect: {op: lte, value: 8}
      - id: CPL-02
        title: Control-plane agent runs with least-privilege IAM (no iam:*, no kms:ScheduleKeyDeletion)
        severity: critical
        gate: true
        evidence: cloud.agent_policy_wildcards
        expect: {op: eq, value: 0}
      - id: CPL-03
        title: Vendor SOC 2 Type II report reviewed within the last 12 months
        severity: medium
        evidence: vendor.soc2_age_days
        expect: {op: lte, value: 365}

  - id: LOG
    name: Audit and logging
    controls:
      - id: LOG-01
        title: Database audit log (DDL, grants, auth failures) shipped to a SIEM the vendor cannot write to
        severity: high
        evidence: db.audit_log_shipped
        expect: {op: eq, value: true}
      - id: LOG-02
        title: Cloud API audit trail (CloudTrail / Audit Logs) enabled for the data-plane account
        severity: high
        evidence: cloud.api_audit_enabled
        expect: {op: eq, value: true}

  - id: BKP
    name: Backup and recovery
    controls:
      - id: BKP-01
        title: Backups stored in a bucket the vendor control plane cannot delete
        severity: critical
        gate: true
        evidence: cloud.backup_bucket_vendor_delete_denied
        expect: {op: eq, value: true}
      - id: BKP-02
        title: Restore drill executed and evidenced within the last 90 days
        severity: high
        evidence: ops.last_restore_drill_days
        expect: {op: lte, value: 90}

  - id: CFG
    name: Configuration hardening
    controls:
      - id: CFG-01
        title: No database-level access from the public internet (listen / pg_hba / ClickHouse listen_host)
        severity: high
        evidence: db.listens_public
        expect: {op: eq, value: false}
      - id: CFG-02
        title: Version within vendor support window and no unpatched CVE older than 30 days
        severity: medium
        evidence: db.oldest_unpatched_cve_days
        expect: {op: lte, value: 30}</pre>
<p>Three design choices in that file matter more than the specific controls, and they are what make BYOC database security measurable rather than merely documented. First, the <code>gate: true</code> flag. Six controls are gates; a failure on any of them makes the target non-conformant regardless of the percentage. Without gates, weighted scoring produces the pathology where a deployment with an internet-exposed listener still reads as &#8220;81%, mostly fine&#8221;. </p>
<p>Second, every control&#8217;s <code>evidence</code> key is a dotted path into a JSON document, so the standard never references a database engine, a cloud provider or a vendor by name. The same file scores a ClickHouse BYOC cluster on AWS and a PostgreSQL BYOC deployment on GCP; only the collectors differ. Third, the file has an ID and a version in the MinervaDB document convention, <code>MDB-SEC-2026-09-BYOC v1.0</code>, because a score is meaningless unless the reader knows which standard it was scored against. Changing a weight changes every historical number, so weights change through a versioned pull request, never in place.</p>
<h2>Collecting BYOC database security evidence from the database, not from a questionnaire</h2>
<p>The evidence for the db.* keys in a BYOC database security assessment comes from the database&#8217;s own catalog. The point of writing BYOC database security collectors as SQL is that the SQL is the audit trail: anyone can rerun the query and get the same answer. Two collectors follow, one for ClickHouse and one for PostgreSQL, each producing the raw values the standard expects. Version pinning matters here; several of these system tables changed shape recently.</p>
<h3>ClickHouse BYOC database security collector (24.8 LTS and later)</h3>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- BYOC database security: ClickHouse collector for db.* keys.  Tested syntax on ClickHouse 24.8 LTS and later.
-- Run as a user holding SHOW USERS, SHOW GRANTS and access to system.query_log.

-- IAM-01  logins as the built-in `default` user in the last 30 days
--         (query_log is on by default; session_log is not, so we count from query_log)
SELECT count() AS superuser_logins_last_30d
FROM system.query_log
WHERE user = 'default'
  AND type = 'QueryStart'
  AND event_date &gt;= today() - INTERVAL 30 DAY;

-- IAM-02  roles that can still log in with a password only
--         auth_type became an Array when multiple auth methods per user
--         landed (24.9+); on older builds drop the hasAny() and compare directly
SELECT count() AS password_only_roles
FROM system.users
WHERE hasAny(auth_type,
             ['plaintext_password', 'sha256_password',
              'double_sha1_password', 'bcrypt_password'])
  AND NOT hasAny(auth_type, ['ldap', 'kerberos', 'ssl_certificate', 'jwt', 'http']);

-- CFG-01  is the server listening on anything but private / loopback interfaces?
--         (system.server_settings, 23.x+)
SELECT name, value, changed
FROM system.server_settings
WHERE name IN ('listen_host', 'tcp_port', 'http_port',
               'tcp_port_secure', 'https_port');

-- ENC-02  plaintext listeners left open count as a FAIL for TLS enforcement
SELECT countIf(name IN ('tcp_port', 'http_port') AND value != '') AS plaintext_listeners
FROM system.server_settings;

-- CPL-01 / audit trail  grants issued outside the change window
SELECT event_time, user, query
FROM system.query_log
WHERE type = 'QueryFinish'
  AND query_kind IN ('Grant', 'Revoke', 'Create', 'Drop', 'Alter')
  AND event_date &gt;= today() - INTERVAL 7 DAY
ORDER BY event_time DESC
LIMIT 50;</pre>
<p>Two notes on these queries. <code>system.query_log</code> is the right place to count logins by the built-in <code>default</code> user because it is on by default and <code>system.session_log</code> usually is not; if you enable session_log you get a cleaner signal, including failed logins. And the <code>auth_type</code> column on <code>system.users</code> became an array when multiple authentication methods per user landed, so the <code>hasAny()</code> form is the one that survives upgrades. On BYOC deployments you typically cannot edit <code>config.xml</code> directly, but you can read <code>system.server_settings</code>, and that is enough to score the listener posture.</p>
<h3>PostgreSQL BYOC database security collector (16 and later)</h3>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- BYOC database security: PostgreSQL collector for db.* keys.  Tested syntax on PostgreSQL 16 and 17.
-- Run as a role holding pg_read_all_settings and pg_read_all_stats.

-- IAM-01  login-capable superusers other than the bootstrap role
SELECT count(*) AS extra_login_superusers
FROM pg_roles
WHERE rolsuper
  AND rolcanlogin
  AND rolname  'postgres';

-- IAM-02  pg_hba entries that authenticate with a password or nothing at all
--         (federated methods: cert, gss, sspi, ldap, radius, oauth in 18+)
SELECT count(*) AS password_only_rules
FROM pg_hba_file_rules
WHERE auth_method IN ('trust', 'password', 'md5', 'scram-sha-256')
  AND error IS NULL;

-- CFG-01 / ENC-02  listener and TLS posture in one pass
SELECT name, setting, unit, context
FROM pg_settings
WHERE name IN ('listen_addresses', 'ssl', 'ssl_min_protocol_version',
               'log_connections', 'password_encryption');

-- LOG-01  is pgaudit loaded and shipping DDL / role changes?
SELECT name, setting
FROM pg_settings
WHERE name IN ('shared_preload_libraries', 'pgaudit.log', 'log_destination');</pre>
<p><code>pg_hba_file_rules</code> is the collector that most often surprises people. It shows the rules PostgreSQL actually loaded, including ones with parse errors, so filter on <code>error IS NULL</code> or you will count rules that are not in effect. On PostgreSQL 18 the <code>oauth</code> method joins the federated list. A superuser that can log in and is not the bootstrap role is the PostgreSQL analogue of the ClickHouse <code>default</code> user problem: it is where application credentials end up when nobody is looking.</p>
<h3>Cloud account BYOC database security collector (AWS shown, read-only)</h3>
<p>The cloud.* keys are where BYOC database security differs from every other model, because the objects that matter live in your account. The collector below reads security groups, the vendor&#8217;s cross-account role trust policy, the agent role&#8217;s attached policies, EBS key management and CloudTrail state. It runs under a read-only audit role and writes nothing. The GCP and Azure equivalents are structurally identical: replace the IAM trust-policy check with a Workload Identity binding or a service-principal check, and the EBS/KMS check with CMEK on persistent disks or managed disks.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="python">#!/usr/bin/env python3
"""
collect_aws.py -- BYOC database security: produce the cloud.* evidence keys for one BYOC data-plane account.

Run with a READ-ONLY role in the data-plane account:
    AWS_PROFILE=byoc-audit python3 collect_aws.py 
        --vendor-role ClickHouseBYOCControlPlane 
        --tag Key=byoc-target,Value=analytics-ch-prod &gt; evidence/cloud.json

The script only reads. It writes nothing to AWS.
"""
import argparse
import json

import boto3

WILDCARD_DENYLIST = {"iam:*", "kms:*", "kms:ScheduleKeyDeletion", "s3:*", "ec2:*", "*"}


def public_ingress_rules(ec2, tag_key, tag_val) -&gt; int:
    """NET-01: security-group ingress rules open to the world on data-plane ENIs."""
    sgs = ec2.describe_security_groups(
        Filters=[{"Name": f"tag:{tag_key}", "Values": [tag_val]}])["SecurityGroups"]
    hits = 0
    for sg in sgs:
        for rule in sg["IpPermissions"]:
            hits += sum(1 for r in rule.get("IpRanges", []) if r["CidrIp"] == "0.0.0.0/0")
            hits += sum(1 for r in rule.get("Ipv6Ranges", []) if r["CidrIpv6"] == "::/0")
    return hits


def vendor_role_external_id_enforced(iam, role_name) -&gt; bool:
    """IAM-03: the trust policy must carry a StringEquals on sts:ExternalId."""
    doc = iam.get_role(RoleName=role_name)["Role"]["AssumeRolePolicyDocument"]
    for stmt in doc["Statement"]:
        cond = stmt.get("Condition", {}).get("StringEquals", {})
        if "sts:ExternalId" not in cond:
            return False
    return True


def agent_policy_wildcards(iam, role_name) -&gt; int:
    """CPL-02: count denylisted wildcard actions across inline + attached policies."""
    docs = []
    for name in iam.list_role_policies(RoleName=role_name)["PolicyNames"]:
        docs.append(iam.get_role_policy(RoleName=role_name, PolicyName=name)["PolicyDocument"])
    for att in iam.list_attached_role_policies(RoleName=role_name)["AttachedPolicies"]:
        ver = iam.get_policy(PolicyArn=att["PolicyArn"])["Policy"]["DefaultVersionId"]
        docs.append(iam.get_policy_version(PolicyArn=att["PolicyArn"], VersionId=ver)["PolicyVersion"]["Document"])
    hits = 0
    for doc in docs:
        for stmt in doc["Statement"]:
            if stmt.get("Effect") != "Allow":
                continue
            actions = stmt["Action"] if isinstance(stmt["Action"], list) else [stmt["Action"]]
            hits += sum(1 for a in actions if a in WILDCARD_DENYLIST)
    return hits


def cmk_encryption(ec2, kms, tag_key, tag_val) -&gt; bool:
    """ENC-01: every tagged EBS volume encrypted with a key whose KeyManager is CUSTOMER."""
    vols = ec2.describe_volumes(Filters=[{"Name": f"tag:{tag_key}", "Values": [tag_val]}])["Volumes"]
    if not vols:
        return False
    for v in vols:
        if not v["Encrypted"]:
            return False
        if kms.describe_key(KeyId=v["KmsKeyId"])["KeyMetadata"]["KeyManager"] != "CUSTOMER":
            return False
    return True


def api_audit_enabled(ct) -&gt; bool:
    """LOG-02: at least one multi-region trail that is logging and log-file-validated."""
    for t in ct.describe_trails()["trailList"]:
        if t.get("IsMultiRegionTrail") and t.get("LogFileValidationEnabled"):
            if ct.get_trail_status(Name=t["TrailARN"])["IsLogging"]:
                return True
    return False


if __name__ == "__main__":
    ap = argparse.ArgumentParser()
    ap.add_argument("--vendor-role", required=True)
    ap.add_argument("--tag", required=True, help="Key=,Value= identifying data-plane resources")
    a = ap.parse_args()
    tag_key, tag_val = [kv.split("=", 1)[1] for kv in a.tag.split(",")]

    ec2, iam, kms, ct = (boto3.client(s) for s in ("ec2", "iam", "kms", "cloudtrail"))
    print(json.dumps({"cloud": {
        "public_ingress_rules": public_ingress_rules(ec2, tag_key, tag_val),
        "vendor_role_external_id_enforced": vendor_role_external_id_enforced(iam, a.vendor_role),
        "agent_policy_wildcards": agent_policy_wildcards(iam, a.vendor_role),
        "cmk_encryption": cmk_encryption(ec2, kms, tag_key, tag_val),
        "api_audit_enabled": api_audit_enabled(ct),
    }}, indent=2))</pre>
<p>The IAM-03 check deserves emphasis. A vendor cross-account role whose trust policy lacks a <code>sts:ExternalId</code> condition is the textbook confused-deputy setup: any tenant of that vendor who learns your role ARN can ask the vendor&#8217;s control plane to act on it. Every serious BYOC vendor issues an ExternalId during onboarding. The control exists because onboarding scripts get copied between accounts, and the condition gets dropped.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5MjAiIGhlaWdodD0iNDAwIiB2aWV3Qm94PSIwIDAgOTIwIDQwMCIgZm9udC1mYW1pbHk9Ik1lbmxvLCBDb25zb2xhcywgJ0RlamFWdSBTYW5zIE1vbm8nLCBtb25vc3BhY2UiIGZvbnQtc2l6ZT0iMTEiIGZpbGw9IiMxZjIzMjgiPgogIDxkZWZzPgogICAgPG1hcmtlciBpZD0iYXJyMiIgdmlld0JveD0iMCAwIDEwIDEwIiByZWZYPSI5IiByZWZZPSI1IiBtYXJrZXJXaWR0aD0iOCIgbWFya2VySGVpZ2h0PSI4IiBvcmllbnQ9ImF1dG8tc3RhcnQtcmV2ZXJzZSI+CiAgICAgIDxwYXRoIGQ9Ik0wLDAgTDEwLDUgTDAsMTAgeiIgZmlsbD0iIzFmMjMyOCIvPgogICAgPC9tYXJrZXI+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSI5MjAiIGhlaWdodD0iNDAwIiBmaWxsPSIjZmRmY2ZhIi8+CgogIDwhLS0gY29sbGVjdG9ycyBjb2x1bW4gLS0+C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0kgb24gYSBzY2hlZHVsZSAobmlnaHRseSkgYW5kIG9uIGV2ZXJ5PC90ZXh0PgogIDx0ZXh0IHg9IjU0MCIgeT0iMzE2IiBmaWxsPSIjNTc2MDZhIj5jaGFuZ2UgdG8gc3RhbmRhcmQueWFtbCBvciB0aGUgdmVuZG9yJ3MgYWdlbnQgdmVyc2lvbjwvdGV4dD4KCiAgPGxpbmUgeDE9IjMwIiB5MT0iMzYwIiB4Mj0iODkwIiB5Mj0iMzYwIiBzdHJva2U9IiMxZjIzMjgiIHN0cm9rZS13aWR0aD0iMC44Ii8+CiAgPHRleHQgeD0iMzAiIHk9IjM3OCIgZmlsbD0iIzU3NjA2YSI+RklHLiAyICAgRXZpZGVuY2UgcGlwZWxpbmUuIENvbGxlY3RvcnMgbmV2ZXIgc2NvcmUgYW5kIHRoZSBldmFsdWF0b3IgbmV2ZXIgY29sbGVjdHMuPC90ZXh0Pjx0ZXh0IHg9IjMwIiB5PSIzOTEiIGZpbGw9IiM1NzYwNmEiPlRoZSBzdGFuZGFyZCBpcyBhIHJldmlld2VkIGZpbGUgdW5kZXIgdmVyc2lvbiBjb250cm9sLCBub3QgYSBzcHJlYWRzaGVldC48L3RleHQ+Cjwvc3ZnPgo=" alt="BYOC database security evidence pipeline from collectors through normalised evidence and versioned standard to scoring" width="920"><figcaption>Fig. 2 — The BYOC database security evidence pipeline. Collectors emit raw values; the standard is a reviewed file; the evaluator joins the two. Keeping those three roles separate is what lets the same score be reproduced by someone who was not in the room.</figcaption></figure>
<h2>The BYOC database security scoring engine</h2>
<p>The evaluator that turns evidence into a BYOC database security score is short on purpose. Its rules are the interesting part, and each one is a decision about what the number should mean. The score is the weighted share of applicable controls that pass.</p>
<p>A control whose evidence key is absent is UNKNOWN and scores as a fail; unproven is treated as unsafe, which is the only rule that stops &#8220;we did not run the collector&#8221; from inflating the number. A control the evidence marks as not applicable leaves the denominator entirely. And any failing gate control caps the verdict at NON-CONFORMANT while still reporting the score, so the percentage remains useful for tracking progress even when the verdict is red.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="python">#!/usr/bin/env python3
"""
byoc_score.py -- BYOC database security: score one target against a control standard.

    python3 byoc_score.py byoc_security_standard.yaml evidence/analytics-ch-prod.json

Rules the number is built on (keep these stable; changing them changes history):
  * score = sum(weight of PASS) / sum(weight of applicable controls)
  * a control with missing evidence is UNKNOWN and scores as FAIL -- unproven is unsafe
  * a control marked not_applicable in evidence is removed from the denominator
  * any gate control that fails caps the verdict at NON-CONFORMANT, whatever the score
"""
import json
import operator
import sys
from collections import defaultdict

import yaml

OPS = {"eq": operator.eq, "ne": operator.ne, "gte": operator.ge, "lte": operator.le}


def lookup(evidence: dict, dotted: str):
    """evidence['db']['tls_min_version'] for 'db.tls_min_version'; None if absent."""
    node = evidence
    for part in dotted.split("."):
        if not isinstance(node, dict) or part not in node:
            return None
        node = node[part]
    return node


def evaluate(standard: dict, evidence: dict) -&gt; dict:
    weights = standard["weights"]
    results, by_domain = [], defaultdict(lambda: {"earned": 0, "possible": 0})
    earned = possible = 0
    gate_failures = []

    for domain in standard["domains"]:
        for ctl in domain["controls"]:
            w = weights[ctl["severity"]]
            value = lookup(evidence, ctl["evidence"])
            if value == "not_applicable":
                status = "N/A"
            elif value is None:
                status = "UNKNOWN"
            else:
                exp = ctl["expect"]
                status = "PASS" if OPS[exp["op"]](value, exp["value"]) else "FAIL"

            if status != "N/A":
                possible += w
                by_domain[domain["id"]]["possible"] += w
                if status == "PASS":
                    earned += w
                    by_domain[domain["id"]]["earned"] += w
                elif ctl.get("gate"):
                    gate_failures.append(ctl["id"])

            results.append({"id": ctl["id"], "domain": domain["id"], "severity": ctl["severity"],
                            "weight": w, "status": status, "observed": value,
                            "expect": ctl["expect"], "title": ctl["title"]})

    score = round(100 * earned / possible, 1) if possible else 0.0
    verdict = "NON-CONFORMANT" if gate_failures else ("CONFORMANT" if score &gt;= 90 else "PARTIAL")
    return {"standard": f'{standard["standard"]} v{standard["version"]}',
            "target": evidence.get("target", "?"),
            "score": score, "verdict": verdict, "gate_failures": gate_failures,
            "domains": {d: round(100 * v["earned"] / v["possible"], 1) if v["possible"] else None
                        for d, v in by_domain.items()},
            "controls": results}


def print_report(rep: dict) -&gt; None:
    print(f'{rep["target"]}  vs  {rep["standard"]}')
    print(f'score {rep["score"]}%  verdict {rep["verdict"]}'
          + (f'  (gates failed: {", ".join(rep["gate_failures"])})' if rep["gate_failures"] else ""))
    print("-" * 78)
    for c in rep["controls"]:
        flag = " GATE" if c["status"] == "FAIL" and c["id"] in rep["gate_failures"] else ""
        print(f'{c["id"]:7} {c["status"]:8} w={c["weight"]}  observed={c["observed"]!r:6}%')


if __name__ == "__main__":
    with open(sys.argv[1]) as f:
        std = yaml.safe_load(f)
    with open(sys.argv[2]) as f:
        ev = json.load(f)
    report = evaluate(std, ev)
    print_report(report)
    with open(sys.argv[2].replace(".json", ".report.json"), "w") as f:
        json.dump(report, f, indent=2)</pre>
<p>Here is a hand-built BYOC database security evidence file for a ClickHouse BYOC cluster. The values are illustrative; the file shape is exactly what the collectors above produce once merged. Note the empty ops block: nobody recorded a restore drill, and that absence is going to be scored.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="json">{
  "target": "analytics-ch-prod (ClickHouse BYOC, AWS eu-central-1)",
  "collected_at": "2026-09-03T10:14:00Z",
  "db": {
    "superuser_logins_last_30d": 0,
    "password_only_roles": 2,
    "tls_min_version": 1.2,
    "audit_log_shipped": true,
    "listens_public": false,
    "oldest_unpatched_cve_days": 12
  },
  "cloud": {
    "vendor_role_external_id_enforced": true,
    "public_ingress_rules": 0,
    "private_connectivity_only": true,
    "egress_allowlisted": false,
    "cmk_encryption": true,
    "backup_cmk": true,
    "agent_policy_wildcards": 1,
    "api_audit_enabled": true,
    "backup_bucket_vendor_delete_denied": true
  },
  "vendor": {
    "breakglass_ttl_hours": 4,
    "soc2_age_days": 210
  },
  "ops": {}
}</pre>
<p>And the run, unedited:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">$ python3 byoc_score.py byoc_security_standard.yaml evidence/analytics-ch-prod.json
analytics-ch-prod (ClickHouse BYOC, AWS eu-central-1)  vs  MDB-SEC-2026-09-BYOC v1.0
score 77.4%  verdict NON-CONFORMANT  (gates failed: CPL-02)
------------------------------------------------------------------------------
IAM-01  PASS     w=5  observed=0            No shared superuser / default admin account 
IAM-02  FAIL     w=3  observed=2            Database authentication is federated (IAM / 
IAM-03  PASS     w=5  observed=True         Vendor cross-account role uses an ExternalId
NET-01  PASS     w=5  observed=0            Database endpoints have no 0.0.0.0/0 ingress
NET-02  PASS     w=3  observed=True         Client access only through PrivateLink / Pri
NET-03  FAIL     w=3  observed=False        Egress from the data plane is allow-listed (
ENC-01  PASS     w=5  observed=True         Storage volumes and object-storage buckets e
ENC-02  PASS     w=3  observed=1.2          TLS 1.2+ enforced on every client-facing lis
ENC-03  PASS     w=3  observed=True         Backups encrypted with the same or a dedicat
CPL-01  PASS     w=3  observed=4            Vendor operator access to the data plane is 
CPL-02  FAIL     w=5  observed=1            Control-plane agent runs with least-privileg GATE
CPL-03  PASS     w=1  observed=210          Vendor SOC 2 Type II report reviewed within 
LOG-01  PASS     w=3  observed=True         Database audit log (DDL, grants, auth failur
LOG-02  PASS     w=3  observed=True         Cloud API audit trail (CloudTrail / Audit Lo
BKP-01  PASS     w=5  observed=True         Backups stored in a bucket the vendor contro
BKP-02  UNKNOWN  w=3  observed=None         Restore drill executed and evidenced within 
CFG-01  PASS     w=3  observed=False        No database-level access from the public int
CFG-02  PASS     w=1  observed=12           Version within vendor support window and no 
------------------------------------------------------------------------------
IAM     76.9%
NET     72.7%
ENC    100.0%
CPL     44.4%
LOG    100.0%
BKP     62.5%
CFG    100.0%</pre>
<p>Read the output the way the CISO will. The headline is not 77.4%; it is NON-CONFORMANT with CPL-02 named as the reason, meaning the vendor&#8217;s control-plane agent holds a wildcard action in your account. That single line is the conversation to have with the vendor this week. </p>
<p>The 77.4% is the second sentence, and it decomposes: two password-only ClickHouse roles, egress from the data plane not allow-listed, and a restore drill nobody can evidence. The domain breakdown shows CPL at 44.4% and BKP at 62.5%, which is where the next quarter&#8217;s work goes. Encryption, logging and configuration hardening are at 100% and can be left alone.</p>
<figure><img decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5MjAiIGhlaWdodD0iNDgwIiB2aWV3Qm94PSIwIDAgOTIwIDQ4MCIgZm9udC1mYW1pbHk9Ik1lbmxvLCBDb25zb2xhcywgJ0RlamFWdSBTYW5zIE1vbm8nLCBtb25vc3BhY2UiIGZvbnQtc2l6ZT0iMTEiIGZpbGw9IiMxZjIzMjgiPgogIDxkZWZzPgogICAgPG1hcmtlciBpZD0iYXJyMyIgdmlld0JveD0iMCAwIDEwIDEwIiByZWZYPSI5IiByZWZZPSI1IiBtYXJrZXJXaWR0aD0iOCIgbWFya2VySGVpZ2h0PSI4IiBvcmllbnQ9ImF1dG8tc3RhcnQtcmV2ZXJzZSI+CiAgICAgIDxwYXRoIGQ9Ik0wLDAgTDEwLDUgTDAsMTAgeiIgZmlsbD0iIzFmMjMyOCIvPgogICAgPC9tYXJrZXI+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSI5MjAiIGhlaWdodD0iNDgwIiBmaWxsPSIjZmRmY2ZhIi8+CgogIDwhLS0gcGVyLWNvbnRyb2wgZGVjaXNpb24gLS0+CiAgPHRleHQgeD0iMzAiIHk9IjQwIiBmb250LXdlaWdodD0iYm9sZCI+cGVyIGNvbnRyb2w8L3RleHQ+CiAgPHJlY3QgeD0iMzAiIHk9IjU2IiB3aWR0aD0iMTgwIiBoZWlnaHQ9IjQwIiBmaWxsPSIjZmZmIiBzdHJva2U9IiMxZjIzMjgiIHN0cm9rZS13aWR0aD0iMS4yIi8+CiAgPHRleHQgeD0iMTIwIiB5PSI4MCIgdGV4dC1hbmNob3I9Im1pZGRsZSI+bG9va3VwKGV2aWRlbmNlIGtleSk8L3RleHQ+Cgog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3N0bHkgZmluZSIuPC90ZXh0Pgo8L3N2Zz4K" alt="How a BYOC database security score and verdict are derived from per-control results with gate checks" width="920"><figcaption>Fig. 3 — Per-control and per-target BYOC database security decision logic. The worked figures are from the run above: 65 weight earned out of 84 applicable.</figcaption></figure>
<h2>What a BYOC database security percentage means, and what it does not</h2>
<p>A BYOC database security conformance percentage is a statement about a standard, not about risk. Two things follow for anyone reporting BYOC database security upward. First, the number is only as good as the weights, and weights are a policy decision, so publish them and version them; a team that quietly changes critical from 5 to 3 to hit a target has broken the metric, not improved security. Second, the number can be gamed by removing controls, which is why the standard&#8217;s control count and version travel with every score. &#8220;92% against v1.0&#8221; and &#8220;92% against v1.3&#8221; are different claims, and the report.json carries both.</p>
<p>There is also a boundary the standard has to admit. The vendor.* keys are attestations: a SOC 2 report&#8217;s age, a break-glass TTL the vendor documented. You are recording that the vendor said something, not measuring it. That is why those controls carry lower weights and no gates. If a vendor offers an API for its break-glass audit log, and some do, promote that control from attestation to measurement and raise its weight in the next version of the standard. The direction of travel for BYOC database security is precisely that: moving controls from the hatched region of Fig. 1 into the measurable one.</p>
<h2>Running BYOC database security scoring continuously</h2>
<p>A BYOC database security score taken once during onboarding is a photograph. The value of a measurable standard comes from running it on a schedule and treating a drop as an incident. The pipeline in Fig. 2 runs nightly from CI and on two additional triggers: any change to the standard file, and any change in the vendor&#8217;s agent version, because agent upgrades are when IAM policies quietly grow. Store each report.json with its timestamp, plot the score per target, and alert when it decreases. A decrease means something in your account changed, or the vendor changed something in your account, and in a BYOC deployment those are the two things you most want to know about.</p>
<p>Open one BYOC database security ticket per FAIL and per UNKNOWN, tagged with the control ID, and close them by re-running the evaluator rather than by hand. UNKNOWN BYOC database security tickets are usually the cheapest to close and the most revealing: they are the controls nobody has ever actually checked.</p>
<h2>Where to start with BYOC database security scoring</h2>
<p>If you run one BYOC database today, you can have a first BYOC database security score by the end of the week. Take the standard above as v0.1, delete the controls you cannot yet collect evidence for, run the SQL and cloud collectors by hand into a single evidence file, and score it. Then add BYOC database security collectors back one at a time. The first number will be low and the first verdict will probably be NON-CONFORMANT; that is the standard doing its job. A deployment you thought was fine and a deployment you can prove is 77.4% conformant with one named gate failure are different things, and only one of them survives contact with an auditor.</p>
<div>Test every BYOC database security collector against a staging deployment before pointing it at production, run the cloud collector under a read-only role, and keep the standard file under the same review discipline as application code. Nothing in this post changes a running database; the collectors read, the evaluator computes. Maintain a tested DR posture independently of any BYOC database security score.</div>
<p>MinervaDB handles BYOC database security reviews for teams running PostgreSQL, ClickHouse, MySQL, MongoDB and Kafka across all three clouds under vendor-neutral <a href="https://minervadb.com/minervadb-consultative-support-2/">24×7 consultative support</a> and <a href="https://minervadb.com/remote-dba-services/">remote DBA</a> engagements, and building a scoreable BYOC database security standard for a specific vendor and estate is a common first deliverable. If you want the collectors extended to your platform, or a review of a standard you have already written, <a href="https://minervadb.com/contact-minervadb-book-an-appointment/">book a working session</a>.</p>
<p><a href="https://minervadb.com/byoc-database-security-standard/">BYOC Database Security: A Measurable Standard in 7 Domains</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Connector/C Compatibility: An Update on CONC-821</title>
        <link>https://mariadb.org/mariadb-connector-c-compatibility-an-update-on-conc-821/</link>
        <pubDate>Thu, 03 Sep 2026 12:02:56 +0000</pubDate>
        <dc:creator>Frédéric Descamps</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-connector-c-compatibility-an-update-on-conc-821/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>As a DBA, there are some surprises I enjoy. Discovering a useful feature is one of them. Discovering that an application behaves differently after a maintenance update is considerably further down the list. …<br />
Continue reading "MariaDB Connector/C Compatibility: An Update on CONC-821"<br />
MariaDB Connector/C Compatibility: An Update on CONC-821 appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/mariadb-connector-c-compatibility-an-update-on-conc-821/">MariaDB Connector/C Compatibility: An Update on CONC-821</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>As a DBA, there are some surprises I enjoy. Discovering a useful feature is one of them. Discovering that an application behaves differently after a maintenance update is considerably further down the list. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/mariadb-connector-c-compatibility-an-update-on-conc-821/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;MariaDB Connector/C Compatibility: An Update on CONC-821&#8221;</span></a></p>
<p><a href="https://mariadb.org/mariadb-connector-c-compatibility-an-update-on-conc-821/">MariaDB Connector/C Compatibility: An Update on CONC-821</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/mariadb-connector-c-compatibility-an-update-on-conc-821/">MariaDB Connector/C Compatibility: An Update on CONC-821</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MySQL 26.7 and 9.7 LTS: 7 Powerful Features for Performance, Scalability and High Availability</title>
        <link>https://minervadb.com/mysql-26-7-performance-scalability-high-availability/</link>
        <pubDate>Wed, 02 Sep 2026 19:07:03 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mysql-26-7-and-9-7-lts-7-powerful-features-for-performance-scalability-and-high-availability/</guid>
        <source url="https://minervadb.com/">MinervaDB</source>
        <description><![CDATA[<p>MySQL 26.7 is the first release Oracle has shipped under calendar versioning, and it landed on 28 July 2026 together with MySQL 9.7.2 LTS and MySQL 8.4.11 LTS. Most of the coverage so far has [...]</p>
<p><a href="https://minervadb.com/mysql-26-7-performance-scalability-high-availability/">MySQL 26.7 and 9.7 LTS: 7 Powerful Features for Performance, Scalability and High Availability</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MySQL 26.7 is the first release Oracle has shipped under calendar versioning, and it landed on 28 July 2026 together with MySQL 9.7.2 LTS and MySQL 8.4.11 LTS. Most of the coverage so far has stopped at the version-number change. That is the least interesting thing about it. What matters for anyone running MySQL in production is that MySQL 26.7 moves the Thread Pool plugin into Community Edition, introduces a second replication applier with up to 1,024 worker threads per channel, flips the default Group Replication communication stack, and adds post-quantum key exchange to TLS.</p>
<p>Combined with what 9.7 LTS already carried across from Enterprise (the hypergraph optimizer, OpenTelemetry, the Group Replication components), the Community versus Enterprise line has moved further in two releases than in the previous ten years.</p>
<p>This post walks through the features that actually change performance, scalability and high availability outcomes, with the configuration and the measurement queries you need to verify each one on your own hardware. It also lists what is still Enterprise-only, because that list is now short enough to reason about honestly. Everything here is version-pinned against the release notes; where Oracle has published performance figures, they are labelled as Oracle&#8217;s, not ours.</p>
<h2>MySQL 26.7, 9.7 LTS and 8.4 LTS: which one goes to production</h2>
<p>Three supported lines shipped in the July 2026 drop, and they are not interchangeable. MySQL 9.7 was the last release to use sequential version numbers; everything after it is YY.M.P, so 26.7.0 is simply the July 2026 Innovation release. Innovation releases are supported only until the next one appears. They have no Extended Support window. MySQL 26.7 is therefore the right choice for a fleet that upgrades quarterly and wants the Change Stream Applier or the Community thread pool today, and the wrong choice for anything that needs to sit still for three years.</p>
<p>The ladder below is the one Oracle supports. In-place upgrades between LTS lines are adjacent-only, so an 8.0 estate cannot jump to 9.7; it goes through 8.4 first. MySQL 8.0 entered Sustaining Support on 21 April 2026, which means no new patches and no new security fixes for on-premises installations (the HeatWave extension to April 2027 does not apply outside OCI).</p>
<figure><img decoding="async" src="https://minervadb.com/wp-content/uploads/2026/09/mysql-26-7-release-ladder-8-0-8-4-9-7-lts.png" alt="MySQL 26.7 Innovation, 9.7 LTS, 8.4 LTS and 8.0 release ladder with support dates and the adjacent-LTS upgrade path" width="960" height="300" class="size-full" loading="lazy"></figure>
<div>
<table>
<thead>
<tr>
<th>Release</th>
<th>Track</th>
<th>GA</th>
<th>Support horizon</th>
<th>Carries from MySQL 26.7?</th>
</tr>
</thead>
<tbody>
<tr>
<td>MySQL 26.7.0</td>
<td>Innovation</td>
<td>2026-07-28</td>
<td>Until the next Innovation release</td>
<td>Everything in this post</td>
</tr>
<tr>
<td>MySQL 9.7.2</td>
<td>LTS</td>
<td>2026-07-28 (9.7.0 GA 2026-04-21)</td>
<td>Premier 2034-04, Extended 2037-04</td>
<td>Hypergraph, OTel, GR components, duality-view DML, Dynamic Data Masking (EE); thread pool remains EE; no CSA, no PQC</td>
</tr>
<tr>
<td>MySQL 8.4.11</td>
<td>LTS</td>
<td>2026-07-28 (8.4.0 GA 2024-04-10)</td>
<td>Premier 2029-04, Extended 2032-04</td>
<td>Bug fixes only</td>
</tr>
<tr>
<td>MySQL 8.0.46</td>
<td>Sustaining</td>
<td>2026-04-07</td>
<td>No new fixes since 2026-04-21</td>
<td>Nothing</td>
</tr>
</tbody>
</table>
</div>
<p>One practical consequence of calendar versioning that Ronald Bradford flagged in his early-access write-up: any tooling that sorts version strings lexically now believes 26.7 is older than 9.7. Check your inventory scripts, your package pinning and your monitoring dashboards before the first MySQL 26.7 host reports in. Oracle added <code>MYSQL_PREVIOUS_LTS_VERSION</code> and <code>MYSQL_PREVIOUS_LTS_VERSION_ID</code> to <code>mysql_version.h</code> for exactly this reason.</p>
<h2>Thread Pool in MySQL 26.7 Community: connection scalability without the Enterprise licence</h2>
<p>For fifteen years the Thread Pool plugin was the single most-cited reason to buy MySQL Enterprise Edition. MySQL 26.7.0 ships it in Community. Percona Server has had its own thread pool implementation since 5.5, so the capability is not new to the ecosystem, but this is the first time Oracle&#8217;s implementation, with its priority queues, stall detection and the <code>TP_CONNECTION_ADMIN</code> escape hatch, is available without a subscription. On MySQL 9.7 LTS it is still Enterprise-only; the Community transfer is a 26.7 change.</p>
<p>The mechanism is worth understanding before you turn it on, because it changes the shape of your latency curve rather than just shifting it. The default one-thread-per-connection model creates a kernel thread for every session. At two or three thousand active connections the cost is not memory, it is the OS scheduler and the InnoDB mutexes that all those runnable threads contend on. The thread pool replaces that with <code>thread_pool_size</code> thread groups (default 16), each owning a listener thread, a high-priority queue, a low-priority queue and a small set of worker threads. Connections are assigned to groups round-robin.</p>
<p>The pool tries to keep exactly one thread executing per group and only spawns another when a statement exceeds <code>thread_pool_stall_limit</code> (default 60 ms).</p>
<figure><img decoding="async" src="https://minervadb.com/wp-content/uploads/2026/09/mysql-26-7-thread-pool-architecture.png" alt="MySQL 26.7 Thread Pool architecture: thread groups, listener thread, high and low priority queues, worker threads and InnoDB" width="960" height="420" class="size-full" loading="lazy"></figure>
<p>Loading it on MySQL 26.7 is a startup option, not a dynamic change, so it needs a restart and a maintenance window:</p>
<pre><code># /etc/my.cnf  (MySQL 26.7.0 Community; restart required)
[mysqld]
plugin-load-add               = thread_pool.so
thread_handling               = pool-of-threads
thread_pool_size              = 16        # start at physical cores, not vCPUs
thread_pool_stall_limit       = 60        # ms; raise for OLAP-style statements
thread_pool_max_unused_threads = 32       # 26.7 / 9.7.2 default (was 2)
thread_pool_prio_kickup_timer = 1000      # ms before a low-priority stmt is promoted
thread_pool_max_transactions_limit = 0    # 0 = no cap; set only with TP_CONNECTION_ADMIN granted</code></pre>
<p>Two of those defaults changed in this release cycle. <code>thread_pool_max_unused_threads</code> moved from 2 to 32 in both 26.7.0 and 9.7.2, which reduces thread churn on bursty workloads at the cost of a few idle stacks. Verify the plugin loaded and confirm all four components are active (the plugin registers itself plus three Performance Schema tables):</p>
<pre><code>SELECT plugin_name,
       plugin_status,
       plugin_type
  FROM information_schema.plugins
 WHERE plugin_name LIKE 'thread_pool%'
    OR plugin_name LIKE 'TP_%';</code></pre>
<p>Then measure instead of guessing. The statistics table is the one to watch; the ratio of queued to executed statements per group tells you whether <code>thread_pool_size</code> is too low, and a rising stall count with acceptable throughput tells you the stall limit is too aggressive for your statement mix:</p>
<pre><code>SELECT tp_group_id,
       connections_started,
       queries_executed,
       queries_queued,
       stalled_queries_executed,
       threads_started,
       prio_kickups
  FROM performance_schema.tp_thread_group_stats
 ORDER BY tp_group_id;</code></pre>
<p>The honest framing for anyone planning to enable this on MySQL 26.7: the thread pool improves p99 under connection storms and protects InnoDB from thundering-herd contention. It does not raise peak throughput on a workload that was already CPU-bound at moderate concurrency, and on some short-transaction OLTP profiles it costs a few percent of throughput at low connection counts. Run a sysbench sweep from 64 to 4,096 connections with and without it, on your schema, before committing. We covered the plugin&#8217;s Community arrival in more detail in <a href="https://minervadb.com/mysql-thread-pool-community-26-7/">MySQL Thread Pool comes to Community in 26.7</a>.</p>
<h2>Change Stream Applier: the MySQL 26.7 replication applier built for backlog</h2>
<p>This is the largest piece of new replication engineering since the multi-threaded applier gained writeset dependency tracking in 8.0. The Change Stream Applier (CSA) is an opt-in, per-channel alternative to the classic MTA, selected with <code>APPLIER_VERSION = 2</code>. It supports between 1 and 1,024 worker threads per channel, compared to the MTA&#8217;s coordinator-bound model, and, more importantly, it separates apply progression from commit progression.</p>
<p>Why that separation matters: in the MTA, a worker that finishes applying a transaction parks until every earlier transaction has committed when <code>replica_preserve_commit_order</code> is ON. Under a write-heavy backlog with long-tail transactions, workers spend more time parked than applying. In the CSA design, later independent transactions keep moving through the scheduler while earlier ones wait on their dependencies; commit order is still preserved, but the avoidable parking is gone. Relay-log reads are parallel and events are released after use, which is what makes the new per-channel memory budget possible.</p>
<figure><img decoding="async" src="https://minervadb.com/wp-content/uploads/2026/09/mysql-26-7-change-stream-applier-vs-mta.png" alt="MySQL 26.7 Change Stream Applier pipeline compared with the multi-threaded applier: provider, dependency adaptation, scheduler, thread pool and commit" width="960" height="440" class="size-full" loading="lazy"></figure>
<p>Enabling it on a MySQL 26.7 replica is a channel-level change and requires the channel to be stopped:</p>
<pre><code>-- MySQL 26.7.0 replica; run per channel, outside peak, with a rollback plan.
STOP REPLICA FOR CHANNEL 'ch_primary';

CHANGE REPLICATION SOURCE TO
    APPLIER_VERSION             = 2,
    APPLIER_WORKER_COUNT        = 64,
    APPLIER_EVENT_MEMORY_LIMIT  = 1073741824,   -- 1 GiB per-channel event cache
    REQUIRE_ROW_FORMAT          = 1,
    GTID_ONLY                   = 1
FOR CHANNEL 'ch_primary';

START REPLICA FOR CHANNEL 'ch_primary';

-- Verify the channel is running with the new applier.
SELECT channel_name,
       applier_version,
       applier_worker_count,
       applier_event_memory_limit
  FROM performance_schema.replication_applier_configuration;</code></pre>
<p>Rollback is symmetric: stop the channel, set <code>APPLIER_VERSION = 1</code>, start it. The existing <code>performance_schema.replication_applier_status_by_worker</code> and <code>replication_applier_status_by_coordinator</code> views keep working, so your lag dashboards do not need to change. <code>APPLIER_EVENT_MEMORY_LIMIT</code> replaces the global <code>replica_pending_jobs_size_max</code> for CSA channels and is silently raised to <code>replica_max_allowed_packet</code> if you set it lower.</p>
<p>The prerequisites are strict and they are where most first attempts fail. The source must run with <code>gtid_mode = ON</code>, the channel must be <code>GTID_ONLY = 1</code> and <code>REQUIRE_ROW_FORMAT = 1</code>, and statement or mixed binlog formats are rejected outright. File-and-position replication, <code>SOURCE_DELAY</code>, <code>sql_replica_skip_counter</code>, <code>IGNORE_SERVER_IDS</code> and most <code>START REPLICA ... UNTIL</code> forms are unsupported. If you run a delayed replica for operator-error recovery, that channel stays on the MTA.</p>
<p>Oracle&#8217;s engineering post reports sysbench <code>oltp_write_only</code> results with 64 workers where the CSA reached roughly 10.5k TPS against 7.2k for the MTA on the default durability profile with ten updates per transaction, and a wider gap with relaxed durability. Those are Oracle-reported numbers on Oracle&#8217;s hardware.</p>
<p>The pattern they show is plausible given the design (the gain grows with transaction size and with backlog depth), but the only number that matters for you is your own replica&#8217;s <code>Seconds_Behind_Source</code> recovery time after an induced backlog, measured with <code>APPLIER_VERSION = 1</code> and <code>2</code> on the same channel. A clean way to induce one is to <code>STOP REPLICA SQL_THREAD</code> for a fixed interval under production-shaped load, restart it, and record time-to-zero-lag from <code>replication_applier_status_by_worker</code>. Run it at least three times per configuration and report the median.</p>
<h2>Group Replication in MySQL 26.7: the MYSQL communication stack becomes the default</h2>
<p>MySQL 26.7 changes the default of <code>group_replication_communication_stack</code> from <code>XCOM</code> to <code>MYSQL</code>, deprecates the variable itself along with <code>group_replication_ip_allowlist</code>, and emits deprecation warnings on the XCom-specific options. The MYSQL stack has existed since 8.0.27; what changed is that it is now the path Oracle is committing to, and new clusters bootstrapped on 26.7 will use it unless told otherwise.</p>
<p>Under the MYSQL stack, group communication rides the server&#8217;s own listener. <code>group_replication_local_address</code> must be one of the IP:port pairs the server is already bound to, the allowlist is ignored, and access control becomes ordinary MySQL authentication: the replication user needs <code>GROUP_REPLICATION_STREAM</code> and <code>CONNECTION_ADMIN</code> on top of <code>REPLICATION SLAVE</code> and <code>BACKUP_ADMIN</code>. TLS for group traffic is taken from the distributed-recovery settings, and <code>require_secure_transport</code> must agree with <code>group_replication_ssl_mode</code> on every member. Network namespaces work, which they never did under XCom.</p>
<figure><img decoding="async" src="https://minervadb.com/wp-content/uploads/2026/09/mysql-26-7-group-replication-mysql-vs-xcom-stack.png" alt="MySQL 26.7 Group Replication XCOM communication stack versus the default MYSQL communication stack with ports and privileges" width="960" height="430" class="size-full" loading="lazy"></figure>
<p>The operational point is that this is a topology change, not a parameter change. A cluster cannot run mixed stacks; members on the wrong one simply fail to join, without a helpful error. Moving an existing XCom cluster to the MYSQL stack requires stopping Group Replication on every member and re-bootstrapping, so it is a planned outage or a ClusterSet failover, not something to attempt with <code>SET PERSIST</code> on a live primary. The procedure below is the one we would put in a runbook, with its gates:</p>
<pre><code>-- Phase 0: pre-flight on EVERY member (MySQL 26.7.0). Record the output.
SELECT @@group_replication_communication_stack,
       @@group_replication_local_address,
       @@bind_address,
       @@require_secure_transport,
       @@group_replication_ssl_mode;

SELECT member_host, member_port, member_state, member_role, member_version
  FROM performance_schema.replication_group_members;

-- Phase 1: grant the MYSQL-stack privileges (all members, binlog off).
SET SQL_LOG_BIN = 0;
GRANT GROUP_REPLICATION_STREAM ON *.* TO '${GR_USER}'@'%';
GRANT CONNECTION_ADMIN         ON *.* TO '${GR_USER}'@'%';
SET SQL_LOG_BIN = 1;

-- Phase 2: stop the group, secondaries first, primary last.
STOP GROUP_REPLICATION;

-- Phase 3: switch stack and re-point the local address to a bound port.
SET PERSIST group_replication_communication_stack = 'MYSQL';
SET PERSIST group_replication_local_address       = '10.0.1.11:3306';
SET PERSIST group_replication_group_seeds         =
    '10.0.1.11:3306,10.0.1.12:3306,10.0.1.13:3306';

-- Phase 4: bootstrap ONCE, on the former primary only. CONFIRMATION GATE:
-- a second bootstrap creates a split brain. Verify no member is ONLINE first.
SET GLOBAL group_replication_bootstrap_group = ON;
START GROUP_REPLICATION;
SET GLOBAL group_replication_bootstrap_group = OFF;

-- Phase 5: join the remaining members, then validate.
START GROUP_REPLICATION;
SELECT member_host, member_state, member_role
  FROM performance_schema.replication_group_members;</code></pre>
<p>Firewall rules, load-balancer health checks and MySQL Router bootstrap configuration all encode the port model, so a stack migration on MySQL 26.7 touches more than the database hosts. If you are bootstrapping a new cluster, let the new default stand and skip the migration entirely. If you run an existing XCom cluster and are not moving to 26.7 this quarter, there is no urgency: the deprecation is a warning in 26.7, and 9.7 LTS keeps the XCom default. Plan the switch into the next LTS upgrade rather than as a standalone change.</p>
<p>Two smaller HA items in the same release: the Clone plugin now understands calendar versions and permits cloning from an LTS to the next LTS (but not backwards, and not across non-sequential LTS lines), and the 9.7 LTS transfer already put the Group Replication flow-control statistics, resource manager and primary-election components into Community. For a deeper treatment of write throughput on InnoDB Cluster, see <a href="https://minervadb.com/innodb-cluster-write-performance/">our InnoDB Cluster write-performance analysis</a>.</p>
<h2>Optimizer and InnoDB features MySQL 26.7 inherits from 9.7 LTS</h2>
<p>Everything in 9.7.0 is in MySQL 26.7, and a few of those features change day-to-day performance work more than anything new to 26.7.</p>
<h3>Hypergraph optimizer, now free, still off by default</h3>
<p>The hypergraph join optimizer moved from Enterprise to Community in 9.7.0. It is disabled by default and enabled with the <code>optimizer_switch</code> flag, either globally or per statement:</p>
<pre><code>-- Per-statement trial: no global blast radius.
SELECT /*+ SET_VAR(optimizer_switch = 'hypergraph_optimizer=on') */
       o.customer_id,
       SUM(oi.quantity * oi.unit_price) AS revenue
  FROM orders      AS o
  JOIN order_items AS oi ON oi.order_id = o.order_id
  JOIN products    AS p  ON p.product_id = oi.product_id
 WHERE o.created_at &gt;= '2026-08-01'
 GROUP BY o.customer_id
 ORDER BY revenue DESC
 LIMIT 50;

-- Compare plans. Hypergraph only emits EXPLAIN FORMAT=TREE.
EXPLAIN FORMAT=TREE
SELECT /*+ SET_VAR(optimizer_switch = 'hypergraph_optimizer=on') */ ...;</code></pre>
<p>The adoption blocker is the EXPLAIN restriction: hypergraph does not produce <code>TRADITIONAL</code> or <code>JSON</code> output, only <code>TREE</code>. Any plan-diffing tooling built around JSON EXPLAIN stops working the moment you enable it. Note also that MySQL 9.5 already changed the default <code>explain_format</code> to <code>TREE</code> and <code>explain_json_format_version</code> to 2, so scripts that parsed the old tabular output broke one release earlier. Both are dynamic and can be reverted with <code>SET GLOBAL explain_format = 'TRADITIONAL'</code>. Measure before and after with the digest statistics rather than with anecdotes:</p>
<pre><code>SELECT digest,
       LEFT(digest_text, 80)                          AS stmt,
       count_star                                     AS execs,
       ROUND(sum_timer_wait / count_star / 1e9, 3)    AS avg_ms,
       ROUND(quantile_99 / 1e9, 3)                    AS p99_ms,
       sum_rows_examined / count_star                 AS rows_examined_avg
  FROM performance_schema.events_statements_summary_by_digest
 WHERE schema_name = 'app'
 ORDER BY sum_timer_wait DESC
 LIMIT 20;</code></pre>
<h3>Foreign keys moved to the SQL layer (9.6)</h3>
<p>MySQL 9.6 moved foreign-key enforcement and cascade handling out of InnoDB and into the SQL layer, and MySQL 26.7 inherits that. The stated reason is completeness of the binary log: cascaded deletes and updates now appear as row events. That is good news for CDC pipelines (Debezium and friends finally see cascades) and a surprise for capacity planning, because binlog volume and replication row traffic go up on schemas with deep cascade chains. <code>innodb_native_foreign_keys</code> reverts to the old behaviour. Track the delta with <code>SHOW BINARY LOGS</code> growth per hour before and after the upgrade.</p>
<h3>Defaults that changed underneath you</h3>
<p>Several InnoDB and replication defaults shifted between 9.3 and 9.5, and every one of them is live on a fresh MySQL 26.7 install. The ones that alter observable behaviour:</p>
<div>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Old default</th>
<th>New default</th>
<th>Since</th>
<th>Restart?</th>
<th>Why you care</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>innodb_change_buffer_max_size</code></td>
<td>25</td>
<td>5 (%)</td>
<td>9.4</td>
<td>No</td>
<td>Less buffer pool spent on change buffering; secondary-index-heavy inserts may regress on slow storage</td>
</tr>
<tr>
<td><code>innodb_change_buffering</code></td>
<td>none</td>
<td>all</td>
<td>9.5</td>
<td>No</td>
<td>Reverses the 8.4 default; check <code>Innodb_ibuf_*</code> status counters</td>
</tr>
<tr>
<td><code>back_log</code></td>
<td>151</td>
<td>10000</td>
<td>9.4</td>
<td>Yes</td>
<td>Connection storms queue instead of failing; pairs well with the thread pool</td>
</tr>
<tr>
<td><code>binlog_transaction_dependency_history_size</code></td>
<td>25,000</td>
<td>1,000,000</td>
<td>9.5</td>
<td>No</td>
<td>Better writeset parallelism for MTA and CSA; more memory on the source</td>
</tr>
<tr>
<td><code>caching_sha2_password_digest_rounds</code></td>
<td>5,000</td>
<td>10,000</td>
<td>9.5</td>
<td>No</td>
<td>Doubles CPU per new authentication; matters on high connection churn</td>
</tr>
<tr>
<td><code>gtid_mode</code> / <code>enforce_gtid_consistency</code></td>
<td>OFF</td>
<td>ON</td>
<td>9.5</td>
<td>Yes</td>
<td>GTID-inconsistent statements start failing; required by the CSA anyway</td>
</tr>
<tr>
<td><code>SOURCE_SSL</code>, <code>group_replication_ssl_mode</code></td>
<td>0 / DISABLED</td>
<td>1 / REQUIRED</td>
<td>9.5</td>
<td>Channel restart</td>
<td>Plaintext replication breaks on upgrade</td>
</tr>
<tr>
<td><code>thread_pool_max_unused_threads</code></td>
<td>2</td>
<td>32</td>
<td>26.7 / 9.7.2</td>
<td>No</td>
<td>Fewer thread create/destroy cycles under bursty load</td>
</tr>
</tbody>
</table>
</div>
<h3>Container-aware sizing</h3>
<p>Since 9.3 the server reads cgroup limits rather than host totals when auto-sizing <code>innodb_buffer_pool_size</code>, <code>innodb_buffer_pool_instances</code>, <code>innodb_page_cleaners</code>, <code>innodb_purge_threads</code>, the read and parallel-read thread counts and <code>temptable_max_ram</code>. MySQL 26.7 adds the 9.7 refinement for <code>cpuset-cpus</code>. If you run MySQL on Kubernetes, this is the release where a pod with a 16 GiB limit stops trying to allocate a buffer pool sized for the 256 GiB node underneath it. Confirm what the server actually chose after startup with <code>SELECT @@innodb_buffer_pool_size, @@innodb_buffer_pool_instances, @@server_memory;</code> and compare against the pod spec.</p>
<p>The 9.6 undo-truncation work, which in 26.7 persists progress in the tablespace header instead of separate log files, is the other InnoDB item worth noting: long undo truncations now survive a crash cleanly.</p>
<h2>Post-quantum TLS in MySQL 26.7</h2>
<p>When built against OpenSSL 3.5 or later, MySQL 26.7 negotiates post-quantum key-exchange groups on TLS 1.3 connections. Fourteen new variables control it across five channels: client, admin, asynchronous replication, Group Replication and X Plugin. Each channel has a <code>*_tls_kex</code> list, a <code>*_force_pqc</code> boolean and a <code>*_use_pqc_sign</code> boolean, all defaulting to OFF, so nothing changes until you opt in. The negotiated result is visible per session in <code>Tls_key_exchange_algorithm</code> and <code>Tls_sign_algorithm</code>.</p>
<pre><code>-- Opt replication traffic into a hybrid PQC group first; clients later.
SET PERSIST replication_tls_kex   = 'X25519MLKEM768:X25519';
SET PERSIST replication_force_pqc = ON;

-- Verify on an established replication session.
SHOW SESSION STATUS LIKE 'Tls_key_exchange_algorithm';</code></pre>
<p>The performance angle is real but small: ML-KEM handshakes carry a larger key share, so the cost lands on connection establishment, not on the data path. For a pooled application it is noise. For a workload that opens thousands of short-lived TLS connections per second it is measurable, and it stacks with the doubled <code>caching_sha2_password_digest_rounds</code>. Watch <code>Connections</code> per second against CPU before turning on <code>force_pqc</code> for the client channel. The build dependency matters too: distro packages built against OpenSSL 3.0 silently lack the capability, so check <code>SHOW VARIABLES LIKE 'tls_version'</code> alongside <code>@@version_compile_os</code> and the linked OpenSSL version reported at startup.</p>
<h2>What is still Enterprise-only in MySQL 26.7 and 9.7</h2>
<p>After the 9.7.0 transfer (hypergraph, telemetry, the three Group Replication components, replication applier metrics, JSON duality-view DML) and the 26.7 thread-pool transfer, the Enterprise value proposition has moved from performance and HA to security, backup and AI. That is worth stating plainly because it changes the renewal conversation. This is the remaining list as of the July 2026 releases:</p>
<div>
<table>
<thead>
<tr>
<th>Enterprise capability</th>
<th>State in 9.7.2 / 26.7.0</th>
<th>Community route</th>
</tr>
</thead>
<tbody>
<tr>
<td>MySQL Enterprise Backup</td>
<td>Hot InnoDB backup, incremental, encryption, PITR</td>
<td>Percona XtraBackup; GA for 8.0 and 8.4, still release-candidate for 9.7 as of August 2026. A 9.7 or 26.7 estate has no GA physical backup outside MEB today</td>
</tr>
<tr>
<td>Dynamic Data Masking</td>
<td>New in 9.7: <code>CREATE MASKING POLICY</code>, server-side enforcement, role-based unmasking</td>
<td>None in-server; views or proxy rewrites. If masking is a compliance mandate, EE is defensible</td>
</tr>
<tr>
<td>Enterprise Audit</td>
<td>Modular components since 9.6; 26.7 adds <code>audit_log.file_count</code></td>
<td>Percona Server audit component (JSONL default); filter syntax differs, so migration is rule-rewriting work</td>
</tr>
<tr>
<td>Enterprise Firewall</td>
<td>Component (plugin deprecated 9.4)</td>
<td>ProxySQL query rules at the proxy tier</td>
</tr>
<tr>
<td>Keyring for KMIP, OCI Vault, AWS, HashiCorp</td>
<td>Components; all keyring plugins deprecated since 9.4</td>
<td><code>component_keyring_file</code> is Community; Percona ships open KMIP and Vault components. InnoDB encryption itself was never Enterprise-only</td>
</tr>
<tr>
<td>Enterprise Authentication</td>
<td>LDAP, PAM, Kerberos, WebAuthn</td>
<td>Percona <code>auth_pam</code> for PAM and LDAP-via-PAM; no Community Kerberos</td>
</tr>
<tr>
<td>Thread Pool</td>
<td>EE on 9.7 LTS; <strong>Community on 26.7</strong></td>
<td>Percona Server thread pool on any version</td>
</tr>
<tr>
<td>MySQL AI</td>
<td>On-premises EE option: in-database vector store and search, LLMs, AutoML. Verify GA and pricing with Oracle before planning on it</td>
<td>Community can store <code>VECTOR</code> columns but has no vector index or distance function; MariaDB 11.8+ or pgvector if you need on-prem similarity search without EE</td>
</tr>
<tr>
<td><code>mysqldm</code> diagnostic monitor</td>
<td>EE since 9.5</td>
<td>pt-stalk, PMM</td>
</tr>
</tbody>
</table>
</div>
<p>MySQL Enterprise Monitor is absent from that table because it reached end of life on 1 January 2025. Estates still running it should be on a Percona Monitoring and Management migration path regardless of edition. The renewal audit we run before offering any opinion is short: <code>SHOW PLUGINS</code>, the <code>information_schema.plugins</code> rows with a non-null library, the <code>audit%</code> and <code>keyring%</code> variables, and whether MEB appears in the backup jobs. In most Enterprise estates the answer is MEB plus Audit, and both have substitutes; on 26.7 specifically, the thread pool is no longer a reason to renew.</p>
<h2>Upgrade checklist before the first MySQL 26.7 host</h2>
<p>Whether the target is 9.7 LTS or MySQL 26.7, the pre-flight is the same, because the landmines arrived in 9.3, 9.5 and 9.6 and 26.7 inherits all of them. Run these on every source and replica and keep the output with the change record:</p>
<pre><code>-- 1. Replication defaults that flip on upgrade (9.5+).
SELECT @@gtid_mode,
       @@enforce_gtid_consistency,
       @@binlog_format;

SELECT channel_name,
       ssl_allowed,
       ssl_verify_server_cert
  FROM performance_schema.replication_connection_configuration;

-- 2. Variables removed in 9.3 that abort startup if left in my.cnf.
SELECT variable_name
  FROM performance_schema.global_variables
 WHERE variable_name IN ('innodb_undo_tablespaces',
                         'innodb_log_file_size',
                         'innodb_log_files_in_group',
                         'replica_parallel_type');

-- 3. Authentication plugins that no longer load by default (8.4+).
SELECT user, host, plugin
  FROM mysql.user
 WHERE plugin IN ('mysql_native_password', 'sha256_password');

-- 4. Functions moved out of core in 9.6 (MD5, SHA1 -&gt; classic_hashing component).
SELECT table_schema, table_name, column_name, generation_expression
  FROM information_schema.columns
 WHERE generation_expression REGEXP 'MD5\(|SHA1\(';</code></pre>
<pre><code># 5. Oracle's upgrade checker (MySQL Shell). 26.7 adds live progress reporting.
mysqlsh -- util check-for-server-upgrade 
    ${MYSQL_USER}@${MYSQL_HOST}:3306 
    --target-version=26.7.0 
    --output-format=JSON 
    --config-path=/etc/my.cnf &gt; /var/tmp/upgrade-check-$(hostname).json</code></pre>
<p>Then capture the baseline you will compare against after the upgrade: the top-50 digests by total wait from <code>events_statements_summary_by_digest</code>, replication lag distribution over a representative week, binlog growth per hour, and connection and CPU counters. Without the baseline, the post-upgrade argument about whether the hypergraph optimizer or the change-buffer default helped or hurt is opinion. Test on a clone with production-shaped load, keep a downgrade path inside the LTS series, and treat the Innovation track as something you can roll forward from but not back.</p>
<h2>Where MySQL 26.7 fits in a production estate</h2>
<p>MySQL 26.7 is the most substantial Innovation release since the track was introduced, and for once the interesting parts are not previews. The Community thread pool solves a concurrency problem that used to cost an Enterprise subscription or a switch to Percona Server. The Change Stream Applier is a genuinely new replication architecture, and any estate that has fought replica lag with <code>replica_parallel_workers</code> tuning should benchmark it. The MYSQL communication stack default and post-quantum TLS are both changes you can defer, but not ignore.</p>
<p>The deployment answer for most fleets is still 9.7 LTS for anything that has to stay put, with MySQL 26.7 on replicas and on quarterly-refreshed tiers where the CSA and the thread pool pay for the operational cadence. Whichever way you go, the version ladder is fixed: 8.0 to 8.4 to 9.7, adjacent only, and 8.0 is already out of patches.</p>
<p>If you want a second pair of eyes on an upgrade plan, a Change Stream Applier benchmark or a Group Replication stack migration, our <a href="https://minervadb.com/mysql-consulting/">MySQL consulting</a> and <a href="https://minervadb.com/expert-mysql-upgrades-and-migration-services/">MySQL upgrade and migration</a> teams do this work every week across Community, Enterprise and Percona builds. As always: test every change here on a non-production copy first, and keep the DR posture verified before the upgrade window, not after.</p>
<h3>References</h3>
<p><a href="https://dev.mysql.com/doc/relnotes/mysql/26.7/en/news-26-7-0.html" target="_blank" rel="noopener">MySQL 26.7.0 release notes</a> · <a href="https://dev.mysql.com/doc/relnotes/mysql/9.7/en/news-9-7-2.html" target="_blank" rel="noopener">MySQL 9.7.2 release notes</a> · <a href="https://blogs.oracle.com/mysql/mysql-july-2026-ga-releases-now-available" target="_blank" rel="noopener">Oracle: MySQL July 2026 GA releases</a> · <a href="https://blogs.oracle.com/mysql/introducing-the-change-stream-applier-csa-a-new-mysql-replication-applier-in-labs" target="_blank" rel="noopener">Oracle: Introducing the Change Stream Applier</a> · <a href="https://dev.mysql.com/doc/refman/26.7/en/thread-pool-operation.html" target="_blank" rel="noopener">Thread pool operation, MySQL 26.7 reference manual</a> · <a href="https://dev.mysql.com/doc/refman/26.7/en/group-replication-connection-security.html" target="_blank" rel="noopener">Group Replication communication stacks</a> · <a href="https://www.mysql.com/support/eol-notice.html" target="_blank" rel="noopener">MySQL end-of-life notice</a> · <a href="https://ronaldbradford.com/blog/2026-07-23-a-first-look-at-mysql-26-7-early-access/" target="_blank" rel="noopener">Ronald Bradford: a first look at MySQL 26.7 Early Access</a></p>
<p><a href="https://minervadb.com/mysql-26-7-performance-scalability-high-availability/">MySQL 26.7 and 9.7 LTS: 7 Powerful Features for Performance, Scalability and High Availability</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB R2DBC Connector 1.4.2 now available</title>
        <link>https://mariadb.com/resources/blog/mariadb-r2dbc-connector-1-4-2-now-available/</link>
        <pubDate>Wed, 02 Sep 2026 18:03:33 +0000</pubDate>
        <dc:creator>Daniel Bartholomew</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-r2dbc-connector-1-4-2-now-available/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>MariaDB is pleased to announce the immediate availability of the MariaDB Connector/R2DBC 1.4.2 GA release. Download Now Release Notes MariaDB […]</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-r2dbc-connector-1-4-2-now-available/">MariaDB R2DBC Connector 1.4.2 now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB is pleased to announce the immediate availability of the MariaDB Connector/R2DBC 1.4.2 GA release. Download Now MariaDB Connector/R2DBC 1.4.2 is a Stable (GA) release. Notable items in this release include: See the Connector/R2DBC 1.4.2 release notes page for details and visit mariadb.com/downloads/connectors/connectors-data-access/r2dbc-connector/</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-r2dbc-connector-1-4-2-now-available/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/mariadb-r2dbc-connector-1-4-2-now-available/">MariaDB R2DBC Connector 1.4.2 now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Mongorewind: Rewind Your MongoDB Test Data Without Restoring a Backup</title>
        <link>https://www.percona.com/blog/mongorewind-rewind-your-mongodb-test-data-without-restoring-a-backup/</link>
        <pubDate>Wed, 02 Sep 2026 11:38:40 +0000</pubDate>
        <dc:creator>Zelmar Michelini</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mongorewind-rewind-your-mongodb-test-data-without-restoring-a-backup/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Mongorewind: Rewind Your MongoDB Test Data Without Restoring a Backup One day, my friend Martín told me about a problem he and his team were dealing with.  Every time they needed to run a pre-production test, they had to restore a copy of the production database into their test cluster. That process alone takes about … Continued<br />
The post Mongorewind: Rewind Your MongoDB Test Data Without Restoring a Backup appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/mongorewind-rewind-your-mongodb-test-data-without-restoring-a-backup/">Mongorewind: Rewind Your MongoDB Test Data Without Restoring a Backup</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<h1><b>Mongorewind: Rewind Your MongoDB Test Data Without Restoring a Backup</b></h1>
<p><span>One day, my friend Martín told me about a problem he and his team were dealing with. </span></p>
<p><span>Every time they needed to run a pre-production test, they had to restore a copy of the production database into their test cluster. That process alone takes about three hours because of the size of the database.</span></p>
<p><span>If something went wrong during the test and they needed to run it again, they had no choice but to sit through the entire restore cycle again.</span></p>
<p><span>Three hours. Twice (or more) just to run the pre-production test.</span></p>
<p><span>That’s what motivated me to build</span><a href="https://github.com/zelmario/mongorewind"> <span>mongorewind</span></a><span>, a terminal UI tool that watches your MongoDB cluster for changes and lets you instantly undo all of them, inserts, updates, replaces, and deletes. In reverse order, without touching your backup.</span></p>
<h2><b>How It Works</b></h2>
<p><b>mongorewind</b><span> opens a cluster-wide </span><a href="https://www.mongodb.com/docs/manual/changestreams/"><span>change stream</span></a><span> and records every data-modifying operation to a local log file. When you press </span><b>R</b><span> to rewind, it applies the inverse of each recorded operation in reverse chronological order:</span></p>
<table>
<tbody>
<tr>
<td><b>Recorded operation</b></td>
<td><b>Rewind action</b></td>
</tr>
<tr>
<td><span>insert</span></td>
<td><span>deleteOne</span></td>
</tr>
<tr>
<td><span>update</span><span> / </span><span>replace</span></td>
<td><span>replaceOne</span><span> with pre-image (upsert)</span></td>
</tr>
<tr>
<td><span>delete</span></td>
<td><span>replaceOne</span><span> with pre-image (upsert)</span></td>
</tr>
</tbody>
</table>
<p><span>To undo updates and deletes correctly, mongorewind needs to know what the document looked like </span><i><span>before</span></i><span> the change. </span></p>
<p><span>It captures this automatically using MongoDB’s </span><a href="https://www.mongodb.com/docs/manual/reference/method/db.collection.watch/#change-streams-with-document-pre--and-post-images"><span>changeStreamPreAndPostImages</span></a><span> feature, which it enables on every collection it finds — and on any new collection the moment it is created.</span></p>
<p> </p>
<h2><b>Requirements</b></h2>
<ul>
<li><b>Go 1.24+ and MongoDB 6.0+</b><span> running as a replica set or sharded cluster (change streams are not available on standalone instances, can be a 1 node replica set)</span></li>
</ul>
<h2><b>Installation</b></h2>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">git clone https://github.com/zelmario/mongorewind.git
cd mongorewind
go build -o mongorewind .</pre>
<p> </p>
<p><span>Or install directly:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">go install github.com/zelmario/mongorewind@latest</pre>
<p> </p>
<h2><b>Running It</b></h2>
<p><span>Start mongorewind pointing at your cluster before running any tests:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mongorewind --uri "mongodb://host1:27017,host2:27017,host3:27017/?replicaSet=rs0"</pre>
<p><span>While mongorewind is running, you will see a terminal dashboard showing the operations it has recorded:</span></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-52694" src="https://www.percona.com/wp-content/uploads/2026/08/mongorewind1.png" alt="" width="817" height="368"></p>
<p><span>The status indicator shows </span><span>● watching</span><span> (green) while the change stream is active. When you press </span><b>R</b><span>, it switches to</span> <span>○idle</span><span> (yellow) while the rewind is in progress.</span></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-52695" src="https://www.percona.com/wp-content/uploads/2026/08/mongorewind2.png" alt="" width="809" height="370"></p>
<p> </p>
<p><span>Once the test run is complete and something went wrong, you can press </span><b>R</b><span> and mongorewind undoes every change it recorded — bringing the data back to exactly the state it was in before the test started. No restore, no waiting.</span></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-52696" src="https://www.percona.com/wp-content/uploads/2026/08/mongorewind3.png" alt="" width="778" height="221"></p>
<p> </p>
<p> </p>
<h2><b>Using It in CI Pipelines</b></h2>
<p><span>If you are running automated tests in a CI environment, mongorewind also supports a non-interactive mode. You can start the watcher in a terminal or the background and trigger rewinds from your scripts:</span></p>
<p><span>bash</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag"># Start the watcher in the background

mongorewind --uri "mongodb://..." &amp;

# Run your test suite

run_tests




# Rewind all changes and run again

mongorewind --rewind

run_tests</pre>
<p> </p>
<p><span>mongorewind –rewind</span><span> exits with code </span><span>0</span><span> on success and </span><span>1</span><span> on error, so it integrates naturally into any CI pipeline.</span></p>
<p><span>If you use a custom log path, pass the same </span><span>–log</span><span> value to both commands so they share the same socket:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mongorewind --log /tmp/mytest.log --uri "mongodb://..." &amp;

mongorewind --log /tmp/mytest.log --rewind</pre>
<p> </p>
<h2><b>A Few Things to Keep in Mind</b></h2>
<p><b>Replica set required.</b> <a href="https://www.mongodb.com/docs/manual/changeStreams/"><span>Change streams</span></a><span> need a replica set or sharded cluster. If you are working locally, you can start a single-node replica set with:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mongod --replSet rs0</pre>
<p> </p>
<p><span>And then run </span><span>rs.initiate()</span><span> in the mongo shell.</span></p>
<p><b>The log file is scoped to a session.</b><span> The file is truncated on startup and after a successful rewind, so each test session starts clean. System databases (</span><span>admin</span><span>, </span><span>local</span><span>, </span><span>config</span><span>) and </span><span>system.*</span><span> collections are ignored automatically.</span></p>
<p><b>Pre-images are enabled automatically.</b><span> mongorewind polls every 2 seconds to catch newly created collections and enables </span><span>changeStreamPreAndPostImages</span><span> on them. You don’t need to configure anything manually.</span></p>
<h2><b>Going Back to Martín’s Problem</b></h2>
<p><span>With </span><b>mongorewind</b><span>, Martín’s team does the restoration once. After that, every time a test fails and they need to start over, they just run </span><span>mongorewind –rewind</span><span>. The database goes back to its original state in seconds, and the test runs again. Three hours become just a few seconds.</span></p>
<p> </p>
<p>Contributions are welcome! Since I’m not a developer, your feedback is valuable. If you are a developer and notice any mistakes or want to enhance the script, please feel free to contribute!</p>
<p>The post <a href="https://www.percona.com/blog/mongorewind-rewind-your-mongodb-test-data-without-restoring-a-backup/">Mongorewind: Rewind Your MongoDB Test Data Without Restoring a Backup</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/mongorewind-rewind-your-mongodb-test-data-without-restoring-a-backup/">Mongorewind: Rewind Your MongoDB Test Data Without Restoring a Backup</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>On how MySQL implements JSON ARRAY indexing</title>
        <link>https://petrunia.net/2026/09/02/on-how-mysql-implements-json-array-indexing/</link>
        <pubDate>Wed, 02 Sep 2026 11:04:07 +0000</pubDate>
        <dc:creator>spetrunia2</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/on-how-mysql-implements-json-array-indexing/</guid>
        <source url="https://petrunia.net/">Sergei Petrunia’s blog</source>
        <description><![CDATA[<p>Me and Yuchen Pei have been studying how JSON ARRAY indexing is done in MySQL. The details are posted here: MDEV-40822. Yuchen has discovered cases where using ARRAY index for reads causes different query results from the same query not using the index. Looks like a bug (or maybe two). Sometimes one has to choose […]</p>
<p><a href="https://petrunia.net/2026/09/02/on-how-mysql-implements-json-array-indexing/">On how MySQL implements JSON ARRAY indexing</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p class="wp-block-paragraph">Me and <a href="https://github.com/mariadb-YuchenPei">Yuchen Pei</a> have been studying how JSON ARRAY indexing is done in MySQL. The details are posted here: <a href="https://jira.mariadb.org/browse/MDEV-40822">MDEV-40822</a>. </p>
<p class="wp-block-paragraph">Yuchen has discovered cases where using ARRAY index for reads <a href="https://jira.mariadb.org/browse/MDEV-40822#5.2Typeerasure%3Afalsepositivesandfalsenegatives">causes different query results</a> from the same query not using the index. Looks like a bug (or maybe two). Sometimes one has to choose between being compatible with MySQL and producing correct query results.</p>
<p class="wp-block-paragraph">
<p><a href="https://petrunia.net/2026/09/02/on-how-mysql-implements-json-array-indexing/">On how MySQL implements JSON ARRAY indexing</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>OpenID Connect Authentication for MySQL, Now Fully Open Source</title>
        <link>https://www.percona.com/blog/oidc-authentication-for-percona-mysql/</link>
        <pubDate>Wed, 02 Sep 2026 08:56:26 +0000</pubDate>
        <dc:creator>Michał Jankowski</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/openid-connect-authentication-for-mysql-now-fully-open-source/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Percona Server for MySQL now ships with a fully open source OpenID Connect (OIDC) authentication plugin, available starting with Percona Server for MySQL 8.4.11-11 and 9.7.2-2 (not yet released as of this writing). It allows a MySQL account to authenticate against any standards-compliant Identity Provider (IdP) instead of relying on a locally stored password, closing … Continued<br />
The post OpenID Connect Authentication for MySQL, Now Fully Open Source appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/oidc-authentication-for-percona-mysql/">OpenID Connect Authentication for MySQL, Now Fully Open Source</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Percona Server for MySQL now ships with a fully open source OpenID Connect (OIDC) authentication plugin, available starting with <strong>Percona Server for MySQL 8.4.11-11</strong> and <strong>9.7.2-2</strong> (not yet released as of this writing). It allows a MySQL account to authenticate against any standards-compliant Identity Provider (IdP) instead of relying on a locally stored password, closing the gap with MySQL Enterprise Edition, which has offered OIDC authentication since MySQL 9.1 and, in several respects, going beyond it.</p>
<p>Oracle offers the same category of functionality, but its server-side plugin is part of the paid MySQL Enterprise Edition. Percona’s implementation is open source and adds three capabilities the Enterprise plugin does not provide: automatic signing-key synchronization from a JWKS endpoint, IdP group-to-role mapping, and proxy-user support. This article explains how the plugin works and why those differences matter in practice.</p>
<h2>What OpenID Connect Brings to MySQL Authentication</h2>
<p>OpenID Connect is an identity layer built on top of the OAuth 2.0 authorization framework <a href="https://www.percona.com/blog/oidc-authentication-for-percona-mysql/#oidc">[5]</a>. Whereas OAuth 2.0 governs delegated access to resources, OIDC adds a standardized way for a client to establish who a user is. After a user signs in to an Identity Provider, the IdP issues a signed JSON Web Token (JWT), called an ID token, that carries the user’s identity and attributes in a verifiable, tamper-evident form.</p>
<p>Using that model for MySQL authentication brings several practical advantages over password-based accounts:</p>
<ul>
<li><strong>Alignment with single sign-on.</strong> Users authenticate once with their IdP and can reuse that session context across OIDC-aware applications, including databases. User lifecycle and password management remain centralized.</li>
<li><strong>No long-lived secrets on the wire.</strong> ID tokens are short-lived and cryptographically signed, so there is no static password to steal, rotate, or accidentally commit to a configuration file.</li>
<li><strong>Support for hybrid deployments.</strong> Organizations that run MySQL on-premises while hosting applications in the cloud can still authenticate through the same identity plane on both sides.</li>
<li><strong>Broad interoperability.</strong> Because OpenID Connect is a widely adopted standard, the plugin can work with any compliant provider, including Keycloak, Okta, Microsoft Entra ID, and Google Identity.</li>
</ul>
<p>None of that is unique to Percona; Oracle makes a similar value proposition for the Enterprise plugin. The real difference lies in how much operational burden the plugin removes from the administrator, which becomes clear in the next sections.</p>
<h2>How OpenID Connect Authentication Works</h2>
<p><img decoding="async" class="alignnone size-medium wp-image-52740" src="https://www.percona.com/wp-content/uploads/2026/09/percona_oidc_flow-300x146.png" alt="" width="100%"></p>
<p>Once the plugin and its configuration are in place, the authentication path is the same regardless of which IdP issued the token:</p>
<ol>
<li><strong>The user authenticates to the IdP</strong> and receives a signed ID token.</li>
<li><strong>The token is written to a local file</strong> that only the client operating system account can read.</li>
<li><strong>The MySQL client</strong> uses an option that causes the client-side OIDC plugin to load and read the token from the file. <strong>The token is sent to the server</strong> as part of the authentication handshake.</li>
<li><strong>The server validates the secure channel</strong> and decodes the token. It then <strong>verifies the token signature</strong> using the selected IdP’s public key, <strong>checks the expiration time</strong>, and <strong>validates the configured claims</strong>.</li>
<li><strong>The server resolves the final identity</strong> as either a personal account or a group-based proxy target. The plugin may also return roles mapped from the user’s group membership.</li>
</ol>
<h2>Configuring Trusted Providers and Letting the Plugin Manage the Keys</h2>
<p>Identity Providers rotate their signing keys periodically as a basic security measure. If a key is ever compromised, limiting its lifetime reduces the potential impact, and regular rotation also lowers the long-term value of any one key as a target. In practice, rotation is gradual: a new key is published and accepted before it starts signing tokens, and an old key remains valid for a period after it stops signing so that tokens already in flight can still be verified.</p>
<p>Public keys are exposed through the standard JWKS (JSON Web Key Set) endpoint, which applications can use to verify tokens issued by the IdP <a href="https://www.percona.com/blog/oidc-authentication-for-percona-mysql/#jwks">[6]</a>.</p>
<p>The Percona OpenID Connect authentication plugin can download public keys from a configured JWKS endpoint when the plugin is loaded, typically during installation and server startup, and store them in a cache. It also provides a User Defined Function (UDF) that can refresh the cache on demand or periodically through the Event Scheduler.</p>
<p>By contrast, Oracle’s counterpart plugin requires signing keys to be configured statically through the <strong>authentication_openid_connect_configuration</strong> server variable, supplied either as an inline JSON string or as a path to a JSON file. There is no retrieval or refresh from the JWKS endpoint, so keeping keys current after each rotation remains a manual task for the administrator. In the window just after a rotation, tokens signed with the previous key are still valid but cannot be verified until the configuration is updated. Percona’s plugin supports static key configuration as well, but that mode is better suited to testing or temporary setups than to production.</p>
<h3>Example</h3>
<p>Using the feature requires two simple steps. First, JWKS endpoint URL must be set in the plugin’s configuration. For example, the below configuration defines IdP named as example-keycloak (pay attention to jwks-url element):</p>
<pre class="urvanov-syntax-highlighter-plain-tag">{
  "example-keycloak": {
  "issuer-name": "https://keycloak.example.com/realms/master",
  "jwks-url": "https://keycloak.example.com/realms/master/protocol/openid-connect/certs",
  "audiences": [ "mysql-oidc" ]
  }
}</pre>
<p>The second step is ensuring the MySQL event scheduler is running and creating an event updating the keys. For example, to enable updating the keys for example-keycloak every hour run from MySQL client:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">CREATE EVENT update_oidc_keys
  ON SCHEDULE EVERY 1 HOUR
  DO SELECT update_jwks("example-keycloak");</pre>
</p>
<h2>Benefits of Using IdP Groups</h2>
<p>This is where Percona’s plugin diverges most clearly from the Enterprise implementation.</p>
<p>Groups are managed by the corporate Identity Provider and group membership may be carried by ID tokens. OIDC does not define a standard claim for that, but most IdP implementations allow adding a group claim to the tokens. The Percona’s plugin allows the administrator to configure the group claim name so that it matches the token format used by the chosen IdP.</p>
<p>There are two practical ways to take advantage of this feature:  group-to-role mapping and proxy users.</p>
<h2>Group-to-Role Mapping</h2>
<p>Membership in a group can automatically translate into MySQL roles and therefore privileges across multiple MySQL servers at the same time. On a single server, the flow looks like this:</p>
<ol>
<li>The administrator <strong>creates roles and grants them privileges</strong>.</li>
<li>The administrator defines the <strong>IdP group-to-MySQL role mapping</strong> in the plugin configuration file.</li>
<li>When the user connects, the plugin returns the roles that match the user’s groups, and the server <strong>automatically grants those roles to the user</strong>.</li>
<li>The user can activate any granted role and <strong>exercise the privileges assigned to it</strong>.</li>
</ol>
<p>Please note, that group-to-role mapping still requires an account created for each user, but automates managing user privileges.</p>
<h3>Example</h3>
<p>To create roles and grant them some privileges one may run:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">CREATE ROLE accounting;
GRANT ALL PRIVILEGES ON accounting_database.* TO accounting;
CREATE ROLE sales;
GRANT ALL PRIVILEGES ON sales_database.* TO sales;</pre>
<p>Then, to to define the mapping add to IDP configuration:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">"group-claim": "groups",
"group-role": [
  { "/accounting": "accounting" },
  { "/marketing": "marketing" }
]</pre>
<p>Any user connecting with an ID token containing claim <strong>“groups”:[“/accounting”]</strong> will be granted with role accounting and effectively obtain access to <strong>accounting_database</strong> and so on.</p>
<h2>Proxy Users</h2>
<p>The proxy capability in MySQL allows an authentication plugin to request that the connecting external user be logged in as a different MySQL user. In this model, the external identity is the <em>proxy user</em> and the mapped MySQL account is the <em>proxied user</em>. The purpose is to <strong>let multiple users share accounts with the same privilege set, avoiding the need to create a separate personal database account for every individual</strong>.</p>
<p>This feature must be supported by the authentication plugin, whose job is to choose the proxied user according to the specifics of the authentication method. In the Percona OIDC plugin, that selection is based on the group claim in the token and works as follows:</p>
<ol>
<li>The administrator <strong>creates a proxy user</strong> identified by the OIDC plugin. This can be either a single anonymous account (”@”) without a specific group name, referred to as anonymous proxying, or multiple group-related accounts, referred to as named group proxying.</li>
<li>The administrator <strong>creates proxied users for each group</strong>. These accounts should not use a login plugin, so nobody can connect to them directly. The username must match the group name.</li>
<li>The administrator <strong>grants the PROXY privilege for each proxy user</strong> on all related proxied users.</li>
<li>When a user connects, in the <strong>anonymous proxying</strong> case the plugin returns the user’s <strong>first group as the proxied username</strong>. In the <strong>named group proxying</strong> case, the plugin <strong>checks whether the user belongs to the group and returns that group</strong> as the proxied username.</li>
<li>The server verifies that the requested proxied account exists and that the proxy user has the required PROXY privilege on it. If both checks succeed, <strong>the session runs with the proxied account’s privileges</strong>.</li>
</ol>
<h2>Other Features</h2>
<p>Supported signing algorithms include RSASSA-PKCS1-v1_5, RSASSA-PSS, and ECDSA with SHA-256, SHA-384, and SHA-512 hashing functions.</p>
<p>The Percona approach uses the client-side OpenID Connect plugin from upstream MySQL, which ensures compatibility with the standard Oracle client.</p>
<p>Both client-side and server-side OpenID Connect plugins ensure that the token is sent via a secure channel. Accepted protocols are TCP protected by TLS, Unix sockets, and shared memory.</p>
<h2>What OpenID Connect Authentication Does Not Do</h2>
<p>There are some limits worth knowing.</p>
<p>The first comes from MySQL’s authentication design: any authentication plugin is used at connection time only. In the case of OIDC, the token is validated when the user connects, and a session that stays open may outlive the ID token that opened it. There is no out-of-the-box mechanism to force re-authentication after some time (except for idle connection timeout).</p>
<p>A similar situation applies to group-role mapping. The roles tied to the user’s groups in the ID token are granted or revoked at connection time. As a result, if a user is added to or removed from an IdP group, they must reconnect to Percona Server for the change to be reflected in their granted roles.</p>
<p>The proxying mechanism uses group membership claim instead of the token’s subject, so any token signed by a configured IdP that carries the required group is accepted. Group membership is your trust boundary in those modes, so treat it that way.</p>
<p>The current proxying implementation assumes the proxied user’s name matches the group name. This can be a problem when a group name isn’t a valid MySQL username (for example, it’s too long or contains disallowed characters), or when multiple groups need to map to a single account. We plan to add group-to-proxied-account mapping in future releases to address this.</p>
<p>The client-side plugin doesn’t verify the ID token (for example, check whether it has expired) before connecting, and the server doesn’t report the reason for access being denied (for security reasons). A good practice is to obtain a fresh token before connecting.</p>
<h2>Conclusion</h2>
<p>Functionally, Percona’s OpenID Connect plugin covers the same core ground as the counterpart in MySQL Enterprise Edition: signed ID tokens, claim validation, subject matching, and secure-transport enforcement.</p>
<p>It goes further in several important areas:</p>
<ul>
<li>It is open source.</li>
<li>Keys can stay current automatically through JWKS synchronization.</li>
<li>Group-to-role mapping allows IdP group membership to drive MySQL role grants for the lifetime of the session.</li>
<li>Proxy-user support allows many IdP identities to share a smaller set of MySQL accounts.</li>
</ul>
<p>Our OIDC implementation is suitable for real-world identity operations at scale. It can automatically map identities and groups managed by an IdP to database users and roles, and synchronize cryptographic keys.</p>
<h2>References</h2>
<ol>
<li><a href="https://docs.percona.com/percona-server/8.4/openid-connect-authentication.html">Percona Server for MySQL documentation: OpenID Connect authentication</a>.</li>
<li><a href="https://docs.percona.com/percona-server/8.4/quickstart-openid-connect.html">Percona Server for MySQL documentation: Get started with OpenID Connect authentication</a>.</li>
<li><a href="https://dev.mysql.com/doc/refman/9.7/en/openid-pluggable-authentication.html">MySQL 9.7 Reference Manual: OpenID Connect Pluggable Authentication</a>.</li>
<li><a href="https://dev.mysql.com/doc/refman/9.7/en/proxy-users.html">MySQL 9.7 Reference Manual: Proxy Users</a>.</li>
<li><a href="https://openid.net/foundation/how-connect-works/">OpenID Foundation: How OpenID Connect Works</a></li>
<li><a href="https://auth0.com/docs/secure/tokens/json-web-tokens/json-web-key-sets">auth0 Docs: JSON Web Key Sets</a>.</li>
</ol>
<hr>
<p><em>Written by Michal Jankowski. Reviewed by Dennis Kittrell and Oleksiy Lukin.<br />
Percona® is a registered trademark of Percona LLC. MySQL® is a registered trademark of Oracle Corporation.<br />
</em></p>
<p>The post <a href="https://www.percona.com/blog/oidc-authentication-for-percona-mysql/">OpenID Connect Authentication for MySQL, Now Fully Open Source</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/oidc-authentication-for-percona-mysql/">OpenID Connect Authentication for MySQL, Now Fully Open Source</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB/MySQL Environment MyEnv 3.0.1 has been released</title>
        <link>https://www.fromdual.com/blog/myenv-release-notes/fromdual-environment-myenv-3.0.1-has-been-released/</link>
        <pubDate>Wed, 02 Sep 2026 07:51:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-mysql-environment-myenv-3-0-1-has-been-released/</guid>
        <source url="https://www.fromdual.com/blog/shinguz/">FromDual GmbH</source>
        <description><![CDATA[<p>FromDual has the pleasure to announce the release of the new version 3.0.1 of its popular MariaDB, MySQL and PostgreSQL multi-instance environment MyEnv.<br />
The new MyEnv can be downloaded here. How to install MyEnv is described in the MyEnv Installation Guide.<br />
In the inconceivable case that you find a bug in the MyEnv please report it to our public repository on Codeberg.<br />
Any feedback, statements and testimonials are welcome as well! Please send them to us.<br />
Upgrade from 2.x to 3.0<br />
Please check the MyEnv Installation Guide: Upgrading MyEnv.<br />
In MyEnv v3.0.1 tpl/aliases.conf.template has changed. Thus you should replace the MyEnv aliases.conf as follows:<br />
$ cp /etc/myenv/aliases.conf /etc/myenv/aliases.conf.$(date '+%Y-%m-%d')<br />
$ cp myenv/tpl/aliases.conf.template /etc/myenv/aliases.conf<br />
Changes in MyEnv 3.0.1<br />
MyEnv</p>
<p>Bug in setMyEnv.php fixed, socket was not set correctly.<br />
Some more aliases added for log tracking.<br />
Prompt port was always delayed by one switch, fixed.<br />
Missing port in PS1 prompt fixed again (issues/12).<br />
up/down for PostgreSQL should work correctly now.<br />
PostgreSQL should be evaluated correctly now in up.<br />
up should show PostgreSQL status correctly now (issues/4).<br />
Environment variables refactored and PostgreSQL specific variables added (issues/3).<br />
Discrepancies between my.cnf and myenv.conf leads now to abort if relevant configuration variables are affected (issues/5).<br />
Database seems OK after start which is wrong, timing issue (issues/2).<br />
hideschema works better now (issues/13).</p>
<p>MyEnv Installer</p>
<p>Wrong default for socket fixed in installer.<br />
Nasty error message when installing PostgreSQL suppressed.<br />
basedir filter implemented.<br />
Instance type mariadb was added to MyEnv installer (issues/10).<br />
MySQL 26.7 is recognized correctly now (issues/1).</p>
<p>MyEnv Utilities</p>
<p>insert_test.sh made more PostgreSQL friendly.<br />
test table commands made more comfortable for PostgreSQL.</p>
<p>PostgreSQL</p>
<p>See MyEnv, MyEnv Installer and MyEnv Utilities.</p>
<p>General</p>
<p>Cosmetic fixes.<br />
Some bugs and feature requests moved from TODO to …</p>
<p><a href="https://www.fromdual.com/blog/myenv-release-notes/fromdual-environment-myenv-3.0.1-has-been-released/">MariaDB/MySQL Environment MyEnv 3.0.1 has been released</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>FromDual has the pleasure to announce the release of the new version 3.0.1 of its popular MariaDB, MySQL and PostgreSQL multi-instance environment <a href="https://www.fromdual.com/software/fromdual-myenv/" title="MariaDB, MySQL and PostgreSQL multi-instance environment">MyEnv</a>.</p>
<p>The new MyEnv can be downloaded <a href="https://support.fromdual.com/admin/public/download.php?operation=select&amp;product_id=5" target="_blank" title="FromDual download">here</a>. How to install MyEnv is described in the <a href="https://support.fromdual.com/documentation/myenv/myenv.html#installation-guide" target="_blank">MyEnv Installation Guide</a>.</p>
<p>In the inconceivable case that you find a bug in the MyEnv please report it to our public repository on <a href="https://codeberg.org/FromDual/MyEnv/issues" target="_blank" title="FromDual / MyEnv">Codeberg</a>.</p>
<p>Any feedback, statements and testimonials are welcome as well! Please <a href="mailto:feedback@fromdual.com?Subject=Feedback%20for%20myenv">send them to us</a>.</p>
<h2>Upgrade from 2.x to 3.0</h2>
<p>Please check the MyEnv Installation Guide: <a href="https://support.fromdual.com/documentation/myenv/myenv.html#upgrade" target="_blank">Upgrading MyEnv</a>.</p>
<p>In MyEnv v3.0.1 <code>tpl/aliases.conf.template</code> has changed. Thus you should replace the MyEnv <code>aliases.conf</code> as follows:</p>
<pre><code>$ cp /etc/myenv/aliases.conf /etc/myenv/aliases.conf.$(date '+%Y-%m-%d')
$ cp myenv/tpl/aliases.conf.template /etc/myenv/aliases.conf
</code></pre>
<h2>Changes in MyEnv 3.0.1</h2>
<h3>MyEnv</h3>
<ul>
<li>Bug in <code>setMyEnv.php</code> fixed, socket was not set correctly.</li>
<li>Some more aliases added for log tracking.</li>
<li>Prompt port was always delayed by one switch, fixed.</li>
<li>Missing port in <code>PS1</code> prompt fixed again (<a href="https://codeberg.org/FromDual/MyEnv/issues/12" target="_blank">issues/12</a>).</li>
<li><code>up</code>/<code>down</code> for PostgreSQL should work correctly now.</li>
<li>PostgreSQL should be evaluated correctly now in <code>up</code>.</li>
<li><code>up</code> should show PostgreSQL status correctly now (<a href="https://codeberg.org/FromDual/MyEnv/issues/4" target="_blank">issues/4</a>).</li>
<li>Environment variables refactored and PostgreSQL specific variables added (<a href="https://codeberg.org/FromDual/MyEnv/issues/3" target="_blank">issues/3</a>).</li>
<li>Discrepancies between <code>my.cnf</code> and <code>myenv.conf</code> leads now to abort if relevant configuration variables are affected (<a href="https://codeberg.org/FromDual/MyEnv/issues/5" target="_blank">issues/5</a>).</li>
<li>Database seems OK after start which is wrong, timing issue (<a href="https://codeberg.org/FromDual/MyEnv/issues/2" target="_blank">issues/2</a>).</li>
<li><code>hideschema</code> works better now (<a href="https://codeberg.org/FromDual/MyEnv/issues/13" target="_blank">issues/13</a>).</li>
</ul>
<h3>MyEnv Installer</h3>
<ul>
<li>Wrong default for socket fixed in installer.</li>
<li>Nasty error message when installing PostgreSQL suppressed.</li>
<li><code>basedir</code> filter implemented.</li>
<li>Instance <code>type</code> <code>mariadb</code> was added to MyEnv installer (<a href="https://codeberg.org/FromDual/MyEnv/issues/10" target="_blank">issues/10</a>).</li>
<li>MySQL 26.7 is recognized correctly now (<a href="https://codeberg.org/FromDual/MyEnv/issues/1" target="_blank">issues/1</a>).</li>
</ul>
<h3>MyEnv Utilities</h3>
<ul>
<li><code>insert_test.sh</code> made more PostgreSQL friendly.</li>
<li><code>test</code> table commands made more comfortable for PostgreSQL.</li>
</ul>
<h3>PostgreSQL</h3>
<ul>
<li>See <a href="https://www.fromdual.com/blog/myenv-release-notes/fromdual-environment-myenv-3.0.1-has-been-released/#myenv">MyEnv</a>, <a href="https://www.fromdual.com/blog/myenv-release-notes/fromdual-environment-myenv-3.0.1-has-been-released/#myenv-installer">MyEnv Installer</a> and <a href="https://www.fromdual.com/blog/myenv-release-notes/fromdual-environment-myenv-3.0.1-has-been-released/#myenv-utilities">MyEnv Utilities</a>.</li>
</ul>
<h3>General</h3>
<ul>
<li>Cosmetic fixes.</li>
<li>Some bugs and feature requests moved from <code>TODO</code> to …</li>
</ul>
<p><a href="https://www.fromdual.com/blog/myenv-release-notes/fromdual-environment-myenv-3.0.1-has-been-released/">MariaDB/MySQL Environment MyEnv 3.0.1 has been released</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB 12.3 InnoDB-Accelerated Binary Logging: Delivering 1.50x Higher Throughput</title>
        <link>https://mariadb.com/resources/blog/mariadb-12-3-innodb-accelerated-binary-logging-delivering-1-50x-higher-throughput/</link>
        <pubDate>Tue, 01 Sep 2026 18:12:29 +0000</pubDate>
        <dc:creator>Rahul Raj</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-12-3-innodb-accelerated-binary-logging-delivering-1-50x-higher-throughput/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>What Is the MariaDB Binary Log Bottleneck and How Does InnoDB-Based Logging Solve It? In modern high-performance database infrastructure, the […]</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-12-3-innodb-accelerated-binary-logging-delivering-1-50x-higher-throughput/">MariaDB 12.3 InnoDB-Accelerated Binary Logging: Delivering 1.50x Higher Throughput</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>In modern high-performance database infrastructure, the binary log (Binlog) is both a lifesaver and a well-known architectural bottleneck. While critical for replication, point-in-time recovery, and data auditing, writing sequentially to transactional logs and simultaneously managing the global MariaDB Binlog introduces massive locking and synchronization overhead. With the release of MariaDB…</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-12-3-innodb-accelerated-binary-logging-delivering-1-50x-higher-throughput/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/mariadb-12-3-innodb-accelerated-binary-logging-delivering-1-50x-higher-throughput/">MariaDB 12.3 InnoDB-Accelerated Binary Logging: Delivering 1.50x Higher Throughput</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Foundation Newsletter – September 2026</title>
        <link>https://mariadb.org/mariadb-foundation-newsletter-september-2026/</link>
        <pubDate>Tue, 01 Sep 2026 11:30:29 +0000</pubDate>
        <dc:creator>Simona Aleksandrova</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-foundation-newsletter-september-2026/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>August belonged to transparency: MariaDB published its governance framework, and the first contribution statistics report in over a year put numbers on who actually builds the server. …<br />
Continue reading "MariaDB Foundation Newsletter – September 2026"<br />
MariaDB Foundation Newsletter – September 2026 appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/mariadb-foundation-newsletter-september-2026/">MariaDB Foundation Newsletter – September 2026</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>August belonged to transparency: MariaDB published its governance framework, and the first contribution statistics report in over a year put numbers on who actually builds the server. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/mariadb-foundation-newsletter-september-2026/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;MariaDB Foundation Newsletter – September 2026&#8221;</span></a></p>
<p><a href="https://mariadb.org/mariadb-foundation-newsletter-september-2026/">MariaDB Foundation Newsletter – September 2026</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/mariadb-foundation-newsletter-september-2026/">MariaDB Foundation Newsletter – September 2026</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Rotating Expiring X.509 Certificates in Percona Server for MongoDB with Minimal Service Interruption</title>
        <link>https://www.percona.com/blog/rotating-expiring-x-509-certificates-in-percona-server-for-mongodb-with-minimal-service-interruption/</link>
        <pubDate>Mon, 31 Aug 2026 11:48:11 +0000</pubDate>
        <dc:creator>Ivan Groenewold</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/rotating-expiring-x-509-certificates-in-percona-server-for-mongodb-with-minimal-service-interruption/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Expired TLS certificates can prevent new client connections and, when X.509 is used for Percona Server for MongoDB internal authentication, also prevent members of a replica set or sharded cluster from authenticating to one another. In this post we will discuss performing a same-CA renewal: replacement certificates for server, member, and client leaf are issued … Continued<br />
The post Rotating Expiring X.509 Certificates in Percona Server for MongoDB with Minimal Service Interruption appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/rotating-expiring-x-509-certificates-in-percona-server-for-mongodb-with-minimal-service-interruption/">Rotating Expiring X.509 Certificates in Percona Server for MongoDB with Minimal Service Interruption</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Expired TLS certificates can prevent new client connections and, when X.509 is used for <a href="https://www.percona.com/mongodb/software/">Percona Server for MongoDB</a> internal authentication, also prevent members of a replica set or sharded cluster from authenticating to one another.</p>
<p>In this post we will discuss performing a <b>same-CA renewal</b>: replacement certificates for server, member, and client leaf are issued by the existing trusted CA, and the X.509 attributes used for cluster membership do not change. In this scenario, the rotateCertificates command reloads TLS material for new connections without restarting mongod or mongos.</p>
<p><b>Important:</b> Do not apply this hot-reload procedure when replacing the issuing CA, changing a certificate subject DN, or changing cluster-membership attributes. Those are not ordinary renewals.</p>
<h3><b>What rotates, and what does not</b></h3>
<p>Percona Server for MongoDB can reload the files configured through the following TLS options:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">net:
  tls:
    mode: requireTLS
    certificateKeyFile: /etc/mongod/tls/server.pem
    CAFile: /etc/mongod/tls/ca.pem
    clusterFile: /etc/mongod/tls/cluster.pem</pre>
<p>The certificateKeyFile contains the certificate and private key presented to normal clients. The clusterFile holds the certificate and key that a mongod or mongos process presents when connecting to other cluster members. If clusterFile is not configured, certificateKeyFile is also used for member authentication.</p>
<p>The rotateCertificates command affects <b>new TLS connections</b>. It does not terminate established client sessions or force a replica-set election.</p>
<h3><b>Before the maintenance window</b></h3>
<p>Begin this process well in advance of the certificate expiry, and avoid performing your first attempt in a production environment.</p>
<ol>
<li>Inventory every process and client certificates. Include all mongod members, all mongos routers, application drivers, mongosh hosts, backup jobs, monitoring, and automation tools.</li>
<li>Confirm this is a same-CA renewal. The issuer chain trusted by every participant stays the same, and the O, OU, and DC attributes used for default internal X.509 membership matching remain unchanged.</li>
<li>Create a new PEM file for every server and client that needs rotation. A PEM file referenced by certificateKeyFile or clusterFile must include both the certificate and its matching private key. The file must strictly contain the key first, followed by the certificate, including their encapsulation boundaries.</li>
<li>Verify the new certificate details and validate the cert against the CA before copying to the production TLS directory</li>
</ol>
<p><b>Stage a renewed server or member certificate</b></p>
<p>There are a few limitations for rotating certificates online:</p>
<ul>
<li>Each new certificate must have the same filename and same filepath as the certificate it is replacing.</li>
<li>If the TLS Certificate is password-protected, its password must be the same as the old certificate it is replacing.</li>
</ul>
<p>If CAFile, a CRL, or another configured TLS input is being renewed as part of the same operation, replace it before invoking the reload command. The command reloads the configured TLS inputs as a set; a missing or invalid input causes the reload to fail.</p>
<p>Luckily, incorrect certificate files will cause the rotation to fail, but will not invalidate the existing configuration or have any other side effects.</p>
<h3><b>Reload one process</b></h3>
<p>Connect directly to the specific mongod or mongos with an administrative user and execute the following command:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">db.getSiblingDB("admin").runCommand({rotateCertificates: 1, message: "Renewed TLS certificate"})'</pre>
<p>Immediately validate a <b>new</b> TLS connection to that process with a renewed client certificate. Also inspect the log for the successful certificate-rotation message and any TLS errors. Check our <a href="https://docs.percona.com/percona-server-for-mongodb/8.3/index.html">documentation</a> for guidelines to perform the procedure on a replica set or sharded cluster.</p>
<h3><b>Final validation and cleanup</b></h3>
<p>After completing the procedure, it is a good idea to reconfirm the expiry date and SANs of the certificate presented by every mongod and mongos. Retain the old certificates only for the approved overlap period, then remove or revoke them. Don’t forget to record the new expiry dates and create alerts with enough lead time before the expiration date of the new certificates.</p>
<h3><b>When the CA or member identity changes</b></h3>
<p>A different procedure is required when any of the following changes:</p>
<ul>
<li>The issuing CA or trusted CA chain.</li>
<li>The subject DN used by a MONGODB-X509 client user.</li>
<li>The O, OU, or DC values used for default intra-cluster X.509 membership matching.</li>
<li>net.tls.clusterAuthX509.attributes or net.tls.clusterAuthX509.extensionValue.</li>
</ul>
<p>This is a topic for another time.</p>
<p> </p>
<p>The post <a href="https://www.percona.com/blog/rotating-expiring-x-509-certificates-in-percona-server-for-mongodb-with-minimal-service-interruption/">Rotating Expiring X.509 Certificates in Percona Server for MongoDB with Minimal Service Interruption</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/rotating-expiring-x-509-certificates-in-percona-server-for-mongodb-with-minimal-service-interruption/">Rotating Expiring X.509 Certificates in Percona Server for MongoDB with Minimal Service Interruption</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB at Percona Live Amsterdam 2026: Ecosystem, Plugins, Security, and Community</title>
        <link>https://mariadb.org/mariadb-at-percona-live-amsterdam-2026-ecosystem-plugins-security-and-community/</link>
        <pubDate>Mon, 31 Aug 2026 10:21:33 +0000</pubDate>
        <dc:creator>Frédéric Descamps</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-at-percona-live-amsterdam-2026-ecosystem-plugins-security-and-community/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB is heading to Percona Live Amsterdam 2026! Join us for sessions on server plugins, protocol security and ecosystem building, hear independent MariaDB experiences, meet Percona's new General Manager for MariaDB, and visit the MariaDB booth for demos and discussions with our engineers.<br />
MariaDB at Percona Live Amsterdam 2026: Ecosystem, Plugins, Security, and Community appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/mariadb-at-percona-live-amsterdam-2026-ecosystem-plugins-security-and-community/">MariaDB at Percona Live Amsterdam 2026: Ecosystem, Plugins, Security, and Community</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB is heading to Percona Live Amsterdam 2026! Join us for sessions on server plugins, protocol security and ecosystem building, hear independent MariaDB experiences, meet Percona&#8217;s new General Manager for MariaDB, and visit the MariaDB booth for demos and discussions with our engineers.</p>
<p><a href="https://mariadb.org/mariadb-at-percona-live-amsterdam-2026-ecosystem-plugins-security-and-community/">MariaDB at Percona Live Amsterdam 2026: Ecosystem, Plugins, Security, and Community</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/mariadb-at-percona-live-amsterdam-2026-ecosystem-plugins-security-and-community/">MariaDB at Percona Live Amsterdam 2026: Ecosystem, Plugins, Security, and Community</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Building Useful Community Software with MongoDB Using AI Agents</title>
        <link>https://percona.community/blog/2026/08/31/community-leaderboard/</link>
        <pubDate>Mon, 31 Aug 2026 08:16:04 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/building-useful-community-software-with-mongodb-using-ai-agents/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>When activity spreads across GitHub, the forum, and content, real contribution is easy to lose in the noise. A community program only works when people trust the numbers behind the thank-you, so the leaderboard has to be accurate and explainable. For our Community Leaderboard we built scheduled indexers for those sources, Percona Server for MongoDB (PSMDB) as a flexible store for messy multi-source data, private dashboards to verify staff vs community and identity maps, and a daily JSON feed that powers a static Hugo widget. AI agents took care of much of the boilerplate: API clients, first-pass field mappings, early widget prototypes. That let us spend the week on rules, trust, and the public experience. The same pattern should transfer if you run a community or like database-shaped side projects.</p>
<p><a href="https://percona.community/blog/2026/08/31/community-leaderboard/">Building Useful Community Software with MongoDB Using AI Agents</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>When activity spreads across GitHub, the forum, and content, real contribution is easy to lose in the noise. A community program only works when people trust the numbers behind the thank-you, so the leaderboard has to be accurate and explainable. For our <a href="https://percona.community/ascent/leaderboard/" target="_blank" rel="noopener noreferrer">Community Leaderboard</a> we built scheduled indexers for those sources, <a href="https://docs.percona.com/percona-server-for-mongodb/8.0/index.html" target="_blank" rel="noopener noreferrer">Percona Server for MongoDB</a> (PSMDB) as a flexible store for messy multi-source data, private dashboards to verify staff vs community and identity maps, and a daily JSON feed that powers a static Hugo widget. <strong>AI agents</strong> took care of much of the boilerplate: API clients, first-pass field mappings, early widget prototypes. That let us spend the week on rules, trust, and the public experience. The same pattern should transfer if you run a community or like database-shaped side projects.</p>
<p>In July our community lead <strong>Laura Czajkowski</strong> published <a href="https://percona.community/blog/2026/07/16/introducing-mountaineers/">Introducing Mountaineers: A Way to Say Thank You</a>. That program is why we built the board. Laura wanted contribution to stop disappearing into noise: the bug filed late at night, the forum thread that sat unanswered, the PR, the hour telling engineering what’s broken. Mountaineers tracks that energy and gives something back: recognition, access, swag. Points, Basecamp, and the reward ladder are in her post and on the <a href="https://percona.community/ascent/mountaineers/" target="_blank" rel="noopener noreferrer">Mountaineers</a> page. The leaderboard is the public face; my job was to make the numbers trustworthy enough for that program to work.</p>
<p><figure><img decoding="async" width="2816" height="2816" src="https://percona.community/blog/2026/08/leaderboard-widget_hu_4400601fb99204a.webp" alt="Community Leaderboard widget for 2026, period picker open" loading="lazy"></figure>
</p>
<h2>Why the board exists</h2>
<p>Laura’s “what counts” list is what the board has to measure. It isn’t only code. GitHub issues, PRs, and merges count. Forum topics, replies, and accepted solutions count. Blog posts and tutorials count, including work through the <a href="https://percona.community/blog/2026/05/22/write-for-percona-community/">Community Writers Program</a>. Direct feedback to engineering counts too. Show up in more than one place in the same month and the climb goes faster. The public <a href="https://percona.community/ascent/leaderboard/" target="_blank" rel="noopener noreferrer">leaderboard</a> is how that becomes visible outside the team.</p>
<p>A board only helps if the community trusts it. That’s where the engineering problem starts. The store holds <strong>600+ Percona GitHub repositories</strong>; in <strong>2026</strong> staff alone were active in <strong>100+</strong> of them (<strong>~150</strong> employee contributors). Staff and community work in the same channels &#8211; GitHub and the forum &#8211; so without filters you cannot tell whose work you’re looking at. Separating community PRs from staff PRs, and spotting forum questions from community members that still have no answer, isn’t something you do by scrolling notifications. You need a place where that signal is collected, filtered, and easy to inspect.</p>
<p>That’s what the internal dashboards are for. They aren’t the public site. They’re how the community team finds the work worth recognizing and the threads that still need a human.</p>
<p>In <strong>2026</strong> so far community activity is already substantial. On GitHub: <strong>~750 pull requests and issues</strong> from <strong>270+ contributors</strong>, including <strong>~80 merged PRs</strong>. On the forum: <strong>~290 active community users</strong>, <strong>~400 active topics</strong>, and <strong>~900 community posts</strong>. The public board for that year already has <strong>498</strong> people on it (<strong>257</strong> GitHub, <strong>240</strong> forum, <strong>5</strong> content). Staff also post heavily in the same places, which is why the dashboards filter staff vs community before anything is scored for Mountaineers. Without that step, employee noise would bury the people the program exists to thank.</p>
<p>To turn that activity into a comparable ranking, we use a simple, fixed set of weights:</p>
<table>
<thead>
<tr>
<th>GitHub</th>
<th>Content</th>
<th>Forum</th>
</tr>
</thead>
<tbody>
<tr>
<td>Issue submitted · <strong>10</strong></td>
<td>Community blog post · <strong>100</strong></td>
<td>Topic created · <strong>5</strong></td>
</tr>
<tr>
<td>PR created · <strong>25</strong></td>
<td>YouTube video · <strong>75</strong></td>
<td>Reply · <strong>2</strong></td>
</tr>
<tr>
<td>PR merged · <strong>75</strong></td>
<td>External article · <strong>50</strong></td>
<td>Solution provided · <strong>50</strong></td>
</tr>
</tbody>
</table>
<p>Content is still thin on the board. We only recently launched the <a href="https://percona.community/blog/2026/05/22/write-for-percona-community/">Community Writers Program</a>, so most climbing today is GitHub and forum. That will change as more posts land.</p>
<p><figure><img decoding="async" width="2502" height="1578" src="https://percona.community/blog/2026/08/leaderboard-dashboard-leaderboard_hu_5a56a6b201043b66.webp" alt="Internal leaderboard: Show Community, Global tab, 498 contributors for 2026" loading="lazy"></figure>
</p>
<p>Those numbers and weights are the <em>why</em>. The rest of the post is the <em>how</em>: private dashboards, a public JSON feed, PSMDB, and a recipe you can reuse.</p>
<h2>Private dashboards, public site</h2>
<p>The architecture is a bit unusual on purpose. The dashboards live in our private corporate cloud. They talk to APIs, write to PSMDB, and show rich views for staff. The <a href="https://percona.community/" target="_blank" rel="noopener noreferrer">community website</a> is a static <strong>Hugo</strong> site on <strong>GitHub Pages</strong>. It has no backend and no path into that cloud.</p>
<p>So we needed a bridge that doesn’t couple the two. Once a day the leaderboard job scores the periods we care about (month, quarter, year), writes community-only JSON, and publishes it to a public GitHub repository: <a href="https://github.com/percona/community-leaderboard/tree/widget" target="_blank" rel="noopener noreferrer">percona/community-leaderboard</a>. The Hugo page embeds a JS widget that fetches those files from raw GitHub URLs. No VPN. No private API. If the internal app is offline for maintenance, the last published feed still works.</p>
<p>We call that lifehack <strong>GitHub as a database</strong>. It’s a boring, cacheable public artifact. An object store would work the same way. For a static site, a daily JSON dump is often simpler and safer than exposing your analytics database.</p>
<p>The application breaks into a few components. Data sources are polled by indexer jobs and land in PSMDB. The same database feeds internal dashboards (explore, filter staff vs community) and a leaderboard component that builds period reports and publishes JSON to GitHub. The community site only talks to that public feed.</p>
<pre class="mermaid">
flowchart TB
subgraph sources["Data sources"]
GH["GitHub"]
Forum["Forum"]
Content["Blog / content"]
end
subgraph private["Private app · corporate cloud"]
Idx["Indexer jobs"]
Mongo[("PSMDB")]
Dash["Dashboards"]
LB["Leaderboard component"]
end
subgraph public["Public"]
Feed["JSON on GitHub"]
Site["Community site · Hugo widget"]
end
GH --&gt; Idx
Forum --&gt; Idx
Content --&gt; Idx
Idx --&gt;|"index · upsert"| Mongo
Mongo --&gt;|"read · filter · charts"| Dash
Mongo --&gt;|"score · export"| LB
LB --&gt;|"publish rankings"| Feed
Feed --&gt;|"fetch JSON"| Site
style Mongo fill:#e8f5e9
style Feed fill:#fff8e1
style Site fill:#e1f5ff
style private fill:#f9f7ff
</pre>
<p>Indexers and the leaderboard component run on a schedule (cron). The diagram above is the data path; the schedule is just when each box wakes up.</p>
<p>On the site, the widget is more than a dumped table. You can switch periods and categories (global, GitHub, forum), open a person and see how they scored, and browse leaders without leaving Hugo. The layout had to feel like part of Community Ascent, not like an admin export pasted into a page. There is also a <a href="https://percona.community/ascent/summit/" target="_blank" rel="noopener noreferrer">Global Summit</a> view (top 10 on a mountain) for the people who climb furthest.</p>
<p><figure><img decoding="async" width="2688" height="1672" src="https://percona.community/blog/2026/08/leaderboard-widget-popup-details_hu_6479b1ad7447ef4d.webp" alt="Contributor detail popup: points by source, PRs, and forum topics" loading="lazy"></figure>
</p>
<p><figure><img decoding="async" width="2082" height="1484" src="https://percona.community/blog/2026/08/leaderboard-widget-global-summit_hu_f59c7d16527a7479.webp" alt="Global Summit: top 10 worldwide on the mountain" loading="lazy"></figure>
</p>
<h2>Public feed: JSON the widget reads</h2>
<p>The Hugo widget does not guess rankings. It loads plain JSON from the public repo. On first paint it fetches <code>meta.json</code> for available periods and categories, then <code>{category}/{period}.json</code> for the table (for example <code>global/2026.json</code>). When you open someone in the modal, it loads <code>users/{period}/{user_key}.json</code> for the breakdown.</p>
<p>The layout is simple:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">meta.json
</span></span><span class="line"><span class="cl">global/{period}.json
</span></span><span class="line"><span class="cl">github/{period}.json
</span></span><span class="line"><span class="cl">forum/{period}.json
</span></span><span class="line"><span class="cl">users/{period}/{user_key}.json</span></span></code></pre>
</div>
</div>
</div>
<p><code>meta.json</code> is the index. The widget uses it to build the period picker:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">json</span><button class="code-block__copy" type="button" data-copy-target="codeblock-2" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"generated_at"</span><span class="p">:</span> <span class="s2">"2026-08-31T04:11:39+00:00"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"default_period"</span><span class="p">:</span> <span class="s2">"2026"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"periods"</span><span class="p">:</span> <span class="p">[</span>
</span></span><span class="line"><span class="cl"> <span class="p">{</span> <span class="nt">"key"</span><span class="p">:</span> <span class="s2">"2026"</span><span class="p">,</span> <span class="nt">"label"</span><span class="p">:</span> <span class="s2">"2026"</span><span class="p">,</span> <span class="nt">"type"</span><span class="p">:</span> <span class="s2">"year"</span> <span class="p">},</span>
</span></span><span class="line"><span class="cl"> <span class="p">{</span> <span class="nt">"key"</span><span class="p">:</span> <span class="s2">"2026-Q3"</span><span class="p">,</span> <span class="nt">"label"</span><span class="p">:</span> <span class="s2">"Q3 2026"</span><span class="p">,</span> <span class="nt">"type"</span><span class="p">:</span> <span class="s2">"quarter"</span> <span class="p">},</span>
</span></span><span class="line"><span class="cl"> <span class="p">{</span> <span class="nt">"key"</span><span class="p">:</span> <span class="s2">"2026-08"</span><span class="p">,</span> <span class="nt">"label"</span><span class="p">:</span> <span class="s2">"August 2026"</span><span class="p">,</span> <span class="nt">"type"</span><span class="p">:</span> <span class="s2">"month"</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl"> <span class="p">],</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"categories"</span><span class="p">:</span> <span class="p">[</span><span class="s2">"global"</span><span class="p">,</span> <span class="s2">"github"</span><span class="p">,</span> <span class="s2">"content"</span><span class="p">,</span> <span class="s2">"forum"</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre>
</div>
</div>
</div>
<p>Each ranking file is one period and one category. The table reads <code>top30</code>:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">json</span><button class="code-block__copy" type="button" data-copy-target="codeblock-3" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"period"</span><span class="p">:</span> <span class="s2">"2026"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"period_type"</span><span class="p">:</span> <span class="s2">"year"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"period_label"</span><span class="p">:</span> <span class="s2">"2026"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"category"</span><span class="p">:</span> <span class="s2">"global"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"top30"</span><span class="p">:</span> <span class="p">[</span>
</span></span><span class="line"><span class="cl"> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"rank"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"user_key"</span><span class="p">:</span> <span class="s2">"gh-example"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"display_name"</span><span class="p">:</span> <span class="s2">"Alex Contributor"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"avatar_url"</span><span class="p">:</span> <span class="s2">"https://avatars.githubusercontent.com/u/12345?v=4"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"github_login"</span><span class="p">:</span> <span class="s2">"alex-contrib"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"forum_username"</span><span class="p">:</span> <span class="kc">null</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"points_total"</span><span class="p">:</span> <span class="mi">595</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"points_github"</span><span class="p">:</span> <span class="mi">500</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"points_forum"</span><span class="p">:</span> <span class="mi">95</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"issues_created"</span><span class="p">:</span> <span class="mi">2</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"prs_created"</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"prs_merged"</span><span class="p">:</span> <span class="mi">6</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"topics_created"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"replies"</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"solutions"</span><span class="p">:</span> <span class="mi">1</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"> <span class="p">]</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre>
</div>
</div>
</div>
<p>The per-user file adds contribution lists for the detail view:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">json</span><button class="code-block__copy" type="button" data-copy-target="codeblock-4" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"user_key"</span><span class="p">:</span> <span class="s2">"gh-example"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"display_name"</span><span class="p">:</span> <span class="s2">"Alex Contributor"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"period"</span><span class="p">:</span> <span class="s2">"2026"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"points_total"</span><span class="p">:</span> <span class="mi">595</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"github_prs"</span><span class="p">:</span> <span class="p">[</span>
</span></span><span class="line"><span class="cl"> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"title"</span><span class="p">:</span> <span class="s2">"Fix replication lag in operator"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"url"</span><span class="p">:</span> <span class="s2">"https://github.com/percona/example/pull/42"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"repo"</span><span class="p">:</span> <span class="s2">"percona/example"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"date"</span><span class="p">:</span> <span class="s2">"2026-07-10"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"merged"</span><span class="p">:</span> <span class="kc">true</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"> <span class="p">],</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"forum_replies"</span><span class="p">:</span> <span class="p">[</span>
</span></span><span class="line"><span class="cl"> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"title"</span><span class="p">:</span> <span class="s2">"Slow queries after upgrade"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"url"</span><span class="p">:</span> <span class="s2">"https://forums.percona.com/t/example/12345"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">"date"</span><span class="p">:</span> <span class="s2">"2026-06-15"</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"> <span class="p">]</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre>
</div>
</div>
</div>
<p>That is all the static site needs. Live files are in <a href="https://github.com/percona/community-leaderboard/tree/widget" target="_blank" rel="noopener noreferrer">percona/community-leaderboard</a>; the widget base URL is set in the Hugo layout (<code>window.LB_BASE</code>).</p>
<h2>What runs every day</h2>
<p>Scheduled indexer jobs poll the APIs we care about, one family of sources each, and upsert documents into PSMDB. Another scheduled job builds the rankings and pushes the public feed. The web UI is how we see the store: date ranges, charts, activity tables, and a leaderboard toggle for community, staff, or all. Staff numbers matter internally. Who answered on the forum this week? Which PRs came from outside? Which community questions are still waiting? The public Mountaineers board stays community-only. Same data, different filter.</p>
<p>One person is often three strings in the data. GitHub login, forum username, and a blog byline under a real name rarely match. Without linking, the same Mountaineer shows up as three rows and their points never add up. <strong>Identity mapping</strong> is how we stitch that together. You can link accounts by hand in the dashboard. When a display name or handle lines up across sources, the UI also proposes a merge for approval. That is semi-automatic, not a silent auto-join. Only confirmed maps feed the public ranking.</p>
<p>We develop against <a href="https://docs.percona.com/percona-server-for-mongodb/8.0/index.html" target="_blank" rel="noopener noreferrer">Percona Server for MongoDB</a> in Docker locally. Same engine shape in production. I run <code>docker compose up</code>, connect from the app, and start indexing. For browsing collections I use <strong>MongoDB Compass</strong> on <code>localhost:27018</code> (or whatever port you map). It is the fastest way to check that indexers wrote what you expect before you trust a public export.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">yaml</span><button class="code-block__copy" type="button" data-copy-target="codeblock-5" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">services</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">psmdb</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l">percona/percona-server-mongodb:8.0</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">volumes</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">./data:/data/db</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">environment</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">MONGO_INITDB_ROOT_USERNAME</span><span class="p">:</span><span class="w"> </span><span class="l">root</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">MONGO_INITDB_ROOT_PASSWORD</span><span class="p">:</span><span class="w"> </span><span class="l">changeme</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">MONGO_INITDB_DATABASE</span><span class="p">:</span><span class="w"> </span><span class="l">dashboard</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">ports</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="s2">"27018:27017"</span></span></span></code></pre>
</div>
</div>
</div>
<p>Pick the image tag for your CPU (<code>8.0-arm64</code> on Apple Silicon, <code>8.0</code> / amd64 elsewhere). No cloud dependency just to try an idea.</p>
<h2>MongoDB as the use case</h2>
<p>If you like databases, this is the interesting middle of the story. We run <a href="https://docs.percona.com/percona-server-for-mongodb/8.0/index.html" target="_blank" rel="noopener noreferrer">Percona Server for MongoDB</a> (PSMDB), but the fit is the document model. Community activity arrives as heterogeneous JSON. Issues, pull requests, forum posts, user profiles, and blog metadata don’t share one neat relational schema. Nested objects are normal, and APIs grow new fields over time. GitHub can suddenly add <code>reactions</code>; the forum can expose a new <code>trust_level</code> or group list. In MongoDB that usually means new keys on the document, not a migration that blocks indexing.</p>
<p>PSMDB fits that. We keep sources in separate collections and store documents close to what the API returned, then add what reporting needs: stable ids and comparable dates for range queries. Upserts by source id make re-runs safe. Staff signals such as forum groups or trust level can stay on the user document while rules evolve. Indexes on the date fields keep month and quarter scans practical. Open one document and you can explain why an event counted or not.</p>
<p>PSMDB is the system of record for events and profiles. Rankings are derived. The public site never connects to it. That split is useful beyond our case: a rich private store for organizers, a dumb public snapshot for the website.</p>
<p>We looked at paid leaderboard products first. They were rigid on sources, weak on staff versus community, or awkward with a static site. Building around PSMDB let us encode our rules instead of bending the program to a SaaS schema.</p>
<p>A few mistakes we deliberately avoided: exposing a public API that talks to the private database; scoring staff and community in one undifferentiated stream for the public board; asking Hugo to compute rankings at build time. The site only fetches JSON. Everything heavy stays behind the corporate network.</p>
<h2>Building it without hundreds of hours</h2>
<p>I could have written this stack myself. I’ve been in web development for many years and I’ve built similar pipelines before: cron jobs, API clients, admin UIs, JSON exports, frontend widgets. None of it is magic. I know how long the boring parts take when you do them by hand: wiring indexers, shaping documents, iterating on the Hugo widget layout, debugging JavaScript, mapping fields from noisy API payloads. That is often weeks of calendar time that never shows up in a program announcement.</p>
<p>In about a week we had a working path from APIs to PSMDB to rankings to a public widget. An AI assistant did a lot of that scaffolding for me: boilerplate API clients for GitHub and the forum, first-pass mapping of those payloads into MongoDB collections, and early prototypes of the Preact widget (layout, period picker, loading states). I still owned the architecture and the rules; the agent compressed construction I would otherwise have typed line by line. That difference is real, and I notice it because I’m not new to this work. Judgment stayed with the community team and with Laura’s brief: what counts, who is staff, how identities merge, what the public is allowed to see, and how the board should feel on the Ascent pages.</p>
<p>I used a similar approach for <a href="https://percona.community/blog/2026/05/29/semantic-search-on-postgresql-part-1/">semantic search on this site</a> with Postgres and pgvector. Different store, same idea: know what you want, let the assistant handle the repetitive build.</p>
<h2>If you want something like this</h2>
<p>You don’t need our private cloud. You need the same separation of concerns.</p>
<p>Ask for scheduled indexer jobs that poll your APIs, upsert into <a href="https://docs.percona.com/percona-server-for-mongodb/8.0/index.html" target="_blank" rel="noopener noreferrer">Percona Server for MongoDB</a> in Docker, keep documents close to each API’s shape, and add stable ids and dates for range queries.</p>
<p>Ask for a private UI over that database with tables, charts, date filters, and an explicit community / staff / all view, behind basic auth or SSO, so you can verify fairness before anything is public. Use it to find outside PRs and unanswered community questions, not only to draw a ranking.</p>
<p>Ask for a scoring job that builds period rankings, publishes community-only JSON to a public feed (GitHub raw files or object storage), and a small JS widget for your site that only reads that feed.</p>
<p>Collect, understand, publish, render. Honest collection, careful filters, a simple public publish path.</p>
<p>If you try it and get stuck, write to me. I’m happy to talk through what worked and what we threw away. To see the result in production, open the <a href="https://percona.community/ascent/leaderboard/" target="_blank" rel="noopener noreferrer">Community Leaderboard</a>. To join the program behind it, start with Laura’s <a href="https://percona.community/blog/2026/07/16/introducing-mountaineers/">Mountaineers announcement</a> or the <a href="https://percona.community/ascent/mountaineers/" target="_blank" rel="noopener noreferrer">program page</a>.</p>
<p><a href="https://percona.community/blog/2026/08/31/community-leaderboard/">Building Useful Community Software with MongoDB Using AI Agents</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Benchmarking vector indexes</title>
        <link>https://www.percona.com/blog/benchmarking-vector-indexes/</link>
        <pubDate>Thu, 27 Aug 2026 13:35:32 +0000</pubDate>
        <dc:creator>Evgeniy Patlan</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/benchmarking-vector-indexes/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Nearly every database has vector search now, and every one of them has a blog post with a big number in it. Almost none of those numbers can be checked, because the thing that makes them meaningful is usually missing. We built a vector-bench to stop guessing. You name the engines you want, build them … Continued<br />
The post Benchmarking vector indexes appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/benchmarking-vector-indexes/">Benchmarking vector indexes</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><span>Nearly every database has vector search now, and every one of them has a blog post with a big number in it. Almost none of those numbers can be checked, because the thing that makes them meaningful is usually missing.</span></p>
<p><span>We built a vector-bench to stop guessing. You name the engines you want, build them from pinned versions, put each one in the same container on the same cores with the same data, run the same measurements against all of them, and write a report. This post is about how it measures.</span></p>
<p><span>If you work with databases but haven’t touched vectors yet, the first half is the part you need.</span></p>
<p><b>What’s being indexed</b></p>
<p><span>An embedding is a fixed-length array of floats that comes out of a model. The useful property is that semantically similar inputs land close together when you measure the distance between them.</span></p>
<p><span>Two distance measures cover almost everything. </span><b>L2</b><span> is an ordinary straight-line distance, the Pythagorean one, extended to however many dimensions you have. </span><b>Cosine Similarity </b><span> measures the angle between two vectors and ignores their length. Which one applies is decided by the model that produced the embeddings. It isn’t a choice you get to make at query time, and getting it wrong is a good way to produce nonsense.</span></p>
<p><span>So the query you want is “the 10 rows whose vectors are nearest this one”:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">SELECT id FROM documents ORDER BY distance(embedding, ?) LIMIT 10;</pre>
<p><span>That 10 is </span><b>k</b><span>.</span></p>
<p><span>Now the problem. Answering that exactly means computing the distance from your query vector to every single row, then sorting. No B-tree or hash index helps, because neither one can order a million points by proximity in 1536 dimensions. Exact vector search is a full table scan with a lot of arithmetic bolted on.</span></p>
<p><span>A vector index gives up exactness to avoid that. It looks at a few thousand promising candidates instead of every row and returns the best it found. That’s the </span><b>approximate nearest neighbour</b><span> search, or ANN. It’s usually right.</span></p>
<p><span>“Usually” is doing a lot of work in that sentence, and pinning it down is most of what this benchmark does.</span></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-52524 size-full" src="https://www.percona.com/wp-content/uploads/2026/08/recall.png" alt="" width="740" height="914"></p>
<p><span>To score that you need to know the right answer in the first place. That’s the </span><b>ground truth</b><span>: the true nearest neighbours for every query, computed once by brute force with no index involved. The public ANN datasets ship theirs alongside the vectors, and without it you couldn’t score an approximate index at all.</span></p>
<p><span>This is the number that makes everything else meaningful, and it’s the one most vector search claims leave out. That omission is the reason this project exists.</span></p>
<h2><b>The two kinds of vector index</b></h2>
<p><span>Almost every database that has added vector search picked one of two designs. They attack the same problem from opposite ends, and which one you have decides what you’re allowed to tune.</span></p>
<h3><b>HNSW</b></h3>
<p><b>HNSW</b><span> stands for Hierarchical Navigable Small World, which is a mouthful for something fairly intuitive. If you’ve ever implemented a skip list, you already have the shape of it.</span></p>
<p><span>It’s a graph of vectors built in layers. Every vector is a node, linked to some number of its nearest neighbours. The top layer has few nodes and its links jump long distances across the data. Each layer below has more nodes and shorter links. A search starts at the top and keeps hopping to whichever neighbour is closer to the query. When nothing is closer, it drops a layer and carries on, until it runs out of layers.</span></p>
<p><img decoding="async" class="alignnone size-full wp-image-52523 aligncenter" src="https://www.percona.com/wp-content/uploads/2026/08/hnsw.svg" alt=""></p>
<p><span>Two settings matter:</span></p>
<ul>
<li><b>M</b><span> is how many links each node keeps. It’s fixed when the index is built. Higher M means a better-connected graph and better recall, at the cost of a slower </span> <span>build and a bigger index.</span></li>
<li><b>ef_search</b><span> is how many candidates the search keeps track of while it walks. It’s a session variable, so </span> <span>you can change it per query. Turn it up and the search visits more </span> <span>nodes, gets better recall, and runs slower.</span></li>
</ul>
<p><span>There’s </span><b>ef_construction</b><span> too, the same idea applied while the index is being built. Not every engine lets you set it, which turns out to matter when you try to compare them fairly.</span></p>
<h3><b>IVF</b></h3>
<p><b>IVF</b><span> stands for Inverted File. It partitions the data instead of linking it, not unlike list partitioning on a table.</span></p>
<p><span>At build time it groups the vectors into </span><span>nlist</span><span> clusters, each with a representative vector at its centre. At query time it compares the query against those representatives, picks the closest </span><span>nprobe</span><span> clusters, and searches only inside them. It builds much faster than HNSW and uses less memory, but usually gives worse recall at the same speed. It misses when the true neighbour happens to sit just outside the clusters it looked in.</span></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-52521 size-full" src="https://www.percona.com/wp-content/uploads/2026/08/ivf.svg" alt="" width="462" height="444"></p>
<p><span>We only test engines running HNSW, which is what most databases shipped. Putting an IVF engine on the same chart would mostly measure the gap between two algorithms rather than how well anybody implemented one, so IVF-only engines get their own bucket.</span></p>
<h2><b>Why one number is never enough</b></h2>
<p><span>Recall isn’t a property of an engine. It’s a setting, and </span><span>ef_search</span><span> is the dial.</span></p>
<p><span>Here’s one HNSW index on one machine, same data, same queries. The only difference is that on the first row the search tracks 10 candidate nodes as it walks the graph, and on the second it tracks 800:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">ef_search=10 3,678 queries/sec recall 0.9593
ef_search=800 409 queries/sec recall 0.9987</pre>
<p><span>Keeping 800 candidates instead of 10 finds a better answer and takes nine times as long. Both rows are honest measurements of the same index on the same hardware.</span></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-52516 size-full" src="https://www.percona.com/wp-content/uploads/2026/08/tradeoff.png" alt="" width="1746" height="712"></p>
<p><span>Which is why “our database does 3,678 vector queries a second” tells you nothing. You don’t know how often it was handing back the wrong rows, and the person quoting it may not know either. The reverse is just as empty: recall with no throughput next to it is free, because recall 1.0 is always available if you turn the index off and scan the table.</span></p>
<p><span>Every measurement here is a pair. If you take one thing from this post, take that.</span></p>
<h2><b>What the harness puts on each engine</b></h2>
<p><span>One table per engine. An id, an integer </span><span>tag</span><span> column used only by the filtered tests, the vector, and an HNSW index on it at a configured M.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">CREATE TABLE t1 (
id INTEGER PRIMARY KEY,
tag INTEGER NOT NULL,
v VECTOR(1536)
);</pre>
<p> </p>
<p><span>Then two queries, plain top-k and the same search restricted to a subset of rows:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">SELECT id FROM t1 ORDER BY distance(v, ?) LIMIT 10;
SELECT id FROM t1 WHERE tag &lt; ? ORDER BY distance(v, ?) LIMIT 10;</pre>
<p> </p>
<p><span>tag</span><span> holds values 0 to 99 spread evenly, so </span><span>tag &lt; 10</span><span> passes about 10% of rows and </span><span>tag &lt; 1</span><span> about 1%. That’s how we control selectivity.</span></p>
<p><span>Every engine writes all of this differently. Some declare the index inside CREATE TABLE, others want a separate CREATE INDEX, and the distance functions have different names everywhere. Translating that is the driver’s job, and the drivers are the only engine-specific code in the whole harness.</span></p>
<p><span>Every engine also has at least one setup detail that will quietly wreck your numbers. PostgreSQL, for instance, stores oversized values out of line in what it calls TOAST, and a 1536-dimension vector counts as oversized. Unless the column is set to </span><span>STORAGE PLAIN</span><span>, every single distance comparison pays for an extra fetch. It’s one line of DDL. Miss it and you publish PostgreSQL looking slow for a reason that has nothing to do with its vector search, and you’d never know from the results.</span></p>
<h2><b>What we measure</b></h2>
<p><b>Recall against throughput.</b><span> Iterate </span><span>ef_search</span><span> against a fixed index, record recall and QPS at each point, repeat at a few values of M. k=10 throughout. The query vectors come from the dataset’s own held-out query set, never from the rows we loaded, because searching for a vector that’s already in the index is a much easier problem and would flatter everybody equally.</span></p>
<p><span>The two settings behave completely differently, and it shapes how long a run takes. </span><span>ef_search</span><span> is a session variable, so iterating it reuses the index that’s already built and each extra point costs almost nothing. M is baked into the index, so every value of M means dropping the table and loading the entire dataset again. On a million 1536-dimension vectors that’s hours per value. Hence many </span><span>ef_search</span><span> points and very few M values.</span></p>
<p><b>Build cost.</b><span> Wall time, rows per second, index size on disk, peak memory.</span></p>
<p><span>This is the easiest place in the whole benchmark to publish a misleading number, because engines don’t build the index the same way. </span><span>Engines can build indexes either incrementally, bulk, or both. What does that mean? </span></p>
<p><b>Incremental.</b><span> The graph is updated on every INSERT. Loading is slow, but when the last row lands the index is finished and the table is ready to query.</span></p>
<p><b>Bulk.</b><span> All the rows load first, then the whole graph gets built in one pass. Much faster in total, but the table can’t answer a vector query until the build finishes.</span></p>
<p><span>Those are two different operations. One engine in our set does both, and its bulk path loaded 18 times more rows per second than its own incremental path. Same engine, same data, same machine, 18x apart.</span></p>
<p><span>So a bulk number from one engine put next to an incremental number from another doesn’t compare engines at all. It compares two ways of building an index, and the ratio looks impressive enough that people quote it anyway. We measure both paths on any engine that has both, and the report says which is which.</span></p>
<p><span>Peak memory comes from the server’s container, with the database as the only thing running in it. The harness runs in a separate container and reaches the server over a private network.</span></p>
<p><span>That separation matters more than it sounds. The client holds the entire dataset in memory, several GB of Python arrays. If it shared a container with the database, the container’s memory accounting would count those arrays as database memory, and every memory figure we published would be inflated by whatever the client happened to be holding.</span></p>
<p><img decoding="async" loading="lazy" class="aligncenter wp-image-52518 size-full" src="https://www.percona.com/wp-content/uploads/2026/08/harness.png" alt="" width="1246" height="439"></p>
<p><b>Concurrency.</b><span> QPS and latency percentiles from 1 to 32 clients. Engines cache their graphs in quite different ways and none of that shows up until clients start competing for the same cache. We report how much of the ideal speedup each engine actually got alongside raw QPS, because an engine that stops gaining throughput at 2 clients while its p99 gets 15 times worse is doing something very different from one that keeps scaling, and a throughput column on its own hides that completely.</span></p>
<p><b>Filtered search</b><span>, at several selectivities down to 1% of rows passing. This is the case that’s supposed to justify keeping vectors in your database instead of a dedicated store, so it deserves more attention than it usually gets.</span></p>
<p><span>Filtering changes what “correct” means. The true top 10 among rows where </span><span>tag &lt; 10</span><span> is not the true top 10 overall, so for every selectivity we recompute ground truth by brute force over only the rows that pass. Score filtered results against the unfiltered ground truth that shipped with the dataset and every engine gets a recall near zero. We know, because we did exactly that for a while.</span></p>
<p><span>Some queries come back with fewer than 10 rows. In one run, 81 out of 200 did. This is not the data running out. At 10% selectivity about 99,000 rows pass the filter, so there are always at least 10 to find. The cause is the order of the operations. HNSW searches by distance first, then applies the WHERE clause. It gathers a few thousand candidates, the filter throws most of them away, and sometimes fewer than 10 are left. (If a filter really did match fewer than 10 rows, the ground truth shrinks too, and the engine still scores 1.0.) Recall already handles this. A row the engine did not return counts as a miss, so six correct rows score 0.6. We report the count because two different problems score the same. “10 rows, four of them wrong” and “six rows, all correct” are both 0.6. The first needs a wider search. The second needs iterative scanning. The count tells you which one you have. It also means the throughput is flattered, since six rows is less work than ten.</span></p>
<p><b>Churn.</b><span> Recall and throughput before and after deleting and reinserting part of the corpus, since deletions leave graph edges pointing at rows that are gone. Whether rebuilding the index recovers what’s lost, we don’t know yet. It’s the obvious next thing to test and we haven’t done it.</span></p>
<h2><b>Keeping the comparison fair</b></h2>
<p><span>Everything runs twice.</span></p>
<p><span>The </span><b>normalized</b><span> pass gives every engine identical CPU, memory and cache budgets, so a difference in the results belongs to the implementation rather than to who was handed more RAM. The </span><b>tuned</b><span> pass lets each engine use the settings its own documentation recommends. Tuned is more realistic and less controlled, which is exactly why it doesn’t replace the first one. A result that survives both passes is about the engine. One that flips between them is interesting for a completely different reason.</span></p>
<p><span>Cores are pinned explicitly. One logical CPU per physical core, because SMT siblings share execution units and two threads on one core don’t behave like two cores. Never a mix of P-cores and E-cores on hybrid chips either, since migration between core types adds more variance than several of the effects we’re trying to measure. Durability is relaxed the same way everywhere, or we’d be comparing default fsync policies and calling it vector search.</span></p>
<p><span>Some differences can’t be equalised at all, so we write them down instead of pretending. A knob only one engine exposes goes unused in the normalized pass, because using it would hand that engine a tuning axis nobody else has. An engine that insists on a particular isolation level gets it set for everyone. And defaults that are obviously placeholders get sized from a shared budget — one family of engines still ships a 16 MiB graph cache, which is nothing, and judging an engine on a value its own vendor expects you to change measures absolutely nothing. All of these land in a “known asymmetries” section above the results.</span></p>
<p><span>One hardware note that catches people out. Several of these implementations ship hand-written AVX-512 code for the distance maths, where a single instruction does the arithmetic for 16 floats at once. The same index on a CPU without AVX-512 is effectively a different benchmark, and the slowdown isn’t the same for every engine, so you can’t even scale the numbers to compensate. The CPU model and its feature flags go into every run’s manifest for that reason, along with engine versions and commits, image IDs, and the resource limits as they are actually resolved rather than as we requested them. No manifest, no report.</span></p>
<h2><b>Reading the results</b></h2>
<p><span>Read the validity section before you look at a single chart. Our reports go environment, then validity, then known asymmetries, then results, in that order on purpose. A failed phase, an engine returning short result sets, a CPU missing the instruction set the engines wanted — all of it lands in front of you before you’ve formed an opinion.</span></p>
<p><span>The thing to watch for is the silent full scan.</span></p>
<p><span>Any of these engines will quietly stop using the vector index and scan the table instead. A scan returns exact results, slowly, so in the output it looks like high recall and low throughput. That’s indistinguishable from a conservatively tuned index unless you go and read the query plan.</span></p>
<p><span>It happens for thoroughly boring reasons. One engine’s optimizer costs the vector index against a table scan and takes the scan once the LIMIT is above roughly a quarter of the table, and we still haven’t found a setting that moves it. Another falls back with no error and no warning when the query asks for a different distance than the index was built for — build the index for cosine, write the query with the L2 operator, and you get a sequential scan and a sort, with nothing anywhere to tell you.</span></p>
<p><span>So every driver runs EXPLAIN for each configuration and checks the index name appears in the plan.</span></p>
<p><span>WARNING: vector index NOT used (k=10, filtered=True). Plan: …Seq Scan…</span></p>
<p><span>Anything that is scanned goes into validity. This is far and away the easiest way to produce impressive vector benchmark numbers by accident, and if a benchmark doesn’t mention checking for it, we’d want to know why before believing anything in it.</span></p>
<p><span>For recall against throughput, the useful presentation is a curve rather than a number. Iterate </span><span>ef_search</span><span>, plot recall against QPS, keep the best points: for each level of accuracy, the highest throughput anything reached at it. One engine beats another only where its curve sits above the other’s at the same recall. If the curves cross, then the answer genuinely depends on how accurate you need to be, and saying so is a result rather than a dodge.</span></p>
<p><span>Curves do invite comparing shapes instead of heights at one point, so there are bar charts as well, QPS at recall floors of 0.90, 0.95 and 0.99. Pick the accuracy you’d actually accept and read across.</span></p>
<h2><b>Things that went wrong while we built this</b></h2>
<p><span>Worth listing, partly because they’re the reason to trust anything else here, and partly because anyone building something similar will walk into them.</span></p>
<p><span>Our first ingest numbers were garbage. The load path was doing one INSERT per network round trip with autocommit on, and we measured 88 rows a second. Batching 500 rows per transaction took the same engine to 373. Publishing the first number would have been benchmarking our own client and calling it a database.</span></p>
<p><span>Filtered search and churn were scored against full-corpus ground truth even on runs that used a subset of rows. Every engine looked bad and the bug was entirely ours. Ground truth is now keyed on dataset, k, row count and selectivity.</span></p>
<p><span>Both resource passes shared one results directory, and the ANN runner skips configurations that already have results. So the tuned pass quietly skipped everything the normalized pass had computed, and our tuned numbers were mostly normalized numbers wearing a different label. That one took an embarrassingly long time to notice.</span></p>
<p><span>Readiness probes lie. One engine’s standard “are you accepting connections” check returns success before the database it’s supposed to create actually exists. The probe passed, the first query failed, and we spent a while convinced it was an engine problem.</span></p>
<p><span>The most recent one, on a 1536-dimension corpus. The ANN runner holds the whole dataset in memory twice, once in the parent process and again in a forked worker, and the copies aren’t shared. That’s roughly 12 GB for a million embeddings, on top of whatever the server is using, in a container we’d sized for the server alone. The kernel killed the worker. The runner doesn’t check worker exit codes, so it logged “Terminating 1 workers”, exited successfully and wrote no results — which looks exactly like a run that had nothing left to do. Three hours to fail, and it failed silently.</span></p>
<h2><b>Adding a database</b></h2>
<p><span>This is the part we cared most about getting right, because the whole point was to avoid rebuilding the apparatus every time somebody ships vector search. Each engine needs:</span></p>
<ul>
<li><span>a Dockerfile producing a runtime image and a test image from a pinned version</span></li>
<li><span>a config declaring ports, credentials, and which server settings map onto the normalized CPU and memory budget</span></li>
<li><span>a module for the recall and throughput side</span></li>
<li><span>a driver: create index, load, query, filtered query, index size, and the EXPLAIN check</span></li>
</ul>
<h2><b>What’s next</b></h2>
<p><span>Results, published with the manifests and the raw per-configuration records, so you can check them instead of taking our word for it.</span></p>
<p><span>Everything is at</span> <a href="https://github.com/Percona-Lab/vector-bench"><span>https://github.com/Percona-Lab/vector-bench</span></a><span> harness, drivers, Dockerfiles, docs. If we’re measuring something wrong, or being unfair to an engine you know better than we do, tell us.</span></p>
<p>The post <a href="https://www.percona.com/blog/benchmarking-vector-indexes/">Benchmarking vector indexes</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/benchmarking-vector-indexes/">Benchmarking vector indexes</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Performance Progression of Percona Server for MySQL 8.4</title>
        <link>https://www.percona.com/blog/performance-progression-of-percona-server-for-mysql-8-4/</link>
        <pubDate>Thu, 27 Aug 2026 13:07:20 +0000</pubDate>
        <dc:creator>Bogdan Degtyariov</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/performance-progression-of-percona-server-for-mysql-8-4/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>1. Purpose and scope This performance investigation aims to look into the read/write performance of Percona Server for MySQL 8.4 and how it changed between versions released in 2026: 8.4.8-8 released on 12 March 2026 8.4.10-10 released on 30 June 2026 8.4.11-11 released on 20 August 2026 We want to see if there are improvements … Continued<br />
The post Performance Progression of Percona Server for MySQL 8.4 appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/performance-progression-of-percona-server-for-mysql-8-4/">Performance Progression of Percona Server for MySQL 8.4</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<h2><span>1. Purpose and scope</span></h2>
<p><span>This performance investigation aims to look into the read/write performance of Percona Server for MySQL 8.4 and how it changed between versions released in 2026:</span></p>
<ul>
<li><span>8.4.8-8 released on 12 March 2026</span></li>
<li><span>8.4.10-10 released on 30 June 2026</span></li>
<li><span>8.4.11-11 released on 20 August 2026</span></li>
</ul>
<p><span>We want to see if there are improvements in scalability and performance in OLTP read/write operations, where the improvements are most noticeable and how they were achieved. For some readers this material might help with making the decision whether upgrading to a newer version is worth the effort.</span></p>
<p><span>An important note is that the new features or security patches will not be taken into consideration.</span></p>
<p><span>Measuring Latency (Percentiles) and Resource Utilization (CPU, RAM, I/O) is not in the scope of this post.</span></p>
<p> </p>
<h2><span>2. Configuration and Methodology</span></h2>
<p><span>The configuration was as follows:</span></p>
<table border="1" width="100%" cellpadding="5">
<tbody>
<tr>
<td><span>Benchmark</span></td>
<td><span>Sysbench OLTP Read-Write</span></td>
</tr>
<tr>
<td><span>CPU</span></td>
<td><span>Intel Xeon Gold 6230 (2×20 cores, HT = 80 logical CPUs)</span></td>
</tr>
<tr>
<td><span>RAM</span></td>
<td><span>187 GiB DDR4</span></td>
</tr>
<tr>
<td><span>Storage</span></td>
<td><span>NVMe SSD (2.9 TB) INTEL SSDPE2KE032T8</span></td>
</tr>
<tr>
<td><span>OS</span></td>
<td><span>Ubuntu 24.04, kernel 6.8.0-60-generic</span></td>
</tr>
<tr>
<td><span>DB Engines</span></td>
<td><span>Percona Server for MySQL 8.4.8-8 (release build)</span><span><br />
</span><span>Percona Server for MySQL 8.4.10-10 (release build)</span><span>Percona Server for MySQL 8.4.11-11 (release build)</span></td>
</tr>
</tbody>
</table>
<p><span>The benchmarks were done across the following dimensions:</span></p>
<table border="1" width="100%" cellpadding="5">
<tbody>
<tr>
<td><span>Database Sizes (Row Number)</span></td>
<td><span>24Gb (100M rows) / 48Gb (200M rows) / 96Gb (400M rows)</span></td>
</tr>
<tr>
<td><span>Number of tables in DB Schema</span></td>
<td><span>20 (this number is constant for all runs)</span></p>
<p><span>Database Schema definition can be downloaded from here: </span></p>
<p><a href="https://percona-lab-results.github.io/2026-interactive-metrics/schema_dump.sql" target="_blank" rel="noopener"><span>https://percona-lab-results.github.io/2026-interactive-metrics/schema_dump.sql</span></a></p>
</td>
</tr>
<tr>
<td><span>Number of concurrent threads</span></td>
<td><span>1 / 4 / 16 / 32 / 64 / 128 / 256 / 512</span></td>
</tr>
<tr>
<td><span>Buffer to Data Ratio</span></td>
<td><span>1:12 (I/O bound), 1:2 (Partially buffered), 1:1 (Fully buffered)</span></td>
</tr>
</tbody>
</table>
<p><span>One of the points in benchmarking was to create combinations of similar Buffer to Data Ratios, but with the different Database Sizes. This gives us the following possible combinations of </span><span>innodb_buffer_pool_size</span><span> and Database Size:</span></p>
<table border="1" width="100%" cellpadding="5">
<tbody>
<tr>
<td><span>1:12 (I/O bound)</span></td>
<td><span>innodb_buffer_pool_size = 2G, Data Size = </span><span>24Gb</span><span><br />
</span><span>innodb_buffer_pool_size = 4G, Data Size = </span><span>48Gb</span><span><br />
</span><span>innodb_buffer_pool_size = 8G, Data Size = </span><span>96Gb</span></td>
</tr>
<tr>
<td><span>1:2 (Partially buffered)</span></td>
<td><span>innodb_buffer_pool_size = 12G, Data Size = </span><span>24Gb</span><span><br />
</span><span>innodb_buffer_pool_size = 24G, Data Size = </span><span>48Gb</span><span><br />
</span><span>innodb_buffer_pool_size = 48G, Data Size = </span><span>96Gb</span></td>
</tr>
<tr>
<td><span>1:1 (Fully buffered)</span></td>
<td><span>innodb_buffer_pool_size = 32G, Data Size = </span><span>24Gb</span><span><br />
</span><span>innodb_buffer_pool_size = 64G, Data Size = </span><span>48Gb</span><span><br />
</span><span>innodb_buffer_pool_size = 128G, Data Size = </span><span>96Gb</span></td>
</tr>
</tbody>
</table>
<p><span>We should be able to see how efficiently the server manages an increasingly larger number of rows while keeping the Buffer to Data Ratio the same.</span></p>
<p><span>Execution of the benchmarks was done as follows:</span></p>
<table border="1" width="100%" cellpadding="5">
<tbody>
<tr>
<td><span>Ramp-up</span></td>
<td><b>24G – 600 sec (10 min)</b><span> – could be shorter</span><span><br />
</span><b>48G – 600 sec (10 min)</b><b>96G – 900 sec (15 min)</b><span><br />
</span><span><br />
</span><span>The Ramp-up times were established experimentally depending on the Data Size until the point when increasing them further did not bring significant changes.</span></td>
</tr>
<tr>
<td><span>Measurement window</span></td>
<td><b>900 sec (15 min)</b><span><br />
</span><span><br />
</span><span>Ideally it should be as long as possible, but measurements should take reasonable time. Hence, we used the experience of previous benchmarks and established that this window is adequate for the purpose.</span></td>
</tr>
<tr>
<td><span>Number of runs</span></td>
<td><b>3</b></p>
<p><span>For each combination there are multiple runs.</span><span><br />
</span><span>The interactive graph can show data for individual runs as well as averaged value.</span></p>
</td>
</tr>
</tbody>
</table>
<p><span>Important Database Configuration options (the actual config files with specific settings for each run can be downloaded from the interactive graphs):</span></p>
<table border="1" width="100%" cellpadding="5">
<tbody>
<tr bgcolor="#DDDDDD">
<td colspan="2"><b>InnoDB – Buffer pool Tier</b></td>
</tr>
<tr>
<td><span>innodb_buffer_pool_size</span></td>
<td><b>2G/4G/8G/12G/24G/32G/48G/64G/128G</b></td>
</tr>
<tr>
<td><span>innodb_buffer_pool_load_at_startup</span></td>
<td><span>OFF</span></td>
</tr>
<tr>
<td><span>innodb_buffer_pool_dump_at_shutdown</span></td>
<td><span>OFF</span></td>
</tr>
<tr bgcolor="#DDDDDD">
<td colspan="2"><b>Thread Pool</b></td>
</tr>
<tr>
<td><span>thread_handling</span></td>
<td><span>pool-of-threads</span></td>
</tr>
<tr>
<td><span>thread_pool_size</span></td>
<td><span>80 # match physical core count</span></td>
</tr>
<tr>
<td><span>thread_pool_max_threads</span></td>
<td><span>2000</span></td>
</tr>
<tr>
<td><span>thread_pool_oversubscribe</span></td>
<td><span>3</span></td>
</tr>
<tr bgcolor="#DDDDDD">
<td colspan="2"><b>Threading</b></td>
</tr>
<tr>
<td><span>thread_stack</span></td>
<td><span>512K</span></td>
</tr>
<tr>
<td><span>thread_cache_size</span></td>
<td><span>256</span></td>
</tr>
<tr>
<td><span>back_log</span></td>
<td><span>4096</span></td>
</tr>
<tr bgcolor="#DDDDDD">
<td colspan="2"><b>InnoDB I/O</b></td>
</tr>
<tr>
<td><span>innodb_io_capacity</span></td>
<td><span>10000</span></td>
</tr>
<tr>
<td><span>innodb_io_capacity_max</span></td>
<td><span>20000</span></td>
</tr>
<tr>
<td><span>innodb_read_io_threads</span></td>
<td><span>16</span></td>
</tr>
<tr>
<td><span>innodb_write_io_threads</span></td>
<td><span>16</span></td>
</tr>
<tr>
<td><span>innodb_use_native_aio</span></td>
<td><span>ON</span></td>
</tr>
<tr bgcolor="#DDDDDD">
<td colspan="2"><b>InnoDB Log / Durability</b></td>
</tr>
<tr>
<td><span>innodb_log_buffer_size</span></td>
<td><span>256M</span></td>
</tr>
<tr>
<td><span>innodb_flush_log_at_trx_commit</span></td>
<td><span>1 # full ACID</span></td>
</tr>
<tr>
<td><span>innodb_doublewrite</span></td>
<td><span>ON</span></td>
</tr>
<tr bgcolor="#DDDDDD">
<td colspan="2"><b>InnoDB – Concurrency &amp; OLTP Tuning</b></td>
</tr>
<tr>
<td><span>innodb_stats_on_metadata</span></td>
<td><span>OFF</span></td>
</tr>
<tr>
<td><span>innodb_open_files</span></td>
<td><span>65536</span></td>
</tr>
<tr>
<td><span>innodb_lock_wait_timeout</span></td>
<td><span>50</span></td>
</tr>
<tr>
<td><span>innodb_rollback_on_timeout</span></td>
<td><span>ON</span></td>
</tr>
<tr bgcolor="#DDDDDD">
<td colspan="2"><b>Per-Session Buffers</b></td>
</tr>
<tr>
<td><span>sort_buffer_size    </span></td>
<td><span>4M</span></td>
</tr>
<tr>
<td><span>join_buffer_size    </span></td>
<td><span>4M</span></td>
</tr>
<tr>
<td><span>read_buffer_size    </span></td>
<td><span>2M</span></td>
</tr>
<tr>
<td><span>read_rnd_buffer_size</span></td>
<td><span>4M</span></td>
</tr>
<tr>
<td><span>tmp_table_size      </span></td>
<td><span>256M</span></td>
</tr>
<tr>
<td><span>max_heap_table_size</span></td>
<td><span>256M</span></td>
</tr>
<tr bgcolor="#DDDDDD">
<td colspan="2"><b>Binary Log</b></td>
</tr>
<tr>
<td><span>disable_log_bin</span></td>
<td><span>ON # Disabled binlog</span></td>
</tr>
<tr bgcolor="#DDDDDD">
<td colspan="2"><b>Other InnoDB settings</b></td>
</tr>
<tr>
<td><span>innodb_redo_log_capacity    </span></td>
<td><span>4G</span></td>
</tr>
<tr>
<td><span>innodb_change_buffering     </span></td>
<td><span>none</span></td>
</tr>
<tr>
<td><span>innodb_flush_method         </span></td>
<td><span>O_DIRECT</span></td>
</tr>
<tr>
<td><span>innodb_buffer_pool_instances</span></td>
<td><b>Calculated as</b><b><br />
</b><b>(innodb_buffer_pool_size G / 5)</b><b><br />
</b><b>But must be in range [1..8]</b></td>
</tr>
<tr bgcolor="#DDDDDD">
<td colspan="2"><b>Misc server settings</b></td>
</tr>
<tr>
<td><span>collation_server</span></td>
<td><span>utf8mb4_unicode_ci</span></td>
</tr>
<tr>
<td><span>bulk_insert_buffer_size</span></td>
<td><span>256M</span></td>
</tr>
<tr>
<td><span>myisam_sort_buffer_size </span></td>
<td><span>128M</span></td>
</tr>
<tr>
<td><span>key_buffer_size         </span></td>
<td><span>64M # MyISAM only, keep small for OLTP</span></td>
</tr>
</tbody>
</table>
<p><span>In the high concurrency scenario when all CPU cores are working under maximum load the performance fluctuations might appear out of the ability of a specific CPU crystal to work at a specific sustainable maximum frequency. Intel Xeon Gold 6230 processors installed in the test servers have a base frequency of 2100 MHz and maximum turbo frequency of 3900 MHz. However, such turbo frequency can only be achieved for a short period of time on an isolated core. The load and the heat production of the physical core neighbours limit the frequency of the whole CPU. Some CPU’s were able to hold 2530 MHz on all cores for 20+ hours of intense load, others could only reach 2420 MHz. For consistency of the tests the turbo frequency was capped to 2400 MHz from the beginning on all servers. It helped to eliminate the struggle between turbo mode trying to increase the frequency beyond sustainable levels and the CPU thermal protection bringing the clock down. More stable hardware performance reduced the measurement fluctuations during the benchmark runs regardless if they were done on the same or a different physical server.</span></p>
<p> </p>
<h2><span>3. Results</span></h2>
<p><span>First, let’s check the I/O bound scenario where the InnoDB Buffer to Data Size is the smallest (1:12).</span></p>
<p><span>The graph shows the configurations with </span><span>innodb_buffer_pool_size</span><span>=8G and Data Size 96G (or 20M rows per table, 400M rows in total):</span></p>
<p><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=graph&amp;mem=8" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-52471" src="https://www.percona.com/wp-content/uploads/2026/08/graph-8g.png" alt="" width="1013" height="621"></a><br />
<span>[ </span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=graph&amp;mem=8" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=table&amp;mem=8" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]</span></p>
<p><span>The first thing that catches the eye is the hugely superior performance of the version 8.4.11-11 over 8.4.10-10 and 8.4.8-8 in the high thread numbers. In the situations when the number of physical cores (80) is smaller than the number of threads (128+) the versions 8.4.10-10 and 8.4.8-8 have a steep performance degradation. However, the TPS for 8.4.11-11 keeps growing. This is due to the optimization done to InnoDB LRU pages flushing algorithm. The optimization specifically targeted the scenario when the data size is larger than the available server buffers and the server has many concurrent connections doing random read-write operations. The optimizations in 8.4.11-11 deserve a separate explanation and they will be published in another blog post.</span><span><br />
</span></p>
<p><span>The less noticeable, but important difference can be spotted between the TPS for 8.4.8-8 and 8.4.10-10.</span></p>
<p><span>The version 8.4.10-10 shows better performance (especially at the saturation point with 64 threads), which should mostly be attributed to the introduction of Performance Guided Optimization (PGO). </span></p>
<p><span>More information on PGO can be found here:</span></p>
<p><a href="https://docs.percona.com/percona-server/8.4/pgo.html"><span>https://docs.percona.com/percona-server/8.4/pgo.html</span></a></p>
<p><span>With the smaller data and buffer sizes the performance difference gives an almost identical picture:</span></p>
<table border="1" width="100%" cellpadding="5">
<tbody>
<tr>
<td width="50%"><span>4G buffer, 48G data </span><span>[ </span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=graph&amp;mem=4" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=table&amp;mem=4" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]</span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=graph&amp;mem=4" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-52475 size-full" src="https://www.percona.com/wp-content/uploads/2026/08/graph-4g.png" alt="" width="1007" height="623"></a></td>
<td width="50%"><span>2G buffer, 24G data </span><span>[ </span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=graph&amp;mem=2" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=table&amp;mem=2" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]</span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=graph&amp;mem=2" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-52474 size-full" src="https://www.percona.com/wp-content/uploads/2026/08/graph-2g.png" alt="" width="1013" height="623"></a></td>
</tr>
</tbody>
</table>
<p><span>Now let’s review what happens with the ratio 1:2.</span><span><br />
</span><span>This time the buffer pool size also plays a more significant role and the performance difference is not characterized by the Buffer / Data size ratio.</span></p>
<p><span>With </span><span>innodb_buffer_pool_size</span><span>=12G and 24G data size the performance gap between 8.4.11-11 and older versions is still huge as can be seen on the graph:</span></p>
<p><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=graph&amp;mem=12" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="alignnone size-full wp-image-52481" src="https://www.percona.com/wp-content/uploads/2026/08/graph-12g.png" alt="" width="1012" height="624"></a><br />
<span>[ </span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=graph&amp;mem=12" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=table&amp;mem=12" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]</span></p>
<p><span>However, setting </span><span>innodb_buffer_pool_size</span><span>=24G and 48G data size reduces the gap. The superiority of 8.4.11-11 is still visible:</span></p>
<p><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=graph&amp;mem=12" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="alignnone size-full wp-image-52482" src="https://www.percona.com/wp-content/uploads/2026/08/graph-24g.png" alt="" width="1012" height="622"></a><br />
<span>[ </span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=graph&amp;mem=24" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=table&amp;mem=24" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]</span></p>
<p><span>Moving to </span><span>innodb_buffer_pool_size</span><span>=48G and 96G data size shrinks the gap even more:</span></p>
<p><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=graph&amp;mem=48" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="alignnone size-full wp-image-52485" src="https://www.percona.com/wp-content/uploads/2026/08/graph-48g.png" alt="" width="1014" height="626"></a><br />
<span>[ </span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=graph&amp;mem=48" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=table&amp;mem=48" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]</span></p>
<p><span>In this post we are not going to talk about mechanisms behind shrinking performance gaps in 1:2 Buffer / Data size ratio.</span></p>
<p><span>Holding the entire data set in memory is not the most common thing for the database server, but in some cases it happens. Therefore, we are covering such situations as well.</span></p>
<p><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=graph&amp;mem=32" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="alignnone size-full wp-image-52487" src="https://www.percona.com/wp-content/uploads/2026/08/graph-32g.png" alt="" width="1010" height="625"></a><br />
<span>[ </span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=graph&amp;mem=32" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=table&amp;mem=32" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]</span></p>
<p><span>As the above graph shows, 8.4.10-10 is slightly ahead of 8.4.11-11, but the gap is very small.</span></p>
<p><span>This behavior is consistent with other data sizes for fully buffered data:</span></p>
<p><span>innodb_buffer_pool_size=64G and 48G Data Size:</span></p>
<p><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=graph&amp;mem=64" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="alignnone size-full wp-image-52488" src="https://www.percona.com/wp-content/uploads/2026/08/graph-64g.png" alt="" width="1010" height="620"></a><br />
<span>[ </span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=graph&amp;mem=64" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=table&amp;mem=64" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]</span></p>
<p><span>innodb_buffer_pool_size=128G and 96G Data Size:</span></p>
<p><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=graph&amp;mem=128" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="alignnone size-full wp-image-52490" src="https://www.percona.com/wp-content/uploads/2026/08/graph-128g.png" alt="" width="1014" height="623"></a><br />
<span>[ </span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=graph&amp;mem=128" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona.html?display=table&amp;mem=128" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]</span></p>
<p><span>Again, we will not go into details about why this happens. Though it is worth noting that both 8.4.10-10 and 8.4.11-11 do better than 8.4.8-8 in all runs and configurations.</span></p>
<p><span>The table interpretation of the results is available as well.</span></p>
<p> </p>
<h2><span>4. Comparing with Upstream MySQL 8.4.11.</span></h2>
<p><span>The performance improvements in Percona Server for MySQL 8.4.11-11 are not a part of the Upstream MySQL 8.4.11. The patch was specifically designed to address the issue of Percona Server being slower than MySQL in I/O bound scenarios.</span></p>
<p><span>Also, the patch eliminated the abrupt performance degradation in the higher thread count after reaching the saturation point at 64 threads:</span></p>
<p><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona_mysql.html?display=graph&amp;mem=12" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="alignnone size-full wp-image-52500" src="https://www.percona.com/wp-content/uploads/2026/08/graph-m-12g.png" alt="" width="1015" height="624"></a></p>
<p><span>[ </span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona_mysql.html?display=graph&amp;mem=12" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona_mysql.html?display=table&amp;mem=12" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]</span></p>
<p><span>As the graph shows – Percona Server 8.4.8-8 / 8.4.10-10 was slower than MySQL in lower thread count. Although it was still faster in 128+ threads, the Percona Server was still subject to a substantial slow-down. That is where Percona Server 8.4.11-11 really shines.</span></p>
<p><span>However, with the fully buffered data MySQL goes faster than any Percona Server:</span></p>
<p><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona_mysql.html?display=graph&amp;mem=64" target="_blank" rel="noopener"><img decoding="async" loading="lazy" class="alignnone size-full wp-image-52501" src="https://www.percona.com/wp-content/uploads/2026/08/graph-m-64g.png" alt="" width="1011" height="624"></a><br />
<span>[ </span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona_mysql.html?display=graph&amp;mem=64" target="_blank" rel="noopener"><span>INTERACTIVE GRAPH</span></a><span> ][ </span><a href="https://percona-lab-results.github.io/ps-mysql-versions-perf/sysbench_percona_mysql.html?display=table&amp;mem=64" target="_blank" rel="noopener"><span>TABLE</span></a><span> ]</span></p>
<h2><span>5. Summary</span></h2>
<p><span>The Performance of the Percona Server 8.4 for MySQL is progressing well from older to newer version offering significant performance improvements especially in the version 8.4.11-11. This version shows very significant improvements in performance on the data sets that require I/O. Also, it outperformed the upstream MySQL 8.4.11.</span></p>
<p><span>With fully buffered data sets the version 8.4.10-10 is slightly better than 8.4.11-11. MySQL Server in this case shows the fastest performance.</span></p>
<p><span>The PGO had a positive impact demonstrating the version 8.4.10-10 being faster in all tests on all configurations than 8.4.8-8.</span></p>
<p><span>The performance depends not only on the ratio between the buffer and the data size, but also on the buffer size.</span></p>
<p>The post <a href="https://www.percona.com/blog/performance-progression-of-percona-server-for-mysql-8-4/">Performance Progression of Percona Server for MySQL 8.4</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/performance-progression-of-percona-server-for-mysql-8-4/">Performance Progression of Percona Server for MySQL 8.4</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>DuckDB Speed on MySQL with dbtrail, Without a New Storage Engine</title>
        <link>https://percona.community/blog/2026/08/26/duckdb-speed-on-mysql-without-a-new-storage-engine/</link>
        <pubDate>Wed, 26 Aug 2026 11:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/duckdb-speed-on-mysql-with-dbtrail-without-a-new-storage-engine/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>Two recent posts on the Percona blog caught my attention. In Replicating from InnoDB into a DuckDB storage engine and The DuckDB MySQL engine at 500 GB, Evgeniy Patlan wired DuckDB into mysqld as a storage engine, pointed row-based replication at it, and measured it at TPC-H scale factor 500. The numbers are striking: loads 25 times faster than InnoDB, one fifth of the disk, and the full 22-query TPC-H suite done in 186 seconds where InnoDB needed about 28 hours and never finished four of the queries.</p>
<p><a href="https://percona.community/blog/2026/08/26/duckdb-speed-on-mysql-without-a-new-storage-engine/">DuckDB Speed on MySQL with dbtrail, Without a New Storage Engine</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Two recent posts on the Percona blog caught my attention. In <a href="https://www.percona.com/blog/replicating-from-innodb-into-a-duckdb-storage-engine/" target="_blank" rel="noopener noreferrer">Replicating from InnoDB into a DuckDB storage engine</a> and <a href="https://www.percona.com/blog/the-duckdb-mysql-engine-at-500-gb/" target="_blank" rel="noopener noreferrer">The DuckDB MySQL engine at 500 GB</a>, Evgeniy Patlan wired DuckDB into mysqld as a storage engine, pointed row-based replication at it, and measured it at TPC-H scale factor 500. The numbers are striking: loads 25 times faster than InnoDB, one fifth of the disk, and the full 22-query TPC-H suite done in 186 seconds where InnoDB needed about 28 hours and never finished four of the queries.</p>
<p>The posts are also honest about the cost. The work is experimental. The worst bug found was silent data loss on every replicated transaction: the two-phase commit code for mixed-engine transactions dropped prepared DuckDB transactions before they committed, so replication reported success while no rows persisted. The test harness caught it and it was fixed. The row-by-row applier also cannot keep up with bulk writes on the primary.</p>
<p>I want to add a second road to the same place, one that changes nothing inside mysqld. Disclosure first: I build <a href="https://github.com/dbtrail/dbtrail" target="_blank" rel="noopener noreferrer">dbtrail</a>, the Apache 2.0 open source tool used below, so read this as one more point in the design space, from someone who is not neutral. Everything here ran on stock Percona Server 8.0 from Docker Hub and stock DuckDB from Homebrew, and the commands at the end reproduce all of it.</p>
<h2>Your binlog is already a columnar feed</h2>
<p>The storage engine approach puts the column store inside the server, so the server must cooperate: a patched build, a new engine in the commit path, replica tables created by hand with <code>ENGINE=DuckDB</code>. The other road starts from what MySQL already provides. With <code>binlog_format=ROW</code> and <code>binlog_row_image=FULL</code>, the binary log is a complete, ordered feed of every row change, with full before and after images. Any process can consume that feed as a replication client, the way a replica does, and install nothing on the server.</p>
<p>dbtrail is that process. It does two things with the feed:</p>
<ol>
<li>It keeps a short, searchable window of recent events in a plain MySQL table, for investigation and recovery.</li>
<li>It moves closed hours out to Parquet files, the open columnar format every analytical engine can read. DuckDB reads it natively.</li>
</ol>
<p>The pipeline is <code>mysqld -&gt; binlog -&gt; Parquet -&gt; DuckDB</code>. No patched server, no plugin, nothing new in the commit path. And because the feed is history rather than current state, dbtrail can answer a question no replica can: what did this row look like before, and how do I undo what happened to it?</p>
<h2>The demo</h2>
<p>One container for the source, stock image, with the settings any change-capture consumer needs (plus one line to keep the demo’s own index out of the binlog, since source and index share one server here):</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">docker run -d --name demo -p 13310:3306 -e <span class="nv">MYSQL_ROOT_PASSWORD</span><span class="o">=</span>demo <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> percona/percona-server:8.0 <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --gtid-mode<span class="o">=</span>ON --enforce-gtid-consistency<span class="o">=</span>ON <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --binlog-rows-query-log-events<span class="o">=</span>ON --binlog-ignore-db<span class="o">=</span>bintrail_index</span></span></code></pre>
</div>
</div>
</div>
<p><code>binlog_format=ROW</code> and <code>binlog_row_image=FULL</code> are already the 8.0 defaults. The schema is a small shop: <code>customers</code>, <code>orders</code>, <code>order_items</code>. Three short commands point dbtrail at it (<code>init</code>, <code>snapshot</code>, <code>stream</code>; they are in the last section), and from there the work happens in dbtrail’s web console. Then I replayed a five-hour synthetic workload: 3,265,000 row events in all. 2.7 million INSERTs, 510 thousand UPDATEs, 55 thousand DELETEs. (A tip for demo builders: <code>SET TIMESTAMP = </code> in the writing session backdates the binlog event timestamps, so a fast replay spreads across past hours and you can watch retention behave as it would in real life.)</p>
<p>The console’s Status view answers the first question an operator should ask of any change-capture pipeline: did we miss anything?</p>
<p><figure><img decoding="async" width="1440" height="820" src="https://percona.community/blog/2026/08/dbtrail-console-status_hu_dc6797ddbe100111.webp" alt="dbtrail console Status view: a green no-gaps verdict, 3,265,000 events captured, and an archive tier of 7 Parquet files totaling 26 MB" loading="lazy"></figure>
</p>
<p>The green banner is a verdict, not a guess: dbtrail tracks continuity across the captured range, and it says plainly that this is not a liveness check. On my MacBook the capture stream held about 18,000 events per second while it tailed the binlog. That answers the applier problem from the first post: dbtrail does not push rows through the storage engine API one at a time, it batches them into an index, so bulk writes on the primary are absorbed rather than queued.</p>
<h2>From hot partitions to Parquet</h2>
<p>The index table is range-partitioned by hour. dbtrail archives each closed hour to zstd-compressed Parquet, checks the result, and only then drops the partition. Retention on the expensive tier becomes hours, not months. The demo moved all 3.26 million events out in 14 seconds, and the Status view above already showed the result: 7 archive files, 26 MB. Here is that number next to what the same events cost in InnoDB:</p>
<p><figure><img decoding="async" width="2160" height="780" src="https://percona.community/blog/2026/08/duckdb-mysql-storage_hu_f49bae55fc9733cb.webp" alt="Bar chart: the same 3,265,000 events take 2,822 MB as an InnoDB table and 26 MB as zstd Parquet" loading="lazy"></figure>
</p>
<p>Do not take that 100x as a general truth. Synthetic demo data repeats itself and compresses far too well, and the InnoDB figure includes the primary key and secondary indexes that make the hot tier searchable. On production data expect about one order of magnitude. The direction matches what Evgeniy measured at 500 GB, where the DuckDB engine held TPC-H in 26 percent of the raw CSV size and InnoDB needed 135 percent. Column formats fit this data. Row formats do not.</p>
<p>One <code>mydumper</code> pass adds the state side: a baseline snapshot of the tables themselves, also stored as Parquet. For the demo shop that was 2.6 million rows in 8 MB, done in under four seconds. dbtrail uses baselines to rebuild full tables and single rows at a point in time; here they also give DuckDB something current to query.</p>
<h2>Stock DuckDB, no plugins</h2>
<p>The archive is just files, so the query engine does not have to be dbtrail. One command, <code>bintrail views</code> (bintrail is the name of dbtrail’s CLI binary), writes a single SQL file of DuckDB view definitions over the layout it knows about: an <code>events</code> view across every archived partition, and one <code>state__</p>
<table> view per table of the newest baseline:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">bintrail views --index-dsn <span class="s2">"</span><span class="nv">$IDX</span><span class="s2">"</span> --baseline-dir /data/baselines --out views.sql
</span></span><span class="line"><span class="cl">duckdb
</span></span><span class="line"><span class="cl">D .read views.sql</span></span></code></pre>
</div>
</div>
</div>
<p>That is the whole integration. dbtrail never opens DuckDB and never runs what it prints; the file is plain SQL you can read before you use it. From there, use any DuckDB you like: the CLI, a notebook, a BI tool’s connector. Same laptop, same data, same queries on both engines:</p>
<p><figure><img decoding="async" width="2160" height="1456" src="https://percona.community/blog/2026/08/duckdb-mysql-query-latency_hu_65d4d0d857c5dd52.webp" alt="Dot plot on a log scale, two groups: three queries over the event history and two over current state; MySQL InnoDB takes 0.4 to 4.6 seconds, stock DuckDB over Parquet takes 0.04 to 0.16 seconds, 11 to 112 times faster" loading="lazy"></figure>
</p>
<p>Now the fine print, because a benchmark without it is just marketing. The chart has two groups. The first group queries the event history: those scans hit a 2.8 GB index with the container’s stock 128 MB buffer pool, so InnoDB paid for disk reads, and a bigger pool narrows that gap. The second group runs over current state and is the fair comparison: I grew the pool to 4 GB, both tables sat fully in cache, and the 11x and 20x that remain come from the design of the engine, not from the disk. Both engines returned the same results, down to the last decimal. That is a free integrity check: two independent systems read the same history and agreed.</p>
<p>These are laptop numbers, and I did not run TPC-H. For the ceiling of what columnar execution does at 500 GB, read Evgeniy’s second post. My point is the floor: 2.8 GB of freshly rotated history sat on my laptop as 26 MB of open files, and a stock engine answers questions over them in tens of milliseconds. Nobody patched anything to get here.</p>
<h2>The part a replica cannot do</h2>
<p>A DuckDB replica holds current state. dbtrail holds what happened. This is the same data the analytics just scanned, now in the console’s Events view, filtered to one order:</p>
<p><figure><img decoding="async" width="1493" height="812" src="https://percona.community/blog/2026/08/dbtrail-console-events-diff_hu_4818001f8a06f677.webp" alt="dbtrail console Events view: the three events of order 997000, INSERT then UPDATE then DELETE, with the UPDATE expanded to show full before and after images and an Undo this change button" loading="lazy"></figure>
</p>
<p>Three events tell the row’s whole story: created, cancelled, deleted, each with its GTID and the connection that did it. The expanded UPDATE shows the full before and after images dbtrail keeps for every change.</p>
<p>Here is the detail that surprises people: when I took that screenshot, the MySQL side of the index held zero rows. Rotation had dropped every partition. The console read the answer from the Parquet tier in under 200 milliseconds. The Undo button works from there too:</p>
<p><figure><img decoding="async" width="1493" height="812" src="https://percona.community/blog/2026/08/dbtrail-console-restore-undo_hu_a6b3c278c6e1ea4a.webp" alt="dbtrail console Restore view: one click on Undo this change produced reversal.sql, a reviewed-before-applied script that reverses exactly one UPDATE, with Copy and Download buttons" loading="lazy"></figure>
</p>
<p>One click wrote <code>reversal.sql</code>: a script that puts the row back exactly as it was, tagged with the GTID it reverses. Nothing runs on its own; you read the script, then you apply it. The same Restore view takes a whole table and a time window: the demo’s 5,000 deleted orders came back as 5,000 INSERT statements, generated in 0.2 seconds, from files, while the database that held that history no longer existed.</p>
<p>A column store fed by your binlog does not have to be a replica. It can be a time machine.</p>
<h2>Trade-offs, honestly</h2>
<p>Neither road wins outright.</p>
<p><strong>Where the storage engine is better: its DuckDB copy is always current, and it speaks MySQL protocol.</strong> A DuckDB engine on a replica runs seconds behind the primary, and existing BI tools connect to it unchanged. dbtrail’s capture also runs seconds behind, and its console and CLI query that fresh index directly. What waits is the copy DuckDB reads: the events view covers the hours already rotated to Parquet, and the state views show the latest baseline, so that side is as current as your rotation and baseline schedule. If you need a BI tool on MySQL protocol reading a complete, current copy, Evgeniy’s architecture, or a product like HeatWave, aims at exactly that.</p>
<p><strong>Where staying outside the server is better: risk and history.</strong> The hardest place to change a database is the commit path, and a storage engine lives there. The 2PC bug shows the kind of failure that layer produces, and it took a dedicated test harness to find it, because it was silent. A replication client cannot corrupt a commit. Its failure modes are lag and gaps, and dbtrail reports gaps as a first-class verdict rather than hoping. History is the other half: audit, point-in-time rebuilds, and row-level undo all come from the same files the analytics read.</p>
<p><strong>Shared constraints.</strong> Both roads need <code>ROW</code> format with <code>FULL</code> row images. Both need primary keys to apply or reverse UPDATEs and DELETEs. Both leave the source of truth in InnoDB, untouched. On maturity: the engine posts describe an experiment and say so; dbtrail is released and versioned (v0.65.0 as I write this) but young, and you should question my numbers the same way I question everyone else’s.</p>
<p>Both posts and this one agree on the base facts: row stores are the wrong shape for analytical scans, DuckDB fits MySQL-shaped data well, and the open question is where the column store should live. Evgeniy shows what you gain when the server cooperates. dbtrail shows what you get when you leave the server alone.</p>
<h2>Reproduce it</h2>
<p>dbtrail binaries are on the <a href="https://github.com/dbtrail/dbtrail/releases" target="_blank" rel="noopener noreferrer">releases page</a>; DuckDB comes from your package manager. The web console ships as its own binary, <code>bintrail-console</code>, and can also run capture and console together as one daemon (<code>bintrail-console watch</code>).</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-2" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># 1. A source with binlogs (ROW + FULL are 8.0 defaults)</span>
</span></span><span class="line"><span class="cl">docker run -d --name demo -p 13310:3306 -e <span class="nv">MYSQL_ROOT_PASSWORD</span><span class="o">=</span>demo <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> percona/percona-server:8.0 --gtid-mode<span class="o">=</span>ON --enforce-gtid-consistency<span class="o">=</span>ON <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --binlog-rows-query-log-events<span class="o">=</span>ON --binlog-ignore-db<span class="o">=</span>bintrail_index
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># 2. Create your schema, then point dbtrail at it</span>
</span></span><span class="line"><span class="cl">bintrail init --index-dsn <span class="s2">"</span><span class="nv">$IDX</span><span class="s2">"</span>
</span></span><span class="line"><span class="cl">bintrail snapshot --source-dsn <span class="s2">"</span><span class="nv">$SRC</span><span class="s2">"</span> --index-dsn <span class="s2">"</span><span class="nv">$IDX</span><span class="s2">"</span> --schemas shop
</span></span><span class="line"><span class="cl">bintrail stream --source-dsn <span class="s2">"</span><span class="nv">$SRC</span><span class="s2">"</span> --index-dsn <span class="s2">"</span><span class="nv">$IDX</span><span class="s2">"</span> --server-id <span class="m">4444</span> --schemas shop <span class="p">&amp;</span>
</span></span><span class="line"><span class="cl">bintrail-console serve --index-dsn <span class="s2">"</span><span class="nv">$IDX</span><span class="s2">"</span> --baseline-dir /data/baselines <span class="p">&amp;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># 3. Run your workload, then tier the history out and take a baseline</span>
</span></span><span class="line"><span class="cl">bintrail rotate --index-dsn <span class="s2">"</span><span class="nv">$IDX</span><span class="s2">"</span> --retain 7d --archive-dir /data/archives
</span></span><span class="line"><span class="cl">bintrail dump --source-dsn <span class="s2">"</span><span class="nv">$SRC</span><span class="s2">"</span> --output-dir /data/dump --schemas shop
</span></span><span class="line"><span class="cl">bintrail baseline --input /data/dump --output /data/baselines
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># 4. Hand the whole thing to DuckDB</span>
</span></span><span class="line"><span class="cl">bintrail views --index-dsn <span class="s2">"</span><span class="nv">$IDX</span><span class="s2">"</span> --baseline-dir /data/baselines --out views.sql
</span></span><span class="line"><span class="cl">duckdb -c <span class="s2">".read views.sql"</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> -c <span class="s2">"SELECT table_name, event_type, COUNT(*) FROM events GROUP BY 1,2;"</span></span></span></code></pre>
</div>
</div>
</div>
<p>If you try dbtrail, tell me where it fails as much as where it works well. Issues and pull requests are open at <a href="https://github.com/dbtrail/dbtrail" target="_blank" rel="noopener noreferrer">github.com/dbtrail/dbtrail</a>, and I am around in the Percona Community Slack.</p>
</table>
<p></code></p>
<p><a href="https://percona.community/blog/2026/08/26/duckdb-speed-on-mysql-without-a-new-storage-engine/">DuckDB Speed on MySQL with dbtrail, Without a New Storage Engine</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Postgres + ClickHouse Architectural Patterns</title>
        <link>https://severalnines.com/blog/postgres-clickhouse-architectural-patterns/</link>
        <pubDate>Wed, 26 Aug 2026 08:08:43 +0000</pubDate>
        <dc:creator>Agus Syafaat</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/postgres-clickhouse-architectural-patterns/</guid>
        <source url="https://severalnines.com/">Severalnines</source>
        <description><![CDATA[<p>The role of databases has shifted significantly as modern applications must deliver real-time analytics, dashboards, and machine learning alongside low-latency transaction processing. Handling these diverse demands with a single relational database has become unsustainable under growing data volumes. Consequently, organizations are adopting specialized database architectures where multiple engines work together based on their strengths, allowing […]<br />
The post Postgres + ClickHouse Architectural Patterns appeared first on Severalnines.</p>
<p><a href="https://severalnines.com/blog/postgres-clickhouse-architectural-patterns/">Postgres + ClickHouse Architectural Patterns</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>The role of databases has shifted significantly as modern applications must deliver real-time analytics, dashboards, and machine learning alongside low-latency transaction processing. Handling these diverse demands with a single relational database has become unsustainable under growing data volumes. Consequently, organizations are adopting specialized database architectures where multiple engines work together based on their strengths, allowing transactional and analytical workloads to coexist without competing for system resources.</p>
<p>This shift highlights the combination of <a href="https://severalnines.com/clustercontrol/databases/postgresql">PostgreSQL</a> and <a href="https://severalnines.com/clustercontrol/databases/clickhouse">ClickHouse</a> as a compelling solution for modern data platforms, with Postgres serving as the authoritative transactional system, and ClickHouse operating as a high-performance analytical platform for processing massive datasets in real time. Together, they function as complementary components connected through continuous Change Data Capture (CDC) synchronization. Before we get into the common architectural patterns, let’s briefly look at why Postgres + ClickHouse.</p>
<h2 class="wp-block-heading">Why Postgres + ClickHouse?</h2>
<p>PostgreSQL excels at Online Transaction Processing (OLTP). Utilizing mature ACID compliance, MVCC, and advanced indexing, it serves as the operational system of record for managing concurrent transactions like accounts, finance, and inventory.</p>
<p>In contrast, analytical workloads like BI dashboards and fraud detection require scanning millions or billions of historical records. Running these massive sequential scans continuously on a production OLTP system increases CPU, memory, and latency, ultimately degrading application performance.</p>
<p>ClickHouse solves this issue as a column-oriented Online Analytical Processing (OLAP) database designed for rapid queries over massive datasets. Instead of replacing PostgreSQL, ClickHouse complements it by offloading complex analytical processing.<br />Consequently, architectural focus has shifted from choosing between the two platforms to determine how they can work together effectively. This reflects a trend toward polyglot persistence, where specialized databases collaborate to handle distinct transactional and analytical workloads.</p>
<h2 class="wp-block-heading">Pattern 1: Postgres to ClickHouse Real-Time Analytics</h2>
<p>The widely adopted PostgreSQL and ClickHouse architecture uses PostgreSQL as the transactional source of truth while continuously replicating data to ClickHouse for analytical processing. This separates workloads without complex ETL pipelines, allowing applications and BI tools to query ClickHouse directly. Because ClickHouse is optimized for large scans and aggregations, dashboards load significantly faster while keeping production PostgreSQL tables responsive and isolated from heavy reporting risks.</p>
<p>This approach is ideal for real-time systems like SaaS, fintech, and IoT platforms, where fast dashboard updates are a key part of the product experience.</p>
<h3 class="wp-block-heading">Architecture Overview</h3>
<p>In a typical PostgreSQL and ClickHouse deployment, applications run transactional operations on PostgreSQL to ensure data consistency. Committed transactions are then replicated to ClickHouse via a Change Data Capture pipeline, enabling analytical queries to execute independently from the OLTP workload.</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="753" height="1024" src="https://severalnines.com/wp-content/uploads/2026/08/1-753x1024.jpeg" alt="" class="wp-image-44506"></figure>
<p>By separating the transaction plane from the analytics plane, organizations allow each database to focus on the workload for which it was designed, improving scalability, reducing resource contention, and simplifying performance tuning.</p>
<h3 class="wp-block-heading">Keeping Analytics in Sync with Change Data Capture (CDC)</h3>
<p>This architecture uses Change Data Capture (CDC) to continuously synchronize transactional changes from PostgreSQL to ClickHouse. By capturing inserts, updates, and deletes directly from PostgreSQL’s Write-Ahead Log (WAL) via logical decoding and replication, CDC avoids periodic ETL jobs, minimizing latency for near real-time operational dashboards and analytics.</p>
<p>Enabling this requires configuring the correct PostgreSQL WAL level and exposing individual tables via publications to stream changes.</p>
<pre class="wp-block-code"><code>ALTER SYSTEM SET wal_level = logical;

CREATE PUBLICATION app_events_pub
FOR TABLE
    orders,
    order_events,
    account_events;</code></pre>
<p>CDC services (such as ClickHouse, ClickPipes, or PeerDB) continuously replicate PostgreSQL changes to ClickHouse, reducing data delays and operational overhead compared to traditional batch ETL.</p>
<p>However, monitoring operational factors like replication slots, WAL retention, schema changes, connectivity, backfills, and replication lag is essential, making latency a critical component of real-time dashboard SLOs.</p>
<h3 class="wp-block-heading">Operational Readiness Checklist</h3>
<p>Pre-production deployment of PostgreSQL alongside ClickHouse requires robust operations: identifying authoritative source tables, validating CDC pipelines, and setting replication lag alerts before dashboards rely on the data.</p>
<p>Schema design must transform normalized PostgreSQL tables into denormalized ClickHouse models, defining clear update/delete semantics for append-optimized engines like <code>ReplacingMergeTree</code>. Independently test backfills and run regular reconciliation jobs to detect sync issues early.</p>
<p>Finally, set clear data freshness objectives and monitor metrics like ingestion throughput, WAL growth, slot utilization, and latency, treating CDC as a production service to ensure a reliable platform.</p>
<h2 class="wp-block-heading">Pattern 2: Hot / Cold Time-Series Data</h2>
<p>In this architecture, PostgreSQL stores only recent operational data for transactional processing, while ClickHouse holds the complete historical record. A continuous CDC pipeline synchronizes changes into ClickHouse, enabling PostgreSQL to safely expire older data after verified replication.</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="906" src="https://severalnines.com/wp-content/uploads/2026/08/2-1024x906.jpeg" alt="" class="wp-image-44507"></figure>
<h3 class="wp-block-heading">Time-Series Data Lifecycle</h3>
<p>Combining PostgreSQL and ClickHouse separates operational data from long-term analytical data. Organizations can store only day-to-day operational records in PostgreSQL, while continuously archiving historical data in ClickHouse via a Change Data Capture (CDC) pipeline.</p>
<figure class="wp-block-image aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="476" height="1024" src="https://severalnines.com/wp-content/uploads/2026/08/3-476x1024.jpeg" alt="" class="wp-image-44508"></figure>
<p>In a typical deployment, PostgreSQL serves as the system of record for transactional workloads, storing recent data, e.g., the last 30 days, to support low-latency OLTP operations. Simultaneously, committed transactions are streamed to ClickHouse via logical replication and a CDC connector such as Debezium, PeerDB, or native decoding. ClickHouse maintains a complete historical archive optimized for analytical queries without affecting operational database performance.</p>
<h2 class="wp-block-heading">Pattern 3: Federated Query with pg_clickhouse</h2>
<p>Instead of forcing applications and BI tools to communicate directly with ClickHouse, PostgreSQL remains the primary SQL endpoint. The <code>pg_clickhouse</code> extension transparently pushes supported analytical queries to ClickHouse while preserving PostgreSQL compatibility.</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="281" src="https://severalnines.com/wp-content/uploads/2026/08/4-1024x281.jpeg" alt="" class="wp-image-44509"></figure>
<h3 class="wp-block-heading">Federated Query Execution Flow</h3>
<p>Upon reaching PostgreSQL, a query is processed by the parser and query planner. The <code>pg_clickhouse</code> extension then automatically determines if it is a transactional (OLTP) or analytical (OLAP) workload. This routing happens before execution and is completely transparent to the application.</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="772" src="https://severalnines.com/wp-content/uploads/2026/08/5-1024x772.jpeg" alt="" class="wp-image-44510"></figure>
<p><strong>OLTP queries</strong>, such as inserting orders or retrieving records by primary key, execute locally within PostgreSQL to maintain ACID guarantees, MVCC concurrency control, and low-latency transaction processing.</p>
<p><strong>Analytical queries</strong>, like large aggregations or historical reporting scanning millions of rows, are forwarded to ClickHouse, leveraging its columnar storage engine, vectorized execution, and compression for significantly faster performance.</p>
<h2 class="wp-block-heading">Pattern 4: Embedded Analytics in SaaS Applications</h2>
<p>Customer-facing dashboards require analytics to become part of the production application itself. Every customer request may trigger analytical queries while transactional operations continue independently. This makes CDC freshness, query latency, and workload isolation part of the application’s reliability requirements.</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="772" src="https://severalnines.com/wp-content/uploads/2026/08/6-1024x772.jpeg" alt="" class="wp-image-44511"></figure>
<h3 class="wp-block-heading">Embedded Analytics Operational Components</h3>
<p>While PostgreSQL and ClickHouse serve different workloads, the success of a hybrid analytics platform depends on the operational components that ensure data consistency, low latency, and service reliability. The CDC pipeline is only one part of the architecture and operators must also continuously monitor the health of the entire data flow.</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="646" src="https://severalnines.com/wp-content/uploads/2026/08/7-1024x646.jpeg" alt="" class="wp-image-44512"></figure>
<p>End-to-end observability is critical for production deployments. Monitoring should include PostgreSQL replication health, CDC connector status, ClickHouse ingestion throughput, query performance, storage utilization, and dashboard latency. A centralized monitoring platform enables operators to correlate issues across the entire pipeline, reducing mean time to detection (MTTD) and mean time to recovery (MTTR).</p>
<h2 class="wp-block-heading">Pattern 5: Hybrid</h2>
<p>Many production environments combine three specialized database platforms. PostgreSQL serves as the transactional system of record for business-critical operations like user management, orders, accounts, and billing. Its ACID compliance, MVCC model, and mature ecosystem suit Online Transaction Processing (OLTP) workloads requiring strong consistency.</p>
<p>Meanwhile, TimescaleDB handles operational time-series workloads like application metrics, IoT readings, and telemetry. Hypertables, native compression, continuous aggregates, and automated retention enable efficient storage and querying while maintaining full PostgreSQL compatibility.</p>
<p>For analytical processing, ClickHouse offers a column-oriented database optimized for Online Analytical Processing (OLAP). It runs complex queries across billions of rows for dashboards, BI, and trend analysis. Isolating analytical workloads prevents reports and insights from impacting operational application performance.</p>
<figure class="wp-block-image aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="826" height="1024" src="https://severalnines.com/wp-content/uploads/2026/08/8-826x1024.jpeg" alt="" class="wp-image-44513"></figure>
</p>
<h3 class="wp-block-heading">Postgres vs. TimescaleDB vs. ClickHouse Decision Tree</h3>
<p>To optimize performance, scalability, and operational efficiency, a simple decision process helps determine whether PostgreSQL, <a href="https://severalnines.com/clustercontrol/databases/timescaledb">TimescaleDB</a>, or ClickHouse is the best fit for a particular use case.</p>
<figure class="wp-block-image aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="510" height="1024" src="https://severalnines.com/wp-content/uploads/2026/08/9-510x1024.jpeg" alt="" class="wp-image-44514"></figure>
<h2 class="wp-block-heading">Operating Postgres + ClickHouse in Production</h2>
<p>Previously, we explored how PostgreSQL and ClickHouse complement each other through real-time operational analytics, hot/cold storage, and federated queries using <code>pg_clickhouse</code>. However, successfully operating them in production requires understanding Change Data Capture (CDC) behavior under failure conditions, monitoring health, preparing runbooks, and establishing clear ownership across all layers. I’ll look at the operational perspective, examining how to keep the architecture healthy, diagnose common problems, and run a reliable production platform.</p>
<h3 class="wp-block-heading">Native CDC for Operators</h3>
<p>Change Data Capture (CDC) is the foundation of PostgreSQL and ClickHouse synchronization, ensuring ClickHouse operates as a near-real-time analytical platform rather than an outdated copy. For operators, understanding its internal mechanics is essential.</p>
<p>In PostgreSQL, CDC utilizes the Write-Ahead Log (WAL), logical decoding, and logical replication instead of scheduled ETL jobs. PostgreSQL continuously records committed transactions in the WAL, which logical replication decodes into inserts, updates, and deletes. The process starts with an initial snapshot of existing data before transitioning into continuous streaming, keeping ClickHouse perfectly synchronized.</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="772" src="https://severalnines.com/wp-content/uploads/2026/08/10-1024x772.jpeg" alt="" class="wp-image-44515"></figure>
<p>While modern services like ClickPipes and PeerDB simplify deployment over traditional Kafka- or Debezium-based architectures, native CDC still requires operational responsibility. Complexity merely shifts to monitoring, validation, and operational governance.</p>
<p>Crucially, operators must monitor logical replication slots. If a CDC consumer stops, PostgreSQL retains unconsumed WAL files, causing uncontrolled disk growth that can exhaust storage and disrupt the primary database.</p>
<p>A useful operational query for monitoring replication slots is shown below:</p>
<pre class="wp-block-code"><code>SELECT
    slot_name,
    plugin,
    active,
    restart_lsn,
    confirmed_flush_lsn
FROM pg_replication_slots;</code></pre>
<p>This information allows operators to verify whether replication slots remain active and downstream consumers acknowledge changes.</p>
<p><strong>Distinguishing between the initial snapshot and continuous replication is critical.</strong> Initial snapshots transfer gigabytes or terabytes of data, where replication lag is expected and should not trigger alerts. Afterward, continuous replication must meet defined freshness objectives, limiting delay to seconds or minutes.</p>
<p>ClickHouse managed CDC services require direct PostgreSQL connectivity and do not support proxy layers like PgBouncer, Amazon RDS Proxy, or Supabase Pooler. This must be considered during network, firewall, and infrastructure deployment.</p>
<h3 class="wp-block-heading">Operational Failure Modes</h3>
<p>The primary challenge in PostgreSQL and ClickHouse architectures lies in system interactions, making an effective troubleshooting strategy vital when incidents span multiple layers.</p>
<p>The most frequent operational issue is CDC (Change Data Capture) lag, which leads to stale dashboards and visible delays for users even if PostgreSQL remains healthy. Operators must monitor a range of metrics, including replication lag, slot status, WAL generation rates, ClickHouse throughput, and end-to-end freshness, rather than just basic database health.</p>
<p>Schema evolution also presents difficulties, as application releases regularly modify PostgreSQL tables. Because ClickHouse schemas are denormalized for analysis, schema updates require precise transformations to avoid pipeline interruptions or data gaps.</p>
<p>Furthermore, updates and deletes require deliberate management. While PostgreSQL modifies rows directly, ClickHouse is built for append-heavy workloads. Managing updates demands strategies like ReplacingMergeTree, version columns, or deduplication, while deletes rely on tombstones, soft-delete flags, or scheduled merges.</p>
<p>Query routing errors frequently impact performance; analytical queries on PostgreSQL exhaust resources, whereas point lookups on ClickHouse introduce latency. Federated query setups add further complexity, as performance hinges on whether execution is successfully pushed to ClickHouse or falls back to PostgreSQL.</p>
<p>Finally, security and governance grow more complex because user accounts, roles, authentication, and auditing differ between the platforms. Replicated analytical data often requires distinct access controls, encryption, and logging compared to the source transactional system.</p>
<h2 class="wp-block-heading">Hybrid Operations with ClusterControl</h2>
<p>As organizations adopt specialized databases like PostgreSQL, ClickHouse, TimescaleDB, Redis, Valkey, MongoDB, MySQL, and MariaDB, operational complexity grows. Rather than managing each technology independently, platform teams require unified tooling to support these heterogeneous environments.</p>
<p><a href="https://severalnines.com/clustercontrol/">ClusterControl</a> fits this strategy by delivering unified lifecycle management, including deployment, monitoring, backup, recovery, and automation, for multiple open-source databases across on-premises and cloud environments. As PostgreSQL and ClickHouse architectures grow more common, its operational management extends well beyond simple server provisioning.</p>
<figure class="wp-block-image aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="393" height="1024" src="https://severalnines.com/wp-content/uploads/2026/08/11-393x1024.jpeg" alt="" class="wp-image-44516"></figure>
<p>PostgreSQL management involves deployment automation, high availability, backups, PITR, replication monitoring, and upgrade planning. ClickHouse adds backup strategies, merge monitoring, storage capacity planning, and query optimization. The connecting CDC pipeline also requires production-level monitoring, health checks, and incident response.</p>
<p>Support teams must prepare operational runbooks before production deployment. These should document reference architectures, failure modes, CDC troubleshooting, reconciliation workflows, schema migrations, and team escalation paths.</p>
<h2 class="wp-block-heading">Recommended Reference Architectures</h2>
<p>Although PostgreSQL and ClickHouse can be combined in numerous ways, several architectural patterns have consistently emerged across production deployments.</p>
<h3 class="wp-block-heading">Architecture A: SaaS Operational Analytics</h3>
<p>This architecture positions PostgreSQL as the transactional system of record while ClickHouse powers customer-facing dashboards through near-real-time CDC replication. Optionally, <code>pg_clickhouse</code> provides SQL compatibility for existing applications. This pattern is particularly suitable for SaaS platforms, product analytics, billing systems, and customer usage reporting.</p>
<figure class="wp-block-image aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="486" height="1024" src="https://severalnines.com/wp-content/uploads/2026/08/12-486x1024.jpeg" alt="" class="wp-image-44517"></figure>
<h3 class="wp-block-heading">Architecture B: Hot / Cold Time-Series Data</h3>
<p>Recent operational data remains inside PostgreSQL while historical records migrate into ClickHouse after successful replication. Data expiration is governed by replication watermarks rather than fixed retention schedules, ensuring historical data remains protected.</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="772" src="https://severalnines.com/wp-content/uploads/2026/08/13-1024x772.jpeg" alt="" class="wp-image-44518"></figure>
<h3 class="wp-block-heading">Architecture C: Federated Analytics</h3>
<p>Applications continue connecting to PostgreSQL while pg_clickhouse pushes analytical execution into ClickHouse. This minimizes migration effort while improving analytical performance.</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="753" height="1024" src="https://severalnines.com/wp-content/uploads/2026/08/14-753x1024.jpeg" alt="" class="wp-image-44520"></figure>
<h3 class="wp-block-heading">Architecture D: Hybrid Cloud Analytics</h3>
<p>Transactional PostgreSQL clusters remain within customer-controlled environments while ClickHouse operates as a managed analytical platform in the cloud. Secure connectivity is established through VPNs, private networking, or dedicated links.</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="772" src="https://severalnines.com/wp-content/uploads/2026/08/15-1024x772.jpeg" alt="" class="wp-image-44521"></figure>
<h2 class="wp-block-heading">Production Readiness Checklist</h2>
<p>Before deploying PostgreSQL and ClickHouse into production, organizations should validate both technical implementation and operational preparedness. Successful production environments depend as much on operational discipline as on architectural design.</p>
<h3 class="wp-block-heading">Before Deployment</h3>
<ul class="wp-block-list">
<li>Identify authoritative source-of-truth tables.</li>
<li>Define which datasets require CDC.</li>
<li>Enable logical replication.</li>
<li>Design ClickHouse analytical schemas.</li>
<li>Define update and delete handling.</li>
<li>Establish naming conventions.</li>
<li>Validate firewall and network connectivity.</li>
<li>Review proxy limitations.</li>
<li>Plan initial snapshots and historical backfills.</li>
</ul>
<h3 class="wp-block-heading">During Rollout</h3>
<ul class="wp-block-list">
<li>Execute the initial snapshot.</li>
<li>Enable continuous CDC.</li>
<li>Compare row counts and business metrics.</li>
<li>Benchmark representative analytical queries.</li>
<li>Test failover scenarios.</li>
<li>Validate schema migrations.</li>
<li>Verify dashboard freshness.</li>
<li>Ensure retention policies do not remove data prematurely.</li>
</ul>
<h3 class="wp-block-heading">After Go-Live</h3>
<ul class="wp-block-list">
<li>Monitor replication lag continuously.</li>
<li>Observe WAL growth.</li>
<li>Monitor ClickHouse insert throughput.</li>
<li>Watch merge activity.</li>
<li>Reconcile PostgreSQL and ClickHouse data regularly.</li>
<li>Review schema drift after every application release.</li>
<li>Maintain operational documentation and escalation procedures.</li>
</ul>
<h2 class="wp-block-heading">Conclusion</h2>
<p>Modern data platforms use specialized architectures where each database handles specific workloads. PostgreSQL serves as a reliable transactional system of record, while ClickHouse enables high-performance real-time analytics without impacting transactional performance.<br />Operating this architecture requires managing Change Data Capture, replication health, schema evolution, and data reconciliation. In hybrid database environments, platforms like </p>
<p>ClusterControl provide valuable unified management across multiple database technologies.<br />Ultimately, the future involves combining both technologies into a cohesive platform. Organizations that invest in both the architecture and its supporting operational processes will ensure long-term scalability and production reliability.</p>
<h2 class="wp-block-heading">Install ClusterControl and try Postgres and ClickHouse free for 30 days</h2>
<h3 class="wp-block-heading">Script Installation Instructions</h3>
<p>The installer script is the simplest way to get ClusterControl up and running. Run it on your chosen host, and it will take care of installing all required packages and dependencies.</p>
<p>Offline environments are supported as well. See the <a href="https://docs.severalnines.com/clustercontrol/latest/getting-started/installation/offline-installation/">Offline Installation</a> guide for more details.</p>
<p>On the ClusterControl server, run the following commands:</p>
<pre class="wp-block-code"><code>wget https://severalnines.com/downloads/cmon/install-cc
chmod +x install-cc
sudo ./install-cc     # omit sudo if you run as root</code></pre>
<p>After the installation is complete, open a web browser, navigate to <code>https:///</code>, and create the first admin user by entering a username (note that “admin” is reserved) and a password on the <a href="https://docs.severalnines.com/clustercontrol/latest/getting-started/quickstart/#step-2-create-the-first-admin-user">welcome page</a>. Once you’re in, you can <a href="https://docs.severalnines.com/clustercontrol/latest/user-guide/deployment/create-database-cluster/">deploy</a> a new database cluster or <a href="https://docs.severalnines.com/clustercontrol/latest/user-guide/deployment/import-database-cluster/">import</a> an existing one.</p>
<p>The installer script supports a range of environment variables for advanced setup. You can define them using export or by prefixing the install command.</p>
<p>See the <a href="https://docs.severalnines.com/clustercontrol/latest/getting-started/installation/online-installation/#environment-variables">list of supported variables</a> and <a href="https://docs.severalnines.com/clustercontrol/latest/getting-started/installation/online-installation/#example-use-cases">example use cases</a> to tailor your installation.</p>
<p>The post <a href="https://severalnines.com/blog/postgres-clickhouse-architectural-patterns/">Postgres + ClickHouse Architectural Patterns</a> appeared first on <a href="https://severalnines.com/">Severalnines</a>.</p>
<p><a href="https://severalnines.com/blog/postgres-clickhouse-architectural-patterns/">Postgres + ClickHouse Architectural Patterns</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Server 12.3, 11.8, 11.4 and 10.11 – Q3 2026 Maintenance Releases, and Goodbye 10.6</title>
        <link>https://mariadb.org/mariadb-server-12-3-11-8-11-4-and-10-11-q3-2026-maintenance-releases-and-goodbye-10-6/</link>
        <pubDate>Tue, 25 Aug 2026 12:14:09 +0000</pubDate>
        <dc:creator>Frédéric Descamps</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-server-12-3-11-8-11-4-and-10-11-q3-2026-maintenance-releases-and-goodbye-10-6/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB Server maintenance releases are here!<br />
On August 24, we released updates for our four currently maintained Long Term Support series:<br />
As usual, these maintenance releases include bug fixes, stability improvements, and ongoing work across MariaDB Server. …<br />
Continue reading "MariaDB Server 12.3, 11.8, 11.4 and 10.11 – Q3 2026 Maintenance Releases, and Goodbye 10.6"<br />
MariaDB Server 12.3, 11.8, 11.4 and 10.11 – Q3 2026 Maintenance Releases, and Goodbye 10.6 appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/mariadb-server-12-3-11-8-11-4-and-10-11-q3-2026-maintenance-releases-and-goodbye-10-6/">MariaDB Server 12.3, 11.8, 11.4 and 10.11 – Q3 2026 Maintenance Releases, and Goodbye 10.6</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Server maintenance releases are here!<br />
On August 24, we released updates for our four currently maintained Long Term Support series:<br />
As usual, these maintenance releases include bug fixes, stability improvements, and ongoing work across MariaDB Server. … </p>
<p class="&quot;link-more&quot;"><a href="https://mariadb.org/mariadb-server-12-3-11-8-11-4-and-10-11-q3-2026-maintenance-releases-and-goodbye-10-6/" class="&quot;more-link&quot;">Continue reading<span class="&quot;screen-reader-text&quot;"> &#8220;MariaDB Server 12.3, 11.8, 11.4 and 10.11 – Q3 2026 Maintenance Releases, and Goodbye 10.6&#8221;</span></a></p>
<p><a href="https://mariadb.org/mariadb-server-12-3-11-8-11-4-and-10-11-q3-2026-maintenance-releases-and-goodbye-10-6/">MariaDB Server 12.3, 11.8, 11.4 and 10.11 – Q3 2026 Maintenance Releases, and Goodbye 10.6</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/mariadb-server-12-3-11-8-11-4-and-10-11-q3-2026-maintenance-releases-and-goodbye-10-6/">MariaDB Server 12.3, 11.8, 11.4 and 10.11 – Q3 2026 Maintenance Releases, and Goodbye 10.6</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Contribution Statistics, January-June 2026</title>
        <link>https://mariadb.org/mariadb-contribution-statistics-january-june-2026/</link>
        <pubDate>Tue, 25 Aug 2026 08:28:42 +0000</pubDate>
        <dc:creator>Georgi Kodinov</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-contribution-statistics-january-june-2026/</guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>After a long break, I will be taking over reporting on the contributions. FYI, the last one was done in Jan 2025.<br />
Just like last time, I’m going to start with a breakdown of all the organizations who have contributed to MariaDB Server during the above period. …<br />
Continue reading "MariaDB Contribution Statistics, January-June 2026"<br />
MariaDB Contribution Statistics, January-June 2026 appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/mariadb-contribution-statistics-january-june-2026/">MariaDB Contribution Statistics, January-June 2026</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>After a long break, I will be taking over reporting on the contributions. FYI, the last one was done in <a href="https://mariadb.org/mariadb-contribution-statistics-january-june-2026/%5C%22/mariadb-contribution-statistics-january-2025/%5C%22">Jan 2025</a>.<br />
Just like last time, I’m going to start with a breakdown of all the organizations who have contributed to MariaDB Server during the above period. … </p>
<p class='"link-more"'><a href="https://mariadb.org/mariadb-contribution-statistics-january-june-2026/" class='"more-link"'>Continue reading<span class='"screen-reader-text"'> &#8220;MariaDB Contribution Statistics, January-June 2026&#8221;</span></a></p>
<p><a href="https://mariadb.org/mariadb-contribution-statistics-january-june-2026/">MariaDB Contribution Statistics, January-June 2026</a> appeared first on <a href="https://mariadb.org/">MariaDB.org</a></p>
<p><a href="https://mariadb.org/mariadb-contribution-statistics-january-june-2026/">MariaDB Contribution Statistics, January-June 2026</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Community Server Q3 2026 maintenance releases</title>
        <link>https://mariadb.com/resources/blog/mariadb-community-server-q3-2026-maintenance-releases/</link>
        <pubDate>Mon, 24 Aug 2026 23:40:06 +0000</pubDate>
        <dc:creator>Daniel Bartholomew</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-community-server-q3-2026-maintenance-releases/</guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>MariaDB is pleased to announce the immediate availability of MariaDB Community Server 12.3.3, 11.8.9, 11.4.13, and 10.11.19 maintenance releases. See […]</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-community-server-q3-2026-maintenance-releases/">MariaDB Community Server Q3 2026 maintenance releases</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB is pleased to announce the immediate availability of MariaDB Community Server 12.3.3, 11.8.9, 11.4.13, and 10.11.19 maintenance releases. See the release notes and changelogs for additional details on each release and visit mariadb.com/downloads to download.</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-community-server-q3-2026-maintenance-releases/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/mariadb-community-server-q3-2026-maintenance-releases/">MariaDB Community Server Q3 2026 maintenance releases</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Oracle Exadata Cost Optimization: Migrating to an Open Source Data Infrastructure Stack Without Compromising Performance, Scalability, Availability, or Reliability</title>
        <link>https://minervadb.com/oracle-exadata-cost-optimization-open-source-stack/</link>
        <pubDate>Mon, 24 Aug 2026 20:37:28 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/oracle-exadata-cost-optimization-migrating-to-an-open-source-data-infrastructure-stack-without-compromising-performance-scalability-availability-or-reliability/</guid>
        <source url="https://minervadb.com/">The Data Transformation Company</source>
        <description><![CDATA[<p>MinervaDB whitepaper on Oracle Exadata cost optimization: measure Exadata license spend, optimize in place, then migrate to PostgreSQL 18, ClickHouse 26.3 LTS, Kafka/Debezium and Valkey with code, diagrams, TCO model and a rollback-safe cutover plan. [...]</p>
<p><a href="https://minervadb.com/oracle-exadata-cost-optimization-open-source-stack/">Oracle Exadata Cost Optimization: Migrating to an Open Source Data Infrastructure Stack Without Compromising Performance, Scalability, Availability, or Reliability</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><strong>Document ID:</strong> MDB-WP-2026-08-EXADATA-OSS  |  <strong>Version:</strong> 1.0  |  <strong>Published:</strong> 24 August 2026  |  <strong>Prepared by:</strong> MinervaDB Inc. Database Architecture Practice  |  <strong>Classification:</strong> Public whitepaper</p>
<p>Oracle Exadata cost optimization has two honest paths. The first is to keep Exadata and cut what you pay for it: prune unused options, enable fewer cores, and negotiate before the 19c Extended Support uplift lands. The second, and the one this MinervaDB whitepaper engineers in detail, is a staged data transformation onto a fully open source data infrastructure stack — PostgreSQL 18 for OLTP, ClickHouse 26.3 LTS for analytics, Apache Kafka 4.3 with Debezium 3.6 for change data capture, and Valkey 9.1 for caching — that removes the recurring license and support line entirely while holding performance, scalability, availability, and reliability at Exadata-class SLOs.</p>
<p>The finding, stated up front: on a representative Exadata X11M quarter-rack estate, <strong>the annual software support bill alone (licenses at 22% of net) exceeds the five-year hardware plus subscription-support cost of the replacement open source stack</strong>, and the performance characteristics that justify Exadata — Smart Scan, Storage Indexes, RAC, Hybrid Columnar Compression — each have a measured open source equivalent when the workload is routed to the right engine rather than forced through one. The rest of this paper shows the arithmetic, the architecture, the code, and the failure modes.</p>
<h2>1. Where Oracle Exadata spend actually goes</h2>
<p>Most Exadata cost optimization conversations start with the rack. That is the wrong place to look. The rack is a one-time capital line; the recurring line is software licensing and its 22% annual support, and on Exadata that line is amplified by three mechanisms: every enabled database-server core is licensed at the Oracle core factor, the storage tier carries its own per-disk software license, and the features that make Exadata fast (RAC, Partitioning, Advanced Compression, In-Memory) are separately licensed options rather than part of Enterprise Edition.</p>
<p>The list prices below are taken from Oracle&#8217;s published <a href="https://www.oracle.com/a/ocom/docs/corporate/pricing/technology-price-list-070617.pdf" target="_blank" rel="noopener">Technology Global Price List</a> and <a href="https://www.oracle.com/a/ocom/docs/corporate/pricing/exadata-pricelist-070598.pdf" target="_blank" rel="noopener">Engineered Systems Price List</a> (June/August 2026 editions). Real contracts carry discounts, frequently in the 40–70% range; the ratios between line items are what matter for the model, and the support percentage applies to net, not list.</p>
<table>
<thead>
<tr>
<th>Line item (per processor license unless noted)</th>
<th>List price (USD)</th>
<th>Annual support (22%)</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>Oracle Database Enterprise Edition</td>
<td>$47,500</td>
<td>$10,450</td>
<td>Mandatory on Exadata</td>
</tr>
<tr>
<td>Real Application Clusters</td>
<td>$23,000</td>
<td>$5,060</td>
<td>Instance-failure RTO and consolidation</td>
</tr>
<tr>
<td>Partitioning</td>
<td>$11,500</td>
<td>$2,530</td>
<td>Almost universally in use on Exadata estates</td>
</tr>
<tr>
<td>Advanced Compression</td>
<td>$11,500</td>
<td>$2,530</td>
<td>HCC itself is Exadata-included; OLTP compression is not</td>
</tr>
<tr>
<td>Diagnostics Pack + Tuning Pack</td>
<td>$12,500</td>
<td>$2,750</td>
<td>Required to legally query AWR/ASH</td>
</tr>
<tr>
<td>Active Data Guard</td>
<td>$11,500</td>
<td>$2,530</td>
<td>Readable standby</td>
</tr>
<tr>
<td>Database In-Memory</td>
<td>$23,000</td>
<td>$5,060</td>
<td>Optional; common on HTAP estates</td>
</tr>
<tr>
<td>Exadata Storage Server Software (per disk drive)</td>
<td>$10,000</td>
<td>$2,200</td>
<td>Storage tier, independent of core licensing</td>
</tr>
<tr>
<td>Exadata Database Machine X11M quarter rack (hardware)</td>
<td>$314,681</td>
<td>~$62,936 (systems + OS)</td>
<td>2 database servers, 3 storage servers</td>
</tr>
</tbody>
</table>
<p>Apply the arithmetic to a quarter rack. Each X11M database server ships with two 96-core AMD EPYC processors; with capacity-on-demand a typical estate enables 64 cores per server, so 128 enabled cores × Oracle&#8217;s 0.5 core factor for AMD EPYC = 64 processor licenses (verify against the current Oracle Processor Core Factor Table at engagement time). </p>
<p>A &#8220;standard Exadata option set&#8221; of EE + RAC + Partitioning + Advanced Compression + Diagnostics/Tuning is $106,000 per processor at list, so 64 processors is <strong>$6.78M list</strong> and <strong>$1.49M per year in support</strong>. Add 36 storage-server disk licenses ($360,000 list, $79,200 per year support) and hardware support, and the recurring line on an illustrative quarter rack lands around <strong>$1.63M per year at list, roughly $0.65–0.98M per year after a typical 40–60% discount</strong>. Over five years that recurring line, not the rack, is the number to optimize.</p>
<p>Two further pressures make 2026–2027 the decision window. Oracle Database 21c reaches end of support on 31 July 2027 with no Extended Support, and 19c Premier Support ends 31 December 2029 with Extended Support carrying a +10% year-one and +20% subsequent-year uplift on the support fee (see <a href="https://endoflife.date/oracle-database" target="_blank" rel="noopener">the Oracle Database lifecycle tracker</a>; re-verify dates against MOS note 742060.1 before quoting them in a contract). Estates that stay on Exadata will pay more to stand still.</p>
<h2>2. Oracle Exadata cost optimization in place (what to do first)</h2>
<p>MinervaDB is vendor-neutral, and that cuts both ways: not every Exadata estate should leave. Before any migration business case, run the four measures below. They are reversible, they require no application change, and on several engagements they have cut the recurring line by 25–40% (illustrative range; your figure comes from your own <code>DBA_FEATURE_USAGE_STATISTICS</code>).</p>
<h3>2.1 Measure option usage before you pay for it</h3>
<p>Licensing follows usage, and Oracle&#8217;s own catalog tells you what is used. This is the first query on every MinervaDB Oracle takeover, and it is the evidence for pruning options at renewal. Note the licensing gate: querying <code>DBA_HIST_*</code> or <code>V$ACTIVE_SESSION_HISTORY</code> on an estate without Diagnostics Pack is itself a license event, so check <code>CONTROL_MANAGEMENT_PACK_ACCESS</code> first.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="Oracle: feature usage baseline (run as a user with SELECT on DBA_ views)">-- 1. Licensing gate: what packs is this instance allowed to use?
SHOW PARAMETER control_management_pack_access;

-- 2. Which separately licensed options are actually in use?
SELECT
    u.name                                   AS feature_name,
    u.detected_usages,
    u.currently_used,
    TO_CHAR(u.first_usage_date, 'YYYY-MM-DD') AS first_used,
    TO_CHAR(u.last_usage_date,  'YYYY-MM-DD') AS last_used
FROM dba_feature_usage_statistics u
WHERE u.name IN (
        'Real Application Clusters (RAC)',
        'Partitioning (user)',
        'Advanced Compression',
        'HeapCompression',
        'Hybrid Columnar Compression',
        'In-Memory Column Store',
        'Active Data Guard - Real-Time Query on Physical Standby',
        'Oracle Multitenant',
        'Automatic Workload Repository',
        'SQL Tuning Advisor',
        'Exadata'
      )
  AND u.dbid = (SELECT dbid FROM v$database)
ORDER BY u.currently_used DESC, u.detected_usages DESC;

-- 3. Enabled cores that drive the processor-license count
SELECT
    cpu_count_current,
    cpu_core_count_current,
    cpu_socket_count_current
FROM v$license;</pre>
<p>An option showing <code>currently_used = FALSE</code> and <code>last_used</code> older than the current support term is a renewal negotiation item. In-Memory and Active Data Guard are the most common finds; Tuning Pack is the second.</p>
<h3>2.2 Reduce enabled cores with capacity-on-demand</h3>
<p>Exadata licenses follow enabled cores, not installed cores. Right-size from <code>DBA_HIST_SYSMETRIC_SUMMARY</code> (<code>Host CPU Utilization (%)</code>, p95 over 90 days, only if Diagnostics Pack is licensed — otherwise STATSPACK or OS-level <code>sar</code> data) and reduce enabled cores through OEDA/<code>dbmcli</code> during a maintenance window. Every two cores removed on AMD EPYC saves one processor license of support every year. Blast radius: CPU headroom during peak; rollback: re-enable cores (a reboot of the database server, not a license event, but confirm with your Oracle account team in writing before changing core counts).</p>
<h3>2.3 Offload analytics before you offload anything else</h3>
<p>The most expensive SQL on most Exadata estates is reporting: long-running aggregations that make Exadata&#8217;s Smart Scan look heroic precisely because they are being run on a row-store OLTP engine. Moving those queries to ClickHouse via CDC (Section 5.2) shrinks the Exadata CPU footprint, which in turn reduces enabled cores, which reduces support. This is also the first, lowest-risk phase of the full migration, so nothing done here is wasted if the estate later leaves Exadata entirely.</p>
<h3>2.4 Time the negotiation to the lifecycle</h3>
<p>Do not renew a multi-year support term that runs across the 19c Extended Support boundary without pricing the uplift in. A credible, funded open source migration plan is the most effective negotiating asset an Oracle customer has; the sections below are that plan.</p>
<h2>3. Target open source data infrastructure stack</h2>
<p>Exadata is one engine asked to do three jobs: transactional OLTP, analytical reporting, and hot-key lookups that in practice live in the buffer cache and result cache. The open source design principle is the opposite: route each workload class to the engine built for it, connect them with change data capture, and operate all of it with the same observability and SRE discipline. Every component below is 100% open source, community-supported, and runs on commodity x86/ARM hardware or any cloud.</p>
<figure>
<img loading="lazy" decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMjAwIDY2MCIgd2lkdGg9IjEwMCUiIHJvbGU9ImltZyIgYXJpYS1sYWJlbD0iVGFyZ2V0IG9wZW4gc291cmNlIGRhdGEgaW5mcmFzdHJ1Y3R1cmUgc3RhY2sgcmVwbGFjaW5nIE9yYWNsZSBFeGFkYXRhOiBQb3N0Z3JlU1FMIDE4IHdpdGggUGF0cm9uaSwgUGdCb3VuY2VyIGFuZCBwZ0JhY2tSZXN0IGZvciBPTFRQOyBEZWJleml1bSBhbmQgS2Fma2EgZm9yIENEQzsgQ2xpY2tIb3VzZSAyNi4zIExUUyBmb3IgYW5hbHl0aWNzOyBWYWxrZXkgOS4xIGZvciBjYWNoaW5nOyBQcm9tZXRoZXVzIGFuZCBHcmFmYW5hIGZvciBvYnNlcnZhYmlsaXR5Ij4KPGRlZnM+CjxzdHlsZT4KLmJveHtmaWxsOiNmZmZmZmY7c3Ryb2tlOiMxZjNhNWY7c3Ryb2tlLXdpZHRoOjI7cng6OH0KLnpvbmV7ZmlsbDojZjNmN2ZiO3N0cm9rZTojOWRiM2M5O3N0cm9rZS13aWR0aDoxLjU7c3Ryb2tlLWRhc2hhcnJheTo2IDQ7cng6MTJ9Ci50e2ZvbnQtZmFtaWx5OkludGVyLEFyaWFsLEhlbHZldGljYSxzYW5zLXNlcmlmO2ZvbnQtc2l6ZToxMy41cHg7ZmlsbDojMWYzYTVmfQouaHtmb250LWZhbWlseTpJbnRlcixBcmlhbCxIZWx2ZXRpY2Esc2Fucy1zZXJpZjtmb250LXNpemU6MTZweDtmb250LXdlaWdodDo3MDA7ZmlsbDojMWYzYTVmfQouc3tmb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I2MwMzkyYiI+4oCUIOKAlCBDREMgLyBldmVudCBmbG93IChEZWJleml1bSDihpIgS2Fma2Eg4oaSIGNvbnN1bWVycyk8L3RleHQ+Cjwvc3ZnPg==" alt="Oracle Exadata cost optimization: open source data infrastructure stack reference architecture (PostgreSQL 18, ClickHouse 26.3 LTS, Kafka, Debezium, Valkey)" width="1200" height="660"><figcaption>Figure 1. Target open source data infrastructure stack. Versions are the production-recommended lines as of August 2026: PostgreSQL 18.6, ClickHouse 26.3 LTS, Kafka 4.3.1, Debezium 3.6, Valkey 9.1.1, Patroni 4.1.3, pgBackRest 2.59.0, PgBouncer 1.25.2.</figcaption></figure>
<h3>3.1 Workload-to-engine mapping</h3>
<table>
<thead>
<tr>
<th>Exadata capability</th>
<th>What it actually does for the workload</th>
<th>Open source equivalent</th>
<th>Evidence to compare</th>
</tr>
</thead>
<tbody>
<tr>
<td>Smart Scan / Storage Indexes</td>
<td>Pushes predicate filtering and column projection to storage so large scans read less I/O</td>
<td>ClickHouse MergeTree: columnar storage, primary-key index granules, skip indexes, <code>PREWHERE</code>; PostgreSQL 18 asynchronous I/O (<code>io_method = io_uring</code>) and parallel sequential scans for the OLTP-side reporting that remains</td>
<td><code>cell physical IO bytes saved by storage index</code> vs <code>system.query_log.read_bytes</code> / <code>read_rows</code></td>
</tr>
<tr>
<td>Hybrid Columnar Compression</td>
<td>10–15× compression on cold, read-mostly data</td>
<td>ClickHouse codecs (<code>ZSTD</code>, <code>Delta</code>, <code>DoubleDelta</code>, <code>Gorilla</code>, <code>T64</code>) routinely reach comparable ratios on time-series and fact data; PostgreSQL TOAST <code>lz4</code> for large values</td>
<td><code>DBA_TABLES.COMPRESS_FOR</code> and segment sizes vs <code>system.parts.data_compressed_bytes / data_uncompressed_bytes</code></td>
</tr>
<tr>
<td>RAC</td>
<td>Instance-failure RTO in seconds; horizontal read scaling within one shared-storage database</td>
<td>Patroni quorum failover (RTO measured in tens of seconds, Section 7); read scaling via hot standbys behind PgBouncer; ClickHouse replicas for analytic reads</td>
<td><code>GV$INSTANCE</code> failover drill timings vs Patroni switchover/failover drill timings</td>
</tr>
<tr>
<td>In-Memory Column Store</td>
<td>Vectorised aggregation on hot tables</td>
<td>ClickHouse is vectorised end to end; Valkey serves the hot-key subset</td>
<td>AWR SQL ordered by elapsed time vs <code>system.query_log</code> p99 by <code>normalized_query_hash</code></td>
</tr>
<tr>
<td>Data Guard / Active Data Guard</td>
<td>Physical standby, readable</td>
<td>PostgreSQL streaming replication (sync + async) with hot standby; pgBackRest PITR; ClickHouse cross-DC replicas</td>
<td><code>V$DATAGUARD_STATS</code> apply lag vs <code>pg_stat_replication.replay_lag</code></td>
</tr>
<tr>
<td>Result cache / KEEP pool</td>
<td>Sub-millisecond repeated reads</td>
<td>Valkey 9.1 cluster, write-through from the CDC stream, hash-field TTLs</td>
<td>AWR &#8220;Result Cache&#8221; section vs <code>INFO commandstats</code>, keyspace hit ratio</td>
</tr>
</tbody>
</table>
<p>The mapping is honest about one thing: PostgreSQL alone does not replace Exadata for an estate that mixes heavy analytics with OLTP. The analytics tier is what makes the performance claim hold, and it is why the architecture is a stack rather than a database swap.</p>
<h2>4. Options considered and rejected</h2>
<p>A migration recommendation is only credible if the alternatives were evaluated on their merits. These were, and each is a legitimate choice for a different constraint set.</p>
<p><strong>Oracle Autonomous Database / Exadata Database Service on OCI or Database@Azure/AWS/Google.</strong> Genuine strengths: RAC and Data Guard semantics preserved, patching automated, and the @-cloud variants burn down hyperscaler commitments. Rejected for the cost objective because the license line moves rather than disappears (BYOL or License Included, ECPU-metered), Autonomous removes SYSDBA, RMAN, and OS access, and the exit path from Autonomous is logical-only (Data Pump or GoldenGate). For an estate whose strategic direction is off-Oracle, every Oracle cloud service deepens the moat.</p>
<p><strong>EDB Postgres Advanced Server (EPAS) with Oracle-compatibility mode.</strong> Genuine strengths: packages, PL/SQL dialect, OCI-compatible connector — the shortest path when the PL/SQL estate is large and the rewrite budget is the binding constraint. Rejected as the default because it exchanges Oracle lock-in for EDB lock-in and reintroduces a per-core subscription. MinervaDB supports EPAS estates without ideology; we recommend it only against a named PL/SQL-volume requirement and we say so in writing.</p>
<p><strong>PostgreSQL-only with Citus columnar or TimescaleDB for analytics.</strong> Genuine strengths: one engine to operate, one skill set, transactional consistency across OLTP and reporting. Rejected for estates with true Exadata-class scan volumes because row-store parallelism and columnar access methods in PostgreSQL do not match a purpose-built vectorised MergeTree engine on the billion-row aggregations that justified Exadata in the first place. It remains the right answer for smaller estates whose &#8220;analytics&#8221; is a few hundred GB of reporting.</p>
<p><strong>Managed cloud DBaaS (Amazon RDS/Aurora, Azure Database for PostgreSQL, Cloud SQL/AlloyDB) as the landing zone.</strong> Genuine strengths: operational automation, PostgreSQL 18 availability within days of community GA. Not rejected — the stack in Figure 1 runs on any of them — but the whitepaper models self-managed on commodity hardware or IaaS because that is the configuration with no vendor line at all. </p>
<p>The trade-offs are documented in MinervaDB&#8217;s <a href="https://minervadb.com/postgresql-cloud-aws-aurora-gcp-azure/">PostgreSQL cloud guide for AWS, GCP, and Azure</a>.</p>
<p><strong>Staying on Exadata with the Section 2 measures.</strong> The right answer for estates with deep RAC-dependent ISV applications under change freeze, or where PL/SQL volume exceeds roughly 500k lines with no rewrite budget. Those estates should optimize in place and revisit at the 19c Extended Support boundary.</p>
<h2>5. Performance parity engineering</h2>
<p>&#8220;Without compromising on performance&#8221; is a measurable claim or it is marketing, and it is the test every Oracle Exadata cost optimization plan must pass. The measurement frame we use on every Exadata exit is the same: capture the top-N SQL by elapsed time and I/O from AWR (or STATSPACK on unlicensed estates) before migration, map each statement to its target engine, and compare against <code>pg_stat_statements</code> and <code>system.query_log</code> after migration under production-shaped load. Parity is declared per statement class, never in aggregate.</p>
<h3>5.1 OLTP on PostgreSQL 18: partitioning, plans, and I/O</h3>
<p>Oracle Partitioning is a paid option; PostgreSQL declarative partitioning is not, and since PostgreSQL 17 it supports partition-wise joins and aggregates, identity columns and exclusion constraints on partitioned tables, and partition pruning at execution time. The pattern below converts a typical Oracle range-partitioned order table, retains the Oracle-side <code>NUMBER</code> precision decisions deliberately, and adds <code>pg_partman</code> for the maintenance that Oracle interval partitioning did implicitly.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="PostgreSQL 18: partitioned OLTP table converted from an Oracle range-partitioned table">CREATE TABLE sales.orders (
    order_id          BIGINT GENERATED ALWAYS AS IDENTITY,
    customer_id       BIGINT        NOT NULL,
    order_ts          TIMESTAMP(0)  NOT NULL,   -- Oracle DATE carries time: map to timestamp(0), never date
    status            VARCHAR(16)   NOT NULL,
    amount            NUMERIC(14,2) NOT NULL,   -- NUMBER(14,2) → numeric(14,2); bare NUMBER hot columns → bigint where domain allows
    region_code       CHAR(3)       NOT NULL,
    CONSTRAINT pk_orders PRIMARY KEY (order_id, order_ts)
) PARTITION BY RANGE (order_ts);

-- pg_partman manages monthly partitions and pre-creates 3 months ahead
SELECT partman.create_parent(
    p_parent_table =&gt; 'sales.orders',
    p_control      =&gt; 'order_ts',
    p_interval     =&gt; '1 month',
    p_premake      =&gt; 3
);

CREATE INDEX ix_orders_customer_ts
    ON sales.orders (customer_id, order_ts DESC);

-- Empty string ≠ NULL in PostgreSQL. Oracle code that relied on '' IS NULL must be
-- audited; this CHECK makes the migration assumption explicit and testable.
ALTER TABLE sales.orders
    ADD CONSTRAINT ck_orders_status_not_blank CHECK (status  '');</pre>
<p>Plan reasoning, not just DDL: the hot OLTP query &#8220;recent orders for a customer&#8221; must prune to one or two partitions and walk <code>ix_orders_customer_ts</code>. Verify it with <code>EXPLAIN (ANALYZE, BUFFERS)</code> and look for <em>Partitions removed</em> or a plan that lists only the matching child indexes; a plan that appends every partition is a missing pruning predicate on <code>order_ts</code>, the most common week-one regression on Oracle migrations.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="PostgreSQL 18: verify partition pruning and index usage">EXPLAIN (ANALYZE, BUFFERS, SETTINGS)
SELECT order_id, order_ts, status, amount
FROM sales.orders
WHERE customer_id = 8812931
  AND order_ts &gt;= now() - INTERVAL '45 days'
ORDER BY order_ts DESC
LIMIT 50;

-- Expected shape (trimmed):
-- Limit  (actual time=0.041..0.118 rows=50 loops=1)
--   -&gt;  Merge Append
--         -&gt;  Index Scan Backward using orders_p2026_08_customer_id_order_ts_idx on orders_p2026_08
--               Index Cond: ((customer_id = 8812931) AND (order_ts &gt;= ...))
--         -&gt;  Index Scan Backward using orders_p2026_07_customer_id_order_ts_idx on orders_p2026_07
--   Buffers: shared hit=14
-- Two partitions touched, 14 buffer hits, no heap fetches beyond the index — this is the target shape.</pre>
<p>PostgreSQL 18 changes the I/O story that Exadata customers care about most. The new asynchronous I/O subsystem (<code>io_method = worker</code> by default, <code>io_uring</code> on Linux where enabled at build time) lets sequential scans, bitmap heap scans, and VACUUM issue reads ahead of consumption, and the release notes document the supporting changes: skip-scan on B-tree indexes, parallel GIN builds, and <code>pg_stat_io</code> byte-level accounting (<a href="https://www.postgresql.org/docs/release/18.0/" target="_blank" rel="noopener">PostgreSQL 18 release notes</a>). </p>
<p>The configuration deltas from default that we apply on an Exadata-replacement OLTP node are listed with their reload/restart requirement, per house convention. Proposed values are for a 64 vCPU / 512 GB / NVMe node.</p>
<table>
<colgroup>
<col>
<col>
<col>
<col></colgroup>
<thead>
<tr>
<th>Parameter</th>
<th>Default → proposed (unit)</th>
<th>Applies via</th>
<th>Justifying metric</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>shared_buffers</code></td>
<td>128MB → <strong>128GB</strong> (bytes)</td>
<td>restart</td>
<td><code>pg_stat_io</code> hit ratio; <code>pg_buffercache</code> usage counts</td>
</tr>
<tr>
<td><code>effective_cache_size</code></td>
<td>4GB → <strong>384GB</strong> (bytes)</td>
<td>reload</td>
<td>OS page cache size; planner cost accuracy</td>
</tr>
<tr>
<td><code>io_method</code></td>
<td>worker → <strong>io_uring</strong> (enum)</td>
<td>restart</td>
<td><code>pg_stat_io</code> read latency under seq-scan load (PG 18+, Linux build with liburing)</td>
</tr>
<tr>
<td><code>io_workers</code></td>
<td>3 → <strong>8</strong> (count)</td>
<td>restart</td>
<td>Only when <code>io_method = worker</code>; <code>pg_stat_io</code> backend type io worker</td>
</tr>
<tr>
<td><code>max_parallel_workers_per_gather</code></td>
<td>2 → <strong>8</strong> (count)</td>
<td>reload</td>
<td>EXPLAIN ANALYZE &#8220;Workers Launched&#8221; on reporting queries that stay on PG</td>
</tr>
<tr>
<td><code>wal_compression</code></td>
<td>off → <strong>zstd</strong> (enum)</td>
<td>reload</td>
<td><code>pg_stat_wal.wal_bytes</code>; replication bandwidth</td>
</tr>
<tr>
<td><code>synchronous_commit</code></td>
<td>on → <strong>on</strong>, with a sync standby in <code>synchronous_standby_names</code> (enum)</td>
<td>reload</td>
<td>RPO = 0 requirement; <code>pg_stat_replication.sync_state</code></td>
</tr>
<tr>
<td><code>autovacuum_vacuum_cost_limit</code></td>
<td>-1 (200) → <strong>2000</strong> (cost units)</td>
<td>reload</td>
<td><code>pg_stat_user_tables.n_dead_tup</code> trend; bloat under Oracle-style update-heavy load</td>
</tr>
<tr>
<td><code>track_io_timing</code></td>
<td>off → <strong>on</strong> (bool)</td>
<td>reload</td>
<td>Required for <code>pg_stat_statements</code> I/O time columns</td>
</tr>
</tbody>
</table>
<p>Test every value in staging under replayed production load before applying to production, and keep a robust DR posture (verified pgBackRest restore) before any restart-class change.</p>
<h3>5.2 Analytics on ClickHouse: the Smart Scan replacement</h3>
<p>The reporting queries that made Exadata Smart Scan indispensable have a consistent shape: filter by time and a low-cardinality dimension, aggregate measures, group by a handful of columns. On a columnar MergeTree table with the right <code>ORDER BY</code>, ClickHouse reads only the granules and columns the query touches, which is the same I/O-avoidance idea Smart Scan implements in storage cells, applied at the storage format instead of the storage hardware. Engine declarations carry full parameter lists — house rule, and the difference between a table that replicates and one that silently does not.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="ClickHouse 26.3 LTS: replicated fact table fed by CDC from PostgreSQL">CREATE TABLE sales.orders_local ON CLUSTER 'analytics'
(
    order_id      UInt64,
    customer_id   UInt64,
    order_ts      DateTime('UTC') CODEC(DoubleDelta, ZSTD(3)),
    status        LowCardinality(String),
    amount        Decimal(14, 2)  CODEC(T64, ZSTD(3)),
    region_code   LowCardinality(FixedString(3)),
    _version      UInt64,                       -- Debezium source.lsn / ts_ms, drives ReplacingMergeTree dedup
    _deleted      UInt8 DEFAULT 0,
    INDEX ix_customer customer_id TYPE bloom_filter(0.01) GRANULARITY 4
)
ENGINE = ReplicatedReplacingMergeTree(
    '/clickhouse/tables/{shard}/sales/orders_local',
    '{replica}',
    _version
)
PARTITION BY toYYYYMM(order_ts)
ORDER BY (region_code, status, order_ts, order_id)
TTL order_ts + INTERVAL 18 MONTH TO VOLUME 'cold_s3'
SETTINGS
    index_granularity            = 8192,
    storage_policy               = 'tiered',
    min_bytes_for_wide_part      = 10485760,
    ttl_only_drop_parts          = 1;

CREATE TABLE sales.orders ON CLUSTER 'analytics'
AS sales.orders_local
ENGINE = Distributed('analytics', 'sales', 'orders_local', cityHash64(customer_id));

-- Kafka engine consumer for the Debezium topic (JSON unwrapped by the ExtractNewRecordState SMT)
CREATE TABLE sales.orders_kafka ON CLUSTER 'analytics'
(
    order_id UInt64, customer_id UInt64, order_ts DateTime('UTC'),
    status String, amount Decimal(14,2), region_code String,
    __lsn UInt64, __deleted String
)
ENGINE = Kafka
SETTINGS
    kafka_broker_list        = 'kafka-1:9092,kafka-2:9092,kafka-3:9092',
    kafka_topic_list         = 'pg.sales.orders',
    kafka_group_name         = 'clickhouse-sales-orders',
    kafka_format             = 'JSONEachRow',
    kafka_num_consumers      = 4,
    kafka_max_block_size     = 65536,
    kafka_handle_error_mode  = 'stream';

CREATE MATERIALIZED VIEW sales.orders_mv ON CLUSTER 'analytics'
TO sales.orders_local AS
SELECT
    order_id, customer_id, order_ts, status, amount,
    toFixedString(region_code, 3) AS region_code,
    __lsn                          AS _version,
    if(__deleted = 'true', 1, 0)   AS _deleted
FROM sales.orders_kafka;</pre>
<p>Plan reasoning for the reporting query: with <code>ORDER BY (region_code, status, order_ts, order_id)</code>, a query filtering on region and a month range touches only the matching partition and the primary-key granules for that region prefix. <code>EXPLAIN indexes = 1</code> shows the pruning; <code>system.query_log</code> shows the outcome. On ClickHouse 26.3 LTS the evidence pair is <code>EXPLAIN PIPELINE</code> plus <code>system.trace_log</code>; 26.7 adds <code>EXPLAIN ANALYZE</code>.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="ClickHouse: verify granule pruning, then measure from system.query_log">EXPLAIN indexes = 1
SELECT
    region_code,
    status,
    count()      AS orders,
    sum(amount)  AS revenue
FROM sales.orders FINAL
WHERE region_code = 'APJ'
  AND order_ts &gt;= toDateTime('2026-07-01 00:00:00', 'UTC')
  AND order_ts = now() - INTERVAL 1 DAY
  AND has(tables, 'sales.orders_local')
GROUP BY normalized_query_hash
ORDER BY p99_ms DESC
LIMIT 20;</pre>
<p>Two ClickHouse 26.3 LTS specifics matter for an Exadata replacement. First, <code>async_insert</code> became enabled by default in 26.3; on a CDC-fed estate pin <code>async_insert = 0</code> in the ingestion profile before cutover and re-enable deliberately under Keeper observation, because the change alters part-count and Keeper load characteristics. Second, use <code>FINAL</code> or <code>argMax</code> patterns on ReplacingMergeTree only where the reporting SLA tolerates it; for dashboards, a scheduled <code>OPTIMIZE ... FINAL</code> on closed partitions or a projection is cheaper. The ClickHouse engineering for this tier is delivered by our sister company, <a href="https://chistadata.com/" target="_blank" rel="noopener">ChistaDATA</a>, and scoped through MinervaDB&#8217;s <a href="https://minervadb.com/clickhouse-consulting/">ClickHouse consulting practice</a>.</p>
<h3>5.3 Hot keys on Valkey 9.1</h3>
<p>Oracle&#8217;s result cache and KEEP buffer pool absorb the repeated point reads (session state, entitlement lookups, reference data) that would otherwise be latency outliers. Valkey 9.1 — BSD-3-licensed, Linux Foundation governed, with hash-field expiration and multi-database cluster mode since 9.0 (<a href="https://valkey.io/blog/introducing-valkey-9/" target="_blank" rel="noopener">Valkey 9 release blog</a>) — takes that role with write-through invalidation from the CDC stream, so the cache never serves a value newer data has superseded.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="python" data-enlighter-title="Valkey 9.1: CDC-driven write-through cache for customer entitlements">import json, os
from confluent_kafka import Consumer
from valkey.cluster import ValkeyCluster

vk = ValkeyCluster(
    host=os.environ["VALKEY_HOST"], port=6379,
    password=os.environ["VALKEY_PASSWORD"], ssl=True,
)

consumer = Consumer({
    "bootstrap.servers": os.environ["KAFKA_BOOTSTRAP"],
    "group.id": "valkey-entitlement-cache",
    "auto.offset.reset": "earliest",
    "enable.auto.commit": False,
})
consumer.subscribe(["pg.sales.customer_entitlements"])

while True:
    msg = consumer.poll(1.0)
    if msg is None or msg.error():
        continue
    row = json.loads(msg.value())
    key = f"ent:{row['customer_id']}"
    if row.get("__deleted") == "true":
        vk.delete(key)
    else:
        # Hash with per-field TTL (Valkey 9.0+): plan fields expire independently
        vk.hset(key, mapping={"tier": row["tier"], "limits": row["limits_json"]})
        vk.hexpire(key, 86400, "limits")
    consumer.commit(msg)</pre>
<h2>6. Scalability without RAC</h2>
<p>RAC scales one database across nodes over shared storage. The open source stack scales each tier by the mechanism that suits its access pattern, and the honest statement is that write scaling for a single PostgreSQL primary is vertical (PostgreSQL 18 on a 2-socket 192-core node comfortably exceeds the enabled-core footprint most Exadata quarter racks license) while read scaling and analytic scaling are horizontal.</p>
<p>Read scaling for Oracle Exadata cost optimization targets: hot standbys behind PgBouncer with <code>hot_standby_feedback = on</code> and a read-routing pool; replication lag from <code>pg_stat_replication</code> is the SLO. Analytic scaling: add ClickHouse shards, rebalance with <code>Distributed</code> table weights, and keep <code>system.parts</code> per-partition counts inside the merge budget; parallel replicas (<code>enable_parallel_replicas</code>) fan a single heavy query across replicas of one shard. </p>
<p>Write scaling beyond a single primary, if the workload truly demands it after measurement (<code>pg_stat_database.xact_commit</code> rate against saturation evidence in <code>pg_stat_activity</code> wait events), is Citus sharding on a tenant or hash key — a step we scope only after vertical headroom is measured, because it changes the data model. </p>
<p>Connection scaling is solved at the pooler: Oracle&#8217;s dedicated-server assumptions meet PostgreSQL&#8217;s process-per-connection model, and PgBouncer sizing from measured concurrency is part of every migration design, not an afterthought.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="ini" data-enlighter-title="PgBouncer 1.25: transaction pooling sized from measured concurrency">[databases]
sales_rw = host=pg-primary.internal port=5432 dbname=sales pool_size=64
sales_ro = host=pg-replicas.internal port=5432 dbname=sales pool_size=128

[pgbouncer]
listen_addr             = 0.0.0.0
listen_port             = 6432
auth_type               = scram-sha-256
auth_file               = /etc/pgbouncer/userlist.txt
pool_mode               = transaction
max_client_conn         = 10000
default_pool_size       = 64
reserve_pool_size       = 16
server_idle_timeout     = 300
max_prepared_statements = 200      ; 1.24+ enables prepared statements in transaction mode
server_tls_sslmode      = verify-full
server_tls_ca_file      = /etc/ssl/certs/internal-ca.pem
stats_period            = 60</pre>
<h2>7. Availability and reliability engineering</h2>
<p>Availability numbers are engineered, not quoted, and Oracle Exadata cost optimization is meaningless if the replacement stack cannot match the protection tier. Exadata estates typically run RAC for instance failure plus Data Guard for site failure; the open source stack reaches the same protection tiers with Patroni for automated failover, synchronous replication for RPO = 0, pgBackRest for point-in-time recovery, and ReplicatedMergeTree with a dedicated Keeper ensemble for the analytics tier. The arithmetic below is what we put in front of a customer before claiming any nines.</p>
<table>
<thead>
<tr>
<th>Failure mode</th>
<th>Detection</th>
<th>Recovery action</th>
<th>Illustrative RTO budget</th>
<th>RPO</th>
<th>Evidence source</th>
</tr>
</thead>
<tbody>
<tr>
<td>PostgreSQL primary crash</td>
<td>Patroni <code>ttl</code> 30 s / <code>loop_wait</code> 10 s</td>
<td>Quorum failover to sync standby; PgBouncer re-resolves via Patroni REST</td>
<td>≤ 45 s (drill-measured, quarterly)</td>
<td>0 (sync standby)</td>
<td><code>patronictl history</code>, <code>pg_stat_replication</code></td>
</tr>
<tr>
<td>AZ loss</td>
<td>etcd quorum + Patroni</td>
<td>Failover to surviving AZ; async standby promoted to sync</td>
<td>≤ 60 s</td>
<td>0</td>
<td>Drill log; <code>pg_last_wal_receive_lsn()</code> on survivors</td>
</tr>
<tr>
<td>Logical corruption / bad deploy</td>
<td>Application / monitoring</td>
<td>pgBackRest PITR to a timestamp; ClickHouse partition restore</td>
<td>Minutes to hours by data size (measured monthly)</td>
<td>Seconds (WAL archive interval)</td>
<td><code>pgbackrest info</code>, restore drill timings</td>
</tr>
<tr>
<td>ClickHouse replica loss</td>
<td>Keeper session expiry</td>
<td>Queries route to surviving replica; replacement replica re-fetches parts</td>
<td>0 for reads; rebuild in background</td>
<td>0</td>
<td><code>system.replicas</code>, <code>system.replication_queue</code></td>
</tr>
<tr>
<td>Kafka broker loss</td>
<td>KRaft controller</td>
<td>ISR shrinks; producers with <code>acks=all</code> continue on min.insync=2</td>
<td>0</td>
<td>0</td>
<td><code>UnderReplicatedPartitions</code> metric</td>
</tr>
<tr>
<td>Region loss</td>
<td>Manual / runbook gate</td>
<td>Promote DR PostgreSQL; ClickHouse cross-region replicas serve reads</td>
<td>≤ 15 min (runbook-drilled)</td>
<td>≤ async lag (measured)</td>
<td>Quarterly DR drill report</td>
</tr>
</tbody>
</table>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml" data-enlighter-title="Patroni 4.1: three-node PostgreSQL 18 cluster with quorum failover and one synchronous standby">scope: sales-pg18
namespace: /minervadb/
name: pg-az-a

restapi:
  listen: 0.0.0.0:8008
  connect_address: pg-az-a.internal:8008

etcd3:
  hosts: etcd-1.internal:2379,etcd-2.internal:2379,etcd-3.internal:2379

bootstrap:
  dcs:
    ttl: 30
    loop_wait: 10
    retry_timeout: 10
    maximum_lag_on_failover: 1048576        # bytes; async standby is never promoted beyond this
    synchronous_mode: quorum                # Patroni 4.x quorum-based synchronous replication
    synchronous_node_count: 1
    failsafe_mode: true                     # keep primary up if DCS is unreachable but members are
    postgresql:
      use_pg_rewind: true
      use_slots: true
      parameters:
        wal_level: replica
        max_wal_senders: 16
        max_replication_slots: 16
        hot_standby: "on"
        hot_standby_feedback: "on"
        wal_keep_size: 8GB
        archive_mode: "on"
        archive_command: "pgbackrest --stanza=sales archive-push %p"
        restore_command: "pgbackrest --stanza=sales archive-get %f %p"

postgresql:
  listen: 0.0.0.0:5432
  connect_address: pg-az-a.internal:5432
  data_dir: /pgdata/18/main
  bin_dir: /usr/lib/postgresql/18/bin
  authentication:
    replication:
      username: replicator
      password: ${PG_REPL_PASSWORD}
    superuser:
      username: postgres
      password: ${PG_SUPER_PASSWORD}
  create_replica_methods:
    - pgbackrest
    - basebackup
  pgbackrest:
    command: /usr/bin/pgbackrest --stanza=sales --delta restore
    keep_data: true
    no_params: true

tags:
  nofailover: false
  noloadbalance: false
  sync_priority: 100        # prefer this node as the synchronous standby when it is a replica</pre>
<pre class="EnlighterJSRAW" data-enlighter-language="ini" data-enlighter-title="pgBackRest 2.59: encrypted, S3-backed, with retention that supports 35-day PITR">[global]
repo1-type=s3
repo1-s3-bucket=${PGBACKREST_BUCKET}
repo1-s3-endpoint=s3.ap-south-1.amazonaws.com
repo1-s3-region=ap-south-1
repo1-path=/pgbackrest
repo1-cipher-type=aes-256-cbc
repo1-cipher-pass=${PGBACKREST_CIPHER_PASS}
repo1-retention-full=4
repo1-retention-diff=14
repo1-retention-archive-type=full
repo1-bundle=y
repo1-block=y
process-max=8
compress-type=zst
compress-level=3
archive-async=y
spool-path=/var/spool/pgbackrest
log-level-console=info

[sales]
pg1-path=/pgdata/18/main
pg1-port=5432
pg1-user=postgres
# 2.59.0 restricts root execution to `restore` by default — run backups as the postgres user.</pre>
<p>Reliability discipline is where Exadata-class expectations are actually met: monthly <code>pgbackrest restore --type=time</code> validation on an isolated host, quarterly Patroni switchover drills with timings recorded, quarterly ClickHouse partition-restore drills via clickhouse-backup, and a written escalation matrix. MinervaDB&#8217;s <a href="https://minervadb.com/24-7-emergency-dba-coverage/">24×7 emergency DBA coverage</a> operates on S1 15-minute response, and the drills are what make that response meaningful.</p>
<h2>8. The migration program: assess, convert, replicate, cut over</h2>
<figure>
<img loading="lazy" decoding="async" src="image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMjAwIDMwMCIgd2lkdGg9IjEwMCUiIHJvbGU9ImltZyIgYXJpYS1sYWJlbD0iU2V2ZW4tcGhhc2UgT3JhY2xlIEV4YWRhdGEgdG8gb3BlbiBzb3VyY2UgbWlncmF0aW9uIHRpbWVsaW5lOiBhc3Nlc3MsIG9mZmxvYWQgYW5hbHl0aWNzLCBjb252ZXJ0IHNjaGVtYSBhbmQgUEwvU1FMLCBidWxrIGxvYWQsIENEQyBwYXJhbGxlbCBydW4sIGN1dCBvdmVyLCBzdGFiaWxpemUgYW5kIGRlY29tbWlzc2lvbiI+CjxkZWZzPjxzdHlsZT4KLnBoe2ZpbGw6I2ZmZmZmZjtzdHJva2U6IzFmM2E1ZjtzdHJva2Utd2lkdGg6MjtyeDoxMH0KLnBoMntmaWxsOiNlYWYxZjg7c3Ryb2tlOiMxZjNhNWY7c3Ryb2tlLXdpZHRoOjI7cng6MTB9Ci50dHtmb250LWZhbWlseTpJbnRlcixBcmlhbCxIZWx2ZXRpY2Esc2Fucy1zZXJpZjtmb250LXNpemU6MTRweDtmb250LXdlaWdodDo3MDA7ZmlsbDojMWYzYTVmfQoudHh7Zm9udC1mYW1pbHk6SW50ZXIsQXJpYWwsSGVsdmV0aWNhLHNhbnMtc2VyaWY7Zm9udC1zaXplOjExcHg7ZmlsbDojNGE1YTZhfQoud2t7Zm9udC1mYW1pbHk6SW50ZXIsQXJpYWwsSGVsdmV0aWNhLHNhbnMtc2VyaWY7Zm9udC1zaXplOjEycHg7Zm9udC13ZWlnaHQ6NzAwO2ZpbGw6I2MwMzkyYn0KLmFye3N0cm9rZTojMWYzYTVmO3N0cm9rZS13aWR0aDoyO2ZpbGw6bm9uZTttYXJrZXItZW5kOnVybCgjYTIpfQo8L3N0eWxlPjxt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0dCIgZmlsbD0iI2MwMzkyYiI+Um9sbGJhY2sgcG9zdHVyZSBhdCBldmVyeSBnYXRlPC90ZXh0Pgo8dGV4dCB4PSI0MCIgeT0iMjQyIiBjbGFzcz0idHgiPlBoYXNlcyAx4oCTNTogT3JhY2xlIHJlbWFpbnMgc3lzdGVtIG9mIHJlY29yZDsgbm90aGluZyBpcyBkZXN0cnVjdGl2ZS4gUGhhc2UgNjogcmV2ZXJzZSBDREMgKFBvc3RncmVTUUwg4oaSIE9yYWNsZSkgc3RheXMgd2FybSB1bnRpbCBzaWduLW9mZiw8L3RleHQ+Cjx0ZXh0IHg9IjQwIiB5PSIyNTgiIGNsYXNzPSJ0eCI+c28gcm9sbGJhY2sgPSBzd2l0Y2ggY29ubmVjdGlvbiBzdHJpbmdzIGJhY2sgYW5kIGRyYWluIHJldmVyc2UgbGFnIHRvIHplcm8uIFBoYXNlIDc6IEV4YWRhdGEgbGljZW5jZXMgYXJlIG5vdCB0ZXJtaW5hdGVkIGFuZCB0aGUgcmFjayBpcyBub3Q8L3RleHQ+Cjx0ZXh0IHg9IjQwIiB5PSIyNzQiIGNsYXNzPSJ0eCI+ZGVjb21taXNzaW9uZWQgdW50aWwgdGhlIHJlY29uY2lsaWF0aW9uIGFuZCBwZXJmb3JtYW5jZSBzaWduLW9mZiBnYXRlIGlzIHBhc3NlZCBpbiB3cml0aW5nLiBObyBEUk9QL1RSVU5DQVRFIHdpdGhvdXQgYW4gZXhwbGljaXQgY29uZmlybWF0aW9uIGdhdGUuPC90ZXh0Pgo8L3N2Zz4=" alt="Oracle Exadata exit program: seven migration phases with gates and rollback posture" width="1200" height="660"><figcaption>Figure 2. Program phases with gates and rollback posture. Durations are illustrative and scale with PL/SQL volume, not with data size.</figcaption></figure>
<h3>8.1 Assessment: measure the estate, never guess it</h3>
<p>Oracle Exadata cost optimization by migration starts here: effort is measured from the Oracle catalog. The output is an object-count matrix by complexity class and conversion route (automatic / assisted / manual rewrite), and it is the single artifact that turns a whitepaper into a funded program.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="Oracle: migration assessment inventory">-- Object inventory by type
SELECT owner, object_type, COUNT(*) AS objects
FROM dba_objects
WHERE owner IN (${APP_SCHEMAS})
GROUP BY owner, object_type
ORDER BY objects DESC;

-- PL/SQL volume by unit (lines of code drive conversion effort, not table count)
SELECT owner, name, type, COUNT(*) AS loc
FROM dba_source
WHERE owner IN (${APP_SCHEMAS})
GROUP BY owner, name, type
ORDER BY loc DESC;

-- Constructs with no direct community-PostgreSQL equivalent (each is a line item)
SELECT owner, name, type, COUNT(*) AS hits, 'AUTONOMOUS_TRANSACTION' AS construct
FROM dba_source
WHERE owner IN (${APP_SCHEMAS})
  AND UPPER(text) LIKE '%PRAGMA AUTONOMOUS_TRANSACTION%'
GROUP BY owner, name, type
UNION ALL
SELECT owner, name, type, COUNT(*), 'BULK_COLLECT'
FROM dba_source
WHERE owner IN (${APP_SCHEMAS})
  AND UPPER(text) LIKE '%BULK COLLECT%'
GROUP BY owner, name, type
UNION ALL
SELECT owner, name, type, COUNT(*), 'CONNECT_BY'
FROM dba_source
WHERE owner IN (${APP_SCHEMAS})
  AND UPPER(text) LIKE '%CONNECT BY%'
GROUP BY owner, name, type
ORDER BY hits DESC;

-- Feature dependencies: DB links, AQ, VPD, MV fast refresh
SELECT 'DB_LINK' AS dependency, COUNT(*) AS n FROM dba_db_links
UNION ALL SELECT 'AQ_QUEUE',   COUNT(*) FROM dba_queues WHERE owner IN (${APP_SCHEMAS})
UNION ALL SELECT 'VPD_POLICY', COUNT(*) FROM dba_policies WHERE object_owner IN (${APP_SCHEMAS})
UNION ALL SELECT 'MV_FAST_REFRESH', COUNT(*) FROM dba_mviews WHERE owner IN (${APP_SCHEMAS}) AND refresh_method = 'FAST';</pre>
<h3>8.2 Conversion with ora2pg and orafce</h3>
<p><a href="https://ora2pg.darold.net/" target="_blank" rel="noopener">Ora2Pg</a> produces the assessment report (with its own cost-unit estimate per object) and performs schema, data, and a first-pass PL/SQL conversion; <a href="https://github.com/orafce/orafce" target="_blank" rel="noopener">orafce</a> supplies the Oracle-compatible functions (<code>NVL</code>, <code>DECODE</code>, <code>ADD_MONTHS</code>, <code>DBMS_OUTPUT</code>, and others) that keep converted code readable. Packages become schemas plus functions; package state becomes session GUCs or a state table; autonomous transactions become <code>dblink</code> or a background-worker pattern, chosen per call site.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="ini" data-enlighter-title="ora2pg.conf: assessment and schema export (excerpt)">ORACLE_DSN        dbi:Oracle:host=exa-scan.internal;sid=SALESPDB;port=1521
ORACLE_USER       ${ORA_MIG_USER}
ORACLE_PWD        ${ORA_MIG_PASSWORD}
SCHEMA            SALES
PG_VERSION        18
TYPE              TABLE,VIEW,SEQUENCE,TRIGGER,FUNCTION,PROCEDURE,PACKAGE,TYPE,PARTITION,MVIEW
EXPORT_SCHEMA     1
DATA_TYPE         DATE:timestamp(0),LONG:text,LONG RAW:bytea,CLOB:text,NCLOB:text,BLOB:bytea,BFILE:bytea,RAW:bytea,ROWID:oid,FLOAT:double precision,DEC:decimal,DECIMAL:decimal,DOUBLE PRECISION:double precision,INT:numeric,INTEGER:numeric,REAL:real,SMALLINT:smallint,BINARY_FLOAT:double precision,BINARY_DOUBLE:double precision,TIMESTAMP:timestamp,XMLTYPE:xml,BINARY_INTEGER:integer,PLS_INTEGER:integer,TIMESTAMP WITH TIME ZONE:timestamp with time zone,TIMESTAMP WITH LOCAL TIME ZONE:timestamp with time zone
PG_NUMERIC_TYPE   1
PG_INTEGER_TYPE   1
DEFAULT_NUMERIC   bigint
USE_ORAFCE        1
PLSQL_PGSQL       1
NULL_EQUAL_EMPTY  0        ; force the '' vs NULL audit instead of masking it
ESTIMATE_COST     1
COST_UNIT_VALUE   5
PARALLEL_TABLES   8
JOBS              8
ORACLE_COPIES     8
DATA_LIMIT        20000
FILE_PER_TABLE    1
OUTPUT_DIR        /migration/sales</pre>
<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-title="Run the assessment, then export schema and code">ora2pg -c /migration/ora2pg.conf -t SHOW_REPORT --estimate_cost --dump_as_html &gt; /migration/sales/assessment.html
ora2pg -c /migration/ora2pg.conf -t TABLE     -o schema_tables.sql
ora2pg -c /migration/ora2pg.conf -t PACKAGE   -o packages.sql
ora2pg -c /migration/ora2pg.conf -t FUNCTION  -o functions.sql
# Data: COPY pipeline, 8 parallel jobs, indexes and FKs applied after load
ora2pg -c /migration/ora2pg.conf -t COPY -j 8 -J 8</pre>
<h3>8.3 CDC with Debezium: parallel run and rehearsable cutover</h3>
<p>The cutover is where an Oracle Exadata cost optimization program is won or lost, so it must be rehearsable and reversible. Debezium 3.6&#8217;s Oracle connector (<a href="https://debezium.io/documentation/reference/stable/connectors/oracle.html" target="_blank" rel="noopener">documentation</a>) captures from LogMiner without a GoldenGate license, or from <a href="https://github.com/bersler/OpenLogReplicator" target="_blank" rel="noopener">OpenLogReplicator</a> for lower source overhead on high-redo estates; XStream requires a GoldenGate license and is not used. </p>
<p>The stream lands in Kafka 4.3 (KRaft-only since 4.0) and is applied to PostgreSQL by the JDBC sink connector during the parallel run. After cutover, the same topology is reversed — Debezium&#8217;s PostgreSQL connector on <code>pgoutput</code> feeding a JDBC sink into Oracle — and kept warm as the rollback path until sign-off.</p>
<figure>
<p>Phase 5 — parallel run (Oracle is system of record)<br />
Oracle 19c on Exadatawrites · supplemental logging ON<br />
Debezium 3.6Oracle connector (LogMiner)<br />
Kafka 4.3ora.sales.* topics, RF=3<br />
JDBC sinkupsert, pk-based, idempotent<br />
PostgreSQL 18read-only validation · reconciliation<br />
Reconcilecounts · hashes</p>
<p>Phase 6 — after cutover (PostgreSQL is system of record)<br />
PostgreSQL 18writes · wal_level = logical<br />
Debezium 3.6PostgreSQL connector (pgoutput)<br />
Kafka 4.3pg.sales.* topics<br />
JDBC sink→ Oracle (reverse)<br />
Oracle (warm)rollback target<br />
ClickHouse 26.3analytics consumer</p>
<p>— — reverse CDC: rollback = re-point applications to Oracle, drain lag to zero<figcaption>Figure 3. CDC topology before and after cutover. The reverse path is the rollback plan and stays live until written sign-off.</figcaption></figure>
<pre class="EnlighterJSRAW" data-enlighter-language="json" data-enlighter-title="Debezium 3.6 Oracle connector (LogMiner) — Kafka Connect configuration">{
  "name": "ora-sales-source",
  "config": {
    "connector.class": "io.debezium.connector.oracle.OracleConnector",
    "tasks.max": "1",
    "database.hostname": "exa-scan.internal",
    "database.port": "1521",
    "database.user": "${ORA_CDC_USER}",
    "database.password": "${ORA_CDC_PASSWORD}",
    "database.dbname": "SALESCDB",
    "database.pdb.name": "SALESPDB",
    "topic.prefix": "ora",
    "table.include.list": "SALES.ORDERS,SALES.ORDER_ITEMS,SALES.CUSTOMER_ENTITLEMENTS",
    "database.connection.adapter": "logminer",
    "log.mining.strategy": "online_catalog",
    "log.mining.batch.size.default": "20000",
    "log.mining.transaction.retention.ms": "3600000",
    "lob.enabled": "false",
    "decimal.handling.mode": "precise",
    "time.precision.mode": "adaptive",
    "snapshot.mode": "initial",
    "schema.history.internal.kafka.bootstrap.servers": "kafka-1:9092,kafka-2:9092,kafka-3:9092",
    "schema.history.internal.kafka.topic": "schema-history.ora.sales",
    "heartbeat.interval.ms": "10000",
    "transforms": "unwrap",
    "transforms.unwrap.type": "io.debezium.transforms.ExtractNewRecordState",
    "transforms.unwrap.delete.handling.mode": "rewrite",
    "transforms.unwrap.add.fields": "op,source.scn,source.ts_ms",
    "key.converter": "io.apicurio.registry.utils.converter.AvroConverter",
    "value.converter": "io.apicurio.registry.utils.converter.AvroConverter",
    "key.converter.apicurio.registry.url": "http://apicurio.internal:8080/apis/registry/v2",
    "value.converter.apicurio.registry.url": "http://apicurio.internal:8080/apis/registry/v2"
  }
}</pre>
<p>Source-side prerequisites are the part Oracle DBAs must own: <code>ARCHIVELOG</code> mode, minimal supplemental logging at database level plus <code>ALL COLUMNS</code> on captured tables, and a CDC user granted the LogMiner privileges the Debezium documentation lists. LogMiner load on the source is measurable in <code>V$SESSION</code> and, on licensed estates, in ASH; on a high-redo estate that overhead is the reason to evaluate OpenLogReplicator.</p>
<h3>8.4 Cutover runbook (excerpt) with verification and rollback</h3>
<p>The full cutover runbook is a versioned MinervaDB deliverable (MDB-RUN-*) with purpose, scope, prerequisites, roles, stepwise commands, expected output, verification after each phase, rollback, and an escalation matrix. The core sequence, with its verification queries, is reproduced here because it is the part readers ask for.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="Cutover gates: verify lag is zero before and reconcile after">-- GATE 1 (Oracle side, writes already stopped at the application tier): confirm no in-flight transactions
SELECT COUNT(*) AS active_txns
FROM v$transaction;
-- expected: 0

-- GATE 2 (Kafka Connect): confirm the source connector has no lag (consumer group for the sink)
-- kafka-consumer-groups.sh --bootstrap-server kafka-1:9092 --describe --group connect-pg-sales-sink
-- expected: LAG column = 0 on every partition

-- GATE 3 (PostgreSQL side): per-table reconciliation against Oracle counts captured at GATE 1
SELECT
    'orders'                         AS table_name,
    COUNT(*)                         AS row_count,
    md5(string_agg(order_id::text || ':' || amount::text, ',' ORDER BY order_id)) AS content_hash
FROM sales.orders
WHERE order_ts &gt;= DATE '2026-01-01';   -- hot-window hash; full-table hashes run in the parallel-run reports

-- GATE 4: promote PostgreSQL to system of record (reverse CDC connector started, applications re-pointed)
-- Verification after cutover:
SELECT slot_name, active, confirmed_flush_lsn,
       pg_size_pretty(pg_wal_lsn_diff(pg_current_wal_lsn(), confirmed_flush_lsn)) AS reverse_cdc_lag
FROM pg_replication_slots
WHERE slot_name = 'debezium_reverse';
-- expected: active = t, lag in low MB and falling

-- ROLLBACK (any time before sign-off): stop application writes to PostgreSQL, wait for reverse_cdc_lag = 0 bytes,
-- re-point connection strings to the Oracle service, confirm V$TRANSACTION shows application activity, resume.
-- No object is dropped, truncated, or detached at any point in this runbook without a written confirmation gate.</pre>
<h2>9. Five-year TCO model (illustrative)</h2>
<p>Every figure in this table is illustrative and built from the list prices in Section 1 with a stated discount assumption, so that a reader can substitute their own contract values. It deliberately excludes people cost on both sides — an Exadata estate and an open source stack both need a database engineering function, and the honest difference is skills mix, not headcount. It also excludes the one-time migration program, which is estate-specific and comes out of the Section 8.1 assessment.</p>
<table>
<thead>
<tr>
<th>Cost line (5 years, USD, illustrative)</th>
<th>Exadata X11M quarter rack, 64 processor licenses, 50% discount</th>
<th>Open source stack (self-managed, commodity/IaaS)</th>
</tr>
</thead>
<tbody>
<tr>
<td>Hardware / infrastructure</td>
<td>$157k rack (net) + $315k hardware support</td>
<td>3× PostgreSQL nodes (64 vCPU/512 GB/NVMe), 4× ClickHouse nodes, 3× Keeper, 3× Kafka, 6× Valkey, 3× etcd, 2× PgBouncer/Connect: ≈ $450k–$700k purchased, or equivalent reserved IaaS</td>
</tr>
<tr>
<td>Database software licenses (net, one-time)</td>
<td>$3.39M (EE + RAC + Partitioning + Adv. Compression + Diag/Tuning) + $180k storage software</td>
<td>$0 — PostgreSQL License, Apache 2.0 (ClickHouse, Kafka, Debezium), BSD-3 (Valkey), MIT (Patroni, pgBackRest)</td>
</tr>
<tr>
<td>Annual software support (22% of net), ×5</td>
<td>$3.93M (rising +10%/+20% under 19c Extended Support from 2030)</td>
<td>$0 vendor line; optional subscription support from an independent provider such as MinervaDB, priced per engagement</td>
</tr>
<tr>
<td>Object storage for backups and cold tiers</td>
<td>ZDLRA or third-party; estate-specific</td>
<td>≈ $60k–$120k (S3-class, 5 years, 100–200 TB)</td>
</tr>
<tr>
<td><strong>Five-year total (excluding people and migration)</strong></td>
<td><strong>≈ $7.9M+</strong></td>
<td><strong>≈ $0.5M–$0.8M infrastructure + support subscription</strong></td>
</tr>
</tbody>
</table>
<p>The order-of-magnitude gap survives any reasonable discount assumption because the open source column has no line that scales with cores. </p>
<p>What the gap buys is not free: it is spent on the migration program, on the skills to operate three engines instead of one, and on the Data SRE discipline that keeps the SLOs honest. For most estates in the 10–100 TB range, the support line alone repays that investment inside the first support renewal cycle — but that claim is only true for your estate once the Section 8.1 assessment and a load-replay test have been run, which is why MinervaDB does not publish a customer number without them.</p>
<h2>10. Risks, honest edges, and where this does not apply</h2>
<p><strong>PL/SQL volume is the schedule driver.</strong> Data size determines the bulk-load window; procedural code determines the program length. Estates above roughly 500k lines of PL/SQL with packages, autonomous transactions, and REF CURSOR-heavy APIs should evaluate EPAS with eyes open, or phase the exit application by application.</p>
<p><strong>Semantics that silently change.</strong> Empty string versus NULL, <code>DATE</code> with time component, <code>NUMBER</code> without precision, sequence <code>CACHE</code> behaviour, and case-sensitive identifiers are the correctness classes that survive a passing conversion and fail in production. Each has a mandatory test in the MinervaDB migration test suite; none is optional.</p>
<p><strong>Optimizer differences are the week-two incident source.</strong> There are no hints in community PostgreSQL (<code>pg_hint_plan</code> only under governance), cardinality estimation differs, and Oracle&#8217;s adaptive plans have no equivalent. Capture AWR top SQL before migration, compare against <code>pg_stat_statements</code> after, and budget tuning time in the stabilization phase.</p>
<p><strong>ISV applications.</strong> Packaged applications certified only on Oracle (many ERP, core banking, and telecom billing platforms) cannot be migrated by the database team; the decision belongs to the application roadmap. The Section 2 measures still apply.</p>
<p><strong>Materialized-view fast refresh ON COMMIT, Advanced Queuing, and fine-grained VPD</strong> map to application-level patterns (incremental views, pgmq or Kafka, row-level security) rather than one-to-one features; each is a design decision, not a conversion.</p>
<p><strong>What we did not test for this paper.</strong> No benchmark numbers are published here because a benchmark without your workload shape, hardware, and configuration deltas is noise. Where a MinervaDB engagement includes a load-replay comparison, the methodology (hardware, versions, config deltas, dataset, run count, median and spread) is published before the results, per house rule.</p>
<p><strong>Version boundaries.</strong> Claims above are pinned to PostgreSQL 18 (asynchronous I/O, skip scan), ClickHouse 26.3 LTS (<code>async_insert</code> default change; 25.8 LTS leaves support on 29 August 2026), Kafka 4.x (KRaft-only), Debezium 3.6, Valkey 9.x, and Oracle 19c/26ai lifecycle dates as of August 2026. Re-verify before relying on any of them in a contract.</p>
<h2>11. FAQ: Oracle Exadata cost optimization and open source migration</h2>
<h3>Is Oracle Exadata cost optimization possible without leaving Oracle?</h3>
<p>Yes. Measure option usage in <code>DBA_FEATURE_USAGE_STATISTICS</code>, reduce enabled cores with capacity-on-demand, offload analytics to ClickHouse via CDC, and negotiate ahead of the 19c Extended Support uplift. Those four measures are reversible and typically remove 25–40% of the recurring line (illustrative; your figure comes from your own catalog).</p>
<h3>Can PostgreSQL really match Exadata performance?</h3>
<p>For OLTP, PostgreSQL 18 on a modern two-socket NVMe node matches or exceeds the enabled-core footprint most quarter-rack estates license, and the plan-level evidence is <code>EXPLAIN (ANALYZE, BUFFERS)</code> against the same statements. For Exadata-class analytics, PostgreSQL alone is not the answer; ClickHouse is, and that is why the target is a stack. Parity is declared per statement class from <code>pg_stat_statements</code> and <code>system.query_log</code>, never in aggregate.</p>
<h3>How do we replace RAC?</h3>
<p>RAC solves instance-failure RTO and read scaling. Patroni quorum failover with a synchronous standby delivers drill-measured RTO in the tens of seconds at RPO = 0; hot standbys behind PgBouncer deliver read scaling. Genuine write-anywhere requirements are rare and are evaluated separately, with the conflict analysis done before any active-active design is proposed.</p>
<h3>Do we need Oracle GoldenGate for the migration?</h3>
<p>No. Debezium&#8217;s Oracle connector captures from LogMiner without a GoldenGate license; OpenLogReplicator is the lower-overhead alternative on high-redo estates. GoldenGate remains a valid choice where the customer already licenses it.</p>
<h3>What is the rollback plan if cutover fails?</h3>
<p>Reverse CDC from PostgreSQL to Oracle runs from the moment of cutover until written sign-off. Rollback is: stop application writes, drain reverse lag to zero (measured in <code>pg_replication_slots</code>), re-point connection strings to Oracle. Nothing is dropped, truncated, or decommissioned before sign-off.</p>
<h3>How long does an Exadata to open source migration take?</h3>
<p>Illustratively 30–42 weeks for a 20 TB estate with moderate PL/SQL, per Figure 2. The schedule scales with procedural code volume rather than data size; the assessment in Section 8.1 replaces that illustration with a measured estimate.</p>
<h3>Who supports the open source stack in production?</h3>
<p>Community PostgreSQL, ClickHouse, Kafka, Debezium, and Valkey are supported by their projects; enterprise-grade 24×7 support with response SLAs comes from an independent provider. MinervaDB operates on S1 15 minutes / S2 12 hours / S3 24 hours / S4 48 hours, with ClickHouse engineering delivered through ChistaDATA.</p>
<h2>Next steps</h2>
<p>An Oracle Exadata cost optimization program starts with evidence, not a proposal. MinervaDB&#8217;s Exadata assessment delivers, within four weeks, the feature-usage baseline and enabled-core analysis for in-place savings, the object and PL/SQL complexity matrix, the AWR or STATSPACK top-SQL baseline mapped to target engines, and a versioned migration plan with rollback gates — the MDB-MIG deliverable that turns this whitepaper into your program. Talk to the <a href="https://minervadb.com/data-modernization/">MinervaDB data modernization practice</a>, review our <a href="https://minervadb.com/postgresql-consulting/">PostgreSQL consulting</a> and <a href="https://minervadb.com/postgresql-remote-dba/">PostgreSQL remote DBA</a> services, or <a href="https://minervadb.com/contact-minervadb-book-an-appointment/">book an architecture consultation</a>.</p>
<p><em>Standing caveat for all guidance in this document: test every change in a staging environment that mirrors production before applying it, and maintain a verified disaster-recovery posture (tested restores, not just backups) throughout any migration.</em></p>
<h3>References</h3>
<ul>
<li>Oracle Corporation, <a href="https://www.oracle.com/a/ocom/docs/corporate/pricing/technology-price-list-070617.pdf" target="_blank" rel="noopener">Oracle Technology Global Price List</a> and <a href="https://www.oracle.com/a/ocom/docs/corporate/pricing/exadata-pricelist-070598.pdf" target="_blank" rel="noopener">Oracle Engineered Systems Price List</a>; <a href="https://blogs.oracle.com/exadata/exadata-x11m" target="_blank" rel="noopener">Exadata X11M announcement</a>; <a href="https://docs.oracle.com/en/engineered-systems/exadata-database-machine/books.html" target="_blank" rel="noopener">Exadata documentation</a>.</li>
<li>PostgreSQL Global Development Group, <a href="https://www.postgresql.org/about/news/postgresql-18-released-3142/" target="_blank" rel="noopener">PostgreSQL 18 released</a>; <a href="https://www.postgresql.org/docs/release/18.0/" target="_blank" rel="noopener">release notes</a>; <a href="https://www.postgresql.org/docs/18/logical-replication.html" target="_blank" rel="noopener">logical replication</a>; <a href="https://www.postgresql.org/docs/18/pgstatstatements.html" target="_blank" rel="noopener">pg_stat_statements</a>; <a href="https://www.postgresql.org/support/versioning/" target="_blank" rel="noopener">versioning policy</a>.</li>
<li>ClickHouse, <a href="https://clickhouse.com/docs/faq/operations/production" target="_blank" rel="noopener">which version to use in production</a>; <a href="https://clickhouse.com/docs/engines/table-engines/mergetree-family/replication" target="_blank" rel="noopener">Replicated table engines</a>; <a href="https://clickhouse.com/docs/engines/table-engines/integrations/kafka" target="_blank" rel="noopener">Kafka table engine</a>; <a href="https://clickhouse.com/docs/resources/changelogs/oss/2026" target="_blank" rel="noopener">2026 changelog</a>.</li>
<li>Debezium, <a href="https://debezium.io/releases/" target="_blank" rel="noopener">releases</a> and <a href="https://debezium.io/documentation/reference/stable/connectors/oracle.html" target="_blank" rel="noopener">Oracle connector</a>; Apache Kafka, <a href="https://kafka.apache.org/blog/2026/06/25/apache-kafka-4.3.1-release-announcement/" target="_blank" rel="noopener">4.3.1 release</a>.</li>
<li><a href="https://patroni.readthedocs.io/en/latest/" target="_blank" rel="noopener">Patroni</a>, <a href="https://pgbackrest.org/" target="_blank" rel="noopener">pgBackRest</a>, <a href="https://www.pgbouncer.org/" target="_blank" rel="noopener">PgBouncer</a>, <a href="https://ora2pg.darold.net/" target="_blank" rel="noopener">Ora2Pg</a>, <a href="https://github.com/orafce/orafce" target="_blank" rel="noopener">orafce</a>, <a href="https://github.com/bersler/OpenLogReplicator" target="_blank" rel="noopener">OpenLogReplicator</a>, <a href="https://valkey.io/blog/introducing-valkey-9/" target="_blank" rel="noopener">Valkey 9</a>.</li>
<li>Oracle Database lifecycle dates: <a href="https://endoflife.date/oracle-database" target="_blank" rel="noopener">endoflife.date</a> (re-verify against MOS 742060.1).</li>
<li>Related MinervaDB reading: <a href="https://minervadb.com/rollback-strategy-postgresql-rollback-migration/">PostgreSQL migration rollback strategy</a>; <a href="https://minervadb.com/postgresql-cloud-aws-aurora-gcp-azure/">PostgreSQL on AWS, GCP, and Azure</a>.</li>
</ul>
<p><strong>Revision history:</strong> v1.0, 24 August 2026 — initial public release. Prepared by MinervaDB Database Architecture Practice; reviewed by MinervaDB PostgreSQL and Oracle practice leads; approved by Shiv Iyer, Founder &amp; CEO, MinervaDB Inc.</p>
<p><a href="https://minervadb.com/oracle-exadata-cost-optimization-open-source-stack/">Oracle Exadata Cost Optimization: Migrating to an Open Source Data Infrastructure Stack Without Compromising Performance, Scalability, Availability, or Reliability</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>BigQuery SOX Compliance Checklist: 12 Proven Controls</title>
        <link>https://minervadb.com/bigquery-sox-compliance-checklist/</link>
        <pubDate>Sat, 22 Aug 2026 18:41:33 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/bigquery-sox-compliance-checklist-12-proven-controls/</guid>
        <source url="https://minervadb.com/">The Data Transformation Company</source>
        <description><![CDATA[<p>A production-tested BigQuery SOX compliance checklist: IAM, CMEK, audit-log retention, change management, and the SQL evidence queries auditors accept. [...]</p>
<p><a href="https://minervadb.com/bigquery-sox-compliance-checklist/">BigQuery SOX Compliance Checklist: 12 Proven Controls</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<figure><img loading="lazy" decoding="async" src="https://minervadb.com/wp-content/uploads/2026/08/bigquery-sox-compliance-checklist.png" alt="BigQuery SOX Compliance Checklist — 12 proven controls for IAM, CMEK, audit logs and change management" width="1200" height="630"></figure>
<p>A <strong>BigQuery SOX compliance checklist</strong> succeeds or fails on four IT general control (ITGC) domains: access control, change management, operations, and monitoring. Everything an external auditor will test against your BigQuery estate maps to one of those four, and every one of them can be evidenced directly from Google Cloud primitives — IAM policies, Cloud Audit Logs, <code>INFORMATION_SCHEMA</code>, and Cloud KMS. This checklist walks through the twelve controls we implement for financial-reporting datasets in BigQuery, with the exact SQL and configuration each control needs and the evidence query an auditor will accept.</p>
<p>Scope note before we start: SOX (Sarbanes–Oxley Act of 2002, Sections 302 and 404) does not certify databases — it certifies <em>internal control over financial reporting (ICFR)</em>. BigQuery lands in scope the moment a dataset feeds a number that appears in a financial statement: revenue marts, billing pipelines, order-to-cash aggregates, close automation. Google&#8217;s own infrastructure controls are covered by its <a href="https://cloud.google.com/security/compliance/soc-2" target="_blank" rel="noopener">SOC 2 Type II reports</a> (issued quarterly, auditable via Compliance Reports Manager); everything above the infrastructure line — who can read the revenue table, who changed the transformation SQL, how long the access trail is retained — is yours, and that is what this checklist covers.</p>
<h2>BigQuery SOX Compliance Checklist: The Control Architecture</h2>
<p>The twelve controls form three layers: preventive controls on the data itself (IAM, policy tags, row-level security, CMEK, VPC Service Controls), detective controls on activity (audit log pipeline, access monitoring, job history review), and process controls around change (declarative infrastructure, SQL change management, retention and recovery, evidence generation). The diagram below shows how they fit together.</p>
<figure>
       BigQuery SOX Control Architecture (ITGC mapping) <!-- VPC-SC perimeter -->  VPC SERVICE CONTROLS PERIMETER · ORG POLICIES (CONTROL 6) <!-- Preventive layer -->  Preventive — Access 2 · IAM groups, no primitive roles 3 · Policy tags (column-level) 4 · Row access policies 5 · CMEK (Cloud KMS, 90d rotation) roles/bigquery.dataViewer datacatalog.categoryFineGrainedReader cloudkms.cryptoKeyEncrypterDecrypter <!-- In-scope datasets -->  In-scope datasets (1) finance_prod.revenue_reporting labels: sox_scope=in_scope Financial-reporting marts, close snapshots, billing pipeline Time travel 7d + close snapshots (10) <!-- Change management -->  Process — Change mgmt (9) Terraform (datasets, IAM, CMEK) dbt / Dataform SQL in PR review CI deploys via pipeline identity: deploy-sa@finance-prod.iam Humans hold no dataEditor on prod (segregation of duties, control 2) <!-- Deploy arrow -->  reviewed DDL only <!-- IAM arrow -->  <!-- Audit logs out -->  audit trail <!-- Detective layer -->  Detective — Monitoring 7 · Data Access logs (on by default)     → sink → audit-prod dataset     7-year retention, separate IAM 8 · Access + write monitoring SQL INFORMATION_SCHEMA.JOBS (180d) BigQueryAuditMetadata Alert: any non-pipeline write to an in-scope table 11 · Quarterly IAM diff + attestation      from SetIamPolicy log events <!-- Evidence pack -->  Evidence pack (12) IAM exports · zero-row write report DDL<img decoding="async" src="https://s.w.org/images/core/emoji/17.0.2/72x72/2194.png" alt="&#x2194;" class="wp-smiley">PR reconciliation · KMS history restore drills · SOC 2 Type II  Google Cloud behavior as of August 2026 · BigQuery + Cloud Logging + Cloud KMS + VPC-SC<figcaption>The twelve controls of the BigQuery SOX compliance checklist, mapped to ITGC domains.</figcaption></figure>
<h2>Layer 1 — Preventive Controls</h2>
<h3>1. Inventory and label in-scope datasets</h3>
<p>You cannot control what you have not scoped. Every SOX engagement starts with a dataset inventory that separates financial-reporting datasets from everything else, because the controls below are expensive to apply estate-wide and auditors only test in-scope objects. Use dataset labels as the scoping mechanism — they are queryable, enforceable in policy, and visible in billing exports.</p>
<pre><code class="language-sql">-- Inventory candidate in-scope datasets and their labels
SELECT
  catalog_name              AS project_id,
  schema_name               AS dataset_id,
  option_value              AS labels
FROM `region-us`.INFORMATION_SCHEMA.SCHEMATA_OPTIONS
WHERE option_name = 'labels';
</code></pre>
<pre><code class="language-bash"># Label a dataset as SOX in-scope (reversible, no downtime)
bq update --set_label sox_scope:in_scope 
          --set_label data_owner:finance_engineering 
          finance_prod:revenue_reporting
</code></pre>
<h3>2. Enforce least-privilege IAM — no primitive roles</h3>
<p>The single most common SOX finding we see in BigQuery estates is a primitive role (<code>roles/editor</code>, <code>roles/owner</code>) granted at project level, silently conferring write access to every financial table. The control: all access to in-scope datasets flows through Google Groups mapped to job functions, using predefined BigQuery roles (<code>roles/bigquery.dataViewer</code>, <code>roles/bigquery.dataEditor</code>, <code>roles/bigquery.jobUser</code>) or narrower custom roles — never primitive roles, never individual user grants.</p>
<pre><code class="language-bash"># Evidence query: find primitive-role grants on the project
gcloud projects get-iam-policy finance-prod 
  --flatten="bindings[].members" 
  --filter="bindings.role:(roles/owner OR roles/editor OR roles/viewer)" 
  --format="table(bindings.role, bindings.members)"
</code></pre>
<p>Expected output on a passing control is an empty table (or break-glass accounts only, documented and alerted). Anything else is a segregation-of-duties exception the auditor will sample. Pair this with quarterly access reviews: export the IAM policy per dataset, have the data owner attest, retain the attestation. Segregation of duties in BigQuery terms means the humans who write transformation SQL do not hold <code>dataEditor</code> on production financial datasets — deployment happens through a service account owned by the CI pipeline (control 9).</p>
<h3>3. Column-level security with policy tags</h3>
<p>SOX scoping frequently overlaps PII and payment data. BigQuery&#8217;s <a href="https://docs.cloud.google.com/bigquery/docs/column-level-security-intro" target="_blank" rel="noopener">column-level access control</a> attaches policy tags from a Data Catalog taxonomy to individual columns; at query time, reading a tagged column requires the <strong>Fine-Grained Reader</strong> role (<code>datacatalog.categoryFineGrainedReader</code>) on that tag. One policy tag per column, taxonomy and table colocated in the same region, and dynamic data masking available on top — masked readers get nulls, hashes, or defaults instead of a permission error, which keeps dashboards alive while protecting the raw value.</p>
<pre><code class="language-sql">-- Verify which columns carry policy tags in an in-scope dataset
SELECT
  table_name,
  column_name,
  policy_tags
FROM `finance_prod.revenue_reporting`.INFORMATION_SCHEMA.COLUMN_FIELD_PATHS
WHERE ARRAY_LENGTH(policy_tags.names) &gt; 0
ORDER BY table_name, column_name;
</code></pre>
<h3>4. Row-level security for entity and regional segregation</h3>
<p>Where a single revenue table serves multiple legal entities, <a href="https://docs.cloud.google.com/bigquery/docs/managing-row-level-security" target="_blank" rel="noopener">row-level access policies</a> enforce entity segregation inside the table rather than through fragile view sprawl:</p>
<pre><code class="language-sql">CREATE ROW ACCESS POLICY entity_emea_only
ON `finance_prod.revenue_reporting.fct_revenue`
GRANT TO ('group:finance-emea@example.com')
FILTER USING (legal_entity = 'EMEA');
</code></pre>
<p>Two operational caveats we state in every engagement: row access policies silently filter rows (users see a subset, not an error), so reconciliation jobs must run as an identity with full-table access; and policies do not apply to time-travel reads by users with <code>bigquery.rowAccessPolicies.overrideTimeTravelRestrictions</code>-adjacent bypass paths — audit who holds table-level admin rights.</p>
<h3>5. Customer-managed encryption keys (CMEK)</h3>
<p>BigQuery encrypts everything at rest by default, but default encryption gives you no key custody evidence. <a href="https://docs.cloud.google.com/bigquery/docs/customer-managed-encryption" target="_blank" rel="noopener">CMEK</a> puts the key-encryption key in your Cloud KMS keyring: you control rotation, you control revocation, and disabling the key renders the dataset unreadable — a demonstrable termination control. Grant the BigQuery encryption service account (<code>bq-PROJECT_NUMBER@bigquery-encryption.iam.gserviceaccount.com</code>) the <code>roles/cloudkms.cryptoKeyEncrypterDecrypter</code> role, colocate the key with the dataset region (a US multi-region dataset needs a <code>us</code> keyring), and set rotation ≤ 90 days for in-scope data.</p>
<pre><code class="language-bash"># Current vs proposed: rotation period on the SOX keyring
# parameter: rotation-period | current: none (manual) | proposed: 90d | applies: next rotation
gcloud kms keys update sox-bq-key 
  --keyring=sox-keyring --location=us 
  --rotation-period=90d 
  --next-rotation-time=2026-09-01T00:00:00Z
</code></pre>
<h3>6. Perimeter controls: VPC Service Controls and organization policies</h3>
<p>IAM answers &#8220;who may read&#8221;; it does not answer &#8220;where may the data go.&#8221; A <a href="https://docs.cloud.google.com/vpc-service-controls/docs/overview" target="_blank" rel="noopener">VPC Service Controls perimeter</a> around the financial projects blocks exfiltration paths IAM cannot see — <code>bq mk --transfer_config</code> into an external project, result extraction to an out-of-perimeter bucket, cross-project table copies. Complement it with organization policies: domain-restricted sharing (<code>constraints/iam.allowedPolicyMemberDomains</code>) so no grant can name an identity outside your Workspace domain, and disable public dataset access. These two org policies alone close the &#8220;analyst shares revenue table with personal Gmail&#8221; finding that appears in a depressing share of first-year audits.</p>
<h2>Layer 2 — Detective Controls</h2>
<h3>7. The audit log pipeline: export, retain, lock</h3>
<p>This is the control auditors spend the most time on, and the one with a hard deadline in it. Per <a href="https://docs.cloud.google.com/logging/docs/audit" target="_blank" rel="noopener">Cloud Audit Logs</a> behavior: Admin Activity, System Event, and Policy Denied logs are always on; Data Access logs are disabled by default across Google Cloud <em>except for BigQuery, where they are enabled by default</em> — every query, every table read, every export lands in <code>BigQueryAuditMetadata</code> (use it, not the legacy <code>AuditData</code> format — see the <a href="https://docs.cloud.google.com/bigquery/docs/reference/auditlogs" target="_blank" rel="noopener">BigQuery audit logs reference</a>).</p>
<p>The trap is retention. Per <a href="https://docs.cloud.google.com/logging/quotas" target="_blank" rel="noopener">Cloud Logging quotas</a>, the <code>_Required</code> bucket holds Admin Activity logs for a non-configurable 400 days, but Data Access logs land in <code>_Default</code> with <strong>30-day retention</strong>. SOX audit workpaper retention is seven years. Thirty days of query history does not survive an audit cycle, let alone seven years — so route the logs into BigQuery itself via a log sink, and lock the bucket:</p>
<pre><code class="language-bash"># 1. Sink BigQuery data-access logs into a dedicated audit dataset
gcloud logging sinks create sox-bq-audit-sink 
  bigquery.googleapis.com/projects/audit-prod/datasets/bq_audit_logs 
  --log-filter='resource.type="bigquery_dataset" OR
    protoPayload.metadata."@type"="type.googleapis.com/google.cloud.audit.BigQueryAuditMetadata"' 
  --use-partitioned-tables

# 2. Grant the sink writer identity dataEditor on the audit dataset
#    (printed as writerIdentity by the command above)

# 3. Alternative/parallel: raise _Default retention (1–3650 days, configurable)
#    parameter: retention-days | current: 30 | proposed: 2555 (7y) | applies: immediately
gcloud logging buckets update _Default --location=global --retention-days=2555
</code></pre>
<p>The audit dataset lives in a separate project with its own IAM (the people being audited must not hold write access to their own trail — that is the whole point), CMEK-encrypted, with the sink&#8217;s partitioned tables giving you cheap seven-year storage on long-term pricing.</p>
<figure>
       Audit-log evidence pipeline (control 7)  BigQuery jobs Every query, read, export Data Access logs: ON by default for BigQuery   Cloud Logging _Default bucket 30-day retention <img decoding="async" src="https://s.w.org/images/core/emoji/17.0.2/72x72/26a0.png" alt="&#x26a0;" class="wp-smiley"> (configurable 1–3650 days)  log sink  Audit dataset audit-prod.bq_audit_logs Partitioned · CMEK · 7-year retention · separate IAM   Evidence Scheduled queries Quarterly reviews Write alerts SOX workpaper retention is seven years — the 30-day default is the single most common audit-log finding. Auditees hold no write access to the audit project.<figcaption>From default 30-day log retention to a seven-year, tamper-isolated audit trail in BigQuery.</figcaption></figure>
<h3>8. Access monitoring: the queries that answer &#8220;who touched revenue&#8221;</h3>
<p>With the sink in place, the auditor&#8217;s favorite question becomes a query. Who read the revenue tables, when, from where, and did any service account behave anomalously:</p>
<pre><code class="language-sql">-- Who accessed in-scope tables in the last quarter (from the audit sink)
SELECT
  protopayload_auditlog.authenticationInfo.principalEmail AS principal,
  JSON_VALUE(protopayload_auditlog.metadataJson,
             '$.tableDataRead.reason')                    AS read_reason,
  resource.labels.dataset_id                              AS dataset_id,
  COUNT(*)                                                AS access_count,
  MIN(timestamp)                                          AS first_access,
  MAX(timestamp)                                          AS last_access
FROM `audit-prod.bq_audit_logs.cloudaudit_googleapis_com_data_access`
WHERE resource.labels.dataset_id = 'revenue_reporting'
  AND timestamp &gt;= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 90 DAY)
GROUP BY principal, read_reason, dataset_id
ORDER BY access_count DESC;
</code></pre>
<p>For interactive investigation inside the retention window, <a href="https://docs.cloud.google.com/bigquery/docs/information-schema-jobs" target="_blank" rel="noopener"><code>INFORMATION_SCHEMA.JOBS</code></a> gives you 180 days of job history without any pipeline:</p>
<pre><code class="language-sql">-- Jobs that wrote to in-scope tables outside the deployment service account
SELECT
  user_email,
  job_id,
  statement_type,
  destination_table.dataset_id,
  destination_table.table_id,
  creation_time
FROM `region-us`.INFORMATION_SCHEMA.JOBS_BY_PROJECT
WHERE destination_table.dataset_id = 'revenue_reporting'
  AND statement_type IN ('INSERT', 'UPDATE', 'DELETE', 'MERGE',
                         'CREATE_TABLE_AS_SELECT', 'TRUNCATE_TABLE')
  AND user_email != 'deploy-sa@finance-prod.iam.gserviceaccount.com'
  AND creation_time &gt;= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 90 DAY)
ORDER BY creation_time DESC;
</code></pre>
<p>A passing control returns zero rows: nothing writes to financial tables except the pipeline identity. Wire the same predicate into a log-based alert so an out-of-band write pages someone the day it happens, not the quarter it is sampled.</p>
<h3>9. Change management: declarative infrastructure and SQL under version control</h3>
<p>Section 404 auditors test change management harder than access control, because manual hotfixes to revenue logic are where restatements come from. The control has three parts. First, schema and infrastructure are declarative — Terraform owns datasets, IAM bindings, CMEK wiring — so every change is a reviewed pull request with an approver who is not the author:</p>
<pre><code class="language-hcl">resource "google_bigquery_dataset" "revenue_reporting" {
  dataset_id                      = "revenue_reporting"
  location                        = "US"
  default_partition_expiration_ms = null   # financial data: no silent expiry

  default_encryption_configuration {
    kms_key_name = google_kms_crypto_key.sox_bq_key.id
  }

  labels = {
    sox_scope  = "in_scope"
    data_owner = "finance_engineering"
  }
}
</code></pre>
<p>Second, transformation SQL (dbt, Dataform, or plain scheduled queries) lives in the same review gate — no console-edited scheduled queries on in-scope datasets. Third, the audit logs closes the loop: every <code>google.cloud.bigquery.v2.JobService.InsertJob</code> with a DDL statement type against an in-scope dataset should reconcile 1:1 with a merged pull request. That reconciliation, run quarterly, is the change-management evidence.</p>
<h3>10. Retention and recoverability: time travel is not a backup</h3>
<p>BigQuery&#8217;s <a href="https://docs.cloud.google.com/bigquery/docs/time-travel" target="_blank" rel="noopener">time travel</a> window is 2–7 days (default 7), with a fixed 7-day fail-safe behind it. That is an operational undo, not a SOX retention control — fourteen days of recoverability does not support a seven-year evidence obligation. The control set: time travel pinned to 7 days on in-scope datasets (state it explicitly, don&#8217;t inherit defaults), scheduled table snapshots at period close so every reported number has a frozen source, and no default table expiration on financial datasets (an expiry policy silently deleting revenue history is a control failure you find at the worst possible moment).</p>
<pre><code class="language-sql">-- Snapshot the revenue fact table at quarter close (zero-copy until divergence)
CREATE SNAPSHOT TABLE `finance_prod.period_close.fct_revenue_2026_q2`
CLONE `finance_prod.revenue_reporting.fct_revenue`
FOR SYSTEM_TIME AS OF TIMESTAMP '2026-07-01 00:00:00+00';
</code></pre>
<p>Standing caveat: rehearse the restore. A quarterly drill that recovers a snapshot into a scratch dataset and reconciles row counts against the close report is ten minutes of work and the difference between a backup strategy and a backup hope. Test every procedure here in a non-production project before applying it to production, and keep your DR posture current.</p>
<h2>Layer 3 — Process and Evidence</h2>
<h3>11. Quarterly access review with attestation</h3>
<p>Auditors sample quarters; the control must therefore fire quarterly without heroics. Export per-dataset IAM (dataset ACLs and project bindings), diff against the previous quarter, route additions to the data owner for attestation, and retain the signed attestation alongside the IAM export in the audit project. The whole loop is scriptable with <code>bq show --format=prettyjson</code> plus a scheduled query over the audit sink for <code>SetIamPolicy</code> events — the grant history is already in your logs:</p>
<pre><code class="language-sql">-- All IAM changes on in-scope datasets this quarter
SELECT
  timestamp,
  protopayload_auditlog.authenticationInfo.principalEmail AS changed_by,
  resource.labels.dataset_id,
  protopayload_auditlog.methodName
FROM `audit-prod.bq_audit_logs.cloudaudit_googleapis_com_activity`
WHERE protopayload_auditlog.methodName LIKE '%SetIamPolicy%'
  AND timestamp &gt;= TIMESTAMP '2026-04-01 00:00:00+00'
ORDER BY timestamp;
</code></pre>
<h3>12. Evidence pack: make the audit boring</h3>
<p>The final control is meta: everything above produces artifacts on a schedule, into one place. Our standard evidence pack per quarter — IAM exports and attestations, the zero-row output of the unauthorized-write query, DDL-to-PR reconciliation, KMS rotation history, restore-drill log, and Google&#8217;s SOC 2 Type II report pulled from Compliance Reports Manager for the infrastructure layer. When the evidence generates itself, the audit costs days instead of weeks.</p>
<h2>The BigQuery SOX compliance checklist at a glance</h2>
<p>Use this table as the working artifact: walk it quarterly, and require that every row can produce its evidence on demand. In our experience the first pass of a BigQuery SOX compliance checklist fails on rows 2, 7, and 9 — primitive roles, 30-day log retention, and console-edited scheduled queries — so start there if audit season is close.</p>
<table>
<thead>
<tr>
<th>#</th>
<th>Control</th>
<th>ITGC domain</th>
<th>Primary evidence</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Dataset inventory &amp; SOX labels</td>
<td>Access / scoping</td>
<td><code>SCHEMATA_OPTIONS</code> label query</td>
</tr>
<tr>
<td>2</td>
<td>Least-privilege IAM, no primitive roles</td>
<td>Access</td>
<td>Empty primitive-role grant listing</td>
</tr>
<tr>
<td>3</td>
<td>Column-level security (policy tags)</td>
<td>Access</td>
<td><code>COLUMN_FIELD_PATHS</code> tag query</td>
</tr>
<tr>
<td>4</td>
<td>Row-level access policies</td>
<td>Access</td>
<td>Policy DDL + entity access test</td>
</tr>
<tr>
<td>5</td>
<td>CMEK with ≤90-day rotation</td>
<td>Access / ops</td>
<td>KMS rotation history</td>
</tr>
<tr>
<td>6</td>
<td>VPC-SC perimeter + org policies</td>
<td>Access</td>
<td>Perimeter config, denied-egress logs</td>
</tr>
<tr>
<td>7</td>
<td>Audit log sink, 7-year locked retention</td>
<td>Monitoring</td>
<td>Sink config + bucket retention</td>
</tr>
<tr>
<td>8</td>
<td>Access &amp; write monitoring queries</td>
<td>Monitoring</td>
<td>Zero-row unauthorized-write report</td>
</tr>
<tr>
<td>9</td>
<td>Terraform + SQL change control</td>
<td>Change mgmt</td>
<td>DDL-to-PR reconciliation</td>
</tr>
<tr>
<td>10</td>
<td>Time travel + close snapshots + restore drills</td>
<td>Operations</td>
<td>Snapshot DDL, drill log</td>
</tr>
<tr>
<td>11</td>
<td>Quarterly access review</td>
<td>Access</td>
<td>Signed attestations</td>
</tr>
<tr>
<td>12</td>
<td>Automated evidence pack</td>
<td>All</td>
<td>Quarterly evidence archive</td>
</tr>
</tbody>
</table>
<h2>Version boundaries and honest edges</h2>
<p>Everything above reflects Google Cloud behavior as of August 2026: BigQuery Data Access logs on by default, <code>_Default</code> bucket at 30 days (configurable 1–3650), <code>_Required</code> fixed at 400 days, time travel 2–7 days with a 7-day fail-safe, <code>INFORMATION_SCHEMA.JOBS</code> at 180 days. Retention defaults and log formats have changed before; re-verify against the linked documentation before you certify a control on them.</p>
<p>This BigQuery SOX compliance checklist covers the BigQuery-native control surface — it does not cover upstream pipeline controls (your Kafka/Datastream/Fivetran layer needs its own change management), application-level controls in your ERP, or the entity-level controls your auditors test outside IT entirely. And SOX applicability is a determination for your auditors and counsel, not your database team: we are engineers, and this is engineering guidance, not legal advice.</p>
<h2>Where this fits in a broader governance program</h2>
<p>SOX controls on BigQuery rarely stand alone — they usually arrive alongside a broader push to make analytics platforms auditable, the same discipline we describe in our <a href="https://minervadb.com/fractional-chief-data-officer-real-time-analytics/">fractional CDO real-time analytics playbook</a> and apply to regulated retail estates in the <a href="https://minervadb.com/retail-data-analytics-modern-retail-stack/">modern retail data stack</a>. If you are staring down your first SOX cycle on BigQuery — or your auditors just handed you a findings list — MinervaDB&#8217;s <a href="https://minervadb.com/fractional-chief-data-officer/">fractional Chief Data Officer and database governance practice</a> implements exactly this control set, evidence pipeline included. As always: test every control in a staging project before touching production, and keep a rehearsed DR posture behind every retention promise.</p>
<p><a href="https://minervadb.com/bigquery-sox-compliance-checklist/">BigQuery SOX Compliance Checklist: 12 Proven Controls</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MySQL 26.7 Moves the Thread Pool Plugin to Community Edition</title>
        <link>https://minervadb.com/mysql-thread-pool-community-26-7/</link>
        <pubDate>Sat, 22 Aug 2026 08:43:16 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mysql-26-7-moves-the-thread-pool-plugin-to-community-edition/</guid>
        <source url="https://minervadb.com/">The Data Transformation Company</source>
        <description><![CDATA[<p>MySQL 26.7 moved the Thread Pool plugin to Community edition. As of the 26.7.0 Innovation release (GA 2026-07-31), the MySQL Thread Pool — the connection-handling model Oracle reserved for MySQL Enterprise Edition for roughly fifteen [...]</p>
<p><a href="https://minervadb.com/mysql-thread-pool-community-26-7/">MySQL 26.7 Moves the Thread Pool Plugin to Community Edition</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MySQL 26.7 moved the Thread Pool plugin to Community edition. As of the 26.7.0 Innovation release (GA 2026-07-31), the MySQL Thread Pool — the connection-handling model Oracle reserved for MySQL Enterprise Edition for roughly fifteen years — now ships in MySQL Community Server — no subscription, no commercial binary. </p>
<p>For any team running high-connection-count MySQL on Community builds, this is the most consequential edition change since the MySQL 9.7 LTS Community transfers three months earlier.</p>
<p>This MySQL Thread Pool release analysis covers what actually changed, how to turn the plugin on and verify it is working, how to tune and monitor it with the Performance Schema, who should adopt it now versus wait, and where it leaves the Community-versus-Enterprise decision. Every claim is version-pinned; configuration values shown are starting points to be measured against your workload, not universal settings. Standard caveat: test in staging and keep a rollback path before changing <code>thread_handling</code> on a production server.</p>
<h2>What MySQL 26.7 Changed, and Why It Matters</h2>
<p>MySQL 26.7.0 is the first generally available Innovation release after MySQL 9.7 LTS, and the first MySQL release to use the new <code>YY.M</code> calendar-versioning model (so &#8220;26.7&#8221; is the July 2026 release, not a 26th major version). Its headline edition change is short to state and large in consequence: the <strong>Thread Pool plugin is now included in MySQL Community Edition</strong>. It is the same plugin, with the same system variables and the same Performance Schema instrumentation that Enterprise customers have used for years. Oracle confirmed the change in the <a href="https://blogs.oracle.com/mysql/mysql-july-2026-ga-releases-now-available" target="_blank" rel="noopener">MySQL July 2026 GA announcement</a>.</p>
<p>This continues a trajectory that began at 9.7. That LTS moved eight capability groups across the Enterprise-to-Community line — the Hypergraph Optimizer, the OpenTelemetry telemetry component, three Group Replication components (flow control, resource manager, primary election), replication applier metrics, and JSON Duality View DML. MySQL 26.7 adds Thread Pool to that list.</p>
<p><img decoding="async" src="https://minervadb.com/wp-content/uploads/2026/08/mysql-enterprise-to-community-thread-pool-timeline.png" alt="Timeline of MySQL Enterprise to Community feature migration: 9.7 LTS moved eight capability groups and MySQL 26.7 moved the Thread Pool plugin to Community edition" width="960" class="wp-image-92914"></p>
<p>The practical significance is that the MySQL Thread Pool was, for fifteen years, the single most-cited Enterprise Edition performance feature. Its move to Community does not invent a capability the open-source world lacked — Percona Server has shipped its own thread pool since 5.5, and MariaDB has long had one — but it makes Oracle&#8217;s canonical implementation free on stock MySQL. For the renewal conversation, the effect is decisive: the Enterprise value proposition has shifted away from performance and high availability toward security, backup, AI, and support. Thread Pool is no longer a reason to hold an Enterprise subscription.</p>
<h2>The Problem the MySQL Thread Pool Solves: Connection Scaling</h2>
<p>To understand the MySQL Thread Pool, start with the default. MySQL&#8217;s connection-handling model is thread-per-connection: every client connection is served by one dedicated operating-system thread for its entire lifetime. This is simple and low-latency at moderate concurrency, and it is the right default for most workloads. It degrades predictably when the number of concurrent connections climbs well past the number of CPU cores.</p>
<p><img decoding="async" src="https://minervadb.com/wp-content/uploads/2026/08/thread-per-connection-vs-mysql-thread-pool-26-7.png" alt="Diagram comparing MySQL thread-per-connection model with the thread pool model introduced to Community edition in MySQL 26.7, showing connections multiplexed onto bounded thread groups" width="960" class="wp-image-92913"></p>
<p>Three mechanisms drive the degradation, and all three are measurable rather than theoretical. Context-switching overhead rises as thousands of runnable threads compete for a handful of cores, so the OS scheduler spends an increasing share of cycles switching rather than executing.</p>
<p>CPU-cache efficiency falls because each thread carries its own stack, and thousands of stacks evict each other&#8217;s working set from L2/L3. And transaction parallelism drives contention inside InnoDB — more concurrent transactions means more pressure on shared structures, and past a point additional concurrency reduces throughput instead of increasing it.</p>
<p>The thread pool replaces &#8220;one thread per connection&#8221; with a bounded set of thread groups. Connections are distributed across <code>thread_pool_size</code> groups (default derived from CPU count), and each group runs a small number of active threads that multiplex many connections. Because the number of actively executing threads is capped near the core count, thread-stack reuse keeps the CPU-cache footprint small and transaction parallelism stays bounded — which is precisely what protects InnoDB from the contention cliff.</p>
<p>The trade is latency fairness: a bounded pool can queue a statement briefly under load, so a latency-critical, moderate-concurrency workload can be worse off on the pool than on the default model.</p>
<h2>Enabling the MySQL Thread Pool in 26.7 Community</h2>
<p>Because the MySQL Thread Pool is now bundled with Community Edition, enabling it is the same declarative install used on Enterprise, with no commercial package to source first. Confirm the plugin library is present, install the plugin set, and switch the connection-handling model. The plugin is loaded at startup, so the durable configuration lives in <code>my.cnf</code>. The mechanics match the <a href="https://dev.mysql.com/doc/refman/8.0/en/thread-pool.html" target="_blank" rel="noopener">MySQL Thread Pool reference documentation</a>.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- 1. Confirm you are on a release that ships Thread Pool in Community
SELECT VERSION();   -- expect 26.7.0 or later on a Community build

-- 2. Load the plugin set (INSTALL PLUGIN persists in the mysql.plugin table,
--    but thread_handling must still be set in my.cnf; see step 4)
INSTALL PLUGIN thread_pool SONAME 'thread_pool.so';

-- 3. Verify the plugin and its companion Performance Schema tables are ACTIVE
SELECT PLUGIN_NAME, PLUGIN_STATUS, PLUGIN_TYPE
  FROM information_schema.PLUGINS
 WHERE PLUGIN_NAME LIKE 'thread_pool%'
    OR PLUGIN_NAME LIKE 'tp_%';
</pre>
<p>The connection-handling model itself is not a runtime-settable variable — it is read at server start. Set it in the configuration file and restart during a maintenance window. State the blast radius before you do: switching <code>thread_handling</code> changes how <em>every</em> connection is scheduled, so validate on a replica first and have the one-line rollback ready.</p>
<pre><code class="language-ini"># my.cnf  — Thread Pool configuration (MySQL 26.7 Community)
# Change: thread_handling  one-connection-per-thread -&gt; pool-of-threads
# Requires a server restart. Rollback: comment these out and restart.
[mysqld]
thread_handling                  = pool-of-threads
thread_pool_size                 = 16      # start at number of physical cores
thread_pool_max_transactions_limit = 512   # ~ cores x 32; caps concurrent txns
thread_pool_stall_limit          = 6       # units of 10ms; 6 = 60ms stall check
thread_pool_algorithm            = 1       # 1 favors high-concurrency OLTP
thread_pool_query_threads_per_group = 2    # worker threads per group to start
</code></pre>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- 4. After restart, confirm the model actually changed
SHOW GLOBAL VARIABLES LIKE 'thread_handling';
-- Expected: thread_handling = pool-of-threads

SHOW GLOBAL VARIABLES LIKE 'thread_pool%';
</pre>
<h2>Tuning the MySQL Thread Pool: The Variables That Matter</h2>
<p>Four MySQL Thread Pool variables carry most of the tuning weight. Treat the values below as starting points anchored to hardware, then adjust against measured throughput and latency — never against a rule of thumb alone. The starting points below follow the <a href="https://dev.mysql.com/doc/refman/8.0/en/thread-pool-tuning.html" target="_blank" rel="noopener">MySQL Thread Pool tuning guidance</a>.</p>
<table>
<thead>
<tr>
<th>Variable</th>
<th>What it controls</th>
<th>Starting point</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>thread_pool_size</code></td>
<td>Number of thread groups; the primary concurrency dial</td>
<td>Number of physical cores for InnoDB workloads (max 512); keep low (4–8) for MyISAM-heavy ones</td>
</tr>
<tr>
<td><code>thread_pool_max_transactions_limit</code></td>
<td>Ceiling on concurrently executing transactions across all groups</td>
<td>Physical cores × 32, then tune down if InnoDB contention persists</td>
</tr>
<tr>
<td><code>thread_pool_stall_limit</code></td>
<td>How long a group waits before treating a running statement as stalled and starting another worker (units of 10 ms)</td>
<td>Default 6 (60 ms); lower it if short queries are stuck behind long ones</td>
</tr>
<tr>
<td><code>thread_pool_algorithm</code></td>
<td>Scheduling algorithm</td>
<td>1 for high-concurrency OLTP; 0 is the conservative default</td>
</tr>
</tbody>
</table>
<p>The <code>thread_pool_stall_limit</code> value is the one most worth understanding. When every thread in a group is busy, the group will not start a new statement until the stall timer expires — this is deliberate, and it is what caps parallelism. Set it too high and a burst of long-running statements can starve short OLTP queries; set it too low and you erode the contention protection you turned the pool on for. This is a workload-shape decision, not a default.</p>
<p>One interaction is worth calling out explicitly, because it trips up first-time tuners. <code>thread_pool_size</code> and <code>thread_pool_max_transactions_limit</code> are not independent knobs. The first sets how many thread groups exist; the second caps how many transactions can execute across all of those groups at once. If you raise <code>thread_pool_size</code> to match a high core count but leave the transaction limit low, you have created groups that are structurally allowed to run work but are throttled from doing so, and throughput plateaus below what the hardware can deliver. Conversely, a generous transaction limit with too few groups concentrates connections and reintroduces the queuing you were trying to avoid.</p>
<p>Tune them as a pair: set <code>thread_pool_size</code> to the physical core count first, then raise or lower <code>thread_pool_max_transactions_limit</code> while watching the stall ratio and InnoDB row-lock waits, and stop at the point where additional concurrency stops improving committed transactions per second. That inflection point is specific to your schema and access pattern, which is exactly why the values in the table above are starting points and not answers.</p>
<h2>Monitoring the MySQL Thread Pool with the Performance Schema</h2>
<p>The MySQL Thread Pool ships three Performance Schema tables, and they are the measurement source for every tuning decision. Recommendations that are not anchored to these tables are guesses.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- Live per-group state: how many connections and threads each group holds,
-- and how deep the high/low priority queues are right now
SELECT TP_GROUP_ID,
       CONNECTION_COUNT,
       THREAD_COUNT,
       ACTIVE_THREAD_COUNT,
       QUEUED_QUERIES        -- backlog is the early-warning signal
  FROM performance_schema.tp_thread_group_state
 ORDER BY QUEUED_QUERIES DESC;
</pre>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- Stall ratio: the single most important thread pool health metric.
-- A rising ratio means statements are being treated as stalled and
-- spawning extra workers — i.e. the pool is fighting your workload.
SELECT SUM(STALLED_QUERIES_EXECUTED) / NULLIF(SUM(QUERIES_EXECUTED), 0)
         AS stalled_ratio,
       SUM(QUERIES_EXECUTED)  AS total_queries,
       SUM(STALLED_QUERIES_EXECUTED) AS stalled_queries
  FROM performance_schema.tp_thread_group_stats;
</pre>
<pre class="EnlighterJSRAW" data-enlighter-language="json">/* Illustrative output shape — values will differ on your server
+---------------+---------------+-----------------+
| stalled_ratio | total_queries | stalled_queries |
+---------------+---------------+-----------------+
|        0.0123 |      48211900 |          593006 |
+---------------+---------------+-----------------+
*/</pre>
<p>These two tables are the backbone of MySQL Thread Pool monitoring. Read these together. A persistently high <code>QUEUED_QUERIES</code> in <code>tp_thread_group_state</code> combined with a climbing stalled ratio in <code>tp_thread_group_stats</code> tells you the pool is too small for the offered load — raise <code>thread_pool_size</code> or investigate the long statements holding groups busy. A low stalled ratio with acceptable latency means the pool is doing its job. Always baseline both before and after any variable change, and correlate with connection counts the way you would when sizing a client-side pool in our <a href="https://minervadb.com/mysql-connection-pooling-best-practices-at-scale/">MySQL connection pooling guide</a>.</p>
<h2>Who Should Adopt the MySQL Thread Pool in 26.7 — and Who Should Wait</h2>
<p>The MySQL Thread Pool is a targeted fix, not a universal upgrade. The clearest MySQL Thread Pool candidates are OLTP servers with thousands of mostly-idle or bursty connections — the classic PHP/short-connection or microservice fan-out pattern — where connection count runs far ahead of core count and throughput visibly collapses past a concurrency threshold.</p>
<p>If you can reproduce a throughput curve that peaks and then falls as concurrency rises, the pool is likely to flatten that fall.</p>
<p>Workloads that should <em>not</em> rush to it: latency-sensitive, moderate-concurrency systems where connection count stays near or below core count. For those, thread-per-connection is already optimal, and the pool&#8217;s queuing can only add latency. Analytics/OLAP servers running a small number of large parallel queries gain nothing from connection multiplexing. And if a well-behaved client-side connection pool (ProxySQL, a framework pool) already holds server connections to a sane number, the server-side thread pool addresses a problem you may not have.</p>
<p><strong>Our stance for 26.7 specifically.</strong> The feature is genuinely valuable and now free, but 26.7 is an <em>Innovation</em> release, not LTS — it is supported only until the next Innovation release supersedes it, whereas 9.7 LTS carries Premier support to 2034.</p>
<p>For production, the disciplined path is to prove Thread Pool on 26.7 in staging, confirm the throughput win against your own workload, and deploy it in production on the LTS line you actually run — 9.7 — if and when the plugin is available there, rather than putting a short-lived Innovation build under a production estate for a single feature. Treat 26.7 as the release that <em>proves</em> the capability is free, and your LTS as where it lands.</p>
<h2>What This Means for the Community-vs-Enterprise Decision</h2>
<p>With the MySQL Thread Pool gone to Community, the honest Enterprise Edition value proposition after 26.7 is security, backup, AI, and support — not performance and not high availability, both of which are now fully open source. With the MySQL Thread Pool no longer a differentiator, before renewing an Enterprise subscription run the usage audit: enumerate which Enterprise features are actually in use.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- The Enterprise renewal audit: what are you actually paying for?
SHOW PLUGINS;

SELECT PLUGIN_NAME, PLUGIN_STATUS, PLUGIN_LIBRARY
  FROM information_schema.PLUGINS
 WHERE PLUGIN_LIBRARY IS NOT NULL;

SHOW GLOBAL VARIABLES LIKE 'audit%';     -- Enterprise Audit in use?
SHOW GLOBAL VARIABLES LIKE 'keyring%';   -- which keyring / KMS integration?
</pre>
<p>Most Enterprise estates use MySQL Enterprise Backup and Enterprise Audit and little else, and both have credible open-source equivalents (Percona XtraBackup and Percona Audit Log respectively).</p>
<p>Even with the MySQL Thread Pool now free, what legitimately keeps a subscription in place after 26.7 is a narrower list: Enterprise Backup where XtraBackup for your version line is not yet GA, hard Enterprise Firewall or Data Masking compliance requirements with no in-server open-source equivalent, Kerberos/LDAP enterprise authentication, DISA STIG or CIS contractual certification, NDB Cluster, or on-premises vector search and in-database LLMs via MySQL AI.</p>
<p>If none of those apply, Thread Pool&#8217;s move removes one of the last performance-shaped reasons to renew. For a deeper look at eliminating server-side contention once the pool is in place, our <a href="https://minervadb.com/innodb-performance-optimization-mysql-tuning/">InnoDB performance optimization guide</a> covers the InnoDB-layer tuning that pairs with it.</p>
<h2>MySQL Thread Pool FAQ</h2>
<h3>Is MySQL 26.7 Thread Pool the same as the Percona or MariaDB thread pool?</h3>
<p>Not quite. The MySQL Thread Pool and its cousins solve the same problem with the same core idea — bounded thread groups multiplexing many connections — but they are independent implementations with different variables and internals. What 26.7 changes is that Oracle&#8217;s canonical Thread Pool plugin, previously Enterprise-only, is now the free default option on stock MySQL Community, so you no longer need Percona Server or MariaDB to get an Oracle-lineage thread pool.</p>
<h3>Do I need to restart MySQL to enable the MySQL Thread Pool?</h3>
<p>Yes. <code>thread_handling</code> is read at server startup, so switching from <code>one-connection-per-thread</code> to <code>pool-of-threads</code> requires a restart. Plan it in a maintenance window, validate on a replica first, and keep the rollback (comment out the settings, restart) ready.</p>
<h3>Should I run Thread Pool in production on MySQL 26.7?</h3>
<p>The MySQL Thread Pool is worth staging, not rushing. Prove it on 26.7 in staging, but for production prefer the LTS line (9.7) that carries long support, since 26.7 is an Innovation release supported only until the next Innovation release. Adopt the pool where connection count greatly exceeds core count and throughput degrades under concurrency; skip it for latency-sensitive, low-concurrency, or OLAP workloads.</p>
<h3>Does moving Thread Pool to Community end the case for MySQL Enterprise Edition?</h3>
<p>No, but it narrows it. After 26.7, Enterprise&#8217;s real value is security (Firewall, Data Masking, enterprise authentication), backup (MEB where XtraBackup is not GA for your line), MySQL AI, and Oracle support/certification — not performance or HA. Run the renewal audit above before deciding.</p>
<h2>MySQL Thread Pool: Final Thoughts</h2>
<p>MySQL 26.7 moving the Thread Pool plugin to Community edition is a small change to state and a meaningful one to act on for anyone tuning the MySQL Thread Pool. It gives every Community user Oracle&#8217;s own connection-scaling model for free, it closes a fifteen-year Enterprise differentiator, and it reshapes the renewal math for anyone paying for Enterprise primarily for performance. The engineering discipline around it is unchanged: enable the MySQL Thread Pool only where the connection-to-core ratio justifies it, tune <code>thread_pool_size</code> and <code>thread_pool_stall_limit</code> against measured throughput, monitor the stall ratio in <code>tp_thread_group_stats</code>, and land it on your LTS line rather than a short-lived Innovation build.</p>
<p>Done that way, the MySQL Thread Pool becomes a measured throughput win rather than a configuration gamble, and the plugin&#8217;s new Community status simply removes the licensing friction that used to sit in front of that decision.</p>
<p>If you are weighing a Thread Pool rollout, planning a 9.7 LTS upgrade, or reassessing an Enterprise renewal in light of the 9.7 and 26.7 Community transfers, MinervaDB&#8217;s MySQL consulting and <a href="https://minervadb.com/emergency-database-support/">24×7 enterprise-class database support</a> teams do this work daily across 900+ enterprise customers, with staged, reversible changes and a rollback path stated before anything touches production. As always: test before applying to production, and maintain a robust, tested DR posture.</p>
<p><a href="https://minervadb.com/mysql-thread-pool-community-26-7/">MySQL 26.7 Moves the Thread Pool Plugin to Community Edition</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Hackorum Update: What&#8217;s New Since February</title>
        <link>https://percona.community/blog/2026/08/20/hackorum-update-whats-new-since-february/</link>
        <pubDate>Thu, 20 Aug 2026 10:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/hackorum-update-whats-new-since-february/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>Back in February, I wrote about Hackorum, a forum style web view of the pg-hackers mailing list. If you missed that post, you can read it here first. It turns the mailing list into something that reads and navigates a bit more like a modern forum, while the mailing list itself stays the source of truth.</p>
<p><a href="https://percona.community/blog/2026/08/20/hackorum-update-whats-new-since-february/">Hackorum Update: What&#8217;s New Since February</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Back in February, I wrote about <a href="https://hackorum.dev/" target="_blank" rel="noopener noreferrer">Hackorum</a>, a forum style web view of the pg-hackers mailing list. If you missed that post, you can <a href="https://percona.community/blog/2026/02/02/hackorum-a-forum-style-view-of-pg-hackers/" target="_blank" rel="noopener noreferrer">read it here</a> first. It turns the mailing list into something that reads and navigates a bit more like a modern forum, while the mailing list itself stays the source of truth.</p>
<p><figure><img decoding="async" width="1800" height="873" src="https://percona.community/blog/2026/08/hackorum-update-topic-index_hu_8413875a6b00bf8f.webp" alt="Hackorum topic index showing pg-hackers threads with commitfest, patch and CI status icons" loading="lazy"></figure>
</p>
<p>A lot has happened since then. We also talked about the project at the PostgreSQL meetup in Berlin in March, <a href="https://www.postgresql.eu/events/pgconfde2026/schedule/session/7760-modernising-postgres-community-communication-with-hackorum/" target="_blank" rel="noopener noreferrer">at pgconf.de</a>, and in a lightning talk at pgconf.dev, and a good chunk of what was still on the roadmap back then is live today. We also posted <a href="https://www.youtube.com/watch?v=onQQJzQ8Qlw" target="_blank" rel="noopener noreferrer">a video introduction to Hackorum</a>, if you prefer to see it in action rather than read about it. This post is a follow up to walk through what changed, what is new, and what we are looking at next.</p>
<h2>A quick recap</h2>
<p>Hackorum is an Open Source project from the community to be used by the community and hosted on <a href="https://hackorum.dev/" target="_blank" rel="noopener noreferrer">hackorum.dev</a>. The code is on <a href="https://github.com/hackorum-dev/hackorum" target="_blank" rel="noopener noreferrer">GitHub</a>. If you are new here, the short version that it syncs postgres mailing lists in the background, keeps read status, stars, tags and notes for you, and adds commitfest context, commit and patch history, and contributor info directly next to the discussion.</p>
<p>Everything below is new for users since the last post. I am leaving out internal and admin only changes, since those do not affect how you use the site day to day.</p>
<h2>Commits linked back to their discussion</h2>
<p><figure><img decoding="async" width="1600" height="604" src="https://percona.community/blog/2026/08/hackorum-update-commit-profile_hu_2001c1ff82193dc2.webp" alt="Contributor profile showing commit credits and how many patch threads landed" loading="lazy"></figure>
</p>
<p>Hackorum now links pushed commits back to the thread and patch discussion that produced them. Contributor profile pages have a new commit history tab, so you can see someone’s message activity and their commits in one place. There is also a <a href="https://www.postgresql.org/message-id/CAAKRu_Z42AAq7N%3DusSS3UPMtXqbVvsQzktNmH1X20oypyqA_Xg%40mail.gmail.com" target="_blank" rel="noopener noreferrer">community proposal on pgsql-www</a> for public contributor profile pages, with the PostgreSQL Contributors Committee looking to recognize specific contributions beyond code, for example volunteering at a conference. If that lands, it would be a natural fit to surface on this profile too.</p>
<h2>Patch CI results, now public</h2>
<p><img decoding="async" src="https://percona.community/blog/2026/08/hackorum-update-ci-status.png" alt="CI status card on a thread, showing apply, build and test results"></p>
<p>Patches attached to a thread are automatically applied, rebased when master moves, and built and tested with the PostgreSQL test suite. Those results used to be an internal experiment, they are now public for everyone:</p>
<ul>
<li>CI status icons in the topic index, and full detail in tabs on the thread itself</li>
<li>A CI dashboard at <a href="https://hackorum.dev/ci" target="_blank" rel="noopener noreferrer">hackorum.dev/ci</a></li>
<li>A per topic CI history view</li>
<li>A stats overview page</li>
</ul>
<p><figure><img decoding="async" width="1600" height="1156" src="https://percona.community/blog/2026/08/hackorum-update-ci-history_hu_90e1159e5d48f16a.webp" alt="Patch CI history for a thread, showing every tracked patchset version and its result" loading="lazy"></figure>
</p>
<p>We reapply the latest version of each patch once a day against current master. If it stops applying, we do not give up right away, we keep retrying for 30 more days, so one bad day does not retire a patch. Only after 30 days of failing do we mark it retired, meaning the base is too old, and stop trying until a new version is posted.</p>
<p>Once something actually gets committed, there is nothing left to test against. There are two ways this shows up. If the committer changed the patch before committing it, the old version no longer applies and Hackorum shows it as no longer matching. If the committer applied it exactly as submitted, the diff against the committed version on GitHub is empty, so we know it went in as-is. Either way, we stop running CI on that thread until a new patch shows up. Some threads get committed in stages, with fixups or follow up patches, so if a new patchset lands afterward, we pick CI back up and start testing it.</p>
<p>One more detail worth calling out is that Hackorum highlights patches that are already committed but still have an open commitfest entry, so those are easy to spot and clean up. That is currently a big issue and might really help to get this easier updated in the future. A future integration with the commitfest might be thinkable.</p>
<h2>Support for more mailing lists</h2>
<p><img decoding="async" src="https://percona.community/blog/2026/08/hackorum-update-mailinglist-badge.png" alt="Mailing list badges next to each thread, showing hackers, bugs and docs"></p>
<p>Hackorum used to be pg-hackers only. It now also ingests pgsql-bugs, pgsql-docs, pgsql-general and pgsql-patches, with a badge next to each thread so you can see at a glance which list a message came from. We also tried pgsql-committers, it is imported up to around May/June, but we paused it for now. It is mostly terse commit notifications, and without a way to hide a list by default yet, it added more noise than value. We are planning to add more lists, so let us know if you are missing one.</p>
<h2>Saved searches</h2>
<p><img decoding="async" src="https://percona.community/blog/2026/08/hackorum-update-saved-searches.png" alt="Saved searches in the sidebar, grouped into global and personal searches"></p>
<p>The advanced search from the last post is still there, but you no longer have to retype the same query every time. You can save a search, personally or shared with your team, and pin it to your sidebar. We also ship a few global saved searches out of the box.</p>
<h2>Ignore threads you do not care about</h2>
<p>A small one, but a popular request was that you can now ignore a thread from the topic list with one click. Ignored threads disappear from your views and search results by default, and you can always list what you have ignored, or bring one back.</p>
<h2>Sending email from Hackorum</h2>
<p><figure><img decoding="async" width="1100" height="387" src="https://percona.community/blog/2026/08/hackorum-update-reply-composer_hu_c1e96db47ee957f6.webp" alt="Reply composer for sending a message to the mailing list from Hackorum" loading="lazy"></figure>
</p>
<p>This was the top item on the “planned” list in February, and it is here now. You can reply to a thread directly from Hackorum, including reply all, with a Thunderbird style selective quote so you only quote the part you are actually replying to. There is a drafts sidebar so you can keep several replies in progress, and a “My emails” page that shows everything you have sent through the site.</p>
<p>This is currently limited to @gmail accounts and being under active testing. If you like early access, just reach out so we can activate it for your user.</p>
<h2>Everyday improvements</h2>
<p>None of these are headline features on their own, but you will notice them:</p>
<ul>
<li>Long threads load in batches, so opening a huge discussion is noticeably faster</li>
<li>A “jump to latest” button, and a setting to jump straight to your first unread message when you open a thread</li>
<li>Read messages can collapse automatically if you prefer a shorter view</li>
<li>Patch diffs now show inline line stats and highlighting</li>
<li>Sessions now stay signed in for 30 days across devices</li>
<li>The light/dark theme toggle is available everywhere, even before you sign in</li>
</ul>
<h2>Mobile got a real pass</h2>
<p><img decoding="async" src="https://percona.community/blog/2026/08/hackorum-update-mobile-view.png" alt="Hackorum topic list on mobile"></p>
<p>The mobile experience got a lot of attention: a proper burger menu, a quick shortcut to threads you starred, working swipe back and forward gestures, and layout fixes for tablets and foldables.</p>
<h2>What we are working on next</h2>
<p>We are looking into AI generated summaries for longer threads, so you can get up to speed on a big discussion without reading every message.</p>
<h2>Try it and share feedback</h2>
<p>If you want to take a look, just go to <a href="https://hackorum.dev/" target="_blank" rel="noopener noreferrer">https://hackorum.dev/</a>.</p>
<p>The repository, including a simple dev setup, is here: <a href="https://github.com/hackorum-dev/hackorum" target="_blank" rel="noopener noreferrer">https://github.com/hackorum-dev/hackorum</a></p>
<p>Want to chat with us, join the hackorum channel on the <a href="https://discordapp.com/channels/1258108670710124574/1471524461374083186" target="_blank" rel="noopener noreferrer">PostgreSQL Hacking Discord</a>.</p>
<p>Is this useful? What is missing? What would you change? Bug reports, feature requests, and contributions are all welcome: <a href="https://github.com/hackorum-dev/hackorum/issues" target="_blank" rel="noopener noreferrer">https://github.com/hackorum-dev/hackorum/issues</a></p>
<p>Thanks for taking a look, and we appreciate any feedback.</p>
<p><a href="https://percona.community/blog/2026/08/20/hackorum-update-whats-new-since-february/">Hackorum Update: What&#8217;s New Since February</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>The curios case of timezone inconsistencies between PgBouncer and Patroni Cluster</title>
        <link>https://percona.community/blog/2026/08/20/timezone-inconsistencies-pgbouncer-patroni/</link>
        <pubDate>Thu, 20 Aug 2026 00:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/the-curios-case-of-timezone-inconsistencies-between-pgbouncer-and-patroni-cluster/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>I would like to introduce here the curious case that I had on a Patroni Cluster in production, after a migration from Oracle, with timezone differences between what was written from an application log and what was set in PostgreSQL.</p>
<p><a href="https://percona.community/blog/2026/08/20/timezone-inconsistencies-pgbouncer-patroni/">The curios case of timezone inconsistencies between PgBouncer and Patroni Cluster</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>I would like to introduce here the curious case that I had on a Patroni Cluster in production, after a migration from Oracle, with timezone differences between what was written from an application log and what was set in PostgreSQL.</p>
<p>First of all a quick description of our setup. We have a two nodes Patroni cluster on Open Stack virtual machines, PostgreSQL 18, with leader and a read only replica, so we write only on one node and use the second for data extractions. All applications use Kubernetes pods that are also setup in Open Stack and access PostgreSQL via PgBouncer connection pooler. We do have also some Java application making use of their own Hikari connection pooler. All on premises.</p>
<p>The application, being a legacy one, needed to use all the time data types in the timezone of the customer, so I had to setup the timezone of the PostgreSQL cluster different from the one of the VMs, that is in UTC. That was the first error as I set it up using a simple ALTER SYSTEM SET TIMEZONE followed by a SELECT pg_reload_conf(). This changes the timezone on the postgresql.auto.conf configuration file, which is totally good if you have a normal single node or replica PostgreSQL but not with a Patroni Cluster! I will return on this point in a moment.</p>
<p>In itself the migration was fine, but we had to tailor a little bit the resources assigned to the nodes as unfortunately we were not able to test, prior to the migration, some parts of the application. So we had to increase RAM on the VMs and modify shared_buffers parameter, doing a restart of the PostgreSQL cluster one node at a time.</p>
<p>Unfortunately the restart wiped out the timezone configuration that I did, as I should have added this through a patronictl edit-config command as I did for the shared_buffers. At least we recognized quickly the problem as the timezone of the whole Patroni Cluster reverted back to UTC. This time I changed it modifying the Patroni Cluster configuration, using the following patronictl command edit-config:</p>
<p><figure><img decoding="async" width="564" height="20" src="https://percona.community/blog/2026/08/pgbouncer-patroni-fig1-edit-config_hu_50afa8d9c5860e10.webp" alt="patronictl edit-config command" loading="lazy"></figure>
</p>
<p><em>Fig. 1 – patronictl edit-config command</em></p>
<p>And adding the correct timezone:</p>
<p><figure><img decoding="async" width="507" height="47" src="https://percona.community/blog/2026/08/pgbouncer-patroni-fig2-timezone-value_hu_7a688fd3a7312933.webp" alt="timezone Africa/Lagos in Patroni config" loading="lazy"></figure>
</p>
<p><figure><img decoding="async" width="595" height="400" src="https://percona.community/blog/2026/08/pgbouncer-patroni-fig3-apply-config_hu_665a6c1581ac5f4f.webp" alt="Apply Patroni config change" loading="lazy"></figure>
</p>
<p><em>Fig. 2 – Result of edit-config command</em></p>
<p>Confirmed issuing a show-config:</p>
<p><figure><img decoding="async" width="510" height="45" src="https://percona.community/blog/2026/08/pgbouncer-patroni-fig4-show-config_hu_66d45dfda5521c10.webp" alt="show-config timezone Africa/Lagos" loading="lazy"></figure>
</p>
<p><em>Fig. 3 – Result of show-config command</em></p>
<p>After that we resumed normal operations and all seemed fine, problem solved, no big issue or disruptions to our customer.</p>
<p>The day after I got contacted by one developer telling me that PostgreSQL in production is still in UTC. I checked it immediately and it was instead in WAT, confirmed issuing:</p>
<p><figure><img decoding="async" width="860" height="955" src="https://percona.community/blog/2026/08/pgbouncer-patroni-fig5-pgadmin-timezone_hu_3702cf3278763eca.webp" alt="pgAdmin show timezone Africa/Lagos" loading="lazy"></figure>
</p>
<p><em>Fig. 4 – Screenshot of show timezone in pgAdmin</em></p>
<p>Then the developers sent me the results of a query done on an application log table showing a clear inconsistency of timestamps, some were correct and some with UTC timezone! That is a very bad scenario, where you do not have a clear indication, all wrong or all correct, but mixed results.</p>
<p>I started suspecting that there was something wrong on the application side as all that I saw on the database was correct, except some of the values that were recorded. So my next move was to ask devops to restart one by one all the application pods (remember that we are using Kubernetes).</p>
<p>This action brought mixed results as at the beginning it seemed that problem was solved and no rows with timestamp with wrong timezone was inserted…but after some time the first rows with UTC started resurfacing again! That was weird so I started digging a little bit more and searched our setup and our structure, as I was sure that the PostgreSQL database in itself was not the culprit.</p>
<p>As you may have guessed at this point there was one Elephant in the room that I had not yet investigated (and no was not PostgreSQL Elephant, AKA Slonik): PgBouncer! In fact I had totally left out of the picture the connection pooler as I thought that it was installed in kubernetes as a sidecar of the application pods, so expecting that a restart of the pods would have affected also PgBouncer.</p>
<p>As that was the architectural schema that was decided some years ago for our applications. Turned out that this was not the case!</p>
<p>Let’s make a quick excursus on why it is extremely important to have a connection pooler in PostgreSQL, the pool mode parameter of PgBouncer and the possible ways of installing and configuring it. These points are important to understand our case.</p>
<p>PostgreSQL connections are costly, mainly in terms of RAM, so much that there is a parameter max_connections to limit the maximum number of sessions, both active and idle. The default value is 100 which obviously is quite low, but rising it means that we need to ensure that we have enough RAM available, as the overhead for each connection is roughly 10 Mb. Bringing this parameter up for example to 500 means having already 5 Gb of RAM used just for idle connections, without even issuing any query!</p>
<p>Here is where connection poolers come to the rescue, as they are capable of recycling the connections, so that applications do not need to open a new connection each time they need to query the database. The pool maintains a fixed set of open connections, all requests borrow a connection, use it, and return it to the pool. The connection itself is never closed between requests, it stays open and ready so that the next request picks it up instantly.</p>
<p>PgBouncer is the de facto standard for connection pooling in PostgreSQL as it is lightweight, easy to configure and maintain. There is a very important setup choice to be made when installing PgBouncer: the pool mode, that decides the behaviour of the pooler. There are 3 possible choices: Session – Transaction – Statement.</p>
<p>Session Pooling: Assigns a server connection to a client as soon as it connects and holds it until the client disconnects. It acts almost like a direct connection to PostgreSQL, supporting all session features, but offers the least connection reuse. This is the most safe way to configure PgBouncer, and since we use some session features like Prepared Statements, this was our choice.</p>
<p>Transaction Pooling: Assigns a server connection only for the duration of a single BEGIN … COMMIT/ROLLBACK transaction. Once the transaction completes, the connection goes back to the pool for another client to use.</p>
<p>Statement Pooling: Assigns a server connection for a single SQL statement, returning it immediately after execution. It allows maximum reuse, but breaks multi-statement transactions (BEGIN … COMMIT) and session features.</p>
<p>One last word on what are the recommended ways to install PgBouncer: first of all it should be on a separate server respect the PostgreSQL cluster, then in a Kubernetes environment, such as ours, it can be installed as a sidecar to Kubernetes pods (which is the recommended way for most cases) or as a separate deployment in its own pod. Turns out that we had installed PgBouncer in this last way instead of having it in the same pod of the application.</p>
<p>Now that we have a complete picture, let’s go back to our case. Since our PgBouncer was installed as a standalone pod and not in sidecar, this become my primary culprit, searching a little bit I found out that there is the possibility in PgBouncer that if a database is created or its timezone is altered via ALTER DATABASE … SET timezone, PgBouncer does not properly invalidate its internal startup-parameter cache.</p>
<p>In our case the timezone was changed through Patroni, not ALTER DATABASE, but PgBouncer still kept a stale cached TimeZone.</p>
<p>So when a connection is recycled:</p>
<ul>
<li>PostgreSQL natively sets the timezone to Africa/Lagos.</li>
<li>PgBouncer looks at its cached baseline state for that database/user profile from when it first booted up (which was reset to UTC when we restarted the Patroni nodes remember!).</li>
<li>PgBouncer then subtly injects a session-level override back to the client, effectively masking the database’s actual default settings.</li>
</ul>
<p>It was exactly our case, as the restart of Patroni Cluster nodes returned all the system to UTC, then we modified it again to WAT, but we never restarted the PGBouncer pod, so we still had some sessions in the pool with UTC timezone. That explained also the mix between correct and wrong timezones in the timestamps, it depended from the session with which the row was inserted, if it was one of the old ones we had UTC.</p>
<p>The fix at this point was obvious: clear the cache of PgBouncer. This can be done with a simple restart of that pod or a reload of the configuration. In our case we restarted PgBouncer and surely this action solved all our timezone problems as from that point we had only timestamps with correct timezone, confirming the above scenario.</p>
<p>So this was the curious case of timezone inconsistencies between PostgreSQL and PgBouncer, in the end was easily solved and not disruptive, it was due mainly to a couple of errors and assumptions that I did and that were surely avoidable, that’s why I wanted to bring attention to this subject: prevent others doing my errors and recognize faster the issue.</p>
<p>Summarizing all in a few key points of lessons learned:</p>
<ul>
<li>After changing timezone in Patroni, always restart or RECONNECT PgBouncer so the pool doesn’t keep stale session settings.</li>
<li>Remember to always change timezone in a Patroni cluster using patronictl command edit-config and not ALTER SYSTEM SET TIMEZONE.</li>
<li>In a Kubernetes environment install PgBouncer as a sidecar to Kubernetes pods instead of a standalone pod.</li>
</ul>
<p>Hope it will help some of you!</p>
<p><em>This post is part of the <a href="https://percona.community/blog/write-for-percona-community/">Percona Community Writers Program</a>.</em></p>
<p><a href="https://percona.community/blog/2026/08/20/timezone-inconsistencies-pgbouncer-patroni/">The curios case of timezone inconsistencies between PgBouncer and Patroni Cluster</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Security Advisory: Privileged ClickHouse access through the Grafana data source in PMM</title>
        <link>https://www.percona.com/blog/security-advisory-cve-affecting-pmm/</link>
        <pubDate>Wed, 19 Aug 2026 13:07:00 +0000</pubDate>
        <dc:creator>Ben Judge</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/security-advisory-privileged-clickhouse-access-through-the-grafana-data-source-in-pmm/</guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Date of release: 19 August 2026 Severity: High Affected product: PMM Impacted versions: 3.9.0 and below Summary Percona has recently been made aware of a security vulnerability affecting PMM. We take the security of our products and the protection of our customers’ data with the utmost seriousness. This advisory describes the vulnerability, the immediate steps … Continued<br />
The post Security Advisory: Privileged ClickHouse access through the Grafana data source in PMM appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/security-advisory-cve-affecting-pmm/">Security Advisory: Privileged ClickHouse access through the Grafana data source in PMM</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><b>Date of release:</b><span> 19 August 2026<br />
</span><b>Severity:</b><span> High<br />
</span><b>Affected product:</b><span> PMM<br />
</span><b>Impacted versions:</b><span> 3.9.0 and below</span></p>
<h2><b>Summary</b></h2>
<p><span>Percona has recently been made aware of a security vulnerability affecting PMM. We take the security of our products and the protection of our customers’ data with the utmost seriousness.<br />
</span><span>This advisory describes the vulnerability, the immediate steps you can take to protect your deployment, and the permanent fix.</span></p>
<h2><b>Vulnerability details</b></h2>
<ul>
<li aria-level="1"><b>CVE identifier number:</b> <span>Pending, this advisory will be updated once assigned </span></li>
<li aria-level="1"><b>CVSS score:</b><span> 8.7 (High)</span></li>
</ul>
<p><span>PMM’s Grafana instance allows signed-in users, including those with the Viewer role, to call raw data source APIs. If anonymous access has been explicitly enabled (it is off by default), unauthenticated users can also reach these APIs. </span></p>
<p><span>Through the Grafana ClickHouse data source, such a user can submit arbitrary SQL. The data source connects to ClickHouse as the default identity, which holds global DDL, DML, and SOURCES privileges and can make outbound HTTP requests.</span></p>
<p><span>Chained together, this allows an attacker to reach AWS IMDSv1, obtain a live EC2 role session, read a Terraform remote-state object from S3, and authenticate as the PMM/Grafana administrator.</span></p>
<h2><b>Impact</b></h2>
<p><span>An unauthenticated attacker can cross the public Grafana boundary into internal databases, AWS instance metadata, S3 remote state, and the PMM administrator account. This yields renewable cloud credentials and a remote-state file that can contain many independently reusable secrets and private infrastructure details. </span></p>
<p><span>The severity of impact depends on deployment configuration. The full IMDS-to-credential chain requires anonymous access to be enabled (off by default) and the PMM Server to be running on AWS EC2 with IMDSv1. </span></p>
<p><span>All deployments are affected by the arbitrary SQL execution via the ClickHouse data source.</span></p>
<h2><b>Remediation</b></h2>
<p><span>This vulnerability is fixed in PMM 3.9.1, scheduled for release on August 19, 2026. Upgrade as soon as it is available.</span></p>
<h2><b>Mitigation</b></h2>
<p><span>If you cannot upgrade immediately, run the script below to close the exploitation path. It creates a least-privilege ClickHouse user for Grafana and points the ClickHouse data source at it, replacing the default superuser and making the exploitation of the vulnerability impossible. </span></p>
<p> </p>
<p><span>Before running the script, back up your PMM Server and save the </span><span><code></code></span><span>pmm-data</span><span></span><span> volume. </span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">#!/bin/bash
# Create a least-privilege ClickHouse identity for Grafana and point the
# ClickHouse datasource at it, replacing the default superuser.


set -euo pipefail

CONTAINER=${CONTAINER:-pmm-server}
PMM_HOST=${PMM_HOST:-localhost}
PMM_PORT=${PMM_PORT:-443}
GRAFANA_URL="https://${PMM_HOST}:${PMM_PORT}"
ADMIN_PASS=${ADMIN_PASS:-$(cat /root/pmm-admin-password)}
# Drop-ins are loaded from users.d (users_config defaults to users.xml ->
# users.d), NOT default-users.d.
BOOTSTRAP_XML=/etc/clickhouse-server/users.d/zz-provision-bootstrap.xml

CH_PASS=$(openssl rand -hex 24)
CH_HASH=$(printf '%s' "$CH_PASS" | sha256sum | awk '{print $1}')
BOOT_PASS=$(openssl rand -hex 24)
BOOT_HASH=$(printf '%s' "$BOOT_PASS" | sha256sum | awk '{print $1}')

ch_wait () {
  local user=$1 pass=$2 i
  for i in $(seq 1 45); do
    if docker exec -i "$CONTAINER" clickhouse-client --host 127.0.0.1 
         --user "$user" --password "$pass" -q "SELECT 1" >/dev/null 2>&1; then
      return 0
    fi
    sleep 2
  done
  echo "ERROR: clickhouse did not accept $user within 90s" >&2
  return 1
}

# PMM's ClickHouse default superuser has access_management disabled, so it
# cannot run CREATE USER / GRANT even with its known password. Install a
# short-lived admin to run the DDL instead. Drop-ins must live in users.d;
# and a plaintext <password> is rejected outright at startup because PMM
# ships allow_plaintext_password=0.
docker exec -u root "$CONTAINER" mkdir -p /etc/clickhouse-server/users.d
docker exec -u root -i "$CONTAINER" bash -c "cat > $BOOTSTRAP_XML" <<XMLEOF
<clickhouse>
    <users>
        <provision_admin>
            <password_sha256_hex>$BOOT_HASH</password_sha256_hex>
            <networks><ip>127.0.0.1</ip><ip>::1</ip></networks>
            <profile>default</profile>
            <quota>default</quota>
            <access_management>1</access_management>
        </provision_admin>
    </users>
</clickhouse>
XMLEOF
docker exec -u root "$CONTAINER" chown pmm:root "$BOOTSTRAP_XML"
docker exec -u root "$CONTAINER" supervisorctl restart clickhouse
ch_wait provision_admin "$BOOT_PASS"

# grafana_ro holds SELECT and nothing else. Without the SOURCES family it
# cannot call url(), s3(), mongodb(), remote() or file(); readonly=1
# additionally prevents it overriding server settings such as
# max_http_get_redirects. ALTER runs unconditionally so that re-running
# this script rotates the password rather than failing.
docker exec -i "$CONTAINER" clickhouse-client --host 127.0.0.1 
  --user provision_admin --password "$BOOT_PASS" --multiquery <<SQLEOF
CREATE SETTINGS PROFILE IF NOT EXISTS grafana_ro_profile SETTINGS
    readonly = 1, allow_ddl = 0, max_execution_time = 60;

CREATE USER IF NOT EXISTS grafana_ro IDENTIFIED WITH sha256_hash BY '$CH_HASH';
ALTER USER grafana_ro IDENTIFIED WITH sha256_hash BY '$CH_HASH'
    SETTINGS PROFILE grafana_ro_profile;

REVOKE ALL ON *.* FROM grafana_ro;
GRANT SELECT ON pmm.*            TO grafana_ro;
GRANT SELECT ON default.*        TO grafana_ro;
GRANT SELECT ON system.tables    TO grafana_ro;
GRANT SELECT ON system.columns   TO grafana_ro;
GRANT SELECT ON system.databases TO grafana_ro;
GRANT SELECT ON system.one       TO grafana_ro;
GRANT SELECT ON system.numbers   TO grafana_ro;
SQLEOF

docker exec -u root "$CONTAINER" rm -f "$BOOTSTRAP_XML"
docker exec -u root "$CONTAINER" supervisorctl restart clickhouse
ch_wait grafana_ro "$CH_PASS"

# Repoint the datasource. The UID is assigned by PMM, so look it up.
DS_UID=$(curl -sk -u "admin:$ADMIN_PASS" "$GRAFANA_URL/graph/api/datasources" 
  | jq -r '.[] | select(.type == "grafana-clickhouse-datasource") | .uid' | head -1)
if [ -z "$DS_UID" ]; then
  echo "ERROR: no grafana-clickhouse-datasource found" >&2
  exit 1
fi

# Transient files hold the CH password; keep them in a private dir and
# always remove them, even if a curl below fails.
umask 077
TMPD=$(mktemp -d)
trap 'rm -rf "$TMPD"' EXIT
curl -sk -u "admin:$ADMIN_PASS" 
  "$GRAFANA_URL/graph/api/datasources/uid/$DS_UID" > "$TMPD/ds-ch.json"
jq --arg p "$CH_PASS" 
  '.jsonData.username = "grafana_ro" | .secureJsonData.password = $p' 
  "$TMPD/ds-ch.json" > "$TMPD/ds-ch.new.json"
curl -sk -u "admin:$ADMIN_PASS" -X PUT -H 'Content-Type: application/json' 
  -d @"$TMPD/ds-ch.new.json" 
  "$GRAFANA_URL/graph/api/datasources/uid/$DS_UID" >/dev/null

# Fail the build rather than come up believing this worked.
if docker exec -i "$CONTAINER" clickhouse-client --host 127.0.0.1 
     --user grafana_ro --password "$CH_PASS" 
     -q "SELECT count() FROM url('http://169.254.169.254/latest/user-data','LineAsString','line String')" 
     >/dev/null 2>&1; then
  echo "FATAL: grafana_ro can still reach url()" >&2
  exit 1
fi
if docker exec -i "$CONTAINER" clickhouse-client --host 127.0.0.1 
     --user grafana_ro --password "$CH_PASS" 
     -q "CREATE TABLE default.zz_provision_check (x String) ENGINE=Memory" 
     >/dev/null 2>&1; then
  echo "FATAL: grafana_ro can still run DDL" >&2
  exit 1
fi

unset CH_PASS BOOT_PASS ADMIN_PASS
echo "ClickHouse datasource now authenticates as grafana_ro."</pre>
<p><span>Run the script as follows: </span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">CONTAINER=pmm-server PMM_HOST=localhost PMM_PORT=443 ADMIN_PASS=XXXXX bash ./pmm-ch-user.sh</pre>
</p>
<h2><b>Support &#038; additional resources</b></h2>
<p><span>If you require further clarification or assistance, we are available 24/7:</span></p>
<ul>
<li aria-level="1"><a href="https://my.percona.com/"><span>Technical support portal for customers</span></a></li>
<li aria-level="1"><a href="https://forums.percona.com/c/percona-monitoring-and-management-pmm"><span>Technical support for community</span></a></li>
</ul>
<h2><b>Contact</b></h2>
<p><span>For questions about this advisory, upgrade planning, or to discuss options for unsupported major versions, open a case via the </span><a href="https://customers.percona.com/"><span>Percona Customer Portal</span></a><span> or contact your Percona Customer Success Manager.</span><span> </span></p>
<p><span>For other security-related questions, write to </span><span>security@percona.com</span><span>.</span></p>
<p>The post <a href="https://www.percona.com/blog/security-advisory-cve-affecting-pmm/">Security Advisory: Privileged ClickHouse access through the Grafana data source in PMM</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/security-advisory-cve-affecting-pmm/">Security Advisory: Privileged ClickHouse access through the Grafana data source in PMM</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Stop guessing at gcache: inspect Galera/PXC write sets with gcache-inspector</title>
        <link>https://www.percona.com/blog/stop-guessing-at-gcache-inspect-galera-pxc-write-sets-with-gcache-inspector/</link>
        <pubDate>Wed, 19 Aug 2026 08:23:50 +0000</pubDate>
        <dc:creator>Przemysław Malkowski</dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>The common practice is to size the Galera Cache based on write volume measured during peak load, but often it is more of a guesswork. The writeset cache capacity planning is crucial to shorten the maintenance time and avoid long state transfers while the cluster runs with reduced compute power. Now, if you could understand … Continued<br />
The post Stop guessing at gcache: inspect Galera/PXC write sets with gcache-inspector appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/stop-guessing-at-gcache-inspect-galera-pxc-write-sets-with-gcache-inspector/">Stop guessing at gcache: inspect Galera/PXC write sets with gcache-inspector</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><span>The common practice is to size the Galera Cache based on write volume measured during peak load, but often it is more of a guesswork. The writeset cache capacity planning is crucial to shorten the maintenance time and avoid long state transfers while the cluster runs with reduced compute power. Now, if you could understand what’s exactly inside the cache, wouldn’t the planning be more aware as compared to only calculating the best size based on</span><span> <code>wsrep_received/replicated_bytes</code></span><span> variables?</span></p>
<p><span>Similarly, while dealing with various incidents occurring in Percona XtraDB Cluster or MariaDB Galera Cluster environments, how many times did you stumble upon the fact that the GCache file (galera.cache) is a black box and you can’t inspect it in a meaningful way? </span></p>
<p><span>In some scenarios, having the opportunity to see what exactly ended up in the cache file(s) could help us understand the write workload impact or what happened with transactions.</span></p>
<p><span>Why would one need to dig into galera.cache files, though? Let’s think about possible scenarios:</span></p>
<ul>
<li aria-level="1"><span>Debugging replication issues or conflicts (BF aborts, etc).</span></li>
<li aria-level="1"><span>Understanding recent workload patterns per table (especially when binary log is not enabled or lost).</span></li>
<li aria-level="1"><span>Understanding the IST capacity and why node joining falls back to SST.</span></li>
<li aria-level="1"><span>Forensic analysis after incidents.</span></li>
<li aria-level="1"><span>Why on-demand gcache.page.X files are created and what transactions are inside.</span></li>
<li aria-level="1"><span>What committed writesets are still in “assigned / live” vs “released / reclaimable” state.</span></li>
<li aria-level="1"><span>Observe / confirm the impact of </span><a href="https://dev.mysql.com/doc/refman/8.4/en/replication-options-binary-log.html#sysvar_binlog_row_image"><span><code>binlog_row_image</code></span></a><span> setting on the writesets size.</span></li>
</ul>
<p><span>To address those, I decided to experiment with a tool that would decode the Galera cache files. As a result of these experiments, I recently published </span><a href="https://github.com/PrzemekMalkowski/gcache-inspector"><span>gcache-inspector</span></a><span> – an open source project available on GitHub. </span></p>
<p><span>Before I introduce how the tool works, let’s quickly review the write set caching process.</span></p>
<h2><span>What is Galera Cache? </span></h2>
<p><span>In short, it is a RingBuffer file storing Write-set Cache, which is also memory-mapped. Every replicated transaction is appended to it. Due to the fixed size, the oldest entries are overwritten to allow new writes. In special circumstances when the cache file is too small to fit a big transaction or old entries are not ready to be removed, additional on-demand cache files are created.</span></p>
<p><span>From the operational perspective, the most important role of the Galera cache is to provide quick incremental synchronization (IST) of (re-)joining cluster nodes. Having the cache of enough size, so that it can store enough time’s worth of writes, determines the joining process – whether a restarted node will be able to join quickly via IST or whether it will have to pull a full backup (SST) from the donor.</span></p>
<p><span>The diagram below shows the typical transaction lifecycle, role, and structure of the Galera cache.</span></p>
<p><img fetchpriority="high" decoding="async" class=" wp-image-51961 aligncenter" src="https://www.percona.com/wp-content/uploads/2026/08/fig1.png" alt="" width="656" height="610" srcset="https://www.percona.com/wp-content/uploads/2026/08/fig1.png 1100w, https://www.percona.com/wp-content/uploads/2026/08/fig1-300x279.png 300w, https://www.percona.com/wp-content/uploads/2026/08/fig1-1024x951.png 1024w, https://www.percona.com/wp-content/uploads/2026/08/fig1-768x714.png 768w" sizes="(max-width: 656px) 100vw, 656px"></p>
<p><span>The IST determination is a bit more complex than you’d expect. The joiner estimates the donor’s capabilities with some safety margin.</span></p>
<p><span>It is possible to verify the current potential donor Galera cache coverage from its </span><a href="https://docs.percona.com/percona-xtradb-cluster/8.4/wsrep-status-index.html#wsrep_local_cached_downto"><span><code>wsrep_local_cached_downto</code></span></a><span> status variable. </span><span>Moreover, the cache rotation can be put on hold to extend the donor’s time window coverage via the </span><a href="https://docs.percona.com/percona-xtradb-cluster/8.4/wsrep-provider-index.html#gcachefreeze_purge_at_seqno"><span><code>gcache.freeze_purge_at_seqno</code></span></a><span> provider option.</span></p>
<p><img loading="lazy" decoding="async" class="wp-image-51960 aligncenter" src="https://www.percona.com/wp-content/uploads/2026/08/fig2.png" alt="" width="667" height="461" srcset="https://www.percona.com/wp-content/uploads/2026/08/fig2.png 1096w, https://www.percona.com/wp-content/uploads/2026/08/fig2-300x207.png 300w, https://www.percona.com/wp-content/uploads/2026/08/fig2-1024x708.png 1024w, https://www.percona.com/wp-content/uploads/2026/08/fig2-768x531.png 768w" sizes="auto, (max-width: 667px) 100vw, 667px"></p>
<p><span>If the above diagram is difficult to digest, the following blog post should shed light on the process: </span><a href="https://www.percona.com/blog/understanding-ist-donor-selected/"><span>https://www.percona.com/blog/understanding-ist-donor-selected/</span></a></p>
<p> </p>
<p><span>Given all this complexity, you may sometimes just want to check and verify for yourself what on earth is in the Galera cache files, instead of guessing. </span></p>
<p><span>And historically, the cache files were just a mystery – no tools available to actually properly inspect them. This is why I decided to experiment with a utility that would fill that gap.</span></p>
<h2><span>The gcache-inspector</span></h2>
<p><span>The tool I ended up with can fully decode the Galera cache files. It makes quick general write patterns statistics, write set nature information, and can decode the actual Row-based events (binary log style).</span></p>
<p><span>Gcache-inspector works offline (the examined PXC node can be running or not). You may point it to a galera.cache or gcache.page.X file. Below is an example of the default report without additional options used.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">$ gcache-inspector --file node2/data/galera.cache 
=== gcache-inspector 0.2.5 — GCache Summary ===
File:    /data/sandboxes/pxc_msb_pxc8_4_10/node2/data/galera.cache
Size:    128.00 MB
Version: 2   UUID: 62f2ad43-8de5-11f1-9fb8-8bae2a687fc9
Seqno (retained):  2 – 4533  (4532 in cache)
Synced:  yes   Offset: 1704
Encrypted: no
Flavor:  PXC / MySQL 8.x

Write-sets found:  4498  4498 retained, 0 older/overwritten
Decodable seqnos:  3 – 4533  (4498 write-sets; pick one with --seqno)
Time range:        2026-08-01 22:12:58 – 2026-08-05 23:04:02 CEST  (span 96h51m4s, newest 12d ago)
DDL statements:    216
GTID events seen:  0
Rows changed:      513758  (95.20 MB)  [all write-sets]

Top 10 tables by row activity:
  table                                      insert   update   delete    ddl       size
  ───────────────────────────────────────────────────────────────────
  sbtest.sbtest1                               5039     5574       15      2        2.9M
  sbtest.sbtest32                              5053       37       18      2        0.9M
  sbtest.sbtest8                               5050       30       23      2        0.9M
  sbtest.sbtest60                              5049       31       21      2        0.9M
  sbtest.sbtest100                             5045       36       18      2        0.9M
  sbtest.sbtest10                              5054       26       19      2        0.9M
  sbtest.sbtest85                              5055       25       17      2        0.9M
  sbtest.sbtest35                              5042       40       14      2        0.9M
  sbtest.sbtest87                              5045       37       14      2        0.9M
  sbtest.sbtest33                              5048       30       18      2        0.9M</pre>
<p><span>By using the </span><b><code>--detail</code></b><span> parameter, the tool will show per-individual sequence number details, i.e.:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">$ gcache-inspector --file node2/data/galera.cache --detail --no-summary --seqno 100-105

=== Write-sets ===
  seqno 100           453632 B 2026-08-01 22:14:39  RELEASED  sbtest.sbtest16[i:2281 u:0 d:0]
  seqno 101              256 B 2026-08-01 22:14:39  RELEASED  1 DDL: CREATE INDEX k_16 ON sbtest16(k); sbtest.sbtest16[i:0 u:0 d:0]
  seqno 102              432 B 2026-08-01 22:14:39  RELEASED  1 DDL: CREATE TABLE sbtest17(; sbtest.sbtest17[i:0 u:0 d:0]
  seqno 103           540664 B 2026-08-01 22:14:39  RELEASED  sbtest.sbtest17[i:2719 u:0 d:0]
  seqno 104           453632 B 2026-08-01 22:14:39  RELEASED  sbtest.sbtest17[i:2281 u:0 d:0]
  seqno 105              256 B 2026-08-01 22:14:39  RELEASED  1 DDL: CREATE INDEX k_17 ON sbtest17(k); sbtest.sbtest17[i:0 u:0 d:0]</pre>
<p><span>The above example shows that a transaction committed with the sequence number 100 has inserted </span><span>2281</span><span> rows into the table sbtest16 and did not update or delete any rows.</span></p>
<p><span>To see exactly what a given transaction was about, the </span><b><code>--decode-rows</code></b><span> option prints the whole event details. For example, it’s possible to see what rows were changed under seqno 4252:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">$ gcache-inspector --file node2/data/galera.cache --decode-rows --no-summary --seqno 4252

-- seqno 4252 at 2026-08-01 22:15:32 (816 bytes) RELEASED
### DELETE FROM `sbtest`.`sbtest41`
### WHERE
###   @1= 1843
###   @2= 3562
###   @3= '55824051154-00248428540-43829027453-18090470997-77687189613-13487855838-34568671126-01577127301-81564593132-49010886470'
###   @4= '09475435259-72703365718-14065084029-80972334150-38881617733'
### INSERT INTO `sbtest`.`sbtest41`
### SET
###   @1= 1843
###   @2= 4879
###   @3= '37041074202-54426174421-76052854404-43175485519-62755971707-75981734496-81616509419-51624022546-52075561216-00090498892'
###   @4= '46023326729-33104312594-23620888475-28615232417-62781559343'</pre>
</p>
<h3><span>A DDL investigation example</span></h3>
<p><span>Handling DDLs in Galera replication may be quite confusing. Even if, for instance, an ALTER query fails on the writer, it still gets replicated, causing surprising errors on the peer members, similar to this:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">2026-08-05T21:04:02.137267Z 11 [ERROR] [MY-010584] [Repl] Replica SQL: Error 'Table 'sbtest.foo' doesn't exist' on query. Default database: 'sbtest'. Query: 'alter table foo engine=innodb', Error_code: MY-001146
2026-08-05T21:04:02.137334Z 11 [Warning] [MY-000000] [WSREP] Event 1 Query apply failed: 1, seqno 4533
2026-08-05T21:04:02.138503Z 0 [Note] [MY-000000] [Galera] Member 0(przemek-d1) initiates vote on 62f2ad43-8de5-11f1-9fb8-8bae2a687fc9:4533,aebcd4f61a8a51aa:  Table 'sbtest.foo' doesn't exist, Error_code: 1146;</pre>
<p><span>Although such an event normally produces a GRA file to let us investigate, like in this case: </span><span>GRA_11_</span><b>4533</b><span>_v2.log</span><span>, now we can also look into the cache file for the same (here the SKIPPED flag confirms it was not applied):</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">$ gcache-inspector --file node2/data/galera.cache --detail --no-summary --seqno 4533

=== Write-sets ===
  seqno 4533             256 B 2026-08-05 23:04:02  RELEASED|SKIPPED  1 DDL: alter table foo engine=innodb; sbtest.foo[i:0 u:0 d:0]</pre>
</p>
<h2><span>Encrypted Galera Cache</span></h2>
<p><span>For strict security compliance cases, Percona XtraDB Cluster allows </span><a href="https://docs.percona.com/percona-xtradb-cluster/8.4/gcache-write-set-cache-encryption.html"><span>encrypting</span></a><span> the Gcache files. The tool allows inspection of encrypted files as well, if the encryption key or vault credentials are provided. But there is one caveat here. A regular, non-encrypted cache file will contain all replicated transactions immediately. Whilst the encrypted one will not show anything new until the </span><a href="https://docs.percona.com/percona-xtradb-cluster/8.4/gcache-write-set-cache-encryption.html#gcacheencryption_cache_size"><span>encryption in-memory cache</span></a><span> is filled or synced during shutdown. Therefore, new transactions are expected to appear in the encrypted cache file with a delay.</span></p>
<p><span>Note: the tool does not support encryption available in MariaDB Galera Cluster Enterprise Edition (no source code access).</span></p>
<p><span>An example output against an encrypted file:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">$ gcache-inspector --file node1/data/galera.cache --keyring-file /opt/mysql/pxc8.4.10/keyring/component_keyring_file
=== gcache-inspector 0.2.5 — GCache Summary ===
File:   node1/data/galera.cache
Size:    128.00 MB
Version: 2   UUID: 62f2ad43-8de5-11f1-9fb8-8bae2a687fc9
Seqno (retained):  4395 – 4533  (139 in cache)
Synced:  yes   Offset: 1776
Encrypted: yes — decrypted   (enc version 1)
Master key: GaleraKey-d6945297-8f7a-11f1-9533-7a5bf82f508c@62eff734-8de5-11f1-b956-7f3a785ad5e2-1
Key source:/opt/mysql/pxc8.4.10/keyring/component_keyring_file (GaleraKey-d6945297-8f7a-11f1-9533-7a5bf82f508c@62eff734-8de5-11f1-b956-7f3a785ad5e2-1)
Cipher:    AES-256-ctr-file, clear below 0x400, counter from 0x0 [CTR unwrap (zero IV), keyring bytes]
Freshness: on a live node the encrypted file lags the in-memory cache (write-back page cache; flushed on eviction/shutdown)
Flavor:  PXC / MySQL 8.x

Write-sets found:  127  127 retained, 0 older/overwritten
Decodable seqnos:  4395 – 4533  (127 write-sets; pick one with --seqno)
Time range:        2026-08-01 22:15:32 – 2026-08-05 23:04:02 CEST  (span 96h48m30s, newest 12d ago)
DDL statements:    1
GTID events seen:  0
Rows changed:      5782  (2.08 MB)  [all write-sets]

Top 10 tables by row activity:
  table                                      insert   update   delete    ddl       size
  ───────────────────────────────────────────────────────────────────
  sbtest.sbtest1                                  2     5545        1      0        2.0M
  sbtest.sbtest58                                 5        1        2      0        0.0M
  sbtest.sbtest64                                 3        2        2      0        0.0M
  sbtest.sbtest52                                 4        1        2      0        0.0M
  sbtest.sbtest14                                 2        3        1      0        0.0M
  sbtest.sbtest26                                 2        2        2      0        0.0M
  sbtest.sbtest6                                  2        2        2      0        0.0M
  sbtest.sbtest98                                 3        1        2      0        0.0M
  sbtest.sbtest97                                 4        0        2      0        0.0M
  sbtest.sbtest68                                 1        4        0      0        0.0M</pre>
</p>
<h2><span>Summary</span></h2>
<p><span>Although in most cases, problems with PXC/Galera replication can be successfully investigated based on error logs, binary logs, and GRA files, there may be more complex cases where you may want to look inside the Galera cache files. Or simply for experimenting or to allow better understanding of how it works. I hope </span><span>gcache-inspector</span><span> will help you do this. The tool is available as GPLv3, with Go source code and binary packages ready to play with on GitHub: </span><a href="https://github.com/PrzemekMalkowski/gcache-inspector"><span>https://github.com/PrzemekMalkowski/gcache-inspector</span></a><span>. Demo recording: </span><a href="https://asciinema.org/a/1263342"><span>https://asciinema.org/a/1263342</span></a></p>
<p><span>If, despite acquiring details, you face undersized gcache or other reasons causing nodes to keep falling back to SST, Percona’s engineers can help you tackle those problems. Talk to us about a cluster health review </span><a href="https://www.percona.com/contact-us/"><span>https://www.percona.com/contact-us/</span></a></p>
<p><span>Additional references about Galera Cache can be found in the following blog posts by other Percona engineers:</span><br />
<a href="https://www.percona.com/blog/all-you-need-to-know-about-gcache-galera-cache/"><span>https://www.percona.com/blog/all-you-need-to-know-about-gcache-galera-cache/</span></a><br />
<a href="https://www.percona.com/blog/no-sst-node-rejoins/"><span>https://www.percona.com/blog/no-sst-node-rejoins/</span></a><br />
<a href="https://www.percona.com/blog/understanding-ist-donor-selected/"><span>https://www.percona.com/blog/understanding-ist-donor-selected/</span></a><br />
<a href="https://www.percona.com/blog/gcache-and-record-set-cache-encryption-in-percona-xtradb-cluster-part-one/"><span>https://www.percona.com/blog/gcache-and-record-set-cache-encryption-in-percona-xtradb-cluster-part-one/</span></a></p>
<p> </p>
<p><i><span>The article was written by a human</span></i></p>
<p>The post <a href="https://www.percona.com/blog/stop-guessing-at-gcache-inspect-galera-pxc-write-sets-with-gcache-inspector/">Stop guessing at gcache: inspect Galera/PXC write sets with gcache-inspector</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/stop-guessing-at-gcache-inspect-galera-pxc-write-sets-with-gcache-inspector/">Stop guessing at gcache: inspect Galera/PXC write sets with gcache-inspector</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>What a careful MySQL to MariaDB migration still misses</title>
        <link>https://mariadb.com/resources/blog/what-a-careful-mysql-to-mariadb-migration-still-misses/</link>
        <pubDate>Tue, 18 Aug 2026 16:58:35 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>The MariaDB Migrator announcement post introduced the MySQL-to-MariaDB migration tool and walked through its four modes. This post is about […]</p>
<p><a href="https://mariadb.com/resources/blog/what-a-careful-mysql-to-mariadb-migration-still-misses/">What a careful MySQL to MariaDB migration still misses</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>The MariaDB Migrator announcement post introduced the MySQL-to-MariaDB migration tool and walked through its four modes. This post is about what those modes are up against. The three stories below are hypothetical, but the failures are not. I found the same patterns recurring across migration write-ups and forum threads, then reproduced each one on a MySQL 8.0 server migrating to MariaDB 11.4.</p>
<p><a href="https://mariadb.com/resources/blog/what-a-careful-mysql-to-mariadb-migration-still-misses/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/what-a-careful-mysql-to-mariadb-migration-still-misses/">What a careful MySQL to MariaDB migration still misses</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB 12.3 LTS Webinar: Performance, Scalability, High Availability &#038; the AI-Native Database</title>
        <link>https://minervadb.com/mariadb-12-3-lts-webinar/</link>
        <pubDate>Tue, 18 Aug 2026 10:45:31 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-12-3-lts-webinar-performance-scalability-high-availability-the-ai-native-database/</guid>
        <source url="https://minervadb.com/">The Data Transformation Company</source>
        <description><![CDATA[<p>Our MariaDB 12.3 LTS webinar is now available as a free PDF download. Over 60 minutes, Shiv Iyer — Founder &#038; CEO of MinervaDB and a database engineer who has spent three decades inside MySQL, [...]</p>
<p><a href="https://minervadb.com/mariadb-12-3-lts-webinar/">MariaDB 12.3 LTS Webinar: Performance, Scalability, High Availability &#038; the AI-Native Database</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Our <strong>MariaDB 12.3 LTS webinar</strong> is now available as a free PDF download. Over 60 minutes, Shiv Iyer — Founder &#038; CEO of MinervaDB and a database engineer who has spent three decades inside MySQL, MariaDB, and PostgreSQL internals — walks through what the 12.3 LTS generation actually changes in production: the InnoDB-based binary log, parallel replication into Galera, MaxScale failover mechanics, and the mHNSW vector index that turns MariaDB into a credible RAG backend.</p>
<p>This is not a changelog read-aloud. The deck is built the way we run client engagements: every claim tied to a measurement source, every architecture drawn with its RPO/RTO consequences, and a clear statement of where each feature does <em>not</em> apply. Fill in the short form at the bottom of this page and the full deck lands in your inbox.</p>
<p>Here is what the MariaDB 12.3 LTS webinar covers, and why we think the timing matters.</p>
<h2>Why the 12.3 LTS generation matters right now</h2>
<p>MariaDB 10.6 LTS reached end of life in July 2026. If you are still running it, you are now accumulating unpatched CVEs on your primary OLTP tier — that alone justifies an hour with the MariaDB 12.3 LTS webinar material. The practical question for most estates is no longer <em>whether</em> to move, but whether to land on 11.8 LTS or 12.3 LTS.</p>
<p>The support windows are not symmetrical, and this catches people out. MariaDB 12.3 LTS, released Q2 2026, is maintained through 2029 on a three-year window. 11.8 LTS runs to mid-2030 — a longer runway than the newer release. The webinar opens with this decision: which workloads justify the 12.3 feature set, and which are better served by parking on 11.8 until the next LTS cycle. The <a href="https://mariadb.org/" target="_blank" rel="noopener">MariaDB Foundation</a> publishes the current release calendar; the deck maps it onto upgrade sequencing for mixed estates.</p>
<p>MariaDB&#8217;s release model has also changed shape: rolling GA releases punctuated by LTS milestones (the .3 releases). If your change-management process still assumes the old cadence, part one of the webinar is the correction.</p>
<h2>What the MariaDB 12.3 LTS webinar covers</h2>
<p>We built the MariaDB 12.3 LTS webinar for architects and DBAs who own upgrade decisions, not for a general audience.</p>
<p>The MariaDB 12.3 LTS webinar runs five parts across 60 minutes:</p>
<ul>
<li><strong>The platform in 2026</strong> — release model evolution, LTS support windows, upgrade planning for estates coming off 10.6.</li>
<li><strong>Performance</strong> — the InnoDB-based binary log, optimizer refinements, and how to validate vendor benchmark claims against your own workload.</li>
<li><strong>Scalability</strong> — parallel replication modes, MaxScale routing, storage engine selection, and analytics offload.</li>
<li><strong>High availability</strong> — Galera Cluster in 12.3, the RPO/RTO decision matrix, MaxScale automated failover, backup and point-in-time recovery.</li>
<li><strong>AI and vector search</strong> — mHNSW indexes, hybrid search with Reciprocal Rank Fusion, and RAG architectures that keep embeddings transactionally consistent with source rows.</li>
</ul>
<h2>Performance: one engine, one recovery protocol, one flush discipline</h2>
<p>The headline change in the 12.3 generation is the InnoDB-based binary log. MariaDB has collapsed the old dual-log architecture — binlog and InnoDB redo log, each with its own fsync discipline and a two-phase commit stitching them together — into a single recovery protocol owned by InnoDB.</p>
<p>MariaDB reports roughly 4× write throughput on heavy workloads with this change, with crash safety inherited from InnoDB&#8217;s redo protocol. We treat that number the way we treat every vendor benchmark: as a hypothesis to test. The webinar dedicates a section to validation methodology — replay your own production statement digests on the candidate version, hold <code>sync_binlog</code> and <code>innodb_flush_log_at_trx_commit</code> constant across runs, measure P95/P99 latency rather than throughput alone, and run at production concurrency with the thread pool configured the way you actually deploy it.</p>
<p>The optimizer work in 12.3 is quieter but operationally useful: reverse-ordered scans, loose index scan with DESC keys, and improved virtual-column costing. Two new hints — <code>JOIN_FIXED_ORDER</code> and <code>MAX_EXECUTION_TIME</code> — give you per-statement plan control, and <code>ANALYZE FORMAT=JSON</code> now surfaces actual row counts against estimates, which is the fastest way to catch a misestimation before it becomes a 2 a.m. page. Our standing advice, repeated in the deck: capture your top-N statement digests and plans before the upgrade, replay them in staging, and diff the plans before cutover. If you want the monitoring side of that discipline, we published the <a href="https://minervadb.com/mariadb-performance-monitoring-metrics/">20 MariaDB metrics we track in every engagement</a>.</p>
<h2>Scalability: the levers most teams never pull</h2>
<p>MariaDB GTID is not MySQL GTID — the domain-server-sequence format is incompatible, which matters for anyone running mixed fleets or mid-migration topologies. From that foundation, the webinar works through the two parallel-apply modes: conservative, which parallelizes within group commit boundaries, and optimistic, which applies speculatively and rolls back on conflict.</p>
<p>The change we consider most significant for DR design: since 12.1, parallel replication works into Galera nodes. Async replicas feeding a DR cluster were previously throttled to single-threaded apply, and lag on that link was a standing RPO risk. That constraint is gone, and the deck shows the resulting cluster-to-cluster DR topology.</p>
<p>Beyond replication, part three covers MaxScale — read/write split, causal reads, transaction replay, and an honest note on its Business Source License terms — plus storage engine selection: InnoDB for OLTP, MyRocks where write amplification and compression dominate, Aria for temp tables, S3 for cold archives, ColumnStore for analytics, and Spider for sharding. If you run MariaDB on Kubernetes or cloud VMs, our guide to <a href="https://minervadb.com/tuning-mariadb-for-cloud/">tuning MariaDB for cloud and containerized environments</a> pairs well with this section.</p>
<h2>High availability: pick your RPO before you pick your topology</h2>
<p>Part four opens with the decision matrix we use in architecture reviews: asynchronous replication gives you seconds of RPO and seconds-to-minutes of RTO; semi-sync closes RPO to approximately zero at a latency cost; Galera gives you zero RPO within the cluster and seconds of RTO, in exchange for three-node quorum, primary keys on every InnoDB table, and a network you can trust.</p>
<figure><img loading="lazy" decoding="async" class="wp-image-92869" src="https://minervadb.com/wp-content/uploads/2026/08/mariadb-12-3-lts-galera-maxscale-dr-architecture-scaled.png" alt="MariaDB 12.3 LTS webinar high availability reference architecture diagram — three-node Galera cluster with MaxScale routing and async GTID replication to a DR site" width="1600" height="780" srcset="https://minervadb.com/wp-content/uploads/2026/08/mariadb-12-3-lts-galera-maxscale-dr-architecture-scaled.png 2560w, https://minervadb.com/wp-content/uploads/2026/08/mariadb-12-3-lts-galera-maxscale-dr-architecture-300x146.png 300w, https://minervadb.com/wp-content/uploads/2026/08/mariadb-12-3-lts-galera-maxscale-dr-architecture-1024x499.png 1024w, https://minervadb.com/wp-content/uploads/2026/08/mariadb-12-3-lts-galera-maxscale-dr-architecture-768x374.png 768w, https://minervadb.com/wp-content/uploads/2026/08/mariadb-12-3-lts-galera-maxscale-dr-architecture-1536x749.png 1536w, https://minervadb.com/wp-content/uploads/2026/08/mariadb-12-3-lts-galera-maxscale-dr-architecture-2048x998.png 2048w" sizes="auto, (max-width: 1600px) 100vw, 1600px"><figcaption>Reference HA topology from the MariaDB 12.3 LTS webinar: single-writer Galera cluster behind MaxScale, async GTID replication (parallel apply) to a DR-site Galera cluster.</figcaption></figure>
<p>One trade-off in 12.3 deserves more attention than it has received: the InnoDB-based binary log and Galera are mutually exclusive. wsrep cannot intercept the atomic commit path, so cluster nodes keep the legacy binlog — meaning the 4× write-path improvement and Galera&#8217;s synchronous replication cannot be combined on the same node. The webinar treats this as a first-class design input, not a footnote. We covered the surrounding architecture decisions in <a href="https://minervadb.com/mariadb-high-availability/">MariaDB high availability in 12.3 LTS</a> and in our piece on <a href="https://minervadb.com/mariadb-12-3-high-availability-internet-scale/">building fault-tolerant MariaDB infrastructure at internet scale</a>.</p>
<p>The section closes on operations: MaxScale automated failover via <code>mariadbmon</code>, switchover for planned maintenance, hot physical backups with <code>mariabackup</code> (full plus incremental, with the <code>--prepare</code> step), and point-in-time recovery by replaying the binlog to a target GTID. Two cautions from the deck worth repeating here. First: verify that your <code>mariabackup</code> version and any CDC tooling that reads binlog files directly are certified for the new binlog format before you enable it. Second: an untested backup is a hypothesis, not a recovery plan — measure your verified restore time, and rehearse failover quarterly.</p>
<h2>The AI-native database: mHNSW, hybrid search, and honest boundaries</h2>
<p>MariaDB now ships a native <code>VECTOR</code> column type with an mHNSW index — a modified HNSW graph — and distance functions for both Euclidean and cosine metrics. The 12.3 generation pushes distance computation down into the storage layer and adds extrapolation-based graph pruning; the practical tuning lever is <code>M</code>, the graph connectivity parameter, which trades recall against memory and latency. A retrieval query stays plain SQL:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="">SELECT doc_id,
       VEC_DISTANCE_COSINE(embedding, @query_vec) AS distance
FROM   knowledge_chunks
ORDER  BY distance
LIMIT  10;</pre>
<p>The webinar&#8217;s RAG argument is transactional rather than fashionable: embeddings and their source rows commit in one transaction, which eliminates the synchronization drift you accept the moment you bolt a separate vector store onto your OLTP database. Hybrid search fuses keyword and vector results with Reciprocal Rank Fusion, and the deck walks the full architecture. For the index internals, see our earlier post on <a href="https://minervadb.com/understanding-vector-indexes-in-mariadb/">how vector indexes work in MariaDB</a> and the <a href="https://mariadb.com/kb/en/vector-overview/" target="_blank" rel="noopener">MariaDB Vector documentation</a>.</p>
<p>And the boundary, stated plainly because vendor decks rarely do: MariaDB Vector is credible up to tens of millions of vectors. At billions-scale, or where GPU-accelerated indexing dominates the workload, a dedicated vector platform is the right call. We say this as a vendor-neutral consultancy — right-size first.</p>
<h2>Two reference architectures you can lift directly</h2>
<p>The MariaDB 12.3 LTS webinar deck closes its infrastructure arc with two worked topologies. The performance-first design: a 12.3 primary on the InnoDB binlog, two replicas on parallel apply, a delayed replica as a fat-finger safety net, and scheduled backups — seconds of RPO, sub-minute RTO. The availability-first design: a three-node Galera cluster on the legacy binlog with single-writer routing through MaxScale, feeding an async DR cluster that uses the 12.1+ parallel-apply capability. Both diagrams carry version labels and the reasoning for each choice.</p>
<h2>Download the MariaDB 12.3 LTS webinar deck (free)</h2>
<figure><img loading="lazy" decoding="async" src="https://minervadb.com/wp-content/uploads/2026/08/MariaDB12.3-Performance-scale-ha-AI-MinervaDB-pdf.jpg" alt="MariaDB 12.3 LTS webinar PDF cover — performance, scalability, high availability and AI" width="854" height="480"><figcaption>The MariaDB 12.3 LTS webinar deck: Performance, Scalability, High Availability &#038; the AI-Native Database.</figcaption></figure>
<p>Fill in the form below to get the MariaDB 12.3 LTS webinar PDF — we&#8217;ll show the download link immediately and email you a copy. We&#8217;ll occasionally send you technical material like this; no spam, and never a sales sequence you didn&#8217;t ask for. The MariaDB 12.3 LTS webinar PDF is free, and the download link arrives instantly.</p>
<div class="wpforms-container wpforms-container-full">Please enable JavaScript in your browser to complete this form.</p>
<div class="wpforms-field-container">
<div class="wpforms-field wpforms-field-text" data-field-type="text" data-field-id="1"><label class="wpforms-field-label" for="wpforms-92864-field_1">First Name <span class="wpforms-required-label">*</span></label></div>
<div class="wpforms-field wpforms-field-text" data-field-type="text" data-field-id="2"><label class="wpforms-field-label" for="wpforms-92864-field_2">Last Name <span class="wpforms-required-label">*</span></label></div>
<div class="wpforms-field wpforms-field-text" data-field-type="text" data-field-id="3">
			<label class="wpforms-field-label" for="wpforms-92864-field_3">First Last Name</label></p></div>
<div class="wpforms-field wpforms-field-email" data-field-type="email" data-field-id="5"><label class="wpforms-field-label" for="wpforms-92864-field_5">Email <span class="wpforms-required-label">*</span></label></div>
<div class="wpforms-field wpforms-field-url" data-field-type="url" data-field-id="4"><label class="wpforms-field-label" for="wpforms-92864-field_4">URL</label></div>
</div>
<p><!-- .wpforms-field-container --></p>
<div class="wpforms-submit-container"><button type="submit" name="wpforms[submit]" class="wpforms-submit" data-alt-text="Sending..." data-submit-text="Download the Webinar PDF" aria-live="assertive" value="wpforms-submit">Download the Webinar PDF</button><img loading="lazy" decoding="async" src="https://minervadb.com/wp-content/plugins/wpforms/assets/images/submit-spin.svg" class="wpforms-submit-spinner" width="26" height="26" alt="Loading"></div>
</div>
<p>  <!-- .wpforms-container --></p>
<h2>Planning a MariaDB 12.3 upgrade? Talk to us</h2>
<p>MinervaDB runs MariaDB in production for enterprises worldwide — consulting, 24×7 support, and remote DBA across the full lifecycle. If the MariaDB 12.3 LTS webinar leaves you with questions — a 10.6 exit plan, a Galera design, a MariaDB Vector evaluation — and you would benefit from engineers who do this every week, <a href="https://minervadb.com/contact/">contact us</a>. We&#8217;ll tell you honestly if 11.8 is the better landing zone for your workload — and, as always, test everything in staging before it touches production, and keep your DR posture rehearsed.</p>
<p><a href="https://minervadb.com/mariadb-12-3-lts-webinar/">MariaDB 12.3 LTS Webinar: Performance, Scalability, High Availability &#038; the AI-Native Database</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Seravo becomes a Silver Sponsor of MariaDB Foundation</title>
        <link>https://mariadb.org/seravo-becomes-a-silver-sponsor-of-mariadb-foundation/</link>
        <pubDate>Tue, 18 Aug 2026 13:35:41 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB Foundation is delighted to welcome Seravo as a Silver Sponsor, turning a long-standing relationship in the open-source ecosystem into formal support for the future of MariaDB. …<br />
Continue reading "Seravo becomes a Silver Sponsor of MariaDB Foundation"<br />
Seravo becomes a Silver Sponsor of MariaDB Foundation appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/seravo-becomes-a-silver-sponsor-of-mariadb-foundation/">Seravo becomes a Silver Sponsor of MariaDB Foundation</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Foundation is delighted to welcome <a href="https://seravo.com/en/">Seravo</a> as a Silver Sponsor, turning a long-standing relationship in the open-source ecosystem into formal support for the future of MariaDB. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/seravo-becomes-a-silver-sponsor-of-mariadb-foundation/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;Seravo becomes a Silver Sponsor of MariaDB Foundation&#8221;</span></a></p>
<p><a href="https://mariadb.org/seravo-becomes-a-silver-sponsor-of-mariadb-foundation/">Seravo becomes a Silver Sponsor of MariaDB Foundation</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
<p><a href="https://mariadb.org/seravo-becomes-a-silver-sponsor-of-mariadb-foundation/">Seravo becomes a Silver Sponsor of MariaDB Foundation</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Percona University Comes to Uruguay</title>
        <link>https://www.percona.com/blog/percona-university-comes-to-uruguay/</link>
        <pubDate>Mon, 17 Aug 2026 16:34:42 +0000</pubDate>
        <dc:creator>Agustín Gallego</dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Percona University is coming to Montevideo. On September 23rd, 2026, we’re getting together for a full day of technical talks on open source software, and you are invited! If you work or study with open source software in Uruguay, this one is for you. It’s a whole day of learning, with the people who build … Continued<br />
The post Percona University Comes to Uruguay appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/percona-university-comes-to-uruguay/">Percona University Comes to Uruguay</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><span>Percona University is coming to Montevideo. On </span><b>September 23rd, 2026</b><span>, we’re getting together for a full day of technical talks on open source software, and you are invited!</span></p>
<p><span>If you work or study with open source software in Uruguay, this one is for you. It’s a whole day of learning, with the people who build and run these systems every day. No sales pitch, just good technical content and a community that likes to share what it knows.</span></p>
<p><span>Let me tell you what to expect, and why it’s worth a spot on your calendar.</span></p>
<h2><b>What is Percona University?</b></h2>
<p><span>Percona has run these events for years across the world, including a few stops in South America already. This is the third time it will be held in Uruguay. The idea is simple: bring the open-source database community together to share knowledge for free.</span></p>
<p><span>The word “University” is the important part here. This is an educational event, and not a sales one. The talks are technical, and the goal is that you walk out having learned something you can use daily.</span></p>
<p><span>You don’t need to be a Percona customer, and you definitely don’t need to be an expert. You just need to be curious about open source databases and want to spend a day getting better at them. Bring your questions, bring a notebook and your laptop, and plan to stay for the conversations between sessions.</span></p>
<h2><b>Who is it for and why you should come</b></h2>
<p><span>Come if you work with PostgreSQL, MySQL, MongoDB, or anything in the open source data world. It’s a great place for DBAs, backend developers, SREs, students, and people just getting started to come together and learn from each other. The talks cover real problems: performance tuning, upgrades, monitoring, the things we all fight with in production.</span></p>
<p><span>Networking with peers is what I like the most about events like this. You get to meet the people behind the tools, ask engineers the questions you’ve been sitting on for months, in person, and actually talk it through. You meet other folks in Uruguay doing the same work you do, and those hallway conversations are worth as much as the talks themselves.</span></p>
<p><span>Open source is built by the community, and it’s nice to see that community in person. We don’t get a full day of this in Montevideo very often at all, so it’s worth showing up!</span></p>
<h2><b>The details</b></h2>
<p><span>Here’s what you need to know:</span></p>
<ul>
<li aria-level="1"><b>When:</b><span> September 23rd, 2026, from 09:00 to 18:00</span></li>
<li aria-level="1"><b>Where:</b><span> Regency Way Montevideo Hotel. Av Gral Rivera 3377</span></li>
<li aria-level="1"><b>Cost:</b><span> FREE!</span></li>
<li aria-level="1"><b>Language:</b><span> talks will be in English and Spanish, with slides you can review afterward</span></li>
</ul>
<h2><b>What’s on the agenda</b></h2>
<ul>
<li aria-level="1"><span>Opening Session, State of Open Source Database Ecosystem. </span><b>Peter Zaitsev</b></li>
<li aria-level="1"><span>Beyond “Postgres is up”: detecting failures and performance tuning with Coroot. </span><b>Nikolay Sivko / Agustín Gallego</b></li>
<li aria-level="1"><span>bpftrace 301: tracing variables life cycle for advanced bug investigations. </span><b>Marcos Albe</b></li>
<li aria-level="1"><span>TiDB 101. </span><b>Fernando Ipar</b></li>
<li aria-level="1"><span>MySQL 8.4 Upgrade: Best Practices For Zero-Surprise Prod Migration. </span><b>Fernando Mattera</b></li>
<li aria-level="1"><span>From Reactive to Ready: How AI Changed My Work as a Service Delivery Manager. </span><b>Mariana Bonsignore</b></li>
<li aria-level="1"><span>5-minute lightning talks at the end… and there are still some available slots for talks, so submit yours!</span></li>
</ul>
<p><span>We’re lining up talks from Percona engineers and guest speakers from the region. Expect a mix of topics, with plenty of practical hands-on content. Since it runs all day, there’s room for deeper sessions than a normal meetup allows, plus breaks to grab a coffee and keep talking. The full agenda will live on the Eventbrite page (we’ll keep adding talks as they are confirmed).</span></p>
<h2><b>How to register</b></h2>
<p><span>Registration is free on Eventbrite, and it’s quick.</span></p>
<p><b>Register here:</b></p>
<p><a href="https://www.eventbrite.com/e/percona-university-montevideo-uruguay-tickets-1998244427875"><span>https://www.eventbrite.com/e/percona-university-montevideo-uruguay-tickets-1998244427875</span></a></p>
<p><span>Grab your spot early, since seats are limited.</span></p>
<p><span>In short, Percona University Montevideo is a full day to learn, meet the community, and get better at the open source databases we all rely on. It’s happening on September 23rd, and everyone is welcome to attend.</span></p>
<p><span>Register, tell a coworker, tell a friend, and come say hi. We hope to see you there!</span></p>
<p>The post <a href="https://www.percona.com/blog/percona-university-comes-to-uruguay/">Percona University Comes to Uruguay</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/percona-university-comes-to-uruguay/">Percona University Comes to Uruguay</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB High Availability: Maximum Availability Solutions in MariaDB 12.3 LTS</title>
        <link>https://minervadb.com/mariadb-high-availability/</link>
        <pubDate>Mon, 17 Aug 2026 11:03:37 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-high-availability-maximum-availability-solutions-in-mariadb-12-3-lts/</guid>
        <source url="https://minervadb.com/">The Data Transformation Company</source>
        <description><![CDATA[<p>MariaDB high availability reached a new baseline with MariaDB Server 12.3 LTS, GA on 2026-05-29 as version 12.3.2. For the first time, a MariaDB LTS release ships parallel replication between Galera Clusters (MDEV-20065), closing the [...]</p>
<p><a href="https://minervadb.com/mariadb-high-availability/">MariaDB High Availability: Maximum Availability Solutions in MariaDB 12.3 LTS</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB high availability reached a new baseline with <a href="https://mariadb.org/mariadb-server-12-3-lts-released/" target="_blank" rel="noopener">MariaDB Server 12.3 LTS</a>, GA on 2026-05-29 as version 12.3.2. For the first time, a MariaDB LTS release ships parallel replication between Galera Clusters (MDEV-20065), closing the throughput gap that constrained multi-datacenter MariaDB high availability designs for years. This guide walks through the complete maximum availability stack on MariaDB 12.3 LTS — GTID-based asynchronous and semi-synchronous replication, Galera Cluster, cluster-to-cluster disaster recovery, and MaxScale automated failover — with tested configuration, the system tables and status variables that prove each layer is healthy, and the upgrade risks you must clear before production.</p>
<p>Every MariaDB high availability recommendation here is version-pinned to MariaDB Community Server 12.3 LTS (with 11.8 LTS noted where behavior differs) and anchored to a named metric or system table. Test everything in a staging environment that mirrors production before applying any change, and maintain a verified backup and disaster recovery posture throughout.</p>
<h2>What Maximum Availability Means in Measurable Terms</h2>
<p>Maximum availability is not a product SKU — it is an engineering outcome defined by two numbers: Recovery Point Objective (RPO), the data you can afford to lose, and Recovery Time Objective (RTO), the downtime you can afford to absorb. A MariaDB high availability architecture is only as good as the RPO/RTO it can demonstrate under a live failover drill.</p>
<p>MariaDB 12.3 LTS lets you engineer three distinct tiers:</p>
<ul>
<li><strong>RPO ≈ seconds, RTO ≈ seconds to minutes</strong> — GTID-based asynchronous replication with MaxScale automated failover.</li>
<li><strong>RPO ≈ 0 (per committed transaction), RTO ≈ seconds</strong> — semi-synchronous replication with automated failover.</li>
<li><strong>RPO = 0, RTO ≈ seconds</strong> — Galera Cluster synchronous multi-primary replication, extended across datacenters with cluster-to-cluster asynchronous replication.</li>
</ul>
<p>Treat these tiers as measurable service levels, not marketing labels. An availability SLO of 99.99% allows roughly 52 minutes of downtime per year — a budget that a single unrehearsed failover can consume entirely. That is why every MariaDB high availability design decision below is paired with the status variable, system table, or log line that proves it works, and why the article closes with the drill program that converts configuration into demonstrated RPO/RTO.</p>
<p>The rest of this article builds each tier bottom-up, then combines them into the reference architecture we deploy for production MariaDB high availability engagements.</p>
<h2>MariaDB 12.3 LTS: The Availability-Relevant Release Surface</h2>
<p>The <a href="https://mariadb.com/docs/release-notes/community-server/12.3/mariadb-12.3-changes-and-improvements" target="_blank" rel="noopener">MariaDB 12.3 changes and improvements</a> notes contain a dense cluster of replication and Galera work relevant to MariaDB high availability. These are the changes that matter operationally:</p>
<table>
<thead>
<tr>
<th>Change</th>
<th>Tracking</th>
<th>Operational impact</th>
</tr>
</thead>
<tbody>
<tr>
<td>Asynchronous replication between two Galera Clusters can use parallel replication, controlled by slave_parallel_threads</td>
<td>MDEV-20065</td>
<td>Removes the single-threaded applier ceiling on cluster-to-cluster DR links</td>
</tr>
<tr>
<td>Write set apply retry via wsrep_applier_retry_count</td>
<td>MDEV-36077</td>
<td>Transient applier conflicts retry instead of forcing node aborts</td>
</tr>
<tr>
<td>Unnecessary foreign key checks avoided during Incremental State Transfer (IST)</td>
<td>MDEV-34822</td>
<td>Faster node rejoin after short outages</td>
</tr>
<tr>
<td>Binary logging performance improved by removing a synchronization requirement</td>
<td>MDEV-34705</td>
<td>Lower commit-path latency on binlog-enabled primaries</td>
</tr>
<tr>
<td>ROW events larger than max_packet_size can be fragmented</td>
<td>MDEV-32570</td>
<td>Large-row workloads stop breaking replication</td>
</tr>
<tr>
<td>Galera package dependency removed from server packages</td>
<td>MDEV-38744</td>
<td>Install the Galera provider package explicitly on cluster nodes</td>
</tr>
</tbody>
</table>
<p>Carry-over from 11.8 LTS that completes the picture: slave_abort_blocking_timeout (MDEV-34857) automatically aborts long-running transactions that block the replication applier, and asynchronous rollback during crash recovery lets a recovering server accept connections before large rollbacks finish — measure recovery as startup-to-accepting-connections, not total rollback completion.</p>
<h2>Tier 1: GTID Replication with Semi-Synchronous Commit</h2>
<p>Standard replication remains the foundation of MariaDB high availability. On 12.3 LTS, always run it with GTID (MariaDB format: Domain-ServerID-Sequence) so failover targets can be repointed without file/position arithmetic.</p>
<h3>Primary and Replica Configuration</h3>
<pre class="EnlighterJSRAW" data-enlighter-language="ini"># /etc/my.cnf.d/replication.cnf -- MariaDB 12.3 LTS
# Restart required for server_id and log_bin changes
[mariadb]
server_id                        = 101          # unique per server
log_bin                          = mariadb-bin
binlog_format                    = ROW
log_slave_updates                = ON
gtid_domain_id                   = 1            # distinct per replication domain
gtid_strict_mode                 = ON

# Durability on the primary: RPO depends on these two
innodb_flush_log_at_trx_commit   = 1
sync_binlog                      = 1

# Parallel applier on replicas
slave_parallel_threads           = 8            # size from workload, see below
slave_parallel_mode              = optimistic</pre>
<p>Point the replica at the primary using GTID:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">CHANGE MASTER TO
    MASTER_HOST     = 'primary.db.internal',
    MASTER_USER     = '${REPL_USER}',
    MASTER_PASSWORD = '${REPL_PASSWORD}',
    MASTER_USE_GTID = slave_pos,
    MASTER_SSL      = 1;

START REPLICA;</pre>
<p>Asynchronous replication alone leaves a nonzero RPO: transactions committed on the primary but not yet shipped are lost on failover. <a href="https://mariadb.com/docs/server/ha-and-performance/standard-replication/semisynchronous-replication" target="_blank" rel="noopener">Semi-synchronous replication</a>, built into MariaDB Server (no plugin installation required since 10.3), closes that gap by refusing to acknowledge a commit to the client until at least one replica has received the event:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- Primary (dynamic, no restart)
SET GLOBAL rpl_semi_sync_master_enabled    = ON;
SET GLOBAL rpl_semi_sync_master_timeout    = 2000;        -- ms; then falls back to async
SET GLOBAL rpl_semi_sync_master_wait_point = AFTER_SYNC;  -- lossless wait point

-- Each replica (dynamic, no restart)
SET GLOBAL rpl_semi_sync_slave_enabled = ON;</pre>
<p><img loading="lazy" decoding="async" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4NjAiIGhlaWdodD0iMzAwIiB2aWV3Qm94PSIwIDAgODYwIDMwMCIgZm9udC1mYW1pbHk9IkhlbHZldGljYSxBcmlhbCxzYW5zLXNlcmlmIj48ZGVmcz48bWFya2VyIGlkPSJhMyIgbWFya2VyV2lkdGg9IjEwIiBtYXJrZXJIZWlnaHQ9IjEwIiByZWZYPSI4IiByZWZZPSIzIiBvcmllbnQ9ImF1dG8iPjxwYXRoIGQ9Ik0wLDAgTDgsMyBMMCw2IHoiIGZpbGw9IiM0NzU1NjkiLz48L21hcmtlcj48L2RlZnM+PHJlY3Qgd2lkdGg9Ijg2MCIgaGVpZ2h0PSIzMDAiIGZpbGw9IiNmOGZhZmMiLz48dGV4dCB4PSI0MzAiIHk9IjMwIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmb250LXNpemU9IjE2IiBmb250LXdlaWdodD0iYm9sZCIgZmlsbD0iIzBmMTcyYSI+U2VtaS1TeW5jaHJ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Hk9IjEzNiIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZm9udC1zaXplPSIxMCIgZmlsbD0iIzE0NTMyZCI+Y29tbWl0IE9LPC90ZXh0PjxyZWN0IHg9IjYwIiB5PSIxOTAiIHdpZHRoPSI3NjAiIGhlaWdodD0iNzYiIHJ4PSI4IiBmaWxsPSIjZmVmOWMzIiBzdHJva2U9IiNiNDUzMDkiLz48dGV4dCB4PSI0MzAiIHk9IjIxNiIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZm9udC1zaXplPSIxMiIgZm9udC13ZWlnaHQ9ImJvbGQiIGZpbGw9IiM5MjQwMGUiPlJQTyBndWFyYW50ZWU6IGNvbW1pdCBhY2tub3dsZWRnZWQgb25seSBhZnRlciBvbmUgcmVwbGljYSBob2xkcyB0aGUgZXZlbnQ8L3RleHQ+PHRleHQgeD0iNDMwIiB5PSIyMzYiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZvbnQtc2l6ZT0iMTEiIGZpbGw9IiM5MjQwMGUiPkZhbGxiYWNrIHRvIGFzeW5jIGFmdGVyIHJwbF9zZW1pX3N5bmNfbWFzdGVyX3RpbWVvdXQgKDIwMDAgbXMpIC0gYWxlcnQgb24gUnBsX3NlbWlfc3luY19tYXN0ZXJfc3RhdHVzID0gT0ZGPC90ZXh0Pjx0ZXh0IHg9IjQzMCIgeT0iMjU0IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmb250LXNpemU9IjExIiBmaWxsPSIjOTI0MDBlIj5Nb25pdG9yOiBScGxfc2VtaV9zeW5jX21hc3Rlcl95ZXNfdHggdnMgUnBsX3NlbWlfc3luY19tYXN0ZXJfbm9fdHg8L3RleHQ+PC9zdmc+" alt="MariaDB high availability semi-synchronous replication commit path in MariaDB 12.3 LTS" width="860" height="300"></p>
<p><em>Figure 3: Semi-synchronous commit path in a MariaDB high availability replication pair — the RPO guarantee and its fallback behavior.</em></p>
<p>Verify the guarantee is actually active — a silent fallback to asynchronous mode is the classic semi-sync failure mode:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">SHOW GLOBAL STATUS
WHERE Variable_name IN
    ('Rpl_semi_sync_master_status',
     'Rpl_semi_sync_master_yes_tx',
     'Rpl_semi_sync_master_no_tx');</pre>
<p>Alert when Rpl_semi_sync_master_status reads OFF or Rpl_semi_sync_master_no_tx grows: both mean commits are proceeding without the semi-sync guarantee. For replica lag, do not rely on Seconds_Behind_Master alone — track gtid_slave_pos against gtid_binlog_pos on the primary, and on 12.3 monitor per-worker state in information_schema.SLAVE_WORKER_THREADS when tuning slave_parallel_threads. For replica provisioning at scale, see our note on <a href="https://minervadb.com/transfer-backed-up-data-to-a-mariadb-replica/">transferring backups efficiently to a MariaDB replica</a>.</p>
<h3>Sizing the Parallel Applier</h3>
<p>slave_parallel_threads is not a bigger-is-better knob. In optimistic mode the applier speculatively executes transactions in parallel and rolls back on conflict, so a write pattern with hot rows can spend more time retrying than applying. Size it empirically: start at 4–8 threads, replay production-shaped load, and compare the drain rate of gtid_slave_pos against the primary while watching the retry counters in SHOW GLOBAL STATUS LIKE &#8216;Slave_retried_transactions&#8217;.</p>
<p>On replicas dedicated to failover (rather than read scaling), keep innodb_flush_log_at_trx_commit = 1 and sync_binlog = 1 as well — a failover target with relaxed durability quietly converts your semi-sync RPO ≈ 0 design back into a data-loss scenario the moment it is promoted.</p>
<h2>Tier 2: Galera Cluster — Synchronous Multi-Primary</h2>
<p><a href="https://mariadb.com/kb/en/galera-cluster/" target="_blank" rel="noopener">MariaDB Galera Cluster</a> is the core of any zero-data-loss MariaDB high availability design: it delivers RPO = 0 inside a datacenter through certification-based synchronous replication: a transaction commits only after its write set has been replicated to and certified by every node in the cluster. A minimum of three nodes preserves quorum through any single node failure.</p>
<p><img loading="lazy" decoding="async" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4NjAiIGhlaWdodD0iNDQwIiB2aWV3Qm94PSIwIDAg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ZXItZW5kPSJ1cmwoI2FyKSIvPgogIDxsaW5lIHgxPSI0ODAiIHkxPSIyMTQiIHgyPSI2NzAiIHkyPSIyODYiIHN0cm9rZT0iIzQ3NTU2OSIgc3Ryb2tlLXdpZHRoPSIxLjYiIG1hcmtlci1lbmQ9InVybCgjYXIpIi8+CgogIDxwYXRoIGQ9Ik0xODAgMzgwIFE0MzAgNDMyIDY4MCAzODAiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzE1ODAzZCIgc3Ryb2tlLXdpZHRoPSIxLjgiIHN0cm9rZS1kYXNoYXJyYXk9IjYgNCIvPgogIDx0ZXh0IHg9IjQzMCIgeT0iNDIwIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmb250LXNpemU9IjEyIiBmaWxsPSIjMTQ1MzJkIj5zeW5jaHJvbm91cyB3cml0ZS1zZXQgcmVwbGljYXRpb24gKGNlcnRpZmljYXRpb24tYmFzZWQsIFJQTyA9IDApPC90ZXh0Pgo8L3N2Zz4K" alt="MariaDB high availability architecture: three-node Galera Cluster on MariaDB 12.3 LTS behind MaxScale 25.10 automated failover" width="860" height="440"></p>
<p><em>Figure 1: MariaDB high availability reference topology — three-node Galera Cluster behind MaxScale automated failover.</em></p>
<h3>Cluster Configuration on 12.3 LTS</h3>
<p>Note MDEV-38744: from 12.3, server packages no longer pull the Galera provider — install the galera-4 package explicitly on every node.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="ini"># /etc/my.cnf.d/galera.cnf -- MariaDB 12.3 LTS, Galera 4
# Restart required for wsrep_provider changes
[mariadb]
wsrep_on                     = ON
wsrep_provider               = /usr/lib64/galera-4/libgalera_smm.so
wsrep_cluster_name           = prod_cluster_dc1
wsrep_cluster_address        = gcomm://10.0.1.11,10.0.1.12,10.0.1.13
wsrep_node_name              = db-dc1-node1
wsrep_node_address           = 10.0.1.11

# Galera requirements
binlog_format                = ROW
innodb_autoinc_lock_mode     = 2
log_slave_updates            = ON            # required for cluster-to-cluster replication

# Applier parallelism and 12.3 retry behavior
wsrep_slave_threads          = 8
wsrep_applier_retry_count    = 4             # new in 12.3, MDEV-36077

# State transfer
wsrep_sst_method             = mariabackup
wsrep_sst_auth               = ${SST_USER}:${SST_PASSWORD}

# Provider tuning: size gcache so short outages recover via IST, not SST
wsrep_provider_options       = "gcache.size=4G;gcs.fc_limit=256"</pre>
<p>Size gcache.size from your write volume: it must hold more write sets than accumulate during your longest tolerated node outage, because a node that finds its missing transactions in the donor gcache rejoins via Incremental State Transfer (IST) instead of a full State Snapshot Transfer (SST).</p>
<p>MariaDB 12.3 makes IST cheaper again by skipping unnecessary foreign key checks during the transfer (MDEV-34822).</p>
<h3>Proving Cluster Health</h3>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">SHOW GLOBAL STATUS
WHERE Variable_name IN
    ('wsrep_cluster_status',          -- must be Primary
     'wsrep_cluster_size',            -- expected node count
     'wsrep_local_state_comment',     -- Synced on a healthy node
     'wsrep_flow_control_paused',     -- fraction of time paused; alert above 0.1
     'wsrep_local_recv_queue_avg',    -- sustained > 0.5 means applier lag
     'wsrep_cert_deps_distance');     -- guides wsrep_slave_threads sizing</pre>
<p>wsrep_flow_control_paused is the number that tells you the cluster is throttling writes to protect its slowest node — the mechanism behind most &#8220;Galera is slow&#8221; incidents. We covered the full diagnostic sequence in <a href="https://minervadb.com/troubleshooting-galera-cluster-for-performance/">Troubleshooting Galera Cluster for Performance Issues</a>. Remember the standing Galera constraints: InnoDB tables with primary keys only, write-set certification conflicts surface as deadlock errors to the application, and large transactions are bounded by wsrep_max_ws_size.</p>
<p>Two design decisions determine whether Galera delivers its RPO = 0 promise in practice. First, quorum arithmetic: always deploy an odd number of nodes (or two nodes plus a Galera arbitrator) so a network partition leaves exactly one primary component; a 50/50 split freezes both halves, which protects consistency at the cost of availability.</p>
<p>Second, write-conflict discipline: Galera is multi-primary, but pointing all writes at a single node through your proxy layer eliminates certification conflicts for most OLTP workloads and makes wsrep_cert_deps_distance far more predictable. Reserve true multi-node writes for workloads you have tested for conflict rate — the counter to watch is wsrep_local_cert_failures.</p>
<h2>Multi-Datacenter Design: Parallel Galera-to-Galera Replication in 12.3</h2>
<p>Stretching one Galera Cluster across WAN links penalizes every commit with inter-DC round trips. The production-grade pattern for MariaDB high availability across regions is one Galera Cluster per datacenter, connected by GTID-based asynchronous replication — and this is exactly where MariaDB 12.3 LTS delivers its headline improvement: the asynchronous link between two Galera Clusters can now use parallel replication (MDEV-20065).</p>
<p>Before 12.3, the cluster-to-cluster applier was effectively single-threaded, so a write-heavy primary cluster could permanently outrun its DR cluster. Now the replica-side applier fans out through slave_parallel_threads:</p>
<p><img loading="lazy" decoding="async" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4NjAiIGhlaWdodD0iMzYwIiB2aWV3Qm94PSIwIDAgODYwIDM2MCIgZm9udC1mYW1pbHk9IkhlbHZldGljYSxBcmlhbCxzYW5zLXNlcmlmIj4KICA8ZGVmcz4KICAgIDxtYXJrZXIgaWQ9ImFyMiIgbWFya2VyV2lkdGg9IjEwIiBtYXJrZXJIZWlnaHQ9IjEwIiByZWZYPSI4IiByZWZZPSIzIiBvcmllbnQ9ImF1dG8iPjxwYXRoIGQ9Ik0wLDAgTDgsMyBMMCw2IHoiIGZpbGw9IiNiNDUzMDkiLz48L21hcmtlcj4KICA8L2RlZnM+CiAgPHJlY3Qgd2lkdGg9Ijg2MCIgaGVpZ2h0PSIzNjAiIGZpbGw9IiNmOGZhZmMiLz4KICA8dGV4dCB4PSI0MzAiIHk9IjMwIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmb250LXNpemU9IjE3IiBmb250LXdlaWdodD0iYm9sZCIgZmlsbD0iIzBmMTcyYSI+TXVsdGktREMgTWF4aW11bSBBdmFpbGFiaWxpdHkg4oCUIFBhcmFsbGVsIEdhbGVyYS10by1HYWxlcmEgUmVwbGljYXRpb24gKE1hcmlhREIgMTIuMywgTURFV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cGFyYWxsZWwgc2luY2UgMTIuMzwvdGV4dD4KCiAgPHRleHQgeD0iNDMwIiB5PSIzMzAiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZvbnQtc2l6ZT0iMTIiIGZpbGw9IiMzMzQxNTUiPlZlcmlmaWNhdGlvbjogU0VMRUNUIEBAZ3RpZF9zbGF2ZV9wb3MsIEBAZ3RpZF9iaW5sb2dfcG9zOyDigJQgcG9zaXRpb25zIG11c3QgY29udmVyZ2UgdW5kZXIgc3VzdGFpbmVkIHdyaXRlIGxvYWQ8L3RleHQ+Cjwvc3ZnPgo=" alt="MariaDB high availability multi-datacenter topology: parallel Galera-to-Galera asynchronous replication in MariaDB 12.3 LTS" width="860" height="360"></p>
<p><em>Figure 2: Multi-datacenter MariaDB high availability — one Galera Cluster per DC linked by parallel asynchronous replication (new in 12.3).</em></p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql">-- On one node of the DR cluster (DC2)
-- Each cluster keeps a distinct gtid_domain_id (e.g., DC1 = 1, DC2 = 2)
SET GLOBAL slave_parallel_threads = 8;
SET GLOBAL slave_parallel_mode    = optimistic;

CHANGE MASTER TO
    MASTER_HOST     = 'dc1-vip.db.internal',
    MASTER_USER     = '${REPL_USER}',
    MASTER_PASSWORD = '${REPL_PASSWORD}',
    MASTER_USE_GTID = slave_pos,
    MASTER_SSL      = 1;

START REPLICA;

-- Verify parallel apply is active and lag is draining
SHOW REPLICA STATUSG
SELECT @@gtid_slave_pos, @@gtid_binlog_pos;</pre>
<p>Every node in each cluster must run log_slave_updates = ON so replicated transactions re-enter the local cluster&#8217;s write-set replication, and the replication user should exist on all nodes of the source cluster so the link can be re-pointed after a node failure. Combine this with slave_abort_blocking_timeout (11.8+) on the DR side so a stray analytical query cannot stall the applier indefinitely.</p>
<p>If you do stretch a single Galera Cluster across sites instead — legitimate for metro-distance, low-latency links — declare WAN topology to the provider with gmcast.segment in wsrep_provider_options (a distinct segment ID per site), so Galera relays traffic once per segment instead of once per node and picks IST/SST donors within the local segment. Measure the commit-latency cost before choosing this path: every transaction pays the inter-site round trip at certification time, which is precisely what the cluster-per-DC design above avoids.</p>
<h2>Automated Failover with MariaDB MaxScale 25.10</h2>
<p>Replication and Galera provide redundancy; MariaDB high availability additionally requires something to detect failure and redirect traffic in seconds. MariaDB MaxScale 25.10 (current release 25.10.3, GA 2026-06-15) pairs a readwritesplit router with <a href="https://mariadb.com/docs/maxscale/mariadb-maxscale-tutorials/automatic-failover-with-mariadb-monitor" target="_blank" rel="noopener">automatic failover driven by the MariaDB Monitor</a>:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="ini"># /etc/maxscale.cnf -- MaxScale 25.10.3
[Replication-Monitor]
type                     = monitor
module                   = mariadbmon
servers                  = db1,db2,db3
user                     = ${MAXSCALE_USER}
password                 = ${MAXSCALE_PASSWORD}
replication_user         = ${REPL_USER}
replication_password     = ${REPL_PASSWORD}
monitor_interval         = 2s
auto_failover            = true
auto_rejoin              = true
failcount                = 3            # 3 x 2s = failure declared after ~6s

[RW-Split-Service]
type                     = service
router                   = readwritesplit
servers                  = db1,db2,db3
user                     = ${MAXSCALE_USER}
password                 = ${MAXSCALE_PASSWORD}
transaction_replay       = true         # replays in-flight transactions after failover</pre>
<p>With auto_failover enabled, MaxScale promotes the most up-to-date replica when the primary fails, repoints the remaining replicas, and auto_rejoin re-subordinates the old primary when it returns — no split brain, no manual CHANGE MASTER. Planned maintenance uses a zero-data-loss switchover instead:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell"># Verify topology state before acting
maxctrl list servers

# Planned promotion of db2 (waits for replicas to catch up)
maxctrl call command mariadbmon switchover Replication-Monitor db2

# Validate: db2 is Master, others are Slave, Running
maxctrl list servers</pre>
<p>Two disclosures belong in every MaxScale design. First, licensing: MaxScale is distributed under the Business Source License (BSL) — not OSI open source — and production use beyond the license grant requires a MariaDB subscription. Second, vendor neutrality: ProxySQL and HAProxy (with an external failover orchestrator) remain capable open-source alternatives; MaxScale earns its place when you need integrated automated failover, transaction replay, and Galera-aware routing in one component. Choose per requirement, not by default.</p>
<p>Do not let the proxy become the new single point of failure. Run at least two MaxScale instances — either behind keepalived with a virtual IP, or using MaxScale cooperative monitoring so only one instance performs failover actions at a time — and monitor them with the same seriousness as the database tier. The availability of a MariaDB high availability stack is the availability of its weakest routing component.</p>
<h2>Choosing Your MariaDB High Availability Topology</h2>
<p>There is no single correct MariaDB high availability topology — there is a correct topology per RPO/RTO requirement, write pattern, and operational maturity. The matrix below summarizes the trade-offs on MariaDB 12.3 LTS:</p>
<table>
<thead>
<tr>
<th>Topology (MariaDB 12.3 LTS)</th>
<th>RPO</th>
<th>RTO</th>
<th>Write scaling</th>
<th>Operational complexity</th>
</tr>
</thead>
<tbody>
<tr>
<td>Async GTID replication + MaxScale auto_failover</td>
<td>Seconds (replication lag)</td>
<td>~5–15 s</td>
<td>Single primary</td>
<td>Low</td>
</tr>
<tr>
<td>Semi-sync replication + MaxScale auto_failover</td>
<td>≈ 0 per acknowledged commit</td>
<td>~5–15 s</td>
<td>Single primary</td>
<td>Low–medium</td>
</tr>
<tr>
<td>Galera Cluster (3+ nodes, single DC)</td>
<td>0</td>
<td>Seconds (connection re-route)</td>
<td>Multi-primary (conflict-bound)</td>
<td>Medium</td>
</tr>
<tr>
<td>Galera per DC + parallel cluster-to-cluster replication</td>
<td>0 in-DC; seconds cross-DC</td>
<td>Seconds in-DC; minutes for DC failover</td>
<td>Multi-primary per DC</td>
<td>High</td>
</tr>
</tbody>
</table>
<p>RTO figures are illustrative planning values, not benchmarks — validate them with failover drills on your own workload and infrastructure.</p>
<h2>Upgrade Risks to Clear Before 12.3 LTS</h2>
<p>An upgrade executed carelessly is itself an availability incident, so treat the move to 12.3 LTS as part of the MariaDB high availability program. Three 12.3 changes have direct availability implications:</p>
<ul>
<li><strong>innodb_snapshot_isolation now defaults to ON.</strong> REPEATABLE READ behaves as true snapshot isolation, and applications written against the previous semantics can see new conflict errors under concurrency. Load-test transaction-heavy paths on a 12.3 clone while watching Innodb_row_lock_% status counters and application error rates by SQL digest. Rollback is dynamic, no restart: SET GLOBAL innodb_snapshot_isolation = OFF;</li>
<li><strong>Three new reserved words: CONVERSION, ST_COLLECT, TO_DATE.</strong> Pre-flight scan information_schema.COLUMNS, TABLES, and ROUTINES for these identifiers before upgrading; rename rather than quote.</li>
<li><strong>A known replication issue affects master_use_gtid settings during upgrade to 12.3.</strong> Capture SHOW REPLICA STATUS (Using_Gtid, Gtid_IO_Pos) and SELECT @@gtid_slave_pos, @@gtid_binlog_pos; on every replica before upgrading, upgrade replicas before the primary, and explicitly re-assert MASTER_USE_GTID after the upgrade instead of trusting persistence.</li>
</ul>
<p>Also plan the support horizon: under the <a href="https://mariadb.org/about/maintenance-policy/" target="_blank" rel="noopener">MariaDB maintenance policy</a>, Community LTS binaries are supported for three years from GA — 12.3 to roughly mid-2029, 11.8 to 2028-06-04 — with two further years of source-only fixes. Estates still on 10.6 passed community binary EOL on 2026-07-06 and need a dated migration plan.</p>
<h2>Backups Are Part of the MariaDB High Availability Design</h2>
<p>Replication multiplies data; it does not protect it. A DROP TABLE, an application bug, or ransomware replicates to every node and every datacenter in milliseconds, which is why a MariaDB high availability architecture without tested backups is incomplete. Run mariabackup for physical backups from a designated Galera node or replica (the same tooling already serving as your SST method), keep binary logs for point-in-time recovery between backup sets, and store at least one copy outside the failure domain of both datacenters.</p>
<p>The metric that matters is not backup success rate — it is restore time, measured by actually restoring: schedule a quarterly restore drill and record the wall-clock duration against your RTO budget. Backup validation belongs in the same review cadence as failover drills, because the two protect against different failure classes.</p>
<h2>Prove It: Drills and Standing Telemetry</h2>
<p>A MariaDB high availability stack that has not survived a rehearsed failure is an assumption, not an architecture. Institutionalize quarterly MariaDB high availability drills: kill the primary and measure detection-to-promotion from MaxScale logs; kill a Galera node and measure IST rejoin duration from the error log and wsrep_local_state_comment transitions; fail an entire DC and measure cluster-to-cluster catch-up by watching gtid_slave_pos converge.</p>
<p>Alert continuously on wsrep_cluster_status, wsrep_flow_control_paused, Rpl_semi_sync_master_status, and GTID position drift — these four catch the large majority of MariaDB high availability regressions before customers do.</p>
<h2>Conclusion</h2>
<p>MariaDB 12.3 LTS is the strongest availability release in the MariaDB Server line to date: parallel cluster-to-cluster replication removes the last structural bottleneck in the dual-DC Galera reference architecture, applier retry and cheaper IST harden day-2 operations, and the surrounding LTS window gives you a platform stable through 2029. Engineered deliberately — GTID everywhere, semi-sync or Galera where RPO demands it, MaxScale or an open-source proxy layer for sub-15-second failover, and drills that prove the numbers — MariaDB high availability on 12.3 LTS supports RPO = 0 designs with single-digit-second in-DC recovery.</p>
<p>MinervaDB builds, audits, and operates these architectures for enterprises worldwide — from topology design and failover automation to 24×7 monitoring with the exact telemetry described above. If you are planning a 12.3 LTS upgrade or a high availability redesign, our <a href="https://minervadb.com/mariadb-remote-dba/">MariaDB Remote DBA and Support team</a> can help you get there with measured RPO/RTO outcomes. Contact us at contact@minervadb.com.</p>
<p><a href="https://minervadb.com/mariadb-high-availability/">MariaDB High Availability: Maximum Availability Solutions in MariaDB 12.3 LTS</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Extending MariaDB with Native Aggregate Plugins: Laying the Groundwork for HyperLogLog</title>
        <link>https://mariadb.org/extending-mariadb-with-native-aggregate-plugins-laying-the-groundwork-for-hyperloglog/</link>
        <pubDate>Sun, 16 Aug 2026 16:00:46 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB already allows developers to add new Pluggable Data Types and scalar Plugin Functions. One missing piece has been Pluggable Aggregate Functions operating on PDTs. That matters for functionality such as HyperLogLog, where an extension needs to aggregate values into a custom statistical sketch while preserving its native SQL type. …<br />
Continue reading "Extending MariaDB with Native Aggregate Plugins: Laying the Groundwork for HyperLogLog"<br />
Extending MariaDB with Native Aggregate Plugins: Laying the Groundwork for HyperLogLog appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/extending-mariadb-with-native-aggregate-plugins-laying-the-groundwork-for-hyperloglog/">Extending MariaDB with Native Aggregate Plugins: Laying the Groundwork for HyperLogLog</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB already allows developers to add new Pluggable Data Types and scalar Plugin Functions. One missing piece has been Pluggable Aggregate Functions operating on PDTs. That matters for functionality such as HyperLogLog, where an extension needs to aggregate values into a custom statistical sketch while preserving its native SQL type. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/extending-mariadb-with-native-aggregate-plugins-laying-the-groundwork-for-hyperloglog/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;Extending MariaDB with Native Aggregate Plugins: Laying the Groundwork for HyperLogLog&#8221;</span></a></p>
<p><a href="https://mariadb.org/extending-mariadb-with-native-aggregate-plugins-laying-the-groundwork-for-hyperloglog/">Extending MariaDB with Native Aggregate Plugins: Laying the Groundwork for HyperLogLog</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
<p><a href="https://mariadb.org/extending-mariadb-with-native-aggregate-plugins-laying-the-groundwork-for-hyperloglog/">Extending MariaDB with Native Aggregate Plugins: Laying the Groundwork for HyperLogLog</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Redis 8.10 Performance and Reliability: What Actually Changed</title>
        <link>https://minervadb.com/redis-8-10-performance-reliability/</link>
        <pubDate>Sat, 15 Aug 2026 07:07:18 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/redis-8-10-performance-and-reliability-what-actually-changed/</guid>
        <source url="https://minervadb.com/">The Data Transformation Company</source>
        <description><![CDATA[<p>Redis 8.10 performance and reliability: the short version Redis 8.10 performance and reliability: the three changes that alter how you size and operate a Redis fleet. The headline for Redis 8.10 performance is that this [...]</p>
<p><a href="https://minervadb.com/redis-8-10-performance-reliability/">Redis 8.10 Performance and Reliability: What Actually Changed</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<h2>Redis 8.10 performance and reliability: the short version</h2>
<figure><img loading="lazy" decoding="async" src="https://minervadb.com/wp-content/uploads/2026/08/redis-8-10-performance-reliability.png" alt="Redis 8.10 performance and reliability diagram: compact hashes, MP-AOF BACKUP family and replication stream compression" width="1200" height="630" class="size-full wp-image-92842" srcset="https://minervadb.com/wp-content/uploads/2026/08/redis-8-10-performance-reliability.png 1200w, https://minervadb.com/wp-content/uploads/2026/08/redis-8-10-performance-reliability-300x158.png 300w, https://minervadb.com/wp-content/uploads/2026/08/redis-8-10-performance-reliability-1024x538.png 1024w, https://minervadb.com/wp-content/uploads/2026/08/redis-8-10-performance-reliability-768x403.png 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px"><figcaption>Redis 8.10 performance and reliability: the three changes that alter how you size and operate a Redis fleet.</figcaption></figure>
<p>The headline for <strong>Redis 8.10 performance</strong> is that this is a memory-and-durability release wearing a performance badge. The two changes that will alter how you size and operate a Redis fleet are <strong>compact hashes</strong>, which store field names once across keys that share a schema, and the <strong><code>BACKUP</code> command family</strong>, which finally gives you node-side online backups built on multi-part AOF instead of a hand-rolled <code>BGSAVE</code>-and-copy script. Everything else — the new list, set and stream commands, the JSONPath expansion, the search timeout controls — is genuinely useful, but it will not change your capacity plan.</p>
<p>This post covers the three changes that matter operationally, demonstrates each with runnable commands, states who is affected, and closes with a dated, version-pinned upgrade stance. It is written for engineers running Redis as production infrastructure, not as a changelog retelling.</p>
<hr>
<h2>Step zero: establish exactly what you are running</h2>
<p>Before any of this applies, confirm the engine and the version. “Redis” in a real estate is frequently Redis OSS 7.2.4 under BSD, Redis 8.x under the tri-license, Valkey, or a managed service running one of them. Everything downstream — feature availability, licensing posture, upgrade path — depends on the answer.</p>
<pre class="EnlighterJSRAW">redis-cli INFO server | grep -E 'redis_version|redis_mode|os|arch_bits|io_threads_active'
redis-cli INFO memory | grep -E 'used_memory_human|maxmemory_policy|mem_allocator'
redis-cli CONFIG GET appendonly appendfsync repl-diskless-sync save</pre>
<p>Two facts to record alongside the version:</p>
<ul>
<li><strong>Licensing.</strong> Redis Open Source 8.0.0 and later ships under a tri-license — RSALv2, SSPLv1, or AGPLv3, user’s choice — and that same tri-license covers the integral modules (RediSearch, RedisJSON, RedisTimeSeries, RedisBloom). Redis 7.2.x and earlier were BSD-3-Clause. This is an architecture input, not legal trivia; route formal compliance questions to counsel.</li>
<li><strong>Support horizon.</strong> As of August 2026, 8.10 is the current release. 8.0’s security support runs to 01 Dec 2026, and 7.2/7.4 to 01 Dec 2029. If you are on 8.0, you have a deadline.</li>
</ul>
<hr>
<h2>Change 1: Compact hashes and the memory line item</h2>
<h3>What changed</h3>
<p>Redis 8.10 introduces a new hash encoding that stores field names <strong>once per template</strong>, shared across every key that uses the same field layout. Redis has always had two hash encodings — <code>listpack</code> for small hashes and <code>hashtable</code> for large ones — and in both, every key carried its own copy of every field name. For the single most common Redis modelling pattern in the wild (one hash per entity, identical fields across millions of entities), that repetition was pure overhead.</p>
<p>Consider a million user records stored as <code>user:{id}</code> hashes with fields <code>name</code>, <code>email</code>, <code>age</code>, <code>country</code>, <code>plan</code>, <code>created_at</code>. Before 8.10, those six field-name strings were materialised a million times each. With compact hashes, they are materialised once into a template, and each key stores only its values plus a template reference.</p>
<figure><img loading="lazy" decoding="async" src="https://minervadb.com/wp-content/uploads/2026/08/redis-8-10-compact-hashes.png" alt="Redis 8.10 compact hashes: plain hash encoding versus a shared hash template" width="1200" height="560" class="size-full wp-image-92844" srcset="https://minervadb.com/wp-content/uploads/2026/08/redis-8-10-compact-hashes.png 1200w, https://minervadb.com/wp-content/uploads/2026/08/redis-8-10-compact-hashes-300x140.png 300w, https://minervadb.com/wp-content/uploads/2026/08/redis-8-10-compact-hashes-1024x478.png 1024w, https://minervadb.com/wp-content/uploads/2026/08/redis-8-10-compact-hashes-768x358.png 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px"><figcaption>Redis 8.10 compact hashes: field names are stored once per template instead of once per key.</figcaption></figure>
<h3>Measuring it</h3>
<p>Three new counters expose the encoding directly, so you can verify the saving rather than assume it:</p>
<pre class="EnlighterJSRAW"># Distinct templates and how many keys are backed by them
redis-cli INFO stats | grep -E 'hash_templates|hash_template_keys'

# Memory consumed by the templates themselves
redis-cli INFO memory | grep used_memory_hash_templates

# Per-key verification
redis-cli OBJECT ENCODING user:1
redis-cli MEMORY USAGE user:1</pre>
<p>The honest way to size the benefit on <strong>your</strong> data is to load a representative slice into a scratch instance on both versions and compare <code>used_memory</code>. Do not extrapolate from a vendor headline:</p>
<pre class="EnlighterJSRAW"># Reproducible A/B: same dataset, two instances, two versions.
# Run on a scratch host. Never point this at production.

for PORT in 6388 6389; do
  redis-cli -p "$PORT" FLUSHALL
done

# Generate 1M schema-identical hashes and pipe them in
python3 - <<'PY' > /tmp/users.redis
for i in range(1, 1_000_001):
    print(f"HSET user:{i} name u{i} email u{i}@example.com age {20 + i % 50} "
          f"country IN plan pro created_at 2026-08-15")
PY

redis-cli -p 6388 --pipe < /tmp/users.redis   # 8.8 instance
redis-cli -p 6389 --pipe < /tmp/users.redis   # 8.10 instance

for PORT in 6388 6389; do
  echo -n "port $PORT: "
  redis-cli -p "$PORT" INFO memory | grep -E '^used_memory:'
done</pre>
<p>Report the delta from your own run. That number is the one your capacity plan can spend.</p>
<h3>The bulk-load path: HIMPORT</h3>
<p><code>HIMPORT</code> (new in 8.10) is a connection-scoped session that declares field names once and then sends values only. It reduces network bytes and per-command parsing work, and it lands the keys directly in the compact encoding. The fieldset is local to the connection and is discarded when the connection closes or on <code>RESET</code>.</p>
<pre class="EnlighterJSRAW"># Declare an ordered fieldset named "u" on this connection
HIMPORT PREPARE u name email age

# Send values only — field names are never repeated on the wire
HIMPORT SET user:1 u alice alice@example.com 30
HIMPORT SET user:2 u bob   bob@example.com   25

# Housekeeping
HIMPORT DISCARD u
HIMPORT DISCARDALL</pre>
<p>This is the right tool for migrations, warm-cache rebuilds, and ETL sinks. It is not a replacement for <code>HSET</code> in application code.</p>
<h3>Configuration: what to set, and when</h3>
<p>Three startup-relevant parameters govern how plain hashes are converted to templates during RDB load. Treat the defaults as correct until measurement says otherwise.</p>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Controls</th>
<th>Change requires</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>hash-rdb-load-min-template-entries</code></td>
<td>Minimum field count before a plain hash is converted to a template during load</td>
<td><code>CONFIG SET</code> (verify on your build)</td>
</tr>
<tr>
<td><code>hash-rdb-load-max-template-entries</code></td>
<td>Maximum field count eligible for load-time conversion</td>
<td><code>CONFIG SET</code> (verify on your build)</td>
</tr>
<tr>
<td><code>hash-rdb-load-template-disassembly-threshold</code></td>
<td>Minimum number of keys a converted template must end up backing to be kept</td>
<td><code>CONFIG SET</code> (verify on your build)</td>
</tr>
</tbody>
</table>
<pre class="EnlighterJSRAW">redis-cli CONFIG GET 'hash-rdb-load-*'</pre>
<h3>Who is affected, and where it does not help</h3>
<p><strong>It helps most</strong> when you have many keys with an identical field layout — session stores, user/product/device catalogues, feature stores, entity caches.</p>
<p><strong>It helps least</strong> when hashes are heterogeneous (every key a different shape), when hashes are few and enormous, or when your memory is dominated by strings, sorted sets or streams rather than hashes. A wide-column model with per-key ad-hoc fields will produce template churn rather than template reuse — watch <code>hash_templates</code> climbing towards <code>hash_template_keys</code>, which is the signature of a schema too variable to benefit.</p>
<p>If your memory pressure is actually eviction policy or TTL hygiene rather than encoding, the fix is elsewhere. Our field guide on <a href="https://minervadb.com/mastering-redis-ttl/">mastering Redis TTL</a> covers the expiry-side of the same problem.</p>
<hr>
<h2>Change 2: The BACKUP command family — online backups without the shell scripts</h2>
<h3>What changed</h3>
<p>Until 8.10, “backing up Redis” meant one of a small set of unsatisfying options: trigger <code>BGSAVE</code> and copy <code>dump.rdb</code>, copy the AOF directory and hope you caught a consistent manifest, or take a filesystem/EBS snapshot and accept the fork-timing risk. Redis 8.10 ships <code>BACKUP</code>, a container command that produces a <strong>self-contained, restorable artifact set</strong> reusing the multi-part AOF (MP-AOF) format, without stopping writes and without you managing rewrites by hand.</p>
<p>A sealed backup is three artefacts:</p>
<ul>
<li><code>appendonly.aof.N.base.rdb</code> — the BASE point-in-time snapshot</li>
<li><code>appendonly.aof.N.incr.aof</code> — the INCR file holding writes accumulated after the snapshot</li>
<li><code>appendonly.aof.manifest</code> — a standalone manifest describing the set</li>
</ul>
<h3>The workflow</h3>
<figure><img loading="lazy" decoding="async" src="https://minervadb.com/wp-content/uploads/2026/08/redis-8-10-backup-workflow.png" alt="Redis 8.10 BACKUP command family workflow: START, LIST, SEAL, copy, CLEANUP on MP-AOF" width="1200" height="560" class="size-full wp-image-92845" srcset="https://minervadb.com/wp-content/uploads/2026/08/redis-8-10-backup-workflow.png 1200w, https://minervadb.com/wp-content/uploads/2026/08/redis-8-10-backup-workflow-300x140.png 300w, https://minervadb.com/wp-content/uploads/2026/08/redis-8-10-backup-workflow-1024x478.png 1024w, https://minervadb.com/wp-content/uploads/2026/08/redis-8-10-backup-workflow-768x358.png 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px"><figcaption>The Redis 8.10 BACKUP command family: START, LIST, SEAL, copy, CLEANUP — restore via preload-file.</figcaption></figure>
<pre class="EnlighterJSRAW"># 1. Open a backup window and produce a fresh BASE.
#    Works whether or not AOF persistence is enabled.
redis-cli BACKUP START

# 2. Ask which immutable files are pinned so far.
#    The data plane can start copying BASE while Redis keeps accumulating INCR.
redis-cli BACKUP LIST

# 3. Freeze the backup: hard-link the INCR, write the manifest.
#    After SEAL, BACKUP LIST also returns the INCR and manifest paths.
redis-cli BACKUP SEAL

# 4. Copy every path reported by BACKUP LIST to your backup target.
#    (rsync/aws s3 cp/azcopy — your data plane, not Redis's job.)

# 5. Release the pinned artefacts once the copy is verified.
redis-cli BACKUP CLEANUP</pre>
<p>Two commands for observability at any point in that sequence:</p>
<pre class="EnlighterJSRAW">redis-cli BACKUP STATUS   # inspect current backup state
redis-cli BACKUP ABORT    # cancel a backup that has not yet been sealed</pre>
<p>Relevant settings:</p>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Default</th>
<th>Meaning</th>
<th>Reload vs restart</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>backupdirname</code></td>
<td><code>backupdir</code></td>
<td>Backup directory, resolved under the server’s <code>dir</code></td>
<td><strong>Startup-only</strong></td>
</tr>
<tr>
<td><code>backup-sealed-ttl</code></td>
<td><code>0</code> (disabled)</td>
<td>Seconds before sealed files are auto-cleaned</td>
<td>Runtime</td>
</tr>
</tbody>
</table>
<h3>Restore</h3>
<p>Restore is a startup-only setting, <code>preload-file</code>, in the form <code><type>:<path></code>:</p>
<pre class="EnlighterJSRAW"># Restore from a sealed MP-AOF backup
preload-file aof:/var/backups/redis/appendonly.aof.manifest

# Or from a single RDB
preload-file rdb:/var/backups/redis/dump-2026-08-15.rdb</pre>
<p>When <code>preload-file</code> is set, Redis loads only that file or manifest and skips its normal <code>appenddirname</code> and <code>dump.rdb</code> loading. Once preload completes, it resumes the persistence mode you configured.</p>
<h3>Why this matters operationally</h3>
<p>The genuinely important design detail is that <strong>creation is decoupled from finalisation</strong>. <code>BACKUP START</code> and <code>BACKUP SEAL</code> are separate calls, so a control plane can stagger <code>START</code> across cluster nodes and avoid every node forking at the same instant — the classic cause of a synchronised RSS spike and a latency cliff across a whole shard group. Each node produces its BASE independently; consistency is established at the seal boundary.</p>
<p><strong>Production safety caveat.</strong> A backup you have never restored is not a backup. Before this replaces your existing procedure, run a full restore into an isolated instance, validate key counts and a sample of application-level invariants, and time the restore so you have a real RTO number. Test in staging first; keep your existing backup path running in parallel for at least one full retention cycle.</p>
<p>A backup path is only half of a DR posture. Our <a href="https://minervadb.com/redis-performance-audit/">Redis performance audit</a> methodology treats restore drills as a first-class deliverable, not an afterthought.</p>
<hr>
<h2>Change 3: Replication and full-sync hardening</h2>
<p>The replication path has been getting steady attention across the 8.x line, and 8.10 continues it. Three items are worth your attention.</p>
<p><strong>Replication stream compression.</strong> Redis 8.10 adds compression of the replication stream between primaries and replicas, aimed squarely at bandwidth consumption. This matters most for cross-AZ and cross-region topologies, where replication egress is a line item on the cloud bill, and for write-heavy primaries where the output buffer is the constraint. One caveat shipped alongside it: a fix for memory reported for compressed replication clients being lower than actual consumption — evidence that this is a young code path. Watch <code>client_output_buffer</code> behaviour after upgrading.</p>
<p><strong>I/O thread busy-looping for replica clients</strong> is fixed. If you run with <code>io-threads</code> enabled and have replicas attached, this was burning CPU for nothing.</p>
<p><strong>Full sync under heavy write load</strong> is fixed. Full syncs that coincide with a write burst are exactly the condition under which a replica fails to catch up and re-triggers another full sync — the resync loop that turns a routine replica restart into an incident.</p>
<p>That builds on 8.8, where Redis eliminated RDB checksum computation on diskless transfers on the grounds that the replication link already provides integrity. Redis published a 12 GB full sync on a <code>c8g.2xlarge</code> dropping from 35 seconds to 11 seconds — a 68% reduction — as a result. Redis also reported pipelined <code>SET</code>/<code>HSET</code>/<code>ZADD</code> with an attached replica running 3% to 26% faster after reworking per-write bookkeeping in the replication feed path.</p>
<p>Verify the effect on your own topology rather than trusting the number:</p>
<pre class="EnlighterJSRAW"># Full-sync counters: sync_full should stay flat in steady state.
redis-cli INFO stats | grep -E 'sync_full|sync_partial_ok|sync_partial_err'

# Replica-side lag and link health
redis-cli INFO replication

# Backlog sizing — the single most common cause of avoidable full syncs
redis-cli CONFIG GET repl-backlog-size repl-backlog-ttl
redis-cli CONFIG GET client-output-buffer-limit</pre>
<p>If <code>sync_partial_err</code> is non-zero and <code>sync_full</code> is climbing, your backlog is too small for your write rate and no amount of release upgrading will fix it.</p>
<hr>
<h2>Redis 8.10 performance in context: the 8.4 → 8.10 curve</h2>
<p>Redis 8.10 performance work does not stand alone: the 8.x line has been shipping measurable command-level gains every quarter. The figures below are <strong>Redis’s own published measurements</strong>, not MinervaDB benchmarks. We reproduce them here with their methodology attached because a number without methodology is marketing.</p>
<p><strong>Redis 8.8 vs 8.6</strong> — tested on AWS <code>m7i.metal-24xl</code> (x86) and <code>m8g</code> (ARM Graviton4), identical builds, official OSS spec, multiple runs:</p>
<table>
<thead>
<tr>
<th>Operation</th>
<th>Reported gain</th>
<th>Mechanism</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>MGET</code> (pipelined, I/O threads)</td>
<td>up to 68%</td>
<td>Batched dict-bucket prefetch</td>
</tr>
<tr>
<td><code>MGET</code> (pipelined, single thread)</td>
<td>up to 50%</td>
<td>Memory prefetch framework</td>
</tr>
<tr>
<td><code>HGETALL</code> (1,000-field hashtable hashes)</td>
<td>up to 25%</td>
<td>Cross-command + dict-bucket prefetch</td>
</tr>
<tr>
<td><code>XREADGROUP</code> (<code>COUNT 100</code>)</td>
<td>up to 83%</td>
<td>Radix-tree O(1) append path, last-child-first descent</td>
</tr>
<tr>
<td><code>ZADD</code> / <code>ZINCRBY</code> / <code>ZRANGEBYSCORE</code></td>
<td>up to 74%</td>
<td>Widened Clinger fast path in float parsing</td>
</tr>
<tr>
<td><code>SCAN</code> family (<code>COUNT 500</code>, pipeline 10)</td>
<td>+38.0% x86, +39.7% ARM</td>
<td>Stack-allocated reply vector, zero heap allocations</td>
</tr>
<tr>
<td>Diskless full sync (12 GB)</td>
<td>35s → 11s</td>
<td>RDB checksum elimination on diskless transfer</td>
</tr>
</tbody>
</table>
<p><strong>Redis 8.6 vs 8.4</strong> — single core, <code>m8g.24xlarge</code> (Graviton4):</p>
<table>
<thead>
<tr>
<th>Metric</th>
<th>Reported change</th>
</tr>
</thead>
<tbody>
<tr>
<td>Sorted-set command latency</td>
<td>up to 35% lower</td>
</tr>
<tr>
<td><code>GET</code> on short strings</td>
<td>up to 15% lower</td>
</tr>
<tr>
<td>List command latency</td>
<td>up to 11% lower</td>
</tr>
<tr>
<td>Hash command latency</td>
<td>up to 7% lower</td>
</tr>
<tr>
<td>Hash memory footprint</td>
<td>up to 16.7% smaller</td>
</tr>
<tr>
<td>Sorted-set memory footprint</td>
<td>up to 30.5% smaller</td>
</tr>
<tr>
<td><code>VADD</code> insertion / query</td>
<td>up to 43% / 58% faster (binary and 8-bit quantisation, x86-64)</td>
</tr>
</tbody>
</table>
<p>Redis also reported 3.5M ops/sec on a single node at pipeline depth 16 with 11 I/O threads on <code>m8g.24xlarge</code>, and framed the 8.6 line as 5×+ the caching throughput of Redis 7.2.</p>
<p><strong>How to read these numbers.</strong> Treat them as a ceiling on Redis 8.10 performance, not a forecast. They are single-command microbenchmarks at high pipeline depth on large instances. Real application workloads are dominated by round-trip time, key distribution, value size, and the presence of one pathological command in the mix. The 8.x gains are real and they are free on upgrade — but if your p99 is 8 ms because a <code>KEYS</code> call runs every 30 seconds, no release will help you. That class of problem is what our <a href="https://minervadb.com/redis-performance-troubleshooting/">Redis performance troubleshooting field guide</a> exists to localise, and the <a href="https://minervadb.com/troubleshooting-redis-performance-using-ebpf/">eBPF-based tracing approach</a> is how we get per-operation visibility when <code>SLOWLOG</code> is not enough.</p>
<hr>
<h2>Redis 8.10 reliability fixes that are upgrade drivers on their own</h2>
<p>Read these as security and correctness debt you are carrying if you stay put. Redis 8.10 fixes, among 30+ core items:</p>
<ul>
<li><strong>ACL permission bypass</strong> in <code>SORT</code>, <code>GEORADIUS</code>, <code>GEORADIUSBYMEMBER</code>, <code>XREAD</code> and <code>XREADGROUP</code>. If you rely on ACLs for multi-tenant isolation, this is a confidentiality issue, not a nuisance.</li>
<li><strong>Error-reply manipulation via injected <code>rn</code> sequences</strong> — a protocol-level response-splitting class of bug.</li>
<li><strong>AOF load failure</strong> when the AOF file had an RDB preamble and active defragmentation was enabled. This is a restore-time failure: the worst possible time to discover it.</li>
<li><strong>Division-by-zero</strong> when active-defragmentation thresholds are misconfigured.</li>
<li><strong>Clients left permanently blocked</strong> on <code>BLPOP</code>, <code>BLMOVE</code> or <code>BLMOVEM</code> after a <code>SORT ... STORE</code> replaced the target key.</li>
<li><strong><code>MEMORY USAGE</code> over-reporting</strong>, duplicate KeyMeta restoration during AOF rewrite, and RDB load robustness fixes for streams.</li>
</ul>
<p>Redis 8.8 separately addressed five CVEs (CVE-2026-23479, CVE-2026-25243, CVE-2026-23631, CVE-2026-25588, CVE-2026-25589) covering use-after-free and invalid-memory-access classes. If you are on 8.6 or earlier, you are exposed to all of them.</p>
<p>Verify your ACL surface after upgrading:</p>
<pre class="EnlighterJSRAW">redis-cli ACL LIST
redis-cli ACL GETUSER <username>
redis-cli ACL CAT keyspace</pre>
<hr>
<h2>Bounded replies: the quietest Redis 8.10 reliability win</h2>
<p>Unbounded replies are one of the more common ways a healthy Redis instance takes an application down — a consumer asks for “everything since last offset” after an outage and receives a multi-gigabyte reply that blows the client output buffer. Redis 8.10 adds explicit caps:</p>
<pre class="EnlighterJSRAW"># Cap cumulative entries AND cumulative reply size on stream reads
XREAD MAXCOUNT 5000 MAXSIZE 8388608 STREAMS events $
XREADGROUP GROUP g1 c1 MAXCOUNT 1000 MAXSIZE 1048576 STREAMS events ></pre>
<p>Set these in your consumers now. They are the cheapest reliability change in the release.</p>
<p>Related controls in the same theme:</p>
<ul>
<li><code>SUNIONCARD</code> and <code>SDIFFCARD</code> return set-operation cardinalities <strong>without materialising the result set</strong> — the answer to “how many, roughly” that used to cost a full <code>SUNIONSTORE</code>.</li>
<li><code>slowlog-entry-max-argc</code> and <code>slowlog-entry-max-string-len</code> (8.8) cap what a slowlog entry retains, so a pathological command no longer bloats the slowlog itself.</li>
<li>Redis Search gains a third <code>search-on-timeout</code> mode, <code>RETURN_STRICT</code>, alongside <code>FAIL</code> and the default <code>RETURN</code> — partial results with a strict post-processing timeout, for query paths where an unbounded tail is worse than an incomplete answer.</li>
</ul>
<hr>
<h2>What Redis 8.10 does not change</h2>
<p>Honest edges matter more than feature lists, and three limits bound every Redis 8.10 performance claim above:</p>
<ul>
<li><strong>Command execution is still effectively single-threaded.</strong> I/O threads parallelise socket work, not command execution. One <code>O(N)</code> command on a large collection still stalls every other client. Data-structure and key-design discipline is unchanged — see our notes on <a href="https://minervadb.com/optimizing-redis-for-mixed-read-write-workloads/">optimizing Redis for mixed read/write workloads</a>.</li>
<li><strong>Durability is still a configuration decision, not a default.</strong> <code>appendfsync everysec</code> still means you can lose roughly a second of writes. Redis’s own guidance remains: run AOF <em>and</em> RDB if you want data-safety comparable to a relational engine. <code>BACKUP</code> is a backup mechanism, not a durability upgrade.</li>
<li><strong>Cluster semantics are unchanged.</strong> Cross-slot operations, resharding mechanics and hash-tag design are what they were.</li>
<li><strong>Compact hashes are an encoding, not a schema.</strong> Redis is still schemaless; the template is an internal optimisation you should measure, not a contract you can rely on.</li>
</ul>
<hr>
<h2>Redis 8.10 vs Valkey 9.1: how to read the fork</h2>
<p>Both engines are shipping serious performance work, and both publish numbers on their own hardware with their own methodology. Valkey 9.1 (19 May 2026) reported 2.1M requests/sec on a single server with 512-byte payloads, 9 I/O threads and pipeline depth 10, a new I/O threading model worth up to 17% across workloads, <code>XRANGE</code>/<code>XREVRANGE</code> up to 30% faster, string memory down up to 20% for values under 128 bytes, and TLS certificate hot-reload for rotation without downtime.</p>
<p><strong>These figures are not comparable to Redis’s.</strong> Different instance types, different payload sizes, different pipeline depths, different workload mixes. Anyone presenting a Redis-vs-Valkey throughput ratio derived from the two vendors’ blog posts is doing arithmetic on incompatible inputs.</p>
<p>What is comparable is the decision frame:</p>
<ul>
<li><strong>License.</strong> Valkey is BSD-3-Clause. Redis 8.x is tri-licensed (RSALv2 / SSPLv1 / AGPLv3). For some enterprises this decides the question before any benchmark runs.</li>
<li><strong>Feature surface.</strong> Redis 8.x ships Search, JSON, TimeSeries and Bloom as integral, same-versioned modules. Valkey addresses this through separate BSD modules (<code>valkey-search</code>, <code>valkey-json</code>, <code>valkey-bloom</code>). If you use in-engine search or vectors, this is the axis that matters.</li>
<li><strong>Portability.</strong> Nothing after 7.2.4 should be assumed portable between the two. Verify per feature, per engine, per version. Compact hashes, <code>HIMPORT</code> and the <code>BACKUP</code> family are Redis-only as of this writing.</li>
<li><strong>Managed-service reality.</strong> Your cloud provider’s roadmap may decide this for you regardless of what you prefer.</li>
</ul>
<p>We consult on both and recommend against either when it is the wrong fit. Where vector search is the actual requirement at serious scale, compare honestly against pgvector and Milvus before committing to in-engine vectors at all.</p>
<hr>
<h2>Our upgrade stance (dated: 15 August 2026)</h2>
<p><strong>If you are on Redis 8.8:</strong> upgrade to 8.10 within your normal patch cadence. The ACL bypass fixes and the AOF-with-defrag load failure are the drivers; compact hashes are the bonus. Low risk — 8.8 to 8.10 is an incremental step on the same line.</p>
<p><strong>If you are on Redis 8.6 or 8.4:</strong> upgrade with priority. You are carrying five unpatched CVEs from the 8.8 cycle plus the 8.10 ACL fixes, and you are missing the entire 8.8 prefetch and replication-feed performance work.</p>
<p><strong>If you are on Redis 8.0:</strong> plan now. Security support ends 01 Dec 2026. Treat this as a scheduled project with a restore drill, not a rolling patch.</p>
<p><strong>If you are on Redis 7.2 or 7.4:</strong> the upgrade is a licensing decision as much as a technical one, because it moves you from BSD-3-Clause to the tri-license. Make that call deliberately, with counsel involved, and evaluate Valkey in the same exercise rather than defaulting.</p>
<p><strong>Wait, if:</strong> you depend on a module or client library that has not certified against 8.10; you run a managed service where the version is not yours to choose; or you cannot schedule a restore drill against the new <code>BACKUP</code> path within the change window. In the last case, upgrade anyway but do not cut over your backup procedure until the drill is done.</p>
<h3>Upgrade checklist</h3>
<pre class="EnlighterJSRAW"># --- BEFORE ---
# 1. Capture the baseline. You cannot claim an improvement without one.
redis-cli INFO all > /tmp/pre-upgrade-info.txt
redis-cli CONFIG GET '*'  > /tmp/pre-upgrade-config.txt
redis-cli --latency-history -i 5   # run for one full traffic cycle

# 2. Verify a restore works on the CURRENT version before changing anything.
#    Restore into an isolated instance. Never into production.

# 3. Confirm replica health and backlog sizing.
redis-cli INFO replication
redis-cli INFO stats | grep -E 'sync_full|sync_partial_err'

# --- AFTER (per node, replicas first, then failover, then old primary) ---
redis-cli INFO server   | grep redis_version
redis-cli INFO stats    | grep -E 'hash_templates|hash_template_keys'
redis-cli INFO memory   | grep -E 'used_memory:|used_memory_hash_templates'
redis-cli INFO stats    | grep -E 'sync_full|sync_partial_err'
redis-cli ACL LIST

# 4. Compare against the baseline. Then, and only then, exercise BACKUP.
redis-cli BACKUP START && redis-cli BACKUP STATUS</pre>
<p>Every step above is read-only or additive. Nothing here drops, truncates or flushes anything — and if you adapt these commands, keep it that way. The <code>FLUSHALL</code> in the compact-hash benchmark earlier is scoped to a scratch host on purpose; it has no business anywhere near a production endpoint.</p>
<hr>
<h2>Frequently asked questions</h2>
<p><strong>Does upgrading alone improve Redis 8.10 performance?</strong> Partly. Command-level gains from the 8.6 and 8.8 cycles are free on upgrade, and compact hashes reduce memory without application changes. But if your latency comes from an <code>O(N)</code> command, an oversized value, or an undersized replication backlog, no release fixes it — measure first.</p>
<p><strong>Is Redis 8.10 backward compatible with 8.8?</strong> Yes for the covered surface. The new commands (<code>HIMPORT</code>, <code>BACKUP</code>, <code>LMOVEM</code>, <code>BLMOVEM</code>, <code>SUNIONCARD</code>, <code>SDIFFCARD</code>) are additive, and compact hashes are an internal encoding change — application code does not change. Validate your client library’s support for the new commands before you use them.</p>
<p><strong>Do compact hashes require me to change my application?</strong> No. The encoding is chosen internally. <code>HIMPORT</code> is an optional bulk-load path, useful for migrations and ETL sinks, not a replacement for <code>HSET</code>.</p>
<p><strong>Does the BACKUP command replace RDB and AOF?</strong> No. <code>BACKUP</code> produces a restorable artefact set from the MP-AOF format; it does not change your durability configuration. <code>appendfsync</code> and <code>save</code> still govern what you can lose.</p>
<p><strong>How much memory will compact hashes actually save me?</strong> It depends entirely on how many of your keys share a field layout. Measure it with the A/B procedure above on your own dataset. Anyone quoting you a percentage without seeing your keyspace is guessing.</p>
<p><strong>Is Redis 8.10 open source?</strong> Redis Open Source 8.x is tri-licensed: RSALv2, SSPLv1, or AGPLv3 at the user’s choice. AGPLv3 is OSI-approved; the other two are source-available. We are not lawyers — take licence-compliance questions to counsel.</p>
<p><strong>Should I move to Valkey instead?</strong> It depends on your licence constraints, your dependence on in-engine Search/JSON/TimeSeries, and your managed-service provider’s roadmap. Both are credible. Decide on those three axes, not on vendor throughput headlines.</p>
<hr>
<h2>Working with MinervaDB</h2>
<p>MinervaDB provides vendor-neutral <a href="https://minervadb.com/redis-support/">Redis support and consulting</a> — 24×7 consultative support, remote DBA, performance engineering and HA/DR architecture — as part of our <a href="https://minervadb.com/enterprise-database-management/">full-stack enterprise database practice</a> across PostgreSQL, MySQL, MariaDB, SQL Server, MongoDB, ClickHouse, Cassandra, Redis, Valkey and cloud DBaaS. If you want Redis 8.10 performance and reliability validated on your own estate — the compact-hash saving measured on your keyspace and the <code>BACKUP</code> path validated with a real restore drill before you trust it, that is a scoped engagement we run regularly.</p>
<p>Further reading from our library: the <a href="https://minervadb.com/redis-troubleshooting-cheatsheet/">Redis troubleshooting cheatsheet</a> and the <a href="https://minervadb.com/advanced-redis-operations-cheatsheets/">advanced Redis operations cheatsheet</a>.</p>
<p><strong>Standing caveat:</strong> every configuration change and command in this post must be tested in a non-production environment before it reaches production, and no upgrade should proceed without a verified, drilled DR posture.</p>
<hr>
<h2>Sources</h2>
<ul>
<li><a href="https://redis.io/docs/latest/develop/whats-new/8-10/" target="_blank" rel="noopener noreferrer">Redis 8.10 — What’s new</a></li>
<li><a href="https://raw.githubusercontent.com/redis/redis/8.10/00-RELEASENOTES" target="_blank" rel="noopener noreferrer">Redis Open Source 8.10 release notes (00-RELEASENOTES)</a></li>
<li><a href="https://github.com/redis/redis/releases/tag/8.10.0" target="_blank" rel="noopener noreferrer">Redis 8.10.0 release on GitHub</a></li>
<li><a href="https://redis.io/docs/latest/commands/himport/" target="_blank" rel="noopener noreferrer">HIMPORT command reference</a></li>
<li><a href="https://redis.io/docs/latest/commands/backup/" target="_blank" rel="noopener noreferrer">BACKUP command reference</a></li>
<li><a href="https://redis.io/docs/latest/operate/oss_and_stack/management/persistence/" target="_blank" rel="noopener noreferrer">Redis persistence — online backups with the BACKUP command family</a></li>
<li><a href="https://redis.io/blog/redis-88-performance-improvements-faster-mget-mset-streams-and-more/" target="_blank" rel="noopener noreferrer">Redis 8.8 performance improvements</a></li>
<li><a href="https://redis.io/docs/latest/develop/whats-new/8-8/" target="_blank" rel="noopener noreferrer">Redis 8.8 — What’s new</a></li>
<li><a href="https://redis.io/blog/announcing-redis-86-performance-improvements-streams/" target="_blank" rel="noopener noreferrer">Announcing Redis 8.6: performance improvements and streams enhancements</a></li>
<li><a href="https://redis.io/docs/latest/develop/whats-new/8-6/" target="_blank" rel="noopener noreferrer">Redis 8.6 — What’s new</a></li>
<li><a href="https://redis.io/legal/licenses/" target="_blank" rel="noopener noreferrer">Redis licences (RSALv2 / SSPLv1 / AGPLv3)</a></li>
<li><a href="https://endoflife.date/redis" target="_blank" rel="noopener noreferrer">Redis release and end-of-life dates</a></li>
<li><a href="https://valkey.io/blog/valkey-9-1-delivers-improvements-in-security-performance-and-more/" target="_blank" rel="noopener noreferrer">Valkey 9.1 release announcement</a></li>
</ul>
<p><a href="https://minervadb.com/redis-8-10-performance-reliability/">Redis 8.10 Performance and Reliability: What Actually Changed</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Foundation Advances TAF with HammerDB 6.0 and xt_reservoir Integration</title>
        <link>https://mariadb.org/mariadb-foundation-advances-taf-with-hammerdb-6-0-and-xt_reservoir-integration/</link>
        <pubDate>Fri, 14 Aug 2026 15:48:21 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Overview<br />
While validating MariaDB RSS stability under stored procedure workloads, I ran into unexpected memory growth. The goal was straightforward: confirm that MariaDB was not leaking memory when running TPROC-C stored procedure workloads. …<br />
Continue reading "MariaDB Foundation Advances TAF with HammerDB 6.0 and xt_reservoir Integration"<br />
MariaDB Foundation Advances TAF with HammerDB 6.0 and xt_reservoir Integration appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/mariadb-foundation-advances-taf-with-hammerdb-6-0-and-xt_reservoir-integration/">MariaDB Foundation Advances TAF with HammerDB 6.0 and xt_reservoir Integration</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Overview<br />
While validating MariaDB RSS stability under stored procedure workloads, I ran into unexpected memory growth. The goal was straightforward: confirm that MariaDB was not leaking memory when running TPROC-C stored procedure workloads. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/mariadb-foundation-advances-taf-with-hammerdb-6-0-and-xt_reservoir-integration/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;MariaDB Foundation Advances TAF with HammerDB 6.0 and xt_reservoir Integration&#8221;</span></a></p>
<p><a href="https://mariadb.org/mariadb-foundation-advances-taf-with-hammerdb-6-0-and-xt_reservoir-integration/">MariaDB Foundation Advances TAF with HammerDB 6.0 and xt_reservoir Integration</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
<p><a href="https://mariadb.org/mariadb-foundation-advances-taf-with-hammerdb-6-0-and-xt_reservoir-integration/">MariaDB Foundation Advances TAF with HammerDB 6.0 and xt_reservoir Integration</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Community Server 10.6.28 now available</title>
        <link>https://mariadb.com/resources/blog/mariadb-community-server-10-6-28-now-available/</link>
        <pubDate>Thu, 13 Aug 2026 20:30:08 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>MariaDB is pleased to announce the immediate availability of the MariaDB Community Server 10.6.28 maintenance release. This is the final […]</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-community-server-10-6-28-now-available/">MariaDB Community Server 10.6.28 now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB is pleased to announce the immediate availability of the MariaDB Community Server 10.6.28 maintenance release. This is the final release in the MariaDB 10.6 series. See the release notes and changelog for additional details on this release and visit mariadb.com/downloads to download.</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-community-server-10-6-28-now-available/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/mariadb-community-server-10-6-28-now-available/">MariaDB Community Server 10.6.28 now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Replicating from InnoDB into a DuckDB storage engine</title>
        <link>https://www.percona.com/blog/replicating-from-innodb-into-a-duckdb-storage-engine/</link>
        <pubDate>Thu, 13 Aug 2026 17:23:27 +0000</pubDate>
        <dc:creator>Evgeniy Patlan</dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Our first post showed MySQL 9.7 with one change: mark a table ENGINE=DuckDB and its analytical queries run in DuckDB instead of InnoDB. The question we kept getting after that was about replication. Can you keep a normal InnoDB primary for the writes, and run a replica where the big tables are ENGINE=DuckDB? Then the … Continued<br />
The post Replicating from InnoDB into a DuckDB storage engine appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/replicating-from-innodb-into-a-duckdb-storage-engine/">Replicating from InnoDB into a DuckDB storage engine</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><span>Our first post showed MySQL 9.7 with one change: mark a table ENGINE=DuckDB and its analytical queries run in DuckDB instead of InnoDB. The question we kept getting after that was about replication. Can you keep a normal InnoDB primary for the writes, and run a replica where the big tables are ENGINE=DuckDB? Then the heavy reports run on a column store, and ordinary MySQL replication keeps it current. No export job. No second database to sync by hand.</span></p>
<p><span>So we tried it. The first run failed, and it failed in a way that is easy to miss: the replica took every transaction, reported success, and stored nothing. We tracked down why, fixed it, and the whole test suite passes now. This post is what we tested, how we checked it, the bug we found, and where it stands.</span></p>
<p><span>It’s still an experiment, not production software. The code and the test harness are on GitHub under GPLv2: </span><a href="https://github.com/Percona-Lab/ducksdb-mysql-engine"><span>https://github.com/Percona-Lab/ducksdb-mysql-engine</span></a><span>.</span></p>
<h2><span>Why replicate into DuckDB</span></h2>
<p><span>A DuckDB table on one server is already useful. The analytical queries get fast and the application does not change. But almost nobody runs their reports on the primary – they run them on a replica, so the big scans stay out of the way of the OLTP traffic.</span></p>
<p><span>So the shape of it is simple. The primary stays InnoDB and takes the writes. The replica has the same tables, only marked ENGINE=DuckDB. Row-based replication ships the changes across, the replica writes them into the column store, and the reports run there. You get an analytics replica out of the replication you already run.</span></p>
<p><span>Row events are engine-agnostic on purpose. The primary logs the row changes, not the SQL, and the replica applies them through the storage-engine API. On paper, then, the replica should not care that one side is InnoDB and the other DuckDB. We wanted to see the paper version hold up on a running server.</span></p>
<h2><span>The setup</span></h2>
<p><span>Two containers from the same image, one primary and one replica. It’s all in Docker, so it repeats cleanly.</span></p>
<ul>
<li aria-level="1"><span>Primary: InnoDB, binlog_format=ROW, GTID on.</span></li>
<li aria-level="1"><span>Replica: same server, GTID on, tables made with ENGINE=DuckDB.</span></li>
<li aria-level="1"><span>Replication uses SOURCE_AUTO_POSITION=1.</span></li>
</ul>
<p><span>One thing you have to get right before any data moves. Create the replica tables as ENGINE=DuckDB yourself. A CREATE TABLE … ENGINE=InnoDB on the primary goes into the binlog with the ENGINE word still in it, and the replica runs it exactly as written, so you would end up with an InnoDB table there, not a DuckDB one. There is no automatic mapping. Pre-create the DuckDB tables on the replica, and let the row changes flow into them.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">-- primary (InnoDB)
CREATE TABLE t1 (id BIGINT PRIMARY KEY, region INT, amount DECIMAL(12,2)) ENGINE=InnoDB;

-- replica (same columns, DuckDB)
CREATE TABLE t1 (id BIGINT PRIMARY KEY, region INT, amount DECIMAL(12,2)) ENGINE=DuckDB;</pre>
<p><span>The other rule is a primary key on the replica table. UPDATE and DELETE row events find the row by its old image, and the engine needs the key for that. INSERT works without one, but put a key on it anyway.</span></p>
<p><span>One script drives all of this: bench/tb/07-replication-spike.sh. It starts both containers, wires up replication, runs every scenario below, and prints PASS or FAIL for each.</span></p>
<h2><span>What we tested, and how</span></h2>
<p><span>The part that matters is the checking. Row counts are not enough – the replica can hold the right number of rows and still have the wrong data in them. So after each step the script dumps the whole table on both sides, ordered by primary key, and compares an md5 of the two dumps. One byte off is a FAIL. And rather than sleep between steps, it waits on WAIT_FOR_EXECUTED_GTID_SET(), so the checks do not race the replica.</span></p>
<p><span>Here is what went through it.</span></p>
<p><span>Basic DML. Insert, update a row, delete a row, compared after each one.</span></p>
<p><span>All the column types, in a single wide table: signed and unsigned integers, DECIMAL, DOUBLE, DATE, DATETIME, TIMESTAMP, CHAR, VARCHAR, TEXT, BLOB, a few NULLs, and a unicode string. Insert it, update it, compare byte for byte. Blobs get their own note below.</span></p>
<p><span>DDL. ALTER TABLE ADD COLUMN, ALTER TABLE ADD INDEX, and DROP TABLE against a DuckDB replica table. These arrive as statements. We check that the column shows up, the index shows up, the old rows survive, and the drop removes the table.</span></p>
<p><span>Transactions. A transaction with two inserts and an update has to land on the replica as one unit. A transaction the primary rolls back has to leave nothing behind. We also open a transaction straight on the replica and both roll it back and commit it, to check the engine’s own commit and rollback.</span></p>
<p><span>Bulk load. 5000 rows through LOAD DATA on the primary, has to arrive and match.</span></p>
<p><span>Durability. Two cases, and the second is the hard one.</span></p>
<ul>
<li aria-level="1"><span>Clean restart. Stop the replica properly, write on the primary while it is down, start it again, and see it pick up from its GTID position.</span></li>
</ul>
<ul>
<li aria-level="1"><span>Crash. Apply some rows, then SIGKILL the replica. No clean shutdown, no checkpoint. Bring it back, write more on the primary, and check one exact thing: every row present once. Nothing lost – DuckDB has to replay its write-ahead log when it opens the file – and nothing applied twice, which means the saved position has to line up with the data that actually reached disk.</span></li>
</ul>
<h2><span>The bug: multi-engine transactions lost data</span></h2>
<p><span>The first full run fell down on the wide-table test. Zero rows on the replica, and then everything after it failed too. The applier had stopped with HA_ERR_KEY_NOT_FOUND. It went to UPDATE a row that was not there, because the INSERT before it had returned success and written nothing.</span></p>
<p><span>When a scenario fails, the harness saves the applier error, both server logs, and both schemas. The replica log had the line that mattered:</span></p>
<p><span>[Warning] Combining the storage engines InnoDB and DuckDB is deprecated, but the</span><span><br />
</span><span>statement or transaction updates both the InnoDB table mysql.slave_worker_info and the</span><span><br />
</span><span>DuckDB table rpl.wide.</span></p>
<p><span>That line is the whole thing. A replica does not only write your data. In the same transaction it also writes its own position into InnoDB system tables – mysql.slave_worker_info, the relay-log info, gtid_executed. So every applied transaction touches two engines at once: InnoDB for the position, DuckDB for the data. Two engines means MySQL runs a real two-phase commit: prepare, then commit.</span></p>
<p><span>Our prepare was wrong. It took the open DuckDB transaction, moved it into a registry meant for external XA COMMIT, and cleared the per-connection state. Then commit looked at that state, found it empty, and committed nothing. The position went into InnoDB, the GTID advanced, the binlog moved on, and the DuckDB rows were thrown away. No error anywhere. The replica looked healthy while it dropped every write.</span></p>
<p><span>We cut it down to the smallest case, with no replication at all. One server, one transaction into a DuckDB table and an InnoDB table:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">BEGIN;
INSERT INTO duck VALUES (1,10),(2,20),(3,30);   -- DuckDB
INSERT INTO inno VALUES (1,10),(2,20),(3,30);   -- InnoDB
COMMIT;
-- duck: 0 rows   inno: 3 rows</pre>
<p><span>InnoDB kept its three rows, DuckDB kept none, and COMMIT said it was fine. A DuckDB-only transaction was fine as well, because with one engine MySQL skips the prepare step. It only broke with a second engine in the transaction. And on a replica, that is every transaction.</span></p>
<h2><span>The fix</span></h2>
<p><span>Small change, in the engine’s transaction code. prepare now remembers which prepared transaction belongs to the connection, and commit finishes that one instead of an empty state. External XA is untouched. It went out as v0.2.3.</span></p>
<p><span>With that in place the reproducer keeps three rows in both tables, and the full run comes back clean, crash test included:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">[8]  data integrity: all column types, NULL / unicode / negatives ....... PASS
[9]  DDL replication (ALTER ADD COLUMN / ADD INDEX / DROP) .............. PASS
[10] transactions (atomic commit, rollback, engine commit/rollback) ..... PASS
[11] bulk LOAD DATA on master -> replica ................................ PASS
[12] durability: graceful restart, then SIGKILL crash recovery .......... PASS

VERDICT: PASS=24  FAIL=0</pre>
<p><span>The crash case is the important one. After a SIGKILL in the middle of applying, the replica came back with every committed row exactly once, matching the primary. Committed transactions survive the kill, and the position stays in step with them.</span></p>
<p><span>We left two tests behind so this cannot slip back in quietly: an MTR test, txn_mixed_engine, that runs a mixed DuckDB+InnoDB transaction on every build, and scripts/repro-2pc-dataloss.sh, which you can point at any published image to check it.</span></p>
<h2><span>What works, and what doesn’t yet</span></h2>
<p><span>Where it stands on v0.2.3, for an InnoDB primary feeding a DuckDB replica:</span></p>
<table>
<thead>
<tr>
<th><span>Scenario</span></th>
<th><span>Result</span></th>
</tr>
</thead>
<tbody>
<tr>
<td><span>INSERT / UPDATE / DELETE</span></td>
<td><span>works, content matches</span></td>
</tr>
<tr>
<td><span>All column types (numeric, temporal, string, BLOB, NULL, unicode)</span></td>
<td><span>works</span></td>
</tr>
<tr>
<td><span>ALTER ADD COLUMN / ADD INDEX, DROP TABLE</span></td>
<td><span>works</span></td>
</tr>
<tr>
<td><span>Transaction commit / rollback</span></td>
<td><span>works, atomic</span></td>
</tr>
<tr>
<td><span>Bulk LOAD DATA</span></td>
<td><span>works</span></td>
</tr>
<tr>
<td><span>Graceful restart, resume from GTID</span></td>
<td><span>works</span></td>
</tr>
<tr>
<td><span>SIGKILL crash, no loss / no duplicates</span></td>
<td><span>works</span></td>
</tr>
</tbody>
</table>
<p><span>The things to keep in mind:</span></p>
<ul>
<li aria-level="1"><span>Create the replica tables as ENGINE=DuckDB yourself. A replicated CREATE TABLE keeps the primary’s engine, so it will not turn into DuckDB on its own.</span></li>
</ul>
<ul>
<li aria-level="1"><span>Replica tables need a primary key for UPDATE and DELETE.</span></li>
</ul>
<ul>
<li aria-level="1"><span>The applier goes row by row. That is fine for a normal OLTP change stream. It is not fine for keeping up with a primary that bulk-loads at full speed – the replica will fall behind.</span></li>
</ul>
<ul>
<li aria-level="1"><span>Committed transactions are crash-safe, with one small gap. The engine holds a prepared-but-not-committed transaction in memory only, so a crash in the short window between prepare and commit can lose that single transaction. The applier commits right away, so the window is small, but it is not zero.</span></li>
</ul>
<ul>
<li aria-level="1"><span>Blobs behave differently over replication than through a direct statement. A plain UPDATE of a BLOB or TEXT column has a known limit in the engine and does not apply. Over replication it does apply, because the row event carries a full before-and-after image instead of the shared buffer the direct path uses.</span></li>
</ul>
<p><span>And the obvious one. This is an experiment. It is a functional result from a test harness on small data, not an HA or failover benchmark. We did not test multi-source replication, filters, or a real write rate.</span></p>
<h2><span>Where it stands</span></h2>
<p><span>An InnoDB primary feeding a DuckDB replica works on v0.2.3. Inserts, updates, deletes, every common type, schema changes, transactions, bulk load – they all replicate and match, and it comes back clean from both a graceful restart and a hard kill. The one real bug, silent data loss on every replicated transaction, is found, understood, fixed, and covered by tests.</span></p>
<p><span>It is not production-ready, and we do not treat it as such. But the idea holds up. Point normal MySQL replication at a DuckDB replica, and you get an analytics copy that keeps itself in sync.</span></p>
<p>The post <a href="https://www.percona.com/blog/replicating-from-innodb-into-a-duckdb-storage-engine/">Replicating from InnoDB into a DuckDB storage engine</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/replicating-from-innodb-into-a-duckdb-storage-engine/">Replicating from InnoDB into a DuckDB storage engine</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB 13.1 Feature in Focus: JSON Operators and JSON_TABLE Improvements</title>
        <link>https://mariadb.org/mariadb-13-1-feature-in-focus-json-operators-and-json_table-improvements/</link>
        <pubDate>Thu, 13 Aug 2026 09:45:51 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>JSON support in MariaDB has improved significantly over the years.<br />
We have functions to create JSON documents, extract values, modify objects, inspect arrays, compare documents, and even transform JSON into relational rows using JSON_TABLE(). …<br />
Continue reading "MariaDB 13.1 Feature in Focus: JSON Operators and JSON_TABLE Improvements"<br />
MariaDB 13.1 Feature in Focus: JSON Operators and JSON_TABLE Improvements appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/mariadb-13-1-feature-in-focus-json-operators-and-json_table-improvements/">MariaDB 13.1 Feature in Focus: JSON Operators and JSON_TABLE Improvements</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>JSON support in MariaDB has improved significantly over the years.<br />
We have functions to create JSON documents, extract values, modify objects, inspect arrays, compare documents, and even transform JSON into relational rows using <a href="https://mariadb.com/docs/server/reference/sql-functions/special-functions/json-functions/json_table">JSON_TABLE()</a>. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/mariadb-13-1-feature-in-focus-json-operators-and-json_table-improvements/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;MariaDB 13.1 Feature in Focus: JSON Operators and JSON_TABLE Improvements&#8221;</span></a></p>
<p><a href="https://mariadb.org/mariadb-13-1-feature-in-focus-json-operators-and-json_table-improvements/">MariaDB 13.1 Feature in Focus: JSON Operators and JSON_TABLE Improvements</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
<p><a href="https://mariadb.org/mariadb-13-1-feature-in-focus-json-operators-and-json_table-improvements/">MariaDB 13.1 Feature in Focus: JSON Operators and JSON_TABLE Improvements</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Percona for MongoDB: RHEL 10, Its Derivatives, and Debian 13 – On Both x86_64 and ARM</title>
        <link>https://www.percona.com/blog/percona-for-mongodb-rhel-10-its-derivatives-and-debian-13-on-both-x86_64-and-arm/</link>
        <pubDate>Tue, 11 Aug 2026 12:15:41 +0000</pubDate>
        <dc:creator>Radoslaw Szulgo</dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>We’re happy to announce that Percona Server for MongoDB (PSMDB) 8.0.28-12 extends platform support to RHEL 10 and its derivatives (Oracle Linux 10, Rocky Linux 10, AlmaLinux 10, and other RHEL-compatible distributions) for both x86_64 and ARM (aarch64) architectures. This release also adds support for Debian 13 “Trixie” on x86_64 and ARM64. We’ll continue to … Continued<br />
The post Percona for MongoDB: RHEL 10, Its Derivatives, and Debian 13 – On Both x86_64 and ARM appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/percona-for-mongodb-rhel-10-its-derivatives-and-debian-13-on-both-x86_64-and-arm/">Percona for MongoDB: RHEL 10, Its Derivatives, and Debian 13 – On Both x86_64 and ARM</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><span>We’re happy to announce that </span><b>Percona Server for MongoDB (PSMDB) 8.0.28-12</b><span> extends platform support to </span><b>RHEL 10 and its derivatives</b><span> (Oracle Linux 10, Rocky Linux 10, AlmaLinux 10, and other RHEL-compatible distributions) for both x86_64 and ARM (aarch64) architectures. This release also adds support for </span><b>Debian 13 “Trixie”</b><span> on x86_64 and ARM64. We’ll continue to support that for 8.0, 8.3, and newer releases.</span></p>
<p><span>This is an important step for anyone planning infrastructure refreshes around the latest Linux releases, and it’s especially notable for teams evaluating ARM to cut infrastructure spend without sacrificing performance.</span></p>
<h2><span>What’s new in 8.0.28-12</span></h2>
<p><span>Starting with this release, Percona Server for MongoDB packages are available for:</span></p>
<ul>
<li aria-level="1"><span>RHEL 10 and derivatives like Oracle Linux 10, Rocky Linux 10, AlmaLinux 10 on x86_64 and ARM (aarch64)</span></li>
<li aria-level="1"><span>Debian 13 “Trixie” on x86_64 and ARM64 (aarch64)</span></li>
</ul>
<p><span>Additionally, starting this release, we’ve included Software Bills of Materials (SBOMs) and Vulnerability Exploitability Exchange (VEX) for every release. SBOMs improve software supply chain transparency by documenting the components and dependencies included in a build. They are generated automatically as part of the release pipeline in the industry-standard </span><a href="https://cyclonedx.org/specification/overview/"><span>CycloneDX</span></a><span> format. OpenVEX files are published on GitHub Pages and provide the exploitability status of known vulnerabilities. For comprehensive information, refer to our [documentation](../</span><a href="http://sbom.md/"><span>sbom.md</span></a><span>).</span></p>
<p><span>To learn more, see the full </span><a href="https://docs.percona.com/percona-server-for-mongodb/8.0/release_notes/8.0.28-12.html"><span>release notes of Percona Server for MongoDB 8.0.28-12</span></a><span>.</span></p>
<h2><span>Ahead of upstream on Debian 13</span></h2>
<p><span>As of this writing (August 2026), </span><b>upstream MongoDB Community/Enterprise Server does not yet officially package or support Debian 13</b><span>. Trixie isn’t in MongoDB’s supported platforms list, and the documented community workaround is to install the Debian 12 “Bookworm” build on Trixie hosts, since a native Trixie server build hasn’t landed yet. PSMDB closes that gap now, with native Debian 13 packages rather than a buggy Bookworm build running out-of-distro.</span></p>
<h2><span>Why ARM is worth a serious look for MongoDB workloads</span></h2>
<p><span>We have heard multiple times from you directly, via our forum, or on Reddit about the Interest in ARM for database workloads. Over the last few years, adoption has moved well past the experimental phase to resilient production readiness. Our adoption telemetry data show nearly 3x as many ARM instances over the last 12 months!</span></p>
<p><a href="https://www.percona.com/wp-content/uploads/2026/08/pmm-adoption-arm.png"><img loading="lazy" decoding="async" class="aligncenter wp-image-51629 size-2048x2048" src="https://www.percona.com/wp-content/uploads/2026/08/pmm-adoption-arm-2048x673.png" alt="" width="2048" height="673" srcset="https://www.percona.com/wp-content/uploads/2026/08/pmm-adoption-arm-2048x673.png 2048w, https://www.percona.com/wp-content/uploads/2026/08/pmm-adoption-arm-300x99.png 300w, https://www.percona.com/wp-content/uploads/2026/08/pmm-adoption-arm-1024x336.png 1024w, https://www.percona.com/wp-content/uploads/2026/08/pmm-adoption-arm-768x252.png 768w, https://www.percona.com/wp-content/uploads/2026/08/pmm-adoption-arm-1536x505.png 1536w" sizes="auto, (max-width: 2048px) 100vw, 2048px"></a></p>
<p><span>I can see a number of benefits and reasons why our community users and customers adopted ARM over AMD or Intel CPU architectures:</span></p>
<ul>
<li aria-level="1"><b>Lower infrastructure costs.</b><span> Cloud ARM instances, such as AWS Graviton, are commonly cited as running 20–40% cheaper than comparable x86 instances at similar or better performance (</span><a href="https://sanj.dev/post/arm-vs-x86-cloud-2025/"><span>sanj.dev, “ARM vs x86 Cloud: Which Architecture is Cheaper in 2025?”</span></a><span>), and benchmarking write-ups report up to 60% lower energy consumption for compute-intensive workloads on Graviton compared to x86 equivalents (</span><a href="https://www.nops.io/blog/are-you-missing-out-on-aws-graviton-cost-savings/"><span>nOps, “Are you missing out on AWS Graviton Cost Savings?”</span></a><span>).</span></li>
<li aria-level="1"><b>Competitive, and often better, throughput.</b> <a href="https://www.usage.ai/blogs/aws/reserved-instances/rds/postgresql/graviton-instances/"><span>RDS PostgreSQL Graviton” benchmark analysis</span></a><span> shows Graviton4 delivering up to 40% better performance for OLTP-style workloads versus the previous Graviton3 generation. </span><a href="https://www.velodb.io/blog/apache-doris-achieves-70-better-price-performance"><span>Apache Doris Delivers 70% Better Value on AWS Graviton</span></a><span>. I can see MongoDB database achieving a similar level of performance-to-cost gain. </span></li>
<li aria-level="1"><b>Memory bandwidth is a real differentiator.</b><span> Graviton3’s memory bandwidth (cited at roughly 115–120 GB/s) is reported to significantly outpace typical Intel Xeon configurations (roughly 60–70 GB/s) and AMD EPYC (roughly 80–90 GB/s) in independent comparisons (</span><a href="https://byteiota.com/arm-vs-x86-cloud-2025-performance-cost-benchmark/"><span>byteiota, “ARM vs x86 Cloud: 2025 Performance &#038; Cost Benchmark”</span></a><span>), which matters for memory-hungry workloads like MongoDB’s WiredTiger cache and in-memory working sets.</span></li>
</ul>
<p><i><span>(Note: The above figures come from third-party blogs and vendor case studies rather than peer-reviewed benchmarks. Treat them as directional evidence that ARM is worth evaluating, not a guarantee of results for your specific workload. For the official recommendation based on your workload, reach out to Percona)</span></i></p>
<p><span>Netflix has publicly stated that it saves over $15 million annually after migrating video encoding workloads to Graviton, while also seeing faster processing times, and other large-scale AWS customers have reported double-digit percentage reductions in compute costs after moving meaningful portions of their backend fleets to ARM (</span><a href="https://byteiota.com/arm-vs-x86-cloud-2025-performance-cost-benchmark/"><span>byteiota</span></a><span>; </span><a href="https://sanj.dev/post/arm-vs-x86-cloud-2025/"><span>sanj.dev</span></a><span>).</span></p>
<h2><span>What to watch out for</span></h2>
<p><span>One RHEL 10 detail to keep in mind when planning a migration: Red Hat raised the CPU baseline for x86_64 to the </span><b>x86-64-v3</b><span> microarchitecture level, meaning the processor needs to support instruction sets such as AVX2 (</span><a href="https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/10/html/considerations_in_adopting_rhel_10/architectures"><span>Red Hat, RHEL 10 architecture documentation</span></a><span>; </span><a href="https://vinfrastructure.it/2025/05/red-hat-enterprise-linux-10-0/"><span>vInfrastructure Blog</span></a><span>). On the ARM side, RHEL 10 targets the ARMv8.0-A baseline (</span><a href="https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/10/html/considerations_in_adopting_rhel_10/architectures"><span>Red Hat documentation</span></a><span>). This applies equally to Oracle Linux 10, Rocky Linux 10, and AlmaLinux 10, since they build from the same upstream sources. I highly recommend checking your current infrastructure before planning the move, especially for older bare-metal fleets.</span></p>
<p><span>In general, but especially on ARM, remember that performance is workload-dependent. Some code paths and workloads leaning on x64-specific instruction extensions may not see the same gains as throughput-oriented, multi-threaded workloads on ARM. Benchmarking your own query patterns and index-heavy operations before a full cutover is essential. General benchmarks are a good signal, not a guarantee.</span></p>
<h2><span>Percona can help you get there</span></h2>
<p><span>Migrating a production MongoDB deployment to a different infrastructure is a project with real decision points. There are a number of questions to answer around: Hardware or instance selection, driver and tooling compatibility, benchmarking against your actual workload, and a rollback plan. The Percona Services team helps customers plan and execute exactly this kind of migration. We start from initial architecture assessment and proof-of-concept benchmarking and go through to production cutover and post-migration tuning.</span></p>
<p><span>If you’re weighing a move to ARM, or just want to get onto RHEL 10 or Debian 13 without surprises, </span><a href="https://www.percona.com/about/contact"><span>reach out to Percona</span></a><span> to talk through your environment.</span></p>
<p>The post <a href="https://www.percona.com/blog/percona-for-mongodb-rhel-10-its-derivatives-and-debian-13-on-both-x86_64-and-arm/">Percona for MongoDB: RHEL 10, Its Derivatives, and Debian 13 – On Both x86_64 and ARM</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/percona-for-mongodb-rhel-10-its-derivatives-and-debian-13-on-both-x86_64-and-arm/">Percona for MongoDB: RHEL 10, Its Derivatives, and Debian 13 – On Both x86_64 and ARM</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Making the PostgreSQL Documentation Even Better</title>
        <link>https://www.fromdual.com/blog/postgresql/improve-postgresql-documentation/</link>
        <pubDate>Tue, 11 Aug 2026 06:40:00 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.fromdual.com/aggregator/categories/9/">FromDual: FromDual all (en)</source>
        <description><![CDATA[<p>While working on our project “PostgreSQL for Dolphins and Sea Lions,” I pored over the PostgreSQL documentation on replication.<br />
Since I’m not quite up to speed on this topic yet, I like to look up certain terms (parameters, functions, etc.) every now and then to see exactly what they mean or how they work (RTFM!). That’s exactly why links were originally invented—the very thing that first made Gopher and later the Internet/WWW (http) so popular.<br />
Unfortunately, however, these links are often missing from the documentation in question, which disrupts the flow of reading.<br />
Fortunately, though, PostgreSQL is an open-source project, and contributions are highly encouraged! So instead of just grumbling about the documentation, I could add the missing links myself. But how exactly do I go about doing that in an ecosystem that’s new to me and therefore still a bit unfamiliar? An article by Elizabeth Christensen from Crunchy Data titled Contributing to Postgres 101: A Beginner’s Experience helped me get started.<br />
Since I have absolutely no programming experience myself, I see improving the documentation as a great opportunity to actively contribute to the project and help out…<br />
Improving the PostgreSQL Documentation<br />
The PostgreSQL documentation is stored directly in the server repository. So, first, let’s download the Git repository from the PostgreSQL server:<br />
$ git clone http://git.postgresql.org/git/postgresql.git<br />
The next challenge is finding the right file:<br />
$ cd postgresql/doc/src/sgml<br />
The grep command, in all its forms, comes in handy here:<br />
$ grep -r 'Planning for High Availability' *.sgml<br />
high-availability.sgml: Planning for High Availability<br />
The correct document appears to be high-availability.sgml. The PostgreSQL documentation itself is written in SGML, which is similar to HTML and not particularly difficult to learn.<br />
These SGML files can be easily read and edited using your editor of choice with appropriate code highlighting.<br />
Next, we need to check the individual keywords to see if they’ve already been correctly marked up and, if so, add links to them:</p>
<p>					Keyword<br />
					Markup<br />
					Links</p>
<p>					synchronous_standby_names<br />
					synchronous_standby_names</p>
<p>					archive_command<br />
					archive_command</p>
<p>					archive_library<br />
					archive_library</p>
<p>					synchronous_commit<br />
					synchronous_commit</p>
<p>					pg_receivewal<br />
					pg_receivewal</p>
<p>					pg_recvlogical<br />
					pg_recvlogical</p>
<p>					pg_backup_stop<br />
					pg_backup_stop()<br />
					pg_backup_stop()</p>
<p>					pg_backup_start<br />
					pg_backup_start()<br />
					pg_backup_start()</p>
<p>					pg_switch_wal<br />
					pg_switch_wal()<br />
					pg_switch_wal()</p>
<p>Note: Keep in mind that keywords are written with an “_” (underscore) and links with a “-” (hyphen).<br />
While building the documentation, it was also noticed that some link targets (id) hadn’t been set at all, so these had to be adjusted as well:</p>
<p>-<br />
+ </p>
<p> pg_backup_start<br />
Quality Assurance<br />
Once all changes have been made, it’s time for quality control. To do this, build the documentation locally:<br />
$ cd postgresql<br />
$ ./configure<br />
$ cd doc<br />
$ make<br />
Exact details on how this works are described here.<br />
If the build finds any errors, they will be displayed and the build will be aborted. If everything runs smoothly, you can now use your browser of choice to check whether everything actually works as intended:<br />
$ firefox src/sgml/html/warm-standby.html<br />
Something else I discovered later:</p>
<p>Building the documentation can take very long. But there is a method to just check the correct syntax of the documentation files, which only takes a few seconds: [ 5 ]</p>
<p>$ make check<br />
make -C ../src/backend generated-headers<br />
make[1]: Entering directory '/home/oli/fromdual/postgresql/docu/postgresql/src/backend'<br />
make -C ../include/catalog generated-headers<br />
make[2]: Entering directory '/home/oli/fromdual/postgresql/docu/postgresql/src/include/catalog'<br />
make[2]: Nothing to be done for 'generated-headers'.<br />
make[2]: Leaving directory '/home/oli/fromdual/postgresql/docu/postgresql/src/include/catalog'<br />
make -C nodes generated-header-symlinks<br />
make[2]: Entering directory '/home/oli/fromdual/postgresql/docu/postgresql/src/backend/nodes'<br />
make[2]: Nothing to be done for 'generated-header-symlinks'.<br />
make[2]: Leaving directory '/home/oli/fromdual/postgresql/docu/postgresql/src/backend/nodes'<br />
make -C utils generated-header-symlinks<br />
make[2]: Entering directory '/home/oli/fromdual/postgresql/docu/postgresql/src/backend/utils'<br />
make -C adt jsonpath_gram.h<br />
make[3]: Entering directory '/home/oli/fromdual/postgresql/docu/postgresql/src/backend/utils/adt'<br />
make[3]: 'jsonpath_gram.h' is up to date.<br />
make[3]: Leaving directory '/home/oli/fromdual/postgresql/docu/postgresql/src/backend/utils/adt'<br />
make[2]: Leaving directory '/home/oli/fromdual/postgresql/docu/postgresql/src/backend/utils'<br />
make[1]: Leaving directory '/home/oli/fromdual/postgresql/docu/postgresql/src/backend'<br />
rm -rf '/home/oli/fromdual/postgresql/docu/postgresql'/tmp_install<br />
/usr/bin/mkdir -p '/home/oli/fromdual/postgresql/docu/postgresql'/tmp_install/log<br />
make -C '..' DESTDIR='/home/oli/fromdual/postgresql/docu/postgresql'/tmp_install install >'/home/oli/fromdual/postgresql/docu/postgresql'/tmp_install/log/install.log 2 >&#038;1<br />
make -j1 checkprep > >'/home/oli/fromdual/postgresql/docu/postgresql'/tmp_install/log/install.log 2 >&#038;1<br />
PATH="/home/oli/fromdual/postgresql/docu/postgresql/tmp_install/usr/local/pgsql/bin:/home/oli/fromdual/postgresql/docu/postgresql/doc:$PATH" LD_LIBRARY_PATH="/home/oli/fromdual/postgresql/docu/postgresql/tmp_install/usr/local/pgsql/lib:$LD_LIBRARY_PATH" INITDB_TEMPLATE='/home/oli/fromdual/postgresql/docu/postgresql'/tmp_install/initdb-template initdb --auth trust --no-sync --no-instructions --lc-messages=C --no-clean '/home/oli/fromdual/postgresql/docu/postgresql'/tmp_install/initdb-template > >'/home/oli/fromdual/postgresql/docu/postgresql'/tmp_install/log/initdb-template.log 2 >&#038;1<br />
Submitting the Patch<br />
If everything works as intended and to your satisfaction, you can then proceed to create the patch and submit it:<br />
$ git commit -m 'some references on variables and functions added'<br />
$ git format-patch -1 HEAD<br />
This creates a file containing the commit comment: 0001-some-references-on-variables-and-functions-added.patch.<br />
Apparently, in the PostgreSQL project, you don’t create a merge request to incorporate the patch back into the source code; instead, the patch must be sent to the appropriate mailing list and then merged into the main branch by a developer with merge/commit privileges. I’ve now agreed with “my” committer that we’ll hold the discussion about my patch on the pgsql-docs mailing list.<br />
Let’s see how things go from here and how far I get with my patch…<br />
This page was translated using deepl.com.</p>
<p><a href="https://www.fromdual.com/blog/postgresql/improve-postgresql-documentation/">Making the PostgreSQL Documentation Even Better</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>While working on our project “PostgreSQL for Dolphins and Sea Lions,” I pored over the PostgreSQL documentation on <a href="https://www.postgresql.org/docs/current/warm-standby.html" target="_blank" title="Log-Shipping Standby Servers">replication</a>.</p>
<p>Since I’m not quite up to speed on this topic yet, I like to look up certain terms (parameters, functions, etc.) every now and then to see exactly what they mean or how they work (<a href="https://en.wikipedia.org/wiki/RTFM" target="_blank">RTFM</a>!). That’s exactly why <strong>links</strong> were originally invented—the very thing that first made <a href="https://en.wikipedia.org/wiki/Gopher_(protocol)" target="_blank">Gopher</a> and later the Internet/WWW (http) so popular.</p>
<p>Unfortunately, however, these links are often missing from the documentation in question, which disrupts the flow of reading.</p>
<p>Fortunately, though, PostgreSQL is an open-source project, and contributions are highly encouraged! So instead of just grumbling about the documentation, I could add the missing links myself. But how exactly do I go about doing that in an ecosystem that’s new to me and therefore still a bit unfamiliar? An article by Elizabeth Christensen from Crunchy Data titled <a href="https://www.crunchydata.com/blog/contributing-to-postgres-101-a-beginners-experience" target="_blank">Contributing to Postgres 101: A Beginner&rsquo;s Experience</a> helped me get started.</p>
<p>Since I have absolutely no programming experience myself, I see improving the documentation as a great opportunity to actively contribute to the project and help out…</p>
<h2 id="improving-the-postgresql-documentation">Improving the PostgreSQL Documentation</h2>
<p>The PostgreSQL documentation is stored directly in the server repository. So, first, let’s download the Git repository from the PostgreSQL server:</p>
<pre><code>$ git clone http://git.postgresql.org/git/postgresql.git
</code></pre>
<p>The next challenge is finding the right file:</p>
<pre><code>$ cd postgresql/doc/src/sgml
</code></pre>
<p>The <code>grep</code> command, in all its forms, comes in handy here:</p>
<pre><code>$ grep -r &#039;Planning for High Availability&#039; *.sgml
high-availability.sgml: &lt;title&gt;Planning for High Availability&lt;/title&gt;
</code></pre>
<p>The correct document appears to be <code>high-availability.sgml</code>. The PostgreSQL documentation itself is written in <a href="https://en.wikipedia.org/wiki/Standard_Generalized_Markup_Language" target="_blank">SGML</a>, which is similar to HTML and not particularly difficult to learn.</p>
<p>These SGML files can be easily read and edited using your editor of choice with appropriate code highlighting.</p>
<p>Next, we need to check the individual keywords to see if they’ve already been correctly marked up and, if so, add links to them:</p>
<table>
<thead>
<tr>
<th>Keyword</th>
<th>Markup</th>
<th>Links</th>
</tr>
</thead>
<tbody>
<tr>
<td>synchronous_standby_names</td>
<td><b>&lt;varname&gt;</b>synchronous_standby_names<b>&lt;/varname&gt;</b></td>
<td>&lt;xref linkend=&quot;<strong>guc-synchronous-standby-names</strong>&quot;/&gt;</td>
</tr>
<tr>
<td>archive_command</td>
<td><b>&lt;varname&gt;</b>archive_command<b>&lt;/varname&gt;</b></td>
<td>&lt;xref linkend=&quot;<strong>guc-archive-command</strong>&quot;/&gt;</td>
</tr>
<tr>
<td>archive_library</td>
<td><b>&lt;varname&gt;</b>archive_library<b>&lt;/varname&gt;</b></td>
<td>&lt;xref linkend=&quot;<strong>guc-archive-library</strong>&quot;/&gt;</td>
</tr>
<tr>
<td>synchronous_commit</td>
<td><b>&lt;varname&gt;</b>synchronous_commit<b>&lt;/varname&gt;</b></td>
<td>&lt;xref linkend=&quot;<strong>guc-synchronous-commit</strong>&quot;/&gt;</td>
</tr>
<tr>
<td>pg_receivewal</td>
<td><b>&lt;command&gt;</b>pg_receivewal<b>&lt;/command&gt;</b></td>
<td>&lt;xref linkend=&quot;<strong>app-pgreceivewal</strong>&quot;/&gt;</td>
</tr>
<tr>
<td>pg_recvlogical</td>
<td><b>&lt;command&gt;</b>pg_recvlogical<b>&lt;/command&gt;</b></td>
<td>&lt;xref linkend=&quot;<strong>app-pgrecvlogical</strong>&quot;/&gt;</td>
</tr>
<tr>
<td>pg_backup_stop</td>
<td><b>&lt;function&gt;</b>pg_backup_stop()<b>&lt;/function&gt;</b></td>
<td><b>&lt;link linkend=&ldquo;pg-backup-stop&rdquo;&gt;</b>&lt;function&gt;pg_backup_stop()&lt;/function&gt;<b>&lt;/link&gt;</b></td>
</tr>
<tr>
<td>pg_backup_start</td>
<td><b>&lt;function&gt;</b>pg_backup_start()<b>&lt;/function&gt;</b></td>
<td><b>&lt;link linkend=&ldquo;pg-backup-start&rdquo;&gt;</b>&lt;function&gt;pg_backup_start()&lt;/function&gt;<b>&lt;/link&gt;</b></td>
</tr>
<tr>
<td>pg_switch_wal</td>
<td><b>&lt;function&gt;</b>pg_switch_wal()<b>&lt;/function&gt;</b></td>
<td><b>&lt;link linkend=&ldquo;pg_switch_wal&rdquo;&gt;</b>&lt;function&gt;pg_switch_wal()&lt;/function&gt;<b>&lt;/link&gt;</b></td>
</tr>
</tbody>
</table>
<p><strong>Note</strong>: Keep in mind that keywords are written with an “_” (underscore) and links with a “-” (hyphen).</p>
<p>While building the documentation, it was also noticed that some link targets (<code>id</code>) hadn’t been set at all, so these had to be adjusted as well:</p>
<pre><code> &lt;row&gt;
- &lt;entry role=&#034;func_table_entry&#034;&gt;&lt;para role=&#034;func_signature&#034;&gt;
+ &lt;entry id=&#034;pg-backup-start&#034; role=&#034;func_table_entry&#034;&gt;&lt;para role=&#034;func_signature&#034;&gt;
 &lt;indexterm&gt;
 &lt;primary&gt;pg_backup_start&lt;/primary&gt;
</code></pre>
<h2 id="quality-assurance">Quality Assurance</h2>
<p>Once all changes have been made, it’s time for quality control. To do this, build the documentation locally:</p>
<pre><code>$ cd postgresql
$ ./configure
$ cd doc
$ make
</code></pre>
<p>Exact details on how this works are described <a href="https://www.postgresql.org/docs/18/docguide-build.html" target="_blank" title="Building the Documentation with Make">here</a>.</p>
<p>If the build finds any errors, they will be displayed and the build will be aborted. If everything runs smoothly, you can now use your browser of choice to check whether everything actually works as intended:</p>
<pre><code>$ firefox src/sgml/html/warm-standby.html
</code></pre>
<p>Something else I discovered later:</p>
<blockquote>
<p>Building the documentation can take very long. But there is a method to just check the correct syntax of the documentation files, which only takes a few seconds: [ <a href="https://www.postgresql.org/docs/18/docguide-build.html#DOCGUIDE-BUILD-SYNTAX-CHECK" target="_blank" title="Syntax Check">5</a> ]</p>
</blockquote>
<pre><code>$ make check
make -C ../src/backend generated-headers
make[1]: Entering directory &#039;/home/oli/fromdual/postgresql/docu/postgresql/src/backend&#039;
make -C ../include/catalog generated-headers
make[2]: Entering directory &#039;/home/oli/fromdual/postgresql/docu/postgresql/src/include/catalog&#039;
make[2]: Nothing to be done for &#039;generated-headers&#039;.
make[2]: Leaving directory &#039;/home/oli/fromdual/postgresql/docu/postgresql/src/include/catalog&#039;
make -C nodes generated-header-symlinks
make[2]: Entering directory &#039;/home/oli/fromdual/postgresql/docu/postgresql/src/backend/nodes&#039;
make[2]: Nothing to be done for &#039;generated-header-symlinks&#039;.
make[2]: Leaving directory &#039;/home/oli/fromdual/postgresql/docu/postgresql/src/backend/nodes&#039;
make -C utils generated-header-symlinks
make[2]: Entering directory &#039;/home/oli/fromdual/postgresql/docu/postgresql/src/backend/utils&#039;
make -C adt jsonpath_gram.h
make[3]: Entering directory &#039;/home/oli/fromdual/postgresql/docu/postgresql/src/backend/utils/adt&#039;
make[3]: &#039;jsonpath_gram.h&#039; is up to date.
make[3]: Leaving directory &#039;/home/oli/fromdual/postgresql/docu/postgresql/src/backend/utils/adt&#039;
make[2]: Leaving directory &#039;/home/oli/fromdual/postgresql/docu/postgresql/src/backend/utils&#039;
make[1]: Leaving directory &#039;/home/oli/fromdual/postgresql/docu/postgresql/src/backend&#039;
rm -rf &#039;/home/oli/fromdual/postgresql/docu/postgresql&#039;/tmp_install
/usr/bin/mkdir -p &#039;/home/oli/fromdual/postgresql/docu/postgresql&#039;/tmp_install/log
make -C &#039;..&#039; DESTDIR=&#039;/home/oli/fromdual/postgresql/docu/postgresql&#039;/tmp_install install &gt;&#039;/home/oli/fromdual/postgresql/docu/postgresql&#039;/tmp_install/log/install.log 2&gt;&amp;1
make -j1 checkprep &gt;&gt;&#039;/home/oli/fromdual/postgresql/docu/postgresql&#039;/tmp_install/log/install.log 2&gt;&amp;1
PATH=&#034;/home/oli/fromdual/postgresql/docu/postgresql/tmp_install/usr/local/pgsql/bin:/home/oli/fromdual/postgresql/docu/postgresql/doc:$PATH&#034; LD_LIBRARY_PATH=&#034;/home/oli/fromdual/postgresql/docu/postgresql/tmp_install/usr/local/pgsql/lib:$LD_LIBRARY_PATH&#034; INITDB_TEMPLATE=&#039;/home/oli/fromdual/postgresql/docu/postgresql&#039;/tmp_install/initdb-template initdb --auth trust --no-sync --no-instructions --lc-messages=C --no-clean &#039;/home/oli/fromdual/postgresql/docu/postgresql&#039;/tmp_install/initdb-template &gt;&gt;&#039;/home/oli/fromdual/postgresql/docu/postgresql&#039;/tmp_install/log/initdb-template.log 2&gt;&amp;1
</code></pre>
<h2 id="submitting-the-patch">Submitting the Patch</h2>
<p>If everything works as intended and to your satisfaction, you can then proceed to create the patch and submit it:</p>
<pre><code>$ git commit -m &#039;some references on variables and functions added&#039;
$ git format-patch -1 HEAD
</code></pre>
<p>This creates a file containing the commit comment: <code>0001-some-references-on-variables-and-functions-added.patch</code>.</p>
<p>Apparently, in the PostgreSQL project, you don’t create a merge request to incorporate the patch back into the source code; instead, the patch must be sent to the appropriate mailing list and then merged into the main branch by a developer with merge/commit privileges. I’ve now agreed with “my” committer that we’ll hold the discussion about my patch on the <a href="https://www.postgresql.org/list/pgsql-docs/" target="_blank">pgsql-docs</a> mailing list.</p>
<p>Let’s see how things go from here and how far I get with my patch…</p>
<p>This page was translated using <a href="https://www.deepl.com/en/translator" target="_blank">deepl.com</a>.</p>
<p><a href="https://www.fromdual.com/blog/postgresql/improve-postgresql-documentation/">Making the PostgreSQL Documentation Even Better</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Fractional Chief Data Officer: 7 Proven Real-Time Analytics Wins</title>
        <link>https://minervadb.com/fractional-chief-data-officer-real-time-analytics/</link>
        <pubDate>Mon, 10 Aug 2026 12:49:06 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/fractional-chief-data-officer-7-proven-real-time-analytics-wins/</guid>
        <source url="https://minervadb.com/">The Data Transformation Company</source>
        <description><![CDATA[<p>A Fractional Chief Data Officer from MinervaDB gives an enterprise board-level data leadership — strategy, architecture, governance and operations — on a part-time, fixed-fee basis. When that mandate is pointed squarely at real-time analytics, the [...]</p>
<p><a href="https://minervadb.com/fractional-chief-data-officer-real-time-analytics/">Fractional Chief Data Officer: 7 Proven Real-Time Analytics Wins</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<div class="mdb-wrap">
<p class="mdb-lede">A <strong>Fractional Chief Data Officer</strong> from MinervaDB gives an enterprise board-level data leadership — strategy, architecture, governance and operations — on a part-time, fixed-fee basis. When that mandate is pointed squarely at <strong>real-time analytics</strong>, the role stops being an organisational nicety and becomes a profit-and-loss instrument: it determines how quickly your business can see an event, decide on it, and act before the opportunity decays.</p>
<p>This article is deliberately written to be read by five different people at the same table. The CEO will find the commercial thesis. The CTO will find the reference architecture, the latency budget and the engineering standards. The CFO will find unit economics, total cost of ownership and payback. The board and investors will find the governance, risk and diligence position. All five are looking at the same estate; a <a href="https://minervadb.com/fractional-chief-data-officer/">Fractional Chief Data Officer</a> exists to make sure they are looking at the same numbers.</p>
<div class="mdb-kpi">
<div><b>900 ms</b><span>Typical end-to-end P99 target we design real-time pipelines to hold</span></div>
<div><b>40–60%</b><span>Analytical cost per terabyte scanned recovered in the first two quarters</span></div>
<div><b>< 2 weeks</b><span>Time to a productive Fractional Chief Data Officer contribution</span></div>
<div><b>2–8 days</b><span>Executive commitment per month, fixed fee, thirty-day exit</span></div>
</div>
<div class="mdb-toc">
<p>What this article covers</p>
<ol>
<li><a href="https://minervadb.com/fractional-chief-data-officer-real-time-analytics/#real-time-board">Why real-time analytics became a board-level question</a></li>
<li><a href="https://minervadb.com/fractional-chief-data-officer-real-time-analytics/#what-cdo-owns">What a Fractional Chief Data Officer owns in a real-time estate</a></li>
<li><a href="https://minervadb.com/fractional-chief-data-officer-real-time-analytics/#latency-budget">The latency budget: milliseconds as a managed asset</a></li>
<li><a href="https://minervadb.com/fractional-chief-data-officer-real-time-analytics/#decision-decay">Decision decay: the economic case for real-time</a></li>
<li><a href="https://minervadb.com/fractional-chief-data-officer-real-time-analytics/#seven-wins">Seven proven wins</a></li>
<li><a href="https://minervadb.com/fractional-chief-data-officer-real-time-analytics/#technical-blueprint">The technical blueprint for the CTO</a></li>
<li><a href="https://minervadb.com/fractional-chief-data-officer-real-time-analytics/#unit-economics">Unit economics for the CFO</a></li>
<li><a href="https://minervadb.com/fractional-chief-data-officer-real-time-analytics/#governance-diligence">Governance, risk and diligence for the board and investors</a></li>
<li><a href="https://minervadb.com/fractional-chief-data-officer-real-time-analytics/#first-90-days">The first 90 days</a></li>
<li><a href="https://minervadb.com/fractional-chief-data-officer-real-time-analytics/#scorecard">The executive scorecard</a></li>
<li><a href="https://minervadb.com/fractional-chief-data-officer-real-time-analytics/#engagement-models">Engagement models and commercials</a></li>
<li><a href="https://minervadb.com/fractional-chief-data-officer-real-time-analytics/#comparison">Fractional versus full-time versus advisory</a></li>
<li><a href="https://minervadb.com/fractional-chief-data-officer-real-time-analytics/#faq">Frequently asked questions</a></li>
</ol>
</div>
<h2>Why Real-Time Analytics Became a Board-Level Question</h2>
<p>For most of the last decade, analytics was a reporting function. Data landed overnight, a warehouse transformed it, and the business read yesterday. That model is no longer competitive in any market where price, inventory, credit, fraud, capacity or customer intent move within the trading day. The shift is not technological fashion. It is a change in where margin is created.</p>
<p>Real-time analytics changes three things a board cares about. It shortens the interval between an event and a decision, which is where most recoverable value sits. It exposes operational truth continuously rather than in a monthly pack, which changes the quality of governance. And it converts analytics from a fixed reporting cost into a variable, attributable one — which is precisely why it needs an owner with executive authority, not a project team.</p>
<p>That owner is the problem. Streaming estates fail commercially far more often than they fail technically. Pipelines get built, dashboards refresh in seconds, and the organisation still argues about which revenue number is correct, still cannot attribute the cloud bill, and still cannot show an auditor where personal data flows. A <strong>Fractional Chief Data Officer</strong> is the corrective: one accountable executive who holds strategy, architecture, cost and compliance together across the entire real-time path.</p>
<div class="mdb-note"><strong>In one sentence.</strong> A Fractional Chief Data Officer converts a fast but ungoverned data estate into a governed, measurable, commercially useful real-time asset — at a fraction of the cost of a permanent executive, and with none of the hiring risk.</div>
<h2>What a Fractional Chief Data Officer Owns in a Real-Time Analytics Estate</h2>
<p>Real-time analytics is a chain, and a chain is owned end to end or not at all. The diagram below is the path an event travels from the moment it is committed in a system of record to the moment a human or a model acts on it. Every hop in that path has a latency cost, a failure mode, a cost line and a compliance implication. The Fractional Chief Data Officer owns all four dimensions across every hop.</p>
<div class="mdb-fig"><svg viewbox="0 0 1000 240" width="100%" role="img" aria-label="Animated diagram of the real-time analytics pipeline a Fractional Chief Data Officer governs, from change data capture through Kafka and Flink to ClickHouse and the decision surface" xmlns="http://www.w3.org/2000/svg"><defs><lineargradient x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#38bdf8"></stop><stop offset="0.5" stop-color="#818cf8"></stop><stop offset="1" stop-color="#a78bfa"></stop></lineargradient><filter x="-80%" y="-80%" width="260%" height="260%"><fegaussianblur stddeviation="4" result="b"></fegaussianblur><femerge><femergenode in="b"></femergenode><femergenode in="SourceGraphic"></femergenode></femerge></filter><path d="M155 107 H845" fill="none"></path></defs><rect x="0" y="0" width="1000" height="240" rx="12" fill="#0b1220"></rect><rect x="315" y="10" width="370" height="30" rx="15" fill="#0ea5e9"><animate attributename="opacity" values="0.12;0.34;0.12" dur="2.4s" repeatcount="indefinite"></animate></rect><text x="500" y="30" text-anchor="middle" font-size="12.5" font-weight="700" letter-spacing="1.2" fill="#7dd3fc" font-family="Helvetica,Arial,sans-serif">END-TO-END P99 LATENCY BUDGET · 900 ms</text><line x1="155" y1="107" x2="845" y2="107" stroke="#1e3a5f" stroke-width="5" stroke-linecap="round"></line><line x1="155" y1="107" x2="845" y2="107" stroke="url(#mdbGA)" stroke-width="2.5" stroke-dasharray="10 16"><animate attributename="stroke-dashoffset" from="52" to="0" dur="1.1s" repeatcount="indefinite"></animate></line><circle r="6" fill="#38bdf8" filter="url(#mdbGlowA)"><animatemotion dur="4.5s" begin="0s" repeatcount="indefinite"><mpath href="#mdbPathA" xlink:href="#mdbPathA"></mpath></animatemotion></circle><circle r="6" fill="#818cf8" filter="url(#mdbGlowA)"><animatemotion dur="4.5s" begin="0.9s" repeatcount="indefinite"><mpath href="#mdbPathA" xlink:href="#mdbPathA"></mpath></animatemotion></circle><circle r="6" fill="#a78bfa" filter="url(#mdbGlowA)"><animatemotion dur="4.5s" begin="1.8s" repeatcount="indefinite"><mpath href="#mdbPathA" xlink:href="#mdbPathA"></mpath></animatemotion></circle><circle r="6" fill="#38bdf8" filter="url(#mdbGlowA)"><animatemotion dur="4.5s" begin="2.7s" repeatcount="indefinite"><mpath href="#mdbPathA" xlink:href="#mdbPathA"></mpath></animatemotion></circle><circle r="6" fill="#818cf8" filter="url(#mdbGlowA)"><animatemotion dur="4.5s" begin="3.6s" repeatcount="indefinite"><mpath href="#mdbPathA" xlink:href="#mdbPathA"></mpath></animatemotion></circle><g font-family="Helvetica,Arial,sans-serif"><g><rect x="15" y="60" width="140" height="95" rx="14" fill="#122b45" stroke="url(#mdbGA)" stroke-width="1.5"></rect><text x="85" y="84" text-anchor="middle" font-size="11" font-weight="700" fill="#e2e8f0">SYSTEMS OF</text><text x="85" y="97" text-anchor="middle" font-size="11" font-weight="700" fill="#e2e8f0">RECORD</text><text x="85" y="113" text-anchor="middle" font-size="9.5" fill="#94a3b8">PostgreSQL · MySQL</text><rect x="49" y="122" width="72" height="20" rx="10" fill="#0ea5e9" opacity="0.2"></rect><text x="85" y="136" text-anchor="middle" font-size="10.5" font-weight="700" fill="#7dd3fc">commit</text></g><g><rect x="181" y="60" width="140" height="95" rx="14" fill="#122b45" stroke="url(#mdbGA)" stroke-width="1.5"></rect><text x="251" y="84" text-anchor="middle" font-size="11" font-weight="700" fill="#e2e8f0">CHANGE DATA</text><text x="251" y="97" text-anchor="middle" font-size="11" font-weight="700" fill="#e2e8f0">CAPTURE</text><text x="251" y="113" text-anchor="middle" font-size="9.5" fill="#94a3b8">Debezium · logical WAL</text><rect x="215" y="122" width="72" height="20" rx="10" fill="#0ea5e9" opacity="0.2"></rect><text x="251" y="136" text-anchor="middle" font-size="10.5" font-weight="700" fill="#7dd3fc">~120 ms</text></g><g><rect x="347" y="60" width="140" height="95" rx="14" fill="#122b45" stroke="url(#mdbGA)" stroke-width="1.5"></rect><text x="417" y="84" text-anchor="middle" font-size="11" font-weight="700" fill="#e2e8f0">EVENT</text><text x="417" y="97" text-anchor="middle" font-size="11" font-weight="700" fill="#e2e8f0">BACKBONE</text><text x="417" y="113" text-anchor="middle" font-size="9.5" fill="#94a3b8">Apache Kafka</text><rect x="381" y="122" width="72" height="20" rx="10" fill="#0ea5e9" opacity="0.2"></rect><text x="417" y="136" text-anchor="middle" font-size="10.5" font-weight="700" fill="#7dd3fc">~80 ms</text></g><g><rect x="513" y="60" width="140" height="95" rx="14" fill="#122b45" stroke="url(#mdbGA)" stroke-width="1.5"></rect><text x="583" y="84" text-anchor="middle" font-size="11" font-weight="700" fill="#e2e8f0">STREAM</text><text x="583" y="97" text-anchor="middle" font-size="11" font-weight="700" fill="#e2e8f0">PROCESSING</text><text x="583" y="113" text-anchor="middle" font-size="9.5" fill="#94a3b8">Apache Flink</text><rect x="547" y="122" width="72" height="20" rx="10" fill="#0ea5e9" opacity="0.2"></rect><text x="583" y="136" text-anchor="middle" font-size="10.5" font-weight="700" fill="#7dd3fc">~150 ms</text></g><g><rect x="679" y="60" width="140" height="95" rx="14" fill="#122b45" stroke="url(#mdbGA)" stroke-width="1.5"></rect><text x="749" y="84" text-anchor="middle" font-size="11" font-weight="700" fill="#e2e8f0">REAL-TIME</text><text x="749" y="97" text-anchor="middle" font-size="11" font-weight="700" fill="#e2e8f0">STORE</text><text x="749" y="113" text-anchor="middle" font-size="9.5" fill="#94a3b8">ClickHouse · Druid</text><rect x="713" y="122" width="72" height="20" rx="10" fill="#0ea5e9" opacity="0.2"></rect><text x="749" y="136" text-anchor="middle" font-size="10.5" font-weight="700" fill="#7dd3fc">~200 ms</text></g><g><rect x="845" y="60" width="140" height="95" rx="14" fill="#122b45" stroke="url(#mdbGA)" stroke-width="1.5"></rect><text x="915" y="84" text-anchor="middle" font-size="11" font-weight="700" fill="#e2e8f0">DECISION</text><text x="915" y="97" text-anchor="middle" font-size="11" font-weight="700" fill="#e2e8f0">SURFACE</text><text x="915" y="113" text-anchor="middle" font-size="9.5" fill="#94a3b8">BI · API · ML</text><rect x="879" y="122" width="72" height="20" rx="10" fill="#0ea5e9" opacity="0.2"></rect><text x="915" y="136" text-anchor="middle" font-size="10.5" font-weight="700" fill="#7dd3fc">~350 ms</text></g><polygon points="163,101 173,107 163,113" fill="#38bdf8"></polygon><polygon points="329,101 339,107 329,113" fill="#38bdf8"></polygon><polygon points="495,101 505,107 495,113" fill="#818cf8"></polygon><polygon points="661,101 671,107 661,113" fill="#818cf8"></polygon><polygon points="827,101 837,107 827,113" fill="#a78bfa"></polygon><line x1="85" y1="155" x2="85" y2="175" stroke="#1e3a5f" stroke-width="1.5" stroke-dasharray="3 3"></line><line x1="251" y1="155" x2="251" y2="175" stroke="#1e3a5f" stroke-width="1.5" stroke-dasharray="3 3"></line><line x1="417" y1="155" x2="417" y2="175" stroke="#1e3a5f" stroke-width="1.5" stroke-dasharray="3 3"></line><line x1="583" y1="155" x2="583" y2="175" stroke="#1e3a5f" stroke-width="1.5" stroke-dasharray="3 3"></line><line x1="749" y1="155" x2="749" y2="175" stroke="#1e3a5f" stroke-width="1.5" stroke-dasharray="3 3"></line><line x1="915" y1="155" x2="915" y2="175" stroke="#1e3a5f" stroke-width="1.5" stroke-dasharray="3 3"></line><rect x="15" y="175" width="970" height="50" rx="12" fill="#0f2338" stroke="#1e3a5f" stroke-width="1.5"></rect><text x="500" y="196" text-anchor="middle" font-size="12.5" font-weight="700" letter-spacing="1" fill="#cbd5e1">FRACTIONAL CHIEF DATA OFFICER · ONE ACCOUNTABLE EXECUTIVE ACROSS THE WHOLE PATH</text><text x="500" y="214" text-anchor="middle" font-size="10.5" fill="#64748b">Schema contracts · exactly-once semantics · latency SLOs · access control · cost per query · retention and residency</text></g></svg></div>
<p class="mdb-cap">Figure 1 — The real-time analytics path a Fractional Chief Data Officer governs end to end, with the latency budget allocated hop by hop.</p>
<p>Each stage is a genuine engineering discipline. Capture is usually log-based change data capture reading the write-ahead log, following the mechanics described in the <a href="https://www.postgresql.org/docs/current/logical-replication.html" target="_blank" rel="noopener">PostgreSQL logical replication documentation</a> and implemented with <a href="https://debezium.io/documentation/reference/stable/index.html" target="_blank" rel="noopener">Debezium</a>. Transport is an ordered, replayable log, normally <a href="https://kafka.apache.org/documentation/" target="_blank" rel="noopener">Apache Kafka</a>. Processing is stateful stream computation with checkpointing, typically <a href="https://flink.apache.org/what-is-flink/flink-architecture/" target="_blank" rel="noopener">Apache Flink</a>. Serving is a column store tuned for high-cardinality, low-latency aggregation, such as ClickHouse and its <a href="https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree" target="_blank" rel="noopener">MergeTree family of table engines</a>.</p>
<p>What no vendor supplies is the arbitration between them. Which events are worth streaming at all? Which consumers are entitled to which fields? What is an acceptable staleness for a pricing decision versus a regulatory report? Who pays when a single badly written dashboard query scans forty terabytes? These are executive questions with engineering answers, and they are the daily work of a Fractional Chief Data Officer. MinervaDB backs that judgement with delivery capability through <a href="https://minervadb.com/clickhouse-consulting/">ClickHouse consulting</a>, <a href="https://minervadb.com/postgresql-consulting/">PostgreSQL consulting</a> and our <a href="https://minervadb.com/elite-high-performance-data-engineering-2/">high-performance data engineering</a> practice.</p>
<h2>The Latency Budget: How a Fractional Chief Data Officer Turns Milliseconds Into Margin</h2>
<p>Real-time is not a marketing adjective; it is a number with an owner. The single most useful artefact a Fractional Chief Data Officer introduces in the first month is a written latency budget: an explicit allocation of the end-to-end service level objective across every hop, with a named owner and an alert for each allocation. Once the budget exists, arguments about whether the platform is fast enough stop being subjective.</p>
<div class="mdb-fig"><svg viewbox="0 0 1000 250" width="100%" role="img" aria-label="Animated latency budget showing how a Fractional Chief Data Officer allocates a 900 millisecond real-time analytics service level objective across capture, transport, processing, storage, query and render" xmlns="http://www.w3.org/2000/svg"><defs><filter x="-80%" y="-80%" width="260%" height="260%"><fegaussianblur stddeviation="3.5" result="b"></fegaussianblur><femerge><femergenode in="b"></femergenode><femergenode in="SourceGraphic"></femergenode></femerge></filter></defs><rect x="0" y="0" width="1000" height="250" rx="12" fill="#0b1220"></rect><g font-family="Helvetica,Arial,sans-serif"><text x="60" y="34" font-size="13" font-weight="700" letter-spacing="1.4" fill="#7dd3fc">LATENCY BUDGET · COMMIT TO DECISION</text><text x="940" y="34" text-anchor="end" font-size="13" font-weight="700" fill="#34d399">ACHIEVED P99 900 ms</text><line x1="940" y1="62" x2="940" y2="150" stroke="#f43f5e" stroke-width="2" stroke-dasharray="5 5"></line><text x="934" y="58" text-anchor="end" font-size="10.5" fill="#fb7185" font-weight="700">SLO CEILING 1,000 ms</text><rect x="60" y="95" width="0" height="50" fill="#0ea5e9"><animate attributename="width" values="0;0;105.6;105.6;0" keytimes="0;0.025;0.1;0.95;1" dur="8s" repeatcount="indefinite"></animate></rect><rect x="165.6" y="95" width="0" height="50" fill="#22d3ee"><animate attributename="width" values="0;0;70.4;70.4;0" keytimes="0;0.0875;0.1625;0.95;1" dur="8s" repeatcount="indefinite"></animate></rect><rect x="236" y="95" width="0" height="50" fill="#818cf8"><animate attributename="width" values="0;0;132;132;0" keytimes="0;0.15;0.225;0.95;1" dur="8s" repeatcount="indefinite"></animate></rect><rect x="368" y="95" width="0" height="50" fill="#a78bfa"><animate attributename="width" values="0;0;176;176;0" keytimes="0;0.2125;0.2875;0.95;1" dur="8s" repeatcount="indefinite"></animate></rect><rect x="544" y="95" width="0" height="50" fill="#f472b6"><animate attributename="width" values="0;0;220;220;0" keytimes="0;0.275;0.35;0.95;1" dur="8s" repeatcount="indefinite"></animate></rect><rect x="764" y="95" width="0" height="50" fill="#fbbf24"><animate attributename="width" values="0;0;88;88;0" keytimes="0;0.3375;0.4125;0.95;1" dur="8s" repeatcount="indefinite"></animate></rect><rect x="60" y="95" width="880" height="50" fill="none" stroke="#1e3a5f" stroke-width="1.5" rx="4"></rect><text x="896" y="124" text-anchor="middle" font-size="9.5" fill="#34d399" font-weight="700">100 ms free</text><g><line x1="60" y1="80" x2="60" y2="150" stroke="#e2e8f0" stroke-width="1.5" opacity="0.85"></line><circle cx="60" cy="80" r="5" fill="#e2e8f0" filter="url(#mdbGlowB)"></circle><animatetransform attributename="transform" type="translate" values="0,0;0,0;792,0;792,0;0,0" keytimes="0;0.025;0.4125;0.95;1" dur="8s" repeatcount="indefinite"></animatetransform></g><line x1="60" y1="150" x2="940" y2="150" stroke="#334155" stroke-width="1.5"></line><g font-size="10" fill="#64748b"><text x="60" y="168" text-anchor="middle">0 ms</text><text x="280" y="168" text-anchor="middle">250 ms</text><text x="500" y="168" text-anchor="middle">500 ms</text><text x="720" y="168" text-anchor="middle">750 ms</text><text x="940" y="168" text-anchor="middle">1,000 ms</text></g><g font-size="11" font-weight="700"><g opacity="0"><line x1="112.8" y1="147" x2="112.8" y2="188" stroke="#0ea5e9" stroke-width="1"></line><text x="112.8" y="200" text-anchor="middle" fill="#0ea5e9">Capture 120 ms</text><text x="112.8" y="214" text-anchor="middle" font-size="9.5" font-weight="400" fill="#64748b">CDC lag</text><animate attributename="opacity" values="0;0;1;1;0" keytimes="0;0.025;0.1;0.95;1" dur="8s" repeatcount="indefinite"></animate></g><g opacity="0"><line x1="200.8" y1="147" x2="200.8" y2="212" stroke="#22d3ee" stroke-width="1"></line><text x="200.8" y="224" text-anchor="middle" fill="#22d3ee">Transport 80 ms</text><text x="200.8" y="238" text-anchor="middle" font-size="9.5" font-weight="400" fill="#64748b">broker ack</text><animate attributename="opacity" values="0;0;1;1;0" keytimes="0;0.0875;0.1625;0.95;1" dur="8s" repeatcount="indefinite"></animate></g><g opacity="0"><line x1="302" y1="147" x2="302" y2="188" stroke="#818cf8" stroke-width="1"></line><text x="302" y="200" text-anchor="middle" fill="#818cf8">Process 150 ms</text><text x="302" y="214" text-anchor="middle" font-size="9.5" font-weight="400" fill="#64748b">windowing</text><animate attributename="opacity" values="0;0;1;1;0" keytimes="0;0.15;0.225;0.95;1" dur="8s" repeatcount="indefinite"></animate></g><g opacity="0"><line x1="456" y1="147" x2="456" y2="212" stroke="#a78bfa" stroke-width="1"></line><text x="456" y="224" text-anchor="middle" fill="#a78bfa">Store 200 ms</text><text x="456" y="238" text-anchor="middle" font-size="9.5" font-weight="400" fill="#64748b">insert to visible</text><animate attributename="opacity" values="0;0;1;1;0" keytimes="0;0.2125;0.2875;0.95;1" dur="8s" repeatcount="indefinite"></animate></g><g opacity="0"><line x1="654" y1="147" x2="654" y2="188" stroke="#f472b6" stroke-width="1"></line><text x="654" y="200" text-anchor="middle" fill="#f472b6">Query 250 ms</text><text x="654" y="214" text-anchor="middle" font-size="9.5" font-weight="400" fill="#64748b">P99 aggregation</text><animate attributename="opacity" values="0;0;1;1;0" keytimes="0;0.275;0.35;0.95;1" dur="8s" repeatcount="indefinite"></animate></g><g opacity="0"><line x1="808" y1="147" x2="808" y2="212" stroke="#fbbf24" stroke-width="1"></line><text x="808" y="224" text-anchor="middle" fill="#fbbf24">Render 100 ms</text><text x="808" y="238" text-anchor="middle" font-size="9.5" font-weight="400" fill="#64748b">client paint</text><animate attributename="opacity" values="0;0;1;1;0" keytimes="0;0.3375;0.4125;0.95;1" dur="8s" repeatcount="indefinite"></animate></g></g></g></svg></div>
<p class="mdb-cap">Figure 2 — A published latency budget: every hop has an allocation, an owner and an alert. Unallocated headroom is a deliberate reserve, not luck.</p>
<p>Two disciplines make the budget real. The first is error-budget thinking, borrowed from site reliability engineering and set out in the <a href="https://sre.google/sre-book/service-level-objectives/" target="_blank" rel="noopener">Google SRE book chapter on service level objectives</a>: an objective without a consequence is a wish. The second is physical design. In a column store, latency and cost are both functions of sort order, partitioning, codecs and pre-aggregation — which is why a Fractional Chief Data Officer signs off storage layout the way a chief financial officer signs off capital expenditure.</p>
<pre class="mdb-code"><b>ClickHouse · real-time ingest with a governed physical design</b><code>-- Ordered, replayable ingest. Consumer group, format and parallelism are
-- reviewed artefacts, not defaults inherited from a tutorial.
CREATE TABLE rt.order_event_queue
(
    event_time       DateTime64(3),
    tenant_id        UInt32,
    order_id         String,
    country          LowCardinality(String),
    channel          LowCardinality(String),
    net_amount       Decimal(18, 2),
    is_fraud_flagged UInt8
)
ENGINE = Kafka
SETTINGS kafka_broker_list   = 'kafka-01:9092,kafka-02:9092',
         kafka_topic_list    = 'commerce.orders.v2',
         kafka_group_name    = 'ch_rt_orders',
         kafka_format        = 'JSONEachRow',
         kafka_num_consumers = 4;

-- Serving table. Sort order comes from measured query patterns; retention and
-- tiering are signed off by the Fractional Chief Data Officer as cost policy.
CREATE TABLE rt.order_event
(
    event_date       Date DEFAULT toDate(event_time),
    event_time       DateTime64(3),
    tenant_id        UInt32,
    order_id         String,
    country          LowCardinality(String),
    channel          LowCardinality(String),
    net_amount       Decimal(18, 2),
    is_fraud_flagged UInt8
)
ENGINE = MergeTree
PARTITION BY toYYYYMM(event_date)
ORDER BY (tenant_id, country, event_time)
TTL event_date + INTERVAL 6  MONTH TO VOLUME 'cold',
    event_date + INTERVAL 25 MONTH DELETE
SETTINGS index_granularity = 8192;

-- Pre-aggregate the handful of questions the business asks every minute,
-- so that a dashboard refresh never becomes a full-table scan.
CREATE MATERIALIZED VIEW rt.order_minute_mv TO rt.order_minute AS
SELECT toStartOfMinute(event_time)  AS minute,
       tenant_id,
       country,
       countState()                 AS orders_state,
       sumState(net_amount)         AS revenue_state,
       sumState(is_fraud_flagged)   AS flagged_state
FROM rt.order_event
GROUP BY minute, tenant_id, country;</code></pre>
<h2>Decision Decay: The Economic Case a Fractional Chief Data Officer Puts to the CFO</h2>
<p>The commercial argument for real-time analytics is not that faster is nicer. It is that the value of a decision decays, often steeply, from the moment the triggering event occurs. A fraud signal acted on in 400 milliseconds prevents a loss; the same signal in the overnight batch documents one. An abandoned basket recovered within the session converts; recovered tomorrow it annoys. A Fractional Chief Data Officer makes that decay curve explicit, attaches revenue to it, and uses it to size investment.</p>
<div class="mdb-fig"><svg viewbox="0 0 1000 300" width="100%" role="img" aria-label="Animated decision decay curve used by a Fractional Chief Data Officer to show how the commercial value of a decision falls as analytics latency increases" xmlns="http://www.w3.org/2000/svg"><defs><lineargradient x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#34d399"></stop><stop offset="0.45" stop-color="#fbbf24"></stop><stop offset="1" stop-color="#f43f5e"></stop></lineargradient><lineargradient x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#38bdf8" stop-opacity="0.35"></stop><stop offset="1" stop-color="#38bdf8" stop-opacity="0"></stop></lineargradient><filter x="-80%" y="-80%" width="260%" height="260%"><fegaussianblur stddeviation="4" result="b"></fegaussianblur><femerge><femergenode in="b"></femergenode><femergenode in="SourceGraphic"></femergenode></femerge></filter><path fill="none" d="M80,60 C180,72 250,140 340,178 C470,222 660,246 940,252"></path></defs><rect x="0" y="0" width="1000" height="300" rx="12" fill="#0b1220"></rect><g font-family="Helvetica,Arial,sans-serif"><text x="80" y="30" font-size="13" font-weight="700" letter-spacing="1.4" fill="#7dd3fc">DECISION VALUE DECAY</text><text x="940" y="30" text-anchor="end" font-size="12" font-weight="700" fill="#94a3b8">LATENCY IS A REVENUE VARIABLE</text><rect x="80" y="55" width="90" height="195" fill="#22c55e"><animate attributename="opacity" values="0.07;0.2;0.07" dur="2.6s" repeatcount="indefinite"></animate></rect><rect x="850" y="55" width="90" height="195" fill="#f43f5e"><animate attributename="opacity" values="0.07;0.2;0.07" dur="2.6s" begin="1.3s" repeatcount="indefinite"></animate></rect><text x="125" y="48" text-anchor="middle" font-size="9.5" font-weight="700" fill="#4ade80">REAL-TIME</text><text x="895" y="48" text-anchor="middle" font-size="9.5" font-weight="700" fill="#fb7185">BATCH T+24h</text><line x1="80" y1="55" x2="80" y2="250" stroke="#334155" stroke-width="1.5"></line><line x1="80" y1="250" x2="950" y2="250" stroke="#334155" stroke-width="1.5"></line><line x1="80" y1="157" x2="940" y2="157" stroke="#334155" stroke-width="1" stroke-dasharray="4 6"></line><g font-size="10" fill="#64748b"><text x="70" y="64" text-anchor="end">100%</text><text x="70" y="161" text-anchor="end">50%</text><text x="70" y="254" text-anchor="end">0%</text><text x="80" y="272" text-anchor="middle">event</text><text x="295" y="272" text-anchor="middle">1 min</text><text x="510" y="272" text-anchor="middle">1 hour</text><text x="725" y="272" text-anchor="middle">6 hours</text><text x="940" y="272" text-anchor="middle">24 hours</text><text x="500" y="290" text-anchor="middle" font-size="10.5" fill="#475569">Time elapsed between the business event and the decision taken on it</text></g><text transform="translate(28,200) rotate(-90)" font-size="10.5" fill="#475569">Recoverable value of the decision</text><path d="M80,60 C180,72 250,140 340,178 C470,222 660,246 940,252 L940,250 L80,250 Z" fill="url(#mdbFillC)" opacity="0"><animate attributename="opacity" values="0;0;1;1;0" keytimes="0;0.02;0.45;0.9;1" dur="9s" repeatcount="indefinite"></animate></path><path d="M80,60 C180,72 250,140 340,178 C470,222 660,246 940,252" fill="none" stroke="url(#mdbGC)" stroke-width="4" stroke-linecap="round" stroke-dasharray="1000"><animate attributename="stroke-dashoffset" values="1000;1000;0;0;1000" keytimes="0;0.02;0.45;0.9;1" dur="9s" repeatcount="indefinite"></animate></path><circle r="7" fill="#e2e8f0" filter="url(#mdbGlowC)"><animatemotion dur="9s" repeatcount="indefinite" keypoints="0;0;1;1;0" keytimes="0;0.02;0.45;0.9;1" calcmode="linear"><mpath href="#mdbCurveC" xlink:href="#mdbCurveC"></mpath></animatemotion></circle><circle cx="266" cy="157" r="5" fill="#fbbf24"></circle><circle cx="266" cy="157" r="5" fill="none" stroke="#fbbf24" stroke-width="2"><animate attributename="r" values="5;20;5" dur="2.2s" repeatcount="indefinite"></animate><animate attributename="opacity" values="0.9;0;0.9" dur="2.2s" repeatcount="indefinite"></animate></circle><text x="284" y="146" font-size="10.5" font-weight="700" fill="#fbbf24">Half the value gone within minutes</text><text x="284" y="132" font-size="9.5" fill="#94a3b8">This crossing point is what the investment case is really buying back</text></g></svg></div>
<p class="mdb-cap">Figure 3 — Decision decay. A Fractional Chief Data Officer prices the area under this curve, then designs the latency budget in Figure 2 to recover it.</p>
<h2>Seven Proven Wins a Fractional Chief Data Officer Delivers in Real-Time Analytics</h2>
<p>These are the outcomes we contract to. They are stated as measurable changes rather than activities, because a Fractional Chief Data Officer engagement is only credible if the board can verify it.</p>
<div class="mdb-cards">
<div>
<h4>1. One certified real-time metric layer</h4>
<p>A small set of certified metrics — revenue, active customers, conversion, exposure — with a named owner, a written definition and a freshness service level. Finance, product and operations stop reconciling and start deciding.</p>
</div>
<div>
<h4>2. A latency SLO somebody actually owns</h4>
<p>An end-to-end objective decomposed hop by hop, instrumented, alerted and reported monthly. Performance stops being anecdotal and becomes a tracked commitment with an error budget.</p>
</div>
<div>
<h4>3. Analytical cost per terabyte cut, not capped</h4>
<p>Sort keys, codecs, pre-aggregation, tiering and retention are redesigned against real workloads. Typical outcome is a 40 to 60 per cent reduction in cost per terabyte scanned with equal or better latency.</p>
</div>
<div>
<h4>4. Pipelines that survive replay and schema change</h4>
<p>Exactly-once semantics, idempotent sinks, versioned schemas and a tested backfill path. Incidents become bounded operational events instead of week-long reconciliation projects.</p>
</div>
<div>
<h4>5. Real-time risk and fraud controls you can evidence</h4>
<p>Streaming rules and models applied within the decision window, with a full audit trail of what was known when. This is the control regulators and insurers ask to see.</p>
</div>
<div>
<h4>6. AI and ML served from the same governed stream</h4>
<p>Features computed once, registered, reused for training and inference, with drift monitoring. Models stop being pilots because the data path underneath them is already production-grade.</p>
</div>
<div>
<h4>7. Diligence-ready governance</h4>
<p>A data inventory, classification, lineage, retention and access model that survives an audit, an initial public offering readiness review or a buyer’s technical diligence without a fire drill.</p>
</div>
</div>
<h2>The Technical Blueprint: What the CTO Gets From a Fractional Chief Data Officer</h2>
<p>Engineering teams do not need another strategy deck. They need decisions made, written down and defended. A Fractional Chief Data Officer supplies exactly that: a short set of non-negotiable standards for the streaming estate, each of which removes a recurring class of incident. The three that matter most are the data contract, exactly-once delivery semantics, and measured rather than asserted service levels.</p>
<h3>Data contracts for streams, reviewed like an API</h3>
<p>Every significant topic publishes a contract: owner, classification, freshness commitment, schema, quality rules and breaking-change policy. Producers cannot silently drop a field. Consumers can depend on a stated service level. Auditors have one artefact to inspect. Quality assertions run in continuous integration in the manner described by the <a href="https://docs.getdbt.com/docs/build/data-tests" target="_blank" rel="noopener">dbt data testing documentation</a>, and a failing contract blocks promotion.</p>
<pre class="mdb-code"><b>Data contract · versioned in source control, enforced in the pipeline</b><code># data-contracts/commerce.orders.v2.yaml
apiVersion: minervadb.com/v1
kind: StreamContract
metadata:
  name: commerce.orders
  version: 2.1.0
  owner: commerce-platform
  steward: fractional-cdo-office
spec:
  classification: restricted
  transport: kafka
  partitions: 24
  keyField: order_id
  ordering: per-key
  deliverySemantics: exactly-once
  freshnessSlo: PT2S          # event time to queryable in ClickHouse
  availabilitySlo: 99.95
  retention: P7D              # log retention; serving store keeps 25 months
  schema:
    - name: order_id
      type: string
      required: true
    - name: customer_email
      type: string
      required: true
      pii: true
      masking: sha256
    - name: net_amount
      type: decimal(18,2)
      required: true
      constraints: [">= 0"]
  quality:
    - rule: uniqueness(order_id)
      threshold: 1.0
      severity: blocker
    - rule: lag_p99_seconds(event_time, ingested_at)
      threshold: 2
      severity: critical
  breakingChangePolicy: majorVersionOnly</code></pre>
<h3>Service levels measured, not asserted</h3>
<p>The monthly executive report is generated by a query, not written by a person. That single habit removes the most common failure of data leadership, which is a scorecard that quietly reflects opinion. The query below is the shape we deploy on day one of a Fractional Chief Data Officer engagement, and it is the same number the board sees.</p>
<pre class="mdb-code"><b>ClickHouse · the freshness, quality and cost numbers behind the board pack</b><code>-- End-to-end freshness and cost, produced by instrumentation rather than opinion.
SELECT
    dataset,
    quantile(0.50)(dateDiff('millisecond', event_time, ingested_at)) AS p50_lag_ms,
    quantile(0.99)(dateDiff('millisecond', event_time, ingested_at)) AS p99_lag_ms,
    countIf(dateDiff('millisecond', event_time, ingested_at) > slo_ms) * 100.0
        / count()                                                    AS slo_breach_pct,
    round(sum(read_bytes) / pow(1024, 4), 3)                         AS tb_scanned,
    round(sum(read_bytes) / pow(1024, 4) * 5.00, 2)                  AS est_cost_usd
FROM rt.pipeline_observability
WHERE ingested_at >= now() - INTERVAL 30 DAY
GROUP BY dataset
HAVING slo_breach_pct > 0.1 OR p99_lag_ms > 2000
ORDER BY slo_breach_pct DESC;</code></pre>
<p>Where this work extends beyond governance into sustained operations, the Fractional Chief Data Officer draws on <a href="https://minervadb.com/minervadb-24-7-remote-dba-support/">24×7 remote DBA support</a>, <a href="https://minervadb.com/data-analytics-and-data-warehousing-support/">data analytics and warehousing support</a> and, for retrieval and recommendation workloads, our <a href="https://minervadb.com/vector-data-engineering/">vector data engineering</a> capability.</p>
<h2>Unit Economics: How a Fractional Chief Data Officer Reads the Real-Time Analytics Bill</h2>
<p>Real-time platforms are billed by consumption, which means physical design decisions land directly on the invoice. A CFO does not need to understand sort keys; a CFO needs the cost expressed per unit of business activity and trended. A Fractional Chief Data Officer builds that bridge, replacing a single opaque cloud line item with attributable unit costs that a finance function can actually manage.</p>
<div class="mdb-fig"><svg viewbox="0 0 1000 265" width="100%" role="img" aria-label="Animated before and after chart of the unit economics a Fractional Chief Data Officer improves across cost per terabyte scanned, compute hours, event to decision latency and incident load" xmlns="http://www.w3.org/2000/svg"><defs><lineargradient x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#22d3ee"></stop><stop offset="1" stop-color="#34d399"></stop></lineargradient></defs><rect x="0" y="0" width="1000" height="265" rx="12" fill="#0b1220"></rect><g font-family="Helvetica,Arial,sans-serif"><text x="40" y="32" font-size="13" font-weight="700" letter-spacing="1.4" fill="#7dd3fc">UNIT ECONOMICS · BEFORE AND AFTER TWO QUARTERS</text><rect x="672" y="22" width="12" height="12" rx="3" fill="#334155"></rect><text x="690" y="32" font-size="11" fill="#94a3b8">Baseline</text><rect x="762" y="22" width="12" height="12" rx="3" fill="url(#mdbGD)"></rect><text x="780" y="32" font-size="11" fill="#94a3b8">Under a Fractional CDO</text><g font-size="11.5" fill="#cbd5e1"><text x="290" y="69" text-anchor="end">Cost per terabyte scanned</text><text x="290" y="107" text-anchor="end">Warehouse and cluster compute hours</text><text x="290" y="145" text-anchor="end">Event-to-decision latency</text><text x="290" y="183" text-anchor="end">Engineer hours lost to data incidents</text><text x="290" y="221" text-anchor="end">Fully loaded cost per certified metric</text></g><rect x="300" y="58" width="600" height="13" rx="6" fill="#334155"></rect><rect x="300" y="96" width="600" height="13" rx="6" fill="#334155"></rect><rect x="300" y="134" width="600" height="13" rx="6" fill="#334155"></rect><rect x="300" y="172" width="600" height="13" rx="6" fill="#334155"></rect><rect x="300" y="210" width="600" height="13" rx="6" fill="#334155"></rect><rect x="300" y="74" width="0" height="13" rx="6" fill="url(#mdbGD)"><animate attributename="width" values="0;0;276;276;0" keytimes="0;0.04;0.2;0.94;1" dur="7s" repeatcount="indefinite"></animate></rect><rect x="300" y="112" width="0" height="13" rx="6" fill="url(#mdbGD)"><animate attributename="width" values="0;0;348;348;0" keytimes="0;0.1;0.26;0.94;1" dur="7s" repeatcount="indefinite"></animate></rect><rect x="300" y="150" width="0" height="13" rx="6" fill="url(#mdbGD)"><animate attributename="width" values="0;0;24;24;0" keytimes="0;0.16;0.32;0.94;1" dur="7s" repeatcount="indefinite"></animate></rect><rect x="300" y="188" width="0" height="13" rx="6" fill="url(#mdbGD)"><animate attributename="width" values="0;0;210;210;0" keytimes="0;0.22;0.38;0.94;1" dur="7s" repeatcount="indefinite"></animate></rect><rect x="300" y="226" width="0" height="13" rx="6" fill="url(#mdbGD)"><animate attributename="width" values="0;0;306;306;0" keytimes="0;0.28;0.44;0.94;1" dur="7s" repeatcount="indefinite"></animate></rect><g font-size="12" font-weight="700" fill="#34d399"><text x="586" y="85" opacity="0">−54%<animate attributename="opacity" values="0;0;1;1;0" keytimes="0;0.2;0.24;0.94;1" dur="7s" repeatcount="indefinite"></animate></text><text x="658" y="123" opacity="0">−42%<animate attributename="opacity" values="0;0;1;1;0" keytimes="0;0.26;0.3;0.94;1" dur="7s" repeatcount="indefinite"></animate></text><text x="334" y="161" opacity="0">−96%<animate attributename="opacity" values="0;0;1;1;0" keytimes="0;0.32;0.36;0.94;1" dur="7s" repeatcount="indefinite"></animate></text><text x="520" y="199" opacity="0">−65%<animate attributename="opacity" values="0;0;1;1;0" keytimes="0;0.38;0.42;0.94;1" dur="7s" repeatcount="indefinite"></animate></text><text x="616" y="237" opacity="0">−49%<animate attributename="opacity" values="0;0;1;1;0" keytimes="0;0.44;0.48;0.94;1" dur="7s" repeatcount="indefinite"></animate></text></g><text x="300" y="256" font-size="10" fill="#475569">Indicative ranges from MinervaDB engagements. Bars are normalised to the client baseline at engagement start.</text></g></svg></div>
<p class="mdb-cap">Figure 4 — Unit economics before and after a Fractional Chief Data Officer takes ownership of the real-time estate.</p>
<p>The mechanism is unglamorous and repeatable. Queries are profiled and the top decile by bytes scanned is redesigned or pre-aggregated. Retention is enforced instead of aspirational. Cold partitions move to cheaper storage on a schedule. Idle clusters are decommissioned rather than tolerated. Chargeback labels are applied so that every terabyte has an owner. MinervaDB runs this discipline continuously through our <a href="https://minervadb.com/cloud-database-optimization-finops/">cloud database optimisation and FinOps</a> practice, and it is what makes the investment case defensible rather than aspirational.</p>
<table class="mdb-tbl">
<thead>
<tr>
<th>Cost or risk line</th>
<th>Without executive data ownership</th>
<th>With a MinervaDB Fractional Chief Data Officer</th>
</tr>
</thead>
<tbody>
<tr>
<td>Leadership cost</td>
<td>Full-time CDO salary, bonus, equity and search fee</td>
<td>Fixed monthly fee for 2–8 principal days, thirty-day exit</td>
</tr>
<tr>
<td>Analytical compute</td>
<td>Grows with usage; no owner of query efficiency</td>
<td>Cost per terabyte scanned tracked and reduced quarter on quarter</td>
</tr>
<tr>
<td>Storage</td>
<td>Everything retained forever “just in case”</td>
<td>Tiering and retention enforced by declared policy</td>
</tr>
<tr>
<td>Engineering opportunity cost</td>
<td>Senior engineers absorbed by reconciliation and incidents</td>
<td>Incident load falls; capacity returns to product work</td>
</tr>
<tr>
<td>Decision quality</td>
<td>Contested numbers, decisions taken on stale data</td>
<td>Certified metrics with published freshness objectives</td>
</tr>
<tr>
<td>Regulatory and audit exposure</td>
<td>Unquantified; discovered during an audit</td>
<td>Inventoried, classified, evidenced and reported monthly</td>
</tr>
<tr>
<td>Diligence and valuation risk</td>
<td>Data findings become price adjustments</td>
<td>Governance pack maintained continuously, not assembled in panic</td>
</tr>
</tbody>
</table>
<h2>Governance, Risk and Diligence: The Board and Investor View</h2>
<p>For a board, real-time analytics raises the stakes on governance rather than lowering them. Data moves faster, reaches more consumers and is embedded in automated decisions, which means an error propagates before anyone notices. Directors are entitled to ask a small number of hard questions, and a Fractional Chief Data Officer exists to answer them with evidence: where does personal data flow, who can read it, how long is it kept, what breaks if a pipeline fails, and what did we know at the moment a decision was automated?</p>
<p>Our governance model follows established practice rather than invention. Data management domains map to the <a href="https://dama.org/learning-resources/dama-data-management-body-of-knowledge-dmbok/" target="_blank" rel="noopener">DAMA Data Management Body of Knowledge</a>, and privacy obligations map to the processing principles in <a href="https://gdpr-info.eu/art-5-gdpr/" target="_blank" rel="noopener">Article 5 of the GDPR</a> and their regional equivalents. The value MinervaDB adds is not the framework; it is the engineering rigour with which the framework is made executable in a streaming estate.</p>
<p><img decoding="async" src="https://minervadb.com/wp-content/uploads/2026/08/fractional-chief-data-officer-reference-data-architecture.png" alt="Fractional Chief Data Officer reference data architecture for real-time analytics across SQL, NoSQL, NewSQL and column stores" width="1200" height="686" loading="lazy"></p>
<p class="mdb-cap">Figure 5 — The reference architecture a Fractional Chief Data Officer governs: fit-for-purpose storage under a single governance, security and FinOps plane.</p>
<p>Investors read this differently again. In diligence, data findings rarely kill a deal but frequently move the price. An estate with certified metrics, documented lineage, enforced retention and a measured cost base presents as a managed asset. The same estate without those artefacts presents as a liability with an unknown remediation cost, and it is discounted accordingly. Engaging a Fractional Chief Data Officer eighteen months before a raise or an exit is, in our experience, one of the cheapest forms of valuation protection available. Our perspective on <a href="https://minervadb.com/database-transformation-for-cios/">database transformation for CIOs</a> and our <a href="https://minervadb.com/gcc-data-leadership/">global capability centre data leadership</a> programme describe how that capability is sustained at scale.</p>
<h2>The First 90 Days With a MinervaDB Fractional Chief Data Officer</h2>
<p>Every engagement follows the same evidence-led sequence: assess before advising, architect before building, and prove value on two or three real-time use cases before asking for a larger budget.</p>
<div class="mdb-fig"><svg viewbox="0 0 1000 230" width="100%" role="img" aria-label="Animated 90 day roadmap for a MinervaDB Fractional Chief Data Officer engagement covering assess, architect, activate and operate phases" xmlns="http://www.w3.org/2000/svg"><defs><lineargradient x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#38bdf8"></stop><stop offset="0.5" stop-color="#818cf8"></stop><stop offset="1" stop-color="#34d399"></stop></lineargradient></defs><rect x="0" y="0" width="1000" height="230" rx="12" fill="#0b1220"></rect><g font-family="Helvetica,Arial,sans-serif"><text x="70" y="30" font-size="13" font-weight="700" letter-spacing="1.4" fill="#7dd3fc">FRACTIONAL CHIEF DATA OFFICER · ENGAGEMENT ROADMAP</text><line x1="70" y1="120" x2="930" y2="120" stroke="#1e3a5f" stroke-width="5" stroke-linecap="round"></line><line x1="70" y1="120" x2="930" y2="120" stroke="url(#mdbGE)" stroke-width="5" stroke-linecap="round" stroke-dasharray="860"><animate attributename="stroke-dashoffset" values="860;860;0;0;860" keytimes="0;0.03;0.6;0.93;1" dur="9s" repeatcount="indefinite"></animate></line><g><circle cx="122" cy="120" r="13" fill="#0b1220" stroke="#38bdf8" stroke-width="3"></circle><circle cx="122" cy="120" r="6" fill="#38bdf8"></circle><circle cx="122" cy="120" r="13" fill="none" stroke="#38bdf8" stroke-width="2"><animate attributename="r" values="13;32;13" dur="2.25s" begin="0s" repeatcount="indefinite"></animate><animate attributename="opacity" values="0.85;0;0.85" dur="2.25s" begin="0s" repeatcount="indefinite"></animate></circle><text x="122" y="72" text-anchor="middle" font-size="11" font-weight="700" fill="#38bdf8">DAYS 0–30</text><text x="122" y="92" text-anchor="middle" font-size="14" font-weight="700" fill="#e2e8f0">ASSESS</text><text x="122" y="156" text-anchor="middle" font-size="10" fill="#94a3b8">Inventory, baseline, risk register</text><text x="122" y="170" text-anchor="middle" font-size="10" fill="#64748b">Latency and cost measured, not estimated</text></g><g><circle cx="371" cy="120" r="13" fill="#0b1220" stroke="#60a5fa" stroke-width="3"></circle><circle cx="371" cy="120" r="6" fill="#60a5fa"></circle><circle cx="371" cy="120" r="13" fill="none" stroke="#60a5fa" stroke-width="2"><animate attributename="r" values="13;32;13" dur="2.25s" begin="2.25s" repeatcount="indefinite"></animate><animate attributename="opacity" values="0.85;0;0.85" dur="2.25s" begin="2.25s" repeatcount="indefinite"></animate></circle><text x="371" y="72" text-anchor="middle" font-size="11" font-weight="700" fill="#60a5fa">DAYS 31–60</text><text x="371" y="92" text-anchor="middle" font-size="14" font-weight="700" fill="#e2e8f0">ARCHITECT</text><text x="371" y="156" text-anchor="middle" font-size="10" fill="#94a3b8">Target architecture and data contracts</text><text x="371" y="170" text-anchor="middle" font-size="10" fill="#64748b">Investment case and twelve-month plan</text></g><g><circle cx="620" cy="120" r="13" fill="#0b1220" stroke="#818cf8" stroke-width="3"></circle><circle cx="620" cy="120" r="6" fill="#818cf8"></circle><circle cx="620" cy="120" r="13" fill="none" stroke="#818cf8" stroke-width="2"><animate attributename="r" values="13;32;13" dur="2.25s" begin="4.5s" repeatcount="indefinite"></animate><animate attributename="opacity" values="0.85;0;0.85" dur="2.25s" begin="4.5s" repeatcount="indefinite"></animate></circle><text x="620" y="72" text-anchor="middle" font-size="11" font-weight="700" fill="#818cf8">DAYS 61–90</text><text x="620" y="92" text-anchor="middle" font-size="14" font-weight="700" fill="#e2e8f0">ACTIVATE</text><text x="620" y="156" text-anchor="middle" font-size="10" fill="#94a3b8">Two or three real-time use cases in production</text><text x="620" y="170" text-anchor="middle" font-size="10" fill="#64748b">SLOs, cost guardrails and policy in CI</text></g><g><circle cx="878" cy="120" r="13" fill="#0b1220" stroke="#34d399" stroke-width="3"></circle><circle cx="878" cy="120" r="6" fill="#34d399"></circle><circle cx="878" cy="120" r="13" fill="none" stroke="#34d399" stroke-width="2"><animate attributename="r" values="13;32;13" dur="2.25s" begin="6.75s" repeatcount="indefinite"></animate><animate attributename="opacity" values="0.85;0;0.85" dur="2.25s" begin="6.75s" repeatcount="indefinite"></animate></circle><text x="878" y="72" text-anchor="middle" font-size="11" font-weight="700" fill="#34d399">MONTH 4 ONWARDS</text><text x="878" y="92" text-anchor="middle" font-size="14" font-weight="700" fill="#e2e8f0">OPERATE</text><text x="878" y="156" text-anchor="middle" font-size="10" fill="#94a3b8">Quarterly strategy and FinOps reviews</text><text x="878" y="170" text-anchor="middle" font-size="10" fill="#64748b">Succession plan for a permanent CDO</text></g><text x="500" y="208" text-anchor="middle" font-size="10.5" fill="#475569">Every phase produces a written artefact the board can read: risk register, strategy, working data products, monthly scorecard.</text></g></svg></div>
<p class="mdb-cap">Figure 6 — The MinervaDB Fractional Chief Data Officer engagement roadmap, from assessment to a recurring executive scorecard.</p>
<h2>The Executive Scorecard a Fractional Chief Data Officer Reports Against</h2>
<p>The scorecard is agreed in the first month and reported every month thereafter, generated from instrumentation. Four numbers carry most of the signal for a real-time estate: are we fresh, are we correct, what does it cost, and how fast can we act?</p>
<div class="mdb-fig"><svg viewbox="0 0 1000 245" width="100%" role="img" aria-label="Animated executive scorecard gauges showing freshness attainment, data contract pass rate, cost per terabyte reduction and decision latency reduction under a Fractional Chief Data Officer" xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="1000" height="245" rx="12" fill="#0b1220"></rect><g font-family="Helvetica,Arial,sans-serif"><text x="140" y="32" font-size="13" font-weight="700" letter-spacing="1.4" fill="#7dd3fc" text-anchor="start">MONTHLY EXECUTIVE SCORECARD · GENERATED, NOT ASSERTED</text><g><circle cx="140" cy="118" r="52" fill="none" stroke="#1e3a5f" stroke-width="13"></circle><circle cx="140" cy="118" r="52" fill="none" stroke="#38bdf8" stroke-width="13" stroke-linecap="round" stroke-dasharray="326.7" stroke-dashoffset="326.7" transform="rotate(-90 140 118)"><animate attributename="stroke-dashoffset" values="326.7;326.7;1.96;1.96;326.7" keytimes="0;0.05;0.4;0.92;1" dur="6s" repeatcount="indefinite"></animate></circle><text x="140" y="126" text-anchor="middle" font-size="22" font-weight="700" fill="#e2e8f0">99.4%</text><text x="140" y="200" text-anchor="middle" font-size="12" font-weight="700" fill="#cbd5e1">Freshness SLO</text><text x="140" y="216" text-anchor="middle" font-size="11" fill="#64748b">attainment across certified streams</text></g><g><circle cx="380" cy="118" r="52" fill="none" stroke="#1e3a5f" stroke-width="13"></circle><circle cx="380" cy="118" r="52" fill="none" stroke="#34d399" stroke-width="13" stroke-linecap="round" stroke-dasharray="326.7" stroke-dashoffset="326.7" transform="rotate(-90 380 118)"><animate attributename="stroke-dashoffset" values="326.7;326.7;2.94;2.94;326.7" keytimes="0;0.1;0.45;0.92;1" dur="6s" repeatcount="indefinite"></animate></circle><text x="380" y="126" text-anchor="middle" font-size="22" font-weight="700" fill="#e2e8f0">99.1%</text><text x="380" y="200" text-anchor="middle" font-size="12" font-weight="700" fill="#cbd5e1">Data contract pass rate</text><text x="380" y="216" text-anchor="middle" font-size="11" fill="#64748b">across production pipelines, weekly</text></g><g><circle cx="620" cy="118" r="52" fill="none" stroke="#1e3a5f" stroke-width="13"></circle><circle cx="620" cy="118" r="52" fill="none" stroke="#fbbf24" stroke-width="13" stroke-linecap="round" stroke-dasharray="326.7" stroke-dashoffset="326.7" transform="rotate(-90 620 118)"><animate attributename="stroke-dashoffset" values="326.7;326.7;150.3;150.3;326.7" keytimes="0;0.15;0.5;0.92;1" dur="6s" repeatcount="indefinite"></animate></circle><text x="620" y="126" text-anchor="middle" font-size="22" font-weight="700" fill="#e2e8f0">54%</text><text x="620" y="200" text-anchor="middle" font-size="12" font-weight="700" fill="#cbd5e1">Cost per terabyte scanned</text><text x="620" y="216" text-anchor="middle" font-size="11" fill="#64748b">reduction over two quarters</text></g><g><circle cx="860" cy="118" r="52" fill="none" stroke="#1e3a5f" stroke-width="13"></circle><circle cx="860" cy="118" r="52" fill="none" stroke="#a78bfa" stroke-width="13" stroke-linecap="round" stroke-dasharray="326.7" stroke-dashoffset="326.7" transform="rotate(-90 860 118)"><animate attributename="stroke-dashoffset" values="326.7;326.7;13.1;13.1;326.7" keytimes="0;0.2;0.55;0.92;1" dur="6s" repeatcount="indefinite"></animate></circle><text x="860" y="126" text-anchor="middle" font-size="22" font-weight="700" fill="#e2e8f0">96%</text><text x="860" y="200" text-anchor="middle" font-size="12" font-weight="700" fill="#cbd5e1">Event-to-decision latency</text><text x="860" y="216" text-anchor="middle" font-size="11" fill="#64748b">reduction versus overnight batch</text></g></g></svg></div>
<p class="mdb-cap">Figure 7 — Indicative twelve-month scorecard. Every figure is produced by a query the client can run independently.</p>
<h2>Fractional Chief Data Officer Engagement Models</h2>
<p>We offer three engagement shapes. All are fixed monthly fees with a named principal, a defined day commitment and a thirty-day exit. None involves a leverage pyramid or a junior delivery team.</p>
<div class="mdb-cards">
<div>
<h4>Advisory — 2 days per month</h4>
<p>Governance council chairing, architecture review and approval, quarterly board reporting and an escalation line for critical real-time decisions. Suited to organisations with a capable engineering team that lacks executive data leadership.</p>
</div>
<div>
<h4>Embedded — 4 to 6 days per month</h4>
<p>Everything in Advisory, plus hands-on ownership of the streaming roadmap, vendor selection, data contracts, latency SLOs, the cost programme and the hiring plan. The most common shape.</p>
</div>
<div>
<h4>Transformation — 8+ days per month</h4>
<p>A MinervaDB delivery pod behind the Fractional Chief Data Officer. Used for migrations, consolidations, regulatory remediation and post-acquisition integration where execution capacity is required alongside leadership.</p>
</div>
</div>
<p>Fixed-scope assessments of two to four weeks are also available, and many clients start there. Where a MinervaDB relationship already exists, the Fractional Chief Data Officer can be layered on top of <a href="https://minervadb.com/minervadb-consultative-support/">MinervaDB consultative support</a> without renegotiating the underlying operational contract.</p>
<h2>Fractional Chief Data Officer Versus a Full-Time Hire or an Advisory Firm</h2>
<table class="mdb-tbl">
<thead>
<tr>
<th>Consideration</th>
<th>Full-time CDO hire</th>
<th>Strategy advisory firm</th>
<th>Contract architect</th>
<th>MinervaDB Fractional Chief Data Officer</th>
</tr>
</thead>
<tbody>
<tr>
<td>Time to productive contribution</td>
<td>Six to nine months including search</td>
<td>Four to eight weeks of discovery</td>
<td>Two to four weeks</td>
<td>Under two weeks</td>
</tr>
<tr>
<td>Annual cost of leadership</td>
<td>Salary, bonus and equity</td>
<td>Large fixed programme fee</td>
<td>Daily rate, no mandate</td>
<td>Fixed monthly fee, scalable</td>
</tr>
<tr>
<td>Hands-on real-time engineering depth</td>
<td>Variable</td>
<td>Generally weak</td>
<td>Strong but narrow</td>
<td>Principal-level across the estate</td>
</tr>
<tr>
<td>Executive authority</td>
<td>Full</td>
<td>Advisory only</td>
<td>None</td>
<td>Full, by written mandate</td>
</tr>
<tr>
<td>Accountability for outcomes</td>
<td>Yes</td>
<td>Recommendations only</td>
<td>Task level</td>
<td>Yes, against an agreed scorecard</td>
</tr>
<tr>
<td>Delivery capacity behind the role</td>
<td>Requires separate hiring</td>
<td>Costly and generalist</td>
<td>None</td>
<td>MinervaDB engineering pods on demand</td>
</tr>
<tr>
<td>Exit risk if it is not working</td>
<td>High and slow</td>
<td>Contractual</td>
<td>Low</td>
<td>Thirty days</td>
</tr>
</tbody>
</table>
<p>The honest position is this. At sufficient scale, a permanent Chief Data Officer is the right answer. A Fractional Chief Data Officer is the right answer before you reach that scale, while you are recovering from a stalled real-time programme, or while you are preparing the organisation so that a permanent hire succeeds rather than becomes your second attempt.</p>
<h2>Frequently Asked Questions About Fractional Chief Data Officer Services</h2>
<h3>What is a Fractional Chief Data Officer?</h3>
<p>A Fractional Chief Data Officer is a senior data executive engaged part-time on a fixed fee who carries the full mandate of a Chief Data Officer — strategy, architecture, governance, quality, security, cost and value realisation — without the salary, equity and hiring risk of a permanent appointment.</p>
<h3>How does a Fractional Chief Data Officer improve real-time analytics specifically?</h3>
<p>By owning the whole path rather than a stage of it. That means a published latency budget, data contracts on every significant stream, exactly-once delivery semantics, a serving layer designed for the queries the business actually runs, and a cost model expressed per unit of business activity. Speed becomes a managed commitment instead of a demo.</p>
<h3>How much time does the role commit each month?</h3>
<p>Typically two to eight days per month. Advisory engagements start at two days, embedded engagements run at four to six, and transformation programmes require eight or more with a MinervaDB delivery pod behind the role.</p>
<h3>Which technologies does the mandate cover?</h3>
<p>The whole estate: relational systems such as PostgreSQL, MySQL, MariaDB and SQL Server; NoSQL platforms including MongoDB, Cassandra, Redis and DynamoDB; NewSQL engines such as CockroachDB, TiDB and YugabyteDB; streaming infrastructure including Kafka and Flink; column stores including ClickHouse, Druid, Snowflake, BigQuery and Redshift; and cloud native data platforms on AWS, Azure and Google Cloud.</p>
<h3>How quickly will we see measurable results?</h3>
<p>A prioritised risk register plus a measured latency and cost baseline within thirty days. An approved strategy and investment plan by day sixty. Working real-time data products and a board-readable scorecard by day ninety.</p>
<h3>Will a Fractional Chief Data Officer replace our existing data team?</h3>
<p>No. The role gives an existing team direction, standards, decision rights and executive cover. In most engagements the team becomes measurably more effective, and one of the deliverables is a hiring and capability plan for strengthening it further.</p>
<h3>Can the engagement transition to a permanent Chief Data Officer?</h3>
<p>Yes, and we plan for it from the outset. Every artefact — strategy, standards, contracts, runbooks and the scorecard — is written for handover. Many clients use a Fractional Chief Data Officer precisely to prepare the organisation so that a permanent hire succeeds.</p>
<h3>How is data confidentiality handled?</h3>
<p>Under a mutual non-disclosure agreement, with least-privilege access granted for the duration of the engagement only, and a preference for working inside your perimeter. Where regulation requires it, we work exclusively within your virtual private cloud with no data egress.</p>
<div class="mdb-cta">
<h3>Put an accountable data executive in place this quarter</h3>
<p>If real-time analytics is on your roadmap, on your risk register or in your investment case, the constraint is rarely technology. It is ownership. A MinervaDB <a href="https://minervadb.com/fractional-chief-data-officer/">Fractional Chief Data Officer</a> supplies that ownership in weeks, at a fixed fee, with a thirty-day exit.</p>
<p>The first conversation is with the principal who would hold the mandate — an engineer who has run production data infrastructure at scale, never a salesperson. <a href="https://minervadb.com/contact-minervadb-book-an-appointment/">Book a conversation with a MinervaDB principal</a>, or read more on our <a href="https://minervadb.com/fractional-chief-data-officer/">Fractional Chief Data Officer services page</a>.</p>
</div>
</div>
<p><a href="https://minervadb.com/fractional-chief-data-officer-real-time-analytics/">Fractional Chief Data Officer: 7 Proven Real-Time Analytics Wins</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Foundation is pleased to welcome Auree as a Silver Sponsor.</title>
        <link>https://mariadb.org/mariadb-foundation-is-pleased-to-welcome-auree-as-a-silver-sponsor/</link>
        <pubDate>Mon, 10 Aug 2026 15:34:54 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Auree is building a cloud-independent platform for deploying and operating highly available open source databases, including MariaDB, inside customers’ own cloud accounts. Its Bring Your Own Cloud model allows organisations to choose their cloud provider, region, infrastructure size, and security environment while Auree automates database provisioning, monitoring, backups, clustering, and failover. …<br />
Continue reading "MariaDB Foundation is pleased to welcome Auree as a Silver Sponsor."<br />
MariaDB Foundation is pleased to welcome Auree as a Silver Sponsor. appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/mariadb-foundation-is-pleased-to-welcome-auree-as-a-silver-sponsor/">MariaDB Foundation is pleased to welcome Auree as a Silver Sponsor.</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><a href="https://www.auree.com/" data-type="link" data-id="https://www.auree.com/">Auree</a> is building a cloud-independent platform for deploying and operating highly available open source databases, including MariaDB, inside customers&#8217; own cloud accounts. Its Bring Your Own Cloud model allows organisations to choose their cloud provider, region, infrastructure size, and security environment while Auree automates database provisioning, monitoring, backups, clustering, and failover. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/mariadb-foundation-is-pleased-to-welcome-auree-as-a-silver-sponsor/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;MariaDB Foundation is pleased to welcome Auree as a Silver Sponsor.&#8221;</span></a></p>
<p><a href="https://mariadb.org/mariadb-foundation-is-pleased-to-welcome-auree-as-a-silver-sponsor/">MariaDB Foundation is pleased to welcome Auree as a Silver Sponsor.</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
<p><a href="https://mariadb.org/mariadb-foundation-is-pleased-to-welcome-auree-as-a-silver-sponsor/">MariaDB Foundation is pleased to welcome Auree as a Silver Sponsor.</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB 12.3 LTS: Advances and Building Fault-Tolerant MariaDB Infrastructure at Internet Scale</title>
        <link>https://minervadb.com/mariadb-12-3-high-availability-internet-scale/</link>
        <pubDate>Mon, 10 Aug 2026 09:10:03 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-12-3-lts-advances-and-building-fault-tolerant-mariadb-infrastructure-at-internet-scale/</guid>
        <source url="https://minervadb.com/">The Data Transformation Company</source>
        <description><![CDATA[<p>MariaDB 12.3 is the current long-term support release of MariaDB Community Server. It reached Stable/GA on 28 May 2026 and is maintained until June 2029, making it the first LTS line since MariaDB 11.8. For [...]</p>
<p><a href="https://minervadb.com/mariadb-12-3-high-availability-internet-scale/">MariaDB 12.3 LTS: Advances and Building Fault-Tolerant MariaDB Infrastructure at Internet Scale</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><strong>MariaDB 12.3</strong> is the current long-term support release of MariaDB Community Server. It reached Stable/GA on 28 May 2026 and is maintained until June 2029, making it the first LTS line since MariaDB 11.8. For teams running transactional workloads at internet scale, MariaDB 12.3 is not a routine point upgrade: it rewrites the durability contract between the binary log and InnoDB, adds a full MySQL-compatible optimizer hint framework, and hardens Galera Cluster behaviour under state transfer and write-set conflict. This guide dissects those advancements at engine level and then shows how to compose them into a highly available, fault-tolerant MariaDB infrastructure that survives node, rack, availability-zone and region failure.</p>
<p>Everything below is written from the perspective of database reliability engineering: what changed, why it changes the physics of your write path, what it costs, and how to operationalise it. If you are still on 10.6, 10.11 or 11.4, treat this as an architecture review document rather than a changelog.</p>
<figure class="mdb-figure">
<div><img src="https://minervadb.com/wp-content/uploads/2026/08/mariadb-12-3-high-availability-architecture-diagram.jpg" alt="MariaDB 12.3 high availability and fault-tolerant reference architecture diagram for internet scale" width="989" height="739" loading="eager" decoding="async"></div><figcaption><strong>Figure 1.</strong> The MariaDB 12.3 internet-scale high availability reference architecture discussed in this article. An animated, interactive version appears in the architecture section below.</figcaption></figure>
<div class="mdb-toc">
<h2>Table of Contents</h2>
<ol>
<li><a href="https://minervadb.com/mariadb-12-3-high-availability-internet-scale/#structural">Why MariaDB 12.3 Is a Structural Release, Not a Point Upgrade</a></li>
<li><a href="https://minervadb.com/mariadb-12-3-high-availability-internet-scale/#innodb-binlog">The Headline Advancement: InnoDB-Based Binary Log</a></li>
<li><a href="https://minervadb.com/mariadb-12-3-high-availability-internet-scale/#optimizer">Optimizer Advancements in MariaDB 12.3</a></li>
<li><a href="https://minervadb.com/mariadb-12-3-high-availability-internet-scale/#replication-galera">Replication and Galera Cluster Improvements</a></li>
<li><a href="https://minervadb.com/mariadb-12-3-high-availability-internet-scale/#security">Security, Compatibility and Developer Surface</a></li>
<li><a href="https://minervadb.com/mariadb-12-3-high-availability-internet-scale/#architecture">Reference Architecture: Highly Available MariaDB 12.3 at Internet Scale</a></li>
<li><a href="https://minervadb.com/mariadb-12-3-high-availability-internet-scale/#configuration">Production Configuration Baselines</a></li>
<li><a href="https://minervadb.com/mariadb-12-3-high-availability-internet-scale/#observability">Observability: SLIs That Predict a MariaDB Outage</a></li>
<li><a href="https://minervadb.com/mariadb-12-3-high-availability-internet-scale/#failure-modes">Failure Modes and Anti-Patterns to Avoid</a></li>
<li><a href="https://minervadb.com/mariadb-12-3-high-availability-internet-scale/#upgrade">Upgrading from MariaDB 11.8 to MariaDB 12.3</a></li>
<li><a href="https://minervadb.com/mariadb-12-3-high-availability-internet-scale/#capacity">Benchmarking and Capacity Planning</a></li>
<li><a href="https://minervadb.com/mariadb-12-3-high-availability-internet-scale/#faq">Frequently Asked Questions About MariaDB 12.3</a></li>
<li><a href="https://minervadb.com/mariadb-12-3-high-availability-internet-scale/#conclusion">Conclusion</a></li>
</ol>
</div>
<h2>Why MariaDB 12.3 Is a Structural Release, Not a Point Upgrade</h2>
<p>MariaDB moved to a rolling-plus-LTS cadence several years ago. Rolling releases (12.0, 12.1, 12.2, and now the 13.0 RC line) carry features forward quickly; LTS releases consolidate them into a five-year maintenance window. MariaDB 12.3 is the consolidation point for everything merged since 11.8, which is why the delta looks unusually large.</p>
<p>Three of those changes alter architecture rather than syntax:</p>
<ol>
<li><strong>The binary log can now live inside InnoDB.</strong> That removes two-phase commit between the log and the storage engine, collapses the fsync budget of a commit, and makes the binlog crash-safe by inheritance rather than by configuration.</li>
<li><strong>The optimizer is now steerable.</strong> A comprehensive hint vocabulary lands in the parser, so query plans can be pinned per statement instead of per session or per server.</li>
<li><strong>Galera state transfer and conflict handling got cheaper.</strong> Incremental State Transfers skip redundant foreign key validation, and write-set application can be retried instead of aborting the applier.</li>
</ol>
<p>Add the metadata-lock scalability work, the segmented Aria page cache, parallel replication between two Galera clusters, and buffered audit logging, and MariaDB 12.3 becomes the first release in years where the default HA topology should be re-evaluated from first principles.</p>
<h2>The Headline Advancement in MariaDB 12.3: InnoDB-Based Binary Log</h2>
<p>Historically MariaDB treated the binary log and InnoDB as two independent durable resources. Every commit therefore ran a two-phase commit protocol: prepare in InnoDB, write and sync the binlog, then commit in InnoDB. With <code>sync_binlog=1</code> and <code>innodb_flush_log_at_trx_commit=1</code>, a durable commit could cost multiple fsync operations and required a recovery-time reconciliation between the two logs after a crash.</p>
<p>From MariaDB 12.3 the binary log can instead be stored in InnoDB-managed, page-structured files that participate in the InnoDB redo log and crash recovery. The files still live on disk as discrete objects with an <code>.ibb</code> extension, but internally they are 16 KB pages with a CRC32 checksum per page, pre-allocated to <code>max_binlog_size</code> (1 GB by default) so that write amplification from file extension disappears.</p>
<h3>What actually changes in the commit path</h3>
<p>The engine no longer needs to coordinate two logs, so the expensive cross-resource handshake disappears. At <code>innodb_flush_log_at_trx_commit=1</code> a commit performs a single coordinated fsync instead of the several required by the old protocol. Because the binlog and InnoDB always recover to a mutually consistent state, you can also run with <code>innodb_flush_log_at_trx_commit=0</code> or <code>2</code> and still guarantee that the binary log never diverges from table data after a crash &#8211; you are trading durability of the last few commits for throughput, not risking replication divergence.</p>
<p>Two long-standing configuration knobs become obsolete in this mode. <code>sync_binlog</code> is no longer required because crash safety is inherited from InnoDB, and <code>binlog_checksum</code> is unused because every page carries a CRC32 already. If you want integrity on the wire between primary and replica, enable TLS on the replication channel instead.</p>
<h3>Positioning becomes GTID-only</h3>
<p>The new implementation is GTID-native. There are no <code>.index</code> files, no GTID index files and no <code>.state</code> file. Instead the binary log periodically embeds GTID state records inside itself, by default every 2 MB, and that interval must be a power-of-two multiple of the 16 KB page size. When a replica connects, or when the server restarts, the log is scanned backwards from the most recent state record to recover the correct GTID position. </p>
<p>The practical consequence is that file-and-offset replication coordinates no longer exist on a primary running the InnoDB binlog: <code>SHOW BINLOG EVENTS</code> will generally report offsets of zero and you must navigate by GTID. The status counters <code>binlog_gtid_index_hit</code> and <code>binlog_gtid_index_miss</code> are also retired in this mode.</p>
<h3>Backup semantics improve</h3>
<p>Because the binlog is now InnoDB data, <code>mariadb-backup</code> includes it in a transactionally consistent way by default. That resolves a long-standing gap where physical backups and binary logs were captured by different mechanisms with slightly different consistency points, which is exactly the seam where point-in-time recovery used to fail during real incidents.</p>
<h3>When you should not enable it</h3>
<p>The InnoDB-based binary log is not a universal default. Stay on the traditional implementation if any of the following apply to your MariaDB 12.3 deployment:</p>
<ul>
<li>You run <strong>Galera Cluster</strong>. Synchronous multi-master requires the classic binlog implementation.</li>
<li>Applications or tooling depend on <strong>filename/offset replication positions</strong> rather than GTIDs.</li>
<li>Third-party CDC pipelines, such as change-data-capture connectors, <strong>parse binlog files directly</strong> from disk.</li>
<li>Your replicas are still below MariaDB 12.3. Upgrade replicas first, then switch the primary.</li>
</ul>
<p>Note also that the relay log on replicas is unchanged and still uses the traditional format, so the improvement applies to the write path of the primary, not to the apply path of the replica.</p>
<figure class="mdb-figure">
<div class="mdb-svgwrap">
<svg viewbox="0 0 1200 430" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="binlogTitle binlogDesc">
<title>MariaDB 12.3 commit path: traditional two-phase commit binary log versus InnoDB-based binary log</title>
<desc>Animated comparison showing the traditional binary log requiring multiple fsync operations across a two-phase commit, versus the MariaDB 12.3 InnoDB-based binary log requiring a single coordinated fsync.</desc>
<defs>
<lineargradient x1="0" y1="0" x2="1" y2="0"><stop offset="0%" stop-color="#7f1d1d"></stop><stop offset="100%" stop-color="#b91c1c"></stop></lineargradient>
<lineargradient x1="0" y1="0" x2="1" y2="0"><stop offset="0%" stop-color="#065f46"></stop><stop offset="100%" stop-color="#10b981"></stop></lineargradient>
<filter><fegaussianblur stddeviation="3" result="b"></fegaussianblur><femerge><femergenode in="b"></femergenode><femergenode in="SourceGraphic"></femergenode></femerge></filter>
</defs>
<text x="600" y="34" text-anchor="middle" fill="#e2e8f0" font-family="Segoe UI,Helvetica,Arial,sans-serif" font-size="21" font-weight="700">MariaDB 12.3 Commit Path: Two-Phase Commit vs InnoDB-Based Binary Log</text></p>
<p><g font-family="Segoe UI,Helvetica,Arial,sans-serif">
  <rect x="40" y="70" width="1120" height="150" rx="12" fill="#111827" stroke="#7f1d1d" stroke-width="1.5"></rect>
  <text x="60" y="98" fill="#fca5a5" font-size="15" font-weight="700">LEGACY — binlog + InnoDB as two durable resources (XA / 2PC)</text>
  <line x1="70" y1="170" x2="1130" y2="170" stroke="#334155" stroke-width="2"></line>
  <g fill="url(#lgOld)">
    <rect x="90" y="128" width="150" height="42" rx="8"></rect><rect x="300" y="128" width="170" height="42" rx="8"></rect>
    <rect x="530" y="128" width="170" height="42" rx="8"></rect><rect x="760" y="128" width="170" height="42" rx="8"></rect>
    <rect x="960" y="128" width="150" height="42" rx="8"></rect>
  </g>
  <g fill="#fee2e2" font-size="12.5" text-anchor="middle">
    <text x="165" y="154">InnoDB PREPARE</text><text x="385" y="154">fsync redo log</text>
    <text x="615" y="154">write binlog event</text><text x="845" y="154">fsync binlog</text>
    <text x="1035" y="154">InnoDB COMMIT</text>
  </g>
  <g fill="#fca5a5" font-size="11.5" text-anchor="middle">
    <text x="385" y="192">fsync #1</text><text x="845" y="192">fsync #2</text><text x="1035" y="192">fsync #3 (group)</text>
  </g>
  <circle r="8" fill="#fbbf24" filter="url(#glow2)">
    <animatemotion dur="5s" repeatcount="indefinite" path="M 95,149 L 1110,149"></animatemotion>
  </circle>
</g></p>
<p><g font-family="Segoe UI,Helvetica,Arial,sans-serif">
  <rect x="40" y="245" width="1120" height="150" rx="12" fill="#111827" stroke="#10b981" stroke-width="1.5"></rect>
  <text x="60" y="273" fill="#6ee7b7" font-size="15" font-weight="700">MariaDB 12.3 — binlog stored in InnoDB page files (.ibb), one durable resource</text>
  <line x1="70" y1="345" x2="1130" y2="345" stroke="#334155" stroke-width="2"></line>
  <g fill="url(#lgNew)">
    <rect x="120" y="303" width="220" height="42" rx="8"></rect>
    <rect x="430" y="303" width="290" height="42" rx="8"></rect>
    <rect x="810" y="303" width="250" height="42" rx="8"></rect>
  </g>
  <g fill="#d1fae5" font-size="12.5" text-anchor="middle">
    <text x="230" y="329">write row events to .ibb pages</text>
    <text x="575" y="329">single coordinated fsync (redo + binlog)</text>
    <text x="935" y="329">COMMIT visible &#038; crash-safe</text>
  </g>
  <g fill="#6ee7b7" font-size="11.5" text-anchor="middle">
    <text x="575" y="367">fsync #1 — and only #1</text>
    <text x="935" y="367">recovery inherited from InnoDB</text>
  </g>
  <circle r="8" fill="#34d399" filter="url(#glow2)">
    <animatemotion dur="2.2s" repeatcount="indefinite" path="M 125,324 L 1055,324"></animatemotion>
  </circle>
</g>
<text x="600" y="418" text-anchor="middle" fill="#94a3b8" font-family="Segoe UI,Helvetica,Arial,sans-serif" font-size="12.5">Animation speed is proportional to commit latency. sync_binlog and binlog_checksum are no longer required in the new mode.</text>
</svg>
</div><figcaption><strong>Figure 2.</strong> MariaDB 12.3 collapses the multi-fsync two-phase commit into a single coordinated flush by storing the binary log inside InnoDB.</figcaption></figure>
<h2>Optimizer Advancements in MariaDB 12.3</h2>
<p>The second structural change in MariaDB 12.3 is that query plans became controllable at statement granularity. Until now, plan stability on MariaDB was largely a matter of session variables, <code>optimizer_switch</code> bitmasks and index hints. That is a blunt instrument in a multi-tenant fleet where one report can destabilise an OLTP workload.</p>
<h3>A complete optimizer hint vocabulary</h3>
<p>MariaDB 12.3 ships a MySQL-compatible hint framework covering access methods, join strategy, join order, subquery handling and execution limits:</p>
<ul>
<li><strong>Access and algorithm hints:</strong> <code>NO_RANGE_OPTIMIZATION</code>, <code>NO_ICP</code>, <code>MRR</code> / <code>NO_MRR</code>, <code>BKA</code> / <code>NO_BKA</code>, <code>BNL</code> / <code>NO_BNL</code>, <code>[NO_]ROWID_FILTER</code>, <code>[NO_]INDEX_MERGE</code>.</li>
<li><strong>Index hints:</strong> <code>[NO_]INDEX</code>, <code>[NO_]JOIN_INDEX</code>, <code>[NO_]GROUP_INDEX</code>, <code>[NO_]ORDER_INDEX</code>.</li>
<li><strong>Join order hints:</strong> <code>JOIN_FIXED_ORDER</code>, <code>JOIN_ORDER</code>, <code>JOIN_PREFIX</code>, <code>JOIN_SUFFIX</code>.</li>
<li><strong>Subquery hints:</strong> <code>SEMIJOIN</code>, <code>SUBQUERY</code>, <code>[NO_]SPLIT_MATERIALIZED</code>, <code>[NO_]DERIVED_CONDITION_PUSHDOWN</code>, <code>[NO_]MERGE</code>.</li>
<li><strong>Guardrails:</strong> <code>MAX_EXECUTION_TIME</code>, plus <code>QB_NAME</code> and implicit query block names so hints can target a specific block of a nested statement.</li>
</ul>
<pre class="EnlighterJSRAW" data-enlighter-language="">-- Pin a report query without touching global optimizer_switch
SELECT /*+ QB_NAME(agg) MAX_EXECUTION_TIME(4000) NO_BNL(o) JOIN_PREFIX(c, o) */
       c.region, SUM(o.amount)
FROM   customers c
JOIN   orders o ON o.customer_id = c.id
WHERE  o.created_at >= NOW() - INTERVAL 1 DAY
GROUP  BY c.region;</pre>
<p>For internet-scale fleets this is the difference between a plan regression that pages an on-call engineer and one that is contained inside a single statement. Combine it with the extended optimizer trace, which in MariaDB 12.3 can record table and view definitions via <code>optimizer_record_context</code>, and post-incident plan forensics becomes reproducible.</p>
<h3>Reverse-ordered scans and DESC key parts</h3>
<p>Several optimizations that previously fired only on forward scans now work in reverse order. Rowid filtering and Index Condition Pushdown both apply to reverse-ordered scans, and the loose index scan used for <code>GROUP BY</code> can now exploit indexes with <code>DESC</code> key parts. Descending-order pagination on time-series tables &#8211; the classic <code>ORDER BY created_at DESC LIMIT n</code> pattern &#8211; is the workload that benefits most. Optimizations for <code>GROUP BY</code> and <code>ORDER BY</code> can also use indexes defined on virtual columns, which finally makes generated-column indexing a first-class tuning technique. For a deeper treatment of join planning, see our analysis of the <a href="https://minervadb.com/mariadb-join-optimizer/">MariaDB join optimizer</a>.</p>
<h3>Engine-level throughput work</h3>
<p>Metadata lock scalability was reworked, which matters on servers with tens of thousands of tables and aggressive DDL. The Aria storage engine gained a segmented key cache controlled by <code>aria_pagecache_segments</code> (default 1, maximum 128), reducing mutex contention on internal and temporary tables. Vector distance calculation was accelerated through extrapolation, which is relevant if you are using MariaDB as a vector store; we covered the storage layout in <a href="https://minervadb.com/understanding-vector-indexes-in-mariadb/">understanding vector indexes in MariaDB</a>.</p>
<h2>Replication and Galera Cluster Improvements in MariaDB 12.3</h2>
<p>Asynchronous replication between two Galera clusters can now use parallel replication, governed by <code>slave_parallel_threads</code>. This is the topology most large deployments actually run: a synchronous cluster per region, stitched together asynchronously across regions. Until now, the cross-region channel was effectively single-threaded and became the ceiling on write throughput for the whole estate. Removing that ceiling changes regional DR from best-effort to viable.</p>
<p>Other replication-layer changes with operational weight:</p>
<ul>
<li>Row events larger than <code>max_packet_size</code> are now fragmented rather than failing the channel &#8211; the historical cause of stalled replication on wide BLOB writes.</li>
<li>Defaults for <code>MASTER_SSL_*</code> are configurable, so TLS on replication channels can be enforced fleet-wide instead of per <code>CHANGE MASTER</code> statement.</li>
<li>Temporary table behaviour in replication is now predictable and controlled by <code>create_tmp_table_binlog_formats</code>.</li>
<li><code>show_slave_auth_info</code> and <code>replicate_same_server_id</code> are proper system variables rather than start-up options only, and the server reports whether it started with <code>skip-slave-start</code>.</li>
</ul>
<p>On the Galera side, Incremental State Transfers no longer perform needless foreign key checks, which materially shortens the window during which a rejoining node loads the cluster. Write-set application can be retried instead of aborting, controlled by <code>wsrep_applier_retry_count</code>, which reduces spurious node evictions under hot-row contention. Packaging also changed: the Galera dependency has been removed from the server packages, so Galera is now an explicit install rather than an implicit one. If you operate Galera in production, our field notes on <a href="https://minervadb.com/troubleshooting-writes-in-galera-cluster/">troubleshooting writes in Galera Cluster</a> and <a href="https://minervadb.com/mariadb-galera-cluster-monitoring/">MariaDB Galera Cluster monitoring</a> pair directly with these changes.</p>
<h2>Security, Compatibility and Developer Surface in MariaDB 12.3</h2>
<p>Security work in MariaDB 12.3 is focused on key material and identity. Passphrase-protected TLS keys are supported through the new <code>ssl_passphrase</code> system variable, the file key management plugin for transparent data encryption supports SHA-256 on Linux, and <code>SET SESSION AUTHORIZATION</code> allows a privileged session to execute as another user &#8211; a cleaner primitive for connection-pool multiplexing and for auditing than credential sharing. </p>
<p><code>DROP USER</code> now warns when the account still has live sessions, and fails outright in Oracle mode. The audit plugin gained buffered logging via <code>server_audit_file_buffer_size</code>, records the client host and port rather than host alone, and reports the negotiated TLS version. That combination makes audit logging viable on high-QPS nodes where it was previously too expensive; see our guide to <a href="https://minervadb.com/mariadb-user-activity-logging/">MariaDB user activity logging</a>.</p>
<p>The compatibility surface widened significantly. MariaDB 12.3 adds the <code>caching_sha2_password</code> authentication plugin for MySQL clients, Oracle-style <code>TO_DATE()</code>, <code>TO_NUMBER()</code> and <code>TRUNC()</code>, the Oracle <code>(+)</code> outer-join operator in Oracle mode, associative arrays through <code>DECLARE TYPE ... TABLE OF ... INDEX BY</code>, weak <code>SYS_REFCURSOR</code> support with a <code>max_open_cursors</code> ceiling, cursors on prepared statements, the SQL standard <code>SET PATH</code> statement and <code>IS JSON</code> predicate, a basic XML data type, and the ability for <code>UPDATE</code> and <code>DELETE</code> to read from a CTE. Triggers can now fire on multiple events, foreign key constraint names only need to be unique per table, and the 32-level depth limit on JSON functions is gone. Nine new GIS functions improve MySQL 8 parity.</p>
<p>Six CVEs were fixed in the 12.3.2 GA build, the most severe carrying a CVSS v3.1 base score of 8.0. That alone justifies scheduling the upgrade rather than deferring it.</p>
<h2>Reference Architecture: Highly Available MariaDB 12.3 at Internet Scale</h2>
<p>Availability is not a feature you enable; it is a property that emerges from how you arrange failure domains. The architecture below is the pattern MinervaDB deploys for workloads that must tolerate the loss of a node, a rack, an availability zone or an entire region without data loss and without a maintenance window. It layers synchronous replication inside a region for zero-RPO, asynchronous GTID replication across regions for geographic survivability, and a routing tier that makes failover invisible to the application.</p>
<figure class="mdb-figure">
<div class="mdb-svgwrap">
<svg viewbox="0 0 1240 880" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="haTitle haDesc">
<title>MariaDB 12.3 highly available and fault tolerant reference architecture for internet scale</title>
<desc>Three-region MariaDB 12.3 architecture: GeoDNS and stateless application tier feeding MaxScale routing layers, three-node Galera clusters per region across availability zones, cross-region asynchronous GTID replication, object storage backups with point in time recovery, Kubernetes operator control plane and observability.</desc>
<defs>
<lineargradient x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#1e3a8a"></stop><stop offset="100%" stop-color="#1d4ed8"></stop></lineargradient>
<lineargradient x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#134e4a"></stop><stop offset="100%" stop-color="#0f766e"></stop></lineargradient>
<lineargradient x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#4c1d95"></stop><stop offset="100%" stop-color="#6d28d9"></stop></lineargradient>
<lineargradient x1="0" y1="0" x2="1" y2="0"><stop offset="0%" stop-color="#0ea5e9"></stop><stop offset="50%" stop-color="#6366f1"></stop><stop offset="100%" stop-color="#0ea5e9"></stop></lineargradient>
<filter><fegaussianblur stddeviation="4" result="bl"></fegaussianblur><femerge><femergenode in="bl"></femergenode><femergenode in="SourceGraphic"></femergenode></femerge></filter>
<marker viewbox="0 0 10 10" refx="9" refy="5" markerwidth="7" markerheight="7" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" fill="#7dd3fc"></path></marker>
<marker viewbox="0 0 10 10" refx="9" refy="5" markerwidth="7" markerheight="7" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" fill="#34d399"></path></marker>
</defs>
<g font-family="Segoe UI,Helvetica,Arial,sans-serif">
<text x="620" y="36" text-anchor="middle" fill="#f1f5f9" font-size="23" font-weight="700">MariaDB 12.3 LTS — Internet-Scale, Fault-Tolerant Reference Architecture</text>
<text x="620" y="60" text-anchor="middle" fill="#94a3b8" font-size="13.5">3 regions · 9 synchronous nodes · MaxScale routing · cross-region async GTID · object-storage PITR · zero-RPO in region</text></p>
<p><rect x="50" y="78" width="1140" height="48" rx="10" fill="url(#gBar)" opacity="0.92"></rect>
<text x="620" y="107" text-anchor="middle" fill="#f8fafc" font-size="14.5" font-weight="600">Global Traffic Management — GeoDNS / Anycast GSLB · health-checked · latency-based steering · regional drain</text></p>
<p><rect x="50" y="140" width="1140" height="46" rx="10" fill="#0f172a" stroke="#334155"></rect>
<text x="620" y="168" text-anchor="middle" fill="#cbd5e1" font-size="13.5">Stateless Application Tier — bounded connection pools · idempotent writes · exponential backoff with jitter · circuit breakers</text></p>
<p><g stroke="#7dd3fc" stroke-width="2" fill="none" marker-end="url(#arw)" opacity="0.85">
  <path d="M 230 188 L 230 214" stroke-dasharray="6 5"><animate attributename="stroke-dashoffset" values="22;0" dur="1.1s" repeatcount="indefinite"></animate></path>
  <path d="M 620 188 L 620 214" stroke-dasharray="6 5"><animate attributename="stroke-dashoffset" values="22;0" dur="1.1s" repeatcount="indefinite"></animate></path>
  <path d="M 1010 188 L 1010 214" stroke-dasharray="6 5"><animate attributename="stroke-dashoffset" values="22;0" dur="1.1s" repeatcount="indefinite"></animate></path>
</g></p>
<p><g>
  <rect x="50" y="216" width="360" height="386" rx="14" fill="#0b1224" stroke="#1d4ed8" stroke-width="2"></rect>
  <text x="68" y="242" fill="#93c5fd" font-size="13.5" font-weight="700">REGION A — us-east · ACTIVE / WRITE</text>
  <rect x="66" y="254" width="328" height="60" rx="9" fill="#111c3a" stroke="#3b82f6"></rect>
  <text x="230" y="275" text-anchor="middle" fill="#dbeafe" font-size="12.5" font-weight="600">MaxScale x2 (VIP / keepalived)</text>
  <text x="230" y="294" text-anchor="middle" fill="#93c5fd" font-size="11">readwritesplit · causal_reads · transaction replay · auto-failover</text>
  <rect x="66" y="326" width="328" height="196" rx="9" fill="#0d1730" stroke="#3b82f6" stroke-dasharray="4 4"></rect>
  <text x="230" y="346" text-anchor="middle" fill="#bfdbfe" font-size="12" font-weight="600">MariaDB 12.3 Galera Cluster — segment 0</text>
  <g fill="url(#gA)" stroke="#60a5fa">
    <rect x="78" y="358" width="98" height="86" rx="8"></rect><rect x="181" y="358" width="98" height="86" rx="8"></rect><rect x="284" y="358" width="98" height="86" rx="8"></rect>
  </g>
  <g fill="#eff6ff" font-size="11.5" text-anchor="middle">
    <text x="127" y="382">AZ-a</text><text x="230" y="382">AZ-b</text><text x="333" y="382">AZ-c</text>
  </g>
  <g fill="#bfdbfe" font-size="10.5" text-anchor="middle">
    <text x="127" y="399">node-1</text><text x="230" y="399">node-2</text><text x="333" y="399">node-3</text>
    <text x="127" y="435">primary</text><text x="230" y="435">sync</text><text x="333" y="435">sync</text>
  </g>
  <g fill="none" stroke="#38bdf8">
    <circle cx="127" cy="415" r="5" fill="#38bdf8"><animate attributename="r" values="4;14;4" dur="2.4s" repeatcount="indefinite"></animate><animate attributename="opacity" values="1;0.15;1" dur="2.4s" repeatcount="indefinite"></animate></circle>
    <circle cx="230" cy="415" r="5" fill="#38bdf8"><animate attributename="r" values="4;14;4" dur="2.4s" begin="0.8s" repeatcount="indefinite"></animate><animate attributename="opacity" values="1;0.15;1" dur="2.4s" begin="0.8s" repeatcount="indefinite"></animate></circle>
    <circle cx="333" cy="415" r="5" fill="#38bdf8"><animate attributename="r" values="4;14;4" dur="2.4s" begin="1.6s" repeatcount="indefinite"></animate><animate attributename="opacity" values="1;0.15;1" dur="2.4s" begin="1.6s" repeatcount="indefinite"></animate></circle>
  </g>
  <g stroke="#7dd3fc" stroke-width="1.8" fill="none" stroke-dasharray="5 4">
    <path d="M 176 460 L 181 460"></path>
    <path d="M 100 452 C 100 474, 360 474, 360 452"><animate attributename="stroke-dashoffset" values="36;0" dur="1.6s" repeatcount="indefinite"></animate></path>
  </g>
  <text x="230" y="496" text-anchor="middle" fill="#7dd3fc" font-size="10.5">wsrep quorum · pc.weight · gmcast.segment · fast IST rejoin</text>
  <text x="230" y="512" text-anchor="middle" fill="#64748b" font-size="10.5">SST via mariadb-backup · gcache sized for full AZ outage</text>
  <text x="68" y="542" fill="#94a3b8" font-size="11">Durability: innodb_flush_log_at_trx_commit=1, O_DIRECT, NVMe</text>
  <text x="68" y="560" fill="#94a3b8" font-size="11">Binlog: traditional format (Galera requirement in 12.3)</text>
  <text x="68" y="578" fill="#94a3b8" font-size="11">RPO in-region: 0 · RTO on node loss: < 5 s (proxy-side)</text>
</g></p>
<p><g>
  <rect x="440" y="216" width="360" height="386" rx="14" fill="#08161a" stroke="#0f766e" stroke-width="2"></rect>
  <text x="458" y="242" fill="#5eead4" font-size="13.5" font-weight="700">REGION B — eu-west · WARM STANDBY / DR</text>
  <rect x="456" y="254" width="328" height="60" rx="9" fill="#0b2422" stroke="#14b8a6"></rect>
  <text x="620" y="275" text-anchor="middle" fill="#ccfbf1" font-size="12.5" font-weight="600">MaxScale x2 (idle writer, live readers)</text>
  <text x="620" y="294" text-anchor="middle" fill="#5eead4" font-size="11">promotion runbook · scripted switchover · STONITH fencing</text>
  <rect x="456" y="326" width="328" height="196" rx="9" fill="#08201e" stroke="#14b8a6" stroke-dasharray="4 4"></rect>
  <text x="620" y="346" text-anchor="middle" fill="#99f6e4" font-size="12" font-weight="600">MariaDB 12.3 Galera Cluster — segment 1</text>
  <g fill="url(#gB)" stroke="#2dd4bf">
    <rect x="468" y="358" width="98" height="86" rx="8"></rect><rect x="571" y="358" width="98" height="86" rx="8"></rect><rect x="674" y="358" width="98" height="86" rx="8"></rect>
  </g>
  <g fill="#f0fdfa" font-size="11.5" text-anchor="middle"><text x="517" y="382">AZ-a</text><text x="620" y="382">AZ-b</text><text x="723" y="382">AZ-c</text></g>
  <g fill="#99f6e4" font-size="10.5" text-anchor="middle">
    <text x="517" y="399">node-4</text><text x="620" y="399">node-5</text><text x="723" y="399">node-6</text>
    <text x="517" y="435">applier</text><text x="620" y="435">sync</text><text x="723" y="435">sync</text>
  </g>
  <g>
    <circle cx="517" cy="415" r="5" fill="#2dd4bf"><animate attributename="r" values="4;13;4" dur="2.8s" repeatcount="indefinite"></animate><animate attributename="opacity" values="1;0.15;1" dur="2.8s" repeatcount="indefinite"></animate></circle>
    <circle cx="620" cy="415" r="5" fill="#2dd4bf"><animate attributename="r" values="4;13;4" dur="2.8s" begin="0.9s" repeatcount="indefinite"></animate><animate attributename="opacity" values="1;0.15;1" dur="2.8s" begin="0.9s" repeatcount="indefinite"></animate></circle>
    <circle cx="723" cy="415" r="5" fill="#2dd4bf"><animate attributename="r" values="4;13;4" dur="2.8s" begin="1.8s" repeatcount="indefinite"></animate><animate attributename="opacity" values="1;0.15;1" dur="2.8s" begin="1.8s" repeatcount="indefinite"></animate></circle>
  </g>
  <text x="620" y="496" text-anchor="middle" fill="#5eead4" font-size="10.5">parallel apply of cross-region stream (slave_parallel_threads)</text>
  <text x="620" y="512" text-anchor="middle" fill="#64748b" font-size="10.5">wsrep_applier_retry_count softens hot-row conflicts</text>
  <text x="458" y="542" fill="#94a3b8" font-size="11">Target RTO on region loss: < 90 s (DNS + promotion)</text>
  <text x="458" y="560" fill="#94a3b8" font-size="11">Target RPO on region loss: < 1 s (async lag budget)</text>
  <text x="458" y="578" fill="#94a3b8" font-size="11">Continuously restore-tested from object storage</text>
</g></p>
<p><g>
  <rect x="830" y="216" width="360" height="386" rx="14" fill="#150b26" stroke="#6d28d9" stroke-width="2"></rect>
  <text x="848" y="242" fill="#c4b5fd" font-size="13.5" font-weight="700">REGION C — ap-south · READ SCALE-OUT</text>
  <rect x="846" y="254" width="328" height="60" rx="9" fill="#1c1033" stroke="#8b5cf6"></rect>
  <text x="1010" y="275" text-anchor="middle" fill="#ede9fe" font-size="12.5" font-weight="600">MaxScale read router (read-only service)</text>
  <text x="1010" y="294" text-anchor="middle" fill="#c4b5fd" font-size="11">max_slave_replication_lag · sticky sessions for read-your-write</text>
  <rect x="846" y="326" width="328" height="196" rx="9" fill="#170e2b" stroke="#8b5cf6" stroke-dasharray="4 4"></rect>
  <text x="1010" y="346" text-anchor="middle" fill="#ddd6fe" font-size="12" font-weight="600">Asynchronous GTID replicas (MariaDB 12.3)</text>
  <g fill="url(#gC)" stroke="#a78bfa">
    <rect x="858" y="358" width="150" height="86" rx="8"></rect><rect x="1014" y="358" width="150" height="86" rx="8"></rect>
  </g>
  <g fill="#f5f3ff" font-size="11.5" text-anchor="middle"><text x="933" y="382">read replica</text><text x="1089" y="382">delayed replica</text></g>
  <g fill="#ddd6fe" font-size="10.5" text-anchor="middle">
    <text x="933" y="399">analytics + BI</text><text x="1089" y="399">MASTER_DELAY = 900</text>
    <text x="933" y="435">parallel apply</text><text x="1089" y="435">logical-corruption shield</text>
  </g>
  <circle cx="933" cy="415" r="5" fill="#a78bfa"><animate attributename="r" values="4;13;4" dur="3.2s" repeatcount="indefinite"></animate><animate attributename="opacity" values="1;0.15;1" dur="3.2s" repeatcount="indefinite"></animate></circle>
  <circle cx="1089" cy="415" r="5" fill="#a78bfa"><animate attributename="r" values="4;13;4" dur="3.2s" begin="1.1s" repeatcount="indefinite"></animate><animate attributename="opacity" values="1;0.15;1" dur="3.2s" begin="1.1s" repeatcount="indefinite"></animate></circle>
  <text x="1010" y="496" text-anchor="middle" fill="#c4b5fd" font-size="10.5">InnoDB-based binlog candidates — GTID-only, no Galera</text>
  <text x="1010" y="512" text-anchor="middle" fill="#64748b" font-size="10.5">single coordinated fsync per commit on the write path</text>
  <text x="848" y="542" fill="#94a3b8" font-size="11">Serves regional read traffic at < 20 ms p99</text>
  <text x="848" y="560" fill="#94a3b8" font-size="11">Never promoted to writer — capacity, not availability</text>
  <text x="848" y="578" fill="#94a3b8" font-size="11">Delayed replica rewinds human error without full restore</text>
</g></p>
<p><g>
  <rect x="50" y="618" width="1140" height="58" rx="10" fill="#0f172a" stroke="#10b981" stroke-width="1.5"></rect>
  <text x="70" y="640" fill="#6ee7b7" font-size="12.5" font-weight="700">CROSS-REGION ASYNCHRONOUS GTID REPLICATION</text>
  <text x="70" y="662" fill="#94a3b8" font-size="11">Galera-to-Galera with parallel replication · TLS-enforced channels · fragmented large row events · monitored lag budget</text>
  <path d="M 380 668 L 1150 668" stroke="#10b981" stroke-width="2.5" fill="none" stroke-dasharray="8 6" marker-end="url(#arwG)">
    <animate attributename="stroke-dashoffset" values="56;0" dur="1.4s" repeatcount="indefinite"></animate>
  </path>
  <circle r="6" fill="#34d399" filter="url(#softGlow)"><animatemotion dur="3s" repeatcount="indefinite" path="M 380 668 L 1150 668"></animatemotion></circle>
  <circle r="6" fill="#34d399" filter="url(#softGlow)"><animatemotion dur="3s" begin="1.5s" repeatcount="indefinite" path="M 380 668 L 1150 668"></animatemotion></circle>
  <g stroke="#10b981" stroke-width="1.6" fill="none" stroke-dasharray="4 4" opacity="0.8">
    <path d="M 230 604 L 230 618"></path><path d="M 620 604 L 620 618"></path><path d="M 1010 604 L 1010 618"></path>
  </g>
</g></p>
<p><g font-size="11">
  <rect x="50" y="694" width="360" height="132" rx="12" fill="#0b1224" stroke="#334155"></rect>
  <text x="68" y="716" fill="#f1f5f9" font-size="12.5" font-weight="700">BACKUP, PITR &#038; DR</text>
  <text x="68" y="738" fill="#94a3b8">mariadb-backup full + incremental, streamed</text>
  <text x="68" y="756" fill="#94a3b8">S3 with versioning, object-lock, cross-region copy</text>
  <text x="68" y="774" fill="#94a3b8">InnoDB log archiving for point-in-time recovery</text>
  <text x="68" y="792" fill="#94a3b8">Binlogs captured consistently (InnoDB binlog mode)</text>
  <text x="68" y="810" fill="#94a3b8">Automated monthly restore drills, timed against RTO</text></p>
<p>  <rect x="440" y="694" width="360" height="132" rx="12" fill="#0b1224" stroke="#334155"></rect>
  <text x="458" y="716" fill="#f1f5f9" font-size="12.5" font-weight="700">KUBERNETES CONTROL PLANE</text>
  <text x="458" y="738" fill="#94a3b8">mariadb-operator CRDs: MariaDB, MaxScale, Backup</text>
  <text x="458" y="756" fill="#94a3b8">Rolling update: ReplicasFirstPrimaryLast</text>
  <text x="458" y="774" fill="#94a3b8">Blue/green multi-cluster upgrades, zero downtime</text>
  <text x="458" y="792" fill="#94a3b8">VolumeSnapshot physical backups, volume expansion</text>
  <text x="458" y="810" fill="#94a3b8">Automated TLS issuance and rotation, maintenance mode</text></p>
<p>  <rect x="830" y="694" width="360" height="132" rx="12" fill="#0b1224" stroke="#334155"></rect>
  <text x="848" y="716" fill="#f1f5f9" font-size="12.5" font-weight="700">OBSERVABILITY &#038; SLOs</text>
  <text x="848" y="738" fill="#94a3b8">wsrep_flow_control_paused < 0.02</text>
  <text x="848" y="756" fill="#94a3b8">wsrep_local_recv_queue_avg < 0.5</text>
  <text x="848" y="774" fill="#94a3b8">Seconds_Behind_Master p99 < 1 s cross-region</text>
  <text x="848" y="792" fill="#94a3b8">Commit latency p99, fsync rate, history list length</text>
  <text x="848" y="810" fill="#94a3b8">Error budget burn alerts, not threshold spam</text>
</g></p>
<p><text x="620" y="856" text-anchor="middle" fill="#64748b" font-size="11.5">Pulsing nodes indicate live certification traffic; the green lane animates the cross-region GTID stream. Zero RPO inside a region, sub-second RPO across regions.</text>
</g>
</svg>
</div><figcaption><strong>Figure 3.</strong> Interactive view — a MariaDB 12.3 internet-scale topology: synchronous Galera inside each region, asynchronous GTID replication across regions, MaxScale routing, and object-storage backed point-in-time recovery.</figcaption></figure>
<h3>Tier 0 — Enumerate failure domains before choosing technology</h3>
<p>Design starts by writing down what can fail and what each failure must cost you. A useful matrix for MariaDB 12.3 deployments looks like this:</p>
<table>
<thead>
<tr>
<th>Failure domain</th>
<th>Mechanism that absorbs it</th>
<th>Target RPO</th>
<th>Target RTO</th>
</tr>
</thead>
<tbody>
<tr>
<td>Single process / OOM kill</td>
<td>systemd restart + Galera IST rejoin</td>
<td>0</td>
<td>< 30 s</td>
</tr>
<tr>
<td>Node or host failure</td>
<td>Galera quorum (2 of 3) + MaxScale re-route</td>
<td>0</td>
<td>< 5 s</td>
</tr>
<tr>
<td>Rack / availability zone loss</td>
<td>One node per AZ, <code>gmcast.segment</code> awareness</td>
<td>0</td>
<td>< 15 s</td>
</tr>
<tr>
<td>Region loss</td>
<td>Async GTID standby cluster + GSLB steering</td>
<td>< 1 s</td>
<td>< 90 s</td>
</tr>
<tr>
<td>Logical corruption / bad deploy</td>
<td>Delayed replica + PITR from object storage</td>
<td>Point-in-time</td>
<td>Minutes to hours</td>
</tr>
<tr>
<td>Storage / silent corruption</td>
<td>Page checksums, backup verification, restore drills</td>
<td>Point-in-time</td>
<td>Hours</td>
</tr>
</tbody>
</table>
<p>Notice that only two rows are solved by replication. The rest are solved by backups, delayed replicas and process discipline. Teams that equate high availability with clustering discover this during their first bad migration.</p>
<h3>Tier 1 — Synchronous replication inside the region</h3>
<p>Inside a region, use a three-node MariaDB 12.3 Galera cluster with exactly one node per availability zone. Three nodes is the minimum that tolerates the loss of one while retaining a majority; five nodes buys tolerance of two failures at the cost of higher certification latency, because every transaction must be replicated to every node before commit returns.</p>
<p>The parameters that decide whether the cluster is stable under load are not the ones people usually tune. Size <code>gcache.size</code> to cover the longest plausible node outage so a rejoining node can use an Incremental State Transfer rather than a full State Snapshot Transfer; a full SST on a multi-terabyte dataset is a self-inflicted outage. Set <code>wsrep_sst_method=mariabackup</code> so donors remain readable. </p>
<p>Use <code>gmcast.segment</code> so that inter-AZ traffic is not multiplied by the number of nodes. Tune <code>gcs.fc_limit</code> deliberately: flow control is Galera telling you the slowest node cannot keep up, and raising the limit hides the symptom while increasing the amount of data at risk. Finally, keep <code>wsrep_slave_threads</code> aligned with the number of independently writable tables rather than with CPU count.</p>
<p>MariaDB 12.3 improves two of the worst Galera failure modes directly. Incremental State Transfers no longer waste time re-validating foreign keys, so rejoin time drops on schemas with heavy referential integrity. And <code>wsrep_applier_retry_count</code> lets a node retry a conflicting write-set instead of dropping out of the cluster, which is exactly the behaviour you want on hot counters and sequence-like rows.</p>
<h3>Tier 2 — Asynchronous replication across regions</h3>
<p>Synchronous replication across a wide-area link is an availability anti-pattern: it converts network latency into commit latency and a partition into an outage. Instead, replicate asynchronously from the active regional cluster to a standby cluster using GTIDs.</p>
<p>This is where MariaDB 12.3 changes the calculus. Asynchronous replication between two Galera clusters can now apply in parallel using <code>slave_parallel_threads</code>, so the cross-region channel no longer serialises the write throughput of an entire region. Combine it with <code>slave_parallel_mode=optimistic</code>, GTID-based <code>CHANGE MASTER TO ... master_use_gtid=slave_pos</code>, and enforced TLS defaults on the channel. Add a semi-synchronous acknowledgement with <code>rpl_semi_sync_master_wait_point=AFTER_SYNC</code> only if your RPO requirement is stricter than the replication lag you can actually sustain, and always configure a wait timeout so the primary degrades to asynchronous rather than stalling when the standby is unreachable. Our guide on <a href="https://minervadb.com/scaling-mariadb-horizontally/">horizontally scaling MariaDB</a> covers the read-scaling side of this topology.</p>
<h3>Tier 3 — The routing tier is what the application actually sees</h3>
<p>Applications should never hold a connection to a database node. They connect to MaxScale, which owns topology knowledge and failure detection. Deploy at least two MaxScale instances behind a virtual IP or a Kubernetes service, configure the <code>readwritesplit</code> router, enable transaction replay so in-flight transactions survive a backend failover, and enable causal reads so a read issued immediately after a write is routed to a node that has applied it. Set <code>max_slave_replication_lag</code> to keep stale replicas out of the read pool.</p>
<p>MariaDB 12.3 also carries a connection redirection mechanism in the client/server protocol, which lets a proxy hand a client off to the correct node instead of proxying every packet. For very high connection counts this removes the proxy from the data path once routing is established. ProxySQL remains a valid alternative where query rewriting and fine-grained rule sets matter; see our notes on <a href="https://minervadb.com/troubleshooting-proxysql-01/">troubleshooting ProxySQL in high-velocity ingestion</a>.</p>
<h3>Tier 4 — Declarative operations on Kubernetes</h3>
<p>If you run on Kubernetes, the <a href="https://github.com/mariadb-operator/mariadb-operator" target="_blank" rel="noopener">mariadb-operator</a> expresses this whole topology as custom resources. It supports both asynchronous replication and synchronous Galera topologies, manages MaxScale as a first-class object, performs cluster-aware rolling updates that roll replica pods first and the primary last, and supports blue/green upgrades across two identical clusters so a version change becomes a traffic switch instead of a restart. Physical backups run through <code>mariadb-backup</code> and VolumeSnapshots, and binary log archiving enables point-in-time recovery. Our article on <a href="https://minervadb.com/tuning-mariadb-for-cloud/">tuning MariaDB for cloud and containerized environments</a> covers the resource-limit and storage-class decisions that make or break this layer.</p>
<h3>Tier 5 — Backups are the only true fault tolerance</h3>
<p>Replication propagates mistakes at the speed of the network. Backups do not. Run daily full plus hourly incremental <code>mariadb-backup</code> jobs streamed to object storage with versioning and object-lock enabled, replicate the bucket cross-region, and enable InnoDB log archiving so you can replay to a specific log sequence number. Under the InnoDB-based binary log, backups now include binlog files transactionally, which removes the historical seam between a physical backup and the binlog stream. </p>
<p>Then do the part most teams skip: restore automatically on a schedule, into an isolated environment, and measure the restore time against your stated RTO. A backup that has never been restored is a hypothesis. See our reference on <a href="https://minervadb.com/transfer-backed-up-data-to-a-mariadb-replica/">transferring backed-up data to a MariaDB replica</a>.</p>
<h2>Production Configuration Baselines for MariaDB 12.3</h2>
<p>The following is a starting point for a 64-core, 512 GB, NVMe-backed MariaDB 12.3 node participating in a Galera cluster. Treat it as a hypothesis to be validated with your own workload, not a copy-paste answer.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="">[mariadb]
# --- Durability and memory ---
innodb_buffer_pool_size          = 360G
innodb_buffer_pool_instances     = 16
innodb_log_file_size             = 16G
innodb_flush_log_at_trx_commit   = 1
innodb_flush_method              = O_DIRECT
innodb_io_capacity               = 20000
innodb_io_capacity_max           = 40000
innodb_read_io_threads           = 16
innodb_write_io_threads          = 16
innodb_adaptive_hash_index       = OFF

# --- Replication (GTID everywhere) ---
log_bin
binlog_format                    = ROW
binlog_row_image                 = MINIMAL
gtid_strict_mode                 = ON
slave_parallel_threads           = 16
slave_parallel_mode              = optimistic
expire_logs_days                 = 7

# --- Galera ---
wsrep_on                         = ON
wsrep_provider                   = /usr/lib/galera/libgalera_smm.so
wsrep_sst_method                 = mariabackup
wsrep_slave_threads              = 16
wsrep_applier_retry_count        = 3
wsrep_provider_options           = "gcache.size=64G; gcs.fc_limit=64; gmcast.segment=0; evs.suspect_timeout=PT10S; evs.inactive_timeout=PT30S"

# --- Aria (internal + temporary tables) ---
aria_pagecache_buffer_size       = 8G
aria_pagecache_segments          = 16

# --- Observability and safety ---
server_audit_file_buffer_size    = 8M
max_execution_time               = 30000
optimizer_record_context         = ON</pre>
<p>On a non-Galera MariaDB 12.3 primary that uses GTID replication exclusively, you can additionally enable the InnoDB-based binary log and delete <code>sync_binlog</code> and <code>binlog_checksum</code> from your configuration entirely. Verify replica versions first.</p>
<h2>Observability: The SLIs That Actually Predict a MariaDB Outage</h2>
<p>Most MariaDB dashboards measure the wrong things. Query counts and buffer pool hit ratios are descriptive; they are rarely predictive. The signals below lead incidents by minutes to hours:</p>
<ul>
<li><strong><code>wsrep_flow_control_paused</code></strong> — the fraction of time the cluster was paused by flow control. Anything sustained above 0.02 means the slowest node is governing your write throughput.</li>
<li><strong><code>wsrep_local_recv_queue_avg</code></strong> — a rising average means an applier cannot keep up and a certification failure storm is likely.</li>
<li><strong><code>wsrep_cert_deps_distance</code></strong> — the achievable parallelism of your workload; it tells you whether raising <code>wsrep_slave_threads</code> would help at all.</li>
<li><strong>InnoDB history list length</strong> — unbounded growth means purge is behind, and purge lag is the silent precursor to a storage emergency.</li>
<li><strong>Commit latency p99 and fsync rate</strong> — the pair that reveals whether the InnoDB binary log change delivered the throughput it promised.</li>
<li><strong>Replication lag distribution, not average</strong> — cross-region RPO is defined by the tail, never by the mean.</li>
</ul>
<p>Alert on error-budget burn rate rather than static thresholds, and keep a runbook link in every alert. Our field guide to <a href="https://minervadb.com/mariadb-performance-monitoring-metrics/">MariaDB performance monitoring metrics</a> expands each of these into queries and thresholds, and <a href="https://minervadb.com/troubleshooting-mariadb-performance/">troubleshooting MariaDB performance</a> covers the diagnostic path once an alert fires.</p>
<h2>Failure Modes and Anti-Patterns to Avoid</h2>
<ul>
<li><strong>Two-node Galera clusters.</strong> A two-node cluster has no majority; losing either node halts the survivor. Use three, or two plus a garbd arbitrator.</li>
<li><strong>Writing to all Galera nodes without partitioning.</strong> Multi-master is a topology, not a write strategy. Route writes for a given hot table to one node to avoid certification conflicts, even in MariaDB 12.3 where retries soften the impact.</li>
<li><strong>Raising <code>gcs.fc_limit</code> to silence flow control.</strong> You are increasing unreplicated data in flight while hiding the node that is actually slow.</li>
<li><strong>Enabling the InnoDB binary log on a Galera node.</strong> It is unsupported in that topology; verify before you roll a configuration change fleet-wide.</li>
<li><strong>Relying on <code>Seconds_Behind_Master</code> alone.</strong> It reports apply lag, not the transport gap. Use GTID position deltas and a heartbeat table.</li>
<li><strong>DDL without a plan.</strong> Schema changes in Galera can block the entire cluster under Total Order Isolation. Use Rolling Schema Upgrade or an online schema change tool with explicit checks.</li>
<li><strong>Untested failover.</strong> If you have not performed a switchover in the last quarter, your RTO is an estimate, not a commitment. Related reading: <a href="https://minervadb.com/mariadb-2025-high-availability-best-practices/">MariaDB high availability best practices</a> and <a href="https://minervadb.com/mariadb-deadlock-troubleshooting/">MariaDB deadlock troubleshooting</a>.</li>
</ul>
<h2>Upgrading from MariaDB 11.8 to MariaDB 12.3</h2>
<p>Because MariaDB 12.3 is the first LTS after 11.8, the upgrade crosses four release boundaries of accumulated change. Three categories of breakage deserve a pre-flight check.</p>
<p><strong>New reserved words.</strong> <code>CONVERSION</code>, <code>ST_COLLECT</code> and <code>TO_DATE</code> are now reserved. Any identifier using them must be backtick-quoted. Grep your schema and application SQL before the maintenance window, not during it.</p>
<p><strong>Removed system variables.</strong> <code>big_tables</code>, <code>large_page_size</code> and <code>storage_engine</code> were removed in the 12.0 line. If they remain in <code>my.cnf</code>, the server will refuse to start.</p>
<p><strong>A GTID setting regression in 12.3.2.</strong> When a replica is upgraded from a pre-12.3 release directly to 12.3.2, the <code>master_use_gtid</code> setting from <code>CHANGE MASTER TO</code> is not carried over and resets to <code>DEFAULT</code>. This is fixed in 12.3.3. If you land on 12.3.2, re-apply <code>master_use_gtid</code> immediately after the upgrade and verify with <code>SHOW REPLICA STATUS</code>. Downgrades are unaffected.</p>
<p>The safe rollout order for a Galera plus async topology is: upgrade the DR region first, then read replicas, then the non-primary nodes of the active cluster one at a time, then the primary via a controlled MaxScale switchover. Take a verified <code>mariadb-backup</code> before the first node, run <code>mariadb-upgrade</code> where required, and keep the old binaries installed until you have completed a full business cycle on the new version. Follow the official <a href="https://mariadb.com/docs/server/server-management/install-and-upgrade-mariadb/upgrading" target="_blank" rel="noopener">MariaDB upgrade documentation</a> for platform specifics.</p>
<h2>Benchmarking and Capacity Planning for MariaDB 12.3</h2>
<p>Do not accept the throughput claims of any release — including this one — without measuring them on your own hardware and workload shape. A defensible benchmark for the MariaDB 12.3 binary log change looks like this:</p>
<ol>
<li>Capture a production workload sample and replay it, rather than running a synthetic uniform-random benchmark that no application resembles.</li>
<li>Measure with the traditional binlog at <code>sync_binlog=1</code>, <code>innodb_flush_log_at_trx_commit=1</code> as your control.</li>
<li>Re-measure with the InnoDB-based binlog at <code>innodb_flush_log_at_trx_commit=1</code>. Record commit latency percentiles, not averages, and record device-level fsync counts.</li>
<li>Run a third pass at <code>innodb_flush_log_at_trx_commit=2</code> to quantify what relaxed durability actually buys now that consistency between log and engine is guaranteed regardless.</li>
<li>Repeat each pass with a deliberately induced crash to confirm recovery time and GTID continuity.</li>
</ol>
<p>Capacity planning should then be expressed in headroom rather than utilisation: a cluster running at 70% of measured write capacity has no room to absorb the loss of a node, because the survivors inherit the load and the certification cost of the failure. Size for N-1 in region and N-1 across regions.</p>
<h2>Frequently Asked Questions About MariaDB 12.3</h2>
<h3>Is MariaDB 12.3 a long-term support release?</h3>
<p>Yes. MariaDB 12.3 reached Stable/GA on 28 May 2026 and is maintained until June 2029. It is the successor LTS to MariaDB 11.8.</p>
<h3>Should I enable the InnoDB-based binary log in MariaDB 12.3?</h3>
<p>Enable it on GTID-only replication topologies where you control the tooling and all replicas run MariaDB 12.3 or later. Do not enable it on Galera Cluster nodes, on systems that depend on filename/offset positions, or where third-party tools parse binlog files from disk.</p>
<h3>Does MariaDB 12.3 change how Galera Cluster behaves?</h3>
<p>Yes, in three ways. Incremental State Transfers skip redundant foreign key checks, write-set application can be retried via <code>wsrep_applier_retry_count</code>, and asynchronous replication between two Galera clusters can now apply in parallel. Galera is also no longer a package dependency of the server, so it must be installed explicitly.</p>
<h3>What is the fastest safe upgrade path from MariaDB 10.11 to MariaDB 12.3?</h3>
<p>Upgrade in LTS steps — 10.11 to 11.4, 11.4 to 11.8, then 11.8 to MariaDB 12.3 — validating application compatibility at each stop. Skipping LTS boundaries is technically possible but leaves you without a tested rollback point.</p>
<h3>How many nodes do I need for a fault-tolerant MariaDB 12.3 cluster?</h3>
<p>Three synchronous nodes per region, one per availability zone, plus at least one asynchronous standby cluster in a second region. That combination survives a node failure with zero data loss and a full region failure with sub-second RPO.</p>
<h3>Do optimizer hints in MariaDB 12.3 replace query tuning?</h3>
<p>No. Hints are a containment tool for plan regressions and a way to protect a fleet from a single pathological statement. Schema design, indexing and statistics remain the durable fix.</p>
<h2>Conclusion</h2>
<p>MariaDB 12.3 is the most consequential MariaDB release in several years because it changes the cost of durability rather than merely adding syntax. Storing the binary log inside InnoDB collapses the fsync budget of a commit and makes crash safety structural. The optimizer hint framework converts plan stability from a global gamble into a per-statement contract. Galera improvements shorten the rejoin window and reduce spurious evictions. None of that, however, produces availability on its own. Availability comes from arranging those primitives across failure domains: synchronous replication inside a region, asynchronous GTID replication across regions, a routing tier that hides failover from applications, declarative operations, and backups that are restored on a schedule rather than trusted on faith.</p>
<p>If you are planning a MariaDB 12.3 upgrade, a Galera redesign, or a move to multi-region topology, <a href="https://minervadb.com/minervadb-consultative-support-2/">MinervaDB consultative support</a> provides 24&#215;7 engineering for MariaDB, MySQL and PostgreSQL infrastructure at internet scale. You can also review our <a href="https://minervadb.com/mariadb-on-vmware-ibm-storage-virtualize-whitepaper/">MariaDB storage and virtualization whitepaper</a> for the infrastructure layer beneath this architecture.</p>
<h3>Further reading and authoritative references</h3>
<ul>
<li><a href="https://mariadb.com/docs/release-notes/community-server/12.3/mariadb-12.3-changes-and-improvements" target="_blank" rel="noopener">MariaDB 12.3 changes and improvements (official release notes)</a></li>
<li><a href="https://mariadb.com/docs/server/server-management/server-monitoring-logs/binary-log/innodb-based-binary-log" target="_blank" rel="noopener">InnoDB-based binary log documentation</a></li>
<li><a href="https://mariadb.com/docs/galera-cluster" target="_blank" rel="noopener">MariaDB Galera Cluster documentation</a></li>
<li><a href="https://mariadb.com/docs/maxscale" target="_blank" rel="noopener">MariaDB MaxScale documentation</a></li>
<li><a href="https://mariadb.com/docs/server/ha-and-performance/standard-replication/gtid" target="_blank" rel="noopener">Global Transaction ID reference</a></li>
<li><a href="https://mariadb.com/docs/server/server-usage/backup-and-restore" target="_blank" rel="noopener">Backup and restore, including point-in-time recovery</a></li>
<li><a href="https://mariadb.org/download/" target="_blank" rel="noopener">Download MariaDB Server from MariaDB Foundation</a></li>
</ul>
<p><a href="https://minervadb.com/mariadb-12-3-high-availability-internet-scale/">MariaDB 12.3 LTS: Advances and Building Fault-Tolerant MariaDB Infrastructure at Internet Scale</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MySQL and MariaDB High Availability vs. Disaster Recovery: What’s the Difference (and Why It Matters)</title>
        <link>https://www.continuent.com/resources/blog/mysql-ha-vs-dr-what-is-the-difference</link>
        <pubDate>Sat, 08 Aug 2026 09:51:09 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.continuent.com/blog/tag/mariadb">Continuent - MariaDB</source>
        <description><![CDATA[<p>High availability keeps MySQL and MariaDB applications running through routine local failures, while disaster recovery restores service after a site or regional outage. This article explains how RTO, RPO, distance, synchronous replication and asynchronous replication shape each strategy, and how Continuent Tungsten Cluster combines local HA with multi-site DR.</p>
<p><a href="https://www.continuent.com/resources/blog/mysql-ha-vs-dr-what-is-the-difference">MySQL and MariaDB High Availability vs. Disaster Recovery: What’s the Difference (and Why It Matters)</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>High availability keeps MySQL and MariaDB applications running through routine local failures, while disaster recovery restores service after a site or regional outage. This article explains how RTO, RPO, distance, synchronous replication and asynchronous replication shape each strategy, and how Continuent Tungsten Cluster combines local HA with multi-site DR.</p>
<p><a href="https://www.continuent.com/resources/blog/mysql-ha-vs-dr-what-is-the-difference">MySQL and MariaDB High Availability vs. Disaster Recovery: What’s the Difference (and Why It Matters)</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>The open way of Percona Search for MongoDB</title>
        <link>https://www.percona.com/blog/the-open-way-of-percona-search-for-mongodb/</link>
        <pubDate>Fri, 07 Aug 2026 14:55:06 +0000</pubDate>
        <dc:creator>Radoslaw Szulgo</dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Percona Search for MongoDB is Percona’s downstream distribution of mongot, the search engine that provides MongoDB’s full-text and vector search capabilities. With this addition, you can power your applications with AI and advanced search techniques – anywhere, and without vendor lock-in. It’s the same search engine that powers MongoDB Atlas Search.  Percona Search for MongoDB … Continued<br />
The post The open way of Percona Search for MongoDB appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/the-open-way-of-percona-search-for-mongodb/">The open way of Percona Search for MongoDB</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><span>Percona Search for MongoDB is Percona’s downstream distribution of </span><span>mongot</span><span>, the search engine that provides MongoDB’s full-text and vector search capabilities. With this addition, you can power your applications with AI and advanced search techniques – anywhere, and without vendor lock-in. It’s the same search engine that powers MongoDB Atlas Search. </span></p>
<p><span>Percona Search for MongoDB runs as a separate </span><span>mongot</span><span> process alongside Percona Server for MongoDB. The deployment topology determines how many </span><span>mongot</span><span> instances are required and how search requests are routed. Applications and users continue to connect to </span><span>mongod</span><span> in a replica set, or to </span><span>mongos</span><span> in a sharded cluster – never directly to </span><span>mongot</span><span>.</span></p>
<p><a href="https://www.percona.com/wp-content/uploads/2026/08/mongot-deployment.png"><img loading="lazy" decoding="async" class="aligncenter wp-image-51373 size-full" src="https://www.percona.com/wp-content/uploads/2026/08/mongot-deployment.png" alt="" width="2547" height="1428" srcset="https://www.percona.com/wp-content/uploads/2026/08/mongot-deployment.png 2547w, https://www.percona.com/wp-content/uploads/2026/08/mongot-deployment-300x168.png 300w, https://www.percona.com/wp-content/uploads/2026/08/mongot-deployment-1024x574.png 1024w, https://www.percona.com/wp-content/uploads/2026/08/mongot-deployment-768x431.png 768w, https://www.percona.com/wp-content/uploads/2026/08/mongot-deployment-1536x861.png 1536w, https://www.percona.com/wp-content/uploads/2026/08/mongot-deployment-2048x1148.png 2048w" sizes="auto, (max-width: 2547px) 100vw, 2547px"></a></p>
<p><span>On behalf of the entire product and engineering team for MongoDB at Percona, I’m pleased to share that we’re starting a </span><b>Technical Preview with version 1.70.3-1.</b></p>
<h2>The way is open. Search should be too.</h2>
<p><span>Before anything else, credit where it is due. MongoDB Inc. released full-text and vector search for self-managed deployments as GA in July 2026, and published the source for </span><span>mongot</span><span> – the same search engine that powers MongoDB Atlas Search. Opening up the engine behind a flagship commercial service is a significant step and precisely what makes this Technical Preview possible. </span></p>
<p><span>What we want to add is the next layer of openness: freedom to choose your embedding model, to run inference where your data already lives, and to operate search with the same automated backup, monitoring, and Kubernetes tooling you already expect from every other tier of your database. That is the Percona way, and this post is our map for getting there.</span></p>
<h2><b>What we found in mongot</b></h2>
<p><span>We went through the current release, reviewing everything needed to run it the way you want in production. Below is what we found, stated as plainly as we can, with the Percona plan attached to each item. None of these is a defect. They describe where today’s release draws the line between the search engine and the operational layer around it. The operational layer is exactly where Percona has always done its work.</span></p>
<h3><b>Automatic embeddings and model choice </b></h3>
<p><span>This is the big one, and it needs a little setup to see properly.</span></p>
<p><span>Vector search doesn’t search text. It searches vectors. If a user wants to find a document, they need to type a query that is first run through an embedding model and turned into an array of numbers. That conversion is not a one-time import step, either – it has to keep pace with your data, because a document whose text changed while its vector didn’t is now quietly unfindable. No errors are raised. Query results simply get worse over time.</span></p>
<p><span>There are two ways to handle it.</span></p>
<h4><b>Manually</b></h4>
<p><span>You generate embeddings yourself and write the vectors into the document. This path is completely open, with no restrictions. It is also where a lot of vector search projects stall, because you have just taken ownership of an embedding pipeline: something has to watch inserts and updates, batch them, call a model, handle failures and retries, backfill the whole corpus when you change models, and guarantee every vector still matches the text next to it. That is a distributed-systems problem bolted onto a database that already solved distributed-systems problems. For a fixed corpus, you index once and forget – it is fine. For live operational data, it becomes a permanent tax on the team. In my humble opinion, it isn’t the way to go for a production deployment at scale.</span></p>
<h4><b>Automatically</b></h4>
<p><span>You declare which field holds your text and which model to use – the </span><span>autoEmbed</span><span> type in the index definition – and the database generates the embeddings, keeps them in sync as the data changes, and accepts plain text at query time. This exists precisely because the manual path does not scale. It is the path the documentation leads with, the path every tutorial will use, and for most teams running search on data that changes, it is the only realistically maintainable option.</span></p>
<p><a href="https://www.percona.com/wp-content/uploads/2026/08/manual-vs-automatic-embeddings.png"><img loading="lazy" decoding="async" class="aligncenter wp-image-51386 size-full" src="https://www.percona.com/wp-content/uploads/2026/08/manual-vs-automatic-embeddings.png" alt="" width="2509" height="1370" srcset="https://www.percona.com/wp-content/uploads/2026/08/manual-vs-automatic-embeddings.png 2509w, https://www.percona.com/wp-content/uploads/2026/08/manual-vs-automatic-embeddings-300x164.png 300w, https://www.percona.com/wp-content/uploads/2026/08/manual-vs-automatic-embeddings-1024x559.png 1024w, https://www.percona.com/wp-content/uploads/2026/08/manual-vs-automatic-embeddings-768x419.png 768w, https://www.percona.com/wp-content/uploads/2026/08/manual-vs-automatic-embeddings-1536x839.png 1536w, https://www.percona.com/wp-content/uploads/2026/08/manual-vs-automatic-embeddings-2048x1118.png 2048w" sizes="auto, (max-width: 2509px) 100vw, 2509px"></a></p>
<p><span>Today, automatic embeddings are supported only with Voyage AI models: </span><span>voyage-4-large</span><span>, </span><span>voyage-4</span><span>, </span><span>voyage-4-lite</span><span>, and </span><span>voyage-code-3</span><span>. Three practical consequences follow from that.</span></p>
<ul>
<li aria-level="1"><b>Your data travels to a third-party service.</b><span> Every document you index and every query your users type are sent to Voyage AI’s cloud for processing. The support tickets, the patient notes, the contracts, the internal wiki – whatever you actually store – are handled outside your perimeter, from a database you self-host on hardware you own. Voyage AI does offer an on-premises deployment, which comes with its own licensing and costs. Without it, an air-gapped deployment cannot use automatic embeddings, and neither can teams working under data-residency obligations, which covers most of regulated Europe.</span></li>
<li aria-level="1"><b>It’s metered.</b><span> There is a free tier – 200 million tokens to get you started, less for specialized models – but it is capped on both volume and velocity, with requests and tokens per minute throttled. Beyond that, it runs roughly $0.02 to $0.12 per million tokens, on every reindex and every query your application serves.</span></li>
<li aria-level="1"><b>The model is chosen for you.</b><span> Not the one that performs best in your language. Not the domain model your data science team fine-tuned. Not a smaller open-weights model that is good enough for your use case.</span></li>
</ul>
<h4><b>The Percona plan</b></h4>
<p><span>We want automatic embeddings to be open, so you have a genuinely unlimited choice of models suited to your needs. We will start with everything that speaks to the OpenAI-compatible embeddings API, which already covers a large and growing ecosystem:</span></p>
<ul>
<li aria-level="1"><b>Ollama</b><span> – local, free, 100+ open models including </span><span>nomic-embed-text</span><span>, </span><span>mxbai-embed-large</span><span>, and </span><span>all-minilm</span></li>
<li aria-level="1"><b>vLLM</b><span> – self-hosted GPU inference</span></li>
<li aria-level="1"><b>llama.cpp server</b><span> – local CPU or GPU inference</span></li>
<li aria-level="1"><b>LocalAI</b><span> and </span><b>LM Studio</b></li>
<li aria-level="1"><b>Hugging Face Text Embeddings Inference (TEI)</b></li>
</ul>
<p><span>Over time, we intend to widen that further, toward the 25,000-model catalog the open ecosystem has already built. Cloud providers remain available to teams that prefer them. They just stop being the only option.</span></p>
<h3><b>Reranking</b></h3>
<p><b>Reranking</b><span> is the second half of how serious retrieval works. Vector search is fast because the query and the documents are embedded separately and never actually compared – the model sees your query, sees a document, and never sees them side by side. That approximation is what makes it possible to search millions of documents in milliseconds, and it is also why the top result is often merely in the right neighborhood rather than right. A reranker fixes that: it takes the top 50 or 100 candidates and runs each through a model that reads the query and the document together, scoring genuine relevance rather than vector proximity. In practice, this is usually the single largest accuracy improvement available in a retrieval pipeline, and it matters most for RAG, where the language model only ever sees the top handful of results. If the passage that answers the question is sitting at rank eight, your application behaves as though the answer does not exist.</span></p>
<p><span>The </span><span>$rerank</span><span> stage is available only on MongoDB Atlas.</span></p>
<h4><b>The Percona plan</b></h4>
<p><span>We intend to open reranking as well. Our initial target is </span><span>BAAI/bge-reranker-large</span><span>, a strong cross-encoder text-ranking model from the Beijing Academy of Artificial Intelligence, published on Hugging Face under the permissive MIT license.</span></p>
<h3><b> Contextual chunking and multimodal pipelines</b></h3>
<p><b>Contextual chunking</b><span> matters because embedding models have fixed context windows, so anything longer than a few paragraphs has to be split before it can be indexed. Split it naively on a character count, and you shred the meaning: a clause reading “this must be renewed within 30 days” is worthless when “this” was defined two chunks earlier. Contextual and late-chunking techniques embed each chunk with awareness of the surrounding document, so the retrieved passage still makes sense on its own. This is the difference between a RAG system that cites something useful and one that confidently quotes a fragment.</span></p>
<p><b>Multimodal pipelines</b><span> embed text and images into a single vector space, so a search for “worn leather armchair, mid-century” can match a photograph with no caption. Product catalogs, media archives, scanned paperwork, engineering diagrams – anywhere the information lives in the picture rather than the metadata.</span></p>
<h4><b>The Percona plan</b></h4>
<p><span>For both of these, the path available today is a Voyage cloud API, called and paid for per token, with your content leaving your network. Meanwhile, the open-weights ecosystem offers excellent cross-encoder rerankers such as </span><a href="https://bge-model.com/bge/bge_m3.html"><span>BGE-M3 from BAAI</span></a><span>, and </span><a href="https://github.com/mehdidc/clip_rerank"><span>CLIP-</span></a><span> and </span><a href="https://arxiv.org/pdf/2303.15343"><span>SigLIP-class</span></a><span> multimodal encoders that run comfortably on a single GPU, or on CPU if you are patient. None of them is wired in yet. We would like to change that.</span></p>
<h3><b>Search-index backup, restore, and recovery</b></h3>
<p><span>This is documented rather than absent, and it is worth reading closely to understand what it asks of you.</span></p>
<p><span>mongot</span><span> is not your primary data store, so a lost index can always be rebuilt from </span><span>mongod</span><span>. The docs note the trade-off in the same breath: index builds “can be slow and in some cases can take days to complete.” For anything with a recovery-time objective, days of degraded search after a disk failure need a faster answer.</span></p>
<p><span>That faster answer is a filesystem snapshot, and here is the whole procedure. Stop </span><span>mongot</span><span>, then snapshot its data directory with the tool of your choice – the docs provide a working LVM example. To restore, put the directory back, generate a fresh server identity, and restart. </span><span>mongot</span><span> then resumes replication from </span><span>mongod</span><span> and catches up.</span></p>
<p><span>It works. It is also entirely yours to build, and there are a few properties worth planning around:</span></p>
<ul>
<li aria-level="1"><span>No orchestration or scheduling, and no coordination with your database backup – so no consistent point-in-time across </span><span>mongod</span><span> and </span><span>mongot</span><span>.</span></li>
<li aria-level="1"><span>No object storage integration.</span></li>
<li aria-level="1"><span>The search process is stopped while the copy is taken.</span></li>
<li aria-level="1"><span>The snapshot has a shelf life. A </span><span>mongot</span><span> backup is valid only for as long as the change stream can carry it forward, so a snapshot older than your oplog retention window is detected as having fallen off the oplog and triggers the full rebuild you took the snapshot to avoid.</span></li>
<li aria-level="1"><span>On Kubernetes, MongoDB Controllers for Kubernetes does not back up or restore </span><span>mongot</span><span> volumes, and the docs recommend planning this with your storage platform.</span></li>
</ul>
<h4><b>The Percona plan</b></h4>
<p><span>Automated, scheduled, verified backups are a problem the open-source community solved for databases a long time ago, and search indexes deserve the same treatment. Percona Backup for MongoDB and Percona Operator for MongoDB are a natural fit: PBM to orchestrate search-index snapshots alongside the database backup it already handles, with fast index initialization from object storage – S3, Azure, GCS, MinIO – instead of a full change-stream replay. The goal is for search-index recovery to be something you configure once, rather than script.</span></p>
<h3><b>Observability</b></h3>
<p><span>There is a </span><span>/metrics</span><span> endpoint that exposes a great deal. What isn’t there yet is anything built on top of it. Atlas has a Search Metrics UI; for self-managed deployments, dashboards are, in the documentation’s own phrasing, “not provided in a UI component.” Alerting is yours to define, as are log retention and diagnostic-data rotation.</span></p>
<p><span>To be concrete about what “yours to define” involves: the upstream docs publish a genuinely thoughtful set of seventeen recommended alerts across three severity tiers, each with example PromQL to adapt to your environment and thresholds to tune to your workload. The recommended approach is to implement the paging tier first, run it for a week, tune out false positives, then add the other two. That is good advice. It is also multi-week work, repeated for every deployment, before you have the monitoring that a hosted service provides on day one.</span></p>
<p><span>Some of the behaviors worth alerting on are genuinely subtle. </span><span>mongot</span><span> enforces three disk thresholds internally, and the docs note they take effect whether or not you are monitoring:</span></p>
<ol>
<li><span>Level 1: at 85% full, new index builds remain in </span><span>PENDING. </span></li>
<li><span>Level 2 – at 90%, steady-state replication is disabled – existing indexes stop receiving change events, and search begins serving stale results while the database itself reports healthy. </span></li>
<li><span>Level 3: at 95%, the process stops and requires disk space to be freed before it restarts cleanly. The middle threshold is the one worth wiring up carefully, because it doesn’t announce itself.</span></li>
</ol>
<p><a href="https://www.percona.com/wp-content/uploads/2026/08/pmm-mongot-dashboard.png"><img loading="lazy" decoding="async" class="aligncenter wp-image-51390 size-full" src="https://www.percona.com/wp-content/uploads/2026/08/pmm-mongot-dashboard.png" alt="" width="2285" height="1168" srcset="https://www.percona.com/wp-content/uploads/2026/08/pmm-mongot-dashboard.png 2285w, https://www.percona.com/wp-content/uploads/2026/08/pmm-mongot-dashboard-300x153.png 300w, https://www.percona.com/wp-content/uploads/2026/08/pmm-mongot-dashboard-1024x523.png 1024w, https://www.percona.com/wp-content/uploads/2026/08/pmm-mongot-dashboard-768x393.png 768w, https://www.percona.com/wp-content/uploads/2026/08/pmm-mongot-dashboard-1536x785.png 1536w, https://www.percona.com/wp-content/uploads/2026/08/pmm-mongot-dashboard-2048x1047.png 2048w" sizes="auto, (max-width: 2285px) 100vw, 2285px"></a></p>
<h4><b>The Percona plan</b></h4>
<p><span>Percona Monitoring and Management is where this belongs. We believe that collecting these metrics, presenting them on turnkey dashboards, and shipping alert rules with sensible thresholds is exactly the kind of work that should be done once and shared, rather than rebuilt by every team. Sync lag, heap and JVM health, index build progress, executor queue depth, disk headroom – including an alert for the case above, so you learn that replication stopped before your users do.</span></p>
<h2><span>About the license</span></h2>
<p><a href="https://github.com/mongodb/mongot"><span>mongot</span></a><span> is published under the Server Side Public License, and so is our distribution. You can read every line of it on </span><a href="https://github.com/percona/percona-mongot"><span>GitHub</span></a><span>, and we add no restrictions of our own on top.</span></p>
<p><span>SSPL is source-available rather than OSI-approved open source, and we would rather say so than blur the term. What we can commit to is the part we control: </span></p>
<ul>
<li><span>Capabilities stay yours. </span></li>
<li><span>Self-hostable. </span></li>
<li><span>Air-gappable. </span></li>
<li><span>No metered API on the critical path. </span></li>
<li><span>Software remains open and free.</span></li>
</ul>
<p><span>Choice of automation, choice of model, choice of where the inference happens. That is the freedom we are working toward.</span></p>
<h2><span>Getting started</span></h2>
<p><span>Percona Search for MongoDB requires Percona Server for MongoDB 8.3, which we shipped as a Technical Preview last week – the first Percona release carrying the </span><span>$search</span><span>, </span><span>$searchMeta</span><span>, </span><span>$vectorSearch</span><span>, </span><span>$rankFusion</span><span> and </span><span>$scoreFusion</span><span> stages that the search process plugs into.</span></p>
<ul>
<li aria-level="1"><b>Packages:</b><span> grab Percona Search for MongoDB 1.70.3-1 from </span><a href="https://www.percona.com/downloads/"><span>percona.com/downloads</span></a><span>.</span></li>
<li aria-level="1"><b>Installation and configuration:</b><span> see the </span><a href="https://docs.percona.com/percona-search-for-mongodb/install-mongot.html"><span>Percona Search for MongoDB documentation</span></a><span>.</span></li>
<li aria-level="1"><b>On Kubernetes:</b><span> search is supported in </span><a href="https://docs.percona.com/percona-operator-for-mongodb/RN/Kubernetes-Operator-for-PSMONGODB-RN1.23.0.html"><span>Percona Operator for MongoDB 1.23.0</span></a><span>, released last week. Enable </span><span>spec.search</span><span> – the </span><span>enabled</span><span> flag, a </span><span>mongot</span><span> image, </span><span>size: 1</span><span>, and a sized PVC – and the Operator deploys the search process, wires up its authentication and internal TLS, and keeps the index in sync for both replica sets and sharded clusters, one </span><span>mongot</span><span> per shard. Details in the </span><a href="https://www.percona.com/blog/percona-operator-for-mongodb-1-23-0-clustersync-vector-search-pvc-snapshot-backups/"><span>1.23.0 announcement</span></a><span>.</span></li>
</ul>
<h2><span>Before you deploy it</span></h2>
<p><span>This is a Technical Preview. Please don’t run it in production yet.</span></p>
<p><span>Specifically, this version may not fully work with the rest of the Percona software for MongoDB:</span></p>
<ul>
<li aria-level="1"><b>Percona Backup for MongoDB (PBM)</b><span> doesn’t yet cover search indexes.</span></li>
<li aria-level="1"><b>Percona Operator for MongoDB</b><span> search support, recently released in 1.23.0, is currently in tech preview and limited to 1 search node. More automation is coming in the next version.</span></li>
<li aria-level="1"><b>Percona Monitoring and Management </b><span>doesn’t have search dashboards yet, but they’re coming!</span></li>
</ul>
<p><span>Point it at a copy of your data. Then share with us where it breaks for you.</span></p>
<h2><span>Tell us what you need</span></h2>
<p><span>Everything above is a position, which means it can be wrong. If we’ve missed a limitation, picked the wrong first target, or left out the embedding provider you actually use, we would like to hear it:</span></p>
<ul>
<li aria-level="1"><b>Forum:</b> <a href="https://forums.percona.com/c/mongodb/24"><span>forums.percona.com</span></a></li>
<li aria-level="1"><b>Source:</b> <a href="https://github.com/percona/percona-mongot"><span>github.com/percona/percona-mongot</span></a></li>
</ul>
<p><span>Search and AI on your own data, on your own hardware, with the model you chose. That is what we are building, and that is what we mean by openness.</span></p>
<p><span>If you’re not using Percona for MongoDB yet but you’re interested in Percona Search for MongoDB, you might like to read how </span><a href="https://www.percona.com/customer-story/sailthru/"><span>Sailthru by Zeta cut more than $1 million a year</span></a><span> by migrating to Percona Server for MongoDB.</span></p>
<p><span>The way is open.</span></p>
<p><i><span>Disclaimer: Roadmap items are intentions, not delivery commitments. Scope and sequencing may change, and the fastest way to change them is to tell us what you need.</span></i></p>
<p> </p>
<p>The post <a href="https://www.percona.com/blog/the-open-way-of-percona-search-for-mongodb/">The open way of Percona Search for MongoDB</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/the-open-way-of-percona-search-for-mongodb/">The open way of Percona Search for MongoDB</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Node.js Connector 3.5.4 and 3.4.7 now available</title>
        <link>https://mariadb.com/resources/blog/mariadb-node-js-connector-3-5-4-and-3-4-7-now-available/</link>
        <pubDate>Fri, 07 Aug 2026 17:48:20 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>MariaDB is pleased to announce the immediate availability of the MariaDB Connector/Node.js 3.5.4, 3.4.7, 3.3.4, and 3.2.5 GA releases. Download […]</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-node-js-connector-3-5-4-and-3-4-7-now-available/">MariaDB Node.js Connector 3.5.4 and 3.4.7 now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB is pleased to announce the immediate availability of the MariaDB Connector/Node.js 3.5.4, 3.4.7, 3.3.4, and 3.2.5 GA releases. Download Now MariaDB Connector/Node.js 3.5.4 is a Stable (GA) release. Notable changes in this release include: Two connection options changed since 3.5.3: MariaDB Connector/Node.js 3.4.7 is a Stable (GA)…</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-node-js-connector-3-5-4-and-3-4-7-now-available/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/mariadb-node-js-connector-3-5-4-and-3-4-7-now-available/">MariaDB Node.js Connector 3.5.4 and 3.4.7 now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>The DuckDB MySQL engine at 500 GB</title>
        <link>https://www.percona.com/blog/the-duckdb-mysql-engine-at-500-gb/</link>
        <pubDate>Fri, 07 Aug 2026 12:09:29 +0000</pubDate>
        <dc:creator>Evgeniy Patlan</dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>We ran DuckDB MySQL storage engine at scale factor 500. It is around 500 GB of raw TPC-H, three billion lineitem rows  on an 80-core server with 187 GB of RAM. Three engines on the same box: InnoDB, our MySQL+DuckDB engine, and plain DuckDB as the reference. Here is what came out. InnoDB finished 18 … Continued<br />
The post The DuckDB MySQL engine at 500 GB appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/the-duckdb-mysql-engine-at-500-gb/">The DuckDB MySQL engine at 500 GB</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><span>We ran DuckDB MySQL storage engine at scale factor 500. It is around 500 GB of raw TPC-H, three billion </span><span>lineitem</span><span> rows  on an 80-core server with 187 GB of RAM. Three engines on the same box: InnoDB, our MySQL+DuckDB engine, and plain DuckDB as the reference.</span></p>
<p><span>Here is what came out. InnoDB finished 18 of the 22 queries and spent more than 28 hours of query time on them. Four never finished. Our engine ran all 22 in about three minutes. It loaded the data 25 times faster than InnoDB, and it used 5 times less disk. On the queries it stays close to plain DuckDB, and on a few it is ahead.</span></p>
<p><span>It’s still an experiment, not production software. Code and the benchmark harness are on GitHub under GPLv2: </span><a href="https://github.com/Percona-Lab/ducksdb-mysql-engine"><span>https://github.com/Percona-Lab/ducksdb-mysql-engine</span></a><span>.</span></p>
<h2><span>The machine, and how we ran it</span></h2>
<ul>
<li aria-level="1"><span>One server, 80 cores, 187.5 GB RAM.</span></li>
<li aria-level="1"><span>SF500: about 500 GB of raw CSV, 3,000,028,242 </span><span>lineitem</span><span> rows.</span></li>
<li aria-level="1"><span>Three engines, one at a time: InnoDB, our engine, native DuckDB.</span></li>
<li aria-level="1"><span>All of it through the harness in the repo (</span><span>bench/tb</span><span>), in Docker.</span></li>
</ul>
<p><span>Two details about how we ran it change how the numbers read.</span></p>
<p><span>The load streams. We generate a chunk of CSV, load it, delete it, then generate the next one. So the disk never holds more than one 20 GB chunk, which is the only reason 500 GB fits on the box at all.</span></p>
<p><span>And “native DuckDB” is not a second copy of the data. It opens the engine’s own DuckDB file read-only and queries that. Same bytes on both sides. That keeps the comparison honest, and it means there is no separate native load time to report.</span></p>
<h2><span>Loading the data</span></h2>
<table width="438">
<thead>
<tr>
<th><span>Engine</span></th>
<th><span>Load time</span></th>
</tr>
</thead>
<tbody>
<tr>
<td><span>ENGINE=DuckDB (COPY fast path)</span></td>
<td><span>36m 05s</span></td>
</tr>
<tr>
<td><span>InnoDB (bulk LOAD DATA)</span></td>
<td><span>15h 21m</span></td>
</tr>
</tbody>
</table>
<p><span>InnoDB took 25.5 times longer. The engine hands </span><span>LOAD DATA</span><span> straight to a DuckDB </span><span>COPY</span><span> instead of going row by row through the handler, so the three billion </span><span>lineitem</span><span> rows go in in about nineteen minutes, and the whole set in thirty-six. InnoDB inserts row by row and builds the primary key as it goes. That is where the rest of the fifteen hours goes.</span></p>
<h2><span>Storage on disk</span></h2>
<table width="581">
<thead>
<tr>
<th><span>Component</span></th>
<th><span>Size</span></th>
<th><span>vs raw CSV</span></th>
</tr>
</thead>
<tbody>
<tr>
<td><span>raw TPC-H CSV</span></td>
<td><span>500.0 GB</span></td>
<td><span>100%</span></td>
</tr>
<tr>
<td><span>ENGINE=DuckDB (</span><span>tpch.duckdb</span><span>)</span></td>
<td><span>132.4 GB</span></td>
<td><span>26% (3.78x smaller)</span></td>
</tr>
<tr>
<td><span>InnoDB (</span><span>tpch/*.ibd</span><span>)</span></td>
<td><span>673.2 GB</span></td>
<td><span>135%</span></td>
</tr>
</tbody>
</table>
<p><span>DuckDB stores columns and compresses them, so 500 GB of CSV comes down to 132 GB. InnoDB stores rows and carries the index with them, and it ends up bigger than the CSV it came from: 673 GB, five times the DuckDB file. The InnoDB </span><span>lineitem.ibd</span><span> on its own is 446 GB. That is more than three times our entire database.</span></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-51356 size-full" src="https://www.percona.com/wp-content/uploads/2026/08/chart-storage_fix.png" alt="" width="1186" height="659" srcset="https://www.percona.com/wp-content/uploads/2026/08/chart-storage_fix.png 1186w, https://www.percona.com/wp-content/uploads/2026/08/chart-storage_fix-300x167.png 300w, https://www.percona.com/wp-content/uploads/2026/08/chart-storage_fix-1024x569.png 1024w, https://www.percona.com/wp-content/uploads/2026/08/chart-storage_fix-768x427.png 768w" sizes="auto, (max-width: 1186px) 100vw, 1186px"></p>
<p><i><span>Storage, lower is better. The DuckDB engine holds all of SF500 in 132 GB.</span></i></p>
<h2><span>Query time</span></h2>
<p><span>All 22 queries. Warm runs, minimum of a few, in seconds. InnoDB had a two-hour cap per query; the ones that hit it are marked DNF.</span><span><br />
</span></p>
<p> </p>
<table width="620">
<thead>
<tr>
<th><span>Query</span></th>
<th><span>InnoDB</span></th>
<th><span>MySQL+DuckDB (ours)</span></th>
<th><span>native DuckDB</span></th>
</tr>
</thead>
<tbody>
<tr>
<td><span>Q1</span></td>
<td><span>11864.5</span></td>
<td><span>11.1</span></td>
<td><span>5.2</span></td>
</tr>
<tr>
<td><span>Q6</span></td>
<td><span>3539.4</span></td>
<td><span>1.3</span></td>
<td><span>4.1</span></td>
</tr>
<tr>
<td><span>Q9</span></td>
<td><span>DNF</span></td>
<td><span>17.1</span></td>
<td><span>18.1</span></td>
</tr>
<tr>
<td><span>Q13</span></td>
<td><span>DNF</span></td>
<td><span>17.1</span></td>
<td><span>10.4</span></td>
</tr>
<tr>
<td><span>Q18</span></td>
<td><span>3846.1</span></td>
<td><span>27.0</span></td>
<td><span>11.9</span></td>
</tr>
<tr>
<td><span>Q19</span></td>
<td><span>6672.3</span></td>
<td><span>2.4</span></td>
<td><span>8.6</span></td>
</tr>
<tr>
<td><span>Q21</span></td>
<td><span>14211.7</span></td>
<td><span>26.0</span></td>
<td><span>15.1</span></td>
</tr>
<tr>
<td><b>All 22</b></td>
<td><b>18/22 finished, ~28 h</b></td>
<td><b>185.6 s</b></td>
<td><b>152.7 s</b></td>
</tr>
</tbody>
</table>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-51359 size-full" src="https://www.percona.com/wp-content/uploads/2026/08/chart-query-times.png" alt="" width="2384" height="960" srcset="https://www.percona.com/wp-content/uploads/2026/08/chart-query-times.png 2384w, https://www.percona.com/wp-content/uploads/2026/08/chart-query-times-300x121.png 300w, https://www.percona.com/wp-content/uploads/2026/08/chart-query-times-1024x412.png 1024w, https://www.percona.com/wp-content/uploads/2026/08/chart-query-times-768x309.png 768w, https://www.percona.com/wp-content/uploads/2026/08/chart-query-times-1536x619.png 1536w, https://www.percona.com/wp-content/uploads/2026/08/chart-query-times-2048x825.png 2048w" sizes="auto, (max-width: 2384px) 100vw, 2384px"></p>
<p><i><span>SF500, all 22 queries, log scale, lower is better. Hatched InnoDB bars did not finish inside the cap.</span></i></p>
<p><span>Two things to take from this.</span></p>
<p><span>InnoDB is far behind, which is no surprise. Scanning three billion rows for a wide </span><span>GROUP BY</span><span> or a six-way join is the wrong job for a row store. Four queries (Q9, Q13, Q17, Q20) did not finish at all, and the eighteen that did add up to more than 28 hours. This is the exact problem the engine is for. It is not a mark against InnoDB, which is doing the transactional job it was built for.</span></p>
<p><span>The comparison worth reading is our engine against plain DuckDB, since both are the same DuckDB reading the same file. Over all 22 they are close: 186 seconds for ours, 153 for native. Query by query it goes both ways. On the selective ones ours is often faster — Q6 (1.3 vs 4.1), Q19 (2.4 vs 8.6), Q17, Q20. On the biggest joins native wins — Q18 (27 vs 12), Q21, Q1. That gap comes from settings, not data: the memory limit, the thread count, and running inside </span><span>mysqld</span><span> versus a bare CLI. Either way, both are around a thousand times faster than the row store.</span></p>
<h2><span>Correctness</span></h2>
<p><span>We checked the answers, not only the clock. For every query we compared our engine’s output to native DuckDB’s, numbers rounded to four decimals and the order ignored. 21 of 22 matched exactly. None mismatched. One was skipped because a result file came back empty on one side. So the engine gives the same answers as plain DuckDB.</span></p>
<h2><span>What this means, and where it stops</span></h2>
<p><span>At 500 GB the small-scale picture holds and gets sharper. Analytical queries that took hours on InnoDB, or never finished, come back in seconds on the DuckDB engine. The load is far quicker, and the footprint is far smaller. All of it inside one MySQL server, with the tables queried the normal way.</span></p>
<p><span>The limits are the same as before:</span></p>
<ul>
<li aria-level="1"><span>It is for analytics, not OLTP. Point lookups and single-row work stay on the row path, where an index seek is the right tool.</span></li>
<li aria-level="1"><span>DuckDB runs inside </span><span>mysqld</span><span>, so a heavy query under a tight memory limit can go over budget. </span><span>DUCKSDB_MEMORY_LIMIT</span><span> and </span><span>DUCKSDB_TEMP_DIR</span><span> let it spill to disk instead of failing. We set a limit here so the big CTEs spill rather than get OOM-killed.</span></li>
<li aria-level="1"><span>Some queries still fall back to normal MySQL and run on the row path.</span></li>
<li aria-level="1"><span>It is one workload on one machine. The result is strong, but the engine is still an experiment, not something for production traffic.</span></li>
</ul>
<h2><span>Try it</span></h2>
<p><span>Pull the image and run your own queries:</span></p>
<p><span>docker run </span><span>-d</span> <span>-p</span><span> 3306:3306 </span><span>-e</span><span> MYSQL_ROOT_PASSWORD=secret </span><span></span><span><br />
</span><span>  perconalab/ducksdb-mysql-engine:latest</span></p>
<p><span>The engine, the patches, and the harness that produced these numbers are on GitHub: </span><a href="https://github.com/Percona-Lab/ducksdb-mysql-engine"><span>https://github.com/Percona-Lab/ducksdb-mysql-engine</span></a><span>. The per-query numbers and the method are in the repo. If it breaks, or your hardware gives different numbers, open an issue.</span></p>
<p>The post <a href="https://www.percona.com/blog/the-duckdb-mysql-engine-at-500-gb/">The DuckDB MySQL engine at 500 GB</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/the-duckdb-mysql-engine-at-500-gb/">The DuckDB MySQL engine at 500 GB</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Retail Data Analytics: Ultimate 2026 Modern Retail Stack</title>
        <link>https://minervadb.com/retail-data-analytics-modern-retail-stack/</link>
        <pubDate>Fri, 07 Aug 2026 10:45:01 +0000</pubDate>
        <dc:creator>MinervaDB Corporation</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/retail-data-analytics-ultimate-2026-modern-retail-stack/</guid>
        <source url="https://minervadb.com/">The Data Transformation Company</source>
        <description><![CDATA[<p>Retail data analytics is the difference between a merchandiser who reprices a slow-moving SKU on Tuesday morning and one who discovers the markdown opportunity in a month-end deck. Modern retail runs on a data platform, [...]</p>
<p><a href="https://minervadb.com/retail-data-analytics-modern-retail-stack/">Retail Data Analytics: Ultimate 2026 Modern Retail Stack</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><strong>Retail data analytics</strong> is the difference between a merchandiser who reprices a slow-moving SKU on Tuesday morning and one who discovers the markdown opportunity in a month-end deck. Modern retail runs on a data platform, not a reporting team: store point-of-sale terminals, an e-commerce checkout, a warehouse management system, a loyalty engine, a marketplace feed and a dozen SaaS applications all emit events that must land, reconcile and become a single trusted number before the trading meeting. This guide walks through the exact technology stack MinervaDB deploys and supports for modern retail businesses, layer by layer, with reference diagrams, production SQL and the service level objectives that keep it honest.</p>
<p>Everything below is grounded in the vendor-neutral stack described in the MinervaDB <a href="https://minervadb.com/data-analytics-and-data-warehousing-support/">Data Analytics and Data Warehousing Support</a> practice: change data capture, streaming ingestion, lakehouse storage, warehouse and real-time OLAP compute, declarative transformation, a governed semantic layer, and 24&#215;7 operational ownership across the whole chain. Retail simply stresses every one of those layers harder than most industries, because seasonality, promotions, returns and omnichannel identity all conspire to break naive models.</p>
<h2>Why retail data analytics breaks at modern retail scale</h2>
<p>Retail data analytics failures are rarely caused by one broken component. A typical incident chain looks like this: the e-commerce team ships a schema change that widens a product attribute, the change data capture connector emits a new Avro schema, a Kafka consumer group lags behind during a flash sale, a late-arriving returns partition breaks an incremental model, the cloud warehouse autoscales to absorb the retry storm, and by 08:00 the trading dashboard is eight hours stale while the monthly compute bill has doubled. Diagnosing that chain needs one team that understands OLTP internals, streaming semantics, distributed query execution and BI caching simultaneously.</p>
<p>Four characteristics make retail data analytics harder than the generic enterprise case. First, the grain is brutal: a mid-sized omnichannel retailer generates hundreds of millions of order lines, inventory movements and clickstream events per year, and every one of them can be amended by a return, a price adjustment or a partial refund. Second, identity is fragmented across a guest checkout, a loyalty card, an app login and a marketplace pseudonym, so customer conformity is a modelling problem before it is a marketing problem.</p>
<p>Third, time is not neutral: fiscal calendars, 4-5-4 retail weeks, trading-day comparisons and promotional overlaps mean a naive date dimension produces confidently wrong year-on-year numbers. Fourth, latency requirements are bimodal, because finance is happy with an hourly warehouse refresh while store operations and dynamic pricing need sub-second answers.</p>
<p>Good retail data analytics therefore needs two compute profiles behind a single semantic contract: an elastic cloud warehouse for governed, historical, finance-grade reporting, and a real-time OLAP engine for user-facing dashboards that must answer in milliseconds. The architecture below is how MinervaDB reconciles the two without duplicating metric logic.</p>
<h2>The modern retail data analytics reference architecture</h2>
<p>Every retail data analytics engagement starts with a written architecture. The blueprint below shows six layers of data flow plus a cross-cutting engineering layer that an on-call team owns around the clock. Your stack may substitute Apache Iceberg for Delta Lake, or ClickHouse for BigQuery, but the failure modes, the SLOs and the review checkpoints stay the same.</p>
<figure><img decoding="async" title="Modern retail data analytics reference architecture diagram" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMjAwIDQ4MCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJNb2Rlcm4gcmV0YWlsIGRhdGEgYW5hbHl0aWNzIHJlZmVyZW5jZSBhcmNoaXRlY3R1cmUgZGlhZ3JhbSIgc3R5bGU9IndpZHRoOjEwMCU7aGVpZ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mNob3I9Im1pZGRsZSIgZm9udC1mYW1pbHk9IkhlbHZldGljYSxBcmlhbCxzYW5zLXNlcmlmIiBmb250LXNpemU9IjExLjUiIGZpbGw9IiMyMjMwM2YiPkxpbmVhZ2UgYW5kIGNhdGFsb2c8L3RleHQ+PHRleHQgeD0iNjk3IiB5PSI0MjMiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZvbnQtZmFtaWx5PSJIZWx2ZXRpY2EsQXJpYWwsc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMS41IiBmaWxsPSIjMjIzMDNmIj5QQ0kgRFNTIGFuZCBQSUkgbWFza2luZzwvdGV4dD48dGV4dCB4PSI4OTIiIHk9IjQyMyIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZm9udC1mYW1pbHk9IkhlbHZldGljYSxBcmlhbCxzYW5zLXNlcmlmIiBmb250LXNpemU9IjExLjUiIGZpbGw9IiMyMjMwM2YiPkZpbk9wcyBjb3N0IGd1YXJkcmFpbHM8L3RleHQ+PHRleHQgeD0iMTA4NyIgeT0iNDIzIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmb250LWZhbWlseT0iSGVsdmV0aWNhLEFyaWFsLHNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTEuNSIgZmlsbD0iIzIyMzAzZiI+MTUtbWludXRlIFAxIHJlc3BvbnNlPC90ZXh0Pjwvc3ZnPg==" alt="Modern retail data analytics reference architecture diagram"><figcaption><em>Figure 1: the MinervaDB reference architecture for modern retail data analytics, from POS and e-commerce sources through CDC, lakehouse, warehouse, transformation and the governed serving layer.</em></figcaption></figure>
<p>Three design principles govern this retail data analytics blueprint. First, the raw landing zone is immutable and replayable, so any downstream mart can be rebuilt from source without touching the production checkout database during peak trading. Second, transformation is declarative and version controlled, which makes every retail metric auditable and every change reviewable before it reaches a trading dashboard. Third, cost is a first-class SLO rather than a quarterly surprise: compute isolation, result caching and pre-aggregation are designed in from day one.</p>
<h2>The retail data analytics technology stack, layer by layer</h2>
<p>MinervaDB is deliberately vendor-neutral, so the recommendation you get for retail data analytics is the one your access patterns, latency targets, concurrency profile and budget justify. The table below maps each layer of the stack to the retail workloads it actually serves.</p>
<table>
<thead>
<tr>
<th>Layer</th>
<th>Engines and tools</th>
<th>Retail workload fit</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Cloud data warehouse</strong></td>
<td>Snowflake, Google BigQuery, Amazon Redshift, Azure Synapse, Databricks SQL Warehouse</td>
<td>Finance-grade sales and margin reporting, category performance, supplier rebates, statutory and audit reporting</td>
</tr>
<tr>
<td><strong>Real-time OLAP</strong></td>
<td>ClickHouse, Apache Druid, Apache Pinot, StarRocks, Firebolt</td>
<td>Live store and basket dashboards, dynamic pricing, promotion monitoring, on-site search and recommendation telemetry</td>
</tr>
<tr>
<td><strong>Lakehouse and table formats</strong></td>
<td>Apache Iceberg, Delta Lake, Apache Hudi, Parquet, Trino, Presto, Apache Spark</td>
<td>Multi-year basket history, clickstream archives, ML training sets, engine portability without re-ingestion</td>
</tr>
<tr>
<td><strong>Streaming and CDC</strong></td>
<td>Apache Kafka, Debezium, Kafka Connect, Apache Flink, Kinesis, Pub/Sub, Redpanda</td>
<td>POS event capture, order and inventory replication, stock-out alerts, fraud and abuse signals</td>
</tr>
<tr>
<td><strong>Transformation and orchestration</strong></td>
<td>dbt, Apache Airflow, Dagster, Prefect, SQLMesh, Spark SQL</td>
<td>Conformed retail marts, tested margin definitions, reproducible restatements after returns and credit notes</td>
</tr>
<tr>
<td><strong>MPP and on-premises</strong></td>
<td>Greenplum, Vertica, Teradata, Exadata, PostgreSQL with Citus, DuckDB</td>
<td>Data-sovereign estates, hybrid migrations, in-store and edge analytics on constrained hardware</td>
</tr>
<tr>
<td><strong>Serving and BI</strong></td>
<td>Looker, Power BI, Tableau, Apache Superset, Metabase, Cube, pgvector</td>
<td>Governed trading dashboards, supplier-facing embedded analytics, retrieval-augmented merchandising assistants</td>
</tr>
</tbody>
</table>
<p>The point of a vendor-neutral retail data analytics stack is not novelty, it is substitution risk. Storing basket history in an open table format such as <a href="https://iceberg.apache.org/spec/" target="_blank" rel="noopener">Apache Iceberg</a> or <a href="https://delta.io/" target="_blank" rel="noopener">Delta Lake</a> means the warehouse engine becomes a swappable compute choice rather than a decade-long lock-in. Retailers who did this before the last round of cloud price changes moved workloads in weeks instead of quarters.</p>
<h2>Change data capture for POS and e-commerce events</h2>
<p>Every retail data analytics review at MinervaDB begins at the ingestion layer, because batch extraction against a live checkout database is the single most common cause of both stale dashboards and primary-database incidents. On Black Friday, a nightly SELECT over the orders table is not an extraction strategy, it is an outage waiting for a queue. MinervaDB replaces query-based extraction with log-based change data capture wherever the source engine allows, so the warehouse follows the write-ahead log instead of competing with customer transactions.</p>
<figure><img decoding="async" title="Retail data analytics change data capture and streaming ingestion pipeline diagram" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMjAwIDQzMCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJSZXRhaWwgZGF0YSBhbmFseXRpY3MgY2hhbmdlIGRhdGEgY2FwdHVyZSBhbmQgc3RyZWFtaW5nIGluZ2VzdGlvbiBwaXBlbGluZSBkaWFncmFtIiBzdHlsZT0id2lkdGg6MTAwJTtoZWlnaHQ6YXV0bztiYWNrZ3JvdW5kOiNmZmZmZmY7Ym9yZGVyOjFweCBzb2xpZCAjZDdkZGU1O2JvcmRlci1yYWRpdXM6MTJweCI+PHRleHQgeD0iNjAwIiB5PSIzNCIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZm9udC1mYW1pbHk9IkhlbHZldGljYSxBcmlhbCxzYW5zLXNlcmlmIiBmb250LXNpemU9IjE4IiBmb250LXdlaWdodD0iYm9sZCIgZmlsbD0iIzEyMjYzZiI+TG9nLWJhc2VkIENEQyBhbmQgc3RyZWFtaW5nIGluZ2VzdGlvbiBwYXRoIGZvciByZXRhaWwgZGF0YSBhbmFseXRpY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WFydHMsIHRoZW4gdGhlIHNlbWFudGljIGxheWVyLCB0cmFkaW5nIGRhc2hib2FyZHMgYW5kIHJldmVyc2UgRVRMIGJhY2sgaW50byBQT1MgYW5kIENSTTwvdGV4dD48dGV4dCB4PSI2MDAiIHk9IjM5MiIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZm9udC1mYW1pbHk9IkhlbHZldGljYSxBcmlhbCxzYW5zLXNlcmlmIiBmb250LXNpemU9IjEyLjUiIGZpbGw9IiM1YTZiN2QiPklkZW1wb3RlbnQsIGV4YWN0bHktb25jZS1lZmZlY3RpdmUgbG9hZGluZyB3aXRoIG9mZnNldCBjaGVja3BvaW50cywgd2F0ZXJtYXJraW5nIGFuZCByZXBsYXktc2FmZSBiYWNrZmlsbHM8L3RleHQ+PC9zdmc+" alt="Retail data analytics change data capture and streaming ingestion pipeline diagram"><figcaption><em>Figure 2: the ingestion path MinervaDB hardens during retail data analytics onboarding, with schema contracts, dead-letter handling and replayable history.</em></figcaption></figure>
<p>The connector configuration below is the hardened Debezium baseline MinervaDB deploys for a retail PostgreSQL checkout database. Read the <a href="https://debezium.io/documentation/reference/stable/connectors/postgresql.html" target="_blank" rel="noopener">Debezium PostgreSQL connector documentation</a> alongside the <a href="https://www.postgresql.org/docs/current/logical-replication.html" target="_blank" rel="noopener">PostgreSQL logical replication documentation</a> before you change any of it.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="json" data-enlighter-title="Debezium connector hardened for retail POS and order CDC">{
  "name": "retail-orders-cdc",
  "config": {
    "connector.class": "io.debezium.connector.postgresql.PostgresConnector",
    "plugin.name": "pgoutput",
    "database.hostname": "pg-checkout-primary.internal",
    "database.dbname": "retail",
    "slot.name": "dbz_retail_slot",
    "publication.autocreate.mode": "filtered",
    "table.include.list": "sales.orders,sales.order_lines,sales.returns,inventory.stock_movements,crm.customers",
    "topic.prefix": "retail",
    "snapshot.mode": "initial",
    "incremental.snapshot.chunk.size": 20480,
    "heartbeat.interval.ms": 10000,
    "heartbeat.action.query": "UPDATE dbz.heartbeat SET ts = now()",
    "decimal.handling.mode": "precise",
    "time.precision.mode": "adaptive_time_microseconds",
    "tombstones.on.delete": "true",
    "producer.override.compression.type": "zstd",
    "producer.override.acks": "all",
    "errors.tolerance": "all",
    "errors.deadletterqueue.topic.name": "dlq.retail",
    "errors.deadletterqueue.context.headers.enable": "true",
    "transforms": "route,unwrap",
    "transforms.unwrap.type": "io.debezium.transforms.ExtractNewRecordState",
    "transforms.unwrap.add.fields": "op,source.lsn,source.ts_ms",
    "transforms.unwrap.delete.handling.mode": "rewrite"
  }
}</pre>
<p>The heartbeat line is the detail that separates a retail data analytics pipeline that survives a quiet Sunday from one that fills the checkout database disk. Without a heartbeat, a low-traffic replication slot stops advancing its confirmed flush LSN and PostgreSQL retains write-ahead log segments indefinitely. Monitor slot lag in bytes, not just consumer lag in messages.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="Replication slot and WAL retention watchdog on the retail source">SELECT slot_name,
       active,
       wal_status,
       pg_size_pretty(pg_wal_lsn_diff(pg_current_wal_lsn(), restart_lsn))        AS retained_wal,
       pg_size_pretty(pg_wal_lsn_diff(pg_current_wal_lsn(), confirmed_flush_lsn)) AS unflushed,
       safe_wal_size
FROM   pg_replication_slots
WHERE  slot_type = 'logical'
ORDER  BY pg_wal_lsn_diff(pg_current_wal_lsn(), restart_lsn) DESC;

-- Alert thresholds MinervaDB deploys by default on retail estates:
--   WARNING   retained_wal > 10 GB  or wal_status = 'extended'
--   CRITICAL  retained_wal > 40 GB  or wal_status IN ('unreserved','lost')
--   CRITICAL  slot inactive for more than 5 minutes during trading hours</pre>
<p>Broker tuning, consumer-lag triage and connector recovery for retail data analytics are handled by the same on-call rotation as the MinervaDB <a href="https://minervadb.com/kafka-support/">Apache Kafka support</a> practice, so nobody can hand an incident across a vendor boundary at 03:00. The upstream <a href="https://kafka.apache.org/documentation/" target="_blank" rel="noopener">Apache Kafka documentation</a> is the reference we tune against.</p>
<h2>Dimensional modelling for retail data analytics</h2>
<p>Modelling is the highest-leverage activity in retail data analytics, because badly modelled warehouses fail slowly and quietly. Metrics drift, joins fan out across promotions, storage grows faster than value, and analysts build a shadow estate of spreadsheets that nobody can reconcile at year end. MinervaDB starts by declaring the grain of every fact table, conforming the dimensions that finance, merchandising and supply chain all share, and separating logical modelling from physical layout so the same semantic contract can be materialised on Snowflake, BigQuery or ClickHouse.</p>
<p>For a modern retail business the canonical star is a sales fact at order-line grain, surrounded by conformed date, product, store, customer, promotion and channel dimensions. Returns are modelled as negative-quantity lines against the same fact rather than as a separate table, which keeps net sales additive and stops two dashboards disagreeing about revenue.</p>
<figure><img decoding="async" title="Retail data analytics star schema with conformed dimensions and an order line grain sales fact" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMTUwIDcyMCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJSZXRhaWwgZGF0YSBhbmFseXRpY3Mgc3RhciBzY2hlbWEgd2l0aCBjb25mb3JtZWQgZGltZW5zaW9ucyBhbmQgYW4gb3JkZXIgbGluZSBncmFpbiBzYWxlcyBmYWN0IiBzdHlsZT0id2lkdGg6MTAwJTtoZWlnaHQ6YXV0bztiYWNrZ3JvdW5kOiNmZmZmZmY7Ym9yZGVyOjFweCBzb2xpZCAjZDdkZGU1O2JvcmRlci1yYWRpdXM6MTJweCI+PHRleHQgeD0iNTc1IiB5PSIyNCIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZm9udC1mYW1pbHk9IkhlbHZldGljYSxBcmlhbCxzYW5zLXNlcmlmIiBmb250LXNpemU9IjE4IiBmb250LXdlaWdodD0iYm9sZCIgZmlsbD0iIzEyMjYzZiI+UmV0YWlsIHN0YXIgc2NoZW1hOiBmYWN0X3NhbGVzX2xpbmUgYXQgb25lLW9yZGVyLWxpbmUgZ3JhaW48L3RleHQ+PGxpbmUgeDE9IjE2NSIgeTE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GUiIGZvbnQtZmFtaWx5PSJIZWx2ZXRpY2EsQXJpYWwsc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMi41IiBmaWxsPSIjNWE2YjdkIj5Db25mb3JtZWQgZGltZW5zaW9ucywgc3Vycm9nYXRlIGtleXMsIFNDRCBUeXBlIDIgaGlzdG9yeSBhbmQgb25lIGV4cGxpY2l0bHkgZGVjbGFyZWQgZmFjdCBncmFpbjwvdGV4dD48L3N2Zz4=" alt="Retail data analytics star schema with conformed dimensions and an order line grain sales fact"><figcaption><em>Figure 3: the conformed retail star schema MinervaDB reviews in every retail data analytics design audit.</em></figcaption></figure>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="Retail warehouse DDL: SCD Type 2 dimension and order-line sales fact">-- Conformed retail dimension with SCD Type 2 history
CREATE TABLE IF NOT EXISTS dw.dim_product (
    product_key        BIGINT        NOT NULL,          -- surrogate key
    sku                VARCHAR(64)   NOT NULL,          -- natural / business key
    ean                VARCHAR(14),
    brand              VARCHAR(128),
    category           VARCHAR(128),
    sub_category       VARCHAR(128),
    unit_cost          NUMERIC(18,4),
    scd2_valid_from    TIMESTAMP     NOT NULL,
    scd2_valid_to      TIMESTAMP     NOT NULL DEFAULT TIMESTAMP '9999-12-31 00:00:00',
    scd2_is_current    BOOLEAN       NOT NULL DEFAULT TRUE,
    row_hash           VARCHAR(64)   NOT NULL,          -- change detection
    dw_loaded_at       TIMESTAMP     NOT NULL DEFAULT CURRENT_TIMESTAMP,
    CONSTRAINT pk_dim_product PRIMARY KEY (product_key)
);

-- Fact table: grain is ONE ORDER LINE. Never mix grains in one retail fact.
CREATE TABLE IF NOT EXISTS dw.fact_sales_line (
    sale_line_id       BIGINT        NOT NULL,
    date_key           INTEGER       NOT NULL,
    store_key          BIGINT        NOT NULL,
    product_key        BIGINT        NOT NULL,
    customer_key       BIGINT        NOT NULL,
    promo_key          BIGINT,
    channel_key        BIGINT        NOT NULL,
    order_line_id      VARCHAR(64)   NOT NULL,          -- degenerate dimension
    quantity           NUMERIC(18,3) NOT NULL,          -- negative for returns
    gross_amount       NUMERIC(18,4) NOT NULL,
    discount_amount    NUMERIC(18,4) NOT NULL DEFAULT 0,
    net_amount         NUMERIC(18,4) NOT NULL,
    tax_amount         NUMERIC(18,4) NOT NULL DEFAULT 0,
    margin_amount      NUMERIC(18,4),
    return_flag        BOOLEAN       NOT NULL DEFAULT FALSE,
    dw_batch_id        BIGINT        NOT NULL,
    CONSTRAINT pk_fact_sales_line PRIMARY KEY (sale_line_id)
)
CLUSTER BY (date_key, store_key);                       -- Snowflake / BigQuery layout

-- Additivity guard: net sales must always reconcile to gross less discount
ALTER TABLE dw.fact_sales_line
  ADD CONSTRAINT ck_fact_sales_net
  CHECK (net_amount = gross_amount - discount_amount);</pre>
<p>Clustering choice matters more than most retail data analytics teams expect. Almost every trading query filters on a date range and a store or region, so <a href="https://docs.snowflake.com/en/user-guide/tables-clustering-keys" target="_blank" rel="noopener">clustering keys</a> on those two columns typically remove eighty to ninety-five percent of the bytes scanned. Getting this wrong is the most common reason a retailer sees a warehouse bill grow faster than sales.</p>
<h2>Physical design for sub-second store dashboards</h2>
<p>Finance can wait thirty minutes. A store manager checking hourly sales against plan cannot, and neither can a pricing engine. For that half of retail data analytics MinervaDB materialises the same semantic fact onto a real-time OLAP engine as a sorted, compressed table with a projection for the highest-traffic dashboard filter. In practice this is the difference between a four-second dashboard and a forty-millisecond one.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="ClickHouse physical design for real-time retail dashboards">CREATE TABLE analytics.fact_sales_line
(
    event_date    Date,
    event_time    DateTime64(3, 'UTC'),
    store_id      UInt32              CODEC(T64, ZSTD(3)),
    product_id    UInt32              CODEC(T64, ZSTD(3)),
    customer_id   UInt64              CODEC(T64, ZSTD(3)),
    channel       LowCardinality(String),
    promo_code    LowCardinality(String),
    quantity      Decimal(18,3),
    net_amount    Decimal(18,4)       CODEC(ZSTD(3)),
    margin_amount Decimal(18,4)       CODEC(ZSTD(3)),
    ingested_at   DateTime DEFAULT now(),
    PROJECTION proj_store_daily
    (
        SELECT store_id, event_date, sum(net_amount), sum(quantity)
        GROUP BY store_id, event_date
    )
)
ENGINE = MergeTree
PARTITION BY toYYYYMM(event_date)
ORDER BY (store_id, event_date, product_id)
TTL event_date + INTERVAL 36 MONTH TO VOLUME 'cold',
    event_date + INTERVAL 84 MONTH DELETE
SETTINGS index_granularity = 8192,
         min_bytes_for_wide_part = 10485760;

-- Incremental roll-up so trading dashboards never scan raw basket rows
CREATE MATERIALIZED VIEW analytics.mv_store_daily
ENGINE = SummingMergeTree
PARTITION BY toYYYYMM(event_date)
ORDER BY (store_id, event_date)
AS SELECT store_id,
          event_date,
          sum(net_amount)    AS net_amount,
          sum(quantity)      AS quantity,
          sum(margin_amount) AS margin_amount
FROM analytics.fact_sales_line
GROUP BY store_id, event_date;</pre>
<p>The sort order, codecs and TTL tiering above follow the <a href="https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree" target="_blank" rel="noopener">ClickHouse MergeTree documentation</a>, and this pattern is the backbone of the MinervaDB <a href="https://minervadb.com/clickhouse-consulting/">ClickHouse consulting</a> practice for real-time retail data analytics.</p>
<h2>Transformation with dbt: retail marts that reconcile</h2>
<p>Transformation is where retail data analytics becomes a software engineering discipline, and it is the layer where support pays for itself fastest. MinervaDB standardises on version-controlled, tested and documented transformation code with staging, intermediate and mart layers, deterministic incremental strategies, and one semantic definition of net sales and margin that both finance and merchandising trust. Returns and credit notes arrive late, so retail models must self-heal rather than require a manual restatement.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="dbt incremental retail mart with a late-arrival window for returns">{{ config(
    materialized       = 'incremental',
    incremental_strategy = 'insert_overwrite',
    partition_by       = {'field': 'order_date', 'data_type': 'date', 'granularity': 'day'},
    cluster_by         = ['store_key', 'product_key'],
    on_schema_change   = 'append_new_columns',
    tags               = ['mart', 'retail', 'revenue']
) }}

WITH bounds AS (
    /* Reprocess a 7-day trailing window so late returns and price
       adjustments self-heal without a manual restatement. */
    SELECT DATEADD('day', -7, COALESCE(MAX(order_date), '1970-01-01')) AS lower_bound
    FROM {{ this }}
    {% if not is_incremental() %} WHERE FALSE {% endif %}
),

lines AS (
    SELECT o.order_line_id,
           o.order_date,
           o.customer_id,
           o.store_code,
           o.product_key,
           o.promo_code,
           o.channel,
           o.quantity,
           o.gross_amount,
           o.discount_amount,
           o.gross_amount - o.discount_amount AS net_amount
    FROM {{ ref('stg_retail__order_lines') }} o
    {% if is_incremental() %}
      WHERE o.order_date >= (SELECT lower_bound FROM bounds)
    {% endif %}
)

SELECT {{ dbt_utils.generate_surrogate_key(['l.order_line_id']) }} AS sale_line_id,
       d.date_key,
       s.store_key,
       l.product_key,
       c.customer_key,
       pr.promo_key,
       ch.channel_key,
       l.order_line_id,
       l.order_date,
       l.quantity,
       l.gross_amount,
       l.discount_amount,
       l.net_amount,
       l.net_amount - (l.quantity * p.unit_cost) AS margin_amount,
       l.quantity < 0                            AS return_flag
FROM lines l
JOIN {{ ref('dim_date') }}      d  ON d.calendar_date = l.order_date
JOIN {{ ref('dim_store') }}     s  ON s.store_code   = l.store_code
JOIN {{ ref('dim_customer') }}  c  ON c.customer_id  = l.customer_id AND c.scd2_is_current
JOIN {{ ref('dim_product') }}   p  ON p.product_key  = l.product_key AND p.scd2_is_current
LEFT JOIN {{ ref('dim_promotion') }} pr ON pr.promo_code = l.promo_code
JOIN {{ ref('dim_channel') }}   ch ON ch.channel      = l.channel</pre>
<p>Tests are what make retail data analytics defensible in a trading meeting. The contract below blocks a deploy if the grain breaks, if a foreign key dangles, or if the source stops arriving. The incremental strategy follows the <a href="https://docs.getdbt.com/docs/build/incremental-models" target="_blank" rel="noopener">dbt incremental models documentation</a>.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml" data-enlighter-title="dbt contracts, tests and freshness SLAs for retail marts">version: 2

sources:
  - name: retail_raw
    database: analytics_raw
    freshness:
      warn_after:  {count: 30, period: minute}
      error_after: {count: 90, period: minute}
    loaded_at_field: _ingested_at
    tables:
      - name: order_lines_stream
        columns:
          - name: order_line_id
            tests: [not_null, unique]

models:
  - name: fact_sales_line
    description: "Retail revenue fact at order-line grain. Owner: analytics-platform@minervadb.com"
    config:
      contract: {enforced: true}
    columns:
      - name: sale_line_id
        data_type: varchar
        constraints: [{type: not_null}, {type: primary_key}]
        tests: [unique, not_null]
      - name: store_key
        data_type: bigint
        tests:
          - relationships: {to: ref('dim_store'), field: store_key}
      - name: product_key
        data_type: bigint
        tests:
          - relationships: {to: ref('dim_product'), field: product_key}
      - name: net_amount
        data_type: numeric(18,4)
        tests:
          - dbt_expectations.expect_column_values_to_not_be_null
    tests:
      - dbt_utils.equal_rowcount:
          compare_model: ref('stg_retail__order_lines')
      - dbt_utils.recency:
          datepart: hour
          field: order_date
          interval: 24</pre>
<p>Orchestration is deliberately boring. A retail data analytics DAG should be idempotent, watermarked and capped in concurrency so a retry storm during peak trading cannot pile up and inflate the warehouse bill. The <a href="https://airflow.apache.org/docs/apache-airflow/stable/index.html" target="_blank" rel="noopener">Apache Airflow documentation</a> covers the scheduling semantics; the pattern below adds the retail-specific guard rails.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="python" data-enlighter-title="Airflow DAG: watermarked, idempotent retail incremental load with quality gates">from datetime import datetime, timedelta
from airflow.decorators import dag, task
from airflow.providers.common.sql.operators.sql import SQLCheckOperator

DEFAULT_ARGS = {
    "owner": "minervadb-retail-analytics",
    "retries": 3,
    "retry_delay": timedelta(minutes=5),
    "retry_exponential_backoff": True,
    "execution_timeout": timedelta(hours=2),
}

@dag(
    dag_id="retail_sales_incremental",
    schedule="*/15 * * * *",
    start_date=datetime(2026, 1, 1),
    catchup=False,
    max_active_runs=1,          # protects the warehouse from run pile-up on peak days
    default_args=DEFAULT_ARGS,
    tags=["retail", "warehouse", "incremental", "minervadb"],
)
def retail_sales_incremental():

    @task
    def resolve_watermark() -> str:
        """Never trust wall-clock time: read the last committed watermark."""
        from airflow.providers.snowflake.hooks.snowflake import SnowflakeHook
        hook = SnowflakeHook(snowflake_conn_id="dw")
        low = hook.get_first(
            "SELECT COALESCE(MAX(dw_loaded_at), '1970-01-01') FROM dw.fact_sales_line"
        )[0]
        return low.isoformat()

    @task
    def merge_increment(watermark: str) -> int:
        """MERGE is idempotent, so a retried task cannot double-count revenue."""
        from airflow.providers.snowflake.hooks.snowflake import SnowflakeHook
        hook = SnowflakeHook(snowflake_conn_id="dw")
        return hook.run(
            """
            MERGE INTO dw.fact_sales_line AS t
            USING raw.v_order_lines_enriched AS s
               ON t.sale_line_id = s.sale_line_id
            WHEN MATCHED THEN UPDATE SET
                 t.quantity   = s.quantity,
                 t.net_amount = s.net_amount,
                 t.return_flag = s.return_flag,
                 t.dw_loaded_at = s.updated_at
            WHEN NOT MATCHED THEN INSERT VALUES (
                 s.sale_line_id, s.date_key, s.store_key, s.product_key,
                 s.customer_key, s.promo_key, s.channel_key, s.order_line_id,
                 s.quantity, s.gross_amount, s.discount_amount, s.net_amount,
                 s.tax_amount, s.margin_amount, s.return_flag, s.batch_id)
            """,
            parameters={"watermark": watermark},
            handler=lambda cur: cur.rowcount,
        )

    freshness_gate = SQLCheckOperator(
        task_id="freshness_sla_gate",
        conn_id="dw",
        sql="""
            SELECT TIMESTAMPDIFF('minute', MAX(dw_loaded_at), CURRENT_TIMESTAMP()) < 30
            FROM dw.fact_sales_line
        """,
    )

    reconciliation_gate = SQLCheckOperator(
        task_id="pos_to_warehouse_reconciliation",
        conn_id="dw",
        sql="""
            WITH src AS (SELECT SUM(net_amount) v FROM raw.pos_daily_totals
                         WHERE business_date = CURRENT_DATE() - 1),
                 dwh AS (SELECT SUM(net_amount) v FROM dw.fact_sales_line f
                         JOIN dw.dim_date d ON d.date_key = f.date_key
                         WHERE d.calendar_date = CURRENT_DATE() - 1)
            SELECT ABS(src.v - dwh.v) / NULLIF(src.v, 0) < 0.001 FROM src, dwh """, ) merge_increment(resolve_watermark()) >> freshness_gate >> reconciliation_gate

retail_sales_incremental()</pre>
<h2>Real-time inventory, pricing and replenishment signals</h2>
<p>The operational half of retail data analytics is event-driven. Stock-outs, basket abandonment, promotion burn rate and click-and-collect readiness all have a shelf life measured in minutes, so they belong in a stream processor rather than a nightly batch. Apache Flink joins the order stream against inventory movements and emits an alert topic that reverse ETL pushes straight back into store apps and the pricing engine.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="Flink SQL: rolling stock-out and sell-through detection for retail">-- Rolling 15-minute sell-through by store and SKU, with a stock-out signal
CREATE TABLE order_lines (
    order_line_id  STRING,
    store_id       INT,
    product_id     INT,
    quantity       DECIMAL(18,3),
    net_amount     DECIMAL(18,4),
    event_time     TIMESTAMP(3),
    WATERMARK FOR event_time AS event_time - INTERVAL '30' SECOND
) WITH (
    'connector' = 'kafka',
    'topic'     = 'retail.sales.order_lines',
    'properties.group.id' = 'flink-sell-through',
    'scan.startup.mode'   = 'group-offsets',
    'format'    = 'avro-confluent'
);

CREATE TABLE stock_on_hand (
    store_id    INT,
    product_id  INT,
    on_hand_qty DECIMAL(18,3),
    updated_at  TIMESTAMP(3),
    PRIMARY KEY (store_id, product_id) NOT ENFORCED
) WITH ('connector' = 'upsert-kafka', 'topic' = 'retail.inventory.soh',
        'key.format' = 'json', 'value.format' = 'json');

INSERT INTO retail_alerts
SELECT o.store_id,
       o.product_id,
       SUM(o.quantity)                                   AS sold_15m,
       MAX(s.on_hand_qty)                                AS on_hand,
       CASE WHEN MAX(s.on_hand_qty) <= 0                     THEN 'STOCK_OUT'
            WHEN MAX(s.on_hand_qty) < SUM(o.quantity) * 2 THEN 'REPLENISH_NOW' ELSE 'OK' END AS signal, TUMBLE_END(o.event_time, INTERVAL '15' MINUTE) AS window_end FROM order_lines o LEFT JOIN stock_on_hand FOR SYSTEM_TIME AS OF o.event_time AS s ON o.store_id = s.store_id AND o.product_id = s.product_id GROUP BY o.store_id, o.product_id, TUMBLE(o.event_time, INTERVAL '15' MINUTE) HAVING SUM(o.quantity) > 0;</pre>
<p>Watermarking, exactly-once sinks and state backend sizing follow the <a href="https://nightlies.apache.org/flink/flink-docs-stable/" target="_blank" rel="noopener">Apache Flink documentation</a>. In a retail data analytics context the practical rule is that any signal a store colleague acts on within the hour should be produced by the stream, and any number that appears in a board pack should be produced by the warehouse from replayable history.</p>
<h2>Query performance and FinOps for retail data analytics</h2>
<p>Warehouse performance work inside a retail data analytics engagement is evidence-driven. MinervaDB profiles the workload, ranks queries by total cost rather than by worst single execution, reads the physical plan, and fixes the root cause before discussing more compute. The usual retail culprits are a missing pre-aggregation, a promotion join that fans out, an unpruned partition, an implicit cast that defeats clustering, or a BI tool issuing one query per dashboard tile across four hundred stores.</p>
<table>
<thead>
<tr>
<th>Retail symptom</th>
<th>Usual root cause</th>
<th>MinervaDB remediation</th>
</tr>
</thead>
<tbody>
<tr>
<td>Trading dashboard slow only at 08:00</td>
<td>Every regional manager opening the same shared warehouse at once</td>
<td>Workload isolation per persona, multi-cluster scaling policy, cache warm-up before store opening</td>
</tr>
<tr>
<td>Massive bytes scanned on basket queries</td>
<td>Partition pruning defeated by casts and functions on the date filter</td>
<td>Sargable date ranges, aligned data types, re-cluster on the real access pattern of date plus store</td>
</tr>
<tr>
<td>Spilling to remote storage during promotions</td>
<td>Promotion dimension joined on a non-unique mechanic key, fanning out order lines</td>
<td>Fix the grain, deduplicate upstream, stage the aggregate, right-size memory</td>
</tr>
<tr>
<td>Cost doubled month over month</td>
<td>Full refreshes, auto-suspend disabled, retry storms, unbounded supplier exports</td>
<td>Incremental strategy, suspend and timeout policies, budgets and per-category chargeback</td>
</tr>
<tr>
<td>Two dashboards disagree on net sales</td>
<td>Returns and discounts redefined inside the BI layer instead of one governed metric</td>
<td>Single semantic layer, certified retail marts, deprecation plan for shadow models</td>
</tr>
</tbody>
</table>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="Find the retail queries that actually cost you money">-- Snowflake: rank by total cost, not by worst single execution
SELECT query_hash,
       ANY_VALUE(LEFT(query_text, 120))                        AS sample_sql,
       COUNT(*)                                                AS executions,
       ROUND(SUM(total_elapsed_time) / 1000 / 60, 1)           AS total_minutes,
       ROUND(AVG(total_elapsed_time) / 1000, 2)                AS avg_seconds,
       ROUND(SUM(bytes_scanned) / POWER(1024, 4), 3)           AS tb_scanned,
       ROUND(AVG(percentage_scanned_from_cache), 1)            AS pct_from_cache,
       SUM(bytes_spilled_to_remote_storage)                    AS remote_spill
FROM   snowflake.account_usage.query_history
WHERE  start_time >= DATEADD('day', -7, CURRENT_TIMESTAMP())
  AND  execution_status = 'SUCCESS'
GROUP  BY query_hash
HAVING total_minutes > 5
ORDER  BY total_minutes DESC
LIMIT  25;

-- The same triage on the real-time retail OLAP tier
SELECT normalized_query_hash,
       count()                              AS executions,
       round(avg(query_duration_ms))        AS avg_ms,
       formatReadableSize(sum(read_bytes))  AS read_total,
       round(sum(read_rows) / 1e9, 2)       AS billion_rows,
       formatReadableSize(max(memory_usage)) AS peak_memory
FROM   system.query_log
WHERE  type = 'QueryFinish' AND event_time > now() - INTERVAL 7 DAY
GROUP  BY normalized_query_hash
ORDER  BY sum(query_duration_ms) DESC
LIMIT  25;</pre>
<p>Cost is treated as a reliability signal in retail data analytics: a pipeline that suddenly consumes three times its usual compute is almost always broken before it is expensive. Alerting therefore watches credits per run alongside duration and row counts, which is exactly the discipline behind MinervaDB <a href="https://minervadb.com/data-engineering/">high-performance data engineering</a>.</p>
<h2>SLOs, data quality and observability for retail data analytics</h2>
<p>There is no retail data analytics platform without service level objectives, only firefighting. Before MinervaDB accepts on-call responsibility we agree measurable objectives with merchandising, supply chain and finance, instrument them, and publish them on a dashboard both sides can see. The set below is the default deployed on day one of an engagement.</p>
<table>
<thead>
<tr>
<th>Service level objective</th>
<th>How it is measured</th>
<th>Default retail target</th>
</tr>
</thead>
<tbody>
<tr>
<td>Freshness of certified trading marts</td>
<td>Age of newest order line versus POS commit time</td>
<td>99% of intervals under 30 minutes</td>
</tr>
<tr>
<td>Pipeline success rate</td>
<td>Successful DAG runs including automatic retries</td>
<td>99.5% monthly, 99.9% in peak trading weeks</td>
</tr>
<tr>
<td>Dashboard query latency</td>
<td>p95 execution time for certified BI queries</td>
<td>Under 3 seconds on the warehouse, under 300 ms on real-time OLAP</td>
</tr>
<tr>
<td>POS to warehouse reconciliation</td>
<td>Row and net sales variance between source and warehouse</td>
<td>Under 0.1% daily, zero unexplained variance monthly</td>
</tr>
<tr>
<td>Unit economics</td>
<td>Compute credits or slot-hours per certified report</td>
<td>Flat or declining quarter over quarter</td>
</tr>
<tr>
<td>Recovery objectives</td>
<td>Tested restore and replay of the warehouse and lakehouse</td>
<td>RPO 15 minutes, RTO 4 hours, verified quarterly</td>
</tr>
</tbody>
</table>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="Freshness, volume and drift monitor for retail marts">-- One row per certified retail mart: freshness, volume anomaly and null drift
WITH observed AS (
    SELECT 'dw.fact_sales_line'                                    AS object_name,
           MAX(dw_loaded_at)                                       AS last_loaded_at,
           COUNT(*)                                                AS row_count,
           COUNT_IF(store_key IS NULL) / NULLIF(COUNT(*), 0)       AS null_store_rate
    FROM   dw.fact_sales_line
    WHERE  dw_loaded_at >= DATEADD('day', -1, CURRENT_TIMESTAMP())
),
baseline AS (
    SELECT object_name,
           AVG(row_count)        AS mean_rows,
           STDDEV_POP(row_count) AS sd_rows
    FROM   monitoring.mart_volume_history
    WHERE  observed_on >= DATEADD('day', -28, CURRENT_DATE())
      AND  day_of_week = DAYOFWEEK(CURRENT_DATE())   -- retail is weekly-seasonal
    GROUP  BY object_name
)
SELECT o.object_name,
       TIMESTAMPDIFF('minute', o.last_loaded_at, CURRENT_TIMESTAMP()) AS staleness_minutes,
       o.row_count,
       ROUND((o.row_count - b.mean_rows) / NULLIF(b.sd_rows, 0), 2)   AS volume_z_score,
       ROUND(o.null_store_rate * 100, 3)                              AS null_store_pct,
       CASE
         WHEN TIMESTAMPDIFF('minute', o.last_loaded_at, CURRENT_TIMESTAMP()) > 45 THEN 'PAGE_ONCALL'
         WHEN ABS((o.row_count - b.mean_rows) / NULLIF(b.sd_rows, 0)) > 3          THEN 'PAGE_ONCALL'
         WHEN o.null_store_rate > 0.001                                           THEN 'WARN'
         ELSE 'OK'
       END                                                            AS action
FROM observed o
JOIN baseline b USING (object_name);</pre>
<p>Note the weekly seasonality filter. Comparing a Saturday against a 28-day mean will page your on-call engineer every weekend, which is how alert fatigue starts. Retail data analytics monitoring must compare like trading days with like trading days, and must widen its bands automatically around known promotional peaks.</p>
<h2>Governance, PII and PCI DSS in retail data analytics</h2>
<p>Governance is inseparable from retail data analytics. The warehouse is usually the widest-reaching copy of your customer data, which makes it the most consequential system in an audit. Loyalty records, delivery addresses, marketing consent flags and payment tokens all end up there, and regional data-residency rules mean a single global table is rarely acceptable. MinervaDB implements least-privilege role hierarchies, tag-based classification, dynamic masking, row-level policies and immutable audit trails, then produces the evidence assessors ask for.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="Tag-based classification, masking and row-level security for retail customer data">-- 1. Classify once, enforce everywhere
CREATE TAG IF NOT EXISTS governance.data_sensitivity
  ALLOWED_VALUES 'public', 'internal', 'confidential', 'pii', 'payment';

ALTER TABLE dw.dim_customer MODIFY COLUMN email_address
  SET TAG governance.data_sensitivity = 'pii';

-- 2. Column-level dynamic masking driven by role, not by view sprawl
CREATE OR REPLACE MASKING POLICY governance.mask_email AS (val STRING)
RETURNS STRING ->
  CASE
    WHEN CURRENT_ROLE() IN ('DATA_PROTECTION_OFFICER', 'ANALYTICS_ADMIN') THEN val
    WHEN CURRENT_ROLE() IN ('MERCHANDISING_ANALYST', 'STORE_OPS')
         THEN REGEXP_REPLACE(val, '^[^@]+', '****')
    ELSE '***MASKED***'
  END;

ALTER TAG governance.data_sensitivity
  SET MASKING POLICY governance.mask_email FOR STRING;

-- 3. Row-level security for regional data residency across trading markets
CREATE OR REPLACE ROW ACCESS POLICY governance.market_rap AS (country_code CHAR(2))
RETURNS BOOLEAN ->
  EXISTS (
    SELECT 1 FROM governance.role_market_map m
    WHERE m.role_name = CURRENT_ROLE()
      AND (m.country_code = country_code OR m.country_code = 'ALL')
  );

ALTER TABLE dw.dim_customer
  ADD ROW ACCESS POLICY governance.market_rap ON (country_code);

-- 4. Prove it: who touched loyalty PII in the last 30 days
SELECT user_name, role_name, query_start_time, LEFT(query_text, 100) AS statement
FROM   snowflake.account_usage.access_history a,
       LATERAL FLATTEN(input => a.base_objects_accessed) b
WHERE  b.value:"columns"[0]:"columnName"::STRING = 'EMAIL_ADDRESS'
  AND  query_start_time >= DATEADD('day', -30, CURRENT_TIMESTAMP())
ORDER  BY query_start_time DESC;</pre>
<p>Retail estates routinely operate inside SOC 2, ISO 27001, PCI DSS and GDPR at the same time, plus regional residency regimes. The practical rule for retail data analytics is that raw pan data never enters the warehouse at all: tokenise at the payment gateway, land the token, and keep the cardholder data environment outside the analytics boundary entirely. That single decision removes most of the PCI DSS scope from your data platform.</p>
<h2>Personalisation, forecasting and vector search on the retail stack</h2>
<p>Machine learning is not a separate platform, it is another consumer of the same conformed marts. Demand forecasting, size-curve optimisation, markdown planning, propensity scoring and next-best-offer models all train on the retail data analytics warehouse and serve from a feature store that shares lineage with the dashboards. Keeping features and metrics in the same repository is what stops a model and a board pack disagreeing about what a unit of demand is.</p>
<p>Semantic product discovery and retrieval-augmented merchandising assistants add a vector workload on top. Product descriptions, review text, supplier specifications and image embeddings live in a vector index alongside the catalogue, most often in PostgreSQL with <a href="https://github.com/pgvector/pgvector" target="_blank" rel="noopener">pgvector</a> for smaller catalogues, and in a dedicated vector store once you pass a few hundred million embeddings. MinervaDB covers this under <a href="https://minervadb.com/vector-data-engineering/">vector data engineering</a>, and the operational concerns are familiar: index build time, recall versus latency, and the cost of re-embedding after every catalogue refresh.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="sql" data-enlighter-title="pgvector semantic product search for retail catalogue discovery">CREATE EXTENSION IF NOT EXISTS vector;

CREATE TABLE catalogue.product_embedding (
    product_key   BIGINT PRIMARY KEY,
    sku           TEXT NOT NULL,
    category      TEXT NOT NULL,
    embedding     vector(1024) NOT NULL,
    refreshed_at  TIMESTAMPTZ NOT NULL DEFAULT now()
);

-- HNSW gives sub-10 ms recall at retail catalogue scale
CREATE INDEX idx_product_embedding_hnsw
    ON catalogue.product_embedding
    USING hnsw (embedding vector_cosine_ops)
    WITH (m = 16, ef_construction = 128);

-- Hybrid search: semantic similarity constrained by merchandising rules
SELECT p.sku,
       p.category,
       1 - (p.embedding <=> :query_embedding) AS similarity,
       s.on_hand_qty
FROM   catalogue.product_embedding p
JOIN   inventory.stock_on_hand s ON s.product_key = p.product_key
WHERE  p.category = ANY(:allowed_categories)
  AND  s.on_hand_qty > 0
ORDER  BY p.embedding <=> :query_embedding
LIMIT  24;</pre>
<p>Open table formats matter here too. If basket and clickstream history sits in Iceberg or Delta, a training job can read it with Spark or <a href="https://trino.io/docs/current/" target="_blank" rel="noopener">Trino</a> without exporting a copy, and a BI tool such as <a href="https://superset.apache.org/docs/intro" target="_blank" rel="noopener">Apache Superset</a> can query the same files. One copy, many engines, is the cheapest architectural decision in retail data analytics.</p>
<h2>A 90-day retail data analytics rollout plan</h2>
<p>MinervaDB does not begin by rewriting your platform. We measure it, remove the fragility that causes pages at 03:00, and only then invest in optimisation and automation. Every retail data analytics engagement follows the same deliverable-driven path, with written outputs and measured before-and-after benchmarks at each phase.</p>
<figure><img decoding="async" title="Ninety day retail data analytics rollout plan from discovery to 24x7 operations" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMjAwIDMyMCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJOaW5ldHkgZGF5IHJldGFpbCBkYXRhIGFuYWx5dGljcyByb2xsb3V0IHBsYW4gZnJvbSBkaXNjb3ZlcnkgdG8gMjR4NyBvcGVyYXRpb25zIiBzdHlsZT0id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GRlbGl2ZXJhYmxlcywgbWVhc3VyZWQgYmVuY2htYXJrcyBhbmQgYSBuYW1lZCBNaW5lcnZhREIgcHJpbmNpcGFsIGVuZ2luZWVyPC90ZXh0Pjwvc3ZnPg==" alt="Ninety day retail data analytics rollout plan from discovery to 24x7 operations"><figcaption><em>Figure 4: the MinervaDB onboarding path for a modern retail data analytics engagement.</em></figcaption></figure>
<p>The discovery report typically lands within three business days and identifies enough quick wins to cut warehouse spend by twenty to forty percent while removing the most common source of stale trading dashboards. Deeper modelling and performance gains accrue across the first ninety days, and the 24x7 rotation described in <a href="https://minervadb.com/24-7-emergency-dba-coverage/">emergency DBA coverage</a> underwrites the whole thing.</p>
<h2>Retail data analytics FAQ</h2>
<h3>What is the minimum viable retail data analytics stack?</h3>
<p>For a single-brand retailer under about fifty million order lines a year: log-based CDC from the checkout database, an object-store landing zone in Parquet, one cloud warehouse, dbt for transformation, Airflow or Dagster for orchestration, and one BI tool with a governed semantic layer. Add a real-time OLAP engine only when a business process genuinely needs sub-second answers, not because a dashboard feels slow.</p>
<h3>Should retail data analytics run on a warehouse or a lakehouse?</h3>
<p>Both, and the boundary is economic rather than religious. Keep multi-year basket and clickstream history in an open table format on object storage where it is cheap and portable, and keep the certified marts that finance and merchandising depend on in the warehouse where concurrency, governance and query latency are best. Storing raw history in Iceberg or Delta preserves your right to change warehouse vendors later.</p>
<h3>How do you handle returns and credit notes without restating history?</h3>
<p>Model returns as negative-quantity lines against the same order-line fact, and reprocess a trailing window on every incremental run so late arrivals self-heal. That combination keeps net sales additive, avoids a separate returns fact that nobody remembers to join, and removes the manual month-end restatement that plagues most retail data analytics teams.</p>
<h3>How fast can a retail data analytics platform realistically be?</h3>
<p>With log-based CDC, a stream processor and a real-time OLAP tier, five to ten seconds from a till transaction to a store dashboard is routine. The certified warehouse marts that feed finance normally land within fifteen to thirty minutes. The limiting factor is almost never the engine, it is the transformation strategy and the willingness to pre-aggregate.</p>
<h3>Can MinervaDB own on-call for our retail pipelines?</h3>
<p>Yes. On the Mission Critical tier MinervaDB holds the pager for pipelines, warehouses and BI availability, responds to P1 incidents within fifteen minutes, and delivers a written root cause analysis with a permanent fix rather than a restart. Full details are on the <a href="https://minervadb.com/data-analytics-and-data-warehousing-support/">Data Analytics and Data Warehousing Support</a> page.</p>
<h3>Do we have to migrate our existing platform?</h3>
<p>No. Most engagements begin as pure support on the incumbent retail data analytics stack, whether that is Snowflake, BigQuery, Redshift, Databricks, ClickHouse, Greenplum or PostgreSQL. Any migration MinervaDB later recommends is justified with measured benchmarks, a cost model and a reversible cutover plan.</p>
<h3>How do you reduce cloud warehouse cost without hurting trading dashboards?</h3>
<p>By eliminating waste before touching capacity: incremental instead of full refresh, pruning-friendly layouts, pre-aggregated roll-ups for the tiles everyone opens at 08:00, result caching, auto-suspend and statement timeouts, workload isolation so one supplier export cannot inflate a shared cluster, and per-category budgets with chargeback. Performance usually improves as cost falls.</p>
<h3>Does retail data analytics support cover our source databases too?</h3>
<p>Yes. The same team supports the OLTP sources feeding the warehouse, including <a href="https://minervadb.com/postgresql-support/">PostgreSQL</a> and <a href="https://minervadb.com/mysql-support/">MySQL</a> checkout and catalogue databases, so replication slot health, binlog retention and CDC lag are never somebody else's problem.</p>
<h2>Talk to a MinervaDB retail data analytics expert</h2>
<p>Tell us which engines you run, where the pain is and what your trading calendar looks like. A MinervaDB principal engineer will review your retail data analytics architecture, quantify the risk and cost exposure, and show you exactly what full-stack support would change. No obligation and no scripted sales call. <a href="https://minervadb.com/contact-minervadb-book-an-appointment/">Book an appointment with MinervaDB</a> or read the <a href="https://minervadb.com/minervadb-consultative-support-2/">consultative support overview</a> first.</p>
<h3>Further reading from MinervaDB</h3>
<ul>
<li><a href="https://minervadb.com/data-analytics-and-data-warehousing-support/">Data Analytics and Data Warehousing Support</a></li>
<li><a href="https://minervadb.com/data-strategy-and-analytics/">Data strategy and analytics consulting</a></li>
<li><a href="https://minervadb.com/data-engineering/">Elite high-performance data engineering</a></li>
<li><a href="https://minervadb.com/kafka-support/">Apache Kafka support and streaming operations</a></li>
<li><a href="https://minervadb.com/clickhouse-consulting/">ClickHouse consulting for real-time analytics</a></li>
<li><a href="https://minervadb.com/vector-data-engineering/">Vector data engineering for AI workloads</a></li>
<li><a href="https://minervadb.com/24-7-emergency-dba-coverage/">24x7 emergency DBA coverage</a></li>
</ul>
<h3>Upstream documentation referenced in this guide</h3>
<ul>
<li><a href="https://www.postgresql.org/docs/current/logical-replication.html" target="_blank" rel="noopener">PostgreSQL logical replication</a></li>
<li><a href="https://debezium.io/documentation/reference/stable/connectors/postgresql.html" target="_blank" rel="noopener">Debezium PostgreSQL connector</a></li>
<li><a href="https://kafka.apache.org/documentation/" target="_blank" rel="noopener">Apache Kafka documentation</a></li>
<li><a href="https://nightlies.apache.org/flink/flink-docs-stable/" target="_blank" rel="noopener">Apache Flink documentation</a></li>
<li><a href="https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree" target="_blank" rel="noopener">ClickHouse MergeTree engine</a></li>
<li><a href="https://iceberg.apache.org/spec/" target="_blank" rel="noopener">Apache Iceberg table specification</a></li>
<li><a href="https://delta.io/" target="_blank" rel="noopener">Delta Lake</a></li>
<li><a href="https://docs.getdbt.com/docs/build/incremental-models" target="_blank" rel="noopener">dbt incremental models</a></li>
<li><a href="https://airflow.apache.org/docs/apache-airflow/stable/index.html" target="_blank" rel="noopener">Apache Airflow documentation</a></li>
<li><a href="https://docs.snowflake.com/en/user-guide/tables-clustering-keys" target="_blank" rel="noopener">Snowflake clustering keys</a></li>
<li><a href="https://trino.io/docs/current/" target="_blank" rel="noopener">Trino documentation</a></li>
<li><a href="https://superset.apache.org/docs/intro" target="_blank" rel="noopener">Apache Superset documentation</a></li>
<li><a href="https://github.com/pgvector/pgvector" target="_blank" rel="noopener">pgvector for PostgreSQL</a></li>
</ul>
<p><em>MinervaDB Inc. delivers vendor-neutral retail data analytics support, database performance engineering and 24x7 data platform operations for modern retail businesses worldwide.</em></p>
<p><a href="https://minervadb.com/retail-data-analytics-modern-retail-stack/">Retail Data Analytics: Ultimate 2026 Modern Retail Stack</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Herding Goats Across Continents: How We Took 100 People From Around the World to Turkey for an Offsite (and Lived to Tell the Tale)</title>
        <link>https://percona.community/blog/2026/08/06/herding-goats-percona-turkey-offsite/</link>
        <pubDate>Thu, 06 Aug 2026 11:00:00 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>Every great journey needs a guide.</p>
<p><a href="https://percona.community/blog/2026/08/06/herding-goats-percona-turkey-offsite/">Herding Goats Across Continents: How We Took 100 People From Around the World to Turkey for an Offsite (and Lived to Tell the Tale)</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Every great journey needs a guide.</p>
<p>Ours just happened to be a mountain goat.</p>
<p><figure>
<img decoding="async" src="https://percona.community/blog/2026/08/turkey-goat-lego.jpg" alt="LEGO mountain goat with Percona branding on a laptop" /></figure>
</p>
<p>Fresh off a brand-new Percona branding reveal — complete with a rugged mountain goat mascot, a custom-made goat cake, and even a (surprisingly inspirational) LEGO mountain goat — we set out to bring our global Software Engineering team together in Turkey.</p>
<p>And while planning an offsite for a fully remote, globally distributed team sounds simple enough… just wait until you try to do it.</p>
<p>We’re talking about 100 people, 30+ countries, coordinating over 200,000 miles of travel, multiple time zones, passports, dietary restrictions, flight delays, and the occasional “wait, what do you mean my passport expires in three months?” <em>(you know who you are)</em> moment. Suddenly, you’re not just planning a trip — you’re orchestrating a small traveling universe.</p>
<p>Welcome to the step-by-step story of how we brought a global Percona team together in Turkey, and what it <em>really</em> takes to make something like this happen.</p>
<h2 id="step-one-accept-that-details-are-your-new-personality">Step One: Accept That Details Are Your New Personality</h2>
<p>When planning an offsite of this scale, you quickly learn one thing: there is no such thing as being “too detailed.”</p>
<p>There is also no such thing as too much information, or having too much collaboration, when it comes to working through the countless moving pieces.</p>
<p>Success at an event like this doesn’t come from starting from scratch. It comes from leaning heavily on the people who have done it before. Their experiences, lessons learned, and even their past mistakes are incredibly valuable.</p>
<p>We needed to actively seek out those insights, ask questions, and build on what already existed rather than reinventing the wheel. If previous events weren’t successful, you probably wouldn’t be doing it again. Lean into previous experiences and successes.</p>
<p>At the same time, it’s <strong>not just about repeating what’s been done — it’s about refining it.</strong> Each offsite should be a better, more thoughtful version of the last. That means taking previous experiences, identifying what worked and what didn’t, and making deliberate improvements across logistics, communication, and attendee experience.</p>
<p>None of this happens last minute. To truly manage expectations and execute smoothly, planning conversations need to start early — ideally 6–8 months in advance <em>(even though the Percona Turkey retreat was accomplished in just four months)</em>. That runway gives teams the time to align on goals, pressure-test ideas, collaborate across functions, and work through the inevitable complexities that come with an event of this scale.</p>
<p>Success lies in thinking through <em>every single touchpoint</em> of the attendee experience. From the moment attendees board their flight, train, car, or motorcycle to the final farewell high-five, it’s an experience.</p>
<p>Paying close attention to each touchpoint shows up in many moments, including:</p>
<ul>
<li>Branded coasters placed on every table setting during business meetings (yes, people notice)</li>
<li>Signage throughout the venue so no one ends up in a yoga class instead of a database workshop</li>
<li>Check-in gifts that reinforce the Percona brand (and maybe include a surprise or two… goat-related, naturally)</li>
<li>Carefully planned cocktail hours where “networking” magically turns into genuine connection</li>
<li>Group dinners where teammates finally meet the humans behind the Slack avatars</li>
<li>A candy swap featuring treats from every country represented — it doesn’t need to be formal. Everyone piles their local candies on a table for the masses</li>
<li>A myriad of team-building activities spanning four days, including a competition to build the tallest free-standing printer-paper tower using only paper and tape <em>(sidenote: be prepared for every single team to think that they won and the other teams cheated)</em></li>
</ul>
<p><figure>
<img decoding="async" src="https://percona.community/blog/2026/08/turkey-paper-tower.jpg" alt="Team building a paper tower at the Percona Turkey offsite" /></figure>
</p>
<p>But what people remember most isn’t just the agenda, t-shirts, stickers, goat swag, candy, or coffee breaks. It’s the combination of these thoughtful touches woven into every moment.</p>
<p>It’s not just logistics that make the trip — it’s using those details and that collaboration to master storytelling.</p>
<h2 id="step-two-time-may-not-be-on-your-side-but-deadlines-and-effective-communication-are">Step Two: Time May Not Be on Your Side (But Deadlines and Effective Communication Are)</h2>
<p>A trip like this doesn’t come together overnight. But sometimes it needs to come together pretty close to overnight. That means a very well thought-out internal communications plan and schedule that answers as many questions as possible <em>before</em> they are even asked.</p>
<p>But no matter how solid a formal communications plan is, there will be moments when questions get asked that were already addressed — which is why finding other ways to communicate, collaborate, and involve stakeholders and attendees is <em>crucial</em>. Think dedicated Slack channels with full transparency and readily available information, weekly touchpoints with department heads who can convey updates and reminders to their teams, and frequent conversations with finance, human resources, and legal throughout.</p>
<p>Behind the scenes, you’re looking at <strong>100–150 hours of internal planning</strong> — all before the first suitcase is packed.</p>
<p>With that level of complexity, time becomes both a constraint and a forcing function. Deadlines matter, timelines matter, and how you communicate along the way matters even more. Clear, consistent communication is what keeps everything moving forward when there are dozens of parallel workstreams and stakeholders involved.</p>
<p>Internally, communication has to be frequent, detailed, and often repetitive. There’s no room for assumptions or “I thought someone else had that covered.” Every update, decision, dependency, and small detail needs to be shared openly and documented so nothing slips through the cracks.</p>
<p>The more visibility the team has, the more aligned everyone stays.</p>
<p><figure><img decoding="async" src="https://percona.community/blog/2026/08/turkey-dinner-toast.jpg" alt="Colleagues toasting at dinner during the Turkey offsite" /></figure>
</p>
<p>That means being proactive, not reactive. Attendees need consistent touchpoints leading up to the trip: detailed itineraries, travel guidance, visa reminders, packing expectations, local logistics, and clear points of contact. Information should be centralized, easy to access, and reinforced multiple times so no one is left guessing.</p>
<p>During the event, communication doesn’t stall. In fact, it accelerates — with adaptability, pivots, and clear, concise explanations.</p>
<p>Real-time updates, schedule reminders, transportation details, and contingency plans all need to be communicated clearly and quickly. When done right, attendees feel taken care of, confident, and fully present in the experience rather than worrying about logistics.</p>
<p>At the end of the day, strong communication — both internally and externally — is what turns a complex, global operation into something that feels seamless. It’s not just about sharing information; it’s about creating clarity, building trust, and ensuring every single person knows exactly where they need to be and when.</p>
<p>This also means over-communicating by design. Weekly check-ins turn into twice-weekly syncs as the event gets closer. Quick updates become detailed run-of-show documents. Slack threads involving all attendees, shared docs, and status trackers become the backbone of execution. It may feel like a lot, but that level of transparency is what prevents last-minute surprises.</p>
<p>Oh yeah — then there’s vendor coordination and communication.</p>
<p>Hotels. Transportation. AV teams. Catering. Swag production. Signage. Shipping. Local experiences. Backup plans for your backup plans.</p>
<p>Each one comes with:</p>
<ul>
<li>Deadlines</li>
<li>Dependencies</li>
<li>Payment schedules</li>
<li>And the occasional “we need final numbers by tomorrow or your menu disappears” situation</li>
</ul>
<p>Miss a deadline? That’s not just a small hiccup — it can mean:</p>
<ul>
<li>Increased costs</li>
<li>Limited availability</li>
<li>Or a last-minute scramble that no one wants to experience</li>
</ul>
<p><strong>Precision, effective communication, and timing aren’t optional — they’re everything.</strong></p>
<h2 id="step-three-build-the-experience-not-just-the-agenda">Step Three: Build the Experience, Not Just the Agenda</h2>
<p>You can have the best presentations in the world, but that’s not what people will remember.</p>
<p>What they <em>will</em> remember — and what they will certainly talk about afterwards:</p>
<ul>
<li>The first time they met a teammate in person after years of working together online</li>
<li>The laughs over dinner</li>
<li>The spontaneous conversations during coffee breaks</li>
<li>The shared “we made it here” energy</li>
</ul>
<p>For a company like Percona — <strong>100% remote, spanning 50+ countries</strong> — these experiences and moments aren’t just nice-to-haves. They’re essential.</p>
<p>An offsite like this creates:</p>
<ul>
<li>Stronger team bonding across regions and roles</li>
<li>Real human connections that make collaboration smoother</li>
<li>Cross-functional understanding that Slack threads simply can’t replicate</li>
<li>A sense of belonging that transcends time zones</li>
</ul>
<p><figure>
<img decoding="async" src="https://percona.community/blog/2026/08/turkey-card-game.jpg" alt="Colleagues playing cards together at the Turkey offsite" /></figure>
</p>
<p>In short: it turns coworkers into teammates. As a remote-only company, Percona has a uniqueness with nearly 14% of employees who have been with the company for 10+ years. This isn’t an accident — it’s a direct result of the kind of networking, partnership, and friendships that these types of retreats create.</p>
<p>The agenda for an offsite retreat should be intentionally designed to educate, inspire, and elevate the overall experience — not just fill time on a schedule. Every presentation needs to be thoughtfully curated to add real value, ensuring it contributes meaningfully rather than feeling like content for content’s sake.</p>
<h2 id="step-four-expect-the-unexpected-and-pack-snacks">Step Four: Expect the Unexpected (and Pack Snacks)</h2>
<p>No matter how well you plan, something will go sideways.</p>
<p>Flights will be delayed. Luggage will take a scenic tour of another country. Someone will forget something important (realistically, multiple someones).</p>
<p>The key is not avoiding problems, but trusting yourself, your team, and your planning to be ready for them.</p>
<p>A few survival tips:</p>
<ul>
<li><strong>Always have contingency plans (plural). Seriously. Always. And seriously — plural.</strong> Hurricane hitting the beach on closing outdoor dinner night? Have a space ready to go and an action plan for communicating the pivot. All your swag held up in customs? Find the local flea market and craft shops and make your gifts local. Speaker forgot a slide advancer <em>and</em> the venue’s failed <em>and</em> the venue’s backup failed? Keep one on the ready with you at all times.</li>
<li><strong>Over-communicate everything.</strong> You can’t tell people important things too many times.</li>
<li><strong>Build buffer time into the schedule.</strong> Imagine trying to get your three-year-old out the door early in the morning. It’s like that, but with 100 adults. Give yourself some cushions.</li>
<li><strong>Keep a sense of humor handy</strong> — it’s arguably your most valuable tool. You can diffuse a lot of tension with a little humorous quip. Humor brings the tension down, eases the panic, and grounds everyone. Even the most panic-stricken, reactionary executive you’ve ever met enjoys a good laugh in tense moments.</li>
<li><strong>Slow down</strong> — panic happens when speed outmaneuvers thought. It’s not a race, and you don’t have to beat everyone to a solution. Trust yourself and trust your team, and slow down enough to think through clearly without the heaviness of undue pressure.</li>
</ul>
<h2 id="step-five-remember-why-youre-doing-it">Step Five: Remember Why You’re Doing It</h2>
<p>After the spreadsheets, the emails, the vendor calls, and the 47th revision of the rooming list, it’s easy to forget the bigger picture.</p>
<p>But then the event starts.</p>
<p>People arrive. Conversations spark. Teams connect. Ideas flow. Energy builds.</p>
<p>And suddenly, all 100–150 hours (and then some) make perfect sense.</p>
<p>What you’ve created isn’t just an offsite — it’s an experience that strengthens your team in ways no virtual meeting ever could.</p>
<p>Don’t lose sight of your objective.</p>
<h2 id="final-thoughts-keep-climbing">Final Thoughts: Keep Climbing</h2>
<p>Bringing 100 people across the world to Turkey wasn’t easy — but it was worth every detail, every deadline, and every late-night planning session.</p>
<p>When you return home from executing a trip like this, you will want to shut off all notifications and take a few days to yourself without having to resolve anything. But also make sure you ponder what you would have liked to see done differently. Would arranging transfers from the airport to the resort be more cost-effective and smooth than relying on taxis? Most likely. Would building in more leisure time and opportunities for attendees to explore the local surroundings be worth sacrificing one or two sessions of training? Absolutely.</p>
<p>Learn from that and adapt for next time.</p>
<p>Because at the end of the day, investing in your people — especially in a remote-first world — is one of the most impactful things you can do.</p>
<p>And if that investment comes with a mountain goat mascot, a LEGO companion, custom cakes, coasters, t-shirts, drinks, food, and out-of-shape pickup basketball games, then you will find a team that fully leans into the journey and the message.</p>
<p><figure><img decoding="async" src="https://percona.community/blog/2026/08/turkey-road-trip.jpg" alt="Two Perconians on a post-retreat road trip in Turkey" /></figure>
</p>
<p>We came as individuals from across the globe.</p>
<p>On the day the retreat ended, I found myself in a rental car with a colleague I’d never met in person before. Two co-workers from different sides of the globe, different cultures, and two very different paths that led us to that spot. We drove for a full day, exploring site after site and chatting and laughing about life, work, and music.</p>
<p><figure>
<img decoding="async" src="https://percona.community/blog/2026/08/turkey-team-photo.jpg" alt="The Software Engineering team at the Percona Turkey offsite" /></figure>
</p>
<p>This interaction and moment doesn’t happen without retreats like this.</p>
<p>We came together as members of the Software Engineering group at a place we all worked, and left as a unified team of Perconians — and as friends.</p>
<p><strong>That’s your <em>real</em> ROI.</strong></p>
<p><a href="https://percona.community/blog/2026/08/06/herding-goats-percona-turkey-offsite/">Herding Goats Across Continents: How We Took 100 People From Around the World to Turkey for an Offsite (and Lived to Tell the Tale)</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>ClusterControl 2.5.0 brings ClickHouse support to on-prem, cloud and hybrid environments</title>
        <link>https://severalnines.com/blog/clustercontrol-2-5-0-brings-clickhouse-support-to-on-prem-cloud-and-hybrid-environments/</link>
        <pubDate>Wed, 05 Aug 2026 08:38:18 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://severalnines.com/">Severalnines</source>
        <description><![CDATA[<p>ClusterControl 2.5.0 is here, and it marks a milestone for the platform: ClickHouse joins the family of supported database engines — and with it, a capability no analytics vendor’s cloud can offer you. Wherever you run ClusterControl — on-premises, in any cloud, or hybrid — you can now deploy ClickHouse either as a standalone OLAP […]<br />
The post ClusterControl 2.5.0 brings ClickHouse support to on-prem, cloud and hybrid environments appeared first on Severalnines.</p>
<p><a href="https://severalnines.com/blog/clustercontrol-2-5-0-brings-clickhouse-support-to-on-prem-cloud-and-hybrid-environments/">ClusterControl 2.5.0 brings ClickHouse support to on-prem, cloud and hybrid environments</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><a href="https://severalnines.com/clustercontrol">ClusterControl</a> 2.5.0 is here, and it marks a milestone for the platform: <strong>ClickHouse joins the family of supported database engines</strong> — and with it, a capability no analytics vendor&#8217;s cloud can offer you.</p>
<p>Wherever you run ClusterControl — on-premises, in any cloud, or hybrid — you can now deploy <a href="https://severalnines.com/clustercontrol/databases/clickhouse">ClickHouse</a> either as a <strong>standalone OLAP workload</strong> or as the <strong>analytics tier of a comprehensive database stack</strong>, operated alongside your transactional databases under a single control plane. Your environment, your infrastructure, your data.</p>
<p>This release also delivers a major upgrade to PostgreSQL backup workflows, introduces built-in usage metering for consumption-based operations, and brings back a user-favorite capability from ClusterControl v1. Let&#8217;s dig in</p>
<h2 class="wp-block-heading" id="h-clickhouse-analytics-on-your-terms-in-any-environment">ClickHouse: analytics on your terms, in any environment</h2>
<p>Analytical workloads aren&#8217;t nice-to-have anymore. Whether it&#8217;s real-time dashboards, log analytics, or feeding features to AI systems, the OLAP tier is becoming as operationally critical as the transactional tier — and it deserves the same automation, monitoring, and sovereignty guarantees. ClickHouse support means you can run that tier on your own infrastructure, under your own control, with full lifecycle automation.</p>
<p>But running ClickHouse yourself has meant either adopting a vendor&#8217;s cloud — with your analytical data leaving your environment — or hand-rolling deployment, monitoring, and operations. ClusterControl 2.5.0 gives you a third option: <strong>full lifecycle automation for ClickHouse on infrastructure you control</strong>, whether that&#8217;s a single analytics node or the OLAP tier of your entire database estate.</p>
<p>With 2.5.0 you can:</p>
<ul class="wp-block-list">
<li><strong>Deploy automatically</strong> — single-node instances or replicated clusters with embedded Keeper, provisioned through the same workflow you already use for MySQL, PostgreSQL, MongoDB, and Redis</li>
<li><strong>Monitor and alert</strong> through ClusterControl&#8217;s unified dashboards — one pane of glass across your transactional and analytical estate</li>
<li><strong>Back up and restore</strong> your ClickHouse clusters</li>
<li><strong>Scale</strong> as analytical workloads grow</li>
<li><strong>Import existing ClickHouse clusters</strong> <strong>into </strong>ClusterControl management, and drive operations from the s9s CLI and API as well as the UI </li>
<li><strong>Secure inter-node communication —</strong> SSL-encrypted links between cluster nodes with per-node certificates</li>
</ul>
<p>Run it standalone if analytics is all you need. Or run it as one tier of a comprehensive stack — ClickHouse for OLAP next to MySQL, PostgreSQL, MongoDB, and Redis for OLTP, with load balancers, backups, and access control managed the same way across all of them. Same workflow, same alerting, same operational muscle memory, in whatever environment your requirements dictate.</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="603" src="https://severalnines.com/wp-content/uploads/2026/08/clustercontrol-clickhouse-keeper-cluster-topology-1024x603.png" alt="" class="wp-image-44339" /></figure>
<h3 class="wp-block-heading" id="h-what-s-next-for-clickhouse-in-clustercontrol">What&#8217;s next for ClickHouse in ClusterControl</h3>
<p>This release is the foundation, and the roadmap builds directly on it. Planned improvements include:</p>
<ul class="wp-block-list">
<li><strong>Replication from MySQL and PostgreSQL into ClickHouse</strong> — feed your analytics tier directly from your operational databases, targeted for the next release</li>
<li><strong>Sharded ClickHouse cluster deployments</strong> for horizontally scaled analytical workloads</li>
<li><strong>ClickHouse user and role management</strong> from the UI</li>
</ul>
<h2 class="wp-block-heading" id="h-postgresql-backups">PostgreSQL backups</h2>
<p>Two significant improvements land for <a href="https://severalnines.com/clustercontrol/databases/postgresql">PostgreSQL</a> in 2.5.0:</p>
<p><strong>Streaming backups directly to S3.</strong> ClusterControl now streams pg_basebackup output straight to S3-compatible object storage — Amazon S3, MinIO, Google Cloud Storage (S3 mode), DigitalOcean Spaces, Wasabi, and others. No local disk staging, no oversized temp volumes on your database hosts, and a shorter backup-to-cloud pipeline overall.</p>
<p><strong>Native incremental backups (PostgreSQL 17+).</strong> PostgreSQL 17 introduced incremental backup support in pg_basebackup, and ClusterControl 2.5.0 puts it to work — including S3 upload. For large databases, that means dramatically smaller and faster backups between full baselines.</p>
<figure class="wp-block-image size-full"><img decoding="async" src="https://severalnines.com/wp-content/uploads/2026/07/image2.png" alt="Postgres GUI backup wizard showing streaming and incremental backup improvements in ClusterControl v2.5.0" class="wp-image-44331" /></figure>
<h2 class="wp-block-heading">Usage metering and operator billing (Pay-As-You-Go)</h2>
<p>For operators, MSPs, and platform teams running database services on a consumption basis, 2.5.0 introduces built-in <strong>usage metering</strong>:</p>
<ul class="wp-block-list">
<li>Hourly usage snapshots collected per controller across your managed estate</li>
<li>On-demand billing reports — estate-wide or filtered by tag or cluster — with <strong>cryptographic sealing</strong> and independent verification</li>
<li>A dedicated <strong>operator billing page</strong> in the multi-controller UI, with JSON/CSV export</li>
</ul>
<p>It&#8217;s the foundation for Pay-As-You-Go commercial models on infrastructure you control — a natural fit for Sovereign DBaaS operations. The feature is off by default and only surfaced when metering is enabled.</p>
<h2 class="wp-block-heading">Cluster-wide configuration management is back</h2>
<p>By popular demand from ClusterControl v1: change a database parameter across <strong>every node in a MySQL cluster in a single action</strong>. Dynamic parameters are applied at runtime — no per-node edit-and-restart cycle, and less downtime for routine configuration changes in production.</p>
<h2 class="wp-block-heading" id="h-postgresql-database-user-management">PostgreSQL database user management</h2>
<p>reate and manage users and roles from the UI, with fine-grained privileges down to schema and table level, lock/disable/enable lifecycle operations, pg_hba.conf editing with tracked changes, and user search and filtering</p>
<h2 class="wp-block-heading">Other noteworthy improvements</h2>
<ul class="wp-block-list">
<li><strong>Scalable controllers pool hardening</strong> — UI-driven upgrades of remote pool members, automatic alarms on version mismatch, safer pool joins, and better resilience for large fleets</li>
<li>Enhanced <strong><a href="https://severalnines.com/clustercontrol/solutions/kubernetes">Kubernetes</a> database support</strong> — clusters and backup schedules can now be deployed through GitOps as reviewable Git pull requests, plus structured logging, metrics, and default dashboards for observability, more reliable cluster health reporting, and operator compatibility and security updates</li>
<li><strong>Custom </strong><strong>pg_hba</strong><strong> configuration</strong> — define custom pg_hba.conf rules at deployment time, plus UI editing of entries — useful for multi-datacenter PostgreSQL topologies</li>
<li><strong>Audit log filtering and export</strong> in the UI</li>
<li><strong>ProxySQL management</strong> promoted from a pop-up dialog to a dedicated page</li>
<li><strong>Faster database deployments — </strong>multithreaded installation provisions 4 nodes in parallel for PostgreSQL and MySQL clusters, with optional additional customization.</li>
<li><strong>Redis / Valkey Sentinel logs</strong> now included in error reports for easier failover debugging</li>
<li><strong>Content-Security-Policy headers</strong> in the web UI, and improved resilience for long-running backup jobs</li>
</ul>
<h2 class="wp-block-heading">Get started today</h2>
<p>Get ClusterControl v2.5.0 as a new user by signing up for a free 30-day trial or upgrade your CC deployment to practically deploy ClickHouse or bring your current deployment under ClusterControl’s management and access the other game-changing capabilities. In the meantime, full details can be found in the <a href="#">Release Notes</a>.</p>
<p>Questions about running ClickHouse or any other engine with ClusterControl?<a href="https://severalnines.com/contact"> Talk to us</a>.</p>
<h2 class="wp-block-heading" id="h-install-clustercontrol-in-10-minutes-free-30-day-enterprise-trial-included">Install ClusterControl in 10-minutes!<br /> <strong>Free 30-day </strong>Enterprise trial included</h2>
<h3 class="wp-block-heading" id="instructions">Script Installation Instructions</h3>
<p>The installer script is the simplest way to get ClusterControl up and running. Run it on your chosen host, and it will take care of installing all required packages and dependencies.</p>
<p>Offline environments are supported as well. See the&nbsp;<a href="https://docs.severalnines.com/clustercontrol/latest/getting-started/installation/offline-installation/">Offline Installation</a>&nbsp;guide for more details.</p>
<p>On the ClusterControl server, run the following commands:</p>
<pre class="wp-block-code"><code>wget https://severalnines.com/downloads/cmon/install-cc
chmod +x install-cc
sudo ./install-cc     # omit sudo if you run as root</code></pre>
<p>After the installation is complete, open a web browser, navigate to&nbsp;<code>https://&lt;ClusterControl_host&gt;/</code>, and create the first admin user by entering a username (note that “admin” is reserved) and a password on the&nbsp;<a href="https://docs.severalnines.com/clustercontrol/latest/getting-started/quickstart/#step-2-create-the-first-admin-user">welcome page</a>. Once you’re in, you can&nbsp;<a href="https://docs.severalnines.com/clustercontrol/latest/user-guide/deployment/create-database-cluster/">deploy</a>&nbsp;a new database cluster or&nbsp;<a href="https://docs.severalnines.com/clustercontrol/latest/user-guide/deployment/import-database-cluster/">import</a>&nbsp;an existing one.</p>
<p>The installer script supports a range of environment variables for advanced setup. You can define them using export or by prefixing the install command.</p>
<p>See the&nbsp;<a href="https://docs.severalnines.com/clustercontrol/latest/getting-started/installation/online-installation/#environment-variables">list of supported variables</a>&nbsp;and&nbsp;<a href="https://docs.severalnines.com/clustercontrol/latest/getting-started/installation/online-installation/#example-use-cases">example use cases</a>&nbsp;to tailor your installation.</p>
<p>The post <a href="https://severalnines.com/blog/clustercontrol-2-5-0-brings-clickhouse-support-to-on-prem-cloud-and-hybrid-environments/">ClusterControl 2.5.0 brings ClickHouse support to on-prem, cloud and hybrid environments</a> appeared first on <a href="https://severalnines.com">Severalnines</a>.</p>
<p><a href="https://severalnines.com/blog/clustercontrol-2-5-0-brings-clickhouse-support-to-on-prem-cloud-and-hybrid-environments/">ClusterControl 2.5.0 brings ClickHouse support to on-prem, cloud and hybrid environments</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MySQL 8.0.17 GTID Crash Safety Improvement</title>
        <link>https://jfg-mysql.blogspot.com/2026/08/mysql-8017-gtid-crash-safety-improvement.html</link>
        <pubDate>Tue, 04 Aug 2026 22:22:16 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://jfg-mysql.blogspot.com/">J-F Gagné&#039;s MySQL Blog</source>
        <description><![CDATA[<p>I have known for some times that there is an interesting improvement in MySQL 8.0.17 regarding GTID Crash Safety, but I have not had the time nor the need to look into it before.&#160; When writing my last post (Understanding MySQL Replication "fatal error 1236": [...]), I saw something interesting related to this, and it is now time to cover this on my blog. From my point of view, this change is</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/08/mysql-8017-gtid-crash-safety-improvement.html">MySQL 8.0.17 GTID Crash Safety Improvement</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>I have known for some times that there is an interesting improvement in MySQL 8.0.17 regarding GTID Crash Safety, but I have not had the time nor the need to look into it before.&amp;nbsp; When writing my last post (Understanding MySQL Replication &quot;fatal error 1236&quot;: [&#8230;]), I saw something interesting related to this, and it is now time to cover this on my blog. From my point of view, this change is</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/08/mysql-8017-gtid-crash-safety-improvement.html">MySQL 8.0.17 GTID Crash Safety Improvement</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>What Is Data Sovereignty and How Does MariaDB Protect Sovereignty in Cloud Databases?</title>
        <link>https://mariadb.com/resources/blog/what-is-data-sovereignty-and-how-does-mariadb-protect-sovereignty-in-cloud-databases/</link>
        <pubDate>Tue, 04 Aug 2026 18:33:49 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>Every organization now operates in a world where data doesn’t just need to be secure – it needs to be […]</p>
<p><a href="https://mariadb.com/resources/blog/what-is-data-sovereignty-and-how-does-mariadb-protect-sovereignty-in-cloud-databases/">What Is Data Sovereignty and How Does MariaDB Protect Sovereignty in Cloud Databases?</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Every organization now operates in a world where data doesn’t just need to be secure – it needs to be sovereign. Where it’s stored, who can access it, which laws govern it, and whether a foreign government can compel its disclosure are no longer legal footnotes. They’re board-level risks, procurement requirements, and increasingly, deciding factors in which database a regulated business is even…</p>
<p><a href="https://mariadb.com/resources/blog/what-is-data-sovereignty-and-how-does-mariadb-protect-sovereignty-in-cloud-databases/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/what-is-data-sovereignty-and-how-does-mariadb-protect-sovereignty-in-cloud-databases/">What Is Data Sovereignty and How Does MariaDB Protect Sovereignty in Cloud Databases?</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Hear Ye, Hear Ye: A Guide to MariaDB’s Governance Model</title>
        <link>https://mariadb.org/hear-ye-hear-ye-a-guide-to-mariadbs-governance-model/</link>
        <pubDate>Tue, 04 Aug 2026 18:07:22 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Be it known: MariaDB Server now has a clearer, publicly documented governance framework covering technical roles, subsystem ownership, decision-making, response expectations and continuity.<br />
Open source begins with access to the code. …<br />
Continue reading "Hear Ye, Hear Ye: A Guide to MariaDB’s Governance Model"<br />
Hear Ye, Hear Ye: A Guide to MariaDB’s Governance Model appeared first on MariaDB.org</p>
<p><a href="https://mariadb.org/hear-ye-hear-ye-a-guide-to-mariadbs-governance-model/">Hear Ye, Hear Ye: A Guide to MariaDB’s Governance Model</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Be it known: MariaDB Server now has a clearer, publicly documented governance framework covering technical roles, subsystem ownership, decision-making, response expectations and continuity.<br />
Open source begins with access to the code. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/hear-ye-hear-ye-a-guide-to-mariadbs-governance-model/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;Hear Ye, Hear Ye: A Guide to MariaDB’s Governance Model&#8221;</span></a></p>
<p><a rel="nofollow" href="https://mariadb.org/hear-ye-hear-ye-a-guide-to-mariadbs-governance-model/">Hear Ye, Hear Ye: A Guide to MariaDB’s Governance Model</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a></p>
<p><a href="https://mariadb.org/hear-ye-hear-ye-a-guide-to-mariadbs-governance-model/">Hear Ye, Hear Ye: A Guide to MariaDB’s Governance Model</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Understanding MySQL Replication &#8220;fatal error 1236&#8221;: &#8220;Replica has more GTIDs than the source has, using the source&#8217;s SERVER_UUID&#8221;</title>
        <link>https://jfg-mysql.blogspot.com/2026/08/understanding-mysql-replication-fatal-error-1236.html</link>
        <pubDate>Mon, 03 Aug 2026 22:12:29 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://jfg-mysql.blogspot.com/">J-F Gagné&#039;s MySQL Blog</source>
        <description><![CDATA[<p>This MySQL replication error&#160;— fatal error 1236&#160;/ Replica has more GTIDs than the source has, using the source's SERVER_UUID&#160;— shows the importance of thinking before acting. I am glad a non-DBA Colleague asked me about this error, because if he would just have restarted replication, it would have caused a much bigger mess.</p>
<p>Often, we are tempted&#160;— or pushed&#160;— to just</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/08/understanding-mysql-replication-fatal-error-1236.html">Understanding MySQL Replication &#8220;fatal error 1236&#8221;: &#8220;Replica has more GTIDs than the source has, using the source&#8217;s SERVER_UUID&#8221;</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>This MySQL replication error&amp;nbsp;— fatal error 1236&amp;nbsp;/ Replica has more GTIDs than the source has, using the source&#8217;s SERVER_UUID&amp;nbsp;— shows the importance of thinking before acting. I am glad a non-DBA Colleague asked me about this error, because if he would just have restarted replication, it would have caused a much bigger mess.</p>
<p>Often, we are tempted&amp;nbsp;— or pushed&amp;nbsp;— to just</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/08/understanding-mysql-replication-fatal-error-1236.html">Understanding MySQL Replication &#8220;fatal error 1236&#8221;: &#8220;Replica has more GTIDs than the source has, using the source&#8217;s SERVER_UUID&#8221;</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Wirekite becomes Silver Sponsor of MariaDB Foundation</title>
        <link>https://mariadb.org/wirekite-becomes-silver-sponsor-of-mariadb-foundation/</link>
        <pubDate>Sun, 02 Aug 2026 20:09:53 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>We are pleased to welcome Wirekite as a new Silver Sponsor of MariaDB Foundation.<br />
Wirekite is an enterprise data movement platform focused on high-performance extract, load, migration, and replication workflows. …<br />
Continue reading "Wirekite becomes Silver Sponsor of MariaDB Foundation"<br />
The post Wirekite becomes Silver Sponsor of MariaDB Foundation appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/wirekite-becomes-silver-sponsor-of-mariadb-foundation/">Wirekite becomes Silver Sponsor of MariaDB Foundation</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>We are pleased to welcome <a href="https://wirekite.io/">Wirekite</a> as a new <a href="https://mariadb.org/donate/#silver-tier-from-eur-5000-per-year">Silver Sponsor</a> of MariaDB Foundation.<br />
Wirekite is an enterprise data movement platform focused on high-performance extract, load, migration, and replication workflows. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/wirekite-becomes-silver-sponsor-of-mariadb-foundation/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;Wirekite becomes Silver Sponsor of MariaDB Foundation&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/wirekite-becomes-silver-sponsor-of-mariadb-foundation/">Wirekite becomes Silver Sponsor of MariaDB Foundation</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/wirekite-becomes-silver-sponsor-of-mariadb-foundation/">Wirekite becomes Silver Sponsor of MariaDB Foundation</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Stored Procedures memory consumption in Percona Server for MySQL</title>
        <link>https://www.percona.com/blog/stored-procedures-memory-consumption-in-percona-server-for-mysql/</link>
        <pubDate>Fri, 31 Jul 2026 11:50:51 +0000</pubDate>
        <dc:creator>Bogdan Degtyariov</dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>1. What it is about This investigation began as a performance comparison for different memory allocators. However, during benchmarking, I discovered unexpected effects deserving a more detailed explanation. I hope you find these findings both interesting and useful. Imagine you need to set up a MySQL database server. Every detail is planned: the operating system, … Continued<br />
The post Stored Procedures memory consumption in Percona Server for MySQL appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/stored-procedures-memory-consumption-in-percona-server-for-mysql/">Stored Procedures memory consumption in Percona Server for MySQL</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<h2><span>1. What it is about</span></h2>
<p><span>This investigation began as a performance comparison for different memory allocators. However, during benchmarking, I discovered unexpected effects deserving a more detailed explanation. I hope you find these findings both interesting and useful.</span></p>
<p><span>Imagine you need to set up a MySQL database server. Every detail is planned: the operating system, the CPU architecture, the number of cores, the amount of RAM, the storage capacity and speed. On paper the hardware looks like it can handle the workload. But in reality, things rarely go exactly as planned. So, conducting a thorough stress test is the next thing to do.<br />
</span></p>
<p> </p>
<h2><span>2. Realities of stress testing</span></h2>
<p><span>You configure your MySQL server setting the </span><b>innodb_buffer_pool_size</b><span> to 70-80% of your available RAM. This creates a large fast buffer for your data and indexes, reducing the need for slower disk input/output.</span></p>
<p><span>After a warmup period and a few hours of testing, everything looks great. The server is working at a steady pace, performance is stable. You tick the box – the server has passed the basic stress test. Thinking everything is fine, you consider leaving the test running over the weekend, expecting only minor fluctuations in performance.</span></p>
<p><span>However, when you check the status the next morning, you find that the CPU is idle and the </span><span>mysqld</span><span> process has vanished. Did it crash? You check the server error logs, but there is no record of a crash or a shutdown—not even a core dump. Then, you look at the system logs and find something unexpected:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">journalctl -k -g mysqld

Jun 09 07:29:14 beast-node7.tp.int.percona.com kernel: Out of memory:
Killed process 3936620 (mysqld) total-vm:194627592kB, anon-rss:183047480kB, file-rss:640kB, shmem-rss:0kB,
UID:955676158 pgtables:355860kB oom_score_adj:0</pre>
<p><span>It appears that </span><span>mysqld</span><span> ran out of memory and was terminated by the OOM (Out of Memory) killer after running for about 16 hours.</span></p>
<p><span>We will focus on Resident Set Size (RSS), which is the subset of Virtual Memory Size (VSZ). RSS is the most significant part of VSZ and other parts like swap (only 8Gb) do not make notable contributions.</span></p>
<p><span>The RSS reached 183GiB, significantly higher than the initial 145GiB (with the </span><b>innodb_buffer_pool_size</b><span> set to 135G). The </span><span>mysqld</span><span> process had grabbed nearly 40GiB of extra memory, which at first looked like a memory leak. I ran my stress tests on different versions of MySQL and Percona Server and found a recurring pattern: memory usage climbed steadily until the system killed the process.</span></p>
<p><span>I won’t dive into the leak diagnosis here, but the result was clear: </span><span>mysqld</span><span> wasn’t leaking memory in the traditional sense. However, we still had to explain that 40GiB growth.<br />
</span></p>
<p> </p>
<h2><span>3. Configuration and methodology</span></h2>
<p><span>The configuration was as follows:</span></p>
<table border="1" cellpadding="5">
<tbody>
<tr>
<td><span>Benchmark</span></td>
<td><span>TPC-C via HammerDB 6.0</span></td>
</tr>
<tr>
<td><span>CPU</span></td>
<td><span>Intel Xeon Gold 6230 (2×20 cores, HT = 80 logical CPUs)</span></td>
</tr>
<tr>
<td><span>RAM</span></td>
<td><span>187 GiB DDR4</span></td>
</tr>
<tr>
<td><span>Storage</span></td>
<td><span>NVMe SSD (2.9 TB) INTEL SSDPE2KE032T8</span></td>
</tr>
<tr>
<td><span>OS</span></td>
<td><span>Ubuntu 24.04, kernel 6.8.0-60-generic</span></td>
</tr>
<tr>
<td><span>DB Engines</span></td>
<td><span>Percona Server 8.4.8-8 (release build)</span><span><br />
</span><span>Percona Server 8.4.9-9 (internal build, unreleased)</span><span>Percona Server 9.7.0 (internal build, unreleased)</span></td>
</tr>
</tbody>
</table>
<p><span>The testing was done as follows:</span></p>
<table border="1" cellpadding="5">
<tbody>
<tr>
<td><span>Workload</span></td>
<td><span>3000 warehouses (~300 GB data)</span></td>
</tr>
<tr>
<td><span>Timing</span></td>
<td><span>15 min ramp-up, 20 hours measurement window</span></td>
</tr>
<tr>
<td><span>Connections</span></td>
<td><span>80 Virtual Users (to match the number of logical CPU cores). Connection lifetime is set for the entire duration of the test.</span></td>
</tr>
<tr>
<td><span>InnoDB buffer sweep</span></td>
<td><span>Starting from 150G down to 80G with 5G decrease</span></td>
</tr>
</tbody>
</table>
<p><span>What we wanted to achieve:</span></p>
<ul>
<li aria-level="1"><span>Create conditions when memory allocations and deallocations inside the database server are frequent.</span></li>
<li aria-level="1"><span>Utilize as much of physical memory as possible (at least 80%) by giving it to InnoDB Buffer Pool.</span></li>
<li aria-level="1"><span>Use all available CPU resources in the most efficient way to prevent threads contesting for execution time (the number of connections should match the number of logical CPU cores).</span></li>
<li aria-level="1"><span>Eliminate any layers that add overhead and get in the way of direct measuring of allocators frequency and efficiency. The connections will be established using a socket file.</span></li>
</ul>
<p><span>Servers configuration file:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag"># Make sure data dir is on NVMe
datadir=/nvme/data

# Thread Pool is enabled only for Percona Server
plugin-load-add=thread_pool.so
thread_pool_size=16
thread_pool_max_threads=5000
thread_pool_stall_limit=500

# Disable binary logging
skip-log-bin

# Connection settings
max_connections = 200

# Logging
log-error = /home/bogdan.degtyariov/servers/data/mysql-error.log
pid-file = /home/bogdan.degtyariov/servers/data/mysql.pid

# Socket
socket = /tmp/mysql-alloc-test.sock

# Disable SSL requirement
require_secure_transport = OFF

# Other settings
sql_mode = ""
wait_timeout = 288000        # 80 hours
interactive_timeout = 288000 # 80 hours

# Table settings
default-storage-engine = InnoDB

# InnoDB redo log configuration
innodb_redo_log_capacity = 32G

# Minimize flush overhead (not crash-safe, but optimal for testing)
innodb_flush_log_at_trx_commit = 0

# Memory configuration
innodb_buffer_pool_size = 150G # Configurable down to 80G
innodb_buffer_pool_instances = 16
innodb_io_capacity = 20000

# Performance optimizations
innodb_flush_method = O_DIRECT
innodb_log_buffer_size = 256M
innodb_doublewrite = OFF

# Transparent Huge Pages can be turned ON or OFF for the testing
large-pages = ON</pre>
<p> </p>
<h2><span>4. Where did the memory go?</span></h2>
<p><span>Memory management is complex, so let’s simplify. Applications rarely talk directly to the Linux kernel because the kernel typically works in 4KB pages, which is inefficient for developers. Instead, applications use allocators like </span><span>glibc</span><span> malloc, </span><span>jemalloc</span><span>, or </span><span>tcmalloc</span><span>. These tools handle memory operations by minimizing overhead, managing bookkeeping, and preventing fragmentation. Most importantly, they use caching.</span></p>
<p><span>When a program frees memory, the allocator rarely returns it to the OS immediately. Instead, it moves that memory into an internal “free-list” cache. Reusing memory from this cache is much faster than requesting new memory from the kernel.</span></p>
<p><span>Also, the Percona Server for MySQL and upstream MySQL Server use their own implementation of the memory arena allocator called MEM_ROOT. Historically MEM_ROT was architected decades ago when the standard Linux implementation of </span><span>glibc</span><span> memory allocator was slow and prone to lock contention in multithreaded programs.</span></p>
<p><span>Enabling memory profiling revealed that MEM_ROOT allocations for cursor metadata in stored routines was responsible for most of the additional memory acquired by the server process:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">sp_head::execute_procedure           (TPC-C stored procedure)
   └─ sp_instr_copen::execute        (OPEN <cursor> statement)
       └─ sp_cursor::open
           └─ mysql_open_cursor
               ├─ Materialized_cursor::send_result_set_metadata  87831 MB (94.3%)
               └─ Query_result_materialize::start_execution      5311 MB  (5.7%)
                   └─ MEM_ROOT::Alloc / AllocBlock / ForceNewBlock</pre>
<p><span><strong>NOTE:</strong> 87G is a significant growth of memory allocation considering that in that run the server initially allocated ~85G with Innodb_buffer_pool_size=80G.</span></p>
<p><span>The problem happens regardless of the data size because the actual issue is in stored routines cursor metadata. When the stored procedure is called the memory allocated for cursor metadata is not freed. Over the course of many repeated calls to the same stored procedure the cumulative amount of memory for the cursor can reach any value.</span></p>
<p><span>The following graph demonstrates the memory growth in Percona Server 8.4.8-8 from ~80G to over ~180G in RSS and over 200G VSZ over the period of 24 hours.</span></p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-50941 size-full" src="https://www.percona.com/wp-content/uploads/2026/07/rss-vsz.png" alt="" width="1043" height="654" srcset="https://www.percona.com/wp-content/uploads/2026/07/rss-vsz.png 1043w, https://www.percona.com/wp-content/uploads/2026/07/rss-vsz-300x188.png 300w, https://www.percona.com/wp-content/uploads/2026/07/rss-vsz-1024x642.png 1024w, https://www.percona.com/wp-content/uploads/2026/07/rss-vsz-768x482.png 768w" sizes="auto, (max-width: 1043px) 100vw, 1043px"></p>
<p><span>Thus, a bug was reported for Percona Server: </span><a href="https://perconadev.atlassian.net/browse/PS-11472"><span>https://perconadev.atlassian.net/browse/PS-11472</span></a></p>
<p><span>With Percona Server for MySQL 9.7.0-1 the RSS/VSZ growth was at a slower rate, but still noticeable and it was not flattening towards a stable horizontal line (the server was configured with a small amount of memory for innodb_buffer_pool_size=4G and run for 5 hours instead of 20).</span></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-50945" src="https://www.percona.com/wp-content/uploads/2026/07/rss-vsz-ps-9.7.0.jpg" alt="" width="1043" height="663" srcset="https://www.percona.com/wp-content/uploads/2026/07/rss-vsz-ps-9.7.0.jpg 1043w, https://www.percona.com/wp-content/uploads/2026/07/rss-vsz-ps-9.7.0-300x191.jpg 300w, https://www.percona.com/wp-content/uploads/2026/07/rss-vsz-ps-9.7.0-1024x651.jpg 1024w, https://www.percona.com/wp-content/uploads/2026/07/rss-vsz-ps-9.7.0-768x488.jpg 768w" sizes="auto, (max-width: 1043px) 100vw, 1043px"></p>
<p><span>Memory profiling showed the new allocations in version 9.7.0-1 were in the same place where cursor metadata is handled:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">sp_head::execute_procedure           (TPC-C stored procedure)
   └─ sp_instr_copen::execute        (OPEN <cursor> statement)
       └─ sp_cursor::open
           └─ mysql_open_cursor
               ├─ Materialized_cursor::send_result_set_metadata
               └─ Query_result_materialize::start_execution      
                   └─ MEM_ROOT::Alloc / AllocBlock / ForceNewBlock 4,025.8 MB (99.6%)</pre>
<p> </p>
<h2><span>5. Possible workarounds</span></h2>
<p><span>My tests showed that OOM crashes happened consistently under two specific conditions:,</span></p>
<ol>
<li aria-level="1"><span>Connections are never closed and stay open permanently</span></li>
<li aria-level="1"><span>Connections ran queries at maximum speed without any pauses</span></li>
</ol>
<p><span>Also, when the connection lifetime was limited and users were made to close connection and reconnect after 1M transactions, the memory exhaustion stopped, and memory was freed correctly – all with only a minor impact on performance. To minimize the delays associated with creating a new connection thread on the server I used the connection pool functionality in HammerDB. When the connection lifetime is ended, the actual connection is not closed, but “reset” and reused. This frees the context accumulated during the connection activity and stimulates returning memory to the OS. This connection pool mechanism is more efficient than the open/close cycle for maintaining the connection lifetime. </span></p>
<p><span>I had two runs with reconnecting users: with and without connection pool. The graph demonstrates that using the pool improves the performance in this test.</span></p>
<p><span>Also, during another experiment with unlimited connection lifetime, adding a 0.5ms pause after a few transactions prevented the crashes, though performance dropped slightly more.</span></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-50947" src="https://www.percona.com/wp-content/uploads/2026/07/qps-delay-1.jpg" alt="" width="1043" height="631" srcset="https://www.percona.com/wp-content/uploads/2026/07/qps-delay-1.jpg 1043w, https://www.percona.com/wp-content/uploads/2026/07/qps-delay-1-300x181.jpg 300w, https://www.percona.com/wp-content/uploads/2026/07/qps-delay-1-1024x620.jpg 1024w, https://www.percona.com/wp-content/uploads/2026/07/qps-delay-1-768x465.jpg 768w" sizes="auto, (max-width: 1043px) 100vw, 1043px"></p>
<p><span>The memory graphs have consistent periodic oscillations that never reach into the dangerous zone.</span></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-50949" src="https://www.percona.com/wp-content/uploads/2026/07/zigzag.jpg" alt="" width="1043" height="656" srcset="https://www.percona.com/wp-content/uploads/2026/07/zigzag.jpg 1043w, https://www.percona.com/wp-content/uploads/2026/07/zigzag-300x189.jpg 300w, https://www.percona.com/wp-content/uploads/2026/07/zigzag-1024x644.jpg 1024w, https://www.percona.com/wp-content/uploads/2026/07/zigzag-768x483.jpg 768w" sizes="auto, (max-width: 1043px) 100vw, 1043px"></p>
<p> </p>
<h2><span>6. Summary</span></h2>
<p><span>To sum it up: the observed MySQL’s memory bloating is caused by a problem in the server cursor implementation not freeing metadata memory. </span></p>
<p><span>Under heavy, constant load, that memory accumulates to the amount which eventually causes an OOM crash. Capping how long connections stay active or adding a short pause between transactions, gives the server time to clean itself up. Normally the client side processing adds such pauses without need to do it on purpose.</span></p>
<p><span>Finally, it is important to remember that the best benchmark results do not always guarantee the best real-life performance.</span></p>
<p>The post <a href="https://www.percona.com/blog/stored-procedures-memory-consumption-in-percona-server-for-mysql/">Stored Procedures memory consumption in Percona Server for MySQL</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/stored-procedures-memory-consumption-in-percona-server-for-mysql/">Stored Procedures memory consumption in Percona Server for MySQL</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Percona Server for MongoDB 8.3 Technical Preview Is Now Available</title>
        <link>https://www.percona.com/blog/percona-server-for-mongodb-8-3-technical-preview-is-now-available/</link>
        <pubDate>Thu, 30 Jul 2026 17:36:14 +0000</pubDate>
        <dc:creator>Radoslaw Szulgo</dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Percona Server for MongoDB 8.3 is available today as a Technical Preview. It is not for production. It is for your lab, your staging cluster, and your benchmark harness – and for sharing with us what works and what does not. Especially if this version is your segue to leverage upcoming full-text and vector search … Continued<br />
The post Percona Server for MongoDB 8.3 Technical Preview Is Now Available appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/percona-server-for-mongodb-8-3-technical-preview-is-now-available/">Percona Server for MongoDB 8.3 Technical Preview Is Now Available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><b>Percona Server for MongoDB 8.3 is available today as a Technical Preview. It is not for production. It is for your lab, your staging cluster, and your benchmark harness – and for sharing with us what works and what does not. Especially if this version is your segue to leverage upcoming full-text and vector search capabilities. Many users have been asking when Percona would ship 8.2 or 8.3 – this is the answer. We are jumping straight to 8.3. In this blog post, I share everything you have to know before upgrading to 8.3. I gathered all available information, so you don’t need to.  </b></p>
<h2><span>Why this release matters</span></h2>
<p><span>MongoDB 8.3 Community went GA in May 2026. This was the fourth significant MongoDB release in nearly 2 years. I have observed that the upstream MongoDB Community project is now moving faster than most organizations’ upgrades (adoption telemetry data later in this blog post). Nonetheless, Percona’s job is to ensure that the free, enterprise-grade path does not fall behind, and you still can get the performance of the current release without giving up data-at-rest encryption with KMIP, HashiCorp Vault, or OpenBao, audit logging, external LDAP authentication, OpenID Connect, File copy-based initial sync, in-memory engine, or audit log with log redaction. All of that stays in Percona Server for MongoDB 8.3, and it stays free and open. This is the Percona way.</span></p>
<p><span>I’ll not discover America by writing that the data layer now has to move at AI speed. Application teams are shipping agentic workloads today, and that’s why performance and functional requirements are growing exponentially. Two years ago, we experienced occasional query retries and recall storms, critical security patches, and multi-region deployments could trade compliance for latency. Now, this is bread-and-butter we need to deal with every day. </span></p>
<p><span>I’m happy to share that Percona has published Percona Server for MongoDB 8.3 in Technical Preview today. 8.3 is not one release forward from 8.0 – it is three. Everything that landed in the two minor releases (and 8.1 Rapid Release) in between arrives at once. Percona Server for MongoDB 8.3 is the most performant release so far! And besides the performance boost and many functional improvements, I’ve described below, I’m personally most excited about the fact that this release enables full-text search and vector search capabilities, so you can finally equip your applications with AI power using the same MongoDB. More about that in my next blog post – brace yourself! </span></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-50878 size-large" src="https://www.percona.com/wp-content/uploads/2026/07/psmdb-83-highlights-1024x576.png" alt="" width="1024" height="576" srcset="https://www.percona.com/wp-content/uploads/2026/07/psmdb-83-highlights-1024x576.png 1024w, https://www.percona.com/wp-content/uploads/2026/07/psmdb-83-highlights-300x169.png 300w, https://www.percona.com/wp-content/uploads/2026/07/psmdb-83-highlights-768x432.png 768w, https://www.percona.com/wp-content/uploads/2026/07/psmdb-83-highlights-1536x864.png 1536w, https://www.percona.com/wp-content/uploads/2026/07/psmdb-83-highlights-2048x1153.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px"></p>
<h2><span>What’s new compared to 8.0</span></h2>
<p><span>Because we’re skipping 8.1 and 8.2 releases, the delta is large. I grouped the highlights by what you’d actually notice.</span></p>
<h3><b>Performance</b></h3>
<p><span>Percona Server for MongoDB inherits performance optimization from the upstream MongoDB Community:</span></p>
<ul>
<li aria-level="1"><span>Up to </span><b>195%</b><span> higher throughput on time-series bulk insertions</span></li>
<li aria-level="1"><span>Up to </span><b>40%</b><span> on match filter queries</span></li>
<li aria-level="1"><span>Up to </span><b>20%</b><span> on queries against documents with arrays</span></li>
<li aria-level="1"><span>Up to </span><b>10%</b><span> on in-cache read workloads</span></li>
<li aria-level="1"><span>Up to </span><b>5%</b><span> reduction in CPU utilization</span></li>
</ul>
<p><span>Moreover, Percona Server for MongoDB 8.3 now offers faster initial sync, faster time-series bulk inserts, and reduced multi-planning costs for queries. As always, your mileage depends entirely on the shape of your workload.</span></p>
<h3><b>Query planning</b></h3>
<p><span>The </span><b>Cost-Based Ranker (CBR)</b><span> is now the default plan selection mechanism for eligible queries. Multi-planning gets a short trial period; if it can’t settle on a plan, CBR evaluates each plan node by estimated cost. New </span><span>serverStatus</span><span> counters under </span><span>metrics.query.cbr</span><span> and new </span><span>explain</span><span> output let you see when CBR was used and how often it won. </span></p>
<h3><b>Query language and aggregation</b></h3>
<ul>
<li aria-level="1"><span>Native hybrid search (full-text search and vector search) is enabled with Percona Search for MongoDB (fork of </span><a href="https://github.com/mongodb/mongot"><span>mongodb/mongot</span></a><span> project) via</span><span> $scoreFusion</span><span> and </span><span>$rankFusion</span></li>
<li aria-level="1"><span>Array element indexes are now accessible in </span><span>$map</span><span>, </span><span>$filter</span><span>, and </span><span>$reduce</span><span> via the new </span><span>arrayIndexAs</span><span> field and the </span><span>$$IDX</span><span> system variable</span></li>
<li aria-level="1"><span>New expressions: </span><span>$subtype</span><span>, </span><span>$createObjectId</span><span>, </span><span>$hash</span><span>, </span><span>$hexHash</span><span>, </span><span>$serializeEJSON</span><span>, </span><span>$deserializeEJSON</span><span>, </span><span>$currentDate</span></li>
<li aria-level="1"><span>$convert</span><span> gains a </span><span>base</span><span> argument (base 2/8/10/16) and can convert strings representing arrays and objects, plus BinData <img decoding="async" src="https://s.w.org/images/core/emoji/17.0.2/72x72/2194.png" alt="&#x2194;" class="wp-smiley"> numeric arrays in both directions</span></li>
<li aria-level="1"><span>$mergeObjects</span><span> now works inside </span><span>$setWindowFields</span></li>
<li aria-level="1"><span>$concatArrays</span><span> and </span><span>$setUnion</span><span> accumulators, the </span><span>$listClusterCatalog</span><span> stage, and </span><span>$lookup</span><span> across multiple encrypted collections for CSFLE and Queryable Encryption</span></li>
</ul>
<h3><b>Storage and operations</b></h3>
<p><span>The most operationally useful change for anyone running in containers is the </span><b>WiredTiger</b> <b>cache size, which can now be set as a percentage</b><span> of available memory via </span><span>–wiredTigerCacheSizePct</span><span> / </span><span>storage.wiredTiger.engineConfig.cacheSizePct</span><span>, instead of a fixed GB value. If you run Percona Server for MongoDB on Kubernetes via our Percona Operator for MongoDB. This alone is worth the upgrade!</span></p>
<p><span>Also worth knowing:</span></p>
<ul>
<li aria-level="1"><b>zstd negative compression levels</b><span> – the supported range widens to -7 through 22, trading ratio for speed</span></li>
<li aria-level="1"><b>Initial-sync index builds</b><span> now use 10% of available RAM by default, tunable, and bounded</span></li>
<li aria-level="1"><b>terminateSecondaryReadsOnOrphanCleanup</b><span> (on by default) terminates long-running secondary reads that started before a chunk migration was committed. Previously, those reads continued and could silently return incomplete results with no error. </span><span>orphanCleanupDelaySecs</span><span> moves from 900 to 3600 to accommodate this.</span></li>
</ul>
<h3><b>Sharding</b></h3>
<ul>
<li aria-level="1"><b>removeShard</b><b> is deprecated</b><span>, replaced by four commands that give you granular control over draining and removal: </span><span>startShardDraining</span><span>, </span><span>stopShardDraining</span><span>, </span><span>shardDrainingStatus</span><span>, </span><span>commitShardRemoval</span><span>. A parallel set exists for the embedded-to-dedicated config server transition.</span></li>
<li aria-level="1"><b>Sharded clusters: DDL operations and </b><b>applyOps</b><b> can now run only on </b><b>mongos</b><b> across</b><span> all sharded clusters.</span></li>
<li aria-level="1"><span>New </span><span>mongod –replicaSetConfigShardMaintenanceMode</span><span> converts a replica set primary directly into an embedded config shard, skipping the dedicated config server replica set step.</span></li>
<li aria-level="1"><span>Shard-level query stats now include queries that originated on </span><span>mongos</span><span>. Previously, most forwarded queries were invisible in shard-level stats.</span></li>
</ul>
<h3><b>Security</b></h3>
<ul>
<li aria-level="1"><span>Software Bills of Materials (SBOMs) are attached to our deliverables across all release distribution channels. SBOMs improve software supply chain transparency by documenting the components and dependencies included in a build. They are generated automatically as part of the release pipeline in the industry-standard </span><a href="https://cyclonedx.org/specification/overview/"><span>CycloneDX</span></a><span> format.</span></li>
<li aria-level="1"><span>New pre-auth connection resource limits (</span><span>capMemoryConsumptionForPreAuthBuffers</span><span>, </span><span>preAuthMaximumMessageSizeBytes</span><span>, </span><span>messageSizeErrorRateSec</span><span>)</span></li>
<li aria-level="1"><span>Ingress connection establishment rate limiting and per-application exemptions from ingress request rate limiting. See </span><a href="https://www.mongodb.com/docs/manual/reference/parameters/#mongodb-parameter-param.ingressRequestRateLimiterApplicationExemptions"><span>ingressRequestRateLimiterApplicationExemptions</span><span>.</span></a><span> for more.</span></li>
</ul>
<h3><b>Observability</b></h3>
<ul>
<li aria-level="1"><b>Query memory tracking</b><span>: </span><span>inUseTrackedMemBytes</span><span> and </span><span>peakTrackedMemBytes</span><span> in </span><span>$currentOp</span><span>, profiler output, slow query logs, explain results, and </span><span>$planCacheStats</span></li>
<li aria-level="1"><b>Slow in-progress query logs</b><span>: a lightweight entry emitted once per query when it exceeds </span><span>slowOpInProgressThreshold</span><span>, so you can see a slow query while it is still running rather than after it finishes</span></li>
<li aria-level="1"><span>FTDC now collects </span><span>connPoolStats</span><span> for </span><span>mongod</span></li>
<li aria-level="1"><span>Standardized disk-spill metrics (</span><span>spills</span><span>, </span><span>spilledBytes</span><span>, </span><span>spilledRecords</span><span>, </span><span>spilledDataStorageSize</span><span>) in explain output</span></li>
<li aria-level="1"><span>New TTL, replication lag, and admission control metrics in </span><span>serverStatus</span></li>
</ul>
<h2>What’s changed: Read this before you upgrade</h2>
<p><b>Upgrade path.</b><span> To go from 8.0 directly to 8.3, your 8.0 deployment must have </span><span>featureCompatibilityVersion</span><span> set to </span><span>8.0</span><span>. Verify with </span><span>db.adminCommand({ getParameter: 1, featureCompatibilityVersion: 1 })</span><span>. All cluster members must be running before you start.</span></p>
<p><b>Geospatial indexes may need rebuilding.</b><span> Index generation now prioritizes GeoJSON over legacy numeric coordinates when a document contains both. If your documents have legacy numeric coordinates preceding GeoJSON coordinates and your existing indexes depend on the old ordering, rebuild them and re-verify your geospatial query results. Separately, </span><span>2dsphereIndexVersion</span><span> now defaults to 4.</span></p>
<p><b>Error codes changed.</b><span> Exceeding the </span><span>$facet</span><span> 100 MB limit now returns </span><span>ExceededMemoryLimit</span><span> (146) instead of </span><span>4031700</span><span>. Upserts producing an oversized BSON object return </span><span>10334</span> <span>BSONObjectTooLarge</span><span> instead of </span><span>17419</span><span>/</span><span>17420</span><span>. Anything in your stack that string-matches error codes needs updating.</span></p>
<p><b>$text</b><b> sorted-by-score queries can now fail.</b><span> The </span><span>TextOr</span><span> stage is capped at 100 MB. With </span><span>allowDiskUse: true,</span><span> it spills; with </span><span>false</span><span> the query errors out. Previously, it was unbounded, which is to say, previously, it could OOM your node instead.</span></p>
<p><b>Pre-epoch date arithmetic shifts by one second.</b> <span>$dateAdd</span><span> and </span><span>$dateSubtract</span><span>, with a non-millisecond unit, on dates before 1970-01-01 now return a result that is one second greater. This propagates into </span><span>$setWindowFields</span><span> and </span><span>$densify</span><span>.</span></p>
<p><b>Monitoring integrations will need attention.</b><span> The </span><span>service</span><span> field is removed from </span><span>serverStatus</span><span> output, and </span><span>cpuNanos</span><span> is moved from </span><span>operationMetrics</span><span> into </span><span>$queryStats</span><span> (Linux only).</span></p>
<p><b>Other behavior changes:</b> <span>$$CLUSTER_TIME</span><span> now throws an error in standalone deployments. </span><span>db.collection.validate({full: true})</span><span> no longer implicitly enables </span><span>checkBSONConformance</span><span>. </span><span>explain()</span><span> against a non-existent database on a sharded cluster no longer creates the database. Time series collections reject a </span><span>timeField</span><span> starting with </span><span>$</span><span> and reject an index named or hinted </span><span>“_id_”</span><span>.</span></p>
<p><b>One-way doors from sharding to the replica set.</b><span> A replica set that was previously a sharded cluster cannot be converted back into a sharded cluster – residual sharding metadata blocks it. And downgrading from 8.3 requires you to first drop 2dsphere version 4 indexes and update or drop any views, validators, or collection validation rules that use 8.3-only expressions.</span></p>
<h2><span>Don’t stay behind: What the telemetry says about version adoption</span></h2>
<p><span>We analyzed anonymous product telemetry from Percona Server for MongoDB over the last 12 months to assess the share of active database instances. </span><b>Major version adoption takes more than a year for many users and organizations.</b><span> PSMDB 8.0 went from roughly a fifth of the installed base to nearly half over twelve months. That is healthy, and it is also slower than a release cadence of four significant upstream versions in 19 months. The gap between how quickly MongoDB ships and how quickly the installed base moves is why we are publishing a Technical Preview instead of delaying until a GA build. Also, that’s a strong signal to move to version 8.0 if you haven’t already, and then explore 8.3. </span></p>
<p><span>Moreover, if you run (or consider running) your Percona Server for MongoDB </span><b>in a container</b> <b>deployment –</b><span> Containerized deployments now account for about 24% of active instances, up from roughly 21% a year ago – so still Docker and Kubernetes for MongoDB are the thing, and this release improvement of percentage-based WiredTiger cache sizing is probably the most immediately useful thing.</span></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-50879 size-large" src="https://www.percona.com/wp-content/uploads/2026/07/psmdb-version-adoption-360d-e1785430024956-1024x488.png" alt="" width="1024" height="488" srcset="https://www.percona.com/wp-content/uploads/2026/07/psmdb-version-adoption-360d-e1785430024956-1024x488.png 1024w, https://www.percona.com/wp-content/uploads/2026/07/psmdb-version-adoption-360d-e1785430024956-300x143.png 300w, https://www.percona.com/wp-content/uploads/2026/07/psmdb-version-adoption-360d-e1785430024956-768x366.png 768w, https://www.percona.com/wp-content/uploads/2026/07/psmdb-version-adoption-360d-e1785430024956-1536x732.png 1536w, https://www.percona.com/wp-content/uploads/2026/07/psmdb-version-adoption-360d-e1785430024956.png 1696w" sizes="auto, (max-width: 1024px) 100vw, 1024px"></p>
<p> </p>
<table width="1099">
<thead>
<tr>
<th><b>Version</b></th>
<th><b>Aug 2025</b></th>
<th><b>Jul 2026</b></th>
<th><b>Change</b></th>
</tr>
</thead>
<tbody>
<tr>
<td><b>8.0</b></td>
<td><span>22.6%</span></td>
<td><span>47.6%</span></td>
<td><span>+25.0 pts</span></td>
</tr>
<tr>
<td><b>7.0</b></td>
<td><span>28.7%</span></td>
<td><span>33.1%</span></td>
<td><span>+4.4 pts</span></td>
</tr>
<tr>
<td><b>6.0</b></td>
<td><span>26.9%</span></td>
<td><span>16.0%</span></td>
<td><span>−10.9 pts</span></td>
</tr>
<tr>
<td><b>5.0</b></td>
<td><span>22.9%</span></td>
<td><span>3.6%</span></td>
<td><span>−19.3 pts</span></td>
</tr>
</tbody>
</table>
<p> </p>
<h2><span>Technical Preview: What does that actually mean</span></h2>
<p><span>A Technical Preview build is complete enough to install, benchmark, and evaluate. It meets equal quality and packaging requirements as any other 8.0 patch. However, it has not undergone the full release qualification we require for a GA release with respect to ecosystem compatibility:</span></p>
<ul>
<li aria-level="1"><b>Percona Backup for MongoDB (PBM)</b><span>: logical backup and restore against an 8.3 server may cause some issues. Do not rely on it to protect anything you care about. Current known limitations are around logical backup and restore, and PITR. If you’re interested in details and progress on those, follow our </span><a href="https://perconadev.atlassian.net/browse/PSMDB-2176"><span>Jira tickets</span></a><span>.</span></li>
<li aria-level="1"><b>Percona ClusterSync for MongoDB (PCSM)</b><span>: replication to or from an 8.3 cluster is unvalidated.</span></li>
<li aria-level="1"><b>Percona Monitoring and Management (PMM):</b><span> metric collection may be incomplete or fail outright, particularly given the </span><span>serverStatus</span><span> and </span><span>cpuNanos</span><span> changes described above.</span></li>
</ul>
<p><span>To be clear about what this is and isn’t: upstream MongoDB Community 8.3 is a stable, production-suitable release with support through October 2029. The Technical Preview label applies to </span><b>Percona’s build</b><span>, not to MongoDB 8.3 itself. It reflects where we are in qualifying our surrounding tooling against this version, and not a judgment about upstream stability.</span></p>
<p><span>So if you need a fully-integrated Percona Server for MongoDB today, </span><b>8.0 is still the answer</b><span>. The current release is 8.0.26-11. When our 8.3 build reaches GA, that changes.</span></p>
<h2><span>How to start</span></h2>
<p><span>We recommend installing (or upgrading) Percona Server for MongoDB using the official Percona repositories via the </span><a href="https://docs.percona.com/percona-software-repositories/index.html"><span>percona-release repository management tool</span></a><span> and your system’s package manager. For further instructions, start with the <a href="https://docs.percona.com/percona-server-for-mongodb/8.3/install/index.html">quickstart guide</a> for the fresh installation or an </span><a href="https://docs.percona.com/percona-server-for-mongodb/8.3/install/upgrade-from-80.html"><span>upgrade procedure</span></a> from 8.0.</p>
<h2><span>Feedback needed</span></h2>
<p><span>This is the part that matters. A Technical Preview is only worth shipping if it yields findings.</span></p>
<p><span>We are specifically interested in:</span></p>
<ul>
<li aria-level="1"><b>Percona-specific feature behavior</b><span>: data-at-rest encryption with KMIP or Vault, audit logging, external LDAP authentication, OpenID Connect, file copy-based initial sync, hot backup, and audit logging with log redaction.</span></li>
<li aria-level="1"><b>PBM, PCSM, and PMM interactions.</b><span> We know these might be limited. Knowing </span><i><span>how</span></i><span> they fail helps us prioritize and fix them within the next release cycle.</span></li>
<li aria-level="1"><b>Upgrade friction</b><span> from 8.0, especially on sharded clusters and around the geospatial index and </span><span>removeShard</span><span> changes.</span></li>
</ul>
<p><span>Post your findings in the </span><a href="https://forums.percona.com/c/mongodb/percona-server-for-mongodb/17"><b>Percona Server for MongoDB forum</b></a><span>. Include your topology, your workload shape, and the exact version you tested. Engineering reads that category directly, and feedback from this preview will shape what the GA build looks like.</span></p>
<p><span>If you find a security issue, please report it through </span><a href="https://www.percona.com/security/"><span>Percona Security</span></a><span> disclosure process rather than posting publicly.</span></p>
<hr>
<p><i><span>Percona Server for MongoDB is a free, source-available, drop-in replacement for MongoDB Community Edition with enterprise-grade features. Telemetry figures in this post are derived from anonymous product telemetry.</span></i></p>
<p>The post <a href="https://www.percona.com/blog/percona-server-for-mongodb-8-3-technical-preview-is-now-available/">Percona Server for MongoDB 8.3 Technical Preview Is Now Available</a> appeared first on <a href="https://www.percona.com/">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/percona-server-for-mongodb-8-3-technical-preview-is-now-available/">Percona Server for MongoDB 8.3 Technical Preview Is Now Available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MySQL Best Practice : not using date / time types, nor ENUM</title>
        <link>https://jfg-mysql.blogspot.com/2026/07/best-practice-no-timestamp-nor-enum.html</link>
        <pubDate>Thu, 30 Jul 2026 15:46:44 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://jfg-mysql.blogspot.com/">J-F Gagné&#039;s MySQL Blog</source>
        <description><![CDATA[<p>Today, I was reminded of a MySQL Best Practice, probably generalizable to all databases : using simple types, not complex types.&#160; Such complex types to avoid include the date and time data types (including TIMESTAMP) and ENUM.&#160; Let's see why.</p>
<p>A little history about this, Baron Schwartz, a MySQL Legend who is not involved in the community anymore, compared using the TIMESTAMP type to</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/07/best-practice-no-timestamp-nor-enum.html">MySQL Best Practice : not using date / time types, nor ENUM</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Today, I was reminded of a MySQL Best Practice, probably generalizable to all databases : using simple types, not complex types.&amp;nbsp; Such complex types to avoid include the date and time data types (including TIMESTAMP) and ENUM.&amp;nbsp; Let&#8217;s see why.</p>
<p>A little history about this, Baron Schwartz, a MySQL Legend who is not involved in the community anymore, compared using the TIMESTAMP type to</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/07/best-practice-no-timestamp-nor-enum.html">MySQL Best Practice : not using date / time types, nor ENUM</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Java Connector 3.5.10, 3.4.4, 3.3.6, and 2.7.15 now available</title>
        <link>https://mariadb.com/resources/blog/mariadb-java-connector-3-5-10-3-4-4-3-3-6-and-2-7-15-now-available/</link>
        <pubDate>Wed, 29 Jul 2026 21:34:39 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>MariaDB is pleased to announce the immediate availability of the MariaDB Connector/J 3.5.10, 3.4.4, 3.3.6, and 2.7.15 releases. Release Notes […]</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-java-connector-3-5-10-3-4-4-3-3-6-and-2-7-15-now-available/">MariaDB Java Connector 3.5.10, 3.4.4, 3.3.6, and 2.7.15 now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB is pleased to announce the immediate availability of the MariaDB Connector/J 3.5.10, 3.4.4, 3.3.6, and 2.7.15 releases. Download Now Notable items in this release include: Notable items in this release include: Notable items in this release include: Notable items in this release include: See…</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-java-connector-3-5-10-3-4-4-3-3-6-and-2-7-15-now-available/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/mariadb-java-connector-3-5-10-3-4-4-3-3-6-and-2-7-15-now-available/">MariaDB Java Connector 3.5.10, 3.4.4, 3.3.6, and 2.7.15 now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>From a Production Problem to MariaDB: Headout’s Open-Source Contribution Journey</title>
        <link>https://mariadb.org/from-a-production-problem-to-mariadb-headouts-open-source-contribution-journey/</link>
        <pubDate>Wed, 29 Jul 2026 07:01:00 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>A production bottleneck at Headout led to a new MariaDB Server improvement. This is the story of how engineers, maintainers and AI-assisted development turned a real-world problem into an upstream open-source contribution.<br />
The post From a Production Problem to MariaDB: Headout’s Open-Source Contribution Journey appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/from-a-production-problem-to-mariadb-headouts-open-source-contribution-journey/">From a Production Problem to MariaDB: Headout’s Open-Source Contribution Journey</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>A production bottleneck at Headout led to a new MariaDB Server improvement. This is the story of how engineers, maintainers and AI-assisted development turned a real-world problem into an upstream open-source contribution.</p>
<p>The post <a rel="nofollow" href="https://mariadb.org/from-a-production-problem-to-mariadb-headouts-open-source-contribution-journey/">From a Production Problem to MariaDB: Headout’s Open-Source Contribution Journey</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/from-a-production-problem-to-mariadb-headouts-open-source-contribution-journey/">From a Production Problem to MariaDB: Headout’s Open-Source Contribution Journey</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB 12.3: Faster Vector Search with Matryoshka Optimization</title>
        <link>https://mariadb.com/resources/blog/mariadb-12-3-faster-vector-search-with-matryoshka-optimization/</link>
        <pubDate>Tue, 28 Jul 2026 18:29:55 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>Achieving Fast Vector Search in MariaDB MariaDB Server 12.3 makes vector search faster where it matters most: the high-recall levels […]</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-12-3-faster-vector-search-with-matryoshka-optimization/">MariaDB 12.3: Faster Vector Search with Matryoshka Optimization</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Server 12.3 makes vector search faster where it matters most: the high-recall levels that production AI workloads actually require. A new Matryoshka-aware optimization uses a cheap check on the first slice of each embedding to discard far-away candidates, then confirms the close ones with the full vector — so search stays just as accurate while doing far less work.</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-12-3-faster-vector-search-with-matryoshka-optimization/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/mariadb-12-3-faster-vector-search-with-matryoshka-optimization/">MariaDB 12.3: Faster Vector Search with Matryoshka Optimization</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Backups Using the MySQL Clone Operation</title>
        <link>https://www.fromdual.com/blog/backups-with-mysql-clone/</link>
        <pubDate>Tue, 28 Jul 2026 09:40:00 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.fromdual.com/aggregator/categories/9/">FromDual: FromDual all (en)</source>
        <description><![CDATA[<p>We recently tested the PostgreSQL backup tool pg_basebackup and were very impressed with its remote backup functionality, which allows for both physical local and physical remote backups.<br />
This led us to wonder whether a physical remote backup is also possible using the “new” MySQL Server Clone feature, which was introduced in MySQL 8.0.17 (July 2019).<br />
The MySQL Clone operation can be used to create both a local and a remote copy of the database. The original idea behind this feature was likely to automatically create nodes in an InnoDB Cluster (similar to Percona XtraDB Cluster SST).<br />
Terminology used in the clone operation:</p>
<p>Donor (source database)<br />
Recipient (destination database)</p>
<p>The clone operation is initiated from the recipient. The data can be cloned to the recipient’s own directory or, alternatively, to a different directory.<br />
Preparations<br />
The plugin must be installed on both the Donor and the Recipient.<br />
SQL > INSTALL PLUGIN clone SONAME 'mysql_clone.so';<br />
Query OK, 0 rows affected (0.01 sec)</p>
<p>SQL > SELECT PLUGIN_NAME, PLUGIN_STATUS<br />
 FROM INFORMATION_SCHEMA.PLUGINS<br />
 WHERE PLUGIN_NAME = 'clone'<br />
;<br />
+-------------+---------------+<br />
&#124; PLUGIN_NAME &#124; PLUGIN_STATUS &#124;<br />
+-------------+---------------+<br />
&#124; clone &#124; ACTIVE &#124;<br />
+-------------+---------------+<br />
If you want to force the plugin to load on restart, it must be configured as follows in the MySQL configuration file (my.cnf):<br />
[mysqld]<br />
plugin_load_add = mysql_clone.so<br />
clone = FORCE_PLUS_PERMANENT<br />
Local Backup Using Clone<br />
This method can serve as a replacement for a physical backup solution (xtrabackup or MySQL Enterprise Backup (mysql_backup)). On the database acting as the recipient in this case, execute the following command:<br />
SQL > CLONE LOCAL DATA DIRECTORY = '/mnt/backup/mysql_clone';<br />
The following items are still missing for the clone operation:</p>
<p>All TLS keys (*.pem files).<br />
The auto.cnf file, which contains the server_uuid.<br />
The mysqld-auto.cnf file, which contains dynamically modified, persistent server configuration variables.<br />
The mysql_upgrade_history.<br />
The MySQL configuration file (my.cnf) as well as<br />
The binary logs.</p>
<p>$ cp ${datadir}/*auto.cnf ${datadir}/mysql_upgrade_history ${datadir}/*.pem /mnt/backup/mysql_clone/<br />
Restoring the database is quite simple:<br />
$ systemctl stop mysql<br />
$ rm -rf ${datadir}/*<br />
$ cp -a /mnt/backup/mysql_clone/* ${datadir}/<br />
$ chown -R mysql: ${datadir}/*<br />
$ systemctl start mysql<br />
The #clone folder is created by the clone operation and can be ignored, but must not be deleted.<br />
$ ls -lad /mnt/backup/mysql_clone/*<br />
...<br />
drwxr-x--- 2 dba dba 4096 Jul 27 14:52 '#clone'<br />
...<br />
It is automatically removed when the MySQL database is started. If you delete it anyway, you will receive the following error messages:<br />
[System] [MY-013576] [InnoDB] InnoDB initialization has started.<br />
[System] [MY-013577] [InnoDB] InnoDB initialization has ended.<br />
mysqld: Can't create/write to file './performance_schema/clone_status_385.sdi' (OS errno 2 - No such file or directory)<br />
mysqld: Can't create file './performance_schema/clone_status_385.sdi' (errno: 2 - No such file or directory)<br />
[ERROR] [MY-013272] [Clone] Plugin Clone reported: 'Client: PFS table creation failed.'<br />
[ERROR] [MY-010202] [Server] Plugin 'clone' init function returned error.<br />
The binary log position required for point-in-time recovery can be determined as follows:<br />
SQL > SELECT BINLOG_FILE, BINLOG_POSITION FROM performance_schema.clone_status;<br />
+-------------------------------+-----------------+<br />
&#124; BINLOG_FILE &#124; BINLOG_POSITION &#124;<br />
+-------------------------------+-----------------+<br />
&#124; boss_percona-84_binlog.000003 &#124; 1231898 &#124;<br />
+-------------------------------+-----------------+<br />
Remote Backup Using Clone<br />
To create a remote backup using the clone functionality, a minimally functional MySQL database is required on the remote system. Unfortunately, a simple process or tool is not sufficient for this.<br />
On the donor server, you need a user with the following privileges:<br />
SQL > CREATE USER 'backup_user'@'%' IDENTIFIED BY 'secret';<br />
SQL > GRANT BACKUP_ADMIN ON *.* TO 'backup_user'@'%';<br />
In addition, the potential donor must be specified on the recipient server:<br />
SQL > SET GLOBAL clone_valid_donor_list = '192.168.1.129:3306';<br />
The remote backup is then performed as follows:<br />
SQL > CLONE INSTANCE FROM 'backup_user'@'192.168.1.129':3306 IDENTIFIED BY 'secret'<br />
DATA DIRECTORY = '/mnt/backup/mysql_clone';<br />
The missing files described above must now also be copied somehow:<br />
$ scp mysql@192.168.1.129:${datadir}/*auto.cnf /mnt/backup/mysql_clone/<br />
$ scp mysql@192.168.1.129:${datadir}/mysql_upgrade_history /mnt/backup/mysql_clone/<br />
$ scp mysql@192.168.1.129:${datadir}/*.pem /mnt/backup/mysql_clone/<br />
Restoring the database is done in the same way as described above.<br />
Conclusion<br />
The MySQL Clone operation is a cool feature that I neglected for a long time because it never occurred to me that it could also be used for backup purposes.<br />
I wouldn’t be surprised if the MySQL developers took a cue from PostgreSQL’s pg_basebackup when they implemented this feature.<br />
Unfortunately, to my knowledge, this feature is still completely missing in MariaDB. Too bad!<br />
Sources</p>
<p>General: The Clone Plugin<br />
There are a few minor limitations for the clone backup, which are described here: Clone Plugin Limitations.<br />
Monitoring the clone backup is described here: Monitoring Cloning Operations.<br />
Tuning the clone backup is described here: Clone System Variable Reference</p>
<p><a href="https://www.fromdual.com/blog/backups-with-mysql-clone/">Backups Using the MySQL Clone Operation</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>We recently tested the PostgreSQL backup tool <code>pg_basebackup</code> and were very impressed with its remote backup functionality, which allows for both physical local and physical remote backups.</p>
<p>This led us to wonder whether a physical remote backup is also possible using the “new” MySQL Server Clone feature, which was introduced in MySQL 8.0.17 (July 2019).</p>
<p>The MySQL Clone operation can be used to create both a local and a remote copy of the database. The original idea behind this feature was likely to automatically create nodes in an InnoDB Cluster (similar to Percona XtraDB Cluster SST).</p>
<p>Terminology used in the clone operation:</p>
<ul>
<li>Donor (source database)</li>
<li>Recipient (destination database)</li>
</ul>
<p>The clone operation is initiated from the recipient. The data can be cloned to the recipient’s own directory or, alternatively, to a different directory.</p>
<h2 id="preparations">Preparations</h2>
<p>The plugin must be installed on both the Donor and the Recipient.</p>
<pre><code>SQL&gt; INSTALL PLUGIN clone SONAME &#039;mysql_clone.so&#039;;
Query OK, 0 rows affected (0.01 sec)

SQL&gt; SELECT PLUGIN_NAME, PLUGIN_STATUS
 FROM INFORMATION_SCHEMA.PLUGINS
 WHERE PLUGIN_NAME = &#039;clone&#039;
;
+-------------+---------------+
| PLUGIN_NAME | PLUGIN_STATUS |
+-------------+---------------+
| clone | ACTIVE |
+-------------+---------------+
</code></pre>
<p>If you want to force the plugin to load on restart, it must be configured as follows in the MySQL configuration file (<code>my.cnf</code>):</p>
<pre><code>[mysqld]
plugin_load_add = mysql_clone.so
clone = FORCE_PLUS_PERMANENT
</code></pre>
<h2 id="local-backup-using-clone">Local Backup Using Clone</h2>
<p>This method can serve as a replacement for a physical backup solution (<code>xtrabackup</code> or MySQL Enterprise Backup (<code>mysql_backup</code>)). On the database acting as the recipient in this case, execute the following command:</p>
<pre><code>SQL&gt; CLONE LOCAL DATA DIRECTORY = &#039;/mnt/backup/mysql_clone&#039;;
</code></pre>
<p>The following items are still missing for the clone operation:</p>
<ul>
<li>All TLS keys (<code>*.pem</code> files).</li>
<li>The <code>auto.cnf</code> file, which contains the <code>server_uuid</code>.</li>
<li>The <code>mysqld-auto.cnf</code> file, which contains dynamically modified, persistent server configuration variables.</li>
<li>The <code>mysql_upgrade_history</code>.</li>
<li>The MySQL configuration file (<code>my.cnf</code>) as well as</li>
<li>The binary logs.</li>
</ul>
<pre><code>$ cp ${datadir}/*auto.cnf ${datadir}/mysql_upgrade_history ${datadir}/*.pem /mnt/backup/mysql_clone/
</code></pre>
<p>Restoring the database is quite simple:</p>
<pre><code>$ systemctl stop mysql
$ rm -rf ${datadir}/*
$ cp -a /mnt/backup/mysql_clone/* ${datadir}/
$ chown -R mysql: ${datadir}/*
$ systemctl start mysql
</code></pre>
<p>The <code>#clone</code> folder is created by the clone operation and can be ignored, but must not be deleted.</p>
<pre><code>$ ls -lad /mnt/backup/mysql_clone/*
...
drwxr-x--- 2 dba dba 4096 Jul 27 14:52 &#039;#clone&#039;
...
</code></pre>
<p>It is automatically removed when the MySQL database is started. If you delete it anyway, you will receive the following error messages:</p>
<pre><code>[System] [MY-013576] [InnoDB] InnoDB initialization has started.
[System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mysqld: Can&#039;t create/write to file &#039;./performance_schema/clone_status_385.sdi&#039; (OS errno 2 - No such file or directory)
mysqld: Can&#039;t create file &#039;./performance_schema/clone_status_385.sdi&#039; (errno: 2 - No such file or directory)
[ERROR] [MY-013272] [Clone] Plugin Clone reported: &#039;Client: PFS table creation failed.&#039;
[ERROR] [MY-010202] [Server] Plugin &#039;clone&#039; init function returned error.
</code></pre>
<p>The binary log position required for point-in-time recovery can be determined as follows:</p>
<pre><code>SQL&gt; SELECT BINLOG_FILE, BINLOG_POSITION FROM performance_schema.clone_status;
+-------------------------------+-----------------+
| BINLOG_FILE | BINLOG_POSITION |
+-------------------------------+-----------------+
| boss_percona-84_binlog.000003 | 1231898 |
+-------------------------------+-----------------+
</code></pre>
<h2 id="remote-backup-using-clone">Remote Backup Using Clone</h2>
<p>To create a remote backup using the clone functionality, a minimally functional MySQL database is required on the remote system. Unfortunately, a simple process or tool is not sufficient for this.</p>
<p>On the donor server, you need a user with the following privileges:</p>
<pre><code>SQL&gt; CREATE USER &#039;backup_user&#039;@&#039;%&#039; IDENTIFIED BY &#039;secret&#039;;
SQL&gt; GRANT BACKUP_ADMIN ON *.* TO &#039;backup_user&#039;@&#039;%&#039;;
</code></pre>
<p>In addition, the potential donor must be specified on the recipient server:</p>
<pre><code>SQL&gt; SET GLOBAL clone_valid_donor_list = &#039;192.168.1.129:3306&#039;;
</code></pre>
<p>The remote backup is then performed as follows:</p>
<pre><code>SQL&gt; CLONE INSTANCE FROM &#039;backup_user&#039;@&#039;192.168.1.129&#039;:3306 IDENTIFIED BY &#039;secret&#039;
DATA DIRECTORY = &#039;/mnt/backup/mysql_clone&#039;;
</code></pre>
<p>The missing files described above must now also be copied somehow:</p>
<pre><code>$ scp mysql@192.168.1.129:${datadir}/*auto.cnf /mnt/backup/mysql_clone/
$ scp mysql@192.168.1.129:${datadir}/mysql_upgrade_history /mnt/backup/mysql_clone/
$ scp mysql@192.168.1.129:${datadir}/*.pem /mnt/backup/mysql_clone/
</code></pre>
<p>Restoring the database is done in the same way as described above.</p>
<h2 id="conclusion">Conclusion</h2>
<p>The MySQL Clone operation is a cool feature that I neglected for a long time because it never occurred to me that it could also be used for backup purposes.</p>
<p>I wouldn’t be surprised if the MySQL developers took a cue from PostgreSQL’s <code>pg_basebackup</code> when they implemented this feature.</p>
<p>Unfortunately, to my knowledge, this feature is still completely missing in MariaDB. Too bad!</p>
<h2 id="sources">Sources</h2>
<ul>
<li>General: <a href="https://dev.mysql.com/doc/refman/9.7/en/clone-plugin.html" target="_blank" rel="noopener">The Clone Plugin</a></li>
<li>There are a few minor limitations for the clone backup, which are described here: <a href="https://dev.mysql.com/doc/refman/9.7/en/clone-plugin-limitations.html" target="_blank" rel="noopener">Clone Plugin Limitations</a>.</li>
<li>Monitoring the clone backup is described here: <a href="https://dev.mysql.com/doc/refman/9.7/en/clone-plugin-monitoring.html" target="_blank" rel="noopener">Monitoring Cloning Operations</a>.</li>
<li>Tuning the clone backup is described here: <a href="https://dev.mysql.com/doc/refman/9.7/en/clone-plugin-option-variable-reference.html" target="_blank" rel="noopener">Clone System Variable Reference</a></li>
</ul>
<p><a href="https://www.fromdual.com/blog/backups-with-mysql-clone/">Backups Using the MySQL Clone Operation</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Adobe Commerce Chooses MariaDB as Its Default Database Platform</title>
        <link>https://mariadb.org/adobe-commerce-chooses-mariadb-as-its-default-database-platform/</link>
        <pubDate>Mon, 27 Jul 2026 12:49:48 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Adobe Commerce is making MariaDB its default and recommended database<br />
platform.<br />
The post Adobe Commerce Chooses MariaDB as Its Default Database Platform appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/adobe-commerce-chooses-mariadb-as-its-default-database-platform/">Adobe Commerce Chooses MariaDB as Its Default Database Platform</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Adobe Commerce is making MariaDB its default and recommended database<br />
platform. </p>
<p>The post <a rel="nofollow" href="https://mariadb.org/adobe-commerce-chooses-mariadb-as-its-default-database-platform/">Adobe Commerce Chooses MariaDB as Its Default Database Platform</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/adobe-commerce-chooses-mariadb-as-its-default-database-platform/">Adobe Commerce Chooses MariaDB as Its Default Database Platform</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>ScalaHosting Becomes a Gold Sponsor of MariaDB Foundation</title>
        <link>https://mariadb.org/scalahosting-becomes-a-gold-sponsor-of-mariadb-foundation/</link>
        <pubDate>Mon, 27 Jul 2026 09:11:10 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Global cloud hosting provider supports the continued development and adoption of open-source MariaDB<br />
MariaDB Foundation is pleased to welcome ScalaHosting as a Gold Sponsor, strengthening the relationship between the MariaDB community and one of the hosting industry’s established cloud infrastructure providers. …<br />
Continue reading "ScalaHosting Becomes a Gold Sponsor of MariaDB Foundation"<br />
The post ScalaHosting Becomes a Gold Sponsor of MariaDB Foundation appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/scalahosting-becomes-a-gold-sponsor-of-mariadb-foundation/">ScalaHosting Becomes a Gold Sponsor of MariaDB Foundation</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Global cloud hosting provider supports the continued development and adoption of open-source MariaDB<br />
MariaDB Foundation is pleased to welcome <a href="https://www.scalahosting.com/">ScalaHosting</a> as a <a href="https://mariadb.org/donate/#gold-tier-eur-50000-per-year">Gold Sponsor</a>, strengthening the relationship between the MariaDB community and one of the hosting industry&#8217;s established cloud infrastructure providers. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/scalahosting-becomes-a-gold-sponsor-of-mariadb-foundation/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;ScalaHosting Becomes a Gold Sponsor of MariaDB Foundation&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/scalahosting-becomes-a-gold-sponsor-of-mariadb-foundation/">ScalaHosting Becomes a Gold Sponsor of MariaDB Foundation</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/scalahosting-becomes-a-gold-sponsor-of-mariadb-foundation/">ScalaHosting Becomes a Gold Sponsor of MariaDB Foundation</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Introducing 🍃MClusterAdmin: A Lightweight GUI Tool for MongoDB DBAs</title>
        <link>https://percona.community/blog/2026/07/27/introducing-mclusteradmin-a-lightweight-gui-tool-for-mongodb-dba/</link>
        <pubDate>Mon, 27 Jul 2026 00:00:00 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>Over the years working on various MongoDB troubleshooting cases, I’ve been wondering how to handle the longish JSON outputs from the most common diagnostic commands, like rs.status(), sh.status(), or db.currentOp(), not to mention db.serverStatus()! They are just painful and slow to read. I even came up with various scripts to present the data in table format, similar to what we know from MySQL, but I was never satisfied with them.</p>
<p><a href="https://percona.community/blog/2026/07/27/introducing-mclusteradmin-a-lightweight-gui-tool-for-mongodb-dba/">Introducing 🍃MClusterAdmin: A Lightweight GUI Tool for MongoDB DBAs</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Over the years working on various MongoDB troubleshooting cases, I’ve been wondering how to handle the longish JSON outputs from the most common diagnostic commands, like <code>rs.status()</code>, <code>sh.status()</code>, or <code>db.currentOp()</code>, not to mention <code>db.serverStatus()</code>! They are just painful and slow to read. I even came up with various scripts to present the data in <a href="https://github.com/kellyjonbrazil/jtbl" target="_blank" rel="noopener noreferrer">table format</a>, similar to what we know from MySQL, but I was never satisfied with them.</p>
<p>Finally, I thought it was futile to look for a universal solution that would yield human-friendly outputs in command-line sessions.</p>
<p>So, why not have a nice graphical interface to visualize replica sets, sharding state, connections, and more instead? I looked for available GUI tools for MongoDB and came to the impression that <strong>almost all of them are built</strong> <strong>for developers</strong>. They are great for browsing collections, editing documents, or composing queries, but when it comes to typical <strong>DBA</strong> daily tasks — checking replication health, inspecting replica set configuration, or understanding what is really going on inside a sharded cluster — we are really down to the mongo shell. There is nothing wrong with the shell client, of course, but some things are simply easier to digest when presented visually. Here, of course, <a href="https://docs.percona.com/percona-monitoring-and-management/3/install-pmm/install-pmm-client/connect-database/mongodb.html" target="_blank" rel="noopener noreferrer">PMM</a> does allow that, but it has a bit of a different purpose &#8211; long-term monitoring, and has to be installed and set up first. Besides, it does not do everything I wanted.</p>
<p>So, encouraged to experiment with vibe coding in Percona, I decided to experiment with filling this gap myself and started a small personal project: a lightweight <strong>DBA-oriented</strong> GUI interface called <strong>MClusterAdmin</strong>.</p>
<p><figure>
<img decoding="async" src="https://percona.community/blog/2026/07/mclusteradmin-picture.jpg" alt="MClusterAdmin" /></figure>
</p>
<h3 id="project-description">Project description</h3>
<p>MClusterAdmin is a tool designed to be self-hosted, with a backend written in Go, while the frontend is in HTML and JavaScript. It offers a web UI interface featuring typical <strong>DBA perspective</strong> dashboards. The whole application ships as a single, small binary, with <strong>no agents</strong>, no external services, and no internal database of its own.</p>
<p>In order to try it, you need to copy the binary to a host that has access to the MongoDB servers to be monitored. I suggest running first locally on some test environment, like one created using <a href="https://github.com/PrzemekMalkowski/mlaunch-go" target="_blank" rel="noopener noreferrer">mlaunch</a>, <a href="https://github.com/zelmario/anydbver" target="_blank" rel="noopener noreferrer">anydbver</a>, <a href="https://github.com/percona/mongo_terraform_ansible" target="_blank" rel="noopener noreferrer">mongo_terraform_ansible</a>, or a similar sandbox tool. For <strong>Docker</strong> environments, you can use the already existing <a href="https://github.com/PrzemekMalkowski/mclusteradmin/pkgs/container/mclusteradmin" target="_blank" rel="noopener noreferrer">image</a>, just make sure your container shares the same network as the MongoDB cluster.</p>
<p>The tool has no authentication on its own. Very similarly to mongosh, the MongoDB URI and credentials you provide determine what it will be able to offer. You can connect a standalone instance, a replica set member, or a mongos router. The tool will discover the rest of the topology automatically and will establish individual connections to each member. No SSH access to the database hosts is needed.</p>
<p>With its tiny footprint, it should fit well into your cloud/K8S MongoDB deployments.</p>
<p>Let me be clear about what MClusterAdmin is <strong>not</strong>: it is not a data browser — you will not view or edit your collections’ documents with it. There are plenty of other tools for that! It is, again, not a long-term monitoring or alerting solution; for that, I strongly recommend <a href="https://docs.percona.com/percona-monitoring-and-management/3/" target="_blank" rel="noopener noreferrer">Percona Monitoring and Management (PMM)</a>. MClusterAdmin is designed for quick, interactive cluster inspection and simple administrative operations that a DBA performs many times a day.</p>
<p>I will point out the key features that I decided to implement further below, but I guess watching a quick <strong>demo presentation</strong> will allow you to judge the tool much faster:</p>
<div class="youtube__block">
<p>Link: <a href="https://youtu.be/RecQ7wtEV9g" class="youtube__link" target="_blank" rel="noopener">https://youtu.be/RecQ7wtEV9g</a></p>
</div>
<p>I don’t think it makes sense to describe all the features I was able to implement so far in detail. I hope everything is intuitive enough so that you can see for yourself. The <a href="https://github.com/PrzemekMalkowski/mclusteradmin/blob/master/README.md" target="_blank" rel="noopener noreferrer">documentation</a> is available on GitHub if needed.</p>
<p>In short, my aim was to provide useful views covering <strong>replication topology</strong> and settings, sharding members and routers, but also overall database size statistics and their distribution among shards. This includes per-collection detailed sharding stats, data, and index sizes, etc. In addition to that, for each discovered MongoDB instance, you should be able to see basic WiredTiger usage stats, oplog details, including an on-demand breakdown of <strong>which collections changes generated the most recent oplog traffic</strong>, as well as some other most important server settings and usage summaries.</p>
<p>You will also find slow queries profiling, with the query explain module, as well as a quite functional users and roles management section.</p>
<p>The last <strong>security-focused</strong> section allows you to check whether authentication is enabled on each host, as well as what is the usage of each authentication mechanism.</p>
<h3 id="getting-started">Getting Started</h3>
<p>Running MClusterAdmin takes a few seconds. Just download the suitable binary from the <a href="https://github.com/PrzemekMalkowski/mclusteradmin/releases" target="_blank" rel="noopener noreferrer">release page</a>, or compile it yourself:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-0">
<div class="highlight">
<pre class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">git clone https://github.com/PrzemekMalkowski/mclusteradmin.git
</span></span><span class="line"><span class="cl"><span class="nb">cd</span> mclusteradmin
</span></span><span class="line"><span class="cl">go build -o mca .
</span></span><span class="line"><span class="cl">./mca</span></span></code></pre>
</div>
</div>
</div>
<p>Then open the relevant address (by default http://localhost:8787) in your browser and paste your MongoDB connection URI to connect. There is also a <code>--view-only</code> flag, which disables all mutating operations both in the UI and at the API level — handy when you just want a safe, read-only window into a cluster. TLS mode for the web service interface is supported as well.</p>
<h3 id="kubernetes-integration">Kubernetes integration</h3>
<p>It is extremely easy to add MClusterAdmin as a diagnostic pod to your existing MongoDB cluster in Kubernetes. Just use the available <a href="https://github.com/PrzemekMalkowski/mclusteradmin/pkgs/container/mclusteradmin" target="_blank" rel="noopener noreferrer">Docker image</a> from the GitHub repository!</p>
<p>An example MClusterAdmin.yaml configuration can be as simple as:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-1">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">apiVersion: apps/v1
</span></span><span class="line"><span class="cl">kind: Deployment
</span></span><span class="line"><span class="cl">metadata:
</span></span><span class="line"><span class="cl"> name: MClusterAdmin
</span></span><span class="line"><span class="cl">spec:
</span></span><span class="line"><span class="cl"> replicas: 1
</span></span><span class="line"><span class="cl"> selector:
</span></span><span class="line"><span class="cl"> matchLabels:
</span></span><span class="line"><span class="cl"> app: MClusterAdmin
</span></span><span class="line"><span class="cl"> template:
</span></span><span class="line"><span class="cl"> metadata:
</span></span><span class="line"><span class="cl"> labels:
</span></span><span class="line"><span class="cl"> app: MClusterAdmin
</span></span><span class="line"><span class="cl"> spec:
</span></span><span class="line"><span class="cl"> containers:
</span></span><span class="line"><span class="cl"> - name: MClusterAdmin
</span></span><span class="line"><span class="cl"> image: ghcr.io/przemekmalkowski/mclusteradmin:latest
</span></span><span class="line"><span class="cl"> ports:
</span></span><span class="line"><span class="cl"> - containerPort: 8787</span></span></code></pre>
</div>
</div>
</div>
<h3 id="a-word-of-caution">A Word of Caution</h3>
<p>MClusterAdmin is currently in <strong>beta</strong>, and it is a personal side project, so please do not point it at your production clusters just yet — test it in a safe environment first. The connected MongoDB user needs privileges matching the dashboards you want to use; the documentation breaks these down per feature, so you can follow the least-privilege approach instead of simply granting root.</p>
<h3 id="summary">Summary</h3>
<p>MClusterAdmin was created as an attempt to fill the gap I found to be the case in the MongoDB community: a lightweight, replication- and sharding-aware GUI for MongoDB <strong>DBAs</strong>, free from any data-browsing ballast. The project is open source (GPLv3), and the code is available on <a href="https://github.com/PrzemekMalkowski/mclusteradmin" target="_blank" rel="noopener noreferrer">GitHub</a>. If you find it useful, miss a feature, or hit a bug, I would love to hear from you. Feedback is very welcome!</p>
<p><em>The article was created by a human.</em></p>
<p><a href="https://percona.community/blog/2026/07/27/introducing-mclusteradmin-a-lightweight-gui-tool-for-mongodb-dba/">Introducing 🍃MClusterAdmin: A Lightweight GUI Tool for MongoDB DBAs</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>The Queen and the “Half That Wasn’t Told”</title>
        <link>https://mariadb.org/the-queen-and-the-half-that-wasnt-told/</link>
        <pubDate>Sun, 26 Jul 2026 18:55:29 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>The Queen of Sheba did not travel lightly.<br />
She arrived in Jerusalem with difficult questions, a large caravan, camels carrying spices, and an impressive quantity of gold. …<br />
Continue reading "The Queen and the “Half That Wasn’t Told”"<br />
The post The Queen and the “Half That Wasn’t Told” appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/the-queen-and-the-half-that-wasnt-told/">The Queen and the “Half That Wasn’t Told”</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>The Queen of Sheba did not travel lightly.<br />
She arrived in Jerusalem with difficult questions, a large caravan, camels carrying spices, and an impressive quantity of gold. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/the-queen-and-the-half-that-wasnt-told/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;The Queen and the &#8220;Half That Wasn&#8217;t Told&#8221;&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/the-queen-and-the-half-that-wasnt-told/">The Queen and the &#8220;Half That Wasn&#8217;t Told&#8221;</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/the-queen-and-the-half-that-wasnt-told/">The Queen and the “Half That Wasn’t Told”</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>IBM continues as a Platinum Sponsor of MariaDB Foundation</title>
        <link>https://mariadb.org/ibm-continues-as-a-platinum-sponsor-of-mariadb-foundation/</link>
        <pubDate>Fri, 24 Jul 2026 13:12:09 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>We are delighted to announce that IBM is continuing its support of MariaDB Foundation as a Platinum Sponsor.<br />
IBM’s sponsorship brings together two major enterprise computing platforms, IBM® …<br />
Continue reading "IBM continues as a Platinum Sponsor of MariaDB Foundation"<br />
The post IBM continues as a Platinum Sponsor of MariaDB Foundation appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/ibm-continues-as-a-platinum-sponsor-of-mariadb-foundation/">IBM continues as a Platinum Sponsor of MariaDB Foundation</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>We are delighted to announce that IBM is continuing its support of MariaDB Foundation as a <a href="https://mariadb.org/donate/#platinum-tier-eur-100000-per-year">Platinum Sponsor</a>.<br />
IBM&#8217;s sponsorship brings together two major enterprise computing platforms, IBM&#174; &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/ibm-continues-as-a-platinum-sponsor-of-mariadb-foundation/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;IBM continues as a Platinum Sponsor of MariaDB Foundation&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/ibm-continues-as-a-platinum-sponsor-of-mariadb-foundation/">IBM continues as a Platinum Sponsor of MariaDB Foundation</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/ibm-continues-as-a-platinum-sponsor-of-mariadb-foundation/">IBM continues as a Platinum Sponsor of MariaDB Foundation</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Say the Name: MariaDB, MySQL, and the Ecosystem We Share</title>
        <link>https://mariadb.org/say-the-name-mariadb-mysql-and-the-ecosystem-we-share/</link>
        <pubDate>Fri, 24 Jul 2026 06:58:58 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB and MySQL share history, tools, protocols and a large technical community. But compatibility does not mean identity—especially when reporting bugs. A MariaDB Connector/C issue submitted to the MySQL bug tracker offers a funny reminder to say the product’s actual name.<br />
The post Say the Name: MariaDB, MySQL, and the Ecosystem We Share appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/say-the-name-mariadb-mysql-and-the-ecosystem-we-share/">Say the Name: MariaDB, MySQL, and the Ecosystem We Share</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB and MySQL share history, tools, protocols and a large technical community. But compatibility does not mean identity—especially when reporting bugs. A MariaDB Connector/C issue submitted to the MySQL bug tracker offers a funny reminder to say the product’s actual name.</p>
<p>The post <a rel="nofollow" href="https://mariadb.org/say-the-name-mariadb-mysql-and-the-ecosystem-we-share/">Say the Name: MariaDB, MySQL, and the Ecosystem We Share</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/say-the-name-mariadb-mysql-and-the-ecosystem-we-share/">Say the Name: MariaDB, MySQL, and the Ecosystem We Share</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Percona Operator for MongoDB 1.23.0: ClusterSync Migration, Vector Search, and PVC Snapshot Backups</title>
        <link>https://www.percona.com/blog/percona-operator-for-mongodb-1-23-0-clustersync-vector-search-pvc-snapshot-backups/</link>
        <pubDate>Thu, 23 Jul 2026 19:55:51 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Percona Operator for MongoDB 1.23.0 makes the operator a place you move to, not just a place you start. A new ClusterSync component clones a live source and follows its change streams, so leaving a hosted service is a short cutover rather than a long outage. Alongside it, this release adds semantic vector search and … Continued<br />
The post Percona Operator for MongoDB 1.23.0: ClusterSync Migration, Vector Search, and PVC Snapshot Backups appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/percona-operator-for-mongodb-1-23-0-clustersync-vector-search-pvc-snapshot-backups/">Percona Operator for MongoDB 1.23.0: ClusterSync Migration, Vector Search, and PVC Snapshot Backups</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="aligncenter wp-image-50444 size-full" src="https://www.percona.com/wp-content/uploads/2026/07/Cover-1000-x-420.png" alt="" width="1001" height="420" /><br />
<b>Percona Operator for MongoDB 1.23.0</b> makes the operator a place you move to, not just a place you start. A new ClusterSync component clones a live source and follows its change streams, so leaving a hosted service is a short cutover rather than a long outage. Alongside it, this release adds semantic vector search and storage-layer snapshot backups, two features that matter most once the data is yours to run.</p>
<p><span style="font-weight: 400">The three headline features are </span><b>Percona ClusterSync for MongoDB</b><span style="font-weight: 400">, </span><b>vector search</b><span style="font-weight: 400">, and </span><b>PVC snapshot backups</b><span style="font-weight: 400">. ClusterSync clones and continuously replicates a live source into an operator-managed cluster. Vector search brings semantic queries to Percona Server for MongoDB. PVC snapshot backups move backups off the network path and onto the storage layer.</span></p>
<p><span style="font-weight: 400">This release also widens where you can run it, adding official Rancher Kubernetes Engine (RKE2) support and full ARM64 images. Much of what shipped here traces back to requests on </span><a href="https://forums.percona.com/"><span style="font-weight: 400">forums.percona.com</span></a><span style="font-weight: 400"> and the public issue tracker.</span></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400">In this post, you&#8217;ll learn about:</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">ClusterSync migration and replication</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Vector search for semantic queries</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">PVC snapshot backups</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Other improvements worth knowing about<br />
</span></li>
</ul>
<p>&nbsp;</p>
<h2><b>Zero-Downtime Migration with Percona ClusterSync</b></h2>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-50445 size-large" src="https://www.percona.com/wp-content/uploads/2026/07/clustersync-migration-1024x569.png" alt="" width="1024" height="569" /></p>
<p><span style="font-weight: 400">Moving a live MongoDB database onto the operator has always been the awkward first step. Dump-and-restore needs a maintenance window sized to your data, and hand-built replication between a source and a target is fragile to set up and easy to get wrong. This release introduces <a href="https://docs.percona.com/percona-clustersync-for-mongodb/">Percona ClusterSync for MongoDB</a> (PCSM) as an operator-managed component, so the migration path is via a Kubernetes object rather than a runbook.</span></p>
<p>&nbsp;</p>
<h3><span style="font-weight: 400"><b>Why it matters</b><br />
</span></h3>
<p><span style="font-weight: 400">The common case is </span><span style="font-weight: 400">migrating</span><span style="font-weight: 400"> a hosted MongoDB service, for example MongoDB Atlas, for an operator-managed Percona Server for MongoDB cluster you control end to end. A typical trigger in production is a hosted-service bill that climbs with the workload, or a compliance requirement to keep data inside your own VPC and region: a team running a user-profile store on Atlas points PCSM at it, lets the target catch up over a day or two while the application keeps serving from Atlas, then cuts over in a maintenance window measured in seconds. PCSM clones the existing data, then tracks ongoing changes through MongoDB change streams, so the target stays current while you validate it. When you are ready, you cut the application over during a short window rather than a long one. The same mechanism keeps a continuously updated replica for non-production use or a hybrid-cloud copy.<br />
<b><br />
</b></span></p>
<h3><span style="font-weight: 400"><b>How it works</b><br />
</span></h3>
<p><span style="font-weight: 400">PCSM runs as its own container, deployed and managed through a new </span><em><span style="font-weight: 400">PerconaServerMongoDBClusterSync</span></em><span style="font-weight: 400"> custom resource. It performs an initial clone from the source connection string, then consumes change stream events to apply subsequent writes to the target. A </span><span style="font-weight: 400">mode</span><span style="font-weight: 400"> field controls the lifecycle: </span><span style="font-weight: 400">running</span><span style="font-weight: 400"> starts or resumes replication, </span><span style="font-weight: 400">paused</span><span style="font-weight: 400"> holds it, and </span><span style="font-weight: 400">finalized</span><span style="font-weight: 400"> stops replication.</span></p>
<p>&nbsp;</p>
<h3><b>Wiring it up</b></h3>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">apiVersion: psmdb.percona.com/v1
kind: PerconaServerMongoDBClusterSync
metadata:
  name: my-cluster-sync
spec:
  clusterName: my-target-cluster-name
  image: percona/percona-clustersync-mongodb:0.9.0
  # mode controls the PCSM lifecycle intent. Allowed values:
  #   running   - start/resume replication (default)
  #   paused    - pause an active replication
  #   finalized - stop replication
  mode: running
  source:
    uri: mongodb://source-cluster-mongos.source-namespace.svc.cluster.local:27017
    credentialsSecret: my-cluster-sync-source
  # excludeNamespaces lists MongoDB namespaces (db or db.collection) to skip.
  # excludeNamespaces:
  #   - admin
  #   - local</pre>
<p><em><span style="font-weight: 400">clusterName</span></em><span style="font-weight: 400"> names the operator-managed target that receives the data. </span><em><span style="font-weight: 400">source.uri</span></em><span style="font-weight: 400"> and </span><em><span style="font-weight: 400">source.credentialsSecret</span></em><span style="font-weight: 400"> point at the database you are migrating from, which can be Atlas, a self-managed replica set, or another operator cluster. </span><em><span style="font-weight: 400">mode</span></em><span style="font-weight: 400"> is the control you drive the cutover with: run to catch up, pause to hold, then finalize once the application points at the new cluster. The optional </span><em><span style="font-weight: 400">excludeNamespaces</span></em><span style="font-weight: 400"> list skips databases or collections you do not want to copy.</span><br />
&nbsp;</p>
<h3><b>Cutover and rollback</b></h3>
<p><span style="font-weight: 400">The cutover is yours to time, not the operator&#8217;s. </span><span style="font-weight: 400">During the running replication</span><span style="font-weight: 400">, the target trails the source by the change-stream lag, which you watch until it is small and steady. You then stop writes on the source, let the last events drain, and repoint the application at the target cluster. Because the source keeps serving until you move the application, a rollback before cutover is simply leaving the application where it is. After cutover, treat the move as one-way once writes flow to the target, so verify the target thoroughly during the sync window rather than after.</span></p>
<blockquote>
<p><b>Note:</b><span style="font-weight: 400"> The PCSM component ships at version 0.9.0 with this release. Test the full migration and cutover against a staging copy before you run it on production data, and keep the source available until you have verified the target.</span></p>
</blockquote>
<p>&nbsp;</p>
<h2><b>Vector search for semantic queries</b></h2>
<p><span style="font-weight: 400">Vector search retrieves results by meaning rather than exact keyword match, which is the retrieval pattern behind semantic search and retrieval-augmented generation for AI applications. Teams that already store their data in MongoDB have had to copy vectors into a separate engine to do this, which adds a system to run and a pipeline to keep in sync. In production, this is the pattern behind a support tool that surfaces past tickets describing the same problem in different words, a product catalog that returns items by intent rather than exact keywords, and a RAG service that grounds a model on internal documents. This release lets you store and query vector data alongside your regular documents in Percona Server for MongoDB, so those workloads query one system instead of two.</span><br />
&nbsp;</p>
<h3><b>How it works</b></h3>
<p><span style="font-weight: 400">The operator deploys and manages the </span><span style="font-weight: 400">mongot</span><span style="font-weight: 400"> search process, wires its authentication and TLS to the rest of the cluster, and keeps the search index synchronized for both replica set and sharded deployments. Applications query the index through the same MongoDB connection they already use, so you add semantic search without a second client, a second driver, or a second set of credentials. You do not stand up or secure a separate search tier; the operator treats </span><span style="font-weight: 400">mongot</span><span style="font-weight: 400"> as another managed component of the cluster.</span><br />
&nbsp;</p>
<h3><b>Wiring it up</b></h3>
<p><span style="font-weight: 400">Enable the search component in the custom resource:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">spec:
  search:
    enabled: true
    image: perconalab/percona-server-mongodb-operator:main-mongot
    size: 1
    storage:
      persistentVolumeClaim:
        resources:
          requests:
            storage: 10Gi
    resources:
      requests:
        cpu: "2"
        memory: 2Gi</pre>
<p><em><span style="font-weight: 400">size</span></em><span style="font-weight: 400"> sets how many search nodes to run, and </span><em><span style="font-weight: 400">storage</span></em><span style="font-weight: 400"> gives the search index its own <em>PersistentVolumeClaim</em> so it does not compete with the database volume. Size the </span><em><span style="font-weight: 400">resources</span></em><span style="font-weight: 400"> block to your index: vector indexes are memory-sensitive, so give </span><em><span style="font-weight: 400">mongot</span></em><span style="font-weight: 400"> enough headroom for the corpus you intend to query.</span></p>
<blockquote>
<p><b>Note:</b><span style="font-weight: 400"> Vector search is a tech preview in 1.23.0 and is not recommended for production yet. It requires Percona Server for MongoDB 8.3 or later.</span></p>
</blockquote>
<p>&nbsp;</p>
<h2><b>PVC snapshot backups</b></h2>
<p><span style="font-weight: 400">Logical and streamed physical backups both push data across the network to object storage, and for a multi-terabyte cluster, that path is the bottleneck. Backups run long, restores run longer, and both compete with production traffic for CPU and bandwidth. This release adds backups built on PersistentVolumeClaim snapshots, </span><span style="font-weight: 400">which takes the storage layer directly</span><span style="font-weight: 400">.</span></p>
<p>&nbsp;</p>
<h3><b>Why it matters</b></h3>
<p><span style="font-weight: 400">A PVC snapshot is a point-in-time copy of your data volumes taken at the storage layer through the Kubernetes VolumeSnapshot API. Because the operator asks the storage provider for a snapshot instead of streaming bytes out, a backup typically completes in seconds or minutes regardless of database size, and a restore is correspondingly fast. Two production situations show the difference: a nightly backup that no longer fits its window as a cluster grows past a few terabytes, and a staging refresh that ties up resources for hours while it restores a streamed copy. A storage-layer snapshot turns both into a near-instant operation. The speed comes from how the storage layer implements snapshots: instead of copying the whole volume, most backends record only the blocks that changed since the previous snapshot and reference the rest, so the cost tracks your change rate rather than the total database size. Snapshots also work with encrypted and TLS-enabled clusters, and they use fewer cluster resources because there is no long-running data-transfer job.</span></p>
<h3></h3>
<p>&nbsp;</p>
<h3><b>Wiring it up</b></h3>
<p><span style="font-weight: 400">The operator takes snapshot backups in two ways: on demand through a </span><em><span style="font-weight: 400">PerconaServerMongoDBBackup</span></em><span style="font-weight: 400"> object, or on a schedule through a backup task. The scheduled form looks like this, using the </span><em><span style="font-weight: 400">external</span></em><span style="font-weight: 400"> type and a <em>VolumeSnapshotClass</em>:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">spec:
  backup:
    tasks:
      - name: daily-snapshot
        enabled: false
        schedule: "0 0 * * *"
        retention:
          count: 1
          type: count
          deleteFromStorage: true
        type: external
        volumeSnapshotClass: YOUR-VOLUME-SNAPSHOT-CLASS</pre>
<p><em><span style="font-weight: 400">type: external</span></em><span style="font-weight: 400"> tells the operator to take a storage-layer snapshot rather than stream a backup, and </span><span style="font-weight: 400">volumeSnapshotClass</span><span style="font-weight: 400"> names the <em>VolumeSnapshotClass</em> your CSI driver provides. The </span><em><span style="font-weight: 400">retention</span></em><span style="font-weight: 400"> block prunes old snapshots on the schedule you set. Your storage provider must support the Kubernetes VolumeSnapshot API for this to work.</span></p>
<p><span style="font-weight: 400">Snapshot backups complement the streamed and logical backups the operator already supports; they do not replace them. Snapshots usually live in the same storage account and region as the volumes they copy, so keep a streamed backup to object storage for off-site and cross-region disaster recovery. A practical policy pairs frequent fast snapshots for quick local recovery with a less frequent streamed backup for durability, and the operator runs both from the same </span><em><span style="font-weight: 400">backup.tasks</span></em><span style="font-weight: 400"> list.</span></p>
<blockquote>
<p><b><br />
Note: </b><span style="font-weight: 400">PVC snapshot backups are a tech preview in 1.23.0 and are not recommended for production yet. Snapshot portability and retention semantics depend on your CSI driver, so test restores before you rely on them.</span></p>
</blockquote>
<p>&nbsp;</p>
<h2><b>Other improvements</b></h2>
<p><span style="font-weight: 400">Beyond the three headline features, 1.23.0 ships a set of enhancements that smooth day-two operations:</span></p>
<ul>
<li style="font-weight: 400"><b>Operator-generated connection string Secrets </b><span style="font-weight: 400">(</span><a href="https://perconadev.atlassian.net/browse/K8SPSMDB-1537"><span style="font-weight: 400">K8SPSMDB-1537</span></a><span style="font-weight: 400">): the operator now publishes a ready-to-use </span><b>MongoDB connection string </b><span style="font-weight: 400">(URI) in a Kubernetes Secret for the </span><i><span style="font-weight: 400">databaseAdmin</span></i><span style="font-weight: 400"> user. An application can read that one Secret and connect to it, instead of building the URI itself from Pod names, Services, TLS settings, and credentials.</span></li>
<li style="font-weight: 400"><b>Workload Identity for GCS backups</b><span style="font-weight: 400"> (</span><a href="https://perconadev.atlassian.net/browse/K8SPSMDB-1602"><span style="font-weight: 400">K8SPSMDB-1602</span></a><span style="font-weight: 400">): back up to Google Cloud Storage without storing a service-account JSON key in a Secret.</span></li>
<li style="font-weight: 400"><b>Oracle Cloud Infrastructure Object Storage</b><span style="font-weight: 400"> (</span><a href="https://perconadev.atlassian.net/browse/K8SPSMDB-1644"><span style="font-weight: 400">K8SPSMDB-1644</span></a><span style="font-weight: 400">) and </span><b>Alibaba Cloud OSS</b><span style="font-weight: 400"> (</span><a href="https://perconadev.atlassian.net/browse/K8SPSMDB-1519"><span style="font-weight: 400">K8SPSMDB-1519</span></a><span style="font-weight: 400">): two more native backup destinations.</span></li>
<li style="font-weight: 400"><b>Restore a collection under a different name</b><span style="font-weight: 400"> (</span><a href="https://perconadev.atlassian.net/browse/K8SPSMDB-1603"><span style="font-weight: 400">K8SPSMDB-1603</span></a><span style="font-weight: 400">): use selective.nsFrom and nsTo to restore one collection alongside the live one for inspection or recovery.</span></li>
<li style="font-weight: 400"><b>External nodes as arbiters</b><span style="font-weight: 400"> (</span><a href="https://perconadev.atlassian.net/browse/K8SPSMDB-1031"><span style="font-weight: 400">K8SPSMDB-1031</span></a><span style="font-weight: 400">): set </span><i><span style="font-weight: 400">arbiterOnly: true</span></i><span style="font-weight: 400"> on an external node to place a tie-breaker vote in a third location without a data-bearing member.</span></li>
<li style="font-weight: 400"><b>cert-manager ClusterIssuer and TLS policy </b><span style="font-weight: 400">(</span><a href="https://perconadev.atlassian.net/browse/K8SPSMDB-1413"><span style="font-weight: 400">K8SPSMDB-1413</span></a><span style="font-weight: 400">, </span><a href="https://perconadev.atlassian.net/browse/K8SPSMDB-1458"><span style="font-weight: 400">K8SPSMDB-1458</span></a><span style="font-weight: 400">): point the operator at an existing </span><i><span style="font-weight: 400">ClusterIssuer</span></i><span style="font-weight: 400">, and use </span><i><span style="font-weight: 400">certManagementPolicy</span></i><span style="font-weight: 400"> to keep certificate lifecycle fully under your control.</span></li>
<li style="font-weight: 400"><b>Tunable reconciliation interval </b><span style="font-weight: 400">(</span><a href="https://perconadev.atlassian.net/browse/K8SPSMDB-1571"><span style="font-weight: 400">K8SPSMDB-1571</span></a><span style="font-weight: 400">): set </span><i><span style="font-weight: 400">RECONCILE_INTERVAL</span></i><span style="font-weight: 400"> to reduce Kubernetes API load on large fleets (default 5s).</span></li>
<li style="font-weight: 400"><b>Query Analytics via mongolog for PMM</b><span style="font-weight: 400"> (</span><a href="https://perconadev.atlassian.net/browse/K8SPSMDB-1546"><span style="font-weight: 400">K8SPSMDB-1546</span></a><span style="font-weight: 400">): choose mongolog as the QAN source in </span><a href="https://docs.percona.com/percona-monitoring-and-management/"><span style="font-weight: 400">Percona Monitoring and Management</span></a><span style="font-weight: 400">.</span></li>
<li style="font-weight: 400"><b>Custom sidecar health probes</b><span style="font-weight: 400"> (</span><a href="https://perconadev.atlassian.net/browse/K8SPSMDB-1701"><span style="font-weight: 400">K8SPSMDB-1701</span></a><span style="font-weight: 400">, </span><a href="https://perconadev.atlassian.net/browse/K8SPSMDB-1728"><span style="font-weight: 400">K8SPSMDB-1728</span></a><span style="font-weight: 400">) and </span><b>StatefulSet</b> <i><span style="font-weight: 400">revisionHistoryLimit</span></i><span style="font-weight: 400"> (</span><a href="https://perconadev.atlassian.net/browse/K8SPSMDB-1572"><span style="font-weight: 400">K8SPSMDB-1572</span></a><span style="font-weight: 400">): finer control over probes and rollout history.</span>&nbsp;</li>
</ul>
<p><span style="font-weight: 400">For the full list, including bug fixes, see the release notes linked below.</span></p>
<p>&nbsp;</p>
<h2><span style="font-weight: 400"><b>Conclusion</b></span></h2>
<p><span style="font-weight: 400">Percona Operator for MongoDB 1.23.0 covers the arc from getting data in to keeping it safe: ClusterSync brings a live database onto the operator with a short cutover, vector search lets one system serve both documents and semantic queries, and PVC snapshot backups take the network out of the backup path. With RKE2 and full ARM64 support added, more of that runs on the platforms teams actually use. If there is a workflow you still script around the operator, tell us on the forum, since that is where releases like this one come from.<br />
</span></p>
<h2><span style="font-weight: 400"><br />
<b>Try Percona Operator for MongoDB 1.23.0<br />
</b></span></h2>
<ul>
<li style="font-weight: 400"><b>Release notes</b><span style="font-weight: 400">: </span><a href="https://docs.percona.com/percona-operator-for-mongodb/RN/Kubernetes-Operator-for-PSMONGODB-RN1.23.0.html"><span style="font-weight: 400">Percona Operator for MongoDB 1.23.0 Release Notes</span></a></li>
<li style="font-weight: 400"><b>Documentation</b><span style="font-weight: 400">: </span><a href="https://docs.percona.com/percona-operator-for-mongodb/"><span style="font-weight: 400">Percona Operator for MongoDB docs</span></a></li>
<li style="font-weight: 400"><b>GitHub</b><span style="font-weight: 400">: </span><a href="https://github.com/percona/percona-server-mongodb-operator"><span style="font-weight: 400">percona/percona-server-mongodb-operator</span></a></li>
<li style="font-weight: 400"><b>Community Forum</b><span style="font-weight: 400">: </span><a href="https://forums.percona.com/"><span style="font-weight: 400">forums.percona.com</span></a><span style="font-weight: 400">: share your feedback, ask questions, or report issues</span></li>
</ul>
<h2></h2>
<p>&nbsp;</p>
<p>The post <a href="https://www.percona.com/blog/percona-operator-for-mongodb-1-23-0-clustersync-vector-search-pvc-snapshot-backups/">Percona Operator for MongoDB 1.23.0: ClusterSync Migration, Vector Search, and PVC Snapshot Backups</a> appeared first on <a href="https://www.percona.com">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/percona-operator-for-mongodb-1-23-0-clustersync-vector-search-pvc-snapshot-backups/">Percona Operator for MongoDB 1.23.0: ClusterSync Migration, Vector Search, and PVC Snapshot Backups</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>How to Migrate from MySQL Galera Cluster to Percona XtraDB Cluster</title>
        <link>https://www.percona.com/blog/migrate-mysql-galera-cluster-to-percona-xtradb-cluster/</link>
        <pubDate>Wed, 22 Jul 2026 09:56:28 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>On December 1, 2025, MariaDB announced that MySQL Galera Cluster will reach end of life on September 30, 2026. After that date, the MySQL build of Galera stops receiving maintenance and binary releases, and all new clustering features land only in MariaDB Galera Cluster. MariaDB’s recommended path is an in-place migration onto their own server. … Continued<br />
The post How to Migrate from MySQL Galera Cluster to Percona XtraDB Cluster appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/migrate-mysql-galera-cluster-to-percona-xtradb-cluster/">How to Migrate from MySQL Galera Cluster to Percona XtraDB Cluster</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>On December 1, 2025, <a href="https://mariadb.com/resources/blog/upgrade-now-announcing-mysql-galera-cluster-in-place-migration-to-mariadb-galera-cluster/" target="_blank" rel="noopener">MariaDB announced</a> that MySQL Galera Cluster will reach end of life on September 30, 2026. After that date, the MySQL build of Galera stops receiving maintenance and binary releases, and all new clustering features land only in MariaDB Galera Cluster. MariaDB&#8217;s recommended path is an in-place migration onto their own server.</p>
<p>If you run MySQL Galera Cluster today, that gives you a real decision to make, and not much time to make it. The good news is that you have more than one option, and the one most teams overlook keeps you on MySQL.</p>
<h2>You have two paths, not one</h2>
<p>The deadline forces a move, but it does not force you onto MariaDB. There are two realistic destinations, and the difference between them is larger than it first appears, because one is a database engine change and the other is not.</p>
<div>
<table style="width: 100%;border-collapse: collapse;font-size: 15px;line-height: 1.5;margin: 1em 0">
<thead>
<tr>
<th style="padding: 10px 14px;text-align: left;background: #6c3fd6;color: #ffffff;border: 1px solid #5a33b8"></th>
<th style="padding: 10px 14px;text-align: left;background: #6c3fd6;color: #ffffff;border: 1px solid #5a33b8;font-weight: 600">MariaDB Galera Cluster</th>
<th style="padding: 10px 14px;text-align: left;background: #6c3fd6;color: #ffffff;border: 1px solid #5a33b8;font-weight: 600">Percona XtraDB Cluster (PXC)</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 10px 14px;vertical-align: top;background: #f0eef7;border: 1px solid #e4e4ea;font-weight: 600">Server</td>
<td style="padding: 10px 14px;vertical-align: top;background: #ffffff;border: 1px solid #e4e4ea">MariaDB, a hard fork of MySQL</td>
<td style="padding: 10px 14px;vertical-align: top;background: #f4f1fd;border: 1px solid #e4e4ea">Percona Server for MySQL, a drop-in compatible build of MySQL</td>
</tr>
<tr>
<td style="padding: 10px 14px;vertical-align: top;background: #f0eef7;border: 1px solid #e4e4ea;font-weight: 600">Nature of the move</td>
<td style="padding: 10px 14px;vertical-align: top;background: #ffffff;border: 1px solid #e4e4ea">Switch to a different database</td>
<td style="padding: 10px 14px;vertical-align: top;background: #f4f1fd;border: 1px solid #e4e4ea">Server and distribution change within MySQL ecosystem</td>
</tr>
<tr>
<td style="padding: 10px 14px;vertical-align: top;background: #f0eef7;border: 1px solid #e4e4ea;font-weight: 600">Relationship to MySQL</td>
<td style="padding: 10px 14px;vertical-align: top;background: #ffffff;border: 1px solid #e4e4ea">A separate database with its own behavior and dialect</td>
<td style="padding: 10px 14px;vertical-align: top;background: #f4f1fd;border: 1px solid #e4e4ea">The same MySQL you already run, kept compatible</td>
</tr>
<tr>
<td style="padding: 10px 14px;vertical-align: top;background: #f0eef7;border: 1px solid #e4e4ea;font-weight: 600">What changes when you migrate</td>
<td style="padding: 10px 14px;vertical-align: top;background: #ffffff;border: 1px solid #e4e4ea">New system tables, a different data dictionary, user accounts recreated by hand</td>
<td style="padding: 10px 14px;vertical-align: top;background: #f4f1fd;border: 1px solid #e4e4ea">Stays within the MySQL family; schema and accounts carry over</td>
</tr>
<tr>
<td style="padding: 10px 14px;vertical-align: top;background: #f0eef7;border: 1px solid #e4e4ea;font-weight: 600">Clustering</td>
<td style="padding: 10px 14px;vertical-align: top;background: #ffffff;border: 1px solid #e4e4ea">MariaDB Galera Cluster</td>
<td style="padding: 10px 14px;vertical-align: top;background: #f4f1fd;border: 1px solid #e4e4ea">Galera write-set replication on Percona&#8217;s own open fork</td>
</tr>
<tr>
<td style="padding: 10px 14px;vertical-align: top;background: #f0eef7;border: 1px solid #e4e4ea;font-weight: 600">Ecosystem tooling</td>
<td style="padding: 10px 14px;vertical-align: top;background: #ffffff;border: 1px solid #e4e4ea">MariaDB&#8217;s own backup and monitoring stack</td>
<td style="padding: 10px 14px;vertical-align: top;background: #f4f1fd;border: 1px solid #e4e4ea">Percona XtraBackup, Percona Monitoring and Management, Percona Toolkit</td>
</tr>
<tr>
<td style="padding: 10px 14px;vertical-align: top;background: #f0eef7;border: 1px solid #e4e4ea;font-weight: 600">Kubernetes</td>
<td style="padding: 10px 14px;vertical-align: top;background: #ffffff;border: 1px solid #e4e4ea">MariaDB&#8217;s Kubernetes operator</td>
<td style="padding: 10px 14px;vertical-align: top;background: #f4f1fd;border: 1px solid #e4e4ea">Percona Operator for MySQL</td>
</tr>
<tr>
<td style="padding: 10px 14px;vertical-align: top;background: #f0eef7;border: 1px solid #e4e4ea;font-weight: 600">Support</td>
<td style="padding: 10px 14px;vertical-align: top;background: #ffffff;border: 1px solid #e4e4ea">MariaDB</td>
<td style="padding: 10px 14px;vertical-align: top;background: #f4f1fd;border: 1px solid #e4e4ea">Percona long-term support, no lock-in</td>
</tr>
</tbody>
</table>
</div>
<p>The pattern holds across every row. MariaDB Galera Cluster moves you to a different database and asks you to rebuild around it, while PXC keeps the database you already have and changes what sits underneath it. That is what makes the move below a distribution change rather than a re-platforming.</p>
<h2>&#8220;In-place&#8221; is still a database migration</h2>
<p>MariaDB describes its path as near-zero downtime and in place. That is fair for the cluster mechanics, but it understates what is changing underneath. By MariaDB&#8217;s own migration documentation, moving to MariaDB Galera Cluster means a different system table structure, a fundamentally different data dictionary, and user accounts and privileges that are not mapped one-to-one and must be recreated by hand.</p>
<p>In other words, you are not upgrading MySQL Galera Cluster. You are moving to a different database that also happens to use Galera. For many teams that is a larger project than the &#8220;in-place&#8221; label suggests, with application testing, account re-creation, and a new server to operate and support afterward.</p>
<h2>Why PXC is the natural landing spot</h2>
<p>PXC treats this as continuity rather than conversion. It is MySQL, not a fork of it.</p>
<ul>
<li>It is built on Percona Server for MySQL, a drop-in compatible build of MySQL, so your schema, system tables, and user accounts carry over as they are.</li>
<li>Its clustering uses the same Galera write-set replication model you already run, on Percona&#8217;s own open Galera fork, which we maintain and ship on our own schedule and on terms we control.</li>
<li>It keeps strong binary compatibility with MySQL and Percona Server for MySQL, and integrates with Percona XtraBackup, Percona Monitoring and Management, and both Kubernetes and traditional deployments.</li>
</ul>
<p>For a MySQL Galera Cluster user, that means the move is a server and distribution change inside the MySQL family, not a migration to a new database.</p>
<p>For a fuller version of this argument, see Marco Tusa&#8217;s personal take: <a href="https://www.tusacentral.net/joomla/index.php/mysql-blogs/268-the-galera-crossroads-why-pxc-is-the-lifeline-for-mariadb-community-users" target="_blank" rel="noopener">The Galera Crossroads: Why PXC is the Lifeline for MariaDB Community Users</a>.</p>
<h2>Why PXC, not just the easier migration</h2>
<p>Staying on MySQL is the practical argument. There is also a case for choosing PXC on the merits, independent of how much migration effort each path takes.</p>
<ul>
<li><strong>It is genuinely MySQL, not a relative of it.</strong> PXC is Percona Server for MySQL, a drop-in compatible build of MySQL. MariaDB began as a MySQL fork but has diverged over the years and is no longer a drop-in replacement for MySQL. With PXC, your MySQL knowledge, queries, tooling, and application compatibility carry forward. With MariaDB, some of that has to be revisited.</li>
<li><strong>Open source, with nothing held back.</strong> Percona ships its software, including PXC and our Galera fork, as open source, with no enterprise-only tier gating the features you depend on. MariaDB operates as a commercial vendor, with proprietary and enterprise components alongside the community server. If freedom from lock-in is part of why you run open source databases, that difference matters.</li>
<li><strong>A steward with no competing database to sell you.</strong> This one is worth stating plainly. The company retiring the MySQL build of Galera is the same company recommending you move onto its own database. MariaDB owns Codership, the maintainer of Galera, and has set the end-of-life date while pointing those users to MariaDB Galera Cluster. Percona does not sell a competing database. Our interest is in keeping you successful on MySQL, which is the same interest you have.</li>
<li><strong>A long track record in the MySQL ecosystem.</strong> Percona has maintained MySQL-focused software for years, including Percona Server for MySQL, Percona XtraBackup, Percona Monitoring and Management, and Percona XtraDB Cluster, all under long-term support. Supporting MySQL users is not a new direction for us.</li>
</ul>
<p>Taken together, the question is not only which migration is easier. It is which project is built around keeping MySQL open, compatible, and independent, and which one benefits from MySQL Galera coming to an end.</p>
<h2>What the migration looks like</h2>
<p>Because PXC stays within the MySQL ecosystem, the migration is a distribution change rather than a re-platforming exercise, so the work is mostly planning, testing, and a controlled cutover.</p>
<p><strong>Before you start.</strong> Inventory your current cluster: the exact MySQL and Galera versions, node topology, wsrep settings, and any custom configuration. Confirm the PXC version that lines up with your MySQL version, so you are moving across a compatible boundary rather than changing major versions at the same time. Stand up a staging cluster that mirrors production, and capture a baseline backup with Percona XtraBackup before you touch anything.</p>
<p>The right approach depends mainly on how much downtime you can tolerate, ranging from a straightforward binary swap during a maintenance window to a near-online cutover for systems that must stay available. The full, step-by-step guide lives on <a href="http://docs.percona.com" target="_blank" rel="noopener">docs.percona.com</a>, where we keep it current as the tooling improves, and we will link it here once it is published.</p>
<p>Whichever path you take, the same disciplines apply: rehearse the whole thing on staging first, validate application behavior and query performance against PXC before production, and keep a tested rollback (a verified backup or an untouched source cluster) until you are confident. Plan any cutover for a low-traffic window and watch cluster and replication health closely for the first hours afterward.</p>
<h2>Start before the deadline</h2>
<p>September 30, 2026 is when maintenance and binary releases stop for MySQL Galera Cluster. Running an unmaintained cluster past that point means no security patches and no bug fixes, which is not where you want a mission-critical system to sit. The time it takes to test and validate a move now is worth far more than the risk of waiting.</p>
<p>If you are weighing your options, the short version is this: you do not have to leave MySQL to keep a supported, open source Galera cluster. PXC is here, it is maintained, and it is the closest thing to staying exactly where you are.</p>
<h2>Talk to us</h2>
<p>If you want help mapping out a migration path, sizing the work, or pressure-testing your high availability strategy, reach out to your Percona contact, post in the <a href="https://forums.percona.com" target="_blank" rel="noopener">Percona community forums</a>, or connect with our team directly. We are happy to walk through it with you.</p>
<p>&nbsp;</p>
<hr />
<p><em>Written by Dennis Kittrell. Reviewed by Michal Nosek and Marco Tusa.</em></p>
<p><em>MySQL, MariaDB, and Galera Cluster are trademarks of their respective owners. Percona is not affiliated with, sponsored by, or endorsed by these owners.</em></p>
<p>The post <a href="https://www.percona.com/blog/migrate-mysql-galera-cluster-to-percona-xtradb-cluster/">How to Migrate from MySQL Galera Cluster to Percona XtraDB Cluster</a> appeared first on <a href="https://www.percona.com">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/migrate-mysql-galera-cluster-to-percona-xtradb-cluster/">How to Migrate from MySQL Galera Cluster to Percona XtraDB Cluster</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Deploying the MariaDB Privacy-First Stack Anywhere with Terraform</title>
        <link>https://mariadb.org/deploying-the-mariadb-privacy-first-stack-anywhere-with-terraform/</link>
        <pubDate>Wed, 22 Jul 2026 09:07:49 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>In my previous post, I introduced the MariaDB Privacy-First Stack.<br />
Nextcloud for collaboration, Passbolt for passwords and secrets, and MariaDB Server for the data. …<br />
Continue reading "Deploying the MariaDB Privacy-First Stack Anywhere with Terraform"<br />
The post Deploying the MariaDB Privacy-First Stack Anywhere with Terraform appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/deploying-the-mariadb-privacy-first-stack-anywhere-with-terraform/">Deploying the MariaDB Privacy-First Stack Anywhere with Terraform</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>In my previous post, I introduced the <a href="https://mariadb.org/mariadb-privacy-first-stack-nextcloud-passbolt-and-mariadb-server/">MariaDB Privacy-First Stack</a>.<br />
<a href="https://nextcloud.com">Nextcloud</a> for collaboration, <a href="https://www.passbolt.com/">Passbolt</a> for passwords and secrets, and MariaDB Server for the data. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/deploying-the-mariadb-privacy-first-stack-anywhere-with-terraform/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;Deploying the MariaDB Privacy-First Stack Anywhere with Terraform&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/deploying-the-mariadb-privacy-first-stack-anywhere-with-terraform/">Deploying the MariaDB Privacy-First Stack Anywhere with Terraform</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/deploying-the-mariadb-privacy-first-stack-anywhere-with-terraform/">Deploying the MariaDB Privacy-First Stack Anywhere with Terraform</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>From PostgreSQL 12 to MariaDB 11: A Gradual Fintech Migration with 23% Lower TCO</title>
        <link>https://mariadb.org/from-postgresql-12-to-mariadb-11-a-gradual-fintech-migration-with-23-lower-tco/</link>
        <pubDate>Tue, 21 Jul 2026 09:13:23 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Database migrations are rarely only about replacing one database server with another.<br />
In real production systems, especially in fintech, a migration is usually about reducing risk, keeping the application online, improving scalability, and giving teams more room to evolve the architecture without freezing product development. …<br />
Continue reading "From PostgreSQL 12 to MariaDB 11: A Gradual Fintech Migration with 23% Lower TCO"<br />
The post From PostgreSQL 12 to MariaDB 11: A Gradual Fintech Migration with 23% Lower TCO appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/from-postgresql-12-to-mariadb-11-a-gradual-fintech-migration-with-23-lower-tco/">From PostgreSQL 12 to MariaDB 11: A Gradual Fintech Migration with 23% Lower TCO</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Database migrations are rarely only about replacing one database server with another.<br />
In real production systems, especially in fintech, a migration is usually about reducing risk, keeping the application online, improving scalability, and giving teams more room to evolve the architecture without freezing product development. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/from-postgresql-12-to-mariadb-11-a-gradual-fintech-migration-with-23-lower-tco/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;From PostgreSQL 12 to MariaDB 11: A Gradual Fintech Migration with 23% Lower TCO&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/from-postgresql-12-to-mariadb-11-a-gradual-fintech-migration-with-23-lower-tco/">From PostgreSQL 12 to MariaDB 11: A Gradual Fintech Migration with 23% Lower TCO</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/from-postgresql-12-to-mariadb-11-a-gradual-fintech-migration-with-23-lower-tco/">From PostgreSQL 12 to MariaDB 11: A Gradual Fintech Migration with 23% Lower TCO</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB 13.1 Feature in Focus: Validate Your Configuration Before Starting the Server</title>
        <link>https://mariadb.org/mariadb-13-1-feature-in-focus-validate-your-configuration-before-starting-the-server/</link>
        <pubDate>Mon, 20 Jul 2026 10:54:10 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Have you ever modified a MariaDB configuration file, restarted the service, and immediately regretted it?<br />
You wanted to change:<br />
but accidentally wrote:<br />
One missing letter.<br />
That is enough to turn a perfectly healthy database server into a service that refuses to start. …<br />
Continue reading "MariaDB 13.1 Feature in Focus: Validate Your Configuration Before Starting the Server"<br />
The post MariaDB 13.1 Feature in Focus: Validate Your Configuration Before Starting the Server appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/mariadb-13-1-feature-in-focus-validate-your-configuration-before-starting-the-server/">MariaDB 13.1 Feature in Focus: Validate Your Configuration Before Starting the Server</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Have you ever modified a MariaDB configuration file, restarted the service, and immediately regretted it?<br />
You wanted to change:<br />
but accidentally wrote:<br />
One missing letter.<br />
That is enough to turn a perfectly healthy database server into a service that refuses to start. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/mariadb-13-1-feature-in-focus-validate-your-configuration-before-starting-the-server/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;MariaDB 13.1 Feature in Focus: Validate Your Configuration Before Starting the Server&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/mariadb-13-1-feature-in-focus-validate-your-configuration-before-starting-the-server/">MariaDB 13.1 Feature in Focus: Validate Your Configuration Before Starting the Server</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/mariadb-13-1-feature-in-focus-validate-your-configuration-before-starting-the-server/">MariaDB 13.1 Feature in Focus: Validate Your Configuration Before Starting the Server</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Using AI to modernize a Java project</title>
        <link>https://programmingbrain.com/2025/07/how-i-used-ai-coding-agents-to-modernize-a-java-library.html</link>
        <pubDate>Mon, 20 Jul 2026 08:05:00 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://programmingbrain.com/">Programming Brain</source>
        <description><![CDATA[<p>How I used AI coding agents to modernize a Java library.</p>
<p><a href="https://programmingbrain.com/2025/07/how-i-used-ai-coding-agents-to-modernize-a-java-library.html">Using AI to modernize a Java project</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>How I used AI coding agents to modernize a Java library.</p>
<p><a href="https://programmingbrain.com/2025/07/how-i-used-ai-coding-agents-to-modernize-a-java-library.html">Using AI to modernize a Java project</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>TDE performance in PostgreSQL</title>
        <link>https://percona.community/blog/2026/07/20/tde-performance-in-postgresql/</link>
        <pubDate>Mon, 20 Jul 2026 00:00:00 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>What’s the impact of TDE on performance? People usually quickly throw together a few graphs with basic measurements and treat that as a complete answer, but the question is a bit more complex than that. In this blog post, I’ll try to explain it in a bit more detail: why showcasing a single graph isn’t good for anything other than marketing.</p>
<p><a href="https://percona.community/blog/2026/07/20/tde-performance-in-postgresql/">TDE performance in PostgreSQL</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>What’s the impact of TDE on performance?<br />
People usually quickly throw together a few graphs with basic measurements and treat that as a complete answer, but the question is a bit more complex than that.<br />
In this blog post, I’ll try to explain it in a bit more detail: why showcasing a single graph isn’t good for anything other than marketing.</p>
<p><figure>
<img decoding="async" src="https://percona.community/blog/2026/07/pg_tde_superfast.png" alt="It’s SUPER FAST!" /></figure>
</p>
<h2 id="agenda">Agenda</h2>
<p>Let me start by making something clear: this is a complex topic, and this will be a long blog post.</p>
<p>I decided to simplify several things to the level where it is accurate enough, but still relatively easy to understand.<br />
I also won’t go into implementation details, the maths behind statistics, and I won’t focus on generic topics like how to do low-noise benchmarking.</p>
<p>I am already planning on writing separate blog posts about some of these details in the future, but if you are interested in some of them, don’t hesitate to ask!<br />
Feedback like that helps me figure out what topic to cover next.</p>
<p>As for this blog post, I want to cover the following topics:</p>
<ul>
<li>A generic introduction about the cost of encryption on modern CPUs</li>
<li>A short description of how transparent data-at-rest encryption typically integrates into PostgreSQL</li>
<li>An explanation of why relation encryption (encrypting the database objects) typically has no cost at all in most workloads, except a few specific operations</li>
<li>And finally showcasing how the typical way of implementing WAL encryption in TDE solutions can cause performance degradation in high WAL-churn scenarios</li>
</ul>
<h2 id="test-setup">Test setup</h2>
<p>Benchmarks heavily depend on the computer used for running them.<br />
All of my tests were performed on an AMD Threadripper 3970X (32 cores), using an Intel Optane P5800X SSD.</p>
<p>While some of the measurements can be reproduced on typical desktop hardware, not all of them can.<br />
Some tests require many parallel workers and high memory bandwidth.<br />
The more interesting tests all measure write performance, which is difficult on typical M.2 SSDs:<br />
while some of them have peak write performance similar to Optane disks, they can only keep up with high write speeds for short bursts, quickly turning an otherwise CPU or memory limited test into an IO limited one.</p>
<h2 id="encryption-is-cheap-in-isolation">Encryption is cheap… in isolation</h2>
<p>When talking about encryption performance, technical people usually make one of two assumptions:</p>
<ul>
<li>Encryption is complex math we have to compute, so of course it will degrade our performance!</li>
<li>We are using things like full filesystem encryption (BitLocker, LUKS), swap encryption or TLS all the time, it’s barely noticeable – encryption is cheap!</li>
</ul>
<p>And both groups are kind of right:<br />
Encryption is complex math, and it will degrade performance on older hardware.<br />
But because it is so common and required for everything, modern hardware has a specialized instruction set (AES-NI) that highly optimizes it for most workloads.</p>
<p>The following table shows some single threaded measurements on my test computer, produced with small C benchmarks:</p>
<table>
<thead>
<tr>
<th>What</th>
<th>Bandwidth (GB/s)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Memory read</td>
<td>23</td>
<td>How quickly can we read memory</td>
</tr>
<tr>
<td>Memory copy</td>
<td>11</td>
<td>How quickly can we copy data in memory from one place to another</td>
</tr>
<tr>
<td>Disk sequential read</td>
<td>7.4</td>
<td>How quickly can we read from disk</td>
</tr>
<tr>
<td>Disk sequential write</td>
<td>6.1</td>
<td>How quickly can we write to disk</td>
</tr>
<tr>
<td>AES-128-CTR</td>
<td>8.0</td>
<td>How quickly can we perform 128 bit AES CTR operations</td>
</tr>
<tr>
<td>AES-256-CTR</td>
<td>6.5</td>
<td>How quickly can we perform 256 bit AES CTR operations</td>
</tr>
<tr>
<td>AES-128-XTS</td>
<td>7.3</td>
<td>How quickly can we perform 128 bit AES XTS operations</td>
</tr>
<tr>
<td>AES-256-XTS</td>
<td>5.6</td>
<td>How quickly can we perform 256 bit AES XTS operations</td>
</tr>
<tr>
<td>AES-128-GCM</td>
<td>3.8</td>
<td>How quickly can we perform 128 bit AES GCM operations</td>
</tr>
<tr>
<td>AES-256-GCM</td>
<td>3.6</td>
<td>How quickly can we perform 256 bit AES GCM operations</td>
</tr>
</tbody>
</table>
<p>The three encryption modes mentioned above are commonly used in many scenarios:</p>
<ul>
<li>XTS is commonly used for full disk encryption, and also by some TDE implementations</li>
<li>CTR is commonly used by TDE implementations, especially for WAL encryption</li>
<li>GCM is an authenticated encryption algorithm which can provide both encryption and data integrity validation for TDE and other solutions</li>
</ul>
<p>While the table doesn’t mention it, I also want to point out that all reads and writes are sequential using a 4kB block size.<br />
This is important, because the performance of all of them degrades if we start using them differently: if we start encrypting much smaller blocks at a time, or keep reinitializing the stream with different parameters, the encryption numbers can degrade quickly.</p>
<p>We also have to remember that our goal isn’t to encrypt a random stream in memory – we have to integrate encryption into an existing database system with its own established architecture.<br />
The above numbers showcase our bandwidth to encrypt or decrypt data if a CPU core is only working on that task.<br />
In reality, the CPU will also be doing other things at the same time, and can’t spend all the time on encryption.</p>
<p>However, this won’t necessarily make things worse.<br />
Most database workloads are not CPU bound, the bottleneck is usually either disk or memory bandwidth.<br />
With AES-NI, encryption operations often don’t require additional memory bandwidth, which means that if a workload is already disk or memory limited, but we have free CPU cycles, we might get encryption for free or at little cost.</p>
<p>The real question isn’t how quick encryption is, but how optimally we can integrate it into PostgreSQL.</p>
<h2 id="what-are-we-encrypting-exactly">What are we encrypting exactly?</h2>
<p>That means we no longer have a single question.<br />
I can’t give a single answer to <em>how fast is pg_tde, or any other data-at-rest encryption implementation?</em></p>
<p>Because a database does many things, reads and writes many different file types, and each of those has to be implemented differently.</p>
<p>In the case of pg_tde, we have two main areas:</p>
<ul>
<li>the encryption of database (relation) files</li>
<li>and the encryption of the write ahead log</li>
</ul>
<p>Other TDE implementations might encrypt other files too, for example temporary files, but I want to focus on the two areas supported by pg_tde, as these are the most significant from a performance perspective.</p>
<p>So let’s look into the details of these separately.</p>
<h2 id="the-relation-files">The relation files</h2>
<p>The quick summary for those only interested in the numbers:<br />
the impact for this is very little – for most operations, in the very difficult to measure category.<br />
The only exception to this is a few single threaded write heavy workloads, such as <code>CREATE TABLE AS SELECT ...</code>, <code>VACUUM FULL</code>, an <code>UPDATE</code> that updates all or most rows, or an <code>ALTER TABLE</code> that rewrites the entire table. In these, we can measure a 5-30% performance drop.</p>
<p>For other operations, such as typical sysbench workloads, or even specific tests like single worker sequential reads, that number is 2% or less.<br />
Typical measurements usually have some noise, a few percent even for properly configured setups, and much more for <em>“let’s just quickly execute sysbench”</em>.<br />
Something in the 1-2% range can only be measured with specific server and hardware configuration, not in real-world setups.</p>
<p>The reason behind this is quite simple:<br />
Relation file reads and writes usually happen in entire blocks, with an 8k default size for PostgreSQL – it is very similar to OS level file system encryption.</p>
<p>A typical data-at-rest encryption implementation usually operates at the IO level: it encrypts immediately before we write a dirty buffer to disk, and it decrypts immediately after we read something from disk.</p>
<p>Decryption only happens when we actually have to read from disk. If the requested pages are already in the shared buffers, they are already decrypted, so there’s no effect there.<br />
Encryption only happens when we are writing to disk. In a workload that isn’t very write-heavy, all writes happen in the checkpointer and background writer, and backend processes never perform page writes directly, so encryption won’t affect the QPS numbers at all.<br />
Even if a workload is so write-heavy that the server has to move some of the writes to the backend process, most likely the backend isn’t CPU-bound, since most database workloads are either memory or IO limited.<br />
Unless we are writing a huge volume of data, such as the examples mentioned above, encryption won’t be noticeable at all in these scenarios.</p>
<p>This read-write behavior is similar to full file system encryption, where the OS caches behave similarly, unless we keep calling <code>fsync</code> explicitly for writes.</p>
<p>Because the effect of encryption is so little, we have to be really careful how we set up our test environment, even for the heavy write scenarios where we can notice a somewhat larger difference.<br />
It’s very easy to get this wrong, and then just measure noise.</p>
<p>For example, let’s say that we don’t want to spend too much time on initializing the dataset, and we only generate a 20GB dataset.<br />
We also set the shared buffers to 16GB because our test PC has more than enough RAM.<br />
This seems reasonable, but the problem is, once the data is loaded into the shared buffers, it will be permanently decrypted there, and 80% of our dataset fits into the buffers.<br />
Most read operations won’t have to go to the disk, they find the requested page in the buffers, so we are not measuring encryption performance for them.</p>
<p>We might decide to keep the small dataset, and just use a small number for shared buffers, but then we are moving away from a production-like setup: is it realistic to run PostgreSQL with 128MB shared buffers in a real environment?<br />
Can the reduced shared buffer size affect the performance in some other ways?</p>
<p>And then we have to think about similar questions for writes.</p>
<p>Regardless of what we do, as I mentioned above, this is basically the same use case as file system encryption, and we already know that that’s fast.<br />
If we are testing an encryption implementation, and we can see a significant performance degradation with only data file encryption, we found a bug, and should report it.</p>
<h3 id="why-is-ctas-so-slow">Why is CTAS so slow?</h3>
<p>At the beginning of the previous section, I mentioned a few examples where we <em>can</em> measure a difference.</p>
<p>In my tests, I see the following worst-case performance degradation with them:</p>
<table>
<thead>
<tr>
<th>Command</th>
<th>Encryption Overhead</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>CREATE TABLE AS SELECT</code></td>
<td>30%</td>
</tr>
<tr>
<td><code>ALTER TABLE</code> performing a full rewrite</td>
<td>15%</td>
</tr>
<tr>
<td><code>VACUUM FULL</code></td>
<td>10%</td>
</tr>
<tr>
<td><code>UPDATE</code> all rows</td>
<td>10%</td>
</tr>
</tbody>
</table>
<p>These are all <em>worst case</em> numbers I was able to produce. This doesn’t mean that all full table UPDATE operations will take 10% longer.</p>
<p>Also, in the case of <code>UPDATE</code>, the 10% measurement includes the time of the <code>CHECKPOINT</code>, as depending on the exact server configuration, some or most of the writes still happen in the checkpointer and background writer.<br />
The actual execution time of the query in the backend process was the same with and without encryption in all of my <code>UPDATE</code> measurements, unless I intentionally misconfigure the server.</p>
<p>A CTAS that simply copies a table is the worst performer because it doesn’t have to do anything else.<br />
The other operations all have to do something extra with the data, but if we just duplicate one database table, then we normally only perform IO:<br />
read a page, write the page, repeat.</p>
<p>Except in our case, we have to read a page, decrypt the page, encrypt the page, write the page.<br />
We have to call encryption operations twice for every page: with AES-128-CTR at 8 GB/s, decrypting and then encrypting each page halves the effective bandwidth to around 4 GB/s, well below the disk speeds in my test setup.<br />
A CTAS operation is normally IO limited, but because of this doubled encryption work, it becomes encryption limited with TDE, even with the AES-NI instruction set.</p>
<p>I also want to explicitly repeat an important note from the beginning:<br />
this result requires a sustained disk IO that is faster than the CPU’s encryption speed.<br />
Consumer grade SSDs can’t sustain such speeds for long workloads, only for short bursts.<br />
It is only possible to reproduce this measurement on them with small datasets.<br />
With larger tables, the test will be limited by disk IO, not encryption.</p>
<h2 id="the-write-ahead-log">The write ahead log</h2>
<p>This is where things get more interesting.<br />
In my <a href="https://percona.community/blog/2026/07/08/pg_tde-our-fork-is-temporary-our-commitment-to-open-tde-is-not/">previous tde related blog post</a>, I mentioned that we are working on some encryption benchmarking, and that was about WAL performance.<br />
Also, one of the main changes in the upcoming pg_tde 2.2.3 release will be a significant improvement in this area.</p>
<p>To start with a similar summary:</p>
<ul>
<li>in my most-performant benchmark prototype, I can’t measure a significant degradation even in a <strong>worst-case scenario workload</strong></li>
<li>with pg_tde before 2.2.3, the same test results in only 60% throughput, or a 40%+ performance degradation</li>
<li>with pg_tde 2.2.3, we were able to improve that test to the 80% range, reducing the performance degradation to 20%</li>
</ul>
<p>The 2.2.3 change (already merged, the release is upcoming) improves our current WAL encryption approach. The complete fix described later in this post is still in development.</p>
<p>This list also needs two important footnotes:</p>
<p>First, this is a “worst-case scenario”, not something typically executed in production workloads.<br />
It is a synthetic scenario exactly to stress test WAL bottlenecks.<br />
In a simple OLTP read-write scenario, there’s only a few percent measurable difference for all pg_tde versions, less than 10%.</p>
<p>Second, this is a concurrency issue, and reproducing it requires a high core count test PC.<br />
In my test setup, I have 32 cores available.<br />
On different hardware, the results will be different.<br />
With 100+ core monster hardware, and even more threads, the performance degradation is most likely even worse for most implementations of WAL encryption, but I didn’t perform tests on such setups.</p>
<h3 id="understanding-the-issue">Understanding the issue</h3>
<p>To understand why this is so different from data file encryption, we have to look into how WAL works:</p>
<ol>
<li>When we perform any WAL logged write, the changes are first written to WAL, that’s why it’s called a write <strong>ahead</strong> log.</li>
<li>Even more specifically, the backend process (the server’s handler for the specific client session) first constructs what it wants to write into the log</li>
<li>After that, in PostgreSQL we only have a single WAL log, and only one backend can flush it at a time.<br />
The backend process has to request a lock on the WAL, preventing other processes from interacting with it at the same time.</li>
<li>After writing the already constructed data to the in-memory buffer, we have to write it to disk and then immediately flush the buffer to disk, to make sure that it is durable, since this is the log we are using for crash recovery.</li>
<li>It can release that lock only after that write/flush was done.</li>
<li>After releasing the lock, another backend can take it, repeating the process from (3)</li>
</ol>
<pre class="mermaid">
sequenceDiagram
participant B1 as Backend 1
participant B2 as Backend 2
participant L as Single WAL lock
B1-&gt;&gt;B1: construct WAL record
B2-&gt;&gt;B2: construct WAL record
B1-&gt;&gt;L: acquire
Note over B1,L: encrypt + write + flush<br />(everyone else waits)
B2--xL: blocked
L--&gt;&gt;B1: release
B2-&gt;&gt;L: acquire
Note over B2,L: encrypt + write + flush
L--&gt;&gt;B2: release
</pre>
<p>The above information is a bit oversimplified, as WAL writes are more complex than this, but it is already enough to spot the concurrency issue hidden in it:<br />
only one process can write/flush the WAL at a time, so no matter how many cores we have, it won’t get faster.<br />
In fact it is the opposite, since higher core count CPUs usually have worse single-thread performance.</p>
<p>Most WAL encryption implementations, including pg_tde, implement it similarly to data file encryption:<br />
we encrypt the WAL data immediately before writing it to disk, at the time when the backend already acquired the WAL lock.<br />
Not only do we do additional computations for the current session, we also prevent other sessions from doing anything during this extra time.</p>
<p>In my test setup with the above numbers, WAL writes were already CPU bound without encryption.<br />
Even if encryption is relatively cheap, if we don’t have spare cycles, it will show up.<br />
That’s bad enough already with a good implementation, but if we also manage to introduce a performance-hurting bug in this area of the code, we can easily end up with quite bad numbers.</p>
<h3 id="is-this-completely-fixable">Is this completely fixable?</h3>
<p>As I hinted at the beginning of the WAL section, this issue is fixable.<br />
WAL encryption doesn’t inherently require encrypting more data than data file encryption does. In fact, if done correctly, most of the time we’ll have to encrypt even less.</p>
<p>The problem is that we have to do it in a more challenging part of the code.</p>
<p>From the above description, it might already be clear:<br />
we should encrypt the data after we constructed it, before taking the WAL lock!</p>
<p><strong>Current: encrypt inside the lock</strong></p>
<pre class="mermaid">
flowchart LR
A[construct record] --&gt; B[acquire lock]
subgraph lock [lock held, serialized]
direction LR
C[encrypt] --&gt; D[write + flush]
end
B --&gt; C
D --&gt; E[release lock]
</pre>
<p><strong>Fixed: encrypt before the lock</strong></p>
<pre class="mermaid">
flowchart LR
A[construct record] --&gt; C[encrypt]
C --&gt; B[acquire lock]
subgraph lock [lock held, serialized and shorter]
direction LR
D[write + flush]
end
B --&gt; D
D --&gt; E[release lock]
</pre>
<p>That solves both the concurrency limitation and another problem hidden there:<br />
imagine that we are writing many small records, one per transaction.<br />
A single WAL record might be less than 100 bytes, but a WAL page is 8kB.</p>
<p>Even if we do it at flush time, we don’t have to encrypt the entire page, only what we filled so far, but on average even that results in 4kB data per flush.<br />
With a 100-byte WAL record, we can fit around 80 records into a single WAL page.<br />
We have written 8kB of real data, and encrypted 320kB of WAL to do it.<br />
There are of course some possible optimizations there, for example we completely ignored group commit, which will likely make that 320kB number much smaller, but it still remains significantly more.</p>
<p>While moving the encryption before the lock might seem like an easier choice, it has different challenges.<br />
For example, there’s one I already mentioned in the beginning: if we start encrypting small blocks (and also changing the stream configuration, which is also related to this), we get worse encryption performance.</p>
<p>The naive implementation of this approach performs even worse than our earlier pg_tde implementation.<br />
However, if we apply some optimizations to it, it can reach similar “unmeasurable” levels as the data page encryption.</p>
<p>This improvement is not yet included in pg_tde, as it requires a completely different approach to WAL encryption compared to our previous implementations, and we haven’t yet finished testing and measuring it.<br />
Mainly, in this blog post I only focused on the performance of <em>writing</em> the WAL, but we have to remember that we also have to <em>read</em> it in some cases.<br />
While the speed of crash recovery isn’t that important in a happy scenario, when something bad happens it does matter how quickly we can get our server running again.</p>
<h3 id="whats-the-test-scenario">What’s the test scenario?</h3>
<p>Similarly to the write bottlenecks above, a normal OLTP read-write workload won’t showcase significant degradation because of WAL encryption.<br />
This is exactly why I wrote such a long post: the interesting behavior only shows up in scenarios a quick benchmark never exercises.</p>
<p>We could simply publish a nice graph showing the typical numbers, claiming that our encryption is fast.<br />
We could treat the performance problem we fixed as a small footnote in our changelog, as it doesn’t show up at all in that measurement.</p>
<p>But that wouldn’t be honest, because the test setup and test scenarios do matter, and when we talk about performance, we should mention worst-case numbers.</p>
<p>To reach these bad numbers, we have to do one thing:<br />
generate a huge amount of WAL across many sessions.<br />
This is doable in many different ways, ours is basically the following:</p>
<ol>
<li>create a few tables, each with a few million rows</li>
<li>start executing <code>UPDATE t SET c=c+1 WHERE id IN (SELECT id FROM t ORDER BY random() LIMIT 100);</code></li>
<li>run step 2 in many sessions</li>
</ol>
<p>The query above is a simplified illustration. The actual test used sequential IDs, with the 100 random IDs generated by the benchmark tool and inserted directly into a prepared statement, so selecting the rows stays cheap and the workload is dominated by the WAL writes.</p>
<p>PostgreSQL has an option called <a href="https://wiki.postgresql.org/wiki/Full_page_writes" target="_blank" rel="noopener noreferrer"><code>full_page_writes</code></a>, which is enabled by default.<br />
With it, when we modify any database page for the first time after a checkpoint, it doesn’t only WAL log the modified row, instead it logs the entire page, 8kB.<br />
In the above query, for every update, we modify 100 randomly selected rows in a table.<br />
Because they are randomly selected from millions of rows, they have a good chance of being on different pages.<br />
Let’s say that with a specific dataset, on average we hit a 10% new page rate – one update has to do 10 full page writes.<br />
That means every single UPDATE we execute generates more than 80kB of WAL.</p>
<p>This is again an oversimplification, but it is a good enough approximation without going into details too much.</p>
<p>With 15,000 QPS, that’s around 1.2 GB/s of WAL.<br />
From the table at the beginning, on my test PC AES-128-CTR has around 8 GB/s single core bandwidth.<br />
1.2 GB/s is 15% of that – and that assumes no context switching or other losses, meaning no matter how good the integration into the database is, if we do encryption at this volume while holding a global lock, we have to expect at least 15% performance drop with these numbers.<br />
In practice it’s a bit more than that.</p>
<h2 id="summary">Summary</h2>
<p>I hope this explanation was more useful than a single graph showcasing how good our performance with pg_tde is.<br />
The worst-case scenarios I described here are corner cases, most servers don’t generate sustained gigabytes per second of WAL, even in production.</p>
<p>But I still think this is important to mention, as it is an easily overlooked detail caused by the combination of PostgreSQL’s WAL architecture and the simple way most vendors add encryption to it.</p>
<p>I also didn’t go into detail on many parts of this post.<br />
If I tried to explain everything in absolute detail, this would be ten times longer, and much harder to follow and understand.<br />
I do plan to touch on some of these subjects in separate blog posts, where we can focus only on those topics in more depth.<br />
If you have questions or suggestions about the topic, don’t hesitate to reach out using our <a href="https://forums.percona.com/" target="_blank" rel="noopener noreferrer">community forums</a>!</p>
<p><a href="https://percona.community/blog/2026/07/20/tde-performance-in-postgresql/">TDE performance in PostgreSQL</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>ClickHouse Schema Design and Data Modeling</title>
        <link>https://severalnines.com/blog/clickhouse-schema-design-and-data-modeling/</link>
        <pubDate>Fri, 17 Jul 2026 12:48:53 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://severalnines.com/">Severalnines</source>
        <description><![CDATA[<p>Sometimes, we see ClickHouse queries that should normally complete in milliseconds take several seconds to finish or worse, time out entirely. When that happens, there is a good chance that the schema is the real culprit. The problem is often not the query itself, nor is it a hardware bottleneck. Instead, it can stem from […]<br />
The post ClickHouse Schema Design and Data Modeling appeared first on Severalnines.</p>
<p><a href="https://severalnines.com/blog/clickhouse-schema-design-and-data-modeling/">ClickHouse Schema Design and Data Modeling</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Sometimes, we see ClickHouse queries that should normally complete in milliseconds take several seconds to finish or worse, time out entirely. When that happens, there is a good chance that the schema is the real culprit. The problem is often not the query itself, nor is it a hardware bottleneck. Instead, it can stem from a schema design decision made months ago that nobody questioned at the time.</p>
<p>Schema design in ClickHouse is one of those tasks that appears to be a simple, one-time setup activity, but it often becomes a recurring operational concern. When the schema is designed poorly, problems tend to surface over time, including slow queries, oversized partitions, and mutation jobs that run for hours while production traffic continues to grow.&nbsp;</p>
<p>In this article, we will cover the core concepts of ClickHouse, systematically walk through design decisions, from core concepts and operational patterns to monitoring and evolution, with the goal of giving you a framework for making and maintaining schema decisions in production.</p>
<h2 class="wp-block-heading" id="h-core-concepts-for-clickhouse-schema-design">Core Concepts for ClickHouse Schema Design</h2>
<h3 class="wp-block-heading" id="h-distributed-tables-local-tables-shards-and-replicas">Distributed Tables, Local Tables, Shards, and Replicas</h3>
<p>Before writing a single CREATE TABLE, it helps to have a clear mental model of how ClickHouse actually stores and serves data across a cluster. ClickHouse divides data across shards with each shard holding a horizontal slice of the total dataset. Each shard can have one or more replicas for fault tolerance. The replicas within a shard hold identical data; the shards themselves hold different data.</p>
<p>The two table types you&#8217;ll work with constantly are:</p>
<ul class="wp-block-list">
<li>Local tables (<code>ReplicatedMergeTree</code> and its variants): the actual storage layer. Each node stores its own local table containing its shard&#8217;s data. Queries against a local table only see that node&#8217;s data.</li>
<li>Distributed tables (<code>Distributed</code> engine): a logical routing layer that sits on top of the local tables. When you query a distributed table, ClickHouse fans the query out to all shards, collects the results, and merges them. Distributed tables don&#8217;t store data themselves.</li>
</ul>
<p><strong>N.B. schema changes need to be applied to local tables on every node, and the distributed table definition needs to match. It sounds obvious, but it is a common source of confusion when onboarding teams who are used to a single-server database.</strong></p>
<p>Shard key selection matters for data distribution. A poorly chosen shard key (or <code>rand()</code> used as a lazy default) can lead to uneven data distribution, e.g. one shard holding 60% of the data while others hold 20% each — this creates hot spots and makes capacity planning unreliable. The shard key should distribute data evenly and, ideally, align with how you query, if most queries filter by <code>tenant_id</code>, sharding by <code>tenant_id</code> means queries for a single tenant hit one shard instead of all of them.</p>
<h3 class="wp-block-heading" id="h-partition-key-and-primary-key-sparse-index">Partition Key and Primary Key (Sparse Index)</h3>
<p>These two concepts trip up almost everyone coming from a relational background, because they sound like the same thing but serve entirely different purposes in ClickHouse. <strong>The partition key</strong> controls how data is physically divided into separate directories on disk. Each partition is stored and managed independently, which means:</p>
<ul class="wp-block-list">
<li>Queries that filter on the partition key can skip entire partitions without reading them (partition pruning)</li>
<li>Old data can be dropped by dropping a partition, instant, no heavy delete operation</li>
<li>Background merges only happen within a partition, not across them</li>
</ul>
<p>For time-series data, partitioning by month (<code>toYYYYMM(event_time)</code>) is the most common pattern. It gives you clean data lifecycle management (drop old months instantly) and good pruning behavior for time-bounded queries.</p>
<p><strong>The primary key</strong> in ClickHouse is not a uniqueness constraint, it&#8217;s a sparse index. ClickHouse stores one index entry per 8192 rows (one granule), not one per row. This makes it memory-efficient even at billions of rows, but it means the primary key is designed for range scans and filtering, not point lookups.</p>
<p>The <code>ORDER BY</code> clause defines the physical sort order of data on disk, and the primary key must be a prefix of <code>ORDER BY</code>. This is worth saying clearly: the sort order is what makes your queries fast or slow. If your most common query filters by <code>(tenant_id, event_type, event_time)</code>, your <code>ORDER BY</code> should reflect that. Data is stored sorted by those columns, so ClickHouse can skip irrelevant granules efficiently.</p>
<p>Here&#8217;s a concrete example that puts these together:</p>
<pre class="wp-block-code"><code>CREATE TABLE events_local
(
    tenant_id     UInt32,
    event_time    DateTime,
    event_type    LowCardinality(String),
    user_id       UInt64,
    session_id    UUID,
    properties    String,
    ingested_at   DateTime DEFAULT now()
)
ENGINE = ReplicatedMergeTree(
    '/clickhouse/tables/{shard}/events',
    '{replica}'
)
PARTITION BY toYYYYMM(event_time)
ORDER BY (tenant_id, event_type, event_time)
SETTINGS index_granularity = 8192;</code></pre>
<p>A few decisions that can be taken as below:</p>
<ul class="wp-block-list">
<li><code>LowCardinality(String)</code> for <code>event_type</code>, if this column has fewer than 10,000 distinct values, this encoding dramatically reduces storage and speeds up filtering.</li>
<li><code>PARTITION BY toYYYYMM(event_time)</code>, monthly partitions, suitable for a 12–18 month hot data retention window.</li>
<li><code>ORDER BY (tenant_id, event_type, event_time)</code>, optimized for queries that filter by tenant first, then by event type, then narrow by time range.</li>
<li>The ZooKeeper path uses <code>{shard}</code> and <code>{replica}</code> macros so the same DDL can be run on every node without modification.</li>
</ul>
<h3 class="wp-block-heading">Materialized Views and Aggregated Tables</h3>
<p>Materialized views in ClickHouse are not the same as in PostgreSQL. They are real-time incremental aggregations; every time data is inserted into the source table, the materialized view processes those rows and writes the aggregated result to a target table. There&#8217;s no scheduled refresh and it happens synchronously with the insert.</p>
<p>This makes them powerful for pre-computing aggregations that would otherwise require scanning billions of rows at query time. A common pattern is to maintain hourly or daily rollup tables alongside the raw events table.&nbsp;</p>
<p>For example, create the target table for aggregated counts and later create the <code>MATERIALIZED VIEW</code> with aggregation.</p>
<pre class="wp-block-code"><code>CREATE TABLE events_hourly_agg
(
    tenant_id    UInt32,
    event_type   LowCardinality(String),
    hour         DateTime,
    event_count  AggregateFunction(count, UInt64)
)
ENGINE = AggregatingMergeTree()
PARTITION BY toYYYYMM(hour)
ORDER BY (tenant_id, event_type, hour);



CREATE MATERIALIZED VIEW events_to_hourly
TO events_hourly_agg
AS
SELECT
    tenant_id,
    event_type,
    toStartOfHour(event_time) AS hour,
    countState() AS event_count
FROM events_local
GROUP BY tenant_id, event_type, hour;</code></pre>
<p>Operationally, materialized views add write amplification, every insert into the source table triggers a write to the view&#8217;s target table. For high-ingestion workloads, this is worth monitoring. They also need to be maintained when the source schema changes, which is often forgotten until something breaks.</p>
<h2 class="wp-block-heading">Operational Design Patterns</h2>
<h3 class="wp-block-heading">Time-Series and Event Analytics Schemas</h3>
<p>The vast majority of ClickHouse deployments are built around time-series or event data clickstreams, application logs, metrics, IoT sensor readings. This is where ClickHouse&#8217;s design shines, and there are well-established patterns to follow.</p>
<p>The core principle is time as the primary organizing dimension. Partition by time (monthly or weekly depending on data volume), and include <code>event_time</code> in the <code>ORDER BY</code> so range scans are efficient. Keep raw events immutable and resist the temptation to update them in place.</p>
<p>For retention management, the TTL clause handles automatic expiry without manual intervention:</p>
<pre class="wp-block-code"><code>TTL event_time + INTERVAL 90 DAY DELETE

TTL event_time + INTERVAL 30 DAY TO DISK 'cold_storage'</code></pre>
<p>The first script automatically deletes rows older than 90 days while the second scripts move cold data to a cheaper storage tier. This is operationally cleaner than scheduled delete jobs, which in ClickHouse would trigger heavy mutations.</p>
<h2 class="wp-block-heading">Bulk Ingestion vs. Real-Time Streaming</h2>
<p>How data arrives significantly affects schema and operational behavior. ClickHouse handles both, but they stress the system differently.</p>
<p>Bulk ingestion, i.e. large batch inserts; for example, nightly ETL from a data warehouse, is relatively forgiving. ClickHouse is designed for large INSERT batches, each batch creates one or a few data parts, and the background merge process handles compaction.&nbsp;</p>
<p>The risk is inserting too many small batches in rapid succession, which creates a flood of tiny parts that overwhelm the merge queue. The rule of thumb is: batch size matters more than frequency. Aim for inserts of at least 10,000 –100,000 rows per batch.</p>
<p>Real-time streaming via Kafka requires more care. The ClickHouse Kafka table engine or tools like Vector/Benthos handle ingestion, but the operational concern is the same: small, frequent inserts create merge pressure. Configure consumers to buffer and batch messages before inserting, and monitor <code>system.parts</code> for signs of part accumulation.</p>
<pre class="wp-block-code"><code>SELECT
    table,
    count() AS part_count,
    sum(rows) AS total_rows,
    formatReadableSize(sum(bytes_on_disk)) AS disk_size
FROM system.parts
WHERE active = 1
GROUP BY table
ORDER BY part_count DESC;</code></pre>
<p>A healthy table has tens to low hundreds of active parts. Thousands of parts is a warning sign that inserts are too small or merges are falling behind.</p>
<h3 class="wp-block-heading">Multi-Tenant Schema Isolation</h3>
<p>If your ClickHouse cluster serves multiple tenants, you need to decide early how to isolate their data. The main options are:</p>
<ul class="wp-block-list">
<li>Database-per-tenant: each tenant gets their own database (and potentially their own set of tables). Clean isolation, simple access control, but doesn&#8217;t scale past a few dozen tenants without becoming a management burden.</li>
<li>Table-per-tenant: all tenants share a database, each with their own table. Works at moderate scale but schema changes need to be applied to every tenant table, which is operationally painful at hundreds of tenants.</li>
<li>Shared table with <code>tenant_id</code> column: all tenant data in one table, filtered by <code>tenant_id</code>. This is the most operationally maintainable pattern at scale. The key requirement is that <code>tenant_id</code> must be the leading column in <code>ORDER BY</code> so that per-tenant queries efficiently skip irrelevant data without a full scan.</li>
</ul>
<pre class="wp-block-code"><code>ORDER BY (tenant_id, event_type, event_time)</code></pre>
<p>With this sort order, a query filtering on <code>tenant_id = 42</code> skips all granules that don&#8217;t contain that tenant&#8217;s data, making it effectively as fast as if the table contained only that tenant&#8217;s rows.</p>
<h2 class="wp-block-heading">Schema Evolution and Operational Impact</h2>
<h3 class="wp-block-heading">Adding Columns, Partitions, and Handling Mutations</h3>
<p>Schema changes in ClickHouse are generally safer than in OLTP databases, but they are not without operational cost. Adding a column is fast and non-blocking. ClickHouse uses lazy evaluation, the new column returns a default value for existing rows without rewriting data on disk. It is one of the rare DDL operations you can run in production without much anxiety:</p>
<pre class="wp-block-code"><code>ALTER TABLE events_local ON CLUSTER my_cluster
ADD COLUMN geo_country LowCardinality(String) DEFAULT '';</code></pre>
<p>Dropping a column triggers a background data rewrite (mutation) to remove that column from existing parts. This is heavier and can be slow on large tables. Mutations are expensive in ClickHouse. For example when you run the following command, ClickHouse does not update the row in place but finds all parts with the matching condition, creates new versions of those parts with the modification already applied, replaces old parts after processing and continues serving queries while mutations run in the background.</p>
<pre class="wp-block-code"><code>ALTER TABLE events_local
UPDATE status = 'processed'
WHERE id = 123; </code></pre>
<p>The guidance here is simple: avoid mutations in hot paths. For data corrections, prefer inserting corrected rows and using a <code>ReplacingMergeTree</code> or <code>CollapsingMergeTree</code> engine to handle deduplication, rather than updating rows in place.</p>
<p>If you must run a mutation, monitor its progress:</p>
<pre class="wp-block-code"><code>SELECT
    command,
    parts_to_do,
    is_done,
    latest_fail_reason
FROM system.mutations
WHERE table = 'events_local' AND is_done = 0;</code></pre>
<h2 class="wp-block-heading">Monitoring Schema-Related Issues</h2>
<h3 class="wp-block-heading">Identifying Slow Queries and Partition Problems</h3>
<p>The most useful table in ClickHouse for day-to-day schema health monitoring is <code>system.query_log</code>. Queries that are reading an unexpectedly high number of rows relative to what they return are usually a sign of poor partition pruning or an <code>ORDER BY</code> that doesn&#8217;t align with the filter. <strong>Skipping indexes</strong> (secondary indexes in ClickHouse) are often added with good intentions but not actually used. Check whether they&#8217;re being utilized by execute the following:</p>
<pre class="wp-block-code"><code>SELECT
    table,
    name,
    type,
    expr
FROM system.data_skipping_indices
WHERE database = 'mydb';</code></pre>
<p>Then cross-reference with <code>system.query_log</code> to see if queries against that table are actually benefiting, if <code>read_rows</code> remains high after adding an index, it may not be matching the query pattern.</p>
<h3 class="wp-block-heading">Capacity Planning for Growth</h3>
<p>Schema decisions have long-term storage implications that are not always obvious at design time. A few metrics are worth tracking regularly, such those included in this storage growth per table over time monitoring query below:</p>
<pre class="wp-block-code"><code>SELECT
    table,
    formatReadableSize(sum(bytes_on_disk)) AS total_size,
    sum(rows) AS total_rows,
    count() AS part_count,
    max(modification_time) AS last_modified
FROM system.parts
WHERE active = 1 AND database = 'mydb'
GROUP BY table
ORDER BY sum(bytes_on_disk) DESC;</code></pre>
<p>Track the table with total size, rows, partition count on a weekly basis and plot the trend. A table that grows 20% month-over-month with a 90 day TTL will eventually reach a stable size but a table with no TTL and unbounded growth will eventually cause disk pressure that affects the entire cluster.</p>
<p>Partition-level granularity is also useful for anticipating when TTL drops will occur and what storage they will free:</p>
<pre class="wp-block-code"><code>SELECT
    partition,
    formatReadableSize(sum(bytes_on_disk)) AS size,
    sum(rows) AS rows,
    count() AS parts
FROM system.parts
WHERE active = 1 AND table = 'events_local'
GROUP BY partition
ORDER BY partition DESC;</code></pre>
<p>The above query shows the size per partition for the ClickHouse table <code>events_local</code>. </p>
<h2 class="wp-block-heading">Integrating with Your Multi-Database Environment</h2>
<h3 class="wp-block-heading">Data Flow from OLTP to ClickHouse</h3>
<p>Most ClickHouse deployments exist downstream of an OLTP database. Orders come in through PostgreSQL, user events flow through MySQL, and ClickHouse ingests and aggregates that data for analytics. This pipeline introduces a class of schema problems that don&#8217;t exist in single-database setups.</p>
<p>The OLTP schema and the ClickHouse schema should not be the same schema. OLTP tables are normalized, they are designed to minimize write amplification and enforce referential integrity. ClickHouse schemas are deliberately denormalized, trading write efficiency for read efficiency. A join that&#8217;s trivial in PostgreSQL can be expensive in ClickHouse at scale, so the right pattern is to resolve joins at ingestion time, pushing denormalized, enriched records into ClickHouse rather than replicating normalized tables and joining at query time.</p>
<p>This means the ingestion pipeline, whether it&#8217;s Kafka, Debezium CDC, Airbyte, or a custom ETL, is also a transformation layer. Fields get renamed, types get cast, related records get joined and flattened, and low-cardinality string fields get encoded appropriately. Operationally, this pipeline is part of the schema: changes to it have the same impact as changes to the table definition.</p>
<h3 class="wp-block-heading">Managing Model Changes, Versioning, and Rollback</h3>
<p>When the upstream OLTP schema changes eg: a new column added to <code>orders</code>, a field renamed in <code>users</code>. The downstream ClickHouse schema and the ingestion pipeline both need to change in a coordinated way. Without a versioning discipline, these changes become brittle and difficult to roll back — a few practices that hold up well in production:</p>
<ul class="wp-block-list">
<li>Treat DDL as code: The schema changes should live in version-controlled migration files (tools like Flyway or a custom migration runner), not applied ad-hoc from a SQL client. Every <code>ALTER TABLE</code> that went to production should be traceable to a commit.</li>
<li>Add before you remove: When renaming a column or changing a type, add the new column first and allow both the old and new column to coexist during a transition window. Update the ingestion pipeline to write to both, then cut over queries to the new column, then drop the old one. This avoids a hard cutover that can&#8217;t be rolled back.</li>
<li>Schema rollback is hard therefore plan for it: Dropping a column or partition key change is not easily reversible. Before applying significant schema changes, take a backup of the affected table (or at minimum its most recent partition) so that recovery is possible without a full cluster restore.</li>
<li>Document the lineage: For each ClickHouse table, maintain a short document describing where the data comes from, what transformations are applied, and what downstream queries or dashboards depend on it. When a schema change is proposed, this lineage makes the blast radius obvious before anything is applied.</li>
</ul>
<h2 class="wp-block-heading">Conclusion</h2>
<p>ClickHouse schema design is not something that you set once, but is something you evolve over time. The implication is that choices you make when creating a table today do not just affect today&#8217;s queries but quietly shape how your system performs months down the line, from how efficiently queries run to how painful or painless future schema changes turn out to be.</p>
<p>Some points worth keeping in mind when designing the schema and data modeling: <strong>design</strong> your <code>ORDER BY</code> for readers, not writers; <strong>structure</strong> your sort key around how people query the data, not around the order it arrives in; <strong>partition</strong> by time and but avoid slicing things so finely that merge overhead becomes its own problem; <strong>Be deliberate</strong> with data types. <code>LowCardinality</code> and <code>AggregateFunction</code> are powerful tools, but only when applied with clear intent. Reaching for them out of habit rather than purpose tends to backfire. Your <strong>ingestion pipeline</strong> is part of your schema — how data flows in isn&#8217;t separate from how it&#8217;s stored, think of them as one connected system. </p>
<p>And remember, keep an eye on the correct metrics from the start. Schema issues seldom make themselves known in an obvious way. Identifying them through regular monitoring is much less expensive than dealing with the aftermath. The central idea here is that decisions regarding schemas have a cumulative effect. Positive choices subtly simplify all other aspects, while negative ones discreetly complicate them.</p>
<p>The post <a href="https://severalnines.com/blog/clickhouse-schema-design-and-data-modeling/">ClickHouse Schema Design and Data Modeling</a> appeared first on <a href="https://severalnines.com">Severalnines</a>.</p>
<p><a href="https://severalnines.com/blog/clickhouse-schema-design-and-data-modeling/">ClickHouse Schema Design and Data Modeling</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Perconians at WeAreDevelopers World Congress 2026: Agents Everywhere, Security Wake-Up Calls, and Buzzword Bingo</title>
        <link>https://percona.community/blog/2026/07/17/wearedevelopers-2026/</link>
        <pubDate>Fri, 17 Jul 2026 11:00:00 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>On July 9–10, the two of us - Sandra (Engineering, Percona for MongoDB) and Radek (Product, Percona for MongoDB) - packed our backpacks and headed to Berlin for the WeAreDevelopers World Congress Europe 2026 (WAD). The 11th edition of the congress gathered 15,000 developers and 500+ speakers for two intense days, and we came back with full notebooks, fresh ideas, and one very clear message from the industry.</p>
<p><a href="https://percona.community/blog/2026/07/17/wearedevelopers-2026/">Perconians at WeAreDevelopers World Congress 2026: Agents Everywhere, Security Wake-Up Calls, and Buzzword Bingo</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>On July 9–10, the two of us &#8211; <strong>Sandra</strong> (Engineering, Percona for MongoDB) and <strong>Radek</strong> (Product, Percona for MongoDB) &#8211; packed our backpacks and headed to Berlin for the <a href="https://www.wearedevelopers.com/world-congress" target="_blank" rel="noopener noreferrer">WeAreDevelopers World Congress Europe 2026</a> (WAD). The 11th edition of the congress gathered <strong>15,000 developers and 500+ speakers</strong> for two intense days, and we came back with full notebooks, fresh ideas, and one very clear message from the industry.</p>
</p>
<p>
At Percona, we genuinely love getting out of our daily routine to learn what’s new. It is incredibly refreshing to escape the daily grind of sprints and stand-ups just to listen and absorb. Hearing how other teams are tackling scale and complexity reminds us that we are all solving different flavors of the same core problems. These events act as a catalyst for innovation, sparking conversations that inevitably push our own boundaries. Ultimately, taking a couple of days to zoom out and see where the industry is heading helps us build what Sandra calls a <em>mental index</em> &#8211; concepts that might not solve today’s ticket, but will absolutely pay off six months from now.</p>
<p>While we took notes across a huge variety of topics, one common thread stood out above the rest. This post is our attempt to share that index with you, with links so you can dig deeper into whatever catches your eye.</p>
<p>Spoiler: if you played buzzword bingo with “agentic AI,” you’d have won in the first hour.</p>
<h2 id="the-one-big-theme-agentic-ai-surprise">The one big theme: Agentic AI (surprise!)</h2>
<p>Every conference right now has an AI theme, but WAD went deep: adoption stories, best practices, building and optimizing RAG pipelines, and &#8211; importantly &#8211; what happens to security when agents write and ship code.</p>
<p>Our personal top takeaways:</p>
<ul>
<li><strong>Security matters more than ever in the age of AI.</strong> More on that below &#8211; this one deserves its own section.</li>
<li><strong>Agents are only as good as their context.</strong> Intent, mission, purpose, style, goals, success metrics &#8211; the teams winning with AI are the ones writing this down for their agents.</li>
<li><strong>Understand <em>why</em> you do what you do.</strong> Agents won’t think about that for us. The engineering judgment moves up the stack; it doesn’t disappear.</li>
</ul>
<h2 id="the-sdlc-is-dead---the-agentic-assembly-line-keynote">“The SDLC is dead” &#8211; the Agentic Assembly Line keynote</h2>
<p>Thomas Dohmke (CEO of Entire, previously CEO of GitHub) opened with a demo-filled keynote about where developers and agents are headed. A few numbers that made the whole room sit up:</p>
<ul>
<li>Teams using coding agents ship <strong>5× more code</strong> (measured by PRs), and PRs are <strong>3× bigger</strong> than 18 months ago.</li>
<li><strong>20%+ of AI-generated changes are accepted without human review.</strong> (Brave? Terrifying? Discuss.)</li>
<li>Some products &#8211; Codex, notably &#8211; are now written <em>only</em> by AI.</li>
</ul>
<p>His conclusion: <strong>the Software Development Lifecycle as we know it is dead.</strong> The DevOps loop is evolving into what he called <a href="https://medium.com/@tentenco/what-is-ralph-loop-a-new-era-of-autonomous-coding-96a4bb3e2ac8" target="_blank" rel="noopener noreferrer">“The Ralph Loop”</a> &#8211; a much faster path from code to production, with developers acting as verifiers, because agents still fail often. The winning team, in his view, is the one whose agents understand the company’s mission, values, and purpose.</p>
<p>One practical problem he highlighted: when you code with agents, context fragments across chats, prompts, sessions, and branches. Tools like <a href="https://entire.io/" target="_blank" rel="noopener noreferrer">entire.io</a> now store the chat sessions behind each PR right in the GitHub repository &#8211; so the <em>intent</em> behind a change doesn’t evaporate. You may want to check this tool out! Let’s see how the GitHub, we know today, evolves over the next decade.</p>
<h2 id="retrieval-is-the-weakest-link-in-your-rag">Retrieval is the weakest link in your RAG</h2>
<p>One of our favorite technical talks, by Tomek Porozynski (deepsense.ai), tackled the “R” in RAG (Retrieval Augmented Generation). General embedding models are trained on public data &#8211; they know general language, <strong>not your business</strong>.</p>
<p>Basic retrieval falls short: keyword search misses semantic context, and vector search misses exact terms, multi-step logic, document-wide context, and internal jargon. There’s no single fix &#8211; you pick the right tool for the job.</p>
</p>
<p>For domain-specific knowledge, the fix is to fine-tune the embedding model on your own domain, so the vector space itself shifts to reflect your terminology and the real relationships between your terms.</p>
<p>The mechanics are surprisingly approachable: reshape the vector space through relative distances (pull matching pairs closer, push mismatched pairs apart), using either <strong>triplet loss</strong> or <strong>MultipleNegativesRankingLoss</strong> &#8211; and with the <a href="https://sbert.net/" target="_blank" rel="noopener noreferrer">Sentence Transformers</a> toolkit, the latter is literally one import away.</p>
<p>If you want to try it yourself, the speaker shared <a href="https://github.com/ontaptom/workshops/tree/main/notebooks" target="_blank" rel="noopener noreferrer">hands-on Colab notebooks</a>.</p>
<h2 id="the-security-wake-up-call-surviving-the-vulnpocalypse">The security wake-up call: surviving the “Vulnpocalypse”</h2>
<p>Adrian Mouat (Chainguard) delivered the talk that stuck with us the most. Advanced AI models can now autonomously discover and weaponize zero-day vulnerabilities at machine speed &#8211; effectively <strong>erasing the traditional patch window</strong>. Especially with the rise of <a href="https://www.anthropic.com/claude/mythos" target="_blank" rel="noopener noreferrer">Anthrophic Mythos</a> model, this might lead to Vulnpocalypse!</p>
<p>This is very serious for open source: attackers can point LLMs at public codebases, while underfunded maintainers face an overwhelming volume of newly discovered bugs. As people who live and breathe open source databases, this hits close to home.</p>
<p>The defenses he proposed:</p>
<ul>
<li><strong>Fight AI with AI</strong> &#8211; proactively scan your own infrastructure and find vulnerabilities before attackers do.</li>
<li><strong>Minimize your attack surface</strong> &#8211; fewer dependencies, and consider AI-written snippets over pulling in vulnerable third-party libraries.</li>
<li><strong>Strict hygiene</strong> &#8211; immediate patching and eliminating long-lived access tokens are non-negotiable.</li>
<li><strong>Industry coalitions</strong> &#8211; rapid-response groups like <a href="https://www.chainguard.dev/athena" target="_blank" rel="noopener noreferrer">Athena</a> share mitigations at machine speed, while “Akrites” safely funnels fixes back into upstream open source projects.</li>
</ul>
<p>At Percona, we’re already evaluating joining these coalitions &#8211; stay tuned!</p>
<p>Related: Isha Salania (Microsoft) showed how <strong>confidential computing</strong> extends encryption to data <em>in use</em> &#8211; your prompts, retrieved chunks, and keys living in encrypted memory. For anyone building sovereign RAG systems on top of databases, this end-to-end view of data protection is worth understanding &#8211; and it’s going to raise expectations for queryable encryption across the whole database ecosystem.</p>
<h2 id="mcp-doesnt-suck---your-agent-does">“MCP doesn’t suck &#8211; your agent does”</h2>
<p>Best talk title of the conference, courtesy of Jan Curn (Apify). The problem: most agents load <em>all</em> available tool schemas into the context window upfront, causing context rot, slow performance, and rapidly burning tokens. Their answer is <strong>mcpc</strong> &#8211; a lightweight CLI that enables <em>progressive tool discovery</em>: the agent fetches only the tool schemas it needs, on demand, and chains workflows through native code execution. Add OAuth 2.1 and sandboxed proxy connections, and you get a much saner MCP setup.</p>
<h2 id="more-gems-worth-your-time">More gems worth your time</h2>
<ul>
<li><strong>From SDLC to ADLC.</strong> Marcin Wawryszczuk (Andersen) argued that AI speeds up <em>coding</em> but not the <em>release cycle</em> &#8211; the industry needs an Agentic Delivery Lifecycle where agents help with requirements, architecture, docs, and pipelines, while engineers keep authority over architecture, governance, and validation.</li>
<li><strong>Don’t lock in your AI tooling too early.</strong> Angie Jones shared how Block bought access to many tools and let engineers run with them &#8211; what works for a web developer doesn’t work for a mobile or JVM developer, and that diversity of feedback is gold. Standardize when you see workflows succeeding repeatedly, not because a vendor made a good pitch.</li>
<li><strong>LLMs in the wild.</strong> GetYourGuide’s data scientist Giampaolo Casolla and MLOps engineer Steven Mi walked through keeping an AI-driven recommendation system alive in production. Real numbers, real trade-offs.</li>
<li><strong>Platform-as-a-Product.</strong> Dominik Schmidle (Giant Swarm) on why internal platforms fail: happy users won’t save your platform if the C-level sees it as pure cost. Know your user <em>and</em> your decision-maker &#8211; and do internal marketing.</li>
<li><strong>Werner Vogels (CTO, Amazon) fireside chat.</strong> Invisible work is important and worth sharing. Stay curious, never stop learning &#8211; and he recommended the book <a href="https://www.amazon.de/Ask-Your-Developer-Software-Developers/dp/0063018292" target="_blank" rel="noopener noreferrer"><em>Ask Your Developer</em></a> by Jeff Lawson.</li>
</ul>
<h2 id="the-expo-floor">The expo floor</h2>
<p>Between the talks, we’ve also hung out at the Percona booth &#8211; yes, we’ve been there the entire two days and chatting with 100+ visitors about what we love the most &#8211; databases!</p>
</p>
<p>We’ve also visited our neighbours at the expo hall and had great conversations with them, too &#8211; but there was one that stood out:</p>
<p><a href="https://www.qodo.ai/" target="_blank" rel="noopener noreferrer"><strong>Qodo</strong></a> (formerly CodiumAI): AI code review that indexes your entire repository, so reviews understand the architectural “why” behind a change &#8211; and it’s <a href="https://github.com/marketplace/qodo-merge-pro-for-open-source" target="_blank" rel="noopener noreferrer">free for open source projects</a>. We’re excited to try it on our own projects.</p>
<h2 id="parting-words">Parting words</h2>
<p>Two quotes from the WeAreDevelopers founders stayed with us. From CPO Thomas Pamminger:</p>
<blockquote>
<p>AI didn’t make me worse at my job &#8211; it made it easier to be worse without noticing. Charles Eames, asked what he’d delegate, said: <strong>never the understanding.</strong></p>
</blockquote>
<p>And from CEO Sead Ahmetović:</p>
<blockquote>
<p>Someone, somewhere, will depend on what you ship next. That’s not a burden &#8211; that’s the whole point, because your work matters. Let’s do it well.</p>
</blockquote>
<p>That’s a pretty good summary of why we go to these events: to keep understanding, not just shipping.</p>
<p>If any of the topics above sparked something &#8211; RAG fine-tuning, supply chain security, vector search in databases &#8211; chat with us on the <a href="https://forums.percona.com/" target="_blank" rel="noopener noreferrer">Percona Community Forum</a> or just drop a comment here. We’d love to hear what <em>you</em> took away from WAD if you were there.</p>
<p>See you at the next event!</p>
<p><a href="https://percona.community/blog/2026/07/17/wearedevelopers-2026/">Perconians at WeAreDevelopers World Congress 2026: Agents Everywhere, Security Wake-Up Calls, and Buzzword Bingo</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Introducing Mountaineers: A Way to Say Thank You</title>
        <link>https://percona.community/blog/2026/07/16/introducing-mountaineers/</link>
        <pubDate>Thu, 16 Jul 2026 11:00:00 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>You filed a bug report at 11pm because you’d already done the work to isolate it. You answered a forum question that had been sitting unanswered for three days. You wrote a PR. You spent an hour on a call telling us what’s broken about a tool you use every day. None of that is small, and none of it should go unnoticed.</p>
<p><a href="https://percona.community/blog/2026/07/16/introducing-mountaineers/">Introducing Mountaineers: A Way to Say Thank You</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>You filed a bug report at 11pm because you’d already done the work to isolate it. You answered a forum question that had been sitting unanswered for three days. You wrote a PR. You spent an hour on a call telling us what’s broken about a tool you use every day. None of that is small, and none of it should go unnoticed.</p>
<p>That’s what Mountaineers are. It’s how we recognize the time and energy you put into this community — and reward it.</p>
<h2 id="why-we-built-this">Why we built this</h2>
<p>Every contribution to this community costs you something: time, expertise, patience. Writing reproduction steps for a bug isn’t free. Neither is answering the same kind of question for the fifth newcomer this month, or sitting down with our engineering team to walk through how you actually use Percona Operators in production.</p>
<p>We see that. Mountaineers are our way of tracking it properly and giving something back — recognition, access, and yes, swag.</p>
<h2 id="what-counts">What counts</h2>
<p>This isn’t just about code. If you’ve assumed that contributing means opening a pull request or nothing, that’s not how this works. Points come from:</p>
<ul>
<li><strong>GitHub</strong> — issues, PRs, and merged contributions</li>
<li><strong>Forum</strong> — starting discussions, replying, and accepted solutions</li>
<li><strong>Content</strong> — blog posts, tutorials, and video appearances, including through our <a href="https://percona.community/blog/2026/05/22/write-for-percona-community/" target="_blank" rel="noopener noreferrer">Community Writers Program</a>, where you also get paid for published posts</li>
<li><strong>Direct feedback</strong> — 1:1 sessions with our engineering team and survey responses</li>
</ul>
<p>That last one matters more than people think. If you want to tell us what works, what doesn’t, and how you’re actually using our tools day to day, we want that conversation. Talk to engineering directly, or write it up for the blog. Either way, it counts.</p>
<h2 id="how-the-climb-works">How the climb works</h2>
<p>Everyone starts at Basecamp. From there, the more you contribute — and the more places you contribute — the higher you climb. Show up across GitHub, the forum, and content in the same month, and your points multiply. We’re not trying to make this complicated: more engagement, more recognition, faster.</p>
<p>Points convert into real rewards. Stickers and digital badges at the entry tier. T-shirts and water bottles as you climb. Hoodies and tech accessories further up. All those who begin the climb will receive a serialized Challenge Coin — the kind of thing you can’t buy, only earn.</p>
<p>The people who consistently show up across the board get invited to take part in Percona Live: roadmap sessions, early access, time with the people building the tools you use.</p>
<h2 id="you-dont-need-a-long-resume-to-start">You don’t need a long resume to start</h2>
<p>If you’ve filed one bug report with clear reproduction steps, answered one forum question, or have an opinion about a tool you use that you’ve never told us — you already have something to bring. We built Mountaineers to recognize the full range of ways people show up, not just the most visible ones.</p>
<p><strong><a href="https://forums.percona.com/signup" target="_blank" rel="noopener noreferrer">Sign up for Mountaineers</a></strong> and your GitHub and forum activity start counting from day one.</p>
<p>Want the full detail on points, rungs, and rewards? Read the <a href="https://percona.community/ascent/mountaineers/" target="_blank" rel="noopener noreferrer">Mountaineers program page</a>.</p>
<p><a href="https://percona.community/blog/2026/07/16/introducing-mountaineers/">Introducing Mountaineers: A Way to Say Thank You</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Multi-Cluster Replication, FIPS Mode, and More with MariaDB Enterprise Kubernetes Operator 26.06</title>
        <link>https://mariadb.com/resources/blog/multi-cluster-replication-fips-mode-and-more-with-mariadb-enterprise-kubernetes-operator-26-06/</link>
        <pubDate>Wed, 15 Jul 2026 17:13:46 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>What is the MariaDB Enterprise Kubernetes Operator? The MariaDB Enterprise Kubernetes Operator makes it easier to run and manage MariaDB […]</p>
<p><a href="https://mariadb.com/resources/blog/multi-cluster-replication-fips-mode-and-more-with-mariadb-enterprise-kubernetes-operator-26-06/">Multi-Cluster Replication, FIPS Mode, and More with MariaDB Enterprise Kubernetes Operator 26.06</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>The MariaDB Enterprise Kubernetes Operator makes it easier to run and manage MariaDB databases in Kubernetes. It automates day-to-day work such as deployment, scaling, backups, recovery, security configuration, and upgrades, reducing the manual effort of running MariaDB databases on Kubernetes. For more information, see the MariaDB Enterprise Kubernetes Operator page.</p>
<p><a href="https://mariadb.com/resources/blog/multi-cluster-replication-fips-mode-and-more-with-mariadb-enterprise-kubernetes-operator-26-06/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/multi-cluster-replication-fips-mode-and-more-with-mariadb-enterprise-kubernetes-operator-26-06/">Multi-Cluster Replication, FIPS Mode, and More with MariaDB Enterprise Kubernetes Operator 26.06</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Database Index Optimizer</title>
        <link>https://www.fromdual.com/blog/database_index_optimizer/</link>
        <pubDate>Wed, 15 Jul 2026 14:55:00 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.fromdual.com/aggregator/categories/9/">FromDual GmbH</source>
        <description><![CDATA[<p>Recently, a client asked me if the “time-consuming” task of checking indexes could be left to an index optimizer. Of course it can…<br />
What exactly do we want to check?</p>
<p>Tables without a Primary Key<br />
Duplicate indexes<br />
Partially redundant indexes<br />
Unused indexes</p>
<p>MariaDB, MySQL, and Percona Server<br />
Tables without a Primary Key<br />
SQL > SELECT DISTINCT t.table_schema, t.table_name<br />
 FROM information_schema.tables AS t<br />
 LEFT JOIN information_schema.columns AS c ON t.table_schema = c.table_schema AND t.table_name = c.table_name<br />
 AND c.column_key = "PRI"<br />
 WHERE t.table_schema NOT IN ('information_schema', 'mysql', 'performance_schema')<br />
 AND c.table_name IS NULL AND t.table_type NOT IN('VIEW', 'SEQUENCE')<br />
 AND t.table_schema = 'testtest'<br />
;<br />
+--------------+------------+<br />
&#124; table_schema &#124; table_name &#124;<br />
+--------------+------------+<br />
&#124; testtest &#124; archived &#124;<br />
+--------------+------------+<br />
1 row in set<br />
Source: Tables without a Primary Key<br />
Duplicate indexes<br />
SQL > SELECT table_name, redundant_index_name, redundant_index_columns, dominant_index_name, dominant_index_columns, sql_drop_index<br />
 FROM sys.schema_redundant_indexes<br />
 WHERE redundant_index_columns = dominant_index_columns<br />
 AND table_schema = 'testtest'<br />
;<br />
+------------+----------------------+-------------------------+---------------------+------------------------+------------------------------------------------------+<br />
&#124; table_name &#124; redundant_index_name &#124; redundant_index_columns &#124; dominant_index_name &#124; dominant_index_columns &#124; sql_drop_index &#124;<br />
+------------+----------------------+-------------------------+---------------------+------------------------+------------------------------------------------------+<br />
&#124; archived &#124; dupl2 &#124; category_id &#124; dupl1 &#124; category_id &#124; ALTER TABLE `testtest`.`archived` DROP INDEX `dupl2` &#124;<br />
+------------+----------------------+-------------------------+---------------------+------------------------+------------------------------------------------------+<br />
1 row in set<br />
Source: Duplicate and redundant indices<br />
Partially redundant indexes<br />
SQL > SELECT table_name, redundant_index_name, redundant_index_columns, dominant_index_name, dominant_index_columns, sql_drop_index<br />
 FROM sys.schema_redundant_indexes<br />
 WHERE table_schema = 'testtest'<br />
;<br />
+-------------------+----------------------+-------------------------+---------------------+---------------------------------+-------------------------------------------------------------------+<br />
&#124; table_name &#124; redundant_index_name &#124; redundant_index_columns &#124; dominant_index_name &#124; dominant_index_columns &#124; sql_drop_index &#124;<br />
+-------------------+----------------------+-------------------------+---------------------+---------------------------------+-------------------------------------------------------------------+<br />
&#124; access &#124; customer &#124; customer &#124; customer_2 &#124; customer,callerid_internal &#124; ALTER TABLE `testtest`.`access` DROP INDEX `customer` &#124;<br />
&#124; access &#124; customer &#124; customer &#124; customer_3 &#124; customer,callerid_external &#124; ALTER TABLE `testtest`.`access` DROP INDEX `customer` &#124;<br />
&#124; active_customers &#124; uniqueid &#124; uniqueid &#124; PRIMARY &#124; uniqueid,scustomer &#124; ALTER TABLE `testtest`.`active_customers` DROP INDEX `uniqueid` &#124;<br />
&#124; analytics_include &#124; analytics &#124; analytics &#124; PRIMARY &#124; analytics,feature,dtype,dnumber &#124; ALTER TABLE `testtest`.`analytics_include` DROP INDEX `analytics` &#124;<br />
&#124; archived &#124; dupl2 &#124; category_id &#124; dupl1 &#124; category_id &#124; ALTER TABLE `testtest`.`archived` DROP INDEX `dupl2` &#124;<br />
...<br />
&#124; texts_media &#124; uniqueid &#124; uniqueid &#124; PRIMARY &#124; uniqueid,filename &#124; ALTER TABLE `testtest`.`texts_media` DROP INDEX `uniqueid` &#124;<br />
&#124; unlimited_access &#124; customer &#124; customer &#124; customer_2 &#124; customer,callerid_internal &#124; ALTER TABLE `testtest`.`unlimited_access` DROP INDEX `customer` &#124;<br />
&#124; unlimited_access &#124; customer &#124; customer &#124; customer_3 &#124; customer,callerid_external &#124; ALTER TABLE `testtest`.`unlimited_access` DROP INDEX `customer` &#124;<br />
+-------------------+----------------------+-------------------------+---------------------+---------------------------------+-------------------------------------------------------------------+<br />
26 rows in set<br />
Source: Duplicate and redundant indices<br />
Unused indexes<br />
SQL > SELECT object_name, index_name<br />
 FROM sys.schema_unused_indexes<br />
 WHERE object_schema = 'testtest'<br />
;<br />
+------------------------+------------------------+<br />
&#124; object_name &#124; index_name &#124;<br />
+------------------------+------------------------+<br />
&#124; access &#124; customer_3 &#124;<br />
&#124; access &#124; customer_2 &#124;<br />
&#124; actions &#124; class &#124;<br />
&#124; actions &#124; action &#124;<br />
&#124; active &#124; channel &#124;<br />
...<br />
&#124; urls &#124; customer &#124;<br />
&#124; voucher_batches &#124; customer &#124;<br />
&#124; vouchers &#124; batch &#124;<br />
+------------------------+------------------------+<br />
413 rows in set<br />
Note:</p>
<p>For MariaDB, the PERFORMANCE_SCHEMA must be enabled first.<br />
The information is accurate as of the last database restart. If an index was last used BEFORE the most recent restart, it will be shown here as unused.</p>
<p>Source: Unused indexes<br />
And now with PostgreSQL<br />
Tables without a Primary Key<br />
SQL > SELECT tab.table_schema, tab.table_name<br />
 FROM information_schema.tables tab<br />
 LEFT JOIN information_schema.table_constraints tco<br />
 ON tab.table_schema = tco.table_schema<br />
 AND tab.table_name = tco.table_name<br />
 AND tco.constraint_type = 'PRIMARY KEY'<br />
 WHERE tab.table_type = 'BASE TABLE'<br />
 AND tab.table_schema NOT IN ('pg_catalog', 'information_schema')<br />
 AND tco.constraint_name IS NULL<br />
 ORDER BY table_schema, table_name<br />
;<br />
 table_schema &#124; table_name<br />
--------------+------------<br />
 public &#124; archived<br />
(1 row)<br />
Source: Find tables without primary keys (PKs) in PostgreSQL database<br />
Duplicate indexes<br />
Based on the MySQL sys schema:<br />
SQL > WITH schema_flattened_keys AS (<br />
 SELECT sai.relid, sai.indexrelid<br />
 , sai.schemaname AS table_schema, sai.relname AS table_name, sai.indexrelname AS index_name<br />
 , CASE pi.indisunique WHEN 'f' THEN 1 ELSE 0 END AS non_unique<br />
 , index_columns.columns AS index_columns<br />
 FROM pg_stat_all_indexes AS sai<br />
 JOIN pg_index AS pi ON pi.indexrelid = sai.indexrelid<br />
 JOIN (<br />
 SELECT attrelid, string_agg(attname, ',' ORDER BY attnum ASC) AS columns<br />
 FROM pg_attribute GROUP BY attrelid<br />
 ) AS index_columns ON index_columns.attrelid = sai.indexrelid<br />
 WHERE sai.schemaname NOT IN ('pg_toast', 'pg_catalog')<br />
)<br />
SELECT redundant_keys.table_schema AS table_schema, redundant_keys.table_name AS table_name, redundant_keys.index_name AS redundant_index_name<br />
 , redundant_keys.index_columns AS redundant_index_columns, redundant_keys.non_unique AS redundant_index_non_unique<br />
 , dominant_keys.index_name AS dominant_index_name, dominant_keys.index_columns AS dominant_index_columns, dominant_keys.non_unique AS dominant_index_non_unique<br />
 , CONCAT('ALTER TABLE ', redundant_keys.table_schema, '.', redundant_keys.table_name, ' DROP INDEX ', redundant_keys.index_name, '') AS sql_drop_index<br />
 FROM schema_flattened_keys redundant_keys<br />
 JOIN schema_flattened_keys dominant_keys ON redundant_keys.table_schema = dominant_keys.table_schema AND redundant_keys.table_name = dominant_keys.table_name<br />
 WHERE (redundant_keys.index_name < > dominant_keys.index_name<br />
 AND ((redundant_keys.index_columns = dominant_keys.index_columns)<br />
 AND ((redundant_keys.non_unique > dominant_keys.non_unique) OR (redundant_keys.non_unique = dominant_keys.non_unique))<br />
 )<br />
 OR ((POSITION(CONCAT(redundant_keys.index_columns,',') IN dominant_keys.index_columns) = 1) AND (redundant_keys.non_unique = 1))<br />
 OR ((POSITION(CONCAT(dominant_keys.index_columns,',') IN redundant_keys.index_columns) = 1) AND (dominant_keys.non_unique = 0))<br />
 )<br />
 AND redundant_keys.index_columns = dominant_keys.index_columns<br />
;<br />
 table_schema &#124; table_name &#124; redundant_index_name &#124; redundant_index_columns &#124; redundant_index_non_unique &#124; dominant_index_name &#124; dominant_index_columns &#124; dominant_index_non_unique &#124; sql_drop_index<br />
--------------+------------+----------------------+-------------------------+----------------------------+---------------------+------------------------+---------------------------+----------------------------------------------<br />
 public &#124; archived &#124; dupl1 &#124; category_id &#124; 1 &#124; dupl2 &#124; category_id &#124; 1 &#124; ALTER TABLE public.archived DROP INDEX dupl1<br />
 public &#124; archived &#124; dupl2 &#124; category_id &#124; 1 &#124; dupl1 &#124; category_id &#124; 1 &#124; ALTER TABLE public.archived DROP INDEX dupl2<br />
(2 rows)<br />
Source: Duplicate and redundant indices<br />
Partially redundant indexes<br />
Based on the MySQL sys schema:<br />
SQL > WITH schema_flattened_keys AS (<br />
 SELECT sai.relid, sai.indexrelid<br />
 , sai.schemaname AS table_schema, sai.relname AS table_name, sai.indexrelname AS index_name<br />
 , CASE pi.indisunique WHEN 'f' THEN 1 ELSE 0 END AS non_unique<br />
 , index_columns.columns AS index_columns<br />
 FROM pg_stat_all_indexes AS sai<br />
 JOIN pg_index AS pi ON pi.indexrelid = sai.indexrelid<br />
 JOIN (<br />
 SELECT attrelid, string_agg(attname, ',' ORDER BY attnum ASC) AS columns<br />
 FROM pg_attribute GROUP BY attrelid<br />
 ) AS index_columns ON index_columns.attrelid = sai.indexrelid<br />
 WHERE sai.schemaname NOT IN ('pg_toast', 'pg_catalog')<br />
)<br />
SELECT redundant_keys.table_schema AS table_schema, redundant_keys.table_name AS table_name, redundant_keys.index_name AS redundant_index_name<br />
 , redundant_keys.index_columns AS redundant_index_columns, redundant_keys.non_unique AS redundant_index_non_unique<br />
 , dominant_keys.index_name AS dominant_index_name, dominant_keys.index_columns AS dominant_index_columns, dominant_keys.non_unique AS dominant_index_non_unique<br />
 , CONCAT('ALTER TABLE ', redundant_keys.table_schema, '.', redundant_keys.table_name, ' DROP INDEX ', redundant_keys.index_name, '') AS sql_drop_index<br />
 FROM schema_flattened_keys redundant_keys<br />
 JOIN schema_flattened_keys dominant_keys ON redundant_keys.table_schema = dominant_keys.table_schema AND redundant_keys.table_name = dominant_keys.table_name<br />
 WHERE (redundant_keys.index_name < > dominant_keys.index_name<br />
 AND ((redundant_keys.index_columns = dominant_keys.index_columns)<br />
 AND ((redundant_keys.non_unique > dominant_keys.non_unique) OR (redundant_keys.non_unique = dominant_keys.non_unique))<br />
 )<br />
 OR ((POSITION(CONCAT(redundant_keys.index_columns,',') IN dominant_keys.index_columns) = 1) AND (redundant_keys.non_unique = 1))<br />
 OR ((POSITION(CONCAT(dominant_keys.index_columns,',') IN redundant_keys.index_columns) = 1) AND (dominant_keys.non_unique = 0))<br />
 )<br />
;<br />
 table_schema &#124; table_name &#124; redundant_index_name &#124; redundant_index_columns &#124; redundant_index_non_unique &#124; dominant_index_name &#124; dominant_index_columns &#124; dominant_index_non_unique &#124; sql_drop_index<br />
--------------+-----------------------+------------------------------------------+-------------------------+----------------------------+-------------------------------------------------+-----------------------------------------+---------------------------+---------------------------------------------------------------------------------------------<br />
 public &#124; numbers &#124; numbers_customer_idx &#124; customer &#124; 1 &#124; numbers_customer_text_dtype_text_dnumber_idx &#124; customer,text_dtype,text_dnumber &#124; 1 &#124; ALTER TABLE public.numbers DROP INDEX numbers_customer_idx<br />
 public &#124; numbers &#124; numbers_customer_idx &#124; customer &#124; 1 &#124; numbers_customer_fax_dtype_fax_dnumber_idx &#124; customer,fax_dtype,fax_dnumber &#124; 1 &#124; ALTER TABLE public.numbers DROP INDEX numbers_customer_idx<br />
 public &#124; numbers &#124; numbers_customer_idx &#124; customer &#124; 1 &#124; numbers_pkey &#124; customer,stype,snumber &#124; 0 &#124; ALTER TABLE public.numbers DROP INDEX numbers_customer_idx<br />
 public &#124; numbers &#124; numbers_dtype_idx &#124; dtype &#124; 1 &#124; numbers_dtype_dnumber_idx &#124; dtype,dnumber &#124; 1 &#124; ALTER TABLE public.numbers DROP INDEX numbers_dtype_idx<br />
 public &#124; number_callers &#124; number_callers_dtype_idx &#124; dtype &#124; 1 &#124; number_callers_dtype_dnumber_idx &#124; dtype,dnumber &#124; 1 &#124; ALTER TABLE public.number_callers DROP INDEX number_callers_dtype_idx<br />
 public &#124; prefixes &#124; prefixes_customer_idx &#124; customer &#124; 1 &#124; prefixes_customer_dtype_dnumber_idx &#124; customer,dtype,dnumber &#124; 1 &#124; ALTER TABLE public.prefixes DROP INDEX prefixes_customer_idx<br />
 public &#124; number_times &#124; number_times_dtype_idx &#124; dtype &#124; 1 &#124; number_times_dtype_dnumber_idx &#124; dtype,dnumber &#124; 1 &#124; ALTER TABLE public.number_times DROP INDEX number_times_dtype_idx<br />
 public &#124; phones &#124; phones_customer_idx &#124; customer &#124; 1 &#124; phones_customer_callerid_location_idx &#124; customer,callerid_location &#124; 1 &#124; ALTER TABLE public.phones DROP INDEX phones_customer_idx<br />
 public &#124; phones &#124; phones_customer_idx &#124; customer &#124; 1 &#124; phones_customer_callerid_external_idx &#124; customer,callerid_external &#124; 1 &#124; ALTER TABLE public.phones DROP INDEX phones_customer_idx<br />
 public &#124; phones &#124; phones_customer_idx &#124; customer &#124; 1 &#124; phones_customer_callerid_internal_idx &#124; customer,callerid_internal &#124; 1 &#124; ALTER TABLE public.phones DROP INDEX phones_customer_idx<br />
 public &#124; phones_hardware &#124; phones_hardware_phone_idx &#124; phone &#124; 1 &#124; phones_hardware_phone_hardware_address_idx &#124; phone,hardware_address &#124; 0 &#124; ALTER TABLE public.phones_hardware DROP INDEX phones_hardware_phone_idx<br />
 public &#124; speeddials &#124; speeddials_stype_idx &#124; stype &#124; 1 &#124; speeddials_stype_snumber_idx &#124; stype,snumber &#124; 1 &#124; ALTER TABLE public.speeddials DROP INDEX speeddials_stype_idx<br />
 public &#124; speeddials &#124; speeddials_dtype_idx &#124; dtype &#124; 1 &#124; speeddials_dtype_dnumber_idx &#124; dtype,dnumber &#124; 1 &#124; ALTER TABLE public.speeddials DROP INDEX speeddials_dtype_idx<br />
 public &#124; mailbox_destinations &#124; mailbox_destinations_context_mailbox_idx &#124; context,mailbox &#124; 1 &#124; mailbox_destinations_pkey &#124; context,mailbox,dcustomer,dtype,dnumber &#124; 0 &#124; ALTER TABLE public.mailbox_destinations DROP INDEX mailbox_destinations_context_mailbox_idx<br />
 public &#124; outgroup_times &#124; outgroup_times_outgroup_idx &#124; outgroup &#124; 1 &#124; outgroup_times_outgroup_name_idx &#124; outgroup,name &#124; 0 &#124; ALTER TABLE public.outgroup_times DROP INDEX outgroup_times_outgroup_idx<br />
 public &#124; ingroup_times &#124; ingroup_times_ingroup_idx &#124; ingroup &#124; 1 &#124; ingroup_times_ingroup_name_idx &#124; ingroup,name &#124; 0 &#124; ALTER TABLE public.ingroup_times DROP INDEX ingroup_times_ingroup_idx<br />
 public &#124; active_customers &#124; active_customers_uniqueid_idx &#124; uniqueid &#124; 1 &#124; active_customers_pkey &#124; uniqueid,scustomer &#124; 0 &#124; ALTER TABLE public.active_customers DROP INDEX active_customers_uniqueid_idx<br />
 public &#124; access &#124; access_customer_idx &#124; customer &#124; 1 &#124; access_customer_callerid_external_idx &#124; customer,callerid_external &#124; 1 &#124; ALTER TABLE public.access DROP INDEX access_customer_idx<br />
 public &#124; access &#124; access_customer_idx &#124; customer &#124; 1 &#124; access_customer_callerid_internal_idx &#124; customer,callerid_internal &#124; 1 &#124; ALTER TABLE public.access DROP INDEX access_customer_idx<br />
 public &#124; unlimited_access &#124; unlimited_access_customer_idx &#124; customer &#124; 1 &#124; unlimited_access_customer_callerid_external_idx &#124; customer,callerid_external &#124; 1 &#124; ALTER TABLE public.unlimited_access DROP INDEX unlimited_access_customer_idx<br />
 public &#124; unlimited_access &#124; unlimited_access_customer_idx &#124; customer &#124; 1 &#124; unlimited_access_customer_callerid_internal_idx &#124; customer,callerid_internal &#124; 1 &#124; ALTER TABLE public.unlimited_access DROP INDEX unlimited_access_customer_idx<br />
 public &#124; texts &#124; texts_dcustomer_idx &#124; dcustomer &#124; 1 &#124; texts_dcustomer_dtype_dnumber_idx &#124; dcustomer,dtype,dnumber &#124; 1 &#124; ALTER TABLE public.texts DROP INDEX texts_dcustomer_idx<br />
 public &#124; texts_media &#124; texts_media_uniqueid_idx &#124; uniqueid &#124; 1 &#124; texts_media_pkey &#124; uniqueid,filename &#124; 0 &#124; ALTER TABLE public.texts_media DROP INDEX texts_media_uniqueid_idx<br />
 public &#124; number_calleridgroups &#124; number_calleridgroups_dtype_idx &#124; dtype &#124; 1 &#124; number_calleridgroups_dtype_dnumber_idx &#124; dtype,dnumber &#124; 1 &#124; ALTER TABLE public.number_calleridgroups DROP INDEX number_calleridgroups_dtype_idx<br />
 public &#124; analytics_include &#124; analytics_i &#124; analytics &#124; 1 &#124; analytics_include_pkey &#124; analytics,feature,dtype,dnumber &#124; 0 &#124; ALTER TABLE public.analytics_include DROP INDEX analytics_i<br />
 public &#124; archived &#124; dupl1 &#124; category_id &#124; 1 &#124; dupl2 &#124; category_id &#124; 1 &#124; ALTER TABLE public.archived DROP INDEX dupl1<br />
 public &#124; archived &#124; dupl2 &#124; category_id &#124; 1 &#124; dupl1 &#124; category_id &#124; 1 &#124; ALTER TABLE public.archived DROP INDEX dupl2<br />
(27 rows)<br />
Source: Duplicate and redundant indices<br />
Unused indexes<br />
SQL > SELECT relid::regclass AS table, indexrelid::regclass AS index<br />
 , pg_size_pretty(pg_relation_size(indexrelid::regclass)) AS index_size<br />
 , idx_tup_read, idx_tup_fetch, idx_scan<br />
 FROM pg_stat_user_indexes<br />
 JOIN pg_index USING (indexrelid)<br />
 WHERE idx_scan = 0<br />
 AND indisunique IS FALSE<br />
;<br />
 table &#124; index &#124; index_size &#124; idx_tup_read &#124; idx_tup_fetch &#124; idx_scan<br />
------------------------+-----------------------------------------------------------------+------------+--------------+---------------+----------<br />
 customers &#124; customers_prefix_idx &#124; 16 kB &#124; 0 &#124; 0 &#124; 0<br />
 customers &#124; customers_parent_idx &#124; 16 kB &#124; 0 &#124; 0 &#124; 0<br />
 customers &#124; customers_email_idx &#124; 16 kB &#124; 0 &#124; 0 &#124; 0<br />
 customers &#124; customers_affiliate_customer_idx &#124; 16 kB &#124; 0 &#124; 0 &#124; 0<br />
 customers &#124; customers_bill_ref_idx &#124; 16 kB &#124; 0 &#124; 0 &#124; 0<br />
...<br />
 analytics_include &#124; analytics_i &#124; 8192 bytes &#124; 0 &#124; 0 &#124; 0<br />
 archived &#124; dupl1 &#124; 8192 bytes &#124; 0 &#124; 0 &#124; 0<br />
 archived &#124; dupl2 &#124; 8192 bytes &#124; 0 &#124; 0 &#124; 0<br />
(413 rows)<br />
Sources:</p>
<p>Unused Indexes<br />
Postgresql: Monitor unused indexes</p>
<p>PG Assistant<br />
At the Swiss PGDay2026(s), Bertrand Hartwig presented his tool PG Assistant. In that context, I wanted to try it out right away…<br />
PG Assistant was able to find missing Primary Keys and duplicate indexes. It didn’t show me any partially redundant or unused indexes, but that might just be on my end…</p>
<p> PG Assistant: Dashboard / Dev advisor</p>
<p> PG Assistant: Global Advisor / Dev advisor</p>
<p> PG Assistant: Strictly duplicate unused index</p>
<p>Intallation of PG Assistant<br />
$ apt update<br />
$ apt install python3 python3.13-venv unzip pip<br />
$ wget https://github.com/beh74/pgassistant-community/archive/refs/heads/main.zip<br />
$ unzip main.zip<br />
$ cd pgassistant-community-main/<br />
$ python3 -m venv env<br />
$ source env/bin/activate<br />
$ pip3 install -r requirements.txt<br />
$ export FLASK_APP=run.py<br />
$ flask run --host=0.0.0.0 --port=80<br />
Then connect to the displayed URL using a web browser.<br />
A user must be created in the database first:<br />
SQL > CREATE ROLE pgassistant WITH LOGIN SUPERUSER PASSWORD 'secret';<br />
and the pg_hba.conf file must be adapted.<br />
Addendum<br />
You can find unused indexes using the PG Assistant as follows: Database Objects ➜ Indexes ➜ Status: Unused ➜ “NO INDEX ACTIVITY”</p>
<p> PG Assistant: Unused Indexes</p>
<p><a href="https://www.fromdual.com/blog/database_index_optimizer/">Database Index Optimizer</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Recently, a client asked me if the “time-consuming” task of checking indexes could be left to an index optimizer. Of course it can&hellip;</p>
<p>What exactly do we want to check?</p>
<ul>
<li>Tables without a Primary Key</li>
<li>Duplicate indexes</li>
<li>Partially redundant indexes</li>
<li>Unused indexes</li>
</ul>
<h2 id="mariadb-mysql-and-percona-server">MariaDB, MySQL, and Percona Server</h2>
<h3 id="tables-without-a-primary-key">Tables without a Primary Key</h3>
<pre><code>SQL&gt; SELECT DISTINCT t.table_schema, t.table_name
 FROM information_schema.tables AS t
 LEFT JOIN information_schema.columns AS c ON t.table_schema = c.table_schema AND t.table_name = c.table_name
 AND c.column_key = &#034;PRI&#034;
 WHERE t.table_schema NOT IN (&#039;information_schema&#039;, &#039;mysql&#039;, &#039;performance_schema&#039;)
 AND c.table_name IS NULL AND t.table_type NOT IN(&#039;VIEW&#039;, &#039;SEQUENCE&#039;)
 AND t.table_schema = &#039;testtest&#039;
;
+--------------+------------+
| table_schema | table_name |
+--------------+------------+
| testtest | archived |
+--------------+------------+
1 row in set
</code></pre>
<p>Source: <a href="https://www.fromdual.com/blog/mysql-performance-schema-hints/#tables-without-primary-key" target="_blank" rel="noopener">Tables without a Primary Key</a></p>
<h3 id="duplicate-indexes">Duplicate indexes</h3>
<pre><code>SQL&gt; SELECT table_name, redundant_index_name, redundant_index_columns, dominant_index_name, dominant_index_columns, sql_drop_index
 FROM sys.schema_redundant_indexes
 WHERE redundant_index_columns = dominant_index_columns
 AND table_schema = &#039;testtest&#039;
;
+------------+----------------------+-------------------------+---------------------+------------------------+------------------------------------------------------+
| table_name | redundant_index_name | redundant_index_columns | dominant_index_name | dominant_index_columns | sql_drop_index |
+------------+----------------------+-------------------------+---------------------+------------------------+------------------------------------------------------+
| archived | dupl2 | category_id | dupl1 | category_id | ALTER TABLE `testtest`.`archived` DROP INDEX `dupl2` |
+------------+----------------------+-------------------------+---------------------+------------------------+------------------------------------------------------+
1 row in set
</code></pre>
<p>Source: <a href="https://www.fromdual.com/blog/mysql-performance-schema-hints/#duplicate-and-redundant-indices" target="_blank" rel="noopener">Duplicate and redundant indices</a></p>
<h3 id="partially-redundant-indexes">Partially redundant indexes</h3>
<pre><code>SQL&gt; SELECT table_name, redundant_index_name, redundant_index_columns, dominant_index_name, dominant_index_columns, sql_drop_index
 FROM sys.schema_redundant_indexes
 WHERE table_schema = &#039;testtest&#039;
;
+-------------------+----------------------+-------------------------+---------------------+---------------------------------+-------------------------------------------------------------------+
| table_name | redundant_index_name | redundant_index_columns | dominant_index_name | dominant_index_columns | sql_drop_index |
+-------------------+----------------------+-------------------------+---------------------+---------------------------------+-------------------------------------------------------------------+
| access | customer | customer | customer_2 | customer,callerid_internal | ALTER TABLE `testtest`.`access` DROP INDEX `customer` |
| access | customer | customer | customer_3 | customer,callerid_external | ALTER TABLE `testtest`.`access` DROP INDEX `customer` |
| active_customers | uniqueid | uniqueid | PRIMARY | uniqueid,scustomer | ALTER TABLE `testtest`.`active_customers` DROP INDEX `uniqueid` |
| analytics_include | analytics | analytics | PRIMARY | analytics,feature,dtype,dnumber | ALTER TABLE `testtest`.`analytics_include` DROP INDEX `analytics` |
| archived | dupl2 | category_id | dupl1 | category_id | ALTER TABLE `testtest`.`archived` DROP INDEX `dupl2` |
...
| texts_media | uniqueid | uniqueid | PRIMARY | uniqueid,filename | ALTER TABLE `testtest`.`texts_media` DROP INDEX `uniqueid` |
| unlimited_access | customer | customer | customer_2 | customer,callerid_internal | ALTER TABLE `testtest`.`unlimited_access` DROP INDEX `customer` |
| unlimited_access | customer | customer | customer_3 | customer,callerid_external | ALTER TABLE `testtest`.`unlimited_access` DROP INDEX `customer` |
+-------------------+----------------------+-------------------------+---------------------+---------------------------------+-------------------------------------------------------------------+
26 rows in set
</code></pre>
<p>Source: <a href="https://www.fromdual.com/blog/mysql-performance-schema-hints/#duplicate-and-redundant-indices" target="_blank" rel="noopener">Duplicate and redundant indices</a></p>
<h3 id="unused-indexes">Unused indexes</h3>
<pre><code>SQL&gt; SELECT object_name, index_name
 FROM sys.schema_unused_indexes
 WHERE object_schema = &#039;testtest&#039;
;
+------------------------+------------------------+
| object_name | index_name |
+------------------------+------------------------+
| access | customer_3 |
| access | customer_2 |
| actions | class |
| actions | action |
| active | channel |
...
| urls | customer |
| voucher_batches | customer |
| vouchers | batch |
+------------------------+------------------------+
413 rows in set
</code></pre>
<p><strong>Note</strong>:</p>
<ul>
<li>For MariaDB, the <code>PERFORMANCE_SCHEMA</code> must be enabled first.</li>
<li>The information is accurate as of the last database restart. If an index was last used BEFORE the most recent restart, it will be shown here as unused.</li>
</ul>
<p>Source: <a href="https://www.fromdual.com/blog/mysql-performance-schema-hints/#unused-indexes" target="_blank" rel="noopener">Unused indexes</a></p>
<h2 id="and-now-with-postgresql">And now with PostgreSQL</h2>
<h3 id="tables-without-a-primary-key-1">Tables without a Primary Key</h3>
<pre><code>SQL&gt; SELECT tab.table_schema, tab.table_name
 FROM information_schema.tables tab
 LEFT JOIN information_schema.table_constraints tco
 ON tab.table_schema = tco.table_schema
 AND tab.table_name = tco.table_name 
 AND tco.constraint_type = &#039;PRIMARY KEY&#039;
 WHERE tab.table_type = &#039;BASE TABLE&#039;
 AND tab.table_schema NOT IN (&#039;pg_catalog&#039;, &#039;information_schema&#039;)
 AND tco.constraint_name IS NULL
 ORDER BY table_schema, table_name
;
 table_schema | table_name 
--------------+------------
 public | archived
(1 row)
</code></pre>
<p>Source: <a href="https://dataedo.com/kb/query/postgresql/find-tables-without-primary-keys" target="_blank" rel="noopener">Find tables without primary keys (PKs) in PostgreSQL database</a></p>
<h3 id="duplicate-indexes-1">Duplicate indexes</h3>
<p>Based on the MySQL <code>sys</code> schema:</p>
<pre><code>SQL&gt; WITH schema_flattened_keys AS (
 SELECT sai.relid, sai.indexrelid
 , sai.schemaname AS table_schema, sai.relname AS table_name, sai.indexrelname AS index_name
 , CASE pi.indisunique WHEN &#039;f&#039; THEN 1 ELSE 0 END AS non_unique
 , index_columns.columns AS index_columns
 FROM pg_stat_all_indexes AS sai
 JOIN pg_index AS pi ON pi.indexrelid = sai.indexrelid
 JOIN (
 SELECT attrelid, string_agg(attname, &#039;,&#039; ORDER BY attnum ASC) AS columns
 FROM pg_attribute GROUP BY attrelid
 ) AS index_columns ON index_columns.attrelid = sai.indexrelid
 WHERE sai.schemaname NOT IN (&#039;pg_toast&#039;, &#039;pg_catalog&#039;)
)
SELECT redundant_keys.table_schema AS table_schema, redundant_keys.table_name AS table_name, redundant_keys.index_name AS redundant_index_name
 , redundant_keys.index_columns AS redundant_index_columns, redundant_keys.non_unique AS redundant_index_non_unique
 , dominant_keys.index_name AS dominant_index_name, dominant_keys.index_columns AS dominant_index_columns, dominant_keys.non_unique AS dominant_index_non_unique
 , CONCAT(&#039;ALTER TABLE &#039;, redundant_keys.table_schema, &#039;.&#039;, redundant_keys.table_name, &#039; DROP INDEX &#039;, redundant_keys.index_name, &#039;&#039;) AS sql_drop_index
 FROM schema_flattened_keys redundant_keys
 JOIN schema_flattened_keys dominant_keys ON redundant_keys.table_schema = dominant_keys.table_schema AND redundant_keys.table_name = dominant_keys.table_name
 WHERE (redundant_keys.index_name &lt;&gt; dominant_keys.index_name
 AND ((redundant_keys.index_columns = dominant_keys.index_columns)
 AND ((redundant_keys.non_unique &gt; dominant_keys.non_unique) OR (redundant_keys.non_unique = dominant_keys.non_unique))
 )
 OR ((POSITION(CONCAT(redundant_keys.index_columns,&#039;,&#039;) IN dominant_keys.index_columns) = 1) AND (redundant_keys.non_unique = 1))
 OR ((POSITION(CONCAT(dominant_keys.index_columns,&#039;,&#039;) IN redundant_keys.index_columns) = 1) AND (dominant_keys.non_unique = 0))
 )
 AND redundant_keys.index_columns = dominant_keys.index_columns
;
 table_schema | table_name | redundant_index_name | redundant_index_columns | redundant_index_non_unique | dominant_index_name | dominant_index_columns | dominant_index_non_unique | sql_drop_index 
--------------+------------+----------------------+-------------------------+----------------------------+---------------------+------------------------+---------------------------+----------------------------------------------
 public | archived | dupl1 | category_id | 1 | dupl2 | category_id | 1 | ALTER TABLE public.archived DROP INDEX dupl1
 public | archived | dupl2 | category_id | 1 | dupl1 | category_id | 1 | ALTER TABLE public.archived DROP INDEX dupl2
(2 rows)
</code></pre>
<p>Source: <a href="https://www.fromdual.com/blog/mysql-performance-schema-hints/#duplicate-and-redundant-indices" target="_blank" rel="noopener">Duplicate and redundant indices</a></p>
<h3 id="partially-redundant-indexes-1">Partially redundant indexes</h3>
<p>Based on the MySQL <code>sys</code> schema:</p>
<pre><code>SQL&gt; WITH schema_flattened_keys AS (
 SELECT sai.relid, sai.indexrelid
 , sai.schemaname AS table_schema, sai.relname AS table_name, sai.indexrelname AS index_name
 , CASE pi.indisunique WHEN &#039;f&#039; THEN 1 ELSE 0 END AS non_unique
 , index_columns.columns AS index_columns
 FROM pg_stat_all_indexes AS sai
 JOIN pg_index AS pi ON pi.indexrelid = sai.indexrelid
 JOIN (
 SELECT attrelid, string_agg(attname, &#039;,&#039; ORDER BY attnum ASC) AS columns
 FROM pg_attribute GROUP BY attrelid
 ) AS index_columns ON index_columns.attrelid = sai.indexrelid
 WHERE sai.schemaname NOT IN (&#039;pg_toast&#039;, &#039;pg_catalog&#039;)
)
SELECT redundant_keys.table_schema AS table_schema, redundant_keys.table_name AS table_name, redundant_keys.index_name AS redundant_index_name
 , redundant_keys.index_columns AS redundant_index_columns, redundant_keys.non_unique AS redundant_index_non_unique
 , dominant_keys.index_name AS dominant_index_name, dominant_keys.index_columns AS dominant_index_columns, dominant_keys.non_unique AS dominant_index_non_unique
 , CONCAT(&#039;ALTER TABLE &#039;, redundant_keys.table_schema, &#039;.&#039;, redundant_keys.table_name, &#039; DROP INDEX &#039;, redundant_keys.index_name, &#039;&#039;) AS sql_drop_index
 FROM schema_flattened_keys redundant_keys
 JOIN schema_flattened_keys dominant_keys ON redundant_keys.table_schema = dominant_keys.table_schema AND redundant_keys.table_name = dominant_keys.table_name
 WHERE (redundant_keys.index_name &lt;&gt; dominant_keys.index_name
 AND ((redundant_keys.index_columns = dominant_keys.index_columns)
 AND ((redundant_keys.non_unique &gt; dominant_keys.non_unique) OR (redundant_keys.non_unique = dominant_keys.non_unique))
 )
 OR ((POSITION(CONCAT(redundant_keys.index_columns,&#039;,&#039;) IN dominant_keys.index_columns) = 1) AND (redundant_keys.non_unique = 1))
 OR ((POSITION(CONCAT(dominant_keys.index_columns,&#039;,&#039;) IN redundant_keys.index_columns) = 1) AND (dominant_keys.non_unique = 0))
 )
;
 table_schema | table_name | redundant_index_name | redundant_index_columns | redundant_index_non_unique | dominant_index_name | dominant_index_columns | dominant_index_non_unique | sql_drop_index 
--------------+-----------------------+------------------------------------------+-------------------------+----------------------------+-------------------------------------------------+-----------------------------------------+---------------------------+---------------------------------------------------------------------------------------------
 public | numbers | numbers_customer_idx | customer | 1 | numbers_customer_text_dtype_text_dnumber_idx | customer,text_dtype,text_dnumber | 1 | ALTER TABLE public.numbers DROP INDEX numbers_customer_idx
 public | numbers | numbers_customer_idx | customer | 1 | numbers_customer_fax_dtype_fax_dnumber_idx | customer,fax_dtype,fax_dnumber | 1 | ALTER TABLE public.numbers DROP INDEX numbers_customer_idx
 public | numbers | numbers_customer_idx | customer | 1 | numbers_pkey | customer,stype,snumber | 0 | ALTER TABLE public.numbers DROP INDEX numbers_customer_idx
 public | numbers | numbers_dtype_idx | dtype | 1 | numbers_dtype_dnumber_idx | dtype,dnumber | 1 | ALTER TABLE public.numbers DROP INDEX numbers_dtype_idx
 public | number_callers | number_callers_dtype_idx | dtype | 1 | number_callers_dtype_dnumber_idx | dtype,dnumber | 1 | ALTER TABLE public.number_callers DROP INDEX number_callers_dtype_idx
 public | prefixes | prefixes_customer_idx | customer | 1 | prefixes_customer_dtype_dnumber_idx | customer,dtype,dnumber | 1 | ALTER TABLE public.prefixes DROP INDEX prefixes_customer_idx
 public | number_times | number_times_dtype_idx | dtype | 1 | number_times_dtype_dnumber_idx | dtype,dnumber | 1 | ALTER TABLE public.number_times DROP INDEX number_times_dtype_idx
 public | phones | phones_customer_idx | customer | 1 | phones_customer_callerid_location_idx | customer,callerid_location | 1 | ALTER TABLE public.phones DROP INDEX phones_customer_idx
 public | phones | phones_customer_idx | customer | 1 | phones_customer_callerid_external_idx | customer,callerid_external | 1 | ALTER TABLE public.phones DROP INDEX phones_customer_idx
 public | phones | phones_customer_idx | customer | 1 | phones_customer_callerid_internal_idx | customer,callerid_internal | 1 | ALTER TABLE public.phones DROP INDEX phones_customer_idx
 public | phones_hardware | phones_hardware_phone_idx | phone | 1 | phones_hardware_phone_hardware_address_idx | phone,hardware_address | 0 | ALTER TABLE public.phones_hardware DROP INDEX phones_hardware_phone_idx
 public | speeddials | speeddials_stype_idx | stype | 1 | speeddials_stype_snumber_idx | stype,snumber | 1 | ALTER TABLE public.speeddials DROP INDEX speeddials_stype_idx
 public | speeddials | speeddials_dtype_idx | dtype | 1 | speeddials_dtype_dnumber_idx | dtype,dnumber | 1 | ALTER TABLE public.speeddials DROP INDEX speeddials_dtype_idx
 public | mailbox_destinations | mailbox_destinations_context_mailbox_idx | context,mailbox | 1 | mailbox_destinations_pkey | context,mailbox,dcustomer,dtype,dnumber | 0 | ALTER TABLE public.mailbox_destinations DROP INDEX mailbox_destinations_context_mailbox_idx
 public | outgroup_times | outgroup_times_outgroup_idx | outgroup | 1 | outgroup_times_outgroup_name_idx | outgroup,name | 0 | ALTER TABLE public.outgroup_times DROP INDEX outgroup_times_outgroup_idx
 public | ingroup_times | ingroup_times_ingroup_idx | ingroup | 1 | ingroup_times_ingroup_name_idx | ingroup,name | 0 | ALTER TABLE public.ingroup_times DROP INDEX ingroup_times_ingroup_idx
 public | active_customers | active_customers_uniqueid_idx | uniqueid | 1 | active_customers_pkey | uniqueid,scustomer | 0 | ALTER TABLE public.active_customers DROP INDEX active_customers_uniqueid_idx
 public | access | access_customer_idx | customer | 1 | access_customer_callerid_external_idx | customer,callerid_external | 1 | ALTER TABLE public.access DROP INDEX access_customer_idx
 public | access | access_customer_idx | customer | 1 | access_customer_callerid_internal_idx | customer,callerid_internal | 1 | ALTER TABLE public.access DROP INDEX access_customer_idx
 public | unlimited_access | unlimited_access_customer_idx | customer | 1 | unlimited_access_customer_callerid_external_idx | customer,callerid_external | 1 | ALTER TABLE public.unlimited_access DROP INDEX unlimited_access_customer_idx
 public | unlimited_access | unlimited_access_customer_idx | customer | 1 | unlimited_access_customer_callerid_internal_idx | customer,callerid_internal | 1 | ALTER TABLE public.unlimited_access DROP INDEX unlimited_access_customer_idx
 public | texts | texts_dcustomer_idx | dcustomer | 1 | texts_dcustomer_dtype_dnumber_idx | dcustomer,dtype,dnumber | 1 | ALTER TABLE public.texts DROP INDEX texts_dcustomer_idx
 public | texts_media | texts_media_uniqueid_idx | uniqueid | 1 | texts_media_pkey | uniqueid,filename | 0 | ALTER TABLE public.texts_media DROP INDEX texts_media_uniqueid_idx
 public | number_calleridgroups | number_calleridgroups_dtype_idx | dtype | 1 | number_calleridgroups_dtype_dnumber_idx | dtype,dnumber | 1 | ALTER TABLE public.number_calleridgroups DROP INDEX number_calleridgroups_dtype_idx
 public | analytics_include | analytics_i | analytics | 1 | analytics_include_pkey | analytics,feature,dtype,dnumber | 0 | ALTER TABLE public.analytics_include DROP INDEX analytics_i
 public | archived | dupl1 | category_id | 1 | dupl2 | category_id | 1 | ALTER TABLE public.archived DROP INDEX dupl1
 public | archived | dupl2 | category_id | 1 | dupl1 | category_id | 1 | ALTER TABLE public.archived DROP INDEX dupl2
(27 rows)
</code></pre>
<p>Source: <a href="https://www.fromdual.com/blog/mysql-performance-schema-hints/#duplicate-and-redundant-indices" target="_blank" rel="noopener">Duplicate and redundant indices</a></p>
<h3 id="unused-indexes-1">Unused indexes</h3>
<pre><code>SQL&gt; SELECT relid::regclass AS table, indexrelid::regclass AS index
 , pg_size_pretty(pg_relation_size(indexrelid::regclass)) AS index_size
 , idx_tup_read, idx_tup_fetch, idx_scan
 FROM pg_stat_user_indexes 
 JOIN pg_index USING (indexrelid) 
 WHERE idx_scan = 0 
 AND indisunique IS FALSE
;
 table | index | index_size | idx_tup_read | idx_tup_fetch | idx_scan 
------------------------+-----------------------------------------------------------------+------------+--------------+---------------+----------
 customers | customers_prefix_idx | 16 kB | 0 | 0 | 0
 customers | customers_parent_idx | 16 kB | 0 | 0 | 0
 customers | customers_email_idx | 16 kB | 0 | 0 | 0
 customers | customers_affiliate_customer_idx | 16 kB | 0 | 0 | 0
 customers | customers_bill_ref_idx | 16 kB | 0 | 0 | 0
...
 analytics_include | analytics_i | 8192 bytes | 0 | 0 | 0
 archived | dupl1 | 8192 bytes | 0 | 0 | 0
 archived | dupl2 | 8192 bytes | 0 | 0 | 0
(413 rows)
</code></pre>
<p>Sources:</p>
<ul>
<li><a href="https://wiki.postgresql.org/wiki/Index_Maintenance#Unused_Indexes" target="_blank" rel="noopener">Unused Indexes</a></li>
<li><a href="https://jmorano.moretrix.com/2014/02/postgresql-monitor-unused-indexes/" target="_blank" rel="noopener">Postgresql: Monitor unused indexes</a></li>
</ul>
<h3 id="pg-assistant">PG Assistant</h3>
<p>At the <a href="https://2026.pgday.ch/schedule/" target="_blank" rel="noopener">Swiss PGDay2026</a>(s), Bertrand Hartwig presented his tool <a href="https://github.com/beh74/pgassistant-community" target="_blank" rel="noopener">PG Assistant</a>. In that context, I wanted to try it out right away&hellip;</p>
<p>PG Assistant was able to find missing Primary Keys and duplicate indexes. It didn’t show me any partially redundant or unused indexes, but that might just be on my end&hellip;</p>
<figure>
 <a href="https://www.fromdual.com/images/pgAssistant_Screenshot_20260715_111018.png" title="full size"><img decoding="async" src="https://www.fromdual.com/images/pgAssistant_Screenshot_20260715_111018_640x509.png" alt="pgAssistant-1"></a><figcaption>PG Assistant: Dashboard / Dev advisor</figcaption></figure>
<p></p>
<figure>
 <a href="https://www.fromdual.com/images/pgAssistant_Screenshot_20260715_111135.png" title="full size"><img decoding="async" src="https://www.fromdual.com/images/pgAssistant_Screenshot_20260715_111135_640x533.png" alt="pgAssistant-2"></a><figcaption>PG Assistant: Global Advisor / Dev advisor</figcaption></figure>
<p></p>
<figure>
 <a href="https://www.fromdual.com/images/pgAssistant_Screenshot_20260715_111230.png" title="full size"><img decoding="async" src="https://www.fromdual.com/images/pgAssistant_Screenshot_20260715_111230_640x532.png" alt="pgAssistant-3"></a><figcaption>PG Assistant: Strictly duplicate unused index</figcaption></figure>
<p></p>
<h4 id="intallation-of-pg-assistant">Intallation of PG Assistant</h4>
<pre><code>$ apt update
$ apt install python3 python3.13-venv unzip pip
$ wget https://github.com/beh74/pgassistant-community/archive/refs/heads/main.zip
$ unzip main.zip 
$ cd pgassistant-community-main/
$ python3 -m venv env
$ source env/bin/activate
$ pip3 install -r requirements.txt
$ export FLASK_APP=run.py
$ flask run --host=0.0.0.0 --port=80
</code></pre>
<p>Then connect to the displayed URL using a web browser.</p>
<p>A user must be created in the database first:</p>
<pre><code>SQL&gt; CREATE ROLE pgassistant WITH LOGIN SUPERUSER PASSWORD &#039;secret&#039;;
</code></pre>
<p>and the <code>pg_hba.conf</code> file must be adapted.</p>
<h2 id="addendum">Addendum</h2>
<p>You can find unused indexes using the PG Assistant as follows: Database Objects ➜ Indexes ➜ Status: Unused ➜ “NO INDEX ACTIVITY”</p>
<figure>
 <a href="https://www.fromdual.com/images/pgAssistant_Screenshot_20260716_093730.png" title="volle Grösse"><img decoding="async" src="https://www.fromdual.com/images/pgAssistant_Screenshot_20260716_093730_640x459.png" alt="pgAssistant-4"></a><figcaption>PG Assistant: Unused Indexes</figcaption></figure>
<p></p>
<p><a href="https://www.fromdual.com/blog/database_index_optimizer/">Database Index Optimizer</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>PostgreSQL Meta Commands that save time every day</title>
        <link>https://www.percona.com/blog/postgresql-meta-commands-that-save-time-every-day/</link>
        <pubDate>Wed, 15 Jul 2026 12:44:13 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>When most people start working with PostgreSQL, they quickly learn SQL: [crayon-6a57891fbdcdf304804307/] But very soon, another world opens up inside psql — a set of commands that don’t look like SQL, don’t end with semicolons. These are PostgreSQL Meta Commands, and they quietly power the daily workflow of almost every experienced DBA. Meta commands are … Continued<br />
The post PostgreSQL Meta Commands that save time every day appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/postgresql-meta-commands-that-save-time-every-day/">PostgreSQL Meta Commands that save time every day</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><span style="font-weight: 400">When most people start working with PostgreSQL, they quickly learn SQL:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">SELECT * FROM employees;</pre>
<p><span style="font-weight: 400">But very soon, another world opens up inside </span><span style="font-weight: 400">psql</span><span style="font-weight: 400"> — a set of commands that don’t look like SQL, don’t end with semicolons.</span></p>
<p><span style="font-weight: 400">These are </span><b>PostgreSQL Meta Commands</b><span style="font-weight: 400">, and they quietly power the daily workflow of almost every experienced DBA.</span></p>
<p><span style="font-weight: 400">Meta commands are not about querying data — they are about </span><b>navigating, inspecting, and controlling the PostgreSQL session/database efficiently</b><span style="font-weight: 400">.</span></p>
<h3><span style="font-weight: 400">What exactly are Meta Commands?</span></h3>
<p><span style="font-weight: 400">Meta commands are special instructions interpreted by </span><span style="font-weight: 400">psql</span><span style="font-weight: 400">, not PostgreSQL itself.</span></p>
<p><span style="font-weight: 400">That means:</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">They are </span><b>not SQL</b></li>
<li style="font-weight: 400"><span style="font-weight: 400">They execute instantly on the client side</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">They are specific to the </span><span style="font-weight: 400">psql</span><span style="font-weight: 400"> terminal tool</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">They do not end with semicolon like SQL statements</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">The main focus area for meta commands is database interaction and not the interaction with the data in the database.</span></li>
</ul>
<h3><strong>Cheat Sheet (Quick Reference) </strong></h3>
<p><span style="font-weight: 400">The most commonly used meta commands are as follows. There are many more apart from these, however, below are the most frequently used ones:</span></p>
<h3><span style="font-weight: 400">Connect and Manage Sessions</span></h3>
<p><span style="font-weight: 400">These commands help discover databases, establish connections, and verify the current session.</span></p>
<table style="height: 33px" border="1" width="701">
<tbody>
<tr>
<td><span style="font-weight: 400">c</span></td>
<td><span style="font-weight: 400">Connect to another database </span></td>
</tr>
<tr>
<td><span style="font-weight: 400">l</span></td>
<td><span style="font-weight: 400">List all the databases available in the cluster</span></td>
</tr>
<tr>
<td><span style="font-weight: 400">l+</span></td>
<td><span style="font-weight: 400">List all the databases available in the cluster with more details, like DB Size, etc</span></td>
</tr>
<tr>
<td><span style="font-weight: 400">conninfo</span></td>
<td><span style="font-weight: 400">Displays information about the current database connection</span></td>
</tr>
</tbody>
</table>
<p><span style="font-weight: 400">Please find the example of the commands used to connect and manage sessions in the screenshot below:</span></p>
<p><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-50262" src="https://www.percona.com/wp-content/uploads/2026/07/Screenshot-2026-07-15-at-11.39.10-AM-300x134.png" alt="" width="300" height="134" /></p>
<h3><span style="font-weight: 400">Inspect Database Objects </span><span style="font-weight: 400">               </span></h3>
<p><span style="font-weight: 400">The</span><span style="font-weight: 400"><br />
			<span id="urvanov-syntax-highlighter-6a57891fbdce5734642619" class="urvanov-syntax-highlighter-syntax urvanov-syntax-highlighter-syntax-inline  crayon-theme-classic crayon-theme-classic-inline urvanov-syntax-highlighter-font-monaco" style="font-size: 12px !important;line-height: 15px !important;font-size: 12px !important"><span class="crayon-pre urvanov-syntax-highlighter-code" style="font-size: 12px !important;line-height: 15px !important;font-size: 12px !important"><span class="crayon-sy"></span><span class="crayon-v">d</span></span></span> </span><span style="font-weight: 400"> family of commands is one of the most powerful features of<br />
			<span id="urvanov-syntax-highlighter-6a57891fbdce8854379316" class="urvanov-syntax-highlighter-syntax urvanov-syntax-highlighter-syntax-inline  crayon-theme-classic crayon-theme-classic-inline urvanov-syntax-highlighter-font-monaco" style="font-size: 12px !important;line-height: 15px !important;font-size: 12px !important"><span class="crayon-pre urvanov-syntax-highlighter-code" style="font-size: 12px !important;line-height: 15px !important;font-size: 12px !important"><span class="crayon-v">psql</span></span></span> </span><span style="font-weight: 400">. These commands can be used to discover database objects, inspect their definitions, and view additional metadata.</span></p>
<table border="1">
<tbody>
<tr>
<td><span style="font-weight: 400">d</span></td>
<td><span style="font-weight: 400">Describe database objects or list objects visible in the current search path.</span></td>
</tr>
<tr>
<td><span style="font-weight: 400">d object_name</span></td>
<td><span style="font-weight: 400">Describe a specific table, view, sequence, or other database object.</span></td>
</tr>
<tr>
<td><span style="font-weight: 400">d+ object_name</span></td>
<td><span style="font-weight: 400">Display extended information about an object.</span></td>
</tr>
<tr>
<td><span style="font-weight: 400">dt</span></td>
<td><span style="font-weight: 400">List tables. Supports schema names and wildcard patterns.</span></td>
</tr>
<tr>
<td><span style="font-weight: 400">di</span></td>
<td><span style="font-weight: 400">List indexes. Supports wildcard patterns.</span></td>
</tr>
<tr>
<td><span style="font-weight: 400">dn</span></td>
<td><span style="font-weight: 400">List schemas in the current database.</span></td>
</tr>
<tr>
<td><span style="font-weight: 400">du</span></td>
<td><span style="font-weight: 400">List database roles.</span></td>
</tr>
<tr>
<td><span style="font-weight: 400">db</span></td>
<td><span style="font-weight: 400">List tablespaces</span></td>
</tr>
<tr>
<td><span style="font-weight: 400">dx</span></td>
<td><span style="font-weight: 400">List installed extensions</span></td>
</tr>
<tr>
<td><span style="font-weight: 400">df</span></td>
<td><span style="font-weight: 400">List functions and procedures</span></td>
</tr>
<tr>
<td><span style="font-weight: 400">sf function name</span></td>
<td><span style="font-weight: 400">Displays the source code of the specific function/procedure</span></td>
</tr>
</tbody>
</table>
<h4></h4>
<h4><span style="font-weight: 400">Using object names and wildcards</span></h4>
<p><span style="font-weight: 400">Most object-inspection commands accept object names, schema-qualified names, and wildcard patterns.</span></p>
<p><span style="font-weight: 400">For example:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">dt</pre>
<p><span style="font-weight: 400">Lists all tables in the current search path.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">dt public.*</pre>
<p><span style="font-weight: 400">Lists all tables in the public schema.</span></p>
<p><span style="font-weight: 400">The same pattern matching is supported by several other meta-commands, including </span><span style="font-weight: 400">di, df,</span><span style="font-weight: 400"> and the</span><span style="font-weight: 400"> d</span><span style="font-weight: 400"> family.</span></p>
<p><span style="font-weight: 400">Please find the example of the </span><span style="font-weight: 400">d </span><span style="font-weight: 400">family</span> <span style="font-weight: 400">commands in the screenshot below:</span></p>
<p><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-50263" src="https://www.percona.com/wp-content/uploads/2026/07/Screenshot-2026-07-15-at-11.43.18-AM-300x103.png" alt="" width="300" height="103" /></p>
<h3><span style="font-weight: 400">Format Query Results</span></h3>
<p><span style="font-weight: 400">Several meta-commands are available to improve the readability of query output, particularly when working with wide result sets.</span></p>
<table border="1">
<tbody>
<tr>
<td><span style="font-weight: 400">x [on|off|auto]</span></td>
<td><span style="font-weight: 400">Toggle expanded (vertical) display</span></td>
</tr>
<tr>
<td><span style="font-weight: 400">o filename</span></td>
<td><span style="font-weight: 400">Redirect query output to a file or pipe.</span></td>
</tr>
<tr>
<td><span style="font-weight: 400">o</span></td>
<td><span style="font-weight: 400">Restore query output to the terminal.</span></td>
</tr>
</tbody>
</table>
<h3></h3>
<h3><span style="font-weight: 400">Monitor Query Executions</span></h3>
<p><span style="font-weight: 400">These commands assist in measuring query performance and repeatedly executing queries for monitoring purposes.</span></p>
<table border="1">
<tbody>
<tr>
<td><span style="font-weight: 400">timing [on|off]</span></td>
<td><span style="font-weight: 400">Toggle Query execution timing</span></td>
</tr>
<tr>
<td><span style="font-weight: 400">watch seconds</span></td>
<td><span style="font-weight: 400">Re-execute the current query at the specified interval</span></td>
</tr>
</tbody>
</table>
<p><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-50264" src="https://www.percona.com/wp-content/uploads/2026/07/Screenshot-2026-07-15-at-11.52.04-AM-300x125.png" alt="" width="300" height="125" /></p>
<h3><span style="font-weight: 400">Execute and Automate tasks</span></h3>
<p><span style="font-weight: 400">These commands simplify repetitive tasks and enable integration between</span><span style="font-weight: 400"> psql,</span><span style="font-weight: 400"> SQL scripts, and the operating system</span></p>
<table border="1">
<tbody>
<tr>
<td><span style="font-weight: 400">i filename</span></td>
<td><span style="font-weight: 400">Execute the commands from the file</span></td>
</tr>
<tr>
<td><span style="font-weight: 400">gexec</span></td>
<td><span style="font-weight: 400">Execute each field returned by a query as an SQL statement.</span></td>
</tr>
<tr>
<td><span style="font-weight: 400">! command</span></td>
<td><span style="font-weight: 400">Execute a shell command without leaving a </span><span style="font-weight: 400">psql</span><span style="font-weight: 400"> prompt</span></td>
</tr>
</tbody>
</table>
<p><img decoding="async" loading="lazy" class="alignnone size-medium wp-image-50265" src="https://www.percona.com/wp-content/uploads/2026/07/Screenshot-2026-07-15-at-11.53.25-AM-300x75.png" alt="" width="300" height="75" /></p>
<h3><span style="font-weight: 400">Get Help</span></h3>
<p><span style="font-weight: 400">Built-in help commands provide quick access to both </span><span style="font-weight: 400">psql</span><span style="font-weight: 400"> meta-command documentation and PostgreSQL SQL syntax without leaving the terminal.</span></p>
<table border="1">
<tbody>
<tr>
<td><span style="font-weight: 400">?</span></td>
<td><span style="font-weight: 400">Display all available </span><span style="font-weight: 400">psql</span><span style="font-weight: 400"> meta-commands.</span></td>
</tr>
<tr>
<td><span style="font-weight: 400">h</span></td>
<td><span style="font-weight: 400">List SQL commands for which syntax help is available.</span></td>
</tr>
<tr>
<td><span style="font-weight: 400">h command</span></td>
<td><span style="font-weight: 400">Display syntax help for a specific SQL command.</span></td>
</tr>
</tbody>
</table>
<h3></h3>
<h3><span style="font-weight: 400">What is .psqlrc?</span></h3>
<p><span style="font-weight: 400">.psqlrc</span><span style="font-weight: 400"> is a startup file in the home directory that </span><span style="font-weight: 400">psql</span><span style="font-weight: 400"> reads when a session begins. It can hold meta-commands and SQL that run before the first prompt. The main benefit is consistent defaults — timing, formatting, and a custom prompt — without repeating setup each time, which speeds daily work and reduces connection mistakes across databases.</span></p>
<p><span style="font-weight: 400">A minimal</span><span style="font-weight: 400"> .psqlrc</span><span style="font-weight: 400"> might look like this:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">timing on 
x auto</pre>
<p><span style="font-weight: 400">These settings load automatically on every new</span> <span style="font-weight: 400">psql</span><span style="font-weight: 400"> session as highlighted below:</span></p>
<p><img decoding="async" loading="lazy" class="alignnone size-medium wp-image-50266" src="https://www.percona.com/wp-content/uploads/2026/07/Screenshot-2026-07-15-at-11.54.34-AM-300x77.png" alt="" width="300" height="77" /></p>
<h3><span style="font-weight: 400">Conclusion</span></h3>
<p><span style="font-weight: 400">PostgreSQL is powerful because of SQL — but for DBAs, </span><span style="font-weight: 400">psql</span><span style="font-weight: 400"> meta commands make daily management far easier and more efficient.</span></p>
<p><span style="font-weight: 400">Most developers use only a handful like </span><span style="font-weight: 400">dt</span><span style="font-weight: 400"> or </span><span style="font-weight: 400">d</span><span style="font-weight: 400">. But experienced DBAs rely on a much broader toolkit to:</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">Investigate production issues faster</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Navigate systems efficiently</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Reduce reliance on repetitive SQL</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Repetitive tasks can be automated</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Debug complex problems quickly</span></li>
</ul>
<p><span style="font-weight: 400">An easy way to understand the relationship between SQL and PostgreSQL meta commands is to compare them to driving a car.</span></p>
<p><b>SQL is like driving the car</b><span style="font-weight: 400"> — it is the primary means of reaching a destination. It is used to retrieve, insert, update, and delete data, enabling applications and users to interact with the information stored in the database.</span></p>
<p><b>Meta commands, on the other hand, are like the car&#8217;s dashboard.</b><span style="font-weight: 400"> While the dashboard does not move the vehicle, it provides essential information such as speed, fuel level, engine health, navigation status, and warning indicators. Driving without a dashboard is certainly possible, but it would mean operating with limited visibility into the vehicle&#8217;s condition and performance.</span></p>
<p><span style="font-weight: 400">Similarly, SQL is responsible for manipulating and retrieving data, whereas PostgreSQL meta commands provide valuable insight into the database environment itself. They help administrators inspect database objects, navigate schemas, monitor sessions, examine roles and privileges, review object definitions, and perform numerous administrative tasks efficiently.</span></p>
<p><span style="font-weight: 400">In essence, SQL enables interaction with the </span><b>data</b><span style="font-weight: 400">, while meta commands enable interaction with the </span><b>PostgreSQL environment</b><span style="font-weight: 400">. Together, they form a complementary toolkit that allows database professionals to work more effectively, troubleshoot issues faster, and administer PostgreSQL with greater confidence.</span></p>
<p>The post <a href="https://www.percona.com/blog/postgresql-meta-commands-that-save-time-every-day/">PostgreSQL Meta Commands that save time every day</a> appeared first on <a href="https://www.percona.com">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/postgresql-meta-commands-that-save-time-every-day/">PostgreSQL Meta Commands that save time every day</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Inside MySQL 9.7 LTS Features</title>
        <link>https://www.percona.com/blog/inside-mysql-9-7-lts-features/</link>
        <pubDate>Wed, 15 Jul 2026 05:00:23 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>MySQL 9.7, a Long-Term Support (LTS) release, incorporates a variety of potential features spanning across multiple technical domains. This article covers some of the primary features introduced and evaluates their practical utility within the MySQL database environment. Following the End-of-Life (EOL) status of MySQL 8.0, this subsequent LTS release is designed to provide enhanced stability … Continued<br />
The post Inside MySQL 9.7 LTS Features appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/inside-mysql-9-7-lts-features/">Inside MySQL 9.7 LTS Features</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><span style="font-weight: 400">MySQL 9.7, a Long-Term Support (LTS) release, incorporates a variety of potential features spanning across multiple technical domains. This article covers some of the primary features introduced and evaluates their practical utility within the MySQL database environment.</span></p>
<p><span style="font-weight: 400">Following the End-of-Life (EOL) status of MySQL 8.0, this subsequent LTS release is designed to provide enhanced stability alongside significant architectural innovations.</span></p>
<p><span style="font-weight: 400">Let&#8217;s discuss each of these features below with some examples and usage.</span></p>
<h2><span style="font-weight: 400">Flow-control monitoring in Group Replication</span></h2>
<p><span style="font-weight: 400">Flow control monitoring has been improved and provides more granularity by introducing the additional status variables listed below.</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">Gr_flow_control_throttle_count : It denotes the number of transactions that have been throttled.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Gr_flow_control_throttle_time_sum :It denotes the time in microseconds that transactions have been throttled.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Gr_flow_control_throttle_active_count :It denotes the number of transactions currently being throttled.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Gr_flow_control_throttle_last_throttle_timestamp : It denotes the most recent date and time that a transaction was throttled.</span></li>
</ul>
<p><span style="font-weight: 400">To use these status variables, we must install the “</span><b>Group Replication Flow Control Statistics”  </b><span style="font-weight: 400">component.<br />
</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; Install component 'file://component_group_replication_flow_control_stats';</pre>
<p><span style="font-weight: 400">After the component is installed, the statistics will be visible.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; SELECT * FROM performance_schema.global_status WHERE VARIABLE_NAME LIKE 'Gr_flow_control%';
+--------------------------------------------------+----------------+
| VARIABLE_NAME                                    | VARIABLE_VALUE |
+--------------------------------------------------+----------------+
| Gr_flow_control_throttle_active_count            | 0              |
| Gr_flow_control_throttle_count                   | 0              |
| Gr_flow_control_throttle_last_throttle_timestamp |                |
| Gr_flow_control_throttle_time_sum                | 0              |
+--------------------------------------------------+----------------+</pre>
</p>
<h2><span style="font-weight: 400">Multi-threaded applier extended statistics</span></h2>
<p><span style="font-weight: 400">We now have additional verbosity for the Applier threads for both Asynchronous and Group Replication topologies. This means we can get more details of the transactions or potential misbehaviours during the transactions applier stage. This feature is particularly useful for troubleshooting performance bottlenecks in multi-threaded replication environments, where understanding the specific cause of lag can be challenging.</span></p>
<p><span style="font-weight: 400">This requires installing the “</span><b>Replication Applier Metrics” </b><span style="font-weight: 400">component.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; Install component 'file://component_replication_applier_metrics';</pre>
<p><span style="font-weight: 400">Upon successful installation of the requisite component, the performance schema tables facilitate tracking of transaction details and various performance metrics during the replication applier phase. For instance, monitoring the table “</span><b>replication_applier_metrics”</b><span style="font-weight: 400"> enables observing channel-specific operations.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; SELECT * FROM performance_schema.replication_applier_metrics where CHANNEL_NAME='group_replication_applier'G;
*************************** 1. row ***************************
                                CHANNEL_NAME: group_replication_applier
                  TOTAL_ACTIVE_TIME_DURATION: 0
                          LAST_APPLIER_START: 0000-00-00 00:00:00
                TRANSACTIONS_COMMITTED_COUNT: 0
                  TRANSACTIONS_ONGOING_COUNT: 0
                  TRANSACTIONS_PENDING_COUNT: 0
       TRANSACTIONS_COMMITTED_SIZE_BYTES_SUM: 0
    TRANSACTIONS_ONGOING_FULL_SIZE_BYTES_SUM: 0
TRANSACTIONS_ONGOING_PROGRESS_SIZE_BYTES_SUM: 0
         TRANSACTIONS_PENDING_SIZE_BYTES_SUM: NULL
                      EVENTS_COMMITTED_COUNT: 0
            WAITS_FOR_WORK_FROM_SOURCE_COUNT: 0
         WAITS_FOR_WORK_FROM_SOURCE_SUM_TIME: 0
            WAITS_FOR_AVAILABLE_WORKER_COUNT: 0
         WAITS_FOR_AVAILABLE_WORKER_SUM_TIME: 0
      WAITS_COMMIT_SCHEDULE_DEPENDENCY_COUNT: 0
   WAITS_COMMIT_SCHEDULE_DEPENDENCY_SUM_TIME: 0
         WAITS_FOR_WORKER_QUEUE_MEMORY_COUNT: 0
      WAITS_FOR_WORKER_QUEUE_MEMORY_SUM_TIME: 0
              WAITS_WORKER_QUEUES_FULL_COUNT: 0
           WAITS_WORKER_QUEUES_FULL_SUM_TIME: 0
             WAITS_DUE_TO_COMMIT_ORDER_COUNT: 0
          WAITS_DUE_TO_COMMIT_ORDER_SUM_TIME: 0
        TIME_TO_READ_FROM_RELAY_LOG_SUM_TIME: 0</pre>
<p><span style="font-weight: 400">In addition to aggregate metrics, MySQL 9.7 provides a way to inspect the progress of individual worker threads via monitoring stats in the </span><b>“replication_applier_progress_by_worker”</b><span style="font-weight: 400"> table. This level of detail helps administrators identify if a single transaction is monopolising a specific worker, causing overall replication delay.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; SELECT * FROM performance_schema.replication_applier_progress_by_workerG;
*************************** 1. row ***************************
                          CHANNEL_NAME: group_replication_applier
                             WORKER_ID: 0
                             THREAD_ID: 62
              ONGOING_TRANSACTION_TYPE: UNASSIGNED
   ONGOING_TRANSACTION_FULL_SIZE_BYTES: 0
ONGOING_TRANSACTION_APPLIED_SIZE_BYTES: 0
*************************** 2. row ***************************
                          CHANNEL_NAME: group_replication_applier
                             WORKER_ID: 1
                             THREAD_ID: 63
              ONGOING_TRANSACTION_TYPE: UNASSIGNED
   ONGOING_TRANSACTION_FULL_SIZE_BYTES: 0
ONGOING_TRANSACTION_APPLIED_SIZE_BYTES: 0
*************************** 3. row ***************************
                          CHANNEL_NAME: group_replication_applier
                             WORKER_ID: 2
                             THREAD_ID: 64
              ONGOING_TRANSACTION_TYPE: UNASSIGNED
   ONGOING_TRANSACTION_FULL_SIZE_BYTES: 0
ONGOING_TRANSACTION_APPLIED_SIZE_BYTES: 0
*************************** 4. row ***************************
                          CHANNEL_NAME: group_replication_applier
                             WORKER_ID: 3
                             THREAD_ID: 65
              ONGOING_TRANSACTION_TYPE: UNASSIGNED
   ONGOING_TRANSACTION_FULL_SIZE_BYTES: 0
ONGOING_TRANSACTION_APPLIED_SIZE_BYTES: 0</pre>
</p>
<h2><span style="font-weight: 400">Automatic eviction &amp; rejoin</span></h2>
<p><span style="font-weight: 400">The Group Replication resource manager now provides auto-eviction functionality, which we can configure using the available options. This basically ensures that the unhealthy node is removed from the Group to maintain the cluster&#8217;s high availability and overall performance.</span></p>
<p><span style="font-weight: 400">This requires installing the “</span><b>group replication resource manager”</b><span style="font-weight: 400"> component.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; INSTALL COMPONENT 'file://component_group_replication_resource_manager';</pre>
<p><span style="font-weight: 400">Once the component is available,  we can use various options to decide the node expulsion policy.</span></p>
<p><b>1) Applier channel</b></p>
<p><span style="font-weight: 400">We can set the applier channel replication lag threshold values using the configuration parameter below.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; set global group_replication_resource_manager.applier_channel_lag = &lt;value&gt;;</pre>
<p><span style="font-weight: 400">If lag exceeds  &#8220;</span><b>applier_channel_lag&#8221;</b><span style="font-weight: 400"> threshold 10 times or more in a row, this server is expelled from the group. The status variable below is used for tracking the lag exceed rate.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; show global status like 'Gr_resource_manager_applier_channel_lag';
+-----------------------------------------+-------+
| Variable_name                           | Value |
+-----------------------------------------+-------+
| Gr_resource_manager_applier_channel_lag | 0     |
+-----------------------------------------+-------+</pre>
<p><span style="font-weight: 400"><br />
</span><b>2)</b> <b>Recovery Channel</b><b></b></p>
<p><span style="font-weight: 400">Similarly, we can define a threshold for the group member recovery process to attempt to rejoin the cluster. </span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; set global group_replication_resource_manager.recovery_channel_lag = &lt;value&gt;;</pre>
<p><span style="font-weight: 400">If the secondary&#8217;s recovery lag exceeds &#8220;</span><strong>recovery_channel_lag&#8221;</strong><span style="font-weight: 400">, 10 times or more in succession, the server is expelled from the group. </span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql show global status like 'Gr_resource_manager_recovery_channel_lag';
+------------------------------------------+-------+
| Variable_name                            | Value |
+------------------------------------------+-------+
| Gr_resource_manager_recovery_channel_lag | 0     |
+------------------------------------------+-------+</pre>
<p><b>3) Memory/Resource Usage</b></p>
<p><span style="font-weight: 400">We can also define an expelled condition based on the group member&#8217;s memory or resource usage %.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; set global group_replication_resource_manager.memory_used_limit = 10;</pre>
<p><span style="font-weight: 400">If the memory usage exceeds </span><strong>memory_used_limit</strong><span style="font-weight: 400"> % by 10 or more consecutive times, the node will be expelled from the group.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; show global status like 'Gr_resource_manager_memory_used%';
+---------------------------------+-------+
| Variable_name                   | Value |
+---------------------------------+-------+
| Gr_resource_manager_memory_used | 78    |
+---------------------------------+-------+
1 row in set (0.002 sec)</pre>
<p><span style="font-weight: 400">In addition to the discussed options above, we can also track various <a href="https://dev.mysql.com/doc/refman/9.7/en/group-replication-resource-manager-component.html">server status variables</a> to monitor group replication and the resource manager component.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; select * from performance_schema.global_status where variable_name in ('Gr_resource_manager_applier_channel_threshold_hits','Gr_resource_manager_applier_channel_eviction_timestamp','Gr_resource_manager_recovery_channel_threshold_hits','Gr_resource_manager_recovery_channel_eviction_timestamp','Gr_resource_manager_memory_threshold_hits','Gr_resource_manager_memory_eviction_timestamp');
+---------------------------------------------------------+----------------+
| VARIABLE_NAME                                           | VARIABLE_VALUE |
+---------------------------------------------------------+----------------+
| Gr_resource_manager_applier_channel_eviction_timestamp  |                |
| Gr_resource_manager_applier_channel_threshold_hits      | 0              |
| Gr_resource_manager_memory_eviction_timestamp           |                |
| Gr_resource_manager_memory_threshold_hits               | 6703           |
| Gr_resource_manager_recovery_channel_eviction_timestamp |                |
| Gr_resource_manager_recovery_channel_threshold_hits     | 0              |
+---------------------------------------------------------+----------------+
6 rows in set (0.003 sec)</pre>
<p><span style="font-weight: 400">The expelled node can attempt to automatically rejoin based on the value of the </span><b>group_replication_autorejoin_tries</b><span style="font-weight: 400"> variable</span><b>.</b></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; show variables like '%group_replication_autorejoin_tries%';
+------------------------------------+-------+
| Variable_name                      | Value |
+------------------------------------+-------+
| group_replication_autorejoin_tries | 3     |
+------------------------------------+-------+
1 row in set (0.006 sec)</pre>
<p><span style="font-weight: 400">If the node cannot join, it will perform the behaviour specified in the </span><b>group_replication_exit_state_action </b><span style="font-weight: 400">variable.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; show variables like '%group_replication_exit_state_action%';
+-------------------------------------+--------------+
| Variable_name                       | Value        |
+-------------------------------------+--------------+
| group_replication_exit_state_action | OFFLINE_MODE |
+-------------------------------------+--------------+
1 row in set (0.005 sec)</pre>
<p><span style="font-weight: 400">After a server is evicted from the group (for whatever reason), it gets a </span><b>grace period</b><span style="font-weight: 400"> (</span><b>group_replication_resource_manager</b><span style="font-weight: 400">) when it rejoins. During this period, the Resource Manager won&#8217;t immediately kick it out again, even if it&#8217;s still lagging or breaching the defined threshold as discussed above.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; show variables like '%group_replication_resource_manager.quarantine_time%';
+----------------------------------------------------+-------+
| Variable_name                                      | Value |
+----------------------------------------------------+-------+
| group_replication_resource_manager.quarantine_time | 3600  |
+----------------------------------------------------+-------+</pre>
</p>
<h2><span style="font-weight: 400">Up-to-date aware Primary election</span></h2>
<p><span style="font-weight: 400">The Primary election process is more mature and cohesive. The Group Replication Manager now uses the most up-to-date status as a criterion for selecting the new primary.</span></p>
<p><span style="font-weight: 400">Here is how the Group Replication Manager performs the most up-to-date primary selection prior to MySQL v9.7.</span></p>
<ol>
<li style="font-weight: 400"><span style="font-weight: 400">The lowest MySQL version is checked for each member.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">If more than one member is running the lowest MySQL Server version, each member&#8217;s weight is determined by the &#8220;</span>group_replication_member_weight&#8221;<span style="font-weight: 400"> system variable.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">If there is more than one member running the lowest MySQL Server version, and also more than one of those members has the highest member weight, the third factor considered is the lexicographical order of the generated server UUIDs &#8220;</span>server_uuid&#8221;<span style="font-weight: 400"> of each group member. The member with the lowest server UUID is chosen as the new primary.<br />
</span></li>
</ol>
<p><span style="font-weight: 400">In MySQL version 9.7, &#8220;</span><b>group_replication_elect_prefers_most_updated&#8221;</b><span style="font-weight: 400"> was introduced, so the failover will be determined by </span><b>how many transactions are in the secondary backlog</b><span style="font-weight: 400">. Basically the secondary with the least backlog will be selected as Primary.</span></p>
<p><span style="font-weight: 400">Now, it will consider the</span><b> “most up-to-date” </b><span style="font-weight: 400">node first,</span> <span style="font-weight: 400">then “</span><b>weight”</b><span style="font-weight: 400"> and then “</span><b>UUID”</b><span style="font-weight: 400">. </span></p>
<p><span style="font-weight: 400">To use &#8220;</span><b>group_replication_elect_prefers_most_updated&#8221;</b><span style="font-weight: 400">, we need to install the “</span><b>Group Replication Primary Election</b><span style="font-weight: 400">” component listed below on each Group Member.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; Install component 'file://component_group_replication_elect_prefers_most_updated';</pre>
<p><span style="font-weight: 400">By default, the most up-to-date group member selection is enabled. We need to make sure it&#8217;s enabled on all Group Members. </span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; select @@group_replication_elect_prefers_most_updated.enabled;
+--------------------------------------------------------+
| @@group_replication_elect_prefers_most_updated.enabled |
+--------------------------------------------------------+
|                                                      1 |
+--------------------------------------------------------+
1 row in set (0.007 sec)</pre>
<p><span style="font-weight: 400">In the event that a new primary is elected via the most up-to-date selection mechanism, this metric represents the transaction processing differential between the newly designated primary and the secondary node with the highest level of synchronisation.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; show status like 'Gr_latest_primary_election_by_most_uptodate_members_trx_delta';
+---------------------------------------------------------------+-------+
| Variable_name                                                 | Value |
+---------------------------------------------------------------+-------+
| Gr_latest_primary_election_by_most_uptodate_members_trx_delta | 0     |
+---------------------------------------------------------------+-------+</pre>
<p><span style="font-weight: 400">Also, we can track the timestamp of the most recent primary election on the most up-to-date node.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; show status like 'Gr_latest_primary_election_by_most_uptodate_member_timestamp';
+--------------------------------------------------------------+-------+
| Variable_name                                                | Value |
+--------------------------------------------------------------+-------+
| Gr_latest_primary_election_by_most_uptodate_member_timestamp |       |
+--------------------------------------------------------------+-------+
1 row in set (0.005 sec)</pre>
<p><span style="font-weight: 400">The database logs also tell exactly what criteria the primary member selected during failover.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">2026-06-14T10:04:02.243809Z 0 [System] [MY-015575] [Repl] Plugin group_replication reported: 'Member with uuid 00021702-2222-2222-2222-222222222222 was elected primary since it was the most up-to-date member with 2755 transactions more than second most up-to-date member 00021703-3333-3333-3333-333333333333. In case of a tie member weight and then uuid lexical order was used over the most updated members.'</pre>
</p>
<h2><span style="font-weight: 400">MySQL JSON duality views</span></h2>
<p><span style="font-weight: 400">With the introduction of JSON duality views, we can leverage a single unified JSON document for both relational and hierarchical JSON data. This provides a common, structured JSON format for the application, allowing it to perform both read and write operations.</span></p>
<p><span style="font-weight: 400">Let’s see a quick scenario below on how it works.</span></p>
<p><span style="font-weight: 400">Below are two relational tables from which we obtain aggregated information in JSON format. </span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; CREATE TABLE products (
  product_id INT PRIMARY KEY,
  product_type VARCHAR(100)
);

mysql&gt; CREATE TABLE products_details (
  product_detail_id INT PRIMARY KEY,
  product_id INT,
  name VARCHAR(100),
  active varchar(10)
);</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; INSERT INTO products (product_id,product_type) VALUES (1,'IT'), (2,'TEL');
mysql&gt; INSERT INTO products_details (product_detail_id,product_id,name,active) VALUES (1,1,'Laptop','Yes'), (2,2,'Mobile','Yes');</pre>
<p><span style="font-weight: 400">Here is the exact Json View which fetch the columns from the relation table based on the join condition. Each of those relational table columns is mapped with a JSON data structure (</span><b>_id</b><span style="font-weight: 400">,</span><b>v_product_type</b><span style="font-weight: 400">,</span><b>v_product_type</b><span style="font-weight: 400"> ), and the complete details of the</span><b> product details </b><span style="font-weight: 400">table are fetched into the (</span><b>product</b><span style="font-weight: 400">) array.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; CREATE JSON RELATIONAL DUALITY VIEW view_product AS
SELECT JSON_DUALITY_OBJECT( WITH(INSERT,UPDATE,DELETE)
    '_id': product_id,
    'v_product_type': product_type,
    'product': (
        SELECT JSON_ARRAYAGG(
            JSON_DUALITY_OBJECT(WITH(INSERT,UPDATE,DELETE)
                'v_product_detail_id': product_detail_id,
                'v_name': name,
                'v_active': active
                
            )
        )
        FROM products_details
        WHERE products_details.product_id = products.product_id
    )
)
FROM products;</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; select * from view_product;
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| data                                                                                                                                                                           |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| {"_id": 1, "product": [{"v_name": "Laptop", "v_active": "Yes", "v_product_detail_id": 1}], "_metadata": {"etag": "313642c2aa24f0571264332afa140715"}, "v_product_type": "IT"}  |
| {"_id": 2, "product": [{"v_name": "Mobile", "v_active": "Yes", "v_product_detail_id": 2}], "_metadata": {"etag": "3d229ada02ac660f9f6cac994b44831a"}, "v_product_type": "TEL"} |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.002 sec)</pre>
<p><span style="font-weight: 400">Once the duality view is created, we can perform both read/write operations.</span></p>
<p><strong>Reading the duality view</strong></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; select * from view_product;
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| data                                                                                                                                                                           |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| {"_id": 1, "product": [{"v_name": "Laptop", "v_active": "Yes", "v_product_detail_id": 1}], "_metadata": {"etag": "313642c2aa24f0571264332afa140715"}, "v_product_type": "IT"}  |
| {"_id": 2, "product": [{"v_name": "Mobile", "v_active": "Yes", "v_product_detail_id": 2}], "_metadata": {"etag": "3d229ada02ac660f9f6cac994b44831a"}, "v_product_type": "TEL"} |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+</pre>
<p><strong>Writing the underlying table in the duality view</strong></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; UPDATE view_product
SET data = JSON_SET(
    data,
    '$.product[0].v_name',
    'Notepad'
)
WHERE JSON_EXTRACT(data, '$._id') = 1;</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; select * from products_details;
+-------------------+------------+---------+--------+
| product_detail_id | product_id | name    | active |
+-------------------+------------+---------+--------+
|                 1 |          1 | Notepad | Yes    |
|                 2 |          2 | Mobile  | Yes    |
+-------------------+------------+---------+--------+</pre>
<p><span style="font-weight: 400">After performing the above write operations, we can see that the view now shows the updated data.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql &gt; select * from view_product;
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| data                                                                                                                                                                           |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| {"_id": 1, "product": [{"v_name": "Notepad", "v_active": "Yes", "v_product_detail_id": 1}], "_metadata": {"etag": "72c4368420cdc698842d0ab4bd9315ab"}, "v_product_type": "IT"} |
| {"_id": 2, "product": [{"v_name": "Mobile", "v_active": "Yes", "v_product_detail_id": 2}], "_metadata": {"etag": "3d229ada02ac660f9f6cac994b44831a"}, "v_product_type": "TEL"} |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+</pre>
</p>
<h2><span style="font-weight: 400">Hypergraph Optimizer</span></h2>
<p><span style="font-weight: 400">With the Hypergraph Optimiser, we now have more </span><span style="font-weight: 400">advanced optimisation for complex queries and a broader set of Join plans than the older traditional method, missing earlier. By using “</span><b>Join hypergraph</b><span style="font-weight: 400">”, the optimiser now has better reach to all tables in the join condition.</span></p>
<p><b>Hypergraph Optimiser is OFF</b></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; SET optimizer_switch='hypergraph_optimizer=off';</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; SELECT t1.k, COUNT(*) AS cnt
FROM sbtest1 t1
JOIN sbtest2 t2 ON t1.id = t2.id
JOIN sbtest3 t3 ON t1.id = t3.id
WHERE t1.k BETWEEN 200000 AND 500000
GROUP BY t1.k
ORDER BY cnt DESC
LIMIT 100;</pre>
<p><span style="font-weight: 400"><strong>Output</strong>:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">| 498870 | 119 |
| 498729 | 119 |
| 497668 | 119 |
| 498076 | 119 |
+--------+-----+
100 rows in set (4.000 sec)</pre>
<p><strong>Explain output:</strong></p>
<pre class="urvanov-syntax-highlighter-plain-tag">-&gt; Limit: 100 row(s)
    -&gt; Sort: cnt DESC, limit input to 100 row(s) per chunk
        -&gt; Stream results  (cost=1.22e+6 rows=175136)
            -&gt; Group aggregate: count(0)  (cost=1.22e+6 rows=175136)
                -&gt; Nested loop inner join  (cost=1.1e+6 rows=493200)
                    -&gt; Nested loop inner join  (cost=601547 rows=493200)
                        -&gt; Filter: (t1.k between 200000 and 500000)  (cost=99122 rows=493200)
                            -&gt; Covering index range scan on t1 using k_1 over (200000 &lt;= k &lt;= 500000)  (cost=99122 rows=493200)
                        -&gt; Single-row covering index lookup on t2 using PRIMARY (id = t1.id)  (cost=0.919 rows=1)
                    -&gt; Single-row covering index lookup on t3 using PRIMARY (id = t1.id)  (cost=0.919 rows=1)</pre>
<p><b>Hypergraph Optimiser is ON</b></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; SET optimizer_switch='hypergraph_optimizer=on';</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; SELECT t1.k, COUNT(*) AS cnt
FROM sbtest1 t1
JOIN sbtest2 t2 ON t1.id = t2.id
JOIN sbtest3 t3 ON t1.id = t3.id
WHERE t1.k BETWEEN 200000 AND 500000
GROUP BY t1.k
ORDER BY cnt DESC
LIMIT 100;</pre>
<p><b>Output:</b></p>
<pre class="urvanov-syntax-highlighter-plain-tag">| 499721 | 119 |
| 499052 | 119 |
| 498870 | 119 |
| 498384 | 119 |
+--------+-----+
100 rows in set (0.498 sec)</pre>
<p><strong>Explain output:</strong></p>
<pre class="urvanov-syntax-highlighter-plain-tag">-&gt; Sort: cnt DESC, limit input to 100 row(s) per chunk  (cost=1.96e+6..1.96e+6 rows=100)
    -&gt; Table scan on &lt;temporary&gt;  (cost=1.87e+6..1.9e+6 rows=175136)
        -&gt; Aggregate using temporary table  (cost=1.87e+6..1.87e+6 rows=175136)
            -&gt; Inner hash join (t2.id = t3.id)  (cost=990754..1.44e+6 rows=493200)
                -&gt; Covering index scan on t3 using k_1  (cost=0.312..308240 rows=986400)
                -&gt; Hash
                    -&gt; Inner hash join (t1.id = t2.id)  (cost=370988..824021 rows=493200)
                        -&gt; Covering index scan on t2 using k_1  (cost=0.312..308240 rows=986400)
                        -&gt; Hash
                            -&gt; Filter: (t1.k between 200000 and 500000)  (cost=0.416..205287 rows=493200)
                                -&gt; Covering index range scan on t1 using k_1 over (200000 &lt;= k &lt;= 500000)  (cost=0.359..176877 rows=493200)</pre>
<p><span style="font-weight: 400">We can see that with &#8220;</span><b>hypergraph_optimizer=enabled&#8221;, </b><span style="font-weight: 400">the query execution time is almost 8x faster.</span></p>
<p><span style="font-weight: 400">The performance difference might not be noticeable with a few joins or a smaller table&#8217;s data set, but with more complex joins, it can yield better performance. In the above example, we can see that when</span><b> “hypergraph_optimizer=enabled”</b><span style="font-weight: 400">, the optimiser replaces “</span><b>Nested loop inner join</b><span style="font-weight: 400">” with “</span><b>Inner</b> <b>hash join</b><span style="font-weight: 400">”, which is generally better for large datasets. </span></p>
<h2><span style="font-weight: 400">Higher version source allowed</span></h2>
<p><span style="font-weight: 400">Now, it&#8217;s possible that a lower version replica can connect to a higher version source when the major versions differ. That means we don’t have to rely on all replicas being upgraded in one go; we can just upgrade the source, verify it, and later perform rolling upgrades on lower-version replicas as per our own timelines and convenience.</span></p>
<p><span style="font-weight: 400">Of course, we have to be cautious not to run any such feature or change on the source that doesn’t support lower-version replicas.</span></p>
<p><b>Please note &#8211;</b><span style="font-weight: 400"> This won’t be applicable to previous releases, say (8.4, 8.0), as they didn’t restrict such replication connectivity. It would be useful for 9.7 or the next major release.</span></p>
<p><span style="font-weight: 400">To enable this functionality, we need to ensure the following variable is enabled on the Replica. By default its enabled on 9.7</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">mysql&gt; show variables like 'replica_allow_higher_version_source';
+-------------------------------------+-------+
| Variable_name                       | Value |
+-------------------------------------+-------+
| replica_allow_higher_version_source | ON    |
+-------------------------------------+-------+
1 row in set (0.008 sec)</pre>
</p>
<h2></h2>
<h2><span style="font-weight: 400">Summary</span></h2>
<p><span style="font-weight: 400">The above discussion highlights key advancements in MySQL 9.7 LTS, ranging from some innovative or operational improvements to developer-centric features such as “JSON Duality” Views. Also, the “Hypergraph Optimiser” is now available for community release, which was previously exclusive to MySQL Heatwave/Enterprise.  As a Long-Term Support (LTS) release, MySQL 9.7 is structured to provide a stable and consistent environment, prioritising architectural reliability over frequent experimental changes.</span></p>
<p><b>One more important mention here</b><span style="font-weight: 400">: It&#8217;s suggested to use MySQL 9.7.1, or the next sub-releases, as 9.7.0 has some</span><a href="https://www.oracle.com/security-alerts/cspujun2026verbose.html"><span style="font-weight: 400"> higer severity CVE’s</span></a><span style="font-weight: 400">. If you are using </span><b>Percona Server for MySQL (PS), </b><span style="font-weight: 400">we</span> <a href="https://www.percona.com/blog/percona-server-mysql-8-4-9-9-7-0-skipped/"><b>skipped 9.7.0</b></a> <span style="font-weight: 400">and are shipping the fixed 9.7.1 version directly</span><b>.</b></p>
<p><b>Still, it&#8217;s highly recommended</b><span style="font-weight: 400"> to test any new component or changes in your lower/staging environment before deploying in production to better assess the overall impact on existing workload, queries, and database behaviour.</span></p>
<p><span style="font-weight: 400"> </span></p>
<p>The post <a href="https://www.percona.com/blog/inside-mysql-9-7-lts-features/">Inside MySQL 9.7 LTS Features</a> appeared first on <a href="https://www.percona.com">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/inside-mysql-9-7-lts-features/">Inside MySQL 9.7 LTS Features</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Hidden Gem: Online Schema Change without pt-osc</title>
        <link>https://mariadb.org/mariadb-hidden-gem-online-schema-change-without-pt-osc/</link>
        <pubDate>Tue, 14 Jul 2026 09:12:43 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>When people hear “online schema change” in the MySQL and MariaDB world, many immediately think about pt-online-schema-change. And for good reasons: for years, changing a large table in production was one of those tasks that could ruin your day. …<br />
Continue reading "MariaDB Hidden Gem: Online Schema Change without pt-osc"<br />
The post MariaDB Hidden Gem: Online Schema Change without pt-osc appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/mariadb-hidden-gem-online-schema-change-without-pt-osc/">MariaDB Hidden Gem: Online Schema Change without pt-osc</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>When people hear &#8220;online schema change&#8221; in the MySQL and MariaDB world, many immediately think about pt-online-schema-change. And for good reasons: for years, changing a large table in production was one of those tasks that could ruin your day. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/mariadb-hidden-gem-online-schema-change-without-pt-osc/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;MariaDB Hidden Gem: Online Schema Change without pt-osc&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/mariadb-hidden-gem-online-schema-change-without-pt-osc/">MariaDB Hidden Gem: Online Schema Change without pt-osc</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/mariadb-hidden-gem-online-schema-change-without-pt-osc/">MariaDB Hidden Gem: Online Schema Change without pt-osc</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MyDumper Locking Mechanisms Revisited: Introducing SAFE_NO_LOCK</title>
        <link>https://www.percona.com/blog/mydumper-locking-mechanisms-revisited-introducing-safe_no_lock/</link>
        <pubDate>Mon, 13 Jul 2026 12:24:41 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>About a year ago, we discussed how MyDumper refactored its locking mechanisms to move away from old, rigid flags and transitioned towards more flexible, streamlined execution. Since then, the MyDumper community hasn’t stood still. In recent releases, the locking architecture was further standardized under a single overarching option: --sync-thread-lock-mode. Along with this modernization came a … Continued<br />
The post MyDumper Locking Mechanisms Revisited: Introducing SAFE_NO_LOCK appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/mydumper-locking-mechanisms-revisited-introducing-safe_no_lock/">MyDumper Locking Mechanisms Revisited: Introducing SAFE_NO_LOCK</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>About a year ago, we discussed how <a href="https://www.percona.com/blog/mydumper-refactors-locking-mechanisms/">MyDumper refactored its locking mechanisms</a> to move away from old, rigid flags and transitioned towards more flexible, streamlined execution. Since then, the MyDumper community hasn&#8217;t stood still.</p>
<p>In recent releases, the locking architecture was further standardized under a single overarching option: <code>--sync-thread-lock-mode</code>. Along with this modernization came a powerful new safety feature designed to give you lock-free thread synchronization without risking silent inconsistency: SAFE_NO_LOCK (merged in PR <a href="https://github.com/mydumper/mydumper/pull/2031">#2031</a>).</p>
<p>Let’s explore the new thread-synchronization landscape and break down when you should use each mode.</p>
<h2>What is <code>--sync-thread-lock-mode</code>?</h2>
<p>Previously, flags like <code>-k</code>, <code>--no-locks</code> or <code>--lock-all-tables</code> dictated how MyDumper behaved. These have now been deprecated in favor of <code>--sync-thread-lock-mode</code>, which accepts five core values: AUTO, FTWRL, LOCK_ALL, GTID, NO_LOCK, and the newly added SAFE_NO_LOCK.</p>
<p>As a multi-threaded tool, MyDumper’s main challenge is ensuring that every single worker thread establishes its database snapshot at the exact same point in time. The sync mode you choose completely alters how MyDumper orchestrates this point-in-time synchronization.</p>
<h2>Understanding SAFE_NO_LOCK</h2>
<p>MyDumper fires off START TRANSACTION WITH CONSISTENT SNAPSHOT across its threads. It captures the binary log position at the very beginning of the process and compares it after the worker threads have attempted to synchronize.</p>
<p><span style="font-weight: 400">When using NO_LOCK, if the threads don&#8217;t actually hit the same point in time—meaning they fail to synchronize—MyDumper simply logs a warning and continues backing up. This results in an inconsistent backup, which is a massive gamble for production systems.</span></p>
<p>SAFE_NO_LOCK adds a strict transactional safety net. If MyDumper detects any differences or drift in the binlog position among the threads during the synchronization phase, it immediately stops the backup. This prevents you from generating a corrupted, out-of-sync backup that will fail or cause data anomalies during a later restore.</p>
<h2>Choosing the Right Mode</h2>
<p>Depending on your architecture, uptime requirements, and database vendor, here is the breakdown of when to use each mode:</p>
<h3>AUTO (The Default)</h3>
<p>What it does: MyDumper <strong>automatically evaluates</strong> the database vendor, version, and capabilities to choose the safest, <strong>least-intrusive method</strong>.</p>
<p>When to use it: The vast majority of standard backups. It <strong>removes the guesswork</strong> and adapts dynamically if your database infrastructure upgrades.</p>
<h3>FTWRL (Flush Tables With Read Lock)</h3>
<p>What it does: It is the traditional method. It issues a <strong>global read lock</strong> via FLUSH TABLES WITH READ LOCK on the main connection, forces all threads to establish their consistent snapshot at that exact freeze frame, and then releases the lock.</p>
<p>When to use it:</p>
<ul>
<li>When you have non-transactional tables (like MyISAM or ARCHIVE) that must be consistently backed up alongside InnoDB tables.</li>
<li>When your database lacks advanced snapshot-tracking capabilities (older MySQL versions).</li>
</ul>
<p><span style="font-weight: 400">Downside: It </span><b>blocks writes</b><span style="font-weight: 400"> across the entire instance during synchronization, which can cause a queue cascade </span><b>on a busy production server</b><span style="font-weight: 400">.</span></p>
<h3>GTID</h3>
<p><span style="font-weight: 400">Leverages a specific server variable in Percona Server called binlog_snapshot_gtid_executed to instantly verify if all threads are watching the exact same transaction state.</span></p>
<p>When to use it: If you are running <strong>Percona Server with GTID enabled</strong> and want a lightning-fast, lockless synchronization method that is guaranteed to be transactionally accurate.</p>
<h3>SAFE_NO_LOCK</h3>
<p>What it does: Uses transaction isolation to sync threads without global locks, but immediately aborts the backup if binlog positions diverge during initialization.</p>
<p>When to use it:</p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">On highly sensitive production systems, where </span><b>global write locks are absolutely forbidden</b><span style="font-weight: 400"> due to strict SLAs.</span></li>
<li>When you are <strong>entirely utilizing transactional engines</strong> (InnoDB).</li>
<li>When you want a <strong>lock-free backup</strong> but require absolute certainty that your backup is <strong>100% consistent</strong>.</li>
</ul>
<p><span style="font-weight: 400">Downside: In high-throughput write environments, threads may fail to align within the retry window, causing the backup job to abort. (Though an abort is always preferable to an inconsistent backup!).</span></p>
<h3>NO_LOCK</h3>
<p>What it does: Attempts lockless synchronization but logs a warning and proceeds even if consistency fails.</p>
<p><span style="font-weight: 400">When to use it: Rarely, if ever, in the production primary server. It is </span><b>acceptable for staging environments</b><span style="font-weight: 400">, development seeding, or scratch pads where data accuracy and point-in-time consistency are entirely secondary to getting a quick data dump without locking the server.</span></p>
<h3>LOCK_ALL</h3>
<p>What it does: Explicitly issues a <strong>LOCK TABLE</strong> command for every single table being exported.</p>
<p>When to use it: Primarily a fallback mode. Use this only when FLUSH TABLES WITH READ LOCK is completely unavailable due to restricted cloud permissions (certain restricted PaaS environments) or specific database limitations.</p>
<h2>Conclusion</h2>
<p>The addition of <code>--sync-thread-lock-mode=SAFE_NO_LOCK</code> bridges a long-standing gap in logical MySQL backups: achieving a completely lockless synchronization state without flying blind. By implementing a strict fail-fast policy, MyDumper ensures that database administrators never have to sacrifice backup integrity for system availability.</p>
<p>The post <a href="https://www.percona.com/blog/mydumper-locking-mechanisms-revisited-introducing-safe_no_lock/">MyDumper Locking Mechanisms Revisited: Introducing SAFE_NO_LOCK</a> appeared first on <a href="https://www.percona.com">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/mydumper-locking-mechanisms-revisited-introducing-safe_no_lock/">MyDumper Locking Mechanisms Revisited: Introducing SAFE_NO_LOCK</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Running DuckDB as a MySQL 9.7 storage engine</title>
        <link>https://www.percona.com/blog/running-duckdb-as-a-mysql-9-7-storage-engine/</link>
        <pubDate>Fri, 10 Jul 2026 13:38:16 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>ducksdb-mysql-engine is an experimental build of MySQL 9.7 where a table you mark ENGINE=DuckDB answers analytical queries from DuckDB instead of InnoDB. Same server, same connection, no second copy of the data. On TPC-H at scale factor 10, InnoDB times out on 6 of the 22 queries and burns 1317 seconds on the 16 it … Continued<br />
The post Running DuckDB as a MySQL 9.7 storage engine appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/running-duckdb-as-a-mysql-9-7-storage-engine/">Running DuckDB as a MySQL 9.7 storage engine</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p align="justify"><span style="color: #000000"><span style="font-family: Times New Roman, serif"><span style="font-size: small">ducksdb-mysql-engine</span></span></span> <span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">is an experimental build of MySQL 9.7 where a table you mark </span></span></span><span style="color: #000000"><span style="font-family: Times New Roman, serif"><span style="font-size: small">ENGINE=DuckDB</span></span></span> <span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">answers analytical queries from DuckDB instead of InnoDB. Same server, same connection, no second copy of the data. On TPC-H at scale factor 10, InnoDB times out on 6 of the 22 queries and burns 1317 seconds on the 16 it finishes. The DuckDB tables run all 22 in about 15 seconds.</span></span></span></p>
<p align="justify"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">It&#8217;s an experiment, not production software. It patches </span></span></span><span style="color: #000000"><span style="font-family: Times New Roman, serif"><span style="font-size: small">mysqld</span></span></span> <span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">and has rough edges, which we list at the end. Source is on GitHub under GPLv2:</span></span></span><a href="https://github.com/EvgeniyPatlan/ducksdb-mysql-engine"><span style="color: #000000">     </span><span style="color: #1155cc"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><u>https://github.com/EvgeniyPatlan/ducksdb-mysql-engine</u></span></span></span></a><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">.</span></span></span></p>
<h2 class="western" align="justify"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: x-large"><b>Why we made it</b></span></span></span></h2>
<p align="justify"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">MySQL is great for transactions and slow at analytics. A wide </span></span></span><span style="color: #000000"><span style="font-family: Times New Roman, serif"><span style="font-size: small">GROUP BY</span></span></span> <span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">over a few hundred million rows, or a six-way join, takes minutes on InnoDB. The usual fix is to copy the data into a column store and keep it in sync, so now you&#8217;re running two systems and the pipeline between them.</span></span></span></p>
<p align="justify"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">We wanted the table itself to be the column store, with the heavy queries offloaded for you. Mark it </span></span></span><span style="color: #000000"><span style="font-family: Times New Roman, serif"><span style="font-size: small">ENGINE=DuckDB</span></span></span><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">, query it the way you always have, and DuckDB does the analytical work.</span></span></span></p>
<h2 class="western" align="justify"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: x-large"><b>What it actually is</b></span></span></span></h2>
<p align="justify"><a href="https://duckdb.org/"><span style="color: #1155cc"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><u>DuckDB</u></span></span></span></a> <span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">is an in-process columnar query engine, basically SQLite for OLAP. It stores data by column and it&#8217;s built for scans and aggregations, which is exactly what a row store is bad at.</span></span></span></p>
<p align="justify"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">We&#8217;re not the first to put it behind a relational table. Alibaba&#8217;s</span></span></span><a href="https://github.com/alibaba/AliSQL"> <span style="color: #1155cc"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><u>AliSQL</u></span></span></span></a> <span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">has had a built-in DuckDB engine for a while. MariaDB shipped</span></span></span><a href="https://mariadb.org/mariadb-duckdb-a-new-playground-for-analytics-a-first-look-at-the-new-storage-engine/"> <span style="color: #1155cc"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><u>MariaDB DuckDB</u></span></span></span></a> <span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">about a week ago, while we were already building ours. AliSQL got there first; MariaDB and we landed on the same idea independently, around the same time, them on MariaDB and us on stock MySQL 9.7. Their engine is the closest comparison to ours, so it&#8217;s in the benchmarks below.</span></span></span></p>
<h2 class="western" align="justify"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: x-large"><b>How it hooks into MySQL</b></span></span></span></h2>
<p align="justify"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">MySQL doesn&#8217;t have a </span></span></span><span style="color: #000000"><span style="font-family: Times New Roman, serif"><span style="font-size: small">select_handler</span></span></span><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">, the API MariaDB uses to grab a whole </span></span></span><span style="color: #000000"><span style="font-family: Times New Roman, serif"><span style="font-size: small">SELECT</span></span></span> <span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">and run it inside an engine. We added our own: a </span></span></span><span style="color: #000000"><span style="font-family: Times New Roman, serif"><span style="font-size: small">handlerton::pushdown_select</span></span></span> <span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">hook.</span></span></span></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-50220 size-full" src="https://www.percona.com/wp-content/uploads/2026/07/architecture.png" alt="" width="761" height="883" /></p>
<p align="justify"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>The pushdown path. Either the whole query renders to DuckDB SQL and runs columnar, or it declines and the normal row path handles it.</i></span></span></span></p>
<p align="justify"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">The engine is compiled into </span></span></span><span style="color: #000000"><span style="font-family: Times New Roman, serif"><span style="font-size: small">mysqld</span></span></span><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">, and each schema is one DuckDB file under the datadir. Three patches do the integration, and all three are generic, so they&#8217;ll fire for any engine that exposes the hook:</span></span></span></p>
<ul>
<li><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">The hook runs at the end of <span style="font-family: Times New Roman, serif">JOIN::optimize()</span>. If every base table in the block is one engine that has the hook, that engine looks at the optimized <span style="font-family: Times New Roman, serif">JOIN</span>, and if it can translate the whole query it sets <span style="font-family: Times New Roman, serif">JOIN::override_executor_func</span> (which the executor already checks in <span style="font-family: Times New Roman, serif">sql_union.cc</span>). The query gets regenerated as DuckDB SQL, prepared once, run, and the aggregated result is staged into a temp table. <span style="font-family: Times New Roman, serif">EXPLAIN</span> is left alone.</span></span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">A server-side <span style="font-family: Times New Roman, serif">LOAD DATA INFILE</span> goes into a DuckDB <span style="font-family: Times New Roman, serif">COPY</span> instead of crawling through <span style="font-family: Times New Roman, serif">write_row</span> row by row. At 600M rows that&#8217;s a 20-minute load instead of 80.</span></span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">For single-engine statements we clear <span style="font-family: Times New Roman, serif">OPTIMIZER_SWITCH_SEMIJOIN</span> in <span style="font-family: Times New Roman, serif">prepare</span>, so <span style="font-family: Times New Roman, serif">IN</span>, <span style="font-family: Times New Roman, serif">EXISTS</span>, <span style="font-family: Times New Roman, serif">NOT IN</span> and <span style="font-family: Times New Roman, serif">NOT EXISTS</span> stay as subqueries the builder can render instead of getting rewritten into semijoin nests it can&#8217;t recognize.</span></span></span></li>
</ul>
<p align="justify"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">The builder only renders a node when the output is provably identical to what MySQL would return. If it can&#8217;t, it declines and MySQL runs the query unchanged. Literals are bound as parameters. Collation, NULL ordering and decimal scale are matched on purpose, and an unmapped collation or a </span></span></span><span style="color: #000000"><span style="font-family: Times New Roman, serif"><span style="font-size: small">REAL</span></span></span> <span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">literal is enough to make it back off. With that in place, all 22 TPC-H queries push down and match InnoDB row for row.</span></span></span></p>
<p>&nbsp;</p>
<h2 class="western"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: x-large"><b>Getting started</b></span></span></span></h2>
<p><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">The fastest way in is the image:</span></span></span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">docker run -d --name mysql-duckdb -p 3306:3306 
-e MYSQL_ROOT_PASSWORD=secret 
-v mysql-duckdb-data:/var/lib/mysql 
evgeniypatlan/test-images:mysql-9.7-duckdb-v0.2.0</pre>
<p><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">Make a table, put a few rows in, run an aggregate:</span></span></span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">CREATE DATABASE shop; USE shop;
CREATE TABLE sales (id INT PRIMARY KEY, region INT, amount DECIMAL(12,2)) ENGINE=DuckDB;
INSERT INTO sales VALUES (1,1,100),(2,1,200),(3,2,50);</pre>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">SELECT region, SUM(amount) FROM sales GROUP BY region;
-- region | SUM(amount)
-- 1 | 300.00
-- 2 | 50.00</pre>
<p>&nbsp;</p>
<p align="justify"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">Nothing about that query is special, and that is the point. To check it actually went to DuckDB rather than down the row path, watch the </span></span></span><span style="color: #000000"><span style="font-family: Times New Roman, serif"><span style="font-size: small">Ducksdb_pushdown_count</span></span></span> <span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">status variable:</span></span></span></p>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">SELECT region, SUM(amount) FROM sales GROUP BY region; -- offloaded
SHOW STATUS LIKE 'Ducksdb_pushdown_count'; -- counter goes +1

SELECT * FROM sales WHERE id = 3; -- point lookup
SHOW STATUS LIKE 'Ducksdb_pushdown_count'; -- counter unchanged</pre>
<p>&nbsp;</p>
<p align="justify"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">The single-row lookup stays on the row path deliberately. For one row an index seek beats spinning up a DuckDB result, so there is no reason to offload it. OLTP keeps its path, analytics get the column store, and you do not pick by hand.</span></span></span></p>
<p><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">If you would rather build it, you need the MySQL 9.7 tree under </span></span></span><span style="color: #000000"><span style="font-family: Times New Roman, serif"><span style="font-size: small">vendor/mysql-server/</span></span></span> <span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">and a DuckDB prefix, then:</span></span></span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">ln -s ../../engine vendor/mysql-server/storage/duckdb
scripts/build-server.sh # applies the 3 patches, builds mysqld + clients</pre>
<p>&nbsp;</p>
<h2 class="western"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: x-large"><b>Does it actually go fast?</b></span></span></span></h2>
<p align="justify"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">All 22 TPC-H queries, were executed in a Docker on one laptop (20 cores, 62 GiB RAM), the same data loaded into four engines: InnoDB, our MySQL+DuckDB, MariaDB+DuckDB, and standalone DuckDB as the reference. Warm wall-clock, minimum over a few runs, in seconds.</span></span></span></p>
<h3 class="western"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: medium"><b>SF10, around 60 million lineitem rows</b></span></span></span></h3>
<p><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">A handful of rows here; the whole table is in </span></span></span><span style="color: #000000"><span style="font-family: Times New Roman, serif"><span style="font-size: small">docs/tpch_engine_comparison.md</span></span></span><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">:</span></span></span></p>
<table width="643" cellspacing="0" cellpadding="7">
<tbody>
<tr>
<td width="58"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">Query</span></span></span></td>
<td width="125"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">InnoDB</span></span></span></td>
<td width="118"><span style="color: #000000"><span style="font-family: Times New Roman, serif"><span style="font-size: medium">MySQL+DuckDB</span></span></span></td>
<td width="144"><span style="color: #000000"><span style="font-family: Times New Roman, serif"><span style="font-size: medium">MariaDB +DuckDB</span></span></span></td>
<td width="125"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">Native DuckDB</span></span></span></td>
</tr>
<tr>
<td width="58"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">Q1</span></span></span></td>
<td width="125"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">&gt;180</span></span></span></td>
<td width="118"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">1.77</span></span></span></td>
<td width="144"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">0.84</span></span></span></td>
<td width="125"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">0.77</span></span></span></td>
</tr>
<tr>
<td width="58"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">Q5</span></span></span></td>
<td width="125"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">127.6</span></span></span></td>
<td width="118"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">0.53</span></span></span></td>
<td width="144"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">0.46</span></span></span></td>
<td width="125"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">0.71</span></span></span></td>
</tr>
<tr>
<td width="58"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">Q7</span></span></span></td>
<td width="125"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">145.0</span></span></span></td>
<td width="118"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">0.45</span></span></span></td>
<td width="144"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">0.38</span></span></span></td>
<td width="125"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">0.67</span></span></span></td>
</tr>
<tr>
<td width="58"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">Q9</span></span></span></td>
<td width="125"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">&gt;180</span></span></span></td>
<td width="118"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">1.52</span></span></span></td>
<td width="144"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">2.30</span></span></span></td>
<td width="125"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">1.78</span></span></span></td>
</tr>
<tr>
<td width="58"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">Q18</span></span></span></td>
<td width="125"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">101.7</span></span></span></td>
<td width="118"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">1.35</span></span></span></td>
<td width="144"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">1.39</span></span></span></td>
<td width="125"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">1.31</span></span></span></td>
</tr>
<tr>
<td width="58"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">Q19</span></span></span></td>
<td width="125"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">120.4</span></span></span></td>
<td width="118"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">0.15</span></span></span></td>
<td width="144"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">0.67</span></span></span></td>
<td width="125"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">0.83</span></span></span></td>
</tr>
<tr>
<td width="58"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">All 22 </span></span></span></td>
<td width="125"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">Finished 16/22</span></span></span></td>
<td width="118"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">15.1s</span></span></span></td>
<td width="144"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">13.3s</span></span></span></td>
<td width="125"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">16.3</span></span></span></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p align="center"><img loading="lazy" decoding="async" class="aligncenter wp-image-50219 size-full" src="https://www.percona.com/wp-content/uploads/2026/07/sf10.png" alt="" width="2233" height="888" /></p>
<p align="center"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>SF10, all 22 queries, log scale (lower is better). Hatched InnoDB bars did not finish inside 180 s. The three DuckDB engines sit in a tight band near the floor.</i></span></span></span></p>
<p align="justify"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">InnoDB is somewhere between 100 and 340 times slower per query, and on 6 of the 22 it never finished inside the 180-second cap (the correlated subqueries and the heaviest scans). It burned 1317 seconds on just the 16 it did finish. The three DuckDB engines get through all 22 in about 15 seconds, and ours lands right between MariaDB and plain DuckDB. The gap is so big there is not much else to say about it.</span></span></span></p>
<h3 class="western"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: medium"><b>SF100, around 600 million lineitem rows</b></span></span></span></h3>
<p><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">At this size InnoDB is out of the running (a copy of the data alone is about 100 GB and queries run for hours), so it is the three DuckDB engines only, run one at a time:</span></span></span></p>
<table width="640" cellspacing="0" cellpadding="7">
<tbody>
<tr>
<td width="142"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">Query</span></span></span></td>
<td width="146"><span style="color: #000000"><span style="font-family: Times New Roman, serif"><span style="font-size: medium">MySQL+DuckDB</span></span></span></td>
<td width="146"><span style="color: #000000"><span style="font-family: Times New Roman, serif"><span style="font-size: medium">MariaDB+DuckDB</span></span></span></td>
<td width="148"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">Native DuckDB</span></span></span></td>
</tr>
<tr>
<td width="142"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>Q1</i></span></span></span></td>
<td width="146"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>15.25</i></span></span></span></td>
<td width="146"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>6.50</i></span></span></span></td>
<td width="148"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>5.50</i></span></span></span></td>
</tr>
<tr>
<td width="142"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>Q9</i></span></span></span></td>
<td width="146"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>20.97</i></span></span></span></td>
<td width="146"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>115.29</i></span></span></span></td>
<td width="148"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>19.54</i></span></span></span></td>
</tr>
<tr>
<td width="142"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>Q10</i></span></span></span></td>
<td width="146"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>10.64</i></span></span></span></td>
<td width="146"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>ERR</i></span></span></span></td>
<td width="148"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>8.14</i></span></span></span></td>
</tr>
<tr>
<td width="142"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>Q13</i></span></span></span></td>
<td width="146"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>19.75</i></span></span></span></td>
<td width="146"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>ERR</i></span></span></span></td>
<td width="148"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>13.27</i></span></span></span></td>
</tr>
<tr>
<td width="142"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>Q18</i></span></span></span></td>
<td width="146"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>14.88</i></span></span></span></td>
<td width="146"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>29.62</i></span></span></span></td>
<td width="148"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>11.08</i></span></span></span></td>
</tr>
<tr>
<td width="142"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>Q19</i></span></span></span></td>
<td width="146"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>2.91</i></span></span></span></td>
<td width="146"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>7.98</i></span></span></span></td>
<td width="148"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>6.61</i></span></span></span></td>
</tr>
<tr>
<td width="142"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>Correct</i></span></span></span></td>
<td width="146"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>22/22</i></span></span></span></td>
<td width="146"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>20/22</i></span></span></span></td>
<td width="148"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>22/22</i></span></span></span></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-50218 size-full" src="https://www.percona.com/wp-content/uploads/2026/07/sf100.png" alt="" width="2233" height="888" /></p>
<p align="center"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><i>SF100, three DuckDB engines, log scale (lower is better). Q15 for our engine is shown at its matched-memory time (~4 s); the capped run measured 1309 s, explained below. MariaDB errored on Q10 and Q13.</i></span></span></span></p>
<p align="justify"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">At 600 million rows ours is still correct on all 22 and stays close to plain DuckDB. MariaDB&#8217;s engine drops two queries (Q10, and Q13 on its column-list syntax) and is a lot slower on the big joins &#8211; Q9 took 115 seconds against our 21 and native&#8217;s 20.</span></span></span></p>
<p align="justify"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">One honest word on Q15 at SF100, because in the full table it shows an ugly number for our engine. It is not a real loss. We capped DuckDB&#8217;s memory so it spills to disk instead of getting OOM-killed inside </span></span></span><span style="color: #000000"><span style="font-family: Times New Roman, serif"><span style="font-size: small">mysqld</span></span></span><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">, and under that cap Q15&#8217;s CTE spills a lot. Give it the memory MariaDB had and it runs in about 4 seconds, like native. The answer was always right; only the clock was bad.</span></span></span></p>
<p align="justify"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">And one number we did not expect: loading those 600 million rows took about 20 minutes with our engine (the </span></span></span><span style="color: #000000"><span style="font-family: Times New Roman, serif"><span style="font-size: small">COPY</span></span></span> <span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">shortcut) versus about 80 minutes with MariaDB, which loads row by row on a single core. Roughly four times faster to get the data in.</span></span></span></p>
<h2 class="western"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: x-large"><b>Try it, then tell us</b></span></span></span></h2>
<p><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">If any of this sounds useful, pull the image and throw your own queries at it:</span></span></span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">docker run -d -p 3306:3306 -e MYSQL_ROOT_PASSWORD=secret 
evgeniypatlan/test-images:mysql-9.7-duckdb-v0.2.0</pre>
</p>
<p align="justify"><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">The source is on GitHub (GPLv2), patches and benchmark harness included:</span></span></span><a href="https://github.com/EvgeniyPatlan/ducksdb-mysql-engine"> <span style="color: #1155cc"><span style="font-family: Arial, sans-serif"><span style="font-size: small"><u>https://github.com/EvgeniyPatlan/ducksdb-mysql-engine</u></span></span></span></a><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">. The full per-query benchmark and how we measured it live in </span></span></span><span style="color: #000000"><span style="font-family: Times New Roman, serif"><span style="font-size: small">docs/tpch_engine_comparison.md</span></span></span><span style="color: #000000"><span style="font-family: Arial, sans-serif"><span style="font-size: small">.</span></span></span></p>
<p>&nbsp;</p>
<p>The post <a href="https://www.percona.com/blog/running-duckdb-as-a-mysql-9-7-storage-engine/">Running DuckDB as a MySQL 9.7 storage engine</a> appeared first on <a href="https://www.percona.com">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/running-duckdb-as-a-mysql-9-7-storage-engine/">Running DuckDB as a MySQL 9.7 storage engine</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB 13.1 Feature in Focus: BLOB, TEXT, JSON and GEOMETRY Support in the HEAP Engine</title>
        <link>https://mariadb.org/mariadb-13-1-feature-in-focus-blob-text-json-and-geometry-support-in-the-heap-engine/</link>
        <pubDate>Fri, 10 Jul 2026 04:29:32 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Some contributions improve MariaDB Server by adding new capabilities.<br />
Some go further: they start from a concrete production problem with an existing feature, not a bug, but a design limitation, solve it upstream, and leave the whole ecosystem better off. …<br />
Continue reading "MariaDB 13.1 Feature in Focus: BLOB, TEXT, JSON and GEOMETRY Support in the HEAP Engine"<br />
The post MariaDB 13.1 Feature in Focus: BLOB, TEXT, JSON and GEOMETRY Support in the HEAP Engine appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/mariadb-13-1-feature-in-focus-blob-text-json-and-geometry-support-in-the-heap-engine/">MariaDB 13.1 Feature in Focus: BLOB, TEXT, JSON and GEOMETRY Support in the HEAP Engine</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Some contributions improve MariaDB Server by adding new capabilities.<br />
Some go further: they start from a concrete production problem with an existing feature, not a bug, but a design limitation, solve it upstream, and leave the whole ecosystem better off. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/mariadb-13-1-feature-in-focus-blob-text-json-and-geometry-support-in-the-heap-engine/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;MariaDB 13.1 Feature in Focus: BLOB, TEXT, JSON and GEOMETRY Support in the HEAP Engine&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/mariadb-13-1-feature-in-focus-blob-text-json-and-geometry-support-in-the-heap-engine/">MariaDB 13.1 Feature in Focus: BLOB, TEXT, JSON and GEOMETRY Support in the HEAP Engine</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/mariadb-13-1-feature-in-focus-blob-text-json-and-geometry-support-in-the-heap-engine/">MariaDB 13.1 Feature in Focus: BLOB, TEXT, JSON and GEOMETRY Support in the HEAP Engine</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>An Easy Path from MySQL to MariaDB: Introducing MariaDB Migrator</title>
        <link>https://mariadb.com/resources/blog/an-easy-path-from-mysql-to-mariadb-introducing-mariadb-migrator/</link>
        <pubDate>Thu, 09 Jul 2026 18:05:57 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>Migrating from MySQL to MariaDB is not considered to be an overly complex process.  After all, the two databases share […]</p>
<p><a href="https://mariadb.com/resources/blog/an-easy-path-from-mysql-to-mariadb-introducing-mariadb-migrator/">An Easy Path from MySQL to MariaDB: Introducing MariaDB Migrator</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Migrating from MySQL to MariaDB is not considered to be an overly complex process. After all, the two databases share the same DNA, as MariaDB was born as a fork initiated by MySQL. Organizations can often make the switch without the complex code rewrites or architectural overhauls required when migrating to entirely different database systems like, say PostgreSQL. However…</p>
<p><a href="https://mariadb.com/resources/blog/an-easy-path-from-mysql-to-mariadb-introducing-mariadb-migrator/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/an-easy-path-from-mysql-to-mariadb-introducing-mariadb-migrator/">An Easy Path from MySQL to MariaDB: Introducing MariaDB Migrator</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Using MariaDB Serverless Cloud Deployment for Uneven AI Workloads</title>
        <link>https://mariadb.com/resources/blog/using-mariadb-serverless-cloud-deployment-for-uneven-ai-workloads/</link>
        <pubDate>Wed, 08 Jul 2026 20:24:19 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>The promise of “serverless” is attractive to AI developers. Serverless is a cloud computing model that abstracts away infrastructure management, […]</p>
<p><a href="https://mariadb.com/resources/blog/using-mariadb-serverless-cloud-deployment-for-uneven-ai-workloads/">Using MariaDB Serverless Cloud Deployment for Uneven AI Workloads</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>The promise of “serverless” is attractive to AI developers. Serverless is a cloud computing model that abstracts away infrastructure management, allowing developers to focus on building applications that scale automatically based on demand while paying only for the resources they consume. It sounds great, but are developers having success using serverless architecture that truly supports the high…</p>
<p><a href="https://mariadb.com/resources/blog/using-mariadb-serverless-cloud-deployment-for-uneven-ai-workloads/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/using-mariadb-serverless-cloud-deployment-for-uneven-ai-workloads/">Using MariaDB Serverless Cloud Deployment for Uneven AI Workloads</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Foundation Sea Lion Champions Nominees: Federico Razzoli</title>
        <link>https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-federico-razzoli/</link>
        <pubDate>Wed, 08 Jul 2026 14:18:05 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Interview with Federico Razzoli, nominated in the Community Leadership category.<br />
The MariaDB Foundation Sea Lion Champions program celebrates the people and organizations who help make the MariaDB ecosystem stronger, more open, and more useful for everyone. …<br />
Continue reading "MariaDB Foundation Sea Lion Champions Nominees: Federico Razzoli"<br />
The post MariaDB Foundation Sea Lion Champions Nominees: Federico Razzoli appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-federico-razzoli/">MariaDB Foundation Sea Lion Champions Nominees: Federico Razzoli</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Interview with Federico Razzoli, nominated in the Community Leadership category.<br />
The MariaDB Foundation Sea Lion Champions program celebrates the people and organizations who help make the MariaDB ecosystem stronger, more open, and more useful for everyone. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-federico-razzoli/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;MariaDB Foundation Sea Lion Champions Nominees: Federico Razzoli&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-federico-razzoli/">MariaDB Foundation Sea Lion Champions Nominees: Federico Razzoli</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-federico-razzoli/">MariaDB Foundation Sea Lion Champions Nominees: Federico Razzoli</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>pg_tde: our fork is temporary, our commitment to open TDE is not</title>
        <link>https://percona.community/blog/2026/07/08/pg_tde-our-fork-is-temporary-our-commitment-to-open-tde-is-not/</link>
        <pubDate>Wed, 08 Jul 2026 00:00:00 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>Recently we noticed a LinkedIn post promoting open_pg_tde, a fork of our pg_tde, claiming to be more open. I looked at the repository, and have to disagree with their claim. In this blog post, I’ll explain why.</p>
<p><a href="https://percona.community/blog/2026/07/08/pg_tde-our-fork-is-temporary-our-commitment-to-open-tde-is-not/">pg_tde: our fork is temporary, our commitment to open TDE is not</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Recently we noticed a LinkedIn post promoting <a href="https://github.com/commandprompt/open_pg_tde" target="_blank" rel="noopener noreferrer">open_pg_tde</a>, a fork of our <a href="https://github.com/percona/pg_tde" target="_blank" rel="noopener noreferrer">pg_tde</a>, claiming to be more open.<br />
I looked at the repository, and have to disagree with their claim.<br />
In this blog post, I’ll explain why.</p>
<p>The short version: open_pg_tde needs the exact same modified PostgreSQL that pg_tde does – TDE isn’t possible without those upstream changes.<br />
The only difference is delivery: they ship those changes as a patch file users have to apply by hand, while we provide a ready-made branch.</p>
<h2 id="upstreaming-tde">Upstreaming TDE!</h2>
<p>The main point of open_pg_tde is that it is more open, as it is not gated behind a vendor fork.<br />
A bit later I’ll go into details why I think that’s incorrect from a technical point of view, but before that, I want to make something clear:<br />
we do not want to keep TDE in our fork, we are actively working on upstreaming it!</p>
<p>The LinkedIn post also linked to a pgedge blog post written at the end of May, <a href="https://www.pgedge.com/blog/why-postgres-lacks-transparent-data-encryption" target="_blank" rel="noopener noreferrer">Why Postgres Lacks Transparent Data Encryption</a>.</p>
<p>While it seems to be optimistic about the future of encryption in the community version, it also missed that we had not <a href="https://2026.pgconf.dev/session/559" target="_blank" rel="noopener noreferrer">one</a>, but <a href="https://2026.pgconf.dev/session/738" target="_blank" rel="noopener noreferrer">two</a> sessions about it at pgconf.dev, the first one organized by Kai Wagner from Percona, and the second one by Ants Aasma from Cybertec.</p>
<p>We had some really good discussions during those sessions, and ended up with lots of “homework”:<br />
things we wanted to explore and benchmark before continuing the discussion on pgsql-hackers, where the discussion will soon continue.</p>
<p>With this I want to emphasize that Percona is 100% behind making PostgreSQL transparent data encryption open, as part of the community.</p>
<p><figure>
<img decoding="async" src="https://percona.community/blog/2026/07/pg_tde_upstreaming.png" alt=" " /></figure>
</p>
<p>Our fork was born out of necessity, not because we wanted to have our own version.<br />
In fact, if you look back into the <a href="https://github.com/percona/pg_tde/commits/main/" target="_blank" rel="noopener noreferrer">git history of pg_tde</a>, or at our <a href="https://www.percona.com/blog/protect-your-postgresql-database-with-pg_tde-safe-and-secure/" target="_blank" rel="noopener noreferrer">earlier blog posts</a>, we first tried to make it work without any upstream patch. Unfortunately, that didn’t work out.</p>
<h2 id="why-do-we-have-our-fork">Why do we have our fork?</h2>
<p>The open_pg_tde documentation publishes the following comparison table:</p>
<p><figure>
<img decoding="async" src="https://percona.community/blog/2026/07/open_pg_tde_comparison.png" alt=" " /></figure>
</p>
<p>The table is clearly AI generated, and has some misleading and/or inconsistent elements.<br />
Here is what we think a more honest comparison looks like:</p>
<table>
<thead>
<tr>
<th>Aspect</th>
<th>pg_tde</th>
<th>open_pg_tde</th>
</tr>
</thead>
<tbody>
<tr>
<td>Requires a patched PostgreSQL</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>How the patches are delivered</td>
<td>Ready-made fork/branch</td>
<td>Patch file, applied by hand</td>
</tr>
<tr>
<td>Open source patches, cherry-pickable</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>Actually vendor locked</td>
<td>No</td>
<td>No</td>
</tr>
<tr>
<td>API-version safety check</td>
<td>Yes (<code>PERCONA_API_VERSION</code>)</td>
<td>No, it was removed</td>
</tr>
<tr>
<td>Guards against mismatched-package corruption</td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td>Supports PostgreSQL 16, 17, 18</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>Encrypts temporary files at rest</td>
<td>No</td>
<td>Yes</td>
</tr>
<tr>
<td>Supports all KMIP- and Vault-compatible key providers</td>
<td>Yes</td>
<td>Yes</td>
</tr>
</tbody>
</table>
<p>I’ll leave out the discussion about temporary files in this blog post.<br />
That’s a complex topic by itself, it raises many questions, and we have good reasons why we are still thinking about it instead of shipping a quick version prototyped with Claude.<br />
It is something I plan to talk about later, on its own.</p>
<p>Back to the comparison: it claims that pg_tde is vendor locked because it only works with our fork.<br />
I don’t think that’s the case:<br />
Our fork is completely open source, anybody can go to our <a href="https://github.com/percona/postgres/" target="_blank" rel="noopener noreferrer">GitHub</a> and cherry-pick our patches manually.</p>
<p>open_pg_tde doesn’t remove the need for these patches: it can’t, TDE requires them.<br />
It just ships them as a patch file users apply manually, rather than as a branch.<br />
Both approaches modify PostgreSQL identically.</p>
<p>The fork exists for one sole reason:<br />
convenience, we want to make the life of our users easier.<br />
Checking out a fork is easier than manually applying patch files.</p>
<p>So the difference between pg_tde and open_pg_tde is not <em>whether</em> you patch PostgreSQL, you do, either way.<br />
It’s <em>how</em> those patches reach you.</p>
<h2 id="percona_api_version">PERCONA_API_VERSION</h2>
<p>The open_pg_tde commit that <a href="https://github.com/commandprompt/open_pg_tde/commit/55ed7f1c4ad5bb31ab085e378699377c04158d09#diff-2b9df17a765260aa1b6bc32fedb30dee1d5f80f975252c2bf6308e5097591aac" target="_blank" rel="noopener noreferrer">removes “vendor lock-in”</a> is mainly a documentation change:<br />
it adds the patch file, and asks users to apply it manually.</p>
<p>It has one single code change other than that:<br />
in our upstream fork we define <code>PERCONA_API_VERSION</code> and check against it, and open_pg_tde removes both.</p>
<p>While it has PERCONA in its name, and because of that it has been misinterpreted as vendor lock-in, that isn’t why we added it:<br />
it’s to prevent accidents.</p>
<p>And with encryption, which modifies the storage of data, <strong>accidents might mean data corruption</strong>.</p>
<p>PostgreSQL normally is very stable:<br />
minor versions contain only bugfixes, the API/ABI is very stable, a minor upgrade is considered easy and safe.</p>
<p>However, when you start applying patches manually, you break this promise:<br />
is your patch as stable as PostgreSQL itself?</p>
<p>The reality is that it’s not.<br />
pg_tde is backported to earlier major versions. Both pg_tde and open_pg_tde support PostgreSQL 16, and we could backport it to even earlier versions.</p>
<p>This means that the patch has to apply to multiple major versions, and if we have to make a breaking change in it?<br />
Then we have to make that change in all major versions!</p>
<p>Our API version isn’t about locking users to our fork, it’s a safety net.<br />
It is there to make sure that upgrades happen correctly, and our users don’t accidentally mix pg_tde and PostgreSQL packages that aren’t 100% compatible, but seem to work.</p>
<p>Imagine this:</p>
<ol>
<li>You have a working PostgreSQL + pg_tde installation</li>
<li>There’s an update, you upgrade PostgreSQL</li>
<li>What you didn’t notice is that we also updated pg_tde.<br />
You forgot to update that package, or for some reason intentionally didn’t update it yet, and because we didn’t break the API boundary, everything seems to work.<br />
Except, we did change some internal details of how our patch works.<br />
It doesn’t cause any visible issues at first, but slowly some pages of your database are becoming unreadable, or you start getting segmentation faults when accessing a table…</li>
</ol>
<p>The above of course is a hypothetical scenario, we didn’t release any dangerous update like that.</p>
<p>But the point is, even if we have to, in pg_tde, we have safeguards.<br />
In our solution the API version check catches this: at the 3rd step, instead of a slow data corruption, we present you with an early error stating that you should fix your system.</p>
<p>In the above scenario, let’s say that in the first step you have a working installation where both the server and pg_tde have <code>PERCONA_API_VERSION=1</code>.<br />
After that, you only update the server, and the new version now has <code>PERCONA_API_VERSION=2</code>.<br />
Since the extension is still at the previous version 1, the server will fail immediately at startup, reminding you that these two packages are not compatible.</p>
<p>Maybe we could have called it something different, <code>TDE_PATCH_VERSION</code>, or something like that.<br />
But the goal is still the same, it is an important safeguard, please do not remove it!<br />
Currently open_pg_tde doesn’t protect against this type of mismatch.</p>
<p>In fact, in our latest release, not yet included in open_pg_tde, we did increment PERCONA_API_VERSION because of a slightly incompatible change.<br />
We don’t expect any data corruption possibilities from it, it was a very minor API change, but we want to play things safe, as keeping the data of our users secure is our first priority.</p>
<h2 id="patches-welcome">Patches welcome!</h2>
<p>If we look into the git history of open_pg_tde, it’s mostly (AI written) documentation changes.<br />
Other than the removal of the API check I explained above, there are two actual code changes:</p>
<ul>
<li>One is the addition of the AES-XTS algorithm for encrypting relation pages</li>
<li>Another is the support for temporary file encryption</li>
</ul>
<p>We would be happy to start a discussion of any of these features, or even others.<br />
If you want to contribute, please do not hesitate, and contact us.</p>
<p>This is the strength of open source: it allows contributions and open discussions.<br />
While the team behind open_pg_tde, or anybody else, can of course fork pg_tde this way (because we are open and do not gatekeep features), the energy spent on that could be used to make pg_tde better in a shared community effort.</p>
<p>You can open a <a href="https://github.com/percona/pg_tde/pulls" target="_blank" rel="noopener noreferrer">Pull Request</a>, or a <a href="https://github.com/percona/pg_tde/issues" target="_blank" rel="noopener noreferrer">GitHub Issue</a>, or even use our <a href="https://perconadev.atlassian.net/projects/PG/issues/" target="_blank" rel="noopener noreferrer">Jira</a>, all options are equally good!</p>
<p>Even an issue/PR stating “please call PERCONA_API_VERSION differently”, we are not against changing that if the consensus is that it should be something different.</p>
<p>But please don’t create forks without even reaching out to your “upstream”.<br />
That only increases fragmentation, and makes the life of our common audience harder.</p>
<p>What we ask for is simple: let’s make PostgreSQL better with our work, not harder to use.</p>
<p><figure>
<img decoding="async" src="https://percona.community/blog/2026/07/open_pg_tde_do_not_fork.png" alt=" " /></figure></p>
<p><a href="https://percona.community/blog/2026/07/08/pg_tde-our-fork-is-temporary-our-commitment-to-open-tde-is-not/">pg_tde: our fork is temporary, our commitment to open TDE is not</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Updated MariaDB C++ and ODBC Connectors now available</title>
        <link>https://mariadb.com/resources/blog/updated-mariadb-c-and-odbc-connectors-now-available/</link>
        <pubDate>Tue, 07 Jul 2026 15:23:24 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>MariaDB is pleased to announce the immediate availability of MariaDB Connector/C++ 1.1.8 and 1.0.7 and MariaDB Connector/ODBC 3.2.9 and 3.1.23. […]</p>
<p><a href="https://mariadb.com/resources/blog/updated-mariadb-c-and-odbc-connectors-now-available/">Updated MariaDB C++ and ODBC Connectors now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB is pleased to announce the immediate availability of MariaDB Connector/C++ 1.1.8 and 1.0.7 and MariaDB Connector/ODBC 3.2.9 and 3.1.23. All are Stable (GA) releases. Download Now See the release notes and changelogs for more details and visit mariadb.com/downloads/connectors to download.</p>
<p><a href="https://mariadb.com/resources/blog/updated-mariadb-c-and-odbc-connectors-now-available/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/updated-mariadb-c-and-odbc-connectors-now-available/">Updated MariaDB C++ and ODBC Connectors now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Percona Operator for MySQL 1.2.0: Cross-Site Replication, Encrypted Backups, and Automatic Storage Scaling</title>
        <link>https://www.percona.com/blog/percona-operator-for-mysql-1-2-0-cross-site-replication-encrypted-backups-storage-autoscaling/</link>
        <pubDate>Tue, 07 Jul 2026 13:19:26 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>  Percona Operator for MySQL 1.2.0 is out, and it closes three gaps that platform teams hit once a MySQL deployment grows past a single cluster. Picture a fleet that has outgrown one region: you want a warm replica cluster in a second data center, backups in object storage that pass an auditor’s encryption check, … Continued<br />
The post Percona Operator for MySQL 1.2.0: Cross-Site Replication, Encrypted Backups, and Automatic Storage Scaling appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/percona-operator-for-mysql-1-2-0-cross-site-replication-encrypted-backups-storage-autoscaling/">Percona Operator for MySQL 1.2.0: Cross-Site Replication, Encrypted Backups, and Automatic Storage Scaling</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="aligncenter wp-image-50188 size-large" src="https://www.percona.com/wp-content/uploads/2026/07/Hero-2400-x-880-1024x376.png" alt="" width="1024" height="376" /></p>
<p>&nbsp;</p>
<p><b>Percona Operator for MySQL 1.2.0</b><span style="font-weight: 400"> is out, and it closes three gaps that platform teams hit once a MySQL deployment grows past a single cluster. Picture a fleet that has outgrown one region: you want a warm replica cluster in a second data center, backups in object storage that pass an auditor&#8217;s encryption check, and volumes that grow before they fill at 3 a.m. Until now, each of those meant scripting around the operator. This release brings all three into the custom resource.</span></p>
<p><span style="font-weight: 400">The three headline features are </span><b>cross-site replication for Group Replication</b><span style="font-weight: 400">, </span><b>encrypted backups</b><span style="font-weight: 400">, and </span><b>automatic storage scaling</b><span style="font-weight: 400">. Each one turns a manual, error-prone procedure into a declarative field you set once and let the operator reconcile.</span></p>
<p><span style="font-weight: 400">The operator is open source and runs on any CNCF-certified Kubernetes distribution. Many of the changes in this release come straight from what users asked for on </span><a href="https://forums.percona.com/"><span style="font-weight: 400">forums.percona.com</span></a><span style="font-weight: 400"> and in the public issue tracker, from disaster-recovery topologies to backup encryption to storage that keeps up with data growth.</span></p>
<p><span style="font-weight: 400">In this post, you&#8217;ll learn about:</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">Cross-site replication for Group Replication clusters</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Encrypted backups to S3, GCS, and Azure</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Automatic storage scaling for MySQL data volumes</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Other improvements worth knowing about</span></li>
</ul>
<h2><b><br />
Cross-site replication for Group Replication</b></h2>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-50189 size-large" src="https://www.percona.com/wp-content/uploads/2026/07/clusterset-topology-1024x551.png" alt="" width="1024" height="551" /></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400">Group Replication gives you a self-healing, multi-primary-capable cluster inside one Kubernetes cluster. What it does not give you on its own is a second site. If the region hosting your cluster goes down, Group Replication cannot fail over to hardware it does not know about. Teams have solved this by hand-wiring asynchronous replication between clusters and babysitting it, which is exactly the kind of stateful glue an operator should own.</span></p>
<p>&nbsp;</p>
<h3><b>Why it matters</b></h3>
<p><span style="font-weight: 400">A disaster-recovery topology is only useful if it is reproducible and observable. Hand-built replication links drift: someone changes a credential, a channel stalls, and nobody notices until the failover that was supposed to save you does not work. Declaring the topology as a Kubernetes object means the operator reconciles it continuously, and the same manifest recreates it in staging, in a runbook test, and in the real event.</span></p>
<p>&nbsp;</p>
<h3><b>How it works</b></h3>
<p><span style="font-weight: 400">The operator adds a new custom resource, </span><strong>PerconaServerMySQLClusterSet</strong><span style="font-weight: 400">, that groups two or more Group Replication clusters into a single set with one primary. The operator drives MySQL Shell to build the InnoDB ClusterSet, wires the replica clusters to the primary, and tracks the topology in the resource&#8217;s status. A replica cluster provisions from the primary using a chosen recovery method, so you do not stage data manually.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">apiVersion: ps.percona.com/v1
kind: PerconaServerMySQLClusterSet
metadata:
  name: my-cluster-set
  finalizers:
    - percona.com/clusterset-dissolve
spec:
#  unsafeFlags:
#    forcedFailover: false
#    forcedClusterRemoval: false
  primaryCluster: pscluster1
  credentialsSecret:
    name: ps-cluster1-secrets
    key: clusterset
  sslMode: AUTO
  createReplicaClusterOptions:
    recoveryMethod: clone
  clusters:
    - innodbClusterName: pscluster1
      endpoints:
      - host: ps-cluster1-mysql-primary.default.svc.cluster.local
    - innodbClusterName: pscluster2
      endpoints:
      - host: ps-cluster2-mysql-0.ps-cluster2-mysql.default.svc.cluster.local
  mysqlshellRunner:
    image: percona/percona-server:8.4.10-10.1</pre>
<p><strong>primaryCluster</strong><span style="font-weight: 400"> names the source of truth. Each entry under </span><strong>clusters</strong><span style="font-weight: 400"> points at a Group Replication cluster by its InnoDB cluster name and reachable endpoints, so the clusters can live in separate namespaces or separate Kubernetes clusters joined by routable DNS. </span><strong>createReplicaClusterOptions.recoveryMethod: clone</strong><span style="font-weight: 400"> tells the replica to seed itself with a full clone. The </span><strong>percona.com/clusterset-dissolve</strong><span style="font-weight: 400"> finalizer ensures the operator tears the ClusterSet down cleanly instead of leaving orphaned replication channels behind.</span><br />
&nbsp;</p>
<h3><b>Failover and cleanup</b></h3>
<p><span style="font-weight: 400">Once the set exists, the operator keeps the replica clusters attached to the primary and surfaces the topology in the resource&#8217;s status, so you can see which cluster is primary and whether every replica is connected without shelling into MySQL Shell. A planned switchover promotes a replica to primary. The </span><span style="font-weight: 400">unsafeFlags</span><span style="font-weight: 400"> block gates the disruptive paths for when the primary is already gone.</span></p>
<blockquote>
<p><b>Note:</b><span style="font-weight: 400"> The unsafeFlags block gates disruptive operations such as forced failover and forced cluster removal. Leave these off for normal operation and reach for them only in a controlled recovery, since a forced failover can diverge history if the old primary comes back.</span></p>
</blockquote>
<p>&nbsp;</p>
<h2><b>Encrypted backups</b></h2>
<p><span style="font-weight: 400">Backups are the copy of your data most likely to leave the cluster&#8217;s security boundary. They land in an object-storage bucket, get replicated across a provider&#8217;s regions, and often live longer than the database that produced them. If they are not encrypted before they leave the pod, a bucket misconfiguration or a leaked credential exposes the whole dataset. This release lets the operator encrypt backup data as it is </span></p>
<p>&nbsp;</p>
<h3><b>How it works</b></h3>
<p><span style="font-weight: 400">Backups in the operator run on </span><a href="https://docs.percona.com/percona-xtrabackup/8.4/"><span style="font-weight: 400">Percona XtraBackup</span></a><span style="font-weight: 400">. XtraBackup encrypts the stream with its </span><span style="font-weight: 400">xbcrypt</span><span style="font-weight: 400"> component before uploading, so the data is ciphertext at rest in the bucket and stays that way until you restore it with the same key. You supply the key through a Kubernetes Secret and reference that Secret from the backup configuration. The operator never bakes the key into a manifest or an image.</span></p>
<p>&nbsp;</p>
<h3><b>Wiring it up</b></h3>
<p><span style="font-weight: 400">Point a storage target at an encryption-key Secret with </span><strong>encryptionKeySecret</strong><span style="font-weight: 400">:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">apiVersion: ps.percona.com/v1
kind: PerconaServerMySQL
metadata:
  name: cluster1
spec:
  backup:
    storages:
      s3-us-west:
        type: s3
        encryptionKeySecret:
          key: encryptionKey
          name: my-s3-encryption-key-secret
        s3:
          bucket: S3-BACKUP-BUCKET-NAME-HERE
          credentialsSecret: cluster1-s3-credentials
          region: us-west-2</pre>
<p><span style="font-weight: 400">The same </span><strong>encryptionKeySecret</strong><span style="font-weight: 400"> field works under S3, GCS, and Azure storage targets, so a multi-cloud backup policy uses one consistent mechanism. You can also set an </span><strong>encryptionKeySecret</strong><span style="font-weight: 400"> at the </span><strong>backup</strong><span style="font-weight: 400"> level to apply one key across every storage target instead of repeating it per bucket. The referenced Secret holds the key under the </span><strong>encryptionKey</strong><span style="font-weight: 400"> data field.</span></p>
<p>&nbsp;</p>
<h3><b>Restoring an encrypted backup</b></h3>
<p><span style="font-weight: 400">Encryption is transparent on the way back in. When you restore, the operator reads the same Secret, hands the key to XtraBackup, and decrypts the stream before it prepares the data directory. The only hard requirement is that the key still exists: the restore fails fast if the Secret is missing or holds a different key than the one that produced the backup. Encryption also composes with backup compression, so you keep the smaller footprint and the ciphertext-at-rest guarantee at the same time.</span></p>
<blockquote>
<p><b>Note:</b><span style="font-weight: 400"> Keep the encryption key safe and versioned outside the cluster. A backup encrypted with a key you have lost is not recoverable. Treat the key with the same care as the backups themselves.</span></p>
</blockquote>
<p>&nbsp;</p>
<h2><b>Automatic storage scaling</b></h2>
<p><span style="font-weight: 400">Running out of disk is one of the fastest ways to take a database down, and it rarely happens at a convenient hour. The operator has supported manual volume expansion since an earlier release: you raise </span><strong>resources.requests.storage</strong><span style="font-weight: 400">, apply, and the operator grows the <strong>PersistentVolumeClaim</strong> for you. That still requires a human to notice the trend and act. Version 1.2.0 adds automatic scaling that watches usage and grows the volume on its own.</span></p>
<p>&nbsp;</p>
<h3><b>Why it matters</b></h3>
<p><span style="font-weight: 400">Storage growth is predictable in aggregate and unpredictable in timing. A batch import, a retention change, or an unexpected traffic spike can eat headroom faster than an on-call engineer can respond. Letting the operator resize before the volume fills turns a page someone at 3 a.m. incident into a log line, as long as your storage class supports online expansion.</span></p>
<p>&nbsp;</p>
<h3><b>How it works</b></h3>
<p><span style="font-weight: 400">You enable volume expansion, then define an autoscaling policy. The operator monitors each data PVC and, when usage crosses the threshold, grows the volume by a fixed step up to a ceiling you set. Because it builds on the Kubernetes volume-expansion API, the underlying storage class must have </span><strong>AllowVolumeExpansion: true</strong><span style="font-weight: 400">.</span></p>
<p>&nbsp;</p>
<h3><b>Wiring it up</b></h3>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">apiVersion: ps.percona.com/v1
kind: PerconaServerMySQL
metadata:
  name: cluster1
spec:
  enableVolumeExpansion: true
  storageScaling:
    enableVolumeScaling: true
    autoscaling:
      enabled: true
      growthStep: 2Gi
      maxSize: 10Gi
      triggerThresholdPercent: 80</pre>
<p>&nbsp;</p>
<p><strong>triggerThresholdPercent</strong><span style="font-weight: 400"> is the fill level that triggers a resize (default </span><span style="font-weight: 400">80</span><span style="font-weight: 400">, allowed range 50 to 95). </span><strong>growthStep</strong><span style="font-weight: 400"> is how much capacity each resize adds (default </span><strong>2Gi</strong><span style="font-weight: 400">), and </span><strong>maxSize</strong><span style="font-weight: 400"> caps total growth so a runaway workload cannot expand a volume without bound. The operator validates the relationship between these fields: </span><strong>autoscaling</strong><span style="font-weight: 400"> cannot be enabled unless </span><strong>enableVolumeScaling</strong><span style="font-weight: 400"> is on. For teams that prefer an external controller to own resizing, </span><strong>enableExternalAutoscaling</strong><span style="font-weight: 400"> hands that responsibility off instead.</span></p>
<p><span style="font-weight: 400">The operator records each resize in the cluster status under </span><strong>storageAutoscaling</strong><span style="font-weight: 400">, including the count of resizes and the timestamp of the last one. That gives you an audit trail and a signal worth alerting on: a volume that keeps hitting its </span><strong>growthStep</strong><span style="font-weight: 400"> is telling you the workload has changed, and a volume approaching </span><strong>maxSize</strong><span style="font-weight: 400"> is telling you to plan capacity before the ceiling stops the next resize.</span></p>
<blockquote>
<p><b>Note: </b><span style="font-weight: 400">PVC expansion is one-way. Kubernetes can grow a volume but cannot shrink it, so set maxSize deliberately. Confirm your storage class allows expansion before you rely on this in production.</span></p>
<p>&nbsp;</p>
</blockquote>
<h2><b>Other improvements</b></h2>
<p><span style="font-weight: 400">Beyond the three headline features, 1.2.0 ships a set of enhancements that smooth day-two operations:</span></p>
<ul>
<li style="font-weight: 400"><b>Dedicated root user Secret</b><span style="font-weight: 400"> (</span><a href="https://perconadev.atlassian.net/browse/K8SPS-689"><span style="font-weight: 400">K8SPS-689</span></a><span style="font-weight: 400">): the operator publishes root connection details in a dedicated Secret, so applications and tooling read one predictable object instead of parsing several.</span></li>
<li style="font-weight: 400"><b>Disable NodePort allocation for LoadBalancer Services</b><span style="font-weight: 400"> (</span><a href="https://perconadev.atlassian.net/browse/K8SPS-496"><span style="font-weight: 400">K8SPS-496</span></a><span style="font-weight: 400">): set </span><span style="font-weight: 400">allocateLoadBalancerNodePorts: false</span><span style="font-weight: 400"> to stop Kubernetes from opening NodePorts you never use behind a cloud load balancer.</span></li>
<li style="font-weight: 400"><b>Custom cluster naming for PMM</b><span style="font-weight: 400"> (</span><a href="https://perconadev.atlassian.net/browse/K8SPS-627"><span style="font-weight: 400">K8SPS-627</span></a><span style="font-weight: 400">): give a cluster a stable display name so multi-region and multi-namespace fleets stay legible in </span><a href="https://docs.percona.com/percona-monitoring-and-management/"><span style="font-weight: 400">Percona Monitoring and Management</span></a><span style="font-weight: 400">.</span></li>
<li style="font-weight: 400"><b>Vault encryption Secret validation</b><span style="font-weight: 400"> (</span><a href="https://perconadev.atlassian.net/browse/K8SPS-487"><span style="font-weight: 400">K8SPS-487</span></a><span style="font-weight: 400">): the operator validates the Vault Secret and reports problems in status immediately, instead of failing later during an operation.</span></li>
<li style="font-weight: 400"><b>Concurrent reconciliation</b><span style="font-weight: 400"> (</span><a href="https://perconadev.atlassian.net/browse/K8SPS-434"><span style="font-weight: 400">K8SPS-434</span></a><span style="font-weight: 400">): tune how many clusters the operator reconciles at once through an environment variable, which helps a single operator manage a larger fleet.</span></li>
<li style="font-weight: 400"><b>Independent </b><b>mysql-monit</b><b> sidecar resources</b><span style="font-weight: 400"> (</span><a href="https://perconadev.atlassian.net/browse/K8SPS-742"><span style="font-weight: 400">K8SPS-742</span></a><span style="font-weight: 400">): set CPU and memory for the monitoring sidecar separately from the database container.</span></li>
<li style="font-weight: 400"><b>Orchestrator API authentication</b><span style="font-weight: 400"> (</span><a href="https://perconadev.atlassian.net/browse/K8SPS-19"><span style="font-weight: 400">K8SPS-19</span></a><span style="font-weight: 400">): the Orchestrator API now requires valid credentials.</span></li>
<li style="font-weight: 400"><b>Binlog storage configuration in restore objects</b><span style="font-weight: 400"> (</span><a href="https://perconadev.atlassian.net/browse/K8SPS-716"><span style="font-weight: 400">K8SPS-716</span></a><span style="font-weight: 400">): point a restore at the binlog storage it needs for point-in-time recovery.</span></li>
</ul>
<p><span style="font-weight: 400">For the full list, including bug fixes, see the release notes linked below.</span></p>
<p>&nbsp;</p>
<h2><b>Conclusion</b></h2>
<p><span style="font-weight: 400">Percona Operator for MySQL 1.2.0 extends the operator across the parts of the lifecycle that used to need custom glue: replication across sites, encryption of data that leaves the cluster, and storage that keeps up with growth. Platform teams running MySQL fleets on Kubernetes get declarative control over disaster recovery, a cleaner path through a security review, and one less 3 a.m. page. If there is a topology or a control you still have to script around, tell us on the forum, since that feedback is where releases like this one come from.</span></p>
<p>&nbsp;</p>
<h2><b>Try Percona Operator for MySQL 1.2.0</b></h2>
<ul>
<li style="font-weight: 400"><b>Release notes</b><span style="font-weight: 400">: </span><a href="https://docs.percona.com/percona-operator-for-mysql/ps/ReleaseNotes/Kubernetes-Operator-for-PS-RN1.2.0.html"><span style="font-weight: 400">Percona Operator for MySQL 1.2.0 Release Notes</span></a></li>
<li style="font-weight: 400"><b>Documentation</b><span style="font-weight: 400">: </span><a href="https://docs.percona.com/percona-operators/"><span style="font-weight: 400">Percona Operator for MySQL docs</span></a></li>
<li style="font-weight: 400"><b>GitHub</b><span style="font-weight: 400">: </span><a href="https://github.com/percona/percona-server-mysql-operator"><span style="font-weight: 400">percona/percona-server-mysql-operator</span></a></li>
<li style="font-weight: 400"><b>Community Forum</b><span style="font-weight: 400">: </span><a href="https://forums.percona.com/c/mysql-mariadb/percona-kubernetes-operator-for-mysql/28"><span style="font-weight: 400">forums.percona.com</span></a><span style="font-weight: 400">: share your feedback, ask questions, or report issues</span></li>
</ul>
<p>&nbsp;</p>
<p>The post <a href="https://www.percona.com/blog/percona-operator-for-mysql-1-2-0-cross-site-replication-encrypted-backups-storage-autoscaling/">Percona Operator for MySQL 1.2.0: Cross-Site Replication, Encrypted Backups, and Automatic Storage Scaling</a> appeared first on <a href="https://www.percona.com">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/percona-operator-for-mysql-1-2-0-cross-site-replication-encrypted-backups-storage-autoscaling/">Percona Operator for MySQL 1.2.0: Cross-Site Replication, Encrypted Backups, and Automatic Storage Scaling</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Comparing Migration Methods from the Crunchy Data PostgreSQL Operator to the Percona Operator for PostgreSQL</title>
        <link>https://www.percona.com/blog/comparing-migration-methods-from-the-crunchy-data-postgresql-operator-to-the-percona-operator-for-postgresql/</link>
        <pubDate>Tue, 07 Jul 2026 13:01:43 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Migrating a production PostgreSQL database on Kubernetes is not only about moving data from one operator to another. It is also about choosing the right trade-off between downtime, operational complexity, rollback safety, cost, and business risk. Practical migration paths from the Crunchy Data PostgreSQL Operator to the Percona Operator for PostgreSQL are described here.  1. … Continued<br />
The post Comparing Migration Methods from the Crunchy Data PostgreSQL Operator to the Percona Operator for PostgreSQL appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/comparing-migration-methods-from-the-crunchy-data-postgresql-operator-to-the-percona-operator-for-postgresql/">Comparing Migration Methods from the Crunchy Data PostgreSQL Operator to the Percona Operator for PostgreSQL</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><span style="font-weight: 400">Migrating a production PostgreSQL database on Kubernetes is not only about moving data from one operator to another. It is also about choosing the right trade-off between downtime, operational complexity, rollback safety, cost, and business risk.</span></p>
<p><span style="font-weight: 400">Practical migration paths from the Crunchy Data PostgreSQL Operator to the Percona Operator for PostgreSQL are described </span><a href="https://docs.percona.com/percona-operator-for-postgresql/3.0.0/migrate-from-crunchy.html"><span style="font-weight: 400">here</span></a><span style="font-weight: 400">. </span></p>
<h4><b>1. Migration to standby cluster utilizing the same pgBackRest repository</b></h4>
<p><span style="font-weight: 400">In this method, the Percona cluster is created as a standby and points to the same pgBackRest repository used by the Crunchy Data PostgreSQL Operator cluster. This means the object storage and the path are exactly the same for both clusters.</span></p>
<p><span style="font-weight: 400">With the above configuration, the Percona standby restores the initial backup from the shared repository and replays archived WAL. The method is described </span><a href="https://docs.percona.com/percona-operator-for-postgresql/3.0.0/standby-backup.html#configure-dr-site"><span style="font-weight: 400">here</span></a><span style="font-weight: 400">.</span></p>
<h4><strong>2.Migration to Standby Cluster with Streaming Replication</strong></h4>
<p><strong>  </strong><span style="font-weight: 400">In this approach, the standby cluster initiates a </span><a href="https://www.postgresql.org/docs/current/app-pgbasebackup.html"><span style="font-weight: 400">pg_basebackup</span></a><span style="font-weight: 400"> for the initial restore and uses native postgres streaming for sync. The method is described </span><a href="https://docs.percona.com/percona-operator-for-postgresql/3.0.0/standby-streaming.html"><span style="font-weight: 400">here</span></a><span style="font-weight: 400">.</span></p>
<h4><b>3.Backup and Restore </b></h4>
<p><span style="font-weight: 400">In this method, a backup is taken from the Crunchy cluster and restored to a cluster managed by the Percona Operator for PostgreSQL.</span></p>
<h4><b>4.Migration by reusing the persistent volume</b></h4>
<p><span style="font-weight: 400">In this method, the existing Crunchy Data PostgreSQL Operator primary’s PGDATA persistent volume is used. The process is: stop writes to the Crunchy Data PostgreSQL Operator cluster, delete the cluster while retaining the persistent volume, clear the old persistent volume claim reference, and create a Percona cluster whose PVC selector binds to that same retained PV. PostgreSQL then starts on the existing data directory without a restore.</span></p>
<p><span style="font-weight: 400">Each method works, but each one is suitable for a different operational scenario. A migration strategy that is ideal for a small development database may be risky for a large production system with heavy write traffic. Similarly, a method that gives the lowest downtime may require more preparation and validation.</span></p>
<p><span style="font-weight: 400">This post compares the four migration approaches so users can choose the most suitable approach.</span></p>
<h2><span style="font-weight: 400">Factors to Consider Before Migration</span></h2>
<p><span style="font-weight: 400">There is no single best migration strategy for every PostgreSQL workload. A production migration usually has to balance several requirements:</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">How Much Downtime is Acceptable?</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">What is the Network Connectivity Status Between the Clusters?</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">What is the RTO/RPO When Something Goes Wrong?</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">How Large is the Database?</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">How Write-Heavy is the Workload?</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">How Quickly Must the System be Rolled Back?</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Is the Migration Happening Across Namespaces, Clusters, Storage Classes, or Cloud?</span></li>
</ul>
<h2><span style="font-weight: 400">Comparison of Migration Methods</span></h2>
<table dir="ltr" border="1" cellspacing="0" cellpadding="0" data-sheets-root="1" data-sheets-baot="1">
<colgroup>
<col width="157" />
<col width="259" />
<col width="235" />
<col width="224" />
<col width="227" /></colgroup>
<tbody>
<tr>
<td></td>
<td>Same pgBackRest Repository</td>
<td>Streaming Replication</td>
<td>Backup and Restore</td>
<td>Reuse the Persistent volume</td>
</tr>
<tr>
<td>Implementation</td>
<td>Primary archives WAL → shared repo → standby does a restore + fetches WAL via pgBackRest archive-get</td>
<td>Primary streams WAL over TCP → standby pg_basebackup + WAL receiver</td>
<td>Take backup from primary -&gt; Restore to new cluster</td>
<td>Same volume is reused by the Percona Operator for PostgreSQL</td>
</tr>
<tr>
<td>Initial Seed</td>
<td>Restore from an existing backup with pgBackRest</td>
<td>pg_basebackup from live primary</td>
<td>Restore from an existing backup with pgBackRest</td>
<td>Volume contains the entire data</td>
</tr>
<tr>
<td>Primary to standby sync</td>
<td>WAL is fetched with pgBackRest archive-get</td>
<td>Native PostgreSQL streaming</td>
<td>WAL is fetched with pgBackRest archive-get</td>
<td>N/A</td>
</tr>
<tr>
<td>Performance impact to the primary</td>
<td>No extra impact</td>
<td>Slight impact due to the pg_basebackup and streaming</td>
<td>No extra impact</td>
<td>Primary will be down for the duration of the migration</td>
</tr>
<tr>
<td>Network dependencies</td>
<td>No network connectivity is required between the primary and standby clusters.</td>
<td>Network connectivity needed between primary and standby nodes.</td>
<td>No network connectivity is required between the primary and standby clusters.</td>
<td>No Dependency</td>
</tr>
<tr>
<td>Object storage dependency</td>
<td>Object storage used for WAL should be accessible by both primary and standby</td>
<td>No dependency</td>
<td>Object storage used for WAL should be accessible by both primary and standby</td>
<td>No dependency</td>
</tr>
<tr>
<td>Downtime</td>
<td>During cutover from the primary to the standby, writes must be blocked until the standby catches up with the primary, or the cutover should be performed during a period of low write activity to allow the standby to catch up.</td>
<td>During cutover from the primary to the standby, writes must be blocked until the standby catches up with the primary, or the cutover should be performed during a period of low write activity to allow the standby to catch up.</td>
<td>During cutover from the primary to the standby, writes must be blocked until the standby catches up with the primary, or the cutover should be performed during a period of low write activity to allow the standby to catch up.</td>
<td>Complete downtime till the new cluster is started</td>
</tr>
<tr>
<td>Rollback</td>
<td>Use the older crunchy cluster.<br />
Easy if there were no writes done on standby. If there were any writes done on standby, data consistency needs to be checked before rolling back.</td>
<td>Use the older crunchy cluster.<br />
Easy if there were no writes done on standby. If there were any writes done on standby, data consistency needs to be checked before rolling back</td>
<td>Use the older crunchy cluster.<br />
Easy if there were no writes done on standby. If there were any writes done on standby, data consistency needs to be checked before rolling back</td>
<td>Easy to rollback; no issues with data inconsistency, unless the data volume get’s corrupted.</td>
</tr>
<tr>
<td>Business continuity risks</td>
<td>If migration fails for some reason, it is easy to fall back to the Crunchy Data PostgreSQL Operator cluster.</td>
<td>If migration fails for some reason, it is easy to fall back to the Crunchy Data PostgreSQL Operator cluster.</td>
<td>If migration fails for some reason, it is easy to fall back to the Crunchy Data PostgreSQL Operator cluster.</td>
<td>Can fallback to using the Crunchy Data PostgreSQL Operator cluster if migration fails. If the data volume gets corrupted, full restore needs to be done from backup. RTO/RPO depends on the dataset size and the WAL pushed to the object storage.</td>
</tr>
<tr>
<td>Cost /Resources utilization</td>
<td>For the duration of migration, there will be 2 clusters which adds up to the resources and the cost.</td>
<td>For the duration of migration, there will be 2 clusters which adds up to the resources and the cost.</td>
<td>For the duration of migration, there will be 2 clusters which adds up to the resources and the cost.</td>
<td>No additional resources / cost needed.</td>
</tr>
<tr>
<td>Compatible with other / custom backup solution</td>
<td>Backups should be taken with pgbackrest</td>
<td>Any backup solution can be used by the Crunchy Data PostgreSQL Operator</td>
<td>Backups should be taken with pgbackrest</td>
<td>Any backup solution can be used by the Crunchy Data PostgreSQL Operator</td>
</tr>
<tr>
<td>Client DNS caching issues</td>
<td>Clients might refer to the older entry due to caching entries. This will be reflected for short period of TTL expiry or caching rule set at client after the migration</td>
<td>Clients might refer to the older entry due to caching entries. This will be reflected for short period of TTL expiry or caching rule set at client after the migration</td>
<td>Clients might refer to the older entry due to caching entries. This will be reflected for short period of TTL expiry or caching rule set at client after the migration</td>
<td>No issues</td>
</tr>
<tr>
<td>Migrating to different kubernetes cluster</td>
<td>Possible</td>
<td>Possible</td>
<td>Possible</td>
<td>Not possible</td>
</tr>
</tbody>
</table>
<h2></h2>
<h2><span style="font-weight: 400">Conclusion</span></h2>
<p><span style="font-weight: 400">There is no &#8220;one-size-fits-all&#8221; solution for migrating PostgreSQL workloads on Kubernetes. Choosing the right strategy requires a careful balance between acceptable downtime, operational complexity, and business continuity requirements. For example, below there are some scenarios which list the suitable approaches</span></p>
<ul>
<li style="font-weight: 400"><b>For scenarios where zero downtime is not strictly required but minimal operational impact is preferred</b><span style="font-weight: 400">, migration via a shared pgBackRest repository could be a feasible solution.</span></li>
<li style="font-weight: 400"><b>For environments where network latency is low and real-time synchronization is feasible</b><span style="font-weight: 400">, Streaming Replication could be a feasible solution.</span></li>
<li style="font-weight: 400"><b>For simpler migrations where network connectivity between clusters is not feasible</b><span style="font-weight: 400">, a standard Backup and Restore will work.</span></li>
<li style="font-weight: 400"><b>For rapid migrations involving massive datasets where storage mobility is not required</b><span style="font-weight: 400">, reusing the existing persistent volume can significantly reduce migration time.</span></li>
</ul>
<p><span style="font-weight: 400">Before proceeding, we recommend conducting a dry run in a staging environment to validate your chosen method against your specific network topology and workload requirements. By carefully evaluating these trade-offs, you can ensure a secure, efficient transition to the Percona Operator for PostgreSQL.</span></p>
<p>The post <a href="https://www.percona.com/blog/comparing-migration-methods-from-the-crunchy-data-postgresql-operator-to-the-percona-operator-for-postgresql/">Comparing Migration Methods from the Crunchy Data PostgreSQL Operator to the Percona Operator for PostgreSQL</a> appeared first on <a href="https://www.percona.com">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/comparing-migration-methods-from-the-crunchy-data-postgresql-operator-to-the-percona-operator-for-postgresql/">Comparing Migration Methods from the Crunchy Data PostgreSQL Operator to the Percona Operator for PostgreSQL</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>TAF 3.0 — Results Backend With Automated Performance Change Detection</title>
        <link>https://mariadb.org/taf-3-0-results-backend-with-automated-performance-change-detection/</link>
        <pubDate>Tue, 07 Jul 2026 10:55:01 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>TAF 3.0 introduces the new TAF Results Backend, a structured results database and parser pipeline that delivers fully automated performance change detection. …<br />
Continue reading "TAF 3.0 — Results Backend With Automated Performance Change Detection"<br />
The post TAF 3.0 — Results Backend With Automated Performance Change Detection appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/taf-3-0-results-backend-with-automated-performance-change-detection/">TAF 3.0 — Results Backend With Automated Performance Change Detection</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><a href="https://github.com/MariaDB/TAF">TAF</a> 3.0 introduces the new <a href="https://github.com/MariaDB/TAF">TAF</a> Results Backend, a structured results database and parser pipeline that delivers fully automated performance change detection. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/taf-3-0-results-backend-with-automated-performance-change-detection/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;TAF 3.0 — Results Backend With Automated Performance Change Detection&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/taf-3-0-results-backend-with-automated-performance-change-detection/">TAF 3.0 — Results Backend With Automated Performance Change Detection</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/taf-3-0-results-backend-with-automated-performance-change-detection/">TAF 3.0 — Results Backend With Automated Performance Change Detection</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Server Plugins: disabled functions</title>
        <link>https://mariadb.org/mariadb-server-plugins-disabled-functions/</link>
        <pubDate>Mon, 06 Jul 2026 08:33:57 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>During the last MariaDB Foundation Board Meeting (24 June 2026), Barry shared how it can be difficult to deploy an upgrade immediately and that they sometimes have to wait for one that fixes security bugs. …<br />
Continue reading "MariaDB Server Plugins: disabled functions"<br />
The post MariaDB Server Plugins: disabled functions appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/mariadb-server-plugins-disabled-functions/">MariaDB Server Plugins: disabled functions</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>During the <a href="https://mariadb.org/bodminutes/2026-06-24/">last MariaDB Foundation Board Meeting</a> (24 June 2026), Barry shared how it can be difficult to deploy an upgrade immediately and that they sometimes have to wait for one that fixes security bugs. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/mariadb-server-plugins-disabled-functions/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;MariaDB Server Plugins: disabled functions&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/mariadb-server-plugins-disabled-functions/">MariaDB Server Plugins: disabled functions</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/mariadb-server-plugins-disabled-functions/">MariaDB Server Plugins: disabled functions</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Cross-site Disaster Recovery with Percona Operator for MySQL</title>
        <link>https://percona.community/blog/2026/07/06/cross-site-disaster-recovery-with-percona-operator-for-mysql/</link>
        <pubDate>Mon, 06 Jul 2026 07:42:27 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>A MySQL InnoDB Cluster provides high availability for a single database cluster using Group Replication. This works well for node failures inside the cluster, but disaster recovery usually requires another cluster in a separate location: another Kubernetes cluster, region, data center, or cloud.</p>
<p><a href="https://percona.community/blog/2026/07/06/cross-site-disaster-recovery-with-percona-operator-for-mysql/">Cross-site Disaster Recovery with Percona Operator for MySQL</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>A MySQL InnoDB Cluster provides high availability for a single database cluster using Group Replication. This works well for node failures inside the cluster, but disaster recovery usually requires another cluster in a separate location: another Kubernetes cluster, region, data center, or cloud.</p>
<p>This replica cluster needs to stay in sync with the primary, remain protected from accidental writes, and be ready to take over when you need to move traffic, either as a planned operation or during an outage.</p>
<p><a href="https://dev.mysql.com/doc/mysql-shell/8.0/en/innodb-clusterset.html" target="_blank" rel="noopener noreferrer">InnoDB ClusterSet</a> addresses this by linking multiple MySQL clusters into a single disaster-recovery topology. One cluster handles writes, while the others stay synchronized as read-only replicas.</p>
<p>Starting from v1.2.0, the Percona Operator for MySQL adds a new custom resource, <code>PerconaServerMySQLClusterSet</code>, which allows managing InnoDB ClusterSets. Creating the ClusterSet, adding replicas, switching the primary, and performing a forced failover are all handled declaratively by updating the Kubernetes spec and letting the operator reconcile the desired state.</p>
<p>This post explains how ClusterSet works, how to set it up with the Percona Operator, and how planned switchovers and emergency failovers work in practice.</p>
<h2 id="understanding-innodb-clusterset">Understanding InnoDB ClusterSet</h2>
<p>Any disaster recovery design usually comes down to two important numbers:</p>
<ul>
<li><strong>Recovery Point Objective</strong>, or RPO, is how much data you can afford to lose. For example, an RPO of five seconds means the business can tolerate losing up to five seconds of writes.</li>
<li><strong>Recovery Time Objective</strong>, or RTO, is how long the system can be unavailable before service must be restored.</li>
</ul>
<p>The way you design and operate a ClusterSet directly affects both. To understand why, it helps to first look at the architecture.</p>
<p>An InnoDB ClusterSet is built from two or more InnoDB Clusters. Each InnoDB Cluster is a Group Replication group. In other words, it is the same kind of highly available MySQL cluster that the <a href="https://docs.percona.com/percona-operator-for-mysql/latest/index.html" target="_blank" rel="noopener noreferrer">Percona Operator for MySQL</a> can already deploy and manage.</p>
<p>A ClusterSet adds another layer on top of those clusters. One cluster is the primary cluster and accepts writes, while the others are replica clusters and remain read-only. The primary sends its changes to each replica using asynchronous replication over a dedicated replication channel.</p>
<p>This gives us two layers of replication, each solving a different problem.</p>
<p>Inside each cluster, Group Replication protects against the loss of individual MySQL nodes. Members are expected to be closer together, usually within the same region or availability zone group. Writes are coordinated by the group, which helps keep the local cluster consistent and highly available.</p>
<p>Between clusters, asynchronous replication protects against the loss of an entire site. Replica clusters can be located in another region, another Kubernetes cluster, or another cloud provider. Because this replication is asynchronous, long-distance network latency does not slow down writes on the primary cluster.</p>
<p>But the tradeoff here is that a replica cluster may be slightly behind the primary. The amount of lag depends on write volume, network latency, and the health of the replication channel. If the primary site is lost, any writes that had not yet reached the replica are lost. That lag is the practical data-loss window during an emergency failover. Any transactions that had not replicated before failover could be lost.</p>
<p>Before building a ClusterSet with the operator, there are a few important requirements to keep in mind:</p>
<ul>
<li>Every cluster in the ClusterSet must use the Group Replication topology. The operator also supports asynchronous replication with Orchestrator for standalone clusters, but that topology cannot be part of an InnoDB ClusterSet.</li>
<li>You need MySQL 8.0.27 or later</li>
<li>Clusters are linked by network address, not by Kubernetes references. A replica cluster only needs to be reachable and managed by an operator. It does not need to live in the same Kubernetes cluster as the primary.</li>
</ul>
<p>With the model in place, let’s build a simple cross-site disaster recovery setup.</p>
</p>
<h2 id="setting-up-clusterset">Setting up ClusterSet</h2>
<p>We’ll create the simplest useful ClusterSet: two Group Replication clusters named <code>dc1</code> and <code>dc2</code>.</p>
<p>In this example:<br />
<code>dc1</code> is the primary cluster.<br />
<code>dc2</code> is the read-only replica cluster.</p>
<p>In a real deployment, these would usually run in separate Kubernetes clusters, regions, or cloud environments. The steps are mostly the same. The main requirement is that the endpoints listed in the ClusterSet spec must be routable between sites.</p>
<h3 id="creating-a-primary-cluster">Creating a primary cluster</h3>
<p>The primary cluster <code>dc1</code> is a regular Group Replication cluster. There is nothing ClusterSet-specific about it at this stage.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">yaml</span><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-0">
<div class="highlight">
<pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">apiVersion</span><span class="p">:</span><span class="w"> </span><span class="l">ps.percona.com/v1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">kind</span><span class="p">:</span><span class="w"> </span><span class="l">PerconaServerMySQL</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">metadata</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">dc1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">spec</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">mysql</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">clusterType</span><span class="p">:</span><span class="w"> </span><span class="l">group-replication</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># ... the rest of a normal cluster spec</span></span></span></code></pre>
</div>
</div>
</div>
<p>You can find a complete YAML <a href="https://github.com/percona/percona-server-mysql-operator/blob/main/deploy/cr.yaml" target="_blank" rel="noopener noreferrer">here</a>. Apply it and wait for it to come up the way you normally would, just as you would for any normal Percona Operator-managed MySQL cluster.</p>
<h3 id="creating-the-replica-cluster">Creating the replica cluster</h3>
<p>The replica cluster <code>dc2</code> is also a Group Replication cluster, but with one important difference:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">yaml</span><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-1">
<div class="highlight">
<pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">apiVersion</span><span class="p">:</span><span class="w"> </span><span class="l">ps.percona.com/v1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">kind</span><span class="p">:</span><span class="w"> </span><span class="l">PerconaServerMySQL</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">metadata</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">dc2</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">spec</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">mysql</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">clusterType</span><span class="p">:</span><span class="w"> </span><span class="l">group-replication</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">bootstrap</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">mode</span><span class="p">:</span><span class="w"> </span><span class="l">manual </span><span class="w"> </span><span class="c"># &lt;- set this!</span></span></span></code></pre>
</div>
</div>
</div>
<p>Normally, when the operator creates a Group Replication cluster, the first MySQL pod bootstraps the group as soon as it starts. Subsequent pods then join that group.</p>
<p>For a ClusterSet replica, that is not what we want. We do not want <code>dc2</code> to form an independent empty cluster. Instead, we want it to receive data from the primary cluster and then join the ClusterSet as a replica.</p>
<p>With <code>bootstrap.mode: manual</code>, the first pod starts but does not bootstrap its own Group Replication group. It waits until the ClusterSet process adopts it, clones data from the primary, and then forms the replica cluster. During this stage, the first <code>dc2</code> pod may remain in a <code>NotReady</code> state until it is a part of the ClusterSet.</p>
<h3 id="sharing-cluster-credentials">Sharing cluster credentials</h3>
<p>The operator automatically creates a <code>clusterset</code> MySQL user in every cluster and stores its password in the cluster secret.</p>
<p>The operator uses this user to orchestrate ClusterSet operations, so the password must be the same across all clusters in the ClusterSet. When your clusters are deployed separately, copy the <code>clusterset</code> value from the primary cluster secret into the replica cluster secret before linking them.</p>
<p>For example, if <code>dc1</code> is the primary, copy the <code>clusterset</code> password from the <code>dc1</code> secret into the corresponding secret for <code>dc2</code>.</p>
<h3 id="linking-the-clusters">Linking the clusters</h3>
<p>Once both clusters are applied, create a <code>PerconaServerMySQLClusterSet</code> custom resource.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">yaml</span><button class="code-block__copy" type="button" data-copy-target="codeblock-2" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-2">
<div class="highlight">
<pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">apiVersion</span><span class="p">:</span><span class="w"> </span><span class="l">ps.percona.com/v1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">kind</span><span class="p">:</span><span class="w"> </span><span class="l">PerconaServerMySQLClusterSet</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">metadata</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">my-cluster-set</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">finalizers</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">percona.com/clusterset-dissolve</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">spec</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">primaryCluster</span><span class="p">:</span><span class="w"> </span><span class="l">dc1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">credentialsSecret</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">dc1-secrets</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">key</span><span class="p">:</span><span class="w"> </span><span class="l">clusterset</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">sslMode</span><span class="p">:</span><span class="w"> </span><span class="l">AUTO</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">createReplicaClusterOptions</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">recoveryMethod</span><span class="p">:</span><span class="w"> </span><span class="l">clone</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">clusters</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">innodbClusterName</span><span class="p">:</span><span class="w"> </span><span class="l">dc1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">endpoints</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">host</span><span class="p">:</span><span class="w"> </span><span class="l">dc1-mysql-primary.default.svc.cluster.local</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">innodbClusterName</span><span class="p">:</span><span class="w"> </span><span class="l">dc2</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">endpoints</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">host</span><span class="p">:</span><span class="w"> </span><span class="l">dc2-mysql-0.dc2-mysql.default.svc.cluster.local</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">mysqlshellRunner</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l">perconalab/percona-server-mysql-operator:main-psmysql8.4</span></span></span></code></pre>
</div>
</div>
</div>
<p>The most important fields are:</p>
<ul>
<li><code>primaryCluster</code> defines which cluster currently accepts writes. The value must match one of the entries under clusters.</li>
<li><code>clusters</code> lists every member of the ClusterSet and the endpoint the operator should use to reach it. These endpoints are plain network addresses, which is what allows members to run in different Kubernetes clusters or regions.</li>
<li><code>credentialsSecret</code> points to the secret that contains the clusterset user password.</li>
<li><code>recoveryMethod: clone</code> tells the replica cluster to take a full copy of the primary data when it joins the ClusterSet. The alternative is an incremental recovery method, which uses existing binary logs instead of cloning the full dataset.</li>
<li><code>mysqlshellRunner</code> defines the helper pod image used by the operator to run MySQL Shell operations.</li>
</ul>
<p>After you apply this resource, the operator starts a MySQL Shell runner pod and creates the ClusterSet on <code>dc1</code>. It then joins <code>dc2</code>, which clones the data, starts replication, and brings up the remaining pods in the replica cluster.</p>
<p>At this point, <code>dc1</code> serves reads and writes, while <code>dc2</code> acts as a live read-only copy.</p>
<blockquote>
<p><strong>Seeding large replica clusters</strong></p>
<p>In this example, the replica cluster is created with <code>recoveryMethod: clone</code>, so MySQL Shell provisions the first replica member by copying a physical snapshot from an existing ClusterSet member. That is convenient for medium/small datasets, but it can be fragile across WAN links or very large databases.</p>
<p>A full clone can take hours, consume significant bandwidth, add load to the donor, run into network interruptions, and become expensive to retry if the operation fails partway through. It can also not be the best fit when the primary is busy or when cross-region egress cost is a concern.</p>
<p>The operator makes it possible to seed the replica cluster from an existing backup of the primary cluster instead. Create a <code>PerconaServerMySQLBackup</code> on the primary, restore that backup into the replica cluster with <code>PerconaServerMySQLRestore</code>, and then add the replica to the ClusterSet using <code>recoveryMethod: incremental</code>. You can find the exact restore procedure in the <a href="https://docs.percona.com/percona-operator-for-mysql/latest/backups-restore-to-new-cluster.html" target="_blank" rel="noopener noreferrer">documentation</a>.</p>
<p>At that point, the replica already has the primary’s data and GTID history, so ClusterSet only needs to catch it up from the primary’s binary logs instead of transferring the full dataset again.</p>
</blockquote>
<h3 id="verifying-it-worked">Verifying it worked</h3>
<p>The simplest way to confirm that the ClusterSet is working is to write data to the primary cluster and read it from the replica.</p>
<p>For example:</p>
<ul>
<li>Connect to <code>dc1</code>.</li>
<li>Create a test table or insert a row.</li>
<li>Connect to <code>dc2</code>.</li>
<li>Confirm that the same data appears there.</li>
</ul>
<p>If the row appears on <code>dc2</code>, the asynchronous replication channel is running and the replica cluster is receiving changes from the primary.</p>
<h3 id="planned-switchover">Planned Switchover</h3>
<p>A planned switchover is used when both clusters are healthy and you intentionally want to move writes from one site to another. This is useful for regional maintenance, Kubernetes cluster upgrades, cloud migrations, or controlled DR testing.</p>
<p>To move the primary role from <code>dc1</code> to <code>dc2</code>, update the primaryCluster field:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-3" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-3">
<div class="highlight">
<pre class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">kubectl patch ps-clusterset my-cluster-set --type<span class="o">=</span>merge <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> -p <span class="s1">'{"spec":{"primaryCluster":"dc2"}}'</span></span></span></code></pre>
</div>
</div>
</div>
<p>The operator notices that the desired primary cluster no longer matches the current primary. It then uses MySQL Shell to perform a clean switchover.</p>
<p>Because both clusters are available, the operator can make sure the replica has caught up before changing roles. After the switchover completes, <code>dc2</code> becomes the writable primary and <code>dc1</code> becomes a read-only replica.</p>
<h3 id="emergency-failover">Emergency Failover</h3>
<p>An emergency failover can be used when the primary cluster is unreachable and a clean handover is no longer possible.</p>
<p>This is the disaster recovery case: the Kubernetes cluster, region, or network path to the primary may be down, and you need to promote a surviving replica so the application can resume writes.</p>
<p>To fail over to <code>dc2</code>, update primaryCluster and explicitly set the forced failover flag:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-4" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-4">
<div class="highlight">
<pre class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">kubectl patch ps-clusterset my-cluster-set --type<span class="o">=</span>merge <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> -p <span class="s1">'{"spec":{"primaryCluster":"dc2","unsafeFlags":{"forcedFailover":true}}}'</span></span></span></code></pre>
</div>
</div>
</div>
<p>The operator only follows this path when it can confirm that the current primary cluster is unreachable. It then promotes <code>dc2</code>, allowing it to accept writes.</p>
<p>The explicit flag is important because failover can cause data loss. Replication between clusters is asynchronous, so any writes that reached the old primary but had not yet replicated to <code>dc2</code> are not present on the new primary. Once <code>dc2</code> is promoted, those missing writes become unrecoverable through normal ClusterSet recovery.</p>
<p>The risk of data loss is why the field is named <code>unsafeFlags.forcedFailover</code>.</p>
<p>Another important point is that when the old primary comes back, it does not automatically resume as primary. After a forced failover, the recovered cluster must be explicitly reintroduced into the ClusterSet as a replica.</p>
<h3 id="adding-and-removing-clusters">Adding and removing clusters</h3>
<p>Adding or removing clusters follows the same declarative pattern: update the custom resource spec and let the operator reconcile the difference.</p>
<p>To add another replica cluster, add a new entry under clusters:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">yaml</span><button class="code-block__copy" type="button" data-copy-target="codeblock-5" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-5">
<div class="highlight">
<pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">apiVersion</span><span class="p">:</span><span class="w"> </span><span class="l">ps.percona.com/v1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">kind</span><span class="p">:</span><span class="w"> </span><span class="l">PerconaServerMySQLClusterSet</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">metadata</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">my-cluster-set</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">spec</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># .. existing spec</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">clusters</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># .. existing clusters</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">innodbClusterName</span><span class="p">:</span><span class="w"> </span><span class="l">dc3</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">endpoints</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">host</span><span class="p">:</span><span class="w"> </span><span class="l">dc3-mysql-primary.default.svc.cluster.local</span></span></span></code></pre>
</div>
</div>
</div>
<p>The operator joins the new cluster in the same way it joined <code>dc2</code>: it clones data from the primary, configures replication, and brings the cluster into the ClusterSet as a read-only replica.</p>
<p>To remove a cluster, delete its entry from the clusters list. You can update your manifest and reapply it, or use a JSON patch:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-6" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-6">
<div class="highlight">
<pre class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">kubectl patch ps-clusterset my-cluster-set --type<span class="o">=</span>json <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> -p <span class="s1">'[{"op":"remove","path":"/spec/clusters/1"}]'</span></span></span></code></pre>
</div>
</div>
</div>
<p>If the cluster is healthy, the operator detaches it cleanly and it becomes a normal standalone cluster again.</p>
<p>If the cluster being removed is unreachable, you can force its removal:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">shell</span><button class="code-block__copy" type="button" data-copy-target="codeblock-7" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-7">
<div class="highlight">
<pre class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">kubectl patch ps-clusterset my-cluster-set --type<span class="o">=</span>json -p <span class="s1">'[
</span></span></span><span class="line"><span class="cl"><span class="s1"> {"op":"remove","path":"/spec/clusters/1"},
</span></span></span><span class="line"><span class="cl"><span class="s1"> {"op":"add","path":"/spec/unsafeFlags/forcedClusterRemoval","value":true}
</span></span></span><span class="line"><span class="cl"><span class="s1">]'</span></span></span></code></pre>
</div>
</div>
</div>
<p>Like forced failover, forced removal is gated behind an unsafe flag because the operator should not make this decision silently. Removing an unreachable cluster from a ClusterSet is an operational decision with consequences, and it should be made explicitly.</p>
<h3 id="wrapping-up">Wrapping up</h3>
<p>The Percona Operator for MySQL allows extending Group Replication beyond a single site by managing InnoDB ClusterSet through a custom resource <code>PerconaServerMySQLClusterSet</code>. A primary cluster handles writes, replica clusters stay synchronized, and the operator manages switchovers, failovers, and membership changes declaratively.</p>
<p>For planned maintenance, switchover moves the primary role safely with no data loss. For outages, forced failover promotes a surviving replica, with the expected risk of losing any writes that had not yet replicated. That replication lag is the practical RPO, so it should be monitored and tested as part of the DR plan.</p>
<p>With the Percona Operator for MySQL, disaster recovery becomes repeatable, Kubernetes-native, and easier to operate across regions or clusters.</p>
<h3 id="further-reading">Further reading</h3>
<ul>
<li><a href="https://dev.mysql.com/doc/mysql-shell/8.0/en/innodb-clusterset.html" target="_blank" rel="noopener noreferrer">InnoDB ClusterSet docs</a></li>
<li><a href="https://docs.percona.com/percona-operator-for-mysql/latest/replication.html" target="_blank" rel="noopener noreferrer">Cross-site replication in Percona Operator for MySQL</a></li>
</ul>
<p><a href="https://percona.community/blog/2026/07/06/cross-site-disaster-recovery-with-percona-operator-for-mysql/">Cross-site Disaster Recovery with Percona Operator for MySQL</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB 13.1 Feature in Focus: DENY / Negative Grants</title>
        <link>https://mariadb.org/mariadb-13-1-feature-in-focus-deny-negative-grants/</link>
        <pubDate>Fri, 03 Jul 2026 14:04:29 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB 13.1 Preview is full of nice things.<br />
Some are immediately visible to developers, like the new JSON operators. Some are very useful to DBAs, such as configuration validation. …<br />
Continue reading "MariaDB 13.1 Feature in Focus: DENY / Negative Grants"<br />
The post MariaDB 13.1 Feature in Focus: DENY / Negative Grants appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/mariadb-13-1-feature-in-focus-deny-negative-grants/">MariaDB 13.1 Feature in Focus: DENY / Negative Grants</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><a href="https://mariadb.org/download/?t=mariadb&#038;p=mariadb&#038;r=13.1.0&#038;os=Linux&#038;cpu=x86_64&#038;i=systemd&#038;mirror=bouwhuis">MariaDB 13.1</a> Preview is full of nice things.<br />
Some are immediately visible to developers, like the new JSON operators. Some are very useful to DBAs, such as configuration validation. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/mariadb-13-1-feature-in-focus-deny-negative-grants/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;MariaDB 13.1 Feature in Focus: DENY / Negative Grants&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/mariadb-13-1-feature-in-focus-deny-negative-grants/">MariaDB 13.1 Feature in Focus: DENY / Negative Grants</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/mariadb-13-1-feature-in-focus-deny-negative-grants/">MariaDB 13.1 Feature in Focus: DENY / Negative Grants</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Continuent joins MariaDB Foundation as a Silver Sponsor</title>
        <link>https://mariadb.org/continuent-joins-mariadb-foundation-as-a-silver-sponsor/</link>
        <pubDate>Fri, 03 Jul 2026 05:07:29 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB Foundation is pleased to welcome Continuent as a new Silver Sponsor.<br />
Continuent develops solutions for organizations running business-critical applications on MariaDB and other MySQL-compatible databases. …<br />
Continue reading "Continuent joins MariaDB Foundation as a Silver Sponsor"<br />
The post Continuent joins MariaDB Foundation as a Silver Sponsor appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/continuent-joins-mariadb-foundation-as-a-silver-sponsor/">Continuent joins MariaDB Foundation as a Silver Sponsor</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Foundation is pleased to welcome <a href="https://www.continuent.com/">Continuent</a> as a new <a href="https://mariadb.org/donate/#silver-tier-from-eur-5000-per-year">Silver Sponsor.</a><br />
Continuent develops solutions for organizations running business-critical applications on MariaDB and other MySQL-compatible databases. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/continuent-joins-mariadb-foundation-as-a-silver-sponsor/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;Continuent joins MariaDB Foundation as a Silver Sponsor&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/continuent-joins-mariadb-foundation-as-a-silver-sponsor/">Continuent joins MariaDB Foundation as a Silver Sponsor</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/continuent-joins-mariadb-foundation-as-a-silver-sponsor/">Continuent joins MariaDB Foundation as a Silver Sponsor</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Lowering the Barrier for MariaDB Plugin Development: Plugins in More Languages</title>
        <link>https://mariadb.org/lowering-the-barrier-for-mariadb-plugin-development-plugins-in-more-languages/</link>
        <pubDate>Fri, 03 Jul 2026 04:42:07 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB Server has long supported a flexible plugin architecture. Plugins allow developers to extend server functionality in areas such as data types, auditing, storage engines, information schema tables, and more. …<br />
Continue reading "Lowering the Barrier for MariaDB Plugin Development: Plugins in More Languages"<br />
The post Lowering the Barrier for MariaDB Plugin Development: Plugins in More Languages appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/lowering-the-barrier-for-mariadb-plugin-development-plugins-in-more-languages/">Lowering the Barrier for MariaDB Plugin Development: Plugins in More Languages</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Server has long supported a flexible <a href="https://mariadb.org/plugins/">plugin architecture</a>. Plugins allow developers to extend server functionality in areas such as data types, auditing, storage engines, information schema tables, and more. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/lowering-the-barrier-for-mariadb-plugin-development-plugins-in-more-languages/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;Lowering the Barrier for MariaDB Plugin Development: Plugins in More Languages&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/lowering-the-barrier-for-mariadb-plugin-development-plugins-in-more-languages/">Lowering the Barrier for MariaDB Plugin Development: Plugins in More Languages</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/lowering-the-barrier-for-mariadb-plugin-development-plugins-in-more-languages/">Lowering the Barrier for MariaDB Plugin Development: Plugins in More Languages</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Nextcloud renews its Silver sponsorship of MariaDB Foundation</title>
        <link>https://mariadb.org/nextcloud-renews-its-silver-sponsorship-of-mariadb-foundation/</link>
        <pubDate>Thu, 02 Jul 2026 21:58:37 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB Foundation is pleased to announce that Nextcloud has renewed its Silver sponsorship for another year.<br />
Nextcloud and MariaDB are widely used together by organisations that want greater control over their data and infrastructure. …<br />
Continue reading "Nextcloud renews its Silver sponsorship of MariaDB Foundation"<br />
The post Nextcloud renews its Silver sponsorship of MariaDB Foundation appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/nextcloud-renews-its-silver-sponsorship-of-mariadb-foundation/">Nextcloud renews its Silver sponsorship of MariaDB Foundation</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Foundation is pleased to announce that <a href="https://nextcloud.com/">Nextcloud</a> has renewed its <a href="https://mariadb.org/donate/#silver-tier-from-eur-5000-per-year">Silver sponsorship</a> for another year.<br />
Nextcloud and MariaDB are widely used together by organisations that want greater control over their data and infrastructure. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/nextcloud-renews-its-silver-sponsorship-of-mariadb-foundation/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;Nextcloud renews its Silver sponsorship of MariaDB Foundation&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/nextcloud-renews-its-silver-sponsorship-of-mariadb-foundation/">Nextcloud renews its Silver sponsorship of MariaDB Foundation</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/nextcloud-renews-its-silver-sponsorship-of-mariadb-foundation/">Nextcloud renews its Silver sponsorship of MariaDB Foundation</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Still on MySQL 5.7 or 8.0? Those high-severity CVE fixes are covered</title>
        <link>https://www.percona.com/blog/mysql-8-0-eol-support-cve-fixes-covered/</link>
        <pubDate>Thu, 02 Jul 2026 08:01:50 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Upstream MySQL published an out-of-schedule release this week with two high-severity CVE fixes. If you’re running Percona Server for MySQL 5.7 or 8.0 under Extended Lifecycle Support (ELS), the program we previously called Post EOL Support, you don’t have to do anything to qualify for them. We’ve already applied the fixes and re-released the affected … Continued<br />
The post Still on MySQL 5.7 or 8.0? Those high-severity CVE fixes are covered appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/mysql-8-0-eol-support-cve-fixes-covered/">Still on MySQL 5.7 or 8.0? Those high-severity CVE fixes are covered</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Upstream MySQL published an out-of-schedule release this week with two high-severity CVE fixes. If you&#8217;re running Percona Server for MySQL 5.7 or 8.0 under Extended Lifecycle Support (ELS), the program we previously called Post EOL Support, you don&#8217;t have to do anything to qualify for them. We&#8217;ve already applied the fixes and re-released the affected ELS builds.</p>
<p>This is the point of ELS. When a major version reaches End of Life (EOL), the community stops shipping patches, but the databases running on it don&#8217;t stop mattering. ELS keeps critical bug and security fixes coming for versions that are past their EOL date, so you can stay on 5.7 or 8.0 on your own timeline instead of a deadline someone else set.</p>
<h2>What we did</h2>
<p>These CVE fixes landed upstream outside the normal cadence. Under ELS, customers are entitled to security fixes for the versions they run, so we pulled the patches into the 5.7 and 8.0 builds and re-released them. ELS customers can pull the updated builds from the usual private repository.</p>
<h2>Why this matters if you&#8217;re still on 5.7 or 8.0</h2>
<p>Percona Server for MySQL 5.7 reached EOL in October 2023. Percona Server for MySQL 8.0 reached EOL in April 2026. Plenty of production systems are still on both, and not every migration can happen on the upstream&#8217;s schedule. Running an unpatched database past EOL is where the real risk sits: no security fixes, no bug fixes, and no support when something breaks at 2:00 a.m.</p>
<p>ELS closes that gap. You keep getting the critical fixes, including out-of-schedule security patches like these, while you plan an upgrade on terms that work for your team.</p>
<h2>Where to go from here</h2>
<p>If you&#8217;re on 5.7 or 8.0 and don&#8217;t have ELS in place, now is a good time to look at it. The fixes we just shipped are exactly what the program is for. See the details for your version: <a href="https://www.percona.com/mysql-8-0-eol-support/">Extended Lifecycle Support for MySQL 8.0</a> or <a href="https://www.percona.com/post-mysql-5-7-eol-support/">Extended Lifecycle Support for MySQL 5.7</a>. Or reach out via <a href="http://percona.com">percona.com</a> or the Percona Community Forum to discuss coverage for your environment.</p>
<p>&nbsp;</p>
<hr />
<p><span class="notion-enable-hover" data-token-index="0">Written by </span><span class="notion-text-mention-token notion-enable-hover notion-focusable-token" data-token-index="1">@Dennis Kittrell</span><span class="notion-enable-hover" data-token-index="2"> &#8211; Reviewed by </span><span class="notion-text-mention-token notion-enable-hover notion-focusable-token" data-token-index="3">@Matthew Boehm</span><span class="notion-enable-hover" data-token-index="4"> &amp; </span><span class="notion-text-mention-token notion-enable-hover notion-focusable-token" data-token-index="5">@Varun Nagaraju</span> <!-- notionvc: 48fbd903-e255-42ad-8db1-f691698fae89 --></p>
<p><!-- notionvc: f563df38-9d48-4c17-a7b8-cf1211d095a0 --></p>
<p>The post <a href="https://www.percona.com/blog/mysql-8-0-eol-support-cve-fixes-covered/">Still on MySQL 5.7 or 8.0? Those high-severity CVE fixes are covered</a> appeared first on <a href="https://www.percona.com">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/mysql-8-0-eol-support-cve-fixes-covered/">Still on MySQL 5.7 or 8.0? Those high-severity CVE fixes are covered</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>PostgreSQL Autovacuum Internals and Benchmark</title>
        <link>https://percona.community/blog/2026/07/01/postgresql-autovacuum-internals-benchmark/</link>
        <pubDate>Wed, 01 Jul 2026 11:00:00 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>PostgreSQL Autovacuum Internals and Benchmark Introduction Vacuum, or more precisely autovacuum, is the most important automatic maintenance task in PostgreSQL. It is key for performance, but also for long-term database survival. If it runs too often, it can damage performance. If it does not run often enough, performance can suffer. With too few workers, it takes too long. With too many, it consumes resources. If the maintenance work memory is not enough, the load can multiply due to multiple index scans. If you disable it completely, it will rise from the dead and run without limits.</p>
<p><a href="https://percona.community/blog/2026/07/01/postgresql-autovacuum-internals-benchmark/">PostgreSQL Autovacuum Internals and Benchmark</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<h1 id="postgresql-autovacuum-internals-and-benchmark">PostgreSQL Autovacuum Internals and Benchmark</h1>
<h2 id="introduction">Introduction</h2>
<p>Vacuum, or more precisely autovacuum, is the most important automatic maintenance task in PostgreSQL. It is key for performance, but also for long-term database survival. If it runs too often, it can damage performance. If it does not run often enough, performance can suffer. With too few workers, it takes too long. With too many, it consumes resources. If the maintenance work memory is not enough, the load can multiply due to multiple index scans. If you disable it completely, it will rise from the dead and run without limits.</p>
<p>I guess you get it. It is critical to understand what autovacuum does and how it does it.</p>
<p>Autovacuum is triggered when certain row count thresholds are crossed. In the final part of this post we describe a benchmark we run to validate if modified rows is the right approach to trigger automatic vacuum execution or we should consider something different like page based thresholds. We will also measure the impact index in vacuum.</p>
<p>This blog post explains how autovacuum works, but some previous basic understanding of PostgreSQL internals is required.</p>
<p>Here are the terms you’ll need, feel free to skip if you already know them:</p>
<ul>
<li><strong>MVCC (multi-version concurrency control)</strong>: Rather than overwrite a row, PostgreSQL keeps multiple versions of it. This is used to provide consistent views to the different transactions running at the same time, which is why obsolete row versions pile up when there are long running transactions and/or tables are not vacuumed. MVCC is used by transactions to determine row visibility.</li>
<li><strong>Tuple</strong>: One on-disk version of a row. A row updated three times leaves behind three tuples.</li>
<li><strong>Dead tuple</strong>: A tuple that is not visible to any transaction. Reclaiming these is the vacuum’s main job.</li>
<li><strong>Heap</strong>: A table’s main structure, where the tuples live. Indexes are separate structures.</li>
<li><strong>Page (block)</strong>: The 8 KB unit PostgreSQL reads and writes. A heap is an array of pages. If a page is dirty, it means it contains data that hasn’t been written to disk yet.</li>
<li><strong>TID</strong>: A tuple’s address: which page, which slot. Inside of the pages there is an array that points to the actual row position in the page, the slot is the position in that array. This way row space inside of the page can be reorganized without changing the TID. Index entries are TIDs pointing into the heap.</li>
<li><strong>Vacuum</strong>: The operation that removes dead tuples (and does a few things more).</li>
<li><strong>Autovacuum</strong>: Vacuum that PostgreSQL runs for you, in the background, on its own schedule.</li>
<li><strong>Visibility map (VM)</strong>: A small per-table bitmap flagging which pages have all tuples visible or frozen (see freezing).</li>
<li><strong>Freezing</strong>: Stamping old tuples as permanently visible, so their transaction IDs are no longer relevant (see Transaction ID wraparound). Here permanent is a bit misleading, if the row is modified, the permanent tuple will become a dead tuple and will be removed by vacuum.</li>
<li><strong>Transaction ID (XID) wraparound</strong>: Each transaction is assigned an ID. This ID identifies which transactions modified which rows and is thus critical for visibility. The problem is that the transaction counter is finite and eventually wraps around. To avoid problems, older rows must be marked as permanently visible (frozen), this way their transaction id becomes irrelevant.</li>
<li><strong>Bloat</strong>: Space allocated by dead tuples, as dead tuples are not visible, it is wasted space. Vacuum works to reduce it, but can’t always reverse it.</li>
<li><strong>Shared buffers</strong>: PostgreSQL’s in-memory page cache. Nearly all reads and writes pass through it.</li>
<li><strong>WAL (write-ahead log)</strong>: Every change is logged here before it touches a data page, so the database can recover after a crash.</li>
<li><strong>Checkpoint</strong>: The point at which modified (“dirty”) pages in shared buffers are written out to the data files.</li>
</ul>
<h2 id="launcher--worker-architecture">Launcher &amp; Worker Architecture</h2>
<p>The <strong>autovacuum launcher</strong> is a background process that starts autovacuum workers. Its goal is to start one worker per database every <code>autovacuum_naptime</code> seconds (default: 1 min). With N databases, this means the launcher starts a new worker roughly every <code>autovacuum_naptime / N</code> seconds, round-robin across databases. But it is not the launcher that starts the workers. It requests the postmaster to fork an <strong>autovacuum worker</strong> for the chosen database.</p>
<p>Workers, once spawned, run independently until they finish all eligible tables in their assigned database and then exit. Up to <code>autovacuum_max_workers</code> (default 3) workers can run concurrently, and there is no restriction on how many of those may be in the same database. If a database has many tables that need vacuuming, it can run multiple concurrent vacuum workers. In this case, workers coordinate to avoid vacuuming the same table.</p>
<p>A database approximately has a worker assigned every “nap time seconds” or later. A worker is assigned even if there are no tables requiring vacuum.</p>
<h2 id="table-selection--prioritization">Table Selection &amp; Prioritization</h2>
<p>This is the process inside a worker:</p>
<ol>
<li>Scans <code>pg_class</code> to enumerate all tables in the database, then fetches per-relation statistics (dead tuple counts, etc.) from the cumulative statistics system (pgstat) for each one.</li>
<li>Compares each table’s dead-tuple count against the vacuum threshold (see the formula below).</li>
<li>Also checks if the table needs an ANALYZE (separate threshold).</li>
<li>Also checks for <strong>anti-wraparound</strong>: if <code>pg_class.relfrozenxid</code> age exceeds <code>autovacuum_freeze_max_age</code> (default 200M transactions), or if <code>pg_class.relminmxid</code> age exceeds <code>autovacuum_multixact_freeze_max_age</code> (default 400M), the table is vacuumed regardless of all thresholds and even <code>autovacuum_enabled = off</code> on the table.</li>
</ol>
<h3 id="prioritization">Prioritization</h3>
<p>There is no table-level priority sorting in a database. A worker vacuums tables in the order they are collected from the <code>pg_class</code> scan. <code>do_autovacuum()</code> in <code>src/backend/postmaster/autovacuum.c</code> iterates the <code>table_oids</code> list directly. The worker claims each table sequentially by marking it as “mine” in shared memory (this triggers a brief lock to the memory structure so two workers don’t pick the same table at the same time), and calls <code>table_recheck_autovac()</code> to re-read catalog/pgstat and confirm the table still needs work (as it could have been already vacuumed by another worker). Anti-wraparound urgency is handled one level up, at database selection: the launcher’s <code>do_start_worker()</code> preferentially dispatches a worker to whichever database is closest to the wraparound limit. So there is no dead-tuple-count-based ordering of tables. Within a database, processing order is effectively catalog order.</p>
<h2 id="how-vacuum-finds-pages-to-process">How Vacuum Finds Pages to Process</h2>
<p>Once a table is selected, the worker doesn’t blindly scan every page. It uses the <strong>visibility map</strong> (VM) to skip pages that do not need vacuuming.</p>
<h3 id="the-visibility-map">The Visibility Map</h3>
<p>Every table has an associated visibility map, a bitmap with two bits per heap page:</p>
<ol>
<li>All-visible bit: every tuple on the page is visible to all current and future transactions. During a normal (non-aggressive) vacuum, this page can generally be skipped. There are no dead tuples to reclaim. However, even all-visible pages may be visited in some cases, such as for eager freezing or readahead optimization (pages are read sequentially even if some of them are not needed).</li>
<li>All-frozen bit: every tuple on the page is frozen, marked with the <code>HEAP_XMIN_FROZEN</code> infomask bits (since PostgreSQL 9.4, the value of <code>xmin</code> is <strong>preserved</strong> for forensics rather than physically overwritten with <code>FrozenTransactionId</code> although a lot of people still think the xmin is changed). The page can be skipped even during aggressive/anti-wraparound vacuum. An aggressive vacuum must visit all pages that are <em>not</em> all-frozen to freeze as many tuples as possible.</li>
</ol>
<p>The VM makes vacuuming efficient because it reduces the number of pages to visit while searching for dead tuples. If a 10GB table has dead tuples on only 50 pages, vacuum reads the VM (around 320KB for a 10GB heap, 2 bits per 8KB page) and then focuses on those 50 pages rather than the full 10GB. We already mentioned that a normal vacuum can also visit some additional pages for eager freezing or readahead, but the VM still eliminates the vast majority of random I/O.</p>
<p>Visibility-map bits are cleared by backends running DML statements and usually set by autovacuum workers or manually triggered vacuum operations.</p>
<p>The VM is also used by index-only scans to determine whether visiting the heap page to validate tuple visibility is needed. If the page in the VM is marked as “all-visible,” then visibility checks are not required and we don’t need that extra access, improving performance significantly.</p>
<h3 id="the-scan-process">The Scan Process</h3>
<p>The worker performs a <strong>sequential scan of the heap</strong>, but guided by the VM:</p>
<ol>
<li>Read the VM to identify pages that are NOT all-visible and may contain dead tuples.</li>
<li>For each such page, read it into shared buffers (if not already there).</li>
<li>Examine each tuple’s header (<code>t_xmin</code>, <code>t_xmax</code>, <code>t_infomask</code>) to determine if the tuple is dead, meaning it was deleted or updated, and no running transaction can see it anymore.</li>
<li>Dead tuples are collected into an in-memory <strong>dead-TID store</strong>, since PG17 a <code>TidStore</code>, a compact adaptive-radix-tree keyed by block number that replaced the old sorted <code>ItemPointer</code> array and its hard 1 GB cap. Its size is bounded by <code>autovacuum_work_mem</code> (default -1, which falls back to <code>maintenance_work_mem</code>, default 64MB). For manual <code>VACUUM</code>, <code>maintenance_work_mem</code> is used directly.</li>
<li>If the work memory fills up before the table is fully scanned, the worker pauses the heap scan, processes the accumulated dead tuples (index cleanup + heap cleanup), then resumes the heap scan from where it stopped. This means a single vacuum of a large, heavily updated table may involve multiple passes through the indexes.</li>
</ol>
<h3 id="limiting-cache-impact-with-the-buffer-ring">Limiting Cache Impact with the Buffer Ring</h3>
<p>The step 2 above says “read the heap page into shared buffers”), but if vacuum has to pull every page it scans into <code>shared_buffers</code>, vacuuming a large table would evict the pages that other queries depend on, trashing the cache during a maintenance task. PostgreSQL prevents this with a <strong>buffer access strategy</strong>, commonly called a <strong>ring buffer</strong>.</p>
<p>Rather than allocating pages all over the shared pool, vacuum uses a small <strong>ring</strong> of shared pool pages that it reuses circularly: when it needs a buffer for a new page, and the ring is full, it recycles the oldest buffer in the ring instead of claiming another from <code>shared_buffers</code>. If vacuum needs a page already in the shared pool, that page is not added to the ring. The ring size is set by <code>vacuum_buffer_usage_limit</code>, default 2 MB in PG18 (256 buffers of 8 KB), ranges from 128 kB to 16 GB, with a limit of 1/8 of <code>shared_buffers</code> (you can set it higher, but it will limited to that value). A value of <code>0</code> disables the ring entirely, letting vacuum use as much of <code>shared_buffers</code> as it needs. The same limit applies to <code>ANALYZE</code> and to autovacuum (which runs the same vacuum code). The <code>VACUUM</code> command accepts a per-statement <code>BUFFER_USAGE_LIMIT</code> option.</p>
<p>The ring has consequences: <strong>When the buffer being recycled is still dirty, vacuum must write it out before reusing the slot</strong>. As WAL is written before the page, we have to flush any outstanding WAL for that page first. So once vacuum dirties more pages than the ring can hold, it begins doing <strong>its own writes</strong> inline rather than leaving them all for the checkpointer or background writer. This may look as a trade-off as the ring caps vacuum’s cache footprint, but requires vacuum to perform some of its own write-back (and WAL flushing) as it runs. But if a page was read into the ring, probably that pages was not very active and will not be read again soon. Raising <code>vacuum_buffer_usage_limit</code> (or setting it to <code>0</code>) relaxes the limit: a faster vacuum. But a faster vacuum that will evict more active pages and later will require more work by the checkpointer.</p>
<h3 id="determining-tuple-liveness">Determining Tuple Liveness</h3>
<p>For each tuple on a non-all-visible page, vacuum checks:</p>
<ul>
<li><code>t_xmin</code> (inserting transaction identified): Check whether it committed. If the inserting transaction aborted, the tuple is dead immediately.</li>
<li><code>t_xmax</code> (deleting/updating transaction identifier): Check whether it committed and is older than the oldest running transaction (<code>OldestXmin</code>). If so, no active transaction can see this tuple version and the tuple is dead.</li>
<li>Vacuum, like the other backends, reads <code>pg_xact</code> (the commit log / CLOG) to determine transaction commit status, and sets <strong>hint bits</strong> (<code>HEAP_XMIN_COMMITTED</code>, <code>HEAP_XMAX_COMMITTED</code>, etc.) on tuple headers so future accesses don’t need to re-check <code>pg_xact</code>. Changing the hint bits marks the page as dirty, but does not save that change in the WAL, unless specified in the configuration (checksums enabled or wal_log_hints). The purpose of the hint bits is help future transactions know the outcome of the inserting/modifying transactions without checking the commit log.</li>
</ul>
<p><code>OldestXmin</code> is the oldest transaction ID that any running transaction might still need to see, also known sometimes as the xmin horizon. Tuples deleted or replaced by transactions newer than <code>OldestXmin</code> <strong>cannot be vacuumed</strong> because some active transactions might still need them. This is why long-running transactions limit the space that vacuum can reclaim.</p>
<h2 id="what-happens-to-heap-pages">What Happens to Heap Pages</h2>
<p>Once dead tuples are identified on a page:</p>
<ol>
<li>Dead tuple line pointers are set to <code>LP_DEAD</code> during the heap scan phase. Later, after index cleanup removes all dangling index references, vacuum performs a second heap pass that converts these to <code>LP_UNUSED</code>, making the slots available for reuse. (For tables with no indexes, vacuum can mark <code>LP_UNUSED</code> immediately since there are no index pointers to worry about.)</li>
<li>The page is compacted. Live tuples are shuffled toward the high end of the page, and free space is consolidated in the middle (between the line pointer array and the tuple data area). This is called <strong>page pruning/defragmentation</strong>. It updates the page’s <code>pd_lower</code> (end-of-line pointers) and <code>pd_upper</code> (start-of-tuple data) to reflect the new free space.</li>
<li>The page is marked dirty in shared buffers. It will be written back to disk by the background writer, at the next checkpoint or if the ring buffer is full and vacuum needs that space. This is the <code>vacuum_cost_page_dirty</code> cost event (adds 20 to the cost global cost of running vacuum operations).</li>
<li>The VM is updated. If, after removing dead tuples, every remaining tuple on the page is visible to all transactions, the all-visible bit is set. During aggressive/anti-wraparound vacuum, if all tuples are also frozen, the all-frozen bit is set.</li>
<li>The FSM (Free Space Map) tree is updated periodically (every <code>VACUUM_FSM_EVERY_PAGES</code> pages or after heap/index cleanup pass, not after every individual page is added to the FSM) to advertise newly available space, so future DML operations can reuse it.</li>
</ol>
<h3 id="heap-truncation">Heap Truncation</h3>
<p>After processing all pages, vacuum checks whether the <strong>last pages</strong> of the heap file are entirely empty (all dead tuples were removed and there are no live tuples). If so, it <strong>truncates the file</strong>, physically shrinking it and returning disk space to the OS. This is the only situation where vacuum reduces the on-disk size of a table. The space reclaimed in the middle of the file is reused, not returned to the filesystem.</p>
<p>Truncation requires an <strong>AccessExclusiveLock</strong> lock during the truncation, which can cause a short stall on concurrent access. Table truncation can be disabled per-table or globally with <code>vacuum_truncate = off</code>.</p>
<h2 id="index-cleanup">Index Cleanup</h2>
<p>Index cleanup is also required and is often an expensive part of vacuum. Indexes must be cleaned because they contain pointers (TIDs) to heap tuples. If the corresponding heap tuple is dead, the index entry becomes a <strong>dangling pointer</strong> and must be removed.</p>
<h3 id="the-process">The Process</h3>
<ol>
<li>After the heap scan (or after <code>maintenance_work_mem</code> fills), vacuum has its dead-TID store populated (block-ordered).</li>
<li>For <strong>each index</strong> on the table, vacuum calls the index access method’s <code>ambulkdelete</code> function. For B-tree indexes, this invokes <code>btbulkdelete()</code> then <code>btvacuumscan()</code>, which scans the <strong>entire index in physical order</strong> (every page except the metapage, including all leaf pages), checking every index entry’s TID against the dead-TID store. Matching entries are removed. (See <code>btvacuumscan()</code> in <code>src/backend/access/nbtree/nbtree.c</code>, which processes each page with <code>btvacuumpage()</code>.)</li>
<li>Only <strong>after</strong> all indexes are cleaned does vacuum go back and clean the heap pages (mark <code>LP_UNUSED</code>, compact). This is handled by <code>lazy_vacuum_all_indexes()</code> followed by the heap cleanup phase in <a href="https://github.com/postgres/postgres/blob/REL_18_STABLE/src/backend/access/heap/vacuumlazy.c" target="_blank" rel="noopener noreferrer"><code>src/backend/access/heap/vacuumlazy.c</code></a>.</li>
</ol>
<p>The order of operations is important: index entries must be removed <strong>before</strong> their heap tuple slots are recycled, otherwise an index scan could follow a pointer to a slot that now holds a different, unrelated tuple, returning incorrect results.</p>
<h3 id="why-index-vacuum-is-expensive">Why Index Vacuum Is Expensive</h3>
<p>The PostgreSQL documentation for the <a href="https://www.postgresql.org/docs/18/index-functions.html" target="_blank" rel="noopener noreferrer"><code>ambulkdelete</code> interface</a> states:</p>
<blockquote>
<p><em>This is a “bulk delete” operation that is intended to be implemented by <strong>scanning the whole index</strong> and checking each entry to see if it should be deleted.</em></p>
</blockquote>
<p>There is <strong>no partial index scan optimization</strong>. The design requires scanning the index completely. The dead TIDs are sorted by heap location, but index entries are ordered by key value, so there is no way to locate only the affected index pages without scanning all leaf pages.</p>
<p>Consequences:</p>
<ul>
<li>Each index is completely scanned for every vacuum cycle. For a table with 5 indexes and 100GB of index data, vacuum reads 500GB of index pages each full pass.</li>
<li>If the space for dead-TID is too small and the heap scan must pause mid-way, <code>ambulkdelete</code> is called <strong>multiple times</strong>, once per batch of dead TIDs. The documentation states: “Because of limited <code>maintenance_work_mem</code>, <code>ambulkdelete</code> might need to be called more than once when many tuples are to be deleted.” Each call performs a full index scan. With a 100GB table, 64MB of work memory, and 5 indexes, this can result in dozens of full index scans. (PG17’s <code>TidStore</code> packs far more dead TIDs into the same memory, so this multi-pass case is much rarer than it was in previous versions.)</li>
<li>This is why increasing <code>autovacuum_work_mem</code> (or <code>maintenance_work_mem</code>) for vacuum-heavy workloads can be required. If the autovacuum operation is written into the log (<code>log_autovacuum_min_duration</code>), look for <code>index scans</code>.</li>
</ul>
<h3 id="index-cleanup-optimizations">Index Cleanup Optimizations</h3>
<ul>
<li>Bypass optimization (near-zero dead tuples): when 2% or fewer of the table’s pages contain <code>LP_DEAD</code> items and the accumulated dead-TID storage stays under 32MB, vacuum enters bypass mode: it skips both index cleanup and the second heap-vacuuming pass, avoiding a full index scan as the benefit is reduced. This avoids the jump between “zero dead tuples is instant” and “one dead tuple requires multiple full index scans”. (See <code>BYPASS_THRESHOLD_PAGES</code> in <code>vacuumlazy.c</code>.)</li>
<li><code>INDEX_CLEANUP</code> parameter: <code>AUTO</code> (default) allows the bypass optimization; <code>OFF</code> forces vacuum to always skip index vacuuming (accepting index bloat); <code>ON</code> forces full index vacuuming every time. The <code>OFF</code> setting is useful for emergency situations where you need vacuum to advance <code>relfrozenxid</code> quickly. (See <a href="https://www.postgresql.org/docs/18/sql-vacuum.html" target="_blank" rel="noopener noreferrer">VACUUM documentation</a>.)</li>
<li>B-tree “page deletion”: when a B-tree leaf page becomes empty after vacuum removes all its entries, the page is marked as deleted and can be recycled. The file does not reduce its size, but the pages can be reused later.</li>
<li>Simple B-tree tuple deletion: when a query visits a dead tuple via an index scan, it can mark that pointer as dead in the index itself. If, at a later time, more space is needed in that page, instead of performing a split, the index entries pointing to dead tuples can be removed to make room for the new entry.</li>
<li>Bottom-up deletion (PG14+): B-tree indexes can proactively remove known-dead entries during page splits, reducing the work left for vacuum.</li>
</ul>
<h2 id="concurrency-vacuum-vs-active-backends">Concurrency: Vacuum vs. Active Backends</h2>
<p>Vacuum runs concurrently with normal database operations. It does <strong>not</strong> lock the table exclusively (it takes a <code>ShareUpdateExclusiveLock</code>, which conflicts only with other vacuums, <code>ALTER TABLE</code>, and certain <code>CREATE INDEX</code> operations).</p>
<h3 id="page-level-locking">Page-Level Locking</h3>
<p>When vacuum needs to read or modify a heap page it uses the common shared buffer access locks:</p>
<ol>
<li>For reading (AKA identifying dead tuples), vacuum acquires a shared <strong>buffer content lock</strong> on the shared buffer.</li>
<li>For pruning and freezing (AKA removing dead tuples, setting vm flags), vacuum requires a <strong>buffer cleanup lock</strong>. This is an exclusive lock (no other backend can hold a lock on the buffer). In a non-aggressive vacuum, if the cleanup lock cannot be obtained immediately (another transaction has a shared lock for example), vacuum <strong>skips pruning/freezing on that page</strong> and moves on. An aggressive (anti-wraparound) vacuum will wait for the lock instead.</li>
<li>These locks are held only for the duration of the in-memory page operation and should be very fast. They do <strong>not</strong> block concurrent <code>SELECT</code> or <code>DML</code> on other pages.</li>
</ol>
<h3 id="what-happens-when-a-backend-reads-a-page-being-vacuumed">What Happens When a Backend Reads a Page Being Vacuumed</h3>
<ul>
<li>If vacuum is <strong>currently modifying</strong> the page (holding the cleanup lock): the backend waits until vacuum releases the lock, then reads the page in its post-vacuum state. The backend sees only live tuples. The dead ones have just been removed. This is safe because the dead tuples were invisible to the backend’s snapshot anyway.</li>
<li>If vacuum <strong>skipped</strong> the page (could not get the cleanup lock): dead tuples remain on the page. They are invisible to backends via MVCC visibility checks and will be cleaned up in a future vacuum cycle.</li>
<li>If vacuum has <strong>not yet reached</strong> the page: the backend reads normally. Dead tuples are still present but invisible to the backend’s MVCC snapshot. They are skipped during visibility checks.</li>
</ul>
<h3 id="what-happens-when-a-backend-writes-while-vacuum-runs">What Happens When a Backend Writes While Vacuum Runs</h3>
<ul>
<li>INSERT into a vacuumed page: vacuum freed space, the FSM knows about it, the inserter uses that space. No conflict.</li>
<li>UPDATE/DELETE on the same table: concurrent DML does not conflict with vacuum’s <code>ShareUpdateExclusiveLock</code>. If a backend deletes/updates a tuple on a page vacuum hasn’t reached yet, vacuum will find and clean it (if committed by then). If the tuple is on a page vacuum already passed, it will be caught by the next vacuum cycle.</li>
<li>UPDATE/DELETE on a page vacuum is currently processing: the buffer lock serializes access. If vacuum removes dead tuples and the backend then updates a live tuple on the same page, there’s no conflict because they operate on different tuple slots.</li>
</ul>
<h3 id="index-scan-during-index-cleanup">Index Scan During Index Cleanup</h3>
<p>While vacuum scans an index to remove dead entries, concurrent index scans by backends can proceed normally. B-tree indexes use a <strong>pin-based</strong> protocol that avoids vacuum deleting a page that any backend has pinned. Specifically, vacuum marks pages as half-dead first, and only recycles them when no backend holds a pin. This ensures index scans never follow a pointer to a recycled page.</p>
<h2 id="threshold-formula">Threshold Formula</h2>
<p>A table becomes eligible for autovacuum when its dead-tuple count crosses a threshold. As of PG18 the calculation is limited by <code>autovacuum_vacuum_max_threshold</code>:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-0">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">vacuum_threshold = Min(
</span></span><span class="line"><span class="cl"> autovacuum_vacuum_max_threshold,
</span></span><span class="line"><span class="cl"> autovacuum_vacuum_threshold + autovacuum_vacuum_scale_factor * reltuples
</span></span><span class="line"><span class="cl">)</span></span></code></pre>
</div>
</div>
</div>
<p>Defaults:</p>
<ul>
<li><code>autovacuum_vacuum_threshold = 50</code></li>
<li><code>autovacuum_vacuum_scale_factor = 0.2</code></li>
<li><code>autovacuum_vacuum_max_threshold = 100,000,000</code> (<strong>new in PG18</strong>).</li>
</ul>
<p><code>autovacuum_vacuum_max_threshold</code> is used to avoid massive tables requiring a huge number of dead tuples before firing vacuum.</p>
<h3 id="insert-triggered-vacuum-pg13">Insert-triggered vacuum (PG13+)</h3>
<p>A table also becomes eligible based on inserts alone. Since PG18 the scale-factor term is multiplied by the <strong>unfrozen fraction</strong> of the table:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-1">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">vacuum_insert_threshold =
</span></span><span class="line"><span class="cl"> autovacuum_vacuum_insert_threshold
</span></span><span class="line"><span class="cl"> + autovacuum_vacuum_insert_scale_factor * reltuples * (1 - relallfrozen / relpages)</span></span></code></pre>
</div>
</div>
</div>
<p>Defaults:</p>
<ul>
<li><code>autovacuum_vacuum_insert_threshold = 1000</code></li>
<li><code>autovacuum_vacuum_insert_scale_factor = 0.2</code></li>
</ul>
<p>The <code>(1 - relallfrozen / relpages)</code> is used to avoid time between runs constantly growing for tables that are mostly inserted. In previous versions, as the table grows the number of inserted rows required to trigger a vacuum used to grow also. With this optimization, the number of inserts required to trigger vacuum tends to be more constant.</p>
<h3 id="analyze-trigger">ANALYZE trigger</h3>
<p>The following formula applies to determine if ANALYZE is required:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-2" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-2">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">changed_tuples &gt; analyze_threshold + analyze_scale_factor * reltuples</span></span></code></pre>
</div>
</div>
</div>
<p>Defaults: <code>autovacuum_analyze_threshold = 50</code>, <code>autovacuum_analyze_scale_factor = 0.1</code>.</p>
<p>Per-table overrides via <code>ALTER TABLE ... SET (autovacuum_vacuum_scale_factor = ...)</code> that take precedence over default configuration.</p>
<h2 id="cost-based-vacuum-throttling">Cost-Based Vacuum Throttling</h2>
<p>The cost-based mechanism is linked directly to the page-level operations described above. Every time vacuum touches a page, it incurs a cost depending on what happened:</p>
<p>Vacuum I/O is throttled via a cost/delay mechanism shared with manual <code>VACUUM</code>:</p>
<ul>
<li><code>vacuum_cost_page_hit</code> = 1, page already in shared buffers (cheap: no I/O, only CPU to inspect tuples)</li>
<li><code>vacuum_cost_page_miss</code> = 10 (PG17 and earlier; <strong>changed to 2 in PG18</strong>), page read from OS into shared buffers (may still be in OS page cache, so not necessarily a physical disk read)</li>
<li><code>vacuum_cost_page_dirty</code> = 20, vacuum modified the page (removed dead tuples, compacted it). This is the most expensive because it generates a dirty buffer that must eventually be written to disk by the background writer/checkpointer</li>
</ul>
<p>These costs are <strong>additive per page</strong>. On PG17 (miss = 10): a page read from disk and then modified costs <strong>30</strong>. On PG18 (miss = 2): the same scenario costs <strong>22</strong>. A page already in shared buffers (hit = 1) that gets modified costs <strong>21</strong> on both versions.</p>
<p>The cost limit is <strong>shared across all running autovacuum workers</strong>. If 3 workers are active, each effectively gets <code>200 / 3</code> or around <code>66</code> cost budget per cycle. This means adding more workers doesn’t linearly increase I/O as all workers get their cost limit reduced. The global limit is <code>autovacuum_vacuum_cost_limit</code>, that by default is -1, meaning it inherits <code>vacuum_cost_limit</code>, which by default is 200.</p>
<p>The workers accumulate cost points as operations happen. When, for a specific worker, the accumulated total reaches its assigned limit, the worker will sleeps for <code>autovacuum_vacuum_cost_delay</code> (default 2ms).</p>
<h3 id="example">Example</h3>
<p>With defaults (limit=200, delay=2ms), one worker on <strong>PG17</strong> (miss=10):</p>
<ul>
<li>If all pages are a miss + dirty write (cost 30 each): 200/30 ~ <strong>6 pages</strong>, then sleep 2ms, giving ~3,000 pages/sec.</li>
<li>If every page is already in shared buffers and gets modified (hit + dirty = 21): 200/21 ~ <strong>9 pages</strong>, then sleep 2ms, giving ~4,500 pages/sec.</li>
<li>If all pages are a shared-buffer hit with no modifications (cost 1 each): 200 pages, then sleep 2ms, giving ~100,000 pages/sec.</li>
</ul>
<p>On <strong>PG18</strong> (miss=2), miss + dirty reduces the cost to 22 per page, so throughput for cold pages rises to 200/22 ~ 9 pages per cycle.</p>
<p>If we have 3 workers sharing the limit, then each gets 66 cost/cycle, so throughput per worker drops proportionally.</p>
<p>For large this default is often <strong>too conservative</strong>. Common tuning: raise <code>autovacuum_vacuum_cost_limit</code> to 1000-2000 and/or reduce <code>cost_delay</code> to 0 on critical tables.</p>
<p>The manual <code>VACUUM</code> parameter <code>vacuum_cost_delay</code> defaults to 0 (no throttling). Autovacuum workers use <code>autovacuum_vacuum_cost_delay</code>, which has the default value of 2ms since PG12 (earlier versions defaulted to 20ms). Per-table storage parameters <code>autovacuum_vacuum_cost_delay</code> / <code>autovacuum_vacuum_cost_limit</code> override the globals for that specific table. This a way to tune the impact of high-churn tables on the shared cost.</p>
<h2 id="what-drives-vacuum-cost">What Drives Vacuum Cost</h2>
<p>As we’ve seen, autovacuum is triggered by the number of dead or inserted tuples. But is the real cost driven by the number of dead tuples, or by the number of pages it has to visit and clean?.</p>
<p>We designed a benchmark to try to discover which is the real cost driver for autovacuum operations.</p>
<h3 id="the-question">The question</h3>
<p>We have two hypotheses that we want to analyze:</p>
<ol>
<li>Whether autovacuum cost is driven by the <strong>count of dead tuples</strong> or by the <strong>number of heap pages</strong> those dead tuples are spread across.</li>
<li>How the <strong>number of indexes</strong> amplifies that cost.</li>
</ol>
<h3 id="the-table-and-the-key-variable">The table and the key variable</h3>
<p>We will use a single table for every run of the benchmark. We will drop and recreate the table each time:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-3" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-3">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">CREATE</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">bench_table</span><span class="w"> </span><span class="p">(</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">id</span><span class="w"> </span><span class="nb">INTEGER</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="p">,</span><span class="w"> </span><span class="c1">-- sequential 1 .. 10,000,000
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="w"> </span><span class="n">val</span><span class="w"> </span><span class="nb">INTEGER</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="w"> </span><span class="k">DEFAULT</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">padding</span><span class="w"> </span><span class="nb">TEXT</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">NULL</span><span class="w"> </span><span class="c1">-- repeat('x', 96)
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="p">);</span></span></span></code></pre>
</div>
</div>
</div>
<p>The padding column fixes the row width at 128 bytes, giving around <strong>58 rows per 8 KB page</strong>. For 10M rows we will have <strong>172,414 heap pages</strong> or 1.3 GB. We fill the table, then run <code>VACUUM FREEZE</code> so every page starts <strong>all-visible and all-frozen</strong> to have a clean baseline. Then we create 0 to 5 <strong>redundant B-tree indexes</strong>, all on <code>id</code>. Each index is a separate physical structure that vacuum must scan in full.</p>
<p>The independent variable here is <em>the distribution of dead tuples</em>. We use two strategies delete the <strong>same number of rows</strong>. They differ only in which pages are touched:</p>
<table>
<thead>
<tr>
<th>Strategy</th>
<th>DELETE predicate (10%)</th>
<th>Pages dirtied</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>compact</strong></td>
<td><code>WHERE id &lt;= 1,000,000</code></td>
<td>first ~10% of pages (low ids = first physical pages)</td>
</tr>
<tr>
<td><strong>spread</strong></td>
<td><code>WHERE id % 10 = 0</code></td>
<td>100% of pages (every page loses between 5 and 6 rows of its 58 rows)</td>
</tr>
</tbody>
</table>
<p>For this benchmark, we use <code>DELETE</code> rather than <code>UPDATE</code> so no new tuple versions are created. The table does not grow and no index entries are added (no leaf page splits).</p>
<h3 id="the-test-matrix">The test matrix</h3>
<p>We have 6 index counts (0-5), multiplied by 3 dead-tuple percentages (10/25/50%) and 2 distributions gives us 36 combinations. We repeated each combination 10 times for a total of 360 runs.</p>
<h3 id="how-a-single-run-is-measured">How a single run is measured</h3>
<ol>
<li>Recreate the table, fill it with data, <code>VACUUM FREEZE</code>, build the required indexes for the test (autovacuum disabled on the table throughout setup).</li>
<li><code>DELETE</code> to generate the dead tuples for this combination.</li>
<li>Pre-test <code>CHECKPOINT</code>: flush the buffers dirtied during setup, so the post-test checkpoint will only account for pages autovacuum makes dirty.</li>
<li>Reset the shared I/O counters: <code>pg_stat_reset_shared('io' | 'bgwriter' | 'checkpointer')</code>. Note that we do not call <code>pg_stat_reset()</code>, which would zero <code>n_dead_tup</code> and prevent autovacuum from triggering.</li>
<li>Record the start time, then enable autovacuum on the table with parameters that should trigger autovacuum (<code>autovacuum_vacuum_threshold = 1</code>, <code>autovacuum_vacuum_scale_factor = 0</code>). As <code>autovacuum_naptime</code> is 1s, the launcher should pick the table up approximately within a second.</li>
<li>Poll every 0.5 s until vacuum is done: <code>last_autovacuum</code> is after start_time<code>and</code>n_dead_tup = 0`.</li>
<li>Stop the clock, force a post-test checkpoint, and collect metrics.</li>
</ol>
<h3 id="what-is-captured-and-from-where">What is captured, and from where</h3>
<table>
<thead>
<tr>
<th>Signal</th>
<th>Source</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>Wall-clock <code>duration_s</code></td>
<td><code>clock_gettime</code> (monotonic)</td>
<td>approximate time (vacuum+nap)</td>
</tr>
<tr>
<td>Autovacuum-worker reads/hits/writes</td>
<td><code>pg_stat_io</code>, filtered to <code>backend_type = 'autovacuum worker'</code></td>
<td>isolates the worker from every other process (PG18)</td>
</tr>
<tr>
<td>Heap vs index blocks</td>
<td><code>pg_statio_user_tables</code> (before/after diff)</td>
<td>specific table data</td>
</tr>
<tr>
<td>Write breakdown</td>
<td><code>pg_stat_io</code> per backend + <code>pg_stat_checkpointer</code></td>
<td>who wrote the dirty pages</td>
</tr>
<tr>
<td>Dirty-page count / completion</td>
<td><code>pg_visibility_map_summary</code> (from <code>pg_visibility</code>)</td>
<td></td>
</tr>
</tbody>
</table>
<p>I/O is recorded two ways: <strong>operation counts</strong> (<code>reads</code>/<code>writes</code>, which can be multi-block) and <strong>byte-derived page counts</strong> (<code>read_bytes</code>/<code>write_bytes</code> ÷ 8192, exact regardless of multi-block coalescing). We decided to look at the byte-derived counts. Each combination’s 10 iterations are aggregated as a <strong>median with an interquartile (Q1-Q3) band</strong>.</p>
<h3 id="results">Results</h3>
<p>This is the test environment we used:</p>
<ul>
<li>PostgreSQL: 18.4 (PGDG, <code>pg_visibility</code> contrib)</li>
<li>OS / host: Ubuntu 24.04 LTS, x86_64, 4 dedicated vCPU / 15 GiB RAM, SSD-backed</li>
<li>Execution: benchmark runs locally on the DB host over the Unix socket (no network in the timing path)</li>
<li>Key GUCs:
<ul>
<li><code>shared_buffers = 4GB</code></li>
<li><code>maintenance_work_mem = 1GB</code></li>
<li><code>work_mem = 64MB</code></li>
<li><code>autovacuum_naptime = 1s</code></li>
<li><code>autovacuum_vacuum_cost_delay = 2ms</code></li>
<li><code>autovacuum_vacuum_cost_limit = 200</code></li>
<li><code>vacuum_cost_page_miss = 2</code></li>
<li><code>checkpoint_timeout = 15min</code></li>
<li><code>max_wal_size = 4GB</code></li>
<li><code>full_page_writes = on</code></li>
<li><code>track_io_timing = on</code></li>
</ul>
</li>
<li>Per-table triggers:
<ul>
<li><code>autovacuum_vacuum_threshold = 1</code></li>
<li><code>autovacuum_vacuum_scale_factor = 0</code></li>
</ul>
</li>
<li>Workload:
<ul>
<li>Table with 10,000,000 rows (172,414 heap pages, ~1.3 GB)</li>
<li>2.4 GB working set with 5 indexes (around 225 MB each), fits completely in <code>shared_buffers</code></li>
</ul>
</li>
<li>Sampling: 36 combinations x 10 iterations = 360 runs</li>
</ul>
<p>The whole 2.4 GB working set (heap plus five 225 MB indexes) is resident in <code>shared_buffers</code>. The <code>maintenance_work_mem = 1 GB</code> keeps index cleanup single-pass. Autovacuum throttling is at the default (<code>cost_delay = 2ms</code>). Durations below are 10-iteration medians.</p>
<p>Hypothesis 1: it’s pages, not tuples. At 0 indexes:</p>
<table>
<thead>
<tr>
<th>dead tuples</th>
<th style="text-align: right">compact</th>
<th style="text-align: right">spread</th>
<th style="text-align: right">spread / compact</th>
</tr>
</thead>
<tbody>
<tr>
<td>10% (1.0M)</td>
<td style="text-align: right">5.0 s</td>
<td style="text-align: right">43.6 s</td>
<td style="text-align: right">8.7x</td>
</tr>
<tr>
<td>25% (2.5M)</td>
<td style="text-align: right">11.5 s</td>
<td style="text-align: right">43.6 s</td>
<td style="text-align: right">3.8x</td>
</tr>
<tr>
<td>50% (5.0M)</td>
<td style="text-align: right">21.8 s</td>
<td style="text-align: right">43.4 s</td>
<td style="text-align: right">2.0x</td>
</tr>
</tbody>
</table>
<p>First thing we see is that the <strong>spread column is almost constant</strong> (43.6, 43.6, 43.4 s) as the dead-tuple count goes from 1M to 5M, because in every case 100% of pages are dirtied. This means that pages visited is the cost driver. Meanwhile the compact column scales because, for compact, more dead tuples means more pages become dirty. When we have 50% dead tuples, the cost is half the spread.</p>
<p><figure>
<img decoding="async" src="https://percona.community/blog/2026/06/pep_autovacuum_duration_compact_vs_spread.png" alt="Autovacuum duration, compact vs spread, one panel per dead-tuple percentage. Spread (dashed) sits far above compact (solid) and is nearly flat across 10/25/50%." /></figure>
</p>
<p>The following chart plots every run by <em>dirty-page percentage</em> rather than dead-tuple count.</p>
<p><figure>
<img decoding="async" src="https://percona.community/blog/2026/06/pep_autovacuum_dirty_pages_vs_duration.png" alt="Scatter of autovacuum duration against percentage of pages dirty before vacuum; points rise with dirty-page %, colored by index count." /></figure>
</p>
<p>For the second hypothesis, we see that indexes amplify the cost. Each redundant index adds a near-constant increment (compact 50%): 21.8, 28.1, 32.6, 37.6, 42.3, 47.4 s. Around 5s per index. The number of dead pages also adds some cost, but if the number of dead pages is reduced, then the impact of indexes is lower (compact 10%)</p>
<p><figure>
<img decoding="async" src="https://percona.community/blog/2026/06/pep_autovacuum_duration_by_indexes.png" alt="Autovacuum duration versus number of indexes, compact and spread panels; each line rises roughly linearly with index count." /></figure>
</p>
<p>The I/O data shows some <strong>distribution-specific</strong> behaviors. For spread 50%, heap blocks accessed hold at <strong>547,323</strong> across 1-5 indexes (the heap is scanned once, guided by the VM) while index blocks grow <strong>+27,422 per index</strong>. Each <code>ambulkdelete</code> is a full leaf scan. Compact 50% behaves differently: the heap io is lower (<strong>288,699</strong>, since fewer pages have dead tuples) but index blocks climb <strong>4x faster (~+109,533 per index)</strong>. Deleting contiguous id ranges empties whole B-tree leaf pages, adding page-deletion and recycling work (B-trees recycle fully-empty pages rather than merging partially-filled ones) on top of the scan. One thing worth noting is that heap access is <strong>not</strong> flat from 0 to 1 index, it jumps (spread 374,903 to 547,323) because index cleanup forces vacuum’s second heap pass. After that, it is flat only across 1-5 indexes.</p>
<p><figure>
<img decoding="async" src="https://percona.community/blog/2026/06/pep_autovacuum_heap_vs_index_io.png" alt="Stacked heap-versus-index blocks accessed by index count; heap roughly constant across 1–5 indexes while index I/O grows linearly, more steeply for compact than spread." /></figure>
</p>
<p>The write breakdown tells us that who writes vacuum’s dirtied pages is not fixed. With zero or one index, the autovacuum worker writes almost nothing: it dirties heap buffers and leaves them for the checkpointer, which flushes all of them in those cases. But as indexes are added, the <strong>worker’s own writes increase</strong>: spread 50% goes 0, 27k, 54k, 82k, 109k, 136k pages written by the worker for 0-5 indexes (compact 50%: 0, 0, 14k, 27k, 41k, 55k). This is the effect of the <strong>buffer ring</strong> (see <em>Limiting Cache Impact</em> above): once index cleanup dirties more pages than the 2 MB ring can hold, the worker has to write and evict them itself rather than defer to the checkpointer. So the write cost shifts from the checkpointer toward the worker as index count grows, a direct consequence of the cache-protecting ring.</p>
<p><figure>
<img decoding="async" src="https://percona.community/blog/2026/06/pep_autovacuum_write_breakdown.png" alt="Write breakdown by process; at low index counts the checkpointer does nearly all writes, but the autovacuum worker’s own writes grow with index count." /></figure>
</p>
<p>Finally we have a heat map of the durations across all 36 combinations:</p>
<p><figure>
<img decoding="async" src="https://percona.community/blog/2026/06/pep_autovacuum_duration_heatmap.png" alt="Heatmap of autovacuum duration for every distribution/dead-percentage/index-count combination." /></figure>
</p>
<p>So our conclusion is, as expected, that <strong>dirty pages is the main cost driver for autovacuum, followed by the number of indexes</strong>. And that we may have the same number of dead rows with completely different autovacuum costs.</p>
<h3 id="what-this-benchmark-does-and-does-not-show">What this benchmark does and does not show</h3>
<p>The result is clear, but getting a clear result using a synthetic workload should be read with care. Our benchmark intentionally avoids complexity. And complexity is what makes production vacuum hard.</p>
<ul>
<li>We built a <code>VACUUM</code> benchmark wearing autovacuum’s clothes. With one table, <code>threshold = 1</code>, <code>scale_factor = 0</code>, and <code>naptime = 1s</code>, we measure the isolated work of a single worker on one table. It says nothing about the parts that are specific of autovacuum: launcher table-selection, <code>autovacuum_max_workers</code> contention, or the cost limit shared across workers. The scheduling dynamics are often critical, and they are absent here.</li>
<li>The workload we use in the benchmark, as usual for a benchmark, is synthetic. Dead tuples come from a single bulk <code>DELETE</code> on an idle table. There is no concurrency. There are no long-running transaction holding back <code>OldestXmin</code>. Real vacuum routinely skips pages it can’t get a cleanup lock on (see <em>Concurrency</em>). In our case, this never happens, which is why every run cleans to 100% all-visible. The benchmark measures vacuum on an idealized table, not production churn.</li>
<li>Everything fits in memory, so this is not an I/O-bound situation. With the whole table in <code>shared_buffers</code>, reads are mostly buffer hits, and writes are largely deferred to the checkpointer (the worker itself writes little except index pages at higher index counts). The “cost” being measured is page visits and CPU, plus deferred checkpoint writes. The vacuums that are I/O-bound due to scans of heaps and indexes that don’t fit in cache, are painful. This case is excluded from the benchmark and we may say that the conclusions are about <em>logical</em> work, rather than IO bound operations. We consider that IO bound operations could show greater differences, but we did not test them.</li>
<li>Redundant identical indexes don’t generalize. Five B-tree indexes on the integer column is a trick used to make index work scale linearly. Real indexes differ in width, key type, correlation, bloat, fill factor, and bottom-up-deletion behavior. The measured slope (5 s per index; 27,422 index blocks per index for spread, but 109,533 for compact) is specific to this shape (even the slope is distribution-dependent) and can not be directly extrapolated to wide, composite, or text indexes.</li>
<li>Freezing was excluded. The <code>VACUUM FREEZE</code> baseline ignored freezing. Anti-wraparound / aggressive vacuums, which must visit every not-all-frozen page and are often the most disruptive events in production, are not part of this benchmark. Besides, the bypass optimization and multi-pass <code>ambulkdelete</code> (under <code>maintenance_work_mem</code> pressure) is avoided, and this makes vacuum runtime nonlinear and hard to predict in production.</li>
</ul>
<p>Our findings are valid: vacuum cost is driven by dirty pages, not by dead-tuple count, and the mechanism behind it is clear. But the benchmark used a single table that fits entirely in memory, recently frozen, and ran with no concurrent activity. Under those conditions, both runtime and the page-visit counts grew linearly with the number of dirty pages and the number of indexes. It is not clear if these results can be extrapolated to a busy, larger-than-RAM production system. This is left for a future exercise.</p>
<h2 id="references">References</h2>
<h3 id="postgresql-documentation">PostgreSQL Documentation</h3>
<ul>
<li><a href="https://www.postgresql.org/docs/18/index-functions.html" target="_blank" rel="noopener noreferrer">Index Access Method Functions</a>. Defines the <code>ambulkdelete</code> and <code>amvacuumcleanup</code> interfaces; documents that bulk delete is “intended to be implemented by scanning the whole index”</li>
<li><a href="https://www.postgresql.org/docs/18/sql-vacuum.html" target="_blank" rel="noopener noreferrer">VACUUM SQL Command</a>. <code>INDEX_CLEANUP</code> parameter (<code>AUTO</code>/<code>ON</code>/<code>OFF</code>) and <code>PARALLEL</code> option for index vacuum</li>
<li><a href="https://www.postgresql.org/docs/18/btree.html#BTREE-IMPLEMENTATION" target="_blank" rel="noopener noreferrer">B-Tree Implementation</a>. B-tree structure, deduplication, and bottom-up deletion (page-deletion and recycling mechanics are detailed in the <code>nbtree/README</code> listed under Source Code below)</li>
</ul>
<h3 id="postgresql-source-code">PostgreSQL Source Code</h3>
<ul>
<li><a href="https://github.com/postgres/postgres/blob/REL_18_STABLE/src/backend/access/nbtree/nbtree.c" target="_blank" rel="noopener noreferrer"><code>src/backend/access/nbtree/nbtree.c</code></a>. B-tree vacuum implementation: <code>btbulkdelete()</code> then <code>btvacuumscan()</code> (physical-order scan of all index pages except the metapage), <code>btvacuumpage()</code> (per-page processing)</li>
<li><a href="https://github.com/postgres/postgres/blob/REL_18_STABLE/src/backend/access/heap/vacuumlazy.c" target="_blank" rel="noopener noreferrer"><code>src/backend/access/heap/vacuumlazy.c</code></a>. Main VACUUM implementation: heap scan, dead tuple collection, <code>lazy_vacuum_all_indexes()</code> (iterates all indexes calling <code>ambulkdelete</code>), bypass optimization (<code>BYPASS_THRESHOLD_PAGES = 0.02</code>)</li>
<li><a href="https://github.com/postgres/postgres/blob/REL_18_STABLE/src/include/access/nbtree.h" target="_blank" rel="noopener noreferrer"><code>src/include/access/nbtree.h</code></a>. B-tree data structures and constants</li>
<li><a href="https://github.com/postgres/postgres/blob/REL_18_STABLE/src/backend/access/nbtree/README" target="_blank" rel="noopener noreferrer"><code>src/backend/access/nbtree/README</code></a>. Design notes on B-tree page deletion, recycling, and the half-dead/pin-based deletion protocol</li>
</ul>
<p><a href="https://percona.community/blog/2026/07/01/postgresql-autovacuum-internals-benchmark/">PostgreSQL Autovacuum Internals and Benchmark</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Building a Modern Analytics Stack Around ClickHouse</title>
        <link>https://severalnines.com/blog/building-a-modern-analytics-stack-around-clickhouse/</link>
        <pubDate>Wed, 01 Jul 2026 10:35:21 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://severalnines.com/">Severalnines</source>
        <description><![CDATA[<p>Historically, relational databases did double duty. The same PostgreSQL / MySQL instance that handled your application’s writes also answered your business questions. A well-indexed schema, a few GROUP BY reports, done. And that works, right up until it doesn’t: the reports get slower, the dashboards start eating the same I/O budget as the application; or, […]<br />
The post Building a Modern Analytics Stack Around ClickHouse appeared first on Severalnines.</p>
<p><a href="https://severalnines.com/blog/building-a-modern-analytics-stack-around-clickhouse/">Building a Modern Analytics Stack Around ClickHouse</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Historically, relational databases did double duty. The same <a href="https://severalnines.com/clustercontrol/databases/postgresql">PostgreSQL</a> / <a href="https://severalnines.com/clustercontrol/databases/mysql">MySQL</a> instance that handled your application&#8217;s writes also answered your business questions. A well-indexed schema, a few GROUP BY reports, done. And that works, right up until it doesn&#8217;t: the reports get slower, the dashboards start eating the same I/O budget as the application; or, the sheer volume of events buries a row-oriented engine that was designed for point lookups, not scans over a billion rows.</p>
<p>The industry&#8217;s answer has been polyglot persistence — pick the right engine for each job. Caching went to <a href="https://severalnines.com/clustercontrol/databases/redis">Redis</a>. Telemetry went to Prometheus. And analytics, increasingly, goes to a columnar OLAP engine, and among the open-source options, ClickHouse is the one that keeps coming up. This post covers where ClickHouse sits in a modern data stack, how it coexists with the relational systems you already run, and what actually changes for the team that has to keep it all healthy.</p>
<h2 class="wp-block-heading" id="h-clickhouse-primer">ClickHouse Primer</h2>
<p>Introduced by Yandex, it&#8217;s an open-source, column-oriented DBMS built for analytical workloads, not for managing transactional records. Its core characteristics center around data structure, processing architecture and ingestion model.</p>
<h3 class="wp-block-heading" id="h-columnar-storage">Columnar storage</h3>
<p>A row store reads entire rows even when your query only touches two columns out of fifty. ClickHouse stores each column as its own compressed file on disk, so a query over event_date and revenue reads exactly those two columns and nothing else. Combine that with vectorized execution, processing column values in batches using SIMD instructions, and you get the headline numbers ClickHouse is known for: billions of rows per second scanned on ordinary hardware.</p>
<h3 class="wp-block-heading" id="h-distributed-processing">Distributed processing</h3>
<p><a href="https://severalnines.com/blog/clickhouse-scaling-and-sharding-best-practices/">Scaling out works through sharding and replication</a>. A distributed table engine fans queries out across shards and merges the results, while a Keeper-based coordination layer, Apache ZooKeeper or ClickHouse Keeper, keeps replicas consistent. That said, don&#8217;t reach for a cluster on day one. A single node with plenty of RAM and fast NVMe storage goes a surprisingly long way; bring in sharding when query latency or ingest volume actually demands it.</p>
<h3 class="wp-block-heading" id="h-real-time-ingestion">Real-time ingestion</h3>
<p>This is where ClickHouse separates itself from the nightly-batch warehouse model: it can ingest millions of rows per second and make them queryable almost immediately. The MergeTree engine family writes incoming data as immutable parts on disk and merges them asynchronously in the background, conceptually similar to an LSM tree. Variants like ReplacingMergeTree and AggregatingMergeTree handle deduplication and pre-aggregation during those merges, without the lock contention you&#8217;d fight in an MVCC row store.</p>
<h2 class="wp-block-heading" id="h-the-modern-analytics-stack-components">The Modern Analytics Stack: Components</h2>
<p>Before placing ClickHouse on the map, it helps to name the layers of the map itself. The diagram below is the reference architecture we&#8217;ll use for the rest of the post.</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="660" src="https://severalnines.com/wp-content/uploads/2026/06/modern-clickhouse-data-platform-architecture-1024x660.png" alt="Comprehensive enterprise data platform diagram showing ingestion from multiple data sources through Apache Kafka into ClickHouse, serving BI tools and data science under a data governance layer." class="wp-image-44180" /></figure>
<h3 class="wp-block-heading">Data ingestion and streaming</h3>
<p>Data arrives through two channels. The first is Change Data Capture: tools like Debezium or PeerDB read your OLTP database&#8217;s replication log, MySQL&#8217;s binlog, PostgreSQL&#8217;s logical replication, and publish row-level change events to Kafka. The second is direct instrumentation: clickstream events, API logs, telemetry, and IoT data that applications push straight to Kafka without touching a relational database at all.</p>
<h3 class="wp-block-heading">Storage and compute engine</h3>
<p>ClickHouse sits in the middle as the analytical store. It&#8217;s not a data lake; it manages its own storage rather than querying files in object storage, and it&#8217;s not a cloud-only warehouse either; it runs on-prem just as happily. Think of it as the query engine closest to your data consumers: low latency, high concurrency, and able to absorb high-velocity inserts from Kafka or batch pipelines without falling behind.</p>
<h3 class="wp-block-heading">Visualization and BI layer</h3>
<p>ClickHouse speaks a MySQL-compatible wire protocol and exposes a native HTTP interface, so nearly any BI tool with a SQL data source can connect to it. Grafana, Apache Superset, Metabase, Tableau, Looker, DBeaver. In most cases, the setup is nothing more than a JDBC/ODBC driver or the HTTP endpoint URL.</p>
<h3 class="wp-block-heading">Governance, metadata, and security</h3>
<p>A fast query engine alone doesn&#8217;t make a production stack. Schema registries, e.g., Confluent Schema Registry, Apicurio, enforce contract compatibility on Kafka topics and data catalogs, e.g. DataHub, track lineage and ownership. On the ClickHouse side, you get TLS for client and inter-replica traffic, row-level access policies, and column-level access control.</p>
<h2 class="wp-block-heading">Database Type Comparison</h2>
<p>Before continuing, it&#8217;s worth grounding all of this in a side-by-side comparison: a traditional OLTP store, a conventional OLAP warehouse, and ClickHouse.</p>
<figure class="wp-block-table">
<table class="has-fixed-layout">
<tbody>
<tr>
<td><strong>Characteristic</strong></td>
<td><strong>OLTP</strong></td>
<td><strong>Traditional OLAP</strong></td>
<td><strong>ClickHouse</strong></td>
</tr>
<tr>
<td>Primary workload</td>
<td>Transactional reads/writes, point lookups</td>
<td>Batch analytics, historical reporting</td>
<td>Real-time and historical analytics</td>
</tr>
<tr>
<td>Storage model</td>
<td>Row-oriented</td>
<td>Columnar</td>
<td>Columnar (MergeTree family)</td>
</tr>
<tr>
<td>Ingestion latency</td>
<td>Sub-millisecond per row</td>
<td>Minutes to hours (batch COPY/LOAD)</td>
<td>Sub-second (streaming inserts)</td>
</tr>
<tr>
<td>Query latency (analytical)</td>
<td>Seconds to minutes (degrades with row count)</td>
<td>Seconds to tens of seconds</td>
<td>Milliseconds to low seconds</td>
</tr>
<tr>
<td>Concurrent write/read isolation</td>
<td>Full MVCC / ACID</td>
<td>Limited; primarily append-only</td>
<td>Eventual consistency; no row-level locking</td>
</tr>
<tr>
<td>UPDATE / DELETE support</td>
<td>Native, row-level</td>
<td>Supported but costly</td>
<td>Supported via ALTER mutations (async, expensive)</td>
</tr>
<tr>
<td>Typical row scale</td>
<td>Millions–low billions</td>
<td>Billions–trillions (with partitioning)</td>
<td>Billions–trillions (single node to cluster)</td>
</tr>
<tr>
<td>Horizontal scaling</td>
<td>Read replicas; sharding is complex</td>
<td>Native MPP / auto-scaling</td>
<td>Distributed tables with sharding + replication</td>
</tr>
<tr>
<td>Compression ratio</td>
<td>1–2× (page-level compression)</td>
<td>3–8×</td>
<td>5–20× (per-column codec selection)</td>
</tr>
<tr>
<td>Joins</td>
<td>Full join support, optimised for FK lookups</td>
<td>Full join support</td>
<td>Supported; large-scale joins require careful schema design (denormalization preferred)</td>
</tr>
<tr>
<td>Full-text search</td>
<td>Basic LIKE / full-text indexes</td>
<td>Minimal</td>
<td>Bloom filters; not a replacement for dedicated search engines</td>
</tr>
<tr>
<td>Deployment options</td>
<td>Self-managed, RDS/Cloud SQL, etc.</td>
<td>Managed cloud only (typically)</td>
<td>Self-managed, ClickHouse Cloud, or local binary</td>
</tr>
<tr>
<td>Operational tooling</td>
<td>Mature: ClusterControl, Percona, pg_upgrade</td>
<td>Vendor-managed</td>
<td>Growing: ClusterControl, Altinity Operator for K8s</td>
</tr>
<tr>
<td>Best fit</td>
<td>Application state, financial records, user data</td>
<td>Compliance reporting, long-retention warehousing</td>
<td>Real-time dashboards, event analytics, observability</td>
</tr>
</tbody>
</table>
</figure>
<h2 class="wp-block-heading">How ClickHouse Co-exists with Other Databases</h2>
<p>ClickHouse is additive. Your OLTP database keeps doing what it does best; the work is in getting data from one to the other cleanly.</p>
<h3 class="wp-block-heading">OLTP stores → ETL/CDC → ClickHouse</h3>
<p>CDC-based replication is the standard pattern. MySQL or PostgreSQL remains the source of truth for transactional integrity. Debezium (or an equivalent) tails the transaction log and pushes change events into Kafka, and from there, ClickHouse picks them up, either through its native Kafka engine or through a pipeline built on something like Flink or dbt.</p>
<p>One design decision deserves real thought here: do you replicate raw CDC events, or pre-aggregated facts? Raw events keep every aggregation option open downstream, but they cost more storage, and you&#8217;ll need to manage ReplacingMergeTree carefully to handle upserts. Pre-aggregating on its way in keeps ClickHouse lean and queries simple, but locks you into whatever aggregation schema you chose. There&#8217;s no universally right answer; just be deliberate about it.</p>
<h3 class="wp-block-heading">Handling slow and fast lanes</h3>
<p>Not all analytics data moves at the same speed. A typical e-commerce platform has both:</p>
<ul class="wp-block-list">
<li>Fast lane: clickstream events (page views, add-to-cart, checkout steps) arriving at 10,000 to 100,000 events per second through Kafka, ingested directly by ClickHouse and queryable within seconds.</li>
<li>Slow lane: order records replicated from MySQL through Debezium, a few hundred per minute. Volume is low enough that pipeline latency barely matters.</li>
</ul>
<p>The payoff of landing both in ClickHouse is that a single SQL query can join real-time funnel data against historical order revenue. Try that against the production MySQL instance, and you&#8217;ll be waiting a while, and so will your application.</p>
<h3 class="wp-block-heading">Hybrid workloads and real-time dashboards</h3>
<p>The usual end state: ClickHouse takes all analytical queries, and the OLTP database keeps all transactional reads and writes. A dashboard showing orders in the last five minutes or conversion by funnel step runs entirely on ClickHouse, with data that&#8217;s maybe 5–30 seconds behind the actual transactions. For almost any business analytics use case, that lag is a non-issue, and the queries come back orders of magnitude faster than the equivalent aggregation on MySQL would.</p>
<h2 class="wp-block-heading">Operational Implications for Support and Ops Teams</h2>
<p>Adding ClickHouse to a heterogeneous environment creates new responsibilities. Here&#8217;s what actually changes for the team on call.</p>
<h3 class="wp-block-heading">Data pipelines, latency, and data freshness</h3>
<p>Once analytics moves to ClickHouse, queries no longer hit the authoritative source. Every dashboard now carries an implicit freshness guarantee, and that guarantee is only as good as the pipeline behind it. Define the SLA explicitly, &#8220;metrics are at most 60 seconds stale&#8221;, and write it down. Then monitor end-to-end lag, not just whether each component is up. If Kafka consumer lag creeps up because ClickHouse inserts are slowing down, your dashboards quietly go stale without a single error being thrown.</p>
<p>Worth watching:</p>
<ul class="wp-block-list">
<li>Kafka consumer group lag</li>
<li>ClickHouse insert latency and the asynchronous insert logs</li>
<li>Debezium connector status and CDC production rate</li>
<li>The time delta between the Debezium source timestamp and arrival in ClickHouse</li>
</ul>
<h3 class="wp-block-heading">Schema evolution, partitions, and materialized views</h3>
<p>ClickHouse is forgiving about schema changes, with one exception. Adding, dropping, or renaming columns is fast and cheap because columnar storage means each column lives in its own files. Changing a column&#8217;s type is the expensive one: it triggers a mutation that rewrites that column&#8217;s data in every part. Plan type changes; don&#8217;t sweat the rest.</p>
<p>Partitioning is a first-class operational lever. Partition by a date truncation, and old data can be dropped instantly with <code>DROP PARTITION</code>; retention policies become nearly free. Just don&#8217;t make partitions too wide; if you partition by year instead of month, you lose the precision that makes the technique useful.</p>
<p>Materialized views deserve respect. In ClickHouse they&#8217;re insert triggers: every insert into the source table fires the view and writes pre-aggregated results to a target table, incrementally and in real time, no manual REFRESH like PostgreSQL. Extremely useful for running aggregates, but a badly written view sits directly in the insert path, so it can drag down ingest throughput on the source table. Test them under load.</p>
<h3 class="wp-block-heading">Resource isolation and multi-tenant considerations</h3>
<p>Resource control works through user profiles and quotas: <a href="https://severalnines.com/blog/managing-clickhouse-resources-in-multi-tenant-environments/">max memory per query, concurrent queries per user, and CPU threads</a>. If multiple teams share one cluster, per-team profiles are what stop someone&#8217;s unoptimized ad-hoc query from starving the dashboards everyone else depends on. There&#8217;s no per-query isolation at the container or cgroup level, though. If you need hard isolation, the boundary is a separate instance, or, a separate service on ClickHouse Cloud. For most teams starting out, one instance with sensible profiles is plenty.</p>
<h2 class="wp-block-heading">Tools and Management in Multi-Database Operations</h2>
<p>Run MySQL, PostgreSQL, and ClickHouse side by side, and you&#8217;re suddenly maintaining three backup toolchains, three monitoring integrations, and three sets of alert rules, unless something unifies them. That&#8217;s the operational case for <a href="https://severalnines.com/clustercontrol">ClusterControl</a>: one management plane across relational and analytical clusters.</p>
<h3 class="wp-block-heading">Why unified management matters in heterogeneous stacks</h3>
<p>Every engine has its own backup format, replication model, and metrics vocabulary. MySQL backups mean binary logs and snapshot tooling; PostgreSQL means WAL archiving; ClickHouse has its own BACKUP commands. Run each from its own toolchain, and you can&#8217;t answer a question as basic as &#8220;is everything in my estate backed up and verified within the last 24 hours?&#8221; without stitching together data from three places.</p>
<p>ClusterControl pulls that into one plane:</p>
<ul class="wp-block-list">
<li>Unified backup scheduling and verification for MySQL, <a href="https://severalnines.com/clustercontrol/databases/mariadb">MariaDB</a>, PostgreSQL, ClickHouse, and more</li>
<li>Centralized metrics collection with dashboards per database type</li>
<li>Alert routing to Slack, PagerDuty, email, etc, regardless of which engine fired the alert</li>
<li>Topology visualization, health, lag, and failover state across every cluster</li>
</ul>
<h3 class="wp-block-heading">Implementation checklist for operational readiness</h3>
<ul class="wp-block-list">
<li>Document data freshness SLAs for every ClickHouse table fed by a pipeline</li>
<li>Monitor Kafka consumer lag, e.g. Prometheus or Kafka Exporter</li>
<li>Set per-profile memory and execution-time limits in ClickHouse</li>
<li>Automate partition retention with DROP PARTITION jobs</li>
<li>Test ClickHouse backup and restore, including materialized view recovery</li>
<li>Write down schema change procedures and their cost implications</li>
<li>Track CDC pipeline health and binlog positions</li>
<li>Route ClickHouse alerts through the same channels as everything else</li>
<li>Write runbooks for the predictable failures: Kafka leader elections, CDC connector restarts, and merge backlogs</li>
</ul>
<h2 class="wp-block-heading">Ingestion Example</h2>
<p>The following examples show two common patterns for getting data into ClickHouse: reading directly from a Kafka topic using the Kafka table engine, and bulk-loading from a CSV file.</p>
<h3 class="wp-block-heading">Pattern 1: Real-time ingestion from Kafka</h3>
<p>ClickHouse&#8217;s Kafka engine acts as a consumer of a Kafka topic. You create a Kafka engine table that describes the topic connection, and then a materialized view that pipes rows from that engine table into a MergeTree storage table. The Kafka engine table itself does not store data; it is only a consumer interface.</p>
<h4 class="wp-block-heading">ClickHouse SQL &#8211; Kafka engine and materialized view</h4>
<p><strong>1. Create the destination storage table (MergeTree)</strong></p>
<pre class="wp-block-code"><code>CREATE TABLE events.pageviews
(
&nbsp;&nbsp;&nbsp;&nbsp;event_time &nbsp; DateTime,
&nbsp;&nbsp;&nbsp;&nbsp;session_id &nbsp; UUID,
&nbsp;&nbsp;&nbsp;&nbsp;user_id&nbsp; &nbsp; &nbsp; UInt64,
&nbsp;&nbsp;&nbsp;&nbsp;page_path&nbsp; &nbsp; String,
&nbsp;&nbsp;&nbsp;&nbsp;referrer &nbsp; &nbsp; String,
&nbsp;&nbsp;&nbsp;&nbsp;device_type&nbsp; LowCardinality(String)
)
ENGINE = MergeTree()
PARTITION BY toYYYYMM(event_time)
ORDER BY (user_id, event_time);</code></pre>
<p><strong>2. Create the Kafka engine table (consumer interface, no data stored here)</strong></p>
<pre class="wp-block-code"><code>CREATE TABLE events.pageviews_kafka
(
&nbsp;&nbsp;&nbsp;&nbsp;event_time &nbsp; DateTime,
&nbsp;&nbsp;&nbsp;&nbsp;session_id &nbsp; UUID,
&nbsp;&nbsp;&nbsp;&nbsp;user_id&nbsp; &nbsp; &nbsp; UInt64,
&nbsp;&nbsp;&nbsp;&nbsp;page_path&nbsp; &nbsp; String,
&nbsp;&nbsp;&nbsp;&nbsp;referrer &nbsp; &nbsp; String,
&nbsp;&nbsp;&nbsp;&nbsp;device_type&nbsp; String
)
ENGINE = Kafka
SETTINGS
&nbsp;&nbsp;&nbsp;&nbsp;kafka_broker_list &nbsp; &nbsp; = 'kafka-broker1:9092,kafka-broker2:9092',
&nbsp;&nbsp;&nbsp;&nbsp;kafka_topic_list&nbsp; &nbsp; &nbsp; = 'analytics.pageviews',
&nbsp;&nbsp;&nbsp;&nbsp;kafka_group_name&nbsp; &nbsp; &nbsp; = 'clickhouse-analytics-consumer',
&nbsp;&nbsp;&nbsp;&nbsp;kafka_format&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 'JSONEachRow',
&nbsp;&nbsp;&nbsp;&nbsp;kafka_num_consumers &nbsp; = 4,
&nbsp;&nbsp;&nbsp;&nbsp;kafka_skip_broken_messages = 5;</code></pre>
<p><strong>3. Materialized view: pipes rows from Kafka engine into MergeTree</strong></p>
<pre class="wp-block-code"><code>CREATE MATERIALIZED VIEW events.pageviews_mv
TO events.pageviews
AS
SELECT
&nbsp;&nbsp;&nbsp;&nbsp;event_time,
&nbsp;&nbsp;&nbsp;&nbsp;session_id,
&nbsp;&nbsp;&nbsp;&nbsp;user_id,
&nbsp;&nbsp;&nbsp;&nbsp;page_path,
&nbsp;&nbsp;&nbsp;&nbsp;referrer,
&nbsp;&nbsp;&nbsp;&nbsp;device_type
FROM events.pageviews_kafka;</code></pre>
<p>Once the materialized view is created, ClickHouse begins polling the Kafka topic automatically. Consumed messages are inserted into events.pageviews as MergeTree parts. Consumer offset tracking is handled by the Kafka consumer group; restart tolerance and at-least-once delivery are built in. Set kafka_skip_broken_messages to a non-zero value in production to prevent a malformed message from stalling the consumer.</p>
<h3 class="wp-block-heading">Pattern 2: Bulk load from CSV</h3>
<p>For historical data migrations or batch loads, ClickHouse accepts CSV input directly from the command line or via its HTTP interface.</p>
<h4 class="wp-block-heading">Shell &#8211; bulk insert from CSV via clickhouse-client</h4>
<p><strong>1. Insert a CSV file with a header row into an existing table</strong></p>
<pre class="wp-block-code"><code>clickhouse-client 
&nbsp;&nbsp;&nbsp;&nbsp;--host ch-server.internal 
&nbsp;&nbsp;&nbsp;&nbsp;--port 9000 
&nbsp;&nbsp;&nbsp;&nbsp;--user analytics_writer 
&nbsp;&nbsp;&nbsp;&nbsp;--password ”${CH_PASSWORD}” 
&nbsp;&nbsp;&nbsp;&nbsp;--query ”INSERT INTO events.pageviews FORMAT CSVWithNames” 
&nbsp;&nbsp;&nbsp;&nbsp;&lt; /data/exports/pageviews_2024.csv</code></pre>
<p><strong>2. Alternatively, using the HTTP interface (suitable for remote or scripted loads)</strong></p>
<pre class="wp-block-code"><code>curl -X POST 
”http://ch-server.internal:8123/?query=INSERT+INTO+events.pageviews+FORMAT+CSVWithNames&amp;user=analytics_writer&amp;password=${CH_PASSWORD}” 
--data-binary @/data/exports/pageviews_2024.csv</code></pre>
<p>For large CSV loads, prefer splitting the file into chunks of 1–10 million rows and inserting each chunk as a separate INSERT batch. ClickHouse performs optimal part creation at insert batch sizes in this range. Very large single inserts, i.e. hundreds of millions of rows can produce oversized initial parts that take a long time to merge, potentially impacting query performance during the load.</p>
<h2 class="wp-block-heading">Case Study: E-Commerce Analytics Stack</h2>
<p>An e-commerce example of integrating ClickHouse with MySQL and Kafka. A mid-sized platform uses this production stack:</p>
<ul class="wp-block-list">
<li>MySQL 8.0 (via ClusterControl) for transactional core data</li>
<li>Redis for session and cart state</li>
<li>Kafka for microservices event routing</li>
</ul>
<p>The challenge: analytical queries cause production latency in MySQL. The solution adds ClickHouse as a dedicated tier for real-time dashboards without altering existing deployments.</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="945" height="1024" src="https://severalnines.com/wp-content/uploads/2026/06/clickhouse-cdc-kafka-realtime-analytics-pipeline-945x1024.png" alt="Architecture diagram of a real-time data streaming pipeline featuring MySQL, Debezium CDC, Apache Kafka, ClickHouse, and Grafana, monitored by ClusterControl." class="wp-image-44181" /></figure>
<h3 class="wp-block-heading">What changes for the operations team</h3>
<p>Adding ClickHouse introduces a new cluster to the managed estate. Since ClusterControl already handles the MySQL cluster, bringing ClickHouse under the same management plane ensures:</p>
<ul class="wp-block-list">
<li>ClickHouse and MySQL backups are configured and verified through a single interface.</li>
<li>Performance metrics for both ClickHouse and MySQL share the same Grafana dashboards.</li>
<li>Alerting for disk usage, replication lag, and Kafka consumer lag is centrally managed.</li>
</ul>
<p>While the platform engineering team oversees the Debezium connector and Kafka cluster, their performance remains critical for ClickHouse data freshness.</p>
<h2 class="wp-block-heading">Conclusion</h2>
<p>ClickHouse fills a real gap: fast, scalable analytics over high-volume event data, at query latencies no row-oriented database can reach at scale. It doesn&#8217;t replace MySQL or PostgreSQL; it sits beside them, consuming their change streams and your application events, and takes the analytical load off your transactional tier. For ops teams, four principles carry most of the weight:</p>
<ul class="wp-block-list">
<li>Treat pipeline health as a first-class concern. Your query results are only as fresh as the pipeline feeding them. Watch Kafka lag and CDC health with the same rigor you give replication lag.</li>
<li>Model for analytics, not normalization. Wide, denormalized tables are how ClickHouse wants to work. If denormalizing feels wrong to your relational instincts, that discomfort is usually the sign you&#8217;re doing it right.</li>
<li>Plan for schema evolution early. Adding and dropping columns is cheap; changing column types is not. Have the procedure written before you need it.</li>
<li>Centralize management. Fragmented tooling fragments visibility. One plane for backups, alerts, and monitoring across the whole fleet pays for its setup cost quickly.</li>
</ul>
<p>ClickHouse isn&#8217;t the answer to every workload. But if your analytical queries have outgrown your OLTP tier, it&#8217;s one of the most direct and operationally manageable ways out. Start with a single node, replicate one or two high-value streams from Kafka, and measure. The added complexity is modest; the capability gained is not.</p>
<p>The post <a href="https://severalnines.com/blog/building-a-modern-analytics-stack-around-clickhouse/">Building a Modern Analytics Stack Around ClickHouse</a> appeared first on <a href="https://severalnines.com">Severalnines</a>.</p>
<p><a href="https://severalnines.com/blog/building-a-modern-analytics-stack-around-clickhouse/">Building a Modern Analytics Stack Around ClickHouse</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Community Docker Images: keeping the operator open without a vendor registry lock-in</title>
        <link>https://www.percona.com/blog/postgresql-community-images-operator/</link>
        <pubDate>Tue, 30 Jun 2026 14:09:35 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>PostgreSQL community images address a real gap in how a Kubernetes database operator earns your trust. Running a database operator on Kubernetes means trusting two things: the code, and the container images the operator pulls. The code is on GitHub, easy to inspect, easy to fork. The container images, the registry that hosts them, and the … Continued<br />
The post Community Docker Images: keeping the operator open without a vendor registry lock-in appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/postgresql-community-images-operator/">Community Docker Images: keeping the operator open without a vendor registry lock-in</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="aligncenter wp-image-50112 size-large" src="https://www.percona.com/wp-content/uploads/2026/06/MDES-1088-Blog-image-Percona-Operator-for-PostgreSQL-V3.0.0-hero-1-1024x375.jpg" alt="" width="1024" height="375" /></p>
<p><strong>PostgreSQL community images</strong> address a real gap in how a Kubernetes database operator earns your trust. Running a database operator on Kubernetes means trusting two things: the code, and the container images the operator pulls. The code is on GitHub, easy to inspect, easy to fork. The container images, the registry that hosts them, and the license that governs them all sit with the vendor, and any of those three can change without the source repository changing at all. Starting with Percona Operator for PostgreSQL 3.0.0, you can run the operator against community images you build yourself from the official PostgreSQL packages on download.postgresql.org, in a registry you control.</p>
<p>&nbsp;</p>
<div class="markdown-heading">
<h2 class="heading-element">TL;DR</h2>
</div>
<ul>
<li><strong>Community Docker Images: tech preview in PGO 3.0.0, official in 3.1.0.</strong> Point the operator at upstream-built PostgreSQL images instead of the Percona Distribution images.</li>
<li><strong>Build them yourself from the official PostgreSQL source.</strong> The Dockerfiles pull packages from download.postgresql.org (the PGDG repositories), so the trust chain runs from PGDG to your registry with no vendor in the middle.</li>
<li><strong>There are limits.</strong> Anything Percona-specific (TDE in our distribution build, for example) does not exist in an upstream-built image. That trade is intentional.</li>
</ul>
<p>In this post:</p>
<ul>
<li>How open source gets diluted in practice</li>
<li>Why distributions exist anyway, honestly</li>
<li>How Community Docker Images work</li>
<li>Limits of the upstream path</li>
<li>What to try, what to tell us</li>
</ul>
<p>&nbsp;</p>
<div class="markdown-heading">
&nbsp;</p>
<h2 class="heading-element">How open source gets diluted</h2>
</div>
<p>Open source has changed in the last few years, and not always for the better. Companies have learned that you can keep a project&#8217;s source code fully open and still capture most of the lock-in by quietly closing the parts that matter in production: the release artifacts, the container images, the supported OS list, the certified Kubernetes distributions, the marketplace listings.</p>
<div class="markdown-heading">
&nbsp;</p>
<h3></h3>
<h3 class="heading-element">Same project, closed artifacts</h3>
</div>
<p>You can have a fully community CNCF project that does not appear on the Red Hat Marketplace except as a paid Enterprise edition. Similarly, you can have a vendor that ships one packaging in the community and a richer one in Enterprise with the features you actually need in production. The license still says &#8220;open source.&#8221; The practical experience says &#8220;you depend on us.&#8221; And the source repository&#8217;s license is not the only license that matters here: a vendor can change the license, the trademark policy, or the distribution terms on the container images alone, while leaving the source repository untouched. That has happened in the PostgreSQL operator space recently, and the community noticed.</p>
<div class="markdown-heading">
&nbsp;</p>
<h3></h3>
<h3 class="heading-element">Why the community is right to be wary</h3>
</div>
<p>Nobody outside the vendor can predict when a license will change, when a feature will move behind a paywall, or when an external contribution will get rejected because it competes with an Enterprise feature. Recent history has plenty of examples and the PostgreSQL community has been paying attention. When this community resists vendor-controlled distributions, it is not nostalgia. It is a rational read of where things have gone before.</p>
<p>I work on Percona&#8217;s PostgreSQL operator, so I see this conversation from the vendor side. The skepticism is fair. The honest question for us is what to do about it.<br />
&nbsp;</p>
<h2></h2>
<h2><strong>Why distributions exist anyway</strong></h2>
<p><span style="font-weight: 400">Acknowledging the community&#8217;s concerns does not mean distributions are pointless. There are real reasons to ship one, and pretending otherwise makes for bad blog posts.</span><br />
&nbsp;</p>
<h3><strong>What a distribution buys you</strong></h3>
<p><span style="font-weight: 400">A vendor-built distribution lets the vendor:</span></p>
<ol>
<li style="font-weight: 400"><span style="font-weight: 400">Control the build process, dependencies, and defaults so they fit a specific user shape.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Ship hotfixes faster, because the whole release path sits in one place.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Fork PostgreSQL itself when something the upstream community will not accept, or can take years to accept, matters to customers, such as Transparent Data Encryption.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">For a Kubernetes operator, ship images with exactly the tools and extensions the operator supports, and skip everything else. The CVE surface stays smaller.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Give QA and Service teams a predictable environment. &#8220;We support extensions A, B, C and not D, X, Z&#8221; is only honest if QA actually exercises A, B, C and the Service team can work with them in the production environment.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Give customers one accountable party for the full release cycle, from hotfix through package availability. Some teams explicitly need that contract for compliance and audit reasons.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">And yes, less positive reasons that we covered above also apply, which is exactly the part the community keeps pointing at.</span></li>
</ol>
<p>&nbsp;</p>
<h3><strong>The trade-off you accept</strong></h3>
<p><span style="font-weight: 400">If you run the vendor distribution, you accept that the vendor&#8217;s registry, image policy, and supported-extension matrix become part of your stack. If the vendor changes any of that, your operator deployment changes with it. That is not hypothetical for users who have lived through it on other products.</span></p>
<p><span style="font-weight: 400">So the real question is whether you can keep the benefits a distribution provides for the users who want them, while leaving an honest, supported door open for users who do not. That is the door PGO 3.0.0 opens.</span></p>
<p>&nbsp;</p>
<h2>Community PostgreSQL Images in PGO 3.0.0</h2>
<p><span style="font-weight: 400">Starting with Percona Operator for PostgreSQL 3.0.0, the operator can run against images built from upstream PostgreSQL packages, not just the Percona Distribution images. This is what we are calling </span><b>Community PostgreSQL Images</b><span style="font-weight: 400">. In 3.0.0, the feature ships as a tech preview. In 3.1.0, these images become part of our official release cycle and are fully documented.</span></p>
<p><span style="font-weight: 400">One of the main advantages of Community Docker Images is that the community can request or contribute any extension that does not exist in the official Percona PostgreSQL distribution. TimescaleDB and Citus are the first examples: the community asked for them, and we shipped both in the Community Images set from day one.</span></p>
<p>&nbsp;</p>
<h2>How to use &#8220;Community PostgreSQL images”</h2>
<p><span style="font-weight: 400">The operator does not care where the image came from, as long as the image meets the operator&#8217;s runtime expectations </span></p>
<p><span style="font-weight: 400">A typical CR using a community image looks like this:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">apiVersion: pgv2.percona.com/v2
kind: PerconaPGCluster
metadata:
  name: cluster1
spec:
  image: registry.example.com/postgresql-community:18
  postgresVersion: 18
  proxy:
    pgBouncer:
      image: registry.example.com/pgbouncer-community:1.23
  backups:
    pgbackrest:
      image: registry.example.com/pgbackrest-community:2.51
  # other spec fields unchanged from a normal CR</pre>
<p><span style="font-weight: 400">The fields that change are </span><span style="font-weight: 400">spec.image</span><span style="font-weight: 400">, </span><span style="font-weight: 400">spec.proxy.pgBouncer.image</span><span style="font-weight: 400">, and </span><span style="font-weight: 400">spec.backups.pgbackrest.image</span><span style="font-weight: 400">. You can build and publish all three images under your own registry, with your own tags if that helps you track versions. The operator drives the rest of the deployment the same way it always has: instances, backups, replication, monitoring, all of it.</span></p>
<p>&nbsp;</p>
<h3>What ships are in each image</h3>
<p><span style="font-weight: 400">Each Community Docker Image is a thin layer over the chosen base (UBI9 or UBI8) plus the packages the operator needs for that role. Where you see </span><span style="font-weight: 400">{N}</span><span style="font-weight: 400">, substitute the PostgreSQL major you build for (17, 18, and so on).<br />
</span></p>
<p><strong><code>postgres</code> image</strong> (e.g. <code>postgres17</code>):</p>
<table>
<thead>
<tr>
<th>Package</th>
<th>Role</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>postgresql{N}-server</code></td>
<td>PostgreSQL server</td>
</tr>
<tr>
<td><code>postgresql{N}-contrib</code></td>
<td>contrib modules</td>
</tr>
<tr>
<td><code>pg_repack_{N}</code></td>
<td>online table/index reorganization</td>
</tr>
<tr>
<td><code>pgaudit_{N}</code></td>
<td>audit logging</td>
</tr>
<tr>
<td><code>set_user_{N}</code></td>
<td>privilege escalation control</td>
</tr>
<tr>
<td><code>pgvector_{N}</code></td>
<td>vector similarity search</td>
</tr>
<tr>
<td><code>wal2json_{N}</code></td>
<td>WAL to JSON logical decoding</td>
</tr>
<tr>
<td><code>pg_cron_{N}</code></td>
<td>in-database cron scheduler</td>
</tr>
<tr>
<td><code>pgbackrest&amp;lt;/code&gt;</code></td>
<td>backup/restore tool</td>
</tr>
<tr>
<td><code>patroni</code></td>
<td>HA cluster manager</td>
</tr>
<tr>
<td><code>timescaledb-2-postgresql-{N}</code></td>
<td>time-series extension (x86_64 only; EL9 only for PG18)</td>
</tr>
<tr>
<td><code>citus_{N}</code></td>
<td>distributed PostgreSQL (PG16+ only)</td>
</tr>
</tbody>
</table>
<p><strong><code>pgbackrest</code> image</strong>:</p>
<table>
<thead>
<tr>
<th>Package</th>
<th>Role</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>pgbackrest</code></td>
<td>backup/restore tool only</td>
</tr>
</tbody>
</table>
<p><strong><code>pgbouncer</code> image</strong>:</p>
<table>
<thead>
<tr>
<th>Package</th>
<th>Role</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>pgbouncer</code></td>
<td>connection pooler only</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><span style="font-weight: 400">The split is intentional. The postgres image ships the full operator-aware runtime. The backup and proxy images stay minimal. As a result, the operator&#8217;s components are in separate failure domains and shrink the attack surface of each container.</span></p>
<p>&nbsp;</p>
<h3>Limits worth being honest about</h3>
<p><span style="font-weight: 400">A community image is not a Percona Distribution image. Two practical consequences:</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">Distribution-only features will not work. Transparent Data Encryption, for example, lives in the Percona Distribution build. A community image built from upstream PostgreSQL does not include it. If you depend on TDE, run the distribution image.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Support boundaries are different. Percona Support is responsible for the Percona Distribution images and the operator code. A community image you built yourself </span></li>
</ul>
<p><span style="font-weight: 400">Ultimately, these are the right trade-offs. The point of community images is to give you transparency and control. Taking care of your own image is part of that deal. At the same time, we publish all three images under </span><span style="font-weight: 400">perconalab/percona-postgresql-operator</span><span style="font-weight: 400"> on Docker Hub so you can evaluate the tech preview without standing up your own build pipeline first. </span><span style="font-weight: 400">perconalab</span><span style="font-weight: 400"> is Percona&#8217;s non-production namespace, so use those images for testing. For production, build and sign your own.</span><span style="font-weight: 400"><br />
</span><span style="font-weight: 400"><br />
</span><span style="font-weight: 400">UBI9 (EL9):</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">docker.io/perconalab/percona-postgresql-operator:main-postgres14-community
docker.io/perconalab/percona-postgresql-operator:main-postgres15-community
docker.io/perconalab/percona-postgresql-operator:main-postgres16-community
docker.io/perconalab/percona-postgresql-operator:main-postgres17-community
docker.io/perconalab/percona-postgresql-operator:main-postgres18-community
docker.io/perconalab/percona-postgresql-operator:main-pgbackrest-community
docker.io/perconalab/percona-postgresql-operator:main-pgbouncer-community
docker.io/perconalab/percona-postgresql-operator:main-upgrade-community</pre>
<p><span style="font-weight: 400">UBI8 (EL8):</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">docker.io/perconalab/percona-postgresql-operator:main-ubi8-postgres14-community
docker.io/perconalab/percona-postgresql-operator:main-ubi8-postgres15-community
docker.io/perconalab/percona-postgresql-operator:main-ubi8-postgres16-community
docker.io/perconalab/percona-postgresql-operator:main-ubi8-postgres17-community
docker.io/perconalab/percona-postgresql-operator:main-ubi8-postgres18-community
docker.io/perconalab/percona-postgresql-operator:main-ubi8-upgrade-community</pre>
<p>&nbsp;</p>
<h3>How to build the images</h3>
<p><span style="font-weight: 400">The Dockerfile, the package list, and a sample CI job ship in </span><a href="https://github.com/percona/percona-docker/tree/main/postgresql-containers/community"><span style="font-weight: 400">percona-docker/postgresql-containers/community.</span></a><span style="font-weight: 400"> The build is a regular </span><span style="font-weight: 400">make</span><span style="font-weight: 400"> target on top of </span><span style="font-weight: 400">docker buildx</span><span style="font-weight: 400">, so you can run it on any multi-platform builder.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag"># Prerequisites: docker buildx with a multi-platform builder
docker buildx create --use --name multiarch

# Build and push all PostgreSQL community images (UBI9 / EL9)
git clone https://github.com/percona/percona-docker
cd percona-docker/postgresql-containers/community
make all TAG=1.0.0 REGISTRY=myrepo/percona-postgresql-operator

# Or a single image
make postgres17 TAG=1.0.0 REGISTRY=myrepo/percona-postgresql-operator

# UBI8 / EL8 variants
make all-ubi8 TAG=1.0.0-ubi8 REGISTRY=myrepo/percona-postgresql-operator</pre>
<p><em><span style="font-weight: 400">make all</span></em><span style="font-weight: 400"> builds all three images (postgres, pgBouncer, pgBackRest) so they stay version-aligned. Override </span><em><span style="font-weight: 400">REGISTRY</span></em><span style="font-weight: 400"> and </span><em><span style="font-weight: 400">TAG</span></em><span style="font-weight: 400"> to point at your own namespace and tagging scheme. Once the images are in your registry, plug them into the CR fields shown earlier, and the operator picks them up.</span></p>
<p><span style="font-weight: 400">Full build documentation: </span><a href="https://github.com/percona/percona-docker/blob/main/postgresql-containers/community/README.md"><span style="font-weight: 400">percona-docker/postgresql-containers/community/README.md.</span></a></p>
<p>&nbsp;</p>
<h3>How to contribute</h3>
<p><span style="font-weight: 400">Community images live in </span><a href="https://github.com/percona/percona-docker"><span style="font-weight: 400">percona/percona-docker</span></a><span style="font-weight: 400">, and the build is driven by a </span><span style="font-weight: 400">transform.py</span><span style="font-weight: 400"> generator that produces the Dockerfiles under </span><span style="font-weight: 400">build/</span><span style="font-weight: 400">. The files under </span><span style="font-weight: 400">build/</span><span style="font-weight: 400"> are regenerated on every sync, so contributions go through the generator, never through the generated files.</span></p>
<p><span style="font-weight: 400">Full contribution guide: </span><a href="https://github.com/percona/percona-docker/blob/main/postgresql-containers/community/CONTRIBUTING.md"><span style="font-weight: 400">community/CONTRIBUTING.md</span></a><span style="font-weight: 400">.</span></p>
<p>&nbsp;</p>
<h3>How to provide feedback</h3>
<p><span style="font-weight: 400">Two channels, depending on the shape of the feedback:</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">GitHub issue on </span><a href="https://github.com/percona/percona-postgresql-operator"><span style="font-weight: 400">percona/percona-postgresql-operator</span></a><span style="font-weight: 400"> with the </span><span style="font-weight: 400">community-images</span><span style="font-weight: 400"> label. Use this for bug reports, missing extensions, build problems, and concrete requests. The label keeps all <em>community-image</em> reports in one filter the team watches.</span></li>
</ul>
<p>&nbsp;</p>
<h2>What&#8217;s next</h2>
<p><span style="font-weight: 400">The first step was taking full engineering ownership of Percona Operator for PostgreSQL as an independent project, so the roadmap, the release cadence, and the governance live with one team that the community can talk to directly. Community </span><b>PostgreSQL</b><span style="font-weight: 400"> Images are the next step in that same commitment. If the community adopts this path, we have ideas for what to invest in next.</span></p>
<p><span style="font-weight: 400">We will let the community tell us. If this is useful, we keep investing here. We are ready to add more features to the operator around </span><b>Community Images</b><span style="font-weight: 400">. Conversely, if nobody adopts it, that is also a signal, and an honest one.</span></p>
<p><span style="font-weight: 400">Try the tech preview in 3.0.0. Open an issue if the build flow is rougher than it should be. Tell us what you want next on the forum or directly on GitHub.</span></p>
<p>&nbsp;</p>
<h2>Try It Out</h2>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">Percona Operator for PostgreSQL docs: </span><a href="https://docs.percona.com/percona-operator-for-postgresql/"><span style="font-weight: 400">https://docs.percona.com/percona-operator-for-postgresql/</span></a></li>
<li style="font-weight: 400"><span style="font-weight: 400">GitHub: </span><a href="https://github.com/percona/percona-postgresql-operator"><span style="font-weight: 400">https://github.com/percona/percona-postgresql-operator</span></a></li>
<li><span style="font-weight: 400">Community Forum: </span><a href="https://forums.percona.com/"><span style="font-weight: 400">https://forums.percona.com</span></a><span style="font-weight: 400">, share your feedback, ask questions, or report issues</span></li>
</ul>
<p>The post <a href="https://www.percona.com/blog/postgresql-community-images-operator/">Community Docker Images: keeping the operator open without a vendor registry lock-in</a> appeared first on <a href="https://www.percona.com">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/postgresql-community-images-operator/">Community Docker Images: keeping the operator open without a vendor registry lock-in</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Debugging with Ephemeral Containers</title>
        <link>https://www.percona.com/blog/debugging-with-ephemeral-containers/</link>
        <pubDate>Tue, 30 Jun 2026 13:52:25 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Debugging applications in Kubernetes can be tricky. Containers are designed to be small, immutable, and purpose-built. That is great for production, but not always ideal when something breaks. Many production images are minimal or distroless. They may not include tools that are useful for troubleshooting. In some cases, the application container may already be crashing, … Continued<br />
The post Debugging with Ephemeral Containers appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/debugging-with-ephemeral-containers/">Debugging with Ephemeral Containers</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><span style="font-weight: 400">Debugging applications in Kubernetes can be tricky. Containers are designed to be small, immutable, and purpose-built. That is great for production, but not always ideal when something breaks. Many production images are minimal or distroless. They may not include tools that are useful for troubleshooting.</span></p>
<p><span style="font-weight: 400">In some cases, the application container may already be crashing, which means </span><span style="font-weight: 400">kubectl exec</span><span style="font-weight: 400"> is not useful. In other cases, accessing the nodes may not be possible. Since Pods are immutable, it is impossible to add another container for troubleshooting.</span></p>
<p><span style="font-weight: 400">This is where ephemeral containers help.</span></p>
<h2><span style="font-weight: 400">What Are Ephemeral Containers?</span></h2>
<p><span style="font-weight: 400">In Kubernetes, </span><b>ephemeral containers</b><span style="font-weight: 400"> are a special type of container designed to run temporarily inside an existing Pod. Their primary purpose is to help administrators and developers troubleshoot, inspect, and debug live applications without disrupting the running service. They are </span><b>not</b><span style="font-weight: 400"> meant to run application workloads. Instead, they are designed for operational debugging.</span></p>
<p><span style="font-weight: 400">An ephemeral container is not added to a Pod by editing <span style="color: #0000ff"><code></span></span><span style="font-weight: 400;color: #0000ff">spec.containers</code></span><span style="font-weight: 400"><span style="color: #0000ff">.</span> Kubernetes treats it differently from regular containers. When an ephemeral container is created, a request is sent to the Kubernetes API server using the Pod’s <code></span><span style="font-weight: 400"><span style="color: #0000ff">ephemeralcontainers</span></code></span><span style="font-weight: 400"> subresource. This distinction is important because most of a Pod’s spec is immutable after creation; Kubernetes does not allow you to simply edit a running Pod and append a normal container to <span style="color: #0000ff"><code></span></span><span style="font-weight: 400;color: #0000ff">spec.containers</code></span><span style="font-weight: 400">.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">spec:
  ephemeralContainers:
  - name: &lt;debug container-name&gt;
    image: &lt;image&gt;
    targetContainerName: &lt;&gt; # (Optional)If ephemeral container needs to have same pid namespace of a running container.</pre>
</p>
<h2><span style="font-weight: 400">Key Characteristics of Ephemeral Containers</span></h2>
<p><span style="font-weight: 400">Unlike standard containers, ephemeral containers have the following characteristics:</span></p>
<ol>
<li style="font-weight: 400"><span style="font-weight: 400">They do not have guaranteed CPU or memory resources (</span><span style="font-weight: 400">limits</span><span style="font-weight: 400"> or </span><span style="font-weight: 400">requests</span><span style="font-weight: 400">).</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">If an ephemeral container crashes or completes its task, it will never restart.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">They do not include fields such as ports, </span><span style="font-weight: 400">livenessProbe</span><span style="font-weight: 400">, or </span><span style="font-weight: 400">readinessProbe</span><span style="font-weight: 400">.</span></li>
</ol>
<h2><span style="font-weight: 400">Examples</span></h2>
<p><span style="font-weight: 400">For testing, the Percona Operator for MySQL based on XtraDB Cluster is installed. The installation steps can be found </span><a href="https://docs.percona.com/percona-operator-for-mysql/pxc/kubectl.html"><span style="font-weight: 400">here</span></a><span style="font-weight: 400">. Once the installation is complete, the running pods should look similar to the following:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag"># kubectl get po
NAME                                              READY   STATUS      RESTARTS   AGE
cluster1-haproxy-0                                2/2     Running     0          17h
cluster1-haproxy-1                                2/2     Running     0          17h
cluster1-haproxy-2                                2/2     Running     0          16h
cluster1-pxc-0                                    3/3     Running     0          17h
cluster1-pxc-1                                    3/3     Running     0          17h
cluster1-pxc-2                                    3/3     Running     0          16h
percona-xtradb-cluster-operator-6b5f75f65-fpjxr   1/1     Running     0          17h
xb-cron-cluster1-fs-pvc-20266250025-372f8-hmrmh   0/1     Completed   0          7h9m</pre>
<p><b>NOTE: It is important to note that this behavior depends on your environment, specifically whether you have the required privileges or Security Context Constraints (SCC) in place. The commands below are for demonstration purposes and do not necessarily follow all best practices, such as avoiding generic <code>ubuntu</code> images, long-running shells like <code>bash</code>, or running containers as root.</b><b>Always run ephemeral containers with a strong focus on security, especially in production systems.</b></p>
<p><span style="font-weight: 400">Let’s look at some examples of how ephemeral containers can be useful.</span></p>
<h2><span style="font-weight: 400">1. Ephemeral Container with shared network namespace</span></h2>
<p><span style="font-weight: 400">When an ephemeral container is created in a Pod, it shares the network namespace of all other containers in that Pod. This is particularly useful for troubleshooting network-related issues.</span></p>
<p><span style="font-weight: 400">Let’s create an ephemeral container named <code></span><span style="font-weight: 400"><span style="color: #0000ff">debug-1</span></code></span><span style="font-weight: 400"> in the MySQL pod <code></span><span style="font-weight: 400"><span style="color: #0000ff">cluster1-pxc-0</span></code></span><span style="font-weight: 400">:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">% kubectl debug pod/cluster1-pxc-0 --image=ubuntu --container=debug-1 -ti -- bash
All commands and output from this session will be recorded in container logs, including credentials and sensitive information passed through the command prompt.
If you don't see a command prompt, try pressing enter.</pre>
<p><span style="font-weight: 400">When we check the processes in the container, only the bash process that was started when the container was created is running.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">root@cluster1-pxc-0:/# ps -elf
F S UID          PID    PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY          TIME CMD
4 S root           1       0  0  80   0 -  1192 do_wai 07:16 pts/0    00:00:00 bash
4 R root           9       1  0  80   0 -  1701 -      07:16 pts/0    00:00:00 ps -elf</pre>
<p><span style="font-weight: 400">However, port 3306 is open because the MySQL process in the primary container shares the same network namespace as our debug container.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">root@cluster1-pxc-0:/# netstat -tlnp | grep :3306
tcp        0      0 10.42.0.18:33062        0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      -                   
tcp6       0      0 :::33060                :::*                    LISTEN      -</pre>
<p><span style="font-weight: 400">This capability is highly effective for analyzing network traffic, egress connectivity, and local service availability.</span><span style="font-weight: 400">Let’s examine the Pod spec and status to see how ephemeral containers are represented.</span></p>
<p><span style="font-weight: 400">The following is the spec of the ephemeral container. Note the <code><span style="color: #0000ff">securityContext</code></span>, which we will discuss later in this post:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">% kubectl get po cluster1-pxc-0 -oyaml | yq .spec.ephemeralContainers    
- command:
    - bash
  image: ubuntu
  imagePullPolicy: Always
  name: debug-1
  resources: {}
  securityContext:
    capabilities:
      add:
        - SYS_PTRACE
  stdin: true
  terminationMessagePath: /dev/termination-log
  terminationMessagePolicy: File
  tty: true</pre>
<p><span style="font-weight: 400">Status of ephemeral containers</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">% kubectl get po cluster1-pxc-0 -oyaml | yq .status.ephemeralContainerStatuses
- containerID: containerd://4f656ada1679595109a9ac4c5bae916dc35404d7a45818eacef83aabd6d8509b
  image: docker.io/library/ubuntu:latest
  imageID: docker.io/library/ubuntu@sha256:53958ec7b67c2c9355df922dd08dbf0360611f8c3cdb656875e81873db9ffdba
  lastState: {}
  name: debug-1
  ready: false
  resources: {}
  restartCount: 0
  state:
    running:
      startedAt: "2026-06-25T07:16:22Z"
  user:
    linux:
      gid: 0
      supplementalGroups:
        - 0
        - 1001
      uid: 0</pre>
</p>
<h2><span style="font-weight: 400">2. Ephemeral Container with shared network namespace, pid namespace</span></h2>
<p><span style="font-weight: 400">While sharing the network namespace is useful, sharing the PID namespace to inspect running processes can be beneficial in many debugging scenarios.</span></p>
<p><span style="font-weight: 400">Let’s create an ephemeral container named <code></span><span style="font-weight: 400"><span style="color: #0000ff">debug-2</span></code></span><span style="font-weight: 400"> in the <code></span><span style="font-weight: 400"><span style="color: #0000ff">cluster1-pxc-0</span></code></span><span style="font-weight: 400"> Pod, specifically targeting the PID namespace of the <code></span><span style="font-weight: 400"><span style="color: #0000ff">pxc</span></code></span><span style="font-weight: 400"> container:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">% kubectl debug pod/cluster1-pxc-0 --image=ubuntu --container=debug-2 --target=pxc -ti -- bash
Targeting container "pxc". If you don't see processes from this container it may be because the container runtime doesn't support this feature.
All commands and output from this session will be recorded in container logs, including credentials and sensitive information passed through the command prompt.
If you don't see a command prompt, try pressing enter.</pre>
<p><span style="font-weight: 400">A key change from the previous command is the addition of the <code></span><span style="font-weight: 400"><span style="color: #0000ff">--target=pxc</span></code></span><span style="font-weight: 400"> flag. This creates an ephemeral container that shares the PID namespace of the </span><span style="font-weight: 400">pxc</span><span style="font-weight: 400"> container.</span></p>
<p><span style="font-weight: 400">When we check the processes in the container, we can see the MySQL processes.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">root@cluster1-pxc-0:/# ps -elf
F S UID          PID    PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY          TIME CMD
4 S 1001           1       0  4  80   0 - 832724 do_pol Jun24 ?       00:50:54 mysqld --wsrep_start_position=9d4e0c3e-6fd5-11f1-aab4-1a8a26ce607c:28
4 S 1001          90       1  0  80   0 - 306929 futex_ Jun24 ?       00:00:00 /var/lib/mysql/mysql-state-monitor
1 Z 1001        2999       1  0  80   0 -     0 -      Jun24 ?        00:00:00 [wsrep_sst_xtrab] &lt;defunct&gt;
4 S root      173053       0  0  80   0 -  1192 do_wai 08:01 pts/0    00:00:00 bash
4 R root      173081  173053  0  80   0 -  1701 -      08:01 pts/0    00:00:00 ps -elf</pre>
<p><span style="font-weight: 400">We can also verify this by network stats</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">root@cluster1-pxc-0:/# netstat -anlp | grep 3306
tcp        0      0 10.42.0.18:33062        0.0.0.0:*               LISTEN      1/mysqld            
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      1/mysqld            
tcp        0      0 10.42.0.18:59330        10.42.0.18:33062        TIME_WAIT   -                   
tcp        0      0 10.42.0.18:33062        10.42.1.4:52464         TIME_WAIT   -                   
tcp        0      0 10.42.0.18:36008        10.42.0.18:33062        TIME_WAIT   -                   
tcp        0      0 10.42.0.18:33062        10.42.1.4:52448         TIME_WAIT   -                   
tcp        0      0 10.42.0.18:33756        10.42.0.18:33062        TIME_WAIT   -                   
tcp        0      0 10.42.0.18:43086        10.42.0.18:33062        TIME_WAIT   -                   
tcp        0      0 10.42.0.18:43206        10.42.0.18:33062        TIME_WAIT   -                   
tcp        0      0 10.42.0.18:44256        10.42.0.18:33062        TIME_WAIT   -                   
tcp        0      0 10.42.0.18:43220        10.42.0.18:33062        TIME_WAIT   -                   
tcp        0      0 10.42.0.18:44258        10.42.0.18:33062        TIME_WAIT   -                   
tcp6       0      0 :::33060                :::*                    LISTEN      1/mysqld</pre>
</p>
<h2>3. <span style="font-weight: 400">Ephemeral Container with shared network namespace, shared pid namespace, shared volume</span></h2>
<p><span style="font-weight: 400">In some cases, you may need to collect dumps, check database files, or inspect logs, which requires access to the filesystem. However, each container has its own mount namespace, and mount namespaces cannot be shared directly.</span><span style="font-weight: 400">A volume mounted in a Pod, however, can be shared across containers, including ephemeral containers.</span></p>
<p><span style="font-weight: 400">Let’s check the volumes present in the <code></span><span style="font-weight: 400;color: #0000ff">cluster1-pxc-0</code></span><span style="font-weight: 400"> pod and how they are mounted to the </span><span style="font-weight: 400">pxc</span><span style="font-weight: 400"> container.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">% kubectl get po cluster1-pxc-0 -o yaml | yq '.spec.volumes[] | select(.name == "datadir")'
name: datadir
persistentVolumeClaim:
  claimName: datadir-cluster1-pxc-0

% kubectl get po cluster1-pxc-0 -o yaml | yq '.spec.containers[] | select(.name == "pxc")| .volumeMounts[] | select(.name == "datadir")' 
mountPath: /var/lib/mysql
name: datadir</pre>
<p><span style="font-weight: 400">As seen above, the persistent volume holding the database files is mounted at </span><b>/var/lib/mysql</b><span style="font-weight: 400">.</span></p>
<p><span style="font-weight: 400">Let’s create an ephemeral container named <code></span><span style="font-weight: 400"><span style="color: #0000ff">debug-3</span></code></span><span style="font-weight: 400"> in the <code></span><span style="font-weight: 400"><span style="color: #0000ff">cluster1-pxc-0</span></code></span><span style="font-weight: 400"> pod, sharing the PID namespace of the </span><span style="font-weight: 400">pxc</span><span style="font-weight: 400"> container and mounting the </span><span style="font-weight: 400">datadir</span><span style="font-weight: 400"> volume at <code></span><span style="font-weight: 400"><span style="color: #0000ff">/db-mount</span></code></span><span style="font-weight: 400">:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">% kubectl patch po cluster1-pxc-0 --subresource=ephemeralcontainers -p '
{
    "spec":
    {
        "ephemeralContainers":
        [
            {
                "name": "debug-3",
                "command": ["bash"],
                "image": "ubuntu",
                "targetContainerName": "pxc",
                "stdin": true,
                "tty": true,
                "volumeMounts": [{
                    "mountPath": "/db-mount",
                    "name": "datadir",
                    "readOnly": true
                }]
            }
        ]
    }
}'
pod/cluster1-pxc-0 patched</pre>
<p><span style="font-weight: 400">The command above creates the ephemeral container in the pod. To access it, we will attach to the running debug container:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">% kubectl attach -ti pod/cluster1-pxc-0 -c debug-3
All commands and output from this session will be recorded in container logs, including credentials and sensitive information passed through the command prompt.
If you don't see a command prompt, try pressing enter.
root@cluster1-pxc-0:/# cd /db-mount
root@cluster1-pxc-0:/db-mount# ls
'#ib_16384_0.dblwr'                 binlog.000001        gvwstate.dat                 mysql                     mysqlx.sock.lock       pxc-entrypoint.sh
'#ib_16384_1.dblwr'                 binlog.000002        ib_buffer_pool               mysql-state-monitor       notify.sock            readiness-check.sh
 '#innodb_redo'                     binlog.000003        ibdata1                      mysql-state-monitor.log   peer-list              sys
 '#innodb_temp'                     binlog.index         ibtmp1                       mysql.ibd                 performance_schema     undo_001
 audit_filter.20260624T140457.log   cluster1-pxc-0.pid   innobackup.backup.full.log   mysql.state               pmm-prerun.sh          undo_002
 audit_filter.log                   galera.cache         innobackup.backup.log        mysql_upgrade_history     private_key.pem        version_info
 auth_plugin                        get-pxc-state        liveness-check.sh            mysqld-error.log          public_key.pem         wsrep_cmd_notify_handler.sh
 auto.cnf                           grastate.dat         logrotate.status             mysqlx.sock               pxc-configure-pxc.sh</pre>
<p><span style="font-weight: 400">As demonstrated, the database files located at /var/lib/mysql are now accessible at /db-mount within the <code></span><span style="font-weight: 400"><span style="color: #0000ff">debug-3</span></code></span><span style="font-weight: 400"> container.</span></p>
<p><span style="font-weight: 400">Since the volume was mounted with the </span><span style="color: #0000ff"><b>&#8220;readOnly&#8221;: true</b></span><span style="font-weight: 400"> parameter, no writes can be performed.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">root@cluster1-pxc-0:/db-mount# touch test
touch: cannot touch 'test': Read-only file system</pre>
<p><span style="font-weight: 400">If you require write permissions, simply omit the </span><span style="color: #0000ff"><b>&#8220;readOnly&#8221;: true</b></span><span style="font-weight: 400"> flag.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">% kubectl patch po cluster1-pxc-0 --subresource=ephemeralcontainers -p '
{
    "spec":
    {
        "ephemeralContainers":
        [
            {
                "name": "debug-4",
                "command": ["bash"],
                "image": "ubuntu",
                "targetContainerName": "pxc",
                "stdin": true,
                "tty": true,
                "volumeMounts": [{
                    "mountPath": "/db-mount",
                    "name": "datadir"
                }]
            }
        ]
    }
}'
pod/cluster1-pxc-0 patched</pre>
<p><span style="font-weight: 400">Now, attach to the container and create a file in the volume mount:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">% kubectl attach -ti pod/cluster1-pxc-0 -c debug-4                  
All commands and output from this session will be recorded in container logs, including credentials and sensitive information passed through the command prompt.
If you don't see a command prompt, try pressing enter.
root@cluster1-pxc-0:/# touch /db-mount/test
root@cluster1-pxc-0:/# ls /db-mount/test
/db-mount/test</pre>
</p>
<h2><span style="font-weight: 400">4. Ephemeral Container on a Kubernetes node’s namespace and filesystem</span></h2>
<p><span style="font-weight: 400">If you need to examine system logs (such as kernel logs or dmesg) but do not have SSH access to the nodes, you can run an ephemeral container directly on the node’s namespace and filesystem.</span></p>
<p><span style="font-weight: 400">Let’s check the nodes of the Kubernetes cluster and run an ephemeral container directly on one:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">% kubectl get nodes
NAME                 STATUS   ROLES                AGE   VERSION
chetan-1-36-node-1   Ready    control-plane,etcd   6d    v1.36.1+k3s1
chetan-1-36-node-2   Ready    control-plane,etcd   6d    v1.36.1+k3s1
chetan-1-36-node-3   Ready    control-plane,etcd   6d    v1.36.1+k3s1</pre>
<p><span style="font-weight: 400">Run an ephemeral container:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">% kubectl debug node/chetan-1-36-node-1 --image=ubuntu --container=debug-5 -ti -- bash
Creating debugging pod node-debugger-chetan-1-36-node-1-hfgms with container debug-5 on node chetan-1-36-node-1.
All commands and output from this session will be recorded in container logs, including credentials and sensitive information passed through the command prompt.
If you don't see a command prompt, try pressing enter.
root@chetan-1-36-node-1:/#</pre>
<p><span style="font-weight: 400">Node’s filesystem can be accessed at /host.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">root@chetan-1-36-node-1:/#  ls /host
bin                boot  etc   lib                lib64       media  opt   root  sbin                snap  swapfile  tmp  var
bin.usr-is-merged  dev   home  lib.usr-is-merged  lost+found  mnt    proc  run   sbin.usr-is-merged  srv   sys       usr
root@chetan-1-36-node-1:/#  ls /host/var/log/dmesg 
/host/var/log/dmesg</pre>
<p><span style="font-weight: 400">Behind the scenes, a Pod with the name </span><span style="font-weight: 400">node-debugger-&lt;node-name&gt;-&lt;hash&gt;</span><span style="font-weight: 400"> is created.</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">% kubectl get po -l app.kubernetes.io/managed-by=kubectl-debug
NAME                                     READY   STATUS      RESTARTS   AGE
node-debugger-chetan-1-36-node-1-hfgms   0/1     Completed   0          33m</pre>
<p><span style="font-weight: 400">Let’s check the spec of the debug pod</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">% kubectl get po -l app.kubernetes.io/managed-by=kubectl-debug
NAME                                     READY   STATUS      RESTARTS   AGE
node-debugger-chetan-1-36-node-1-hfgms   0/1     Completed   0          33m

Let’s check the spec of the debug pod

% kubectl get po node-debugger-chetan-1-36-node-1-hfgms -oyaml | yq .spec
containers:
  - command:
      - bash
    image: ubuntu
    imagePullPolicy: Always
    name: debug-5
    resources: {}
    stdin: true
    terminationMessagePath: /dev/termination-log
    terminationMessagePolicy: File
    tty: true
    volumeMounts:
      - mountPath: /host
        name: host-root
      - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
        name: kube-api-access-4lj9h
        readOnly: true
dnsPolicy: ClusterFirst
enableServiceLinks: true
hostIPC: true
hostNetwork: true
hostPID: true
nodeName: chetan-1-36-node-1
preemptionPolicy: PreemptLowerPriority
priority: 0
restartPolicy: Never
schedulerName: default-scheduler
securityContext: {}
serviceAccount: default
serviceAccountName: default
terminationGracePeriodSeconds: 30
tolerations:
  - operator: Exists
volumes:
  - hostPath:
      path: /
      type: ""
    name: host-root
  - name: kube-api-access-4lj9h
    projected:
      defaultMode: 420
      sources:
        - serviceAccountToken:
            expirationSeconds: 3607
            path: token
        - configMap:
            items:
              - key: ca.crt
                path: ca.crt
            name: kube-root-ca.crt
        - downwardAPI:
            items:
              - fieldRef:
                  apiVersion: v1
                  fieldPath: metadata.namespace
                path: namespace</pre>
<p><span style="font-weight: 400">Some key observations from the spec are the following: </span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">hostIPC: true  -&gt; Share host’s IPC namespace
hostNetwork: true  -&gt; Share Host Node Network
hostPID: true  -&gt; Share host’s PID namespace

volumes:
  - hostPath:
      path: /      -&gt; Use Host’s file system 
      type: ""
    name: host-root

    volumeMounts:
      - mountPath: /host
        name: host-root</pre>
<p><span style="font-weight: 400">The specifications above indicate excessive permissions for a regular application; consequently, these might be disabled by your system administrator via security policies.</span></p>
<h2><span style="font-weight: 400">Profile of an Ephemeral Container</span></h2>
<p><span style="font-weight: 400">An interesting option for the </span><span style="font-weight: 400">kubectl debug</span><span style="font-weight: 400"> command is <code></span><span style="font-weight: 400"><span style="color: #0000ff">--profile</span></code></span><span style="font-weight: 400">.</span></p>
<p><span style="font-weight: 400">The official documentation provides the following:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">--profile string     Default: "general"
Options are "general", "baseline", "restricted", "netadmin" or "sysadmin". Defaults to "general"</pre>
<p><span style="font-weight: 400">These profiles define the </span><a href="https://man7.org/linux/man-pages/man7/capabilities.7.html"><span style="font-weight: 400">capabilities</span></a><span style="font-weight: 400"> associated with the </span><a href="https://kubernetes.io/docs/tasks/configure-pod-container/security-context/"><span style="font-weight: 400">SecurityContext</span></a><span style="font-weight: 400"> and determine how the host’s filesystem and namespaces are accessed. The security context details for each profile are listed below; further details are available in the </span><a href="https://github.com/kubernetes/kubectl/blob/master/pkg/cmd/debug/profiles.go"><span style="font-weight: 400">source code</span></a><span style="font-weight: 400">.</span></p>
<table dir="ltr" border="1" cellspacing="0" cellpadding="0" data-sheets-root="1" data-sheets-baot="1">
<colgroup>
<col width="157" />
<col width="355" />
<col width="291" /></colgroup>
<tbody>
<tr>
<td style="text-align: center"><span style="color: #000080"><strong>Profile</strong></span></td>
<td style="text-align: center"><span style="color: #000080"><strong>Debug Pod(SecurityContext)</strong></span></td>
<td style="text-align: center"><span style="color: #000080"><strong>Debug Node(SecurityContext)</strong></span></td>
</tr>
<tr>
<td style="padding-left: 40px">general</td>
<td style="padding-left: 40px">Add SYS_PTRACE cap</td>
<td style="padding-left: 40px">Attach host “/” filesystem.</p>
<p>No SecurityContext</p>
<p>Use HostNetwork, HostPID Namespace,HostIPC Namespace</td>
</tr>
<tr style="padding-left: 40px">
<td style="padding-left: 40px">baseline</td>
<td style="padding-left: 40px">No SecurityContext</td>
<td style="padding-left: 40px">No SecurityContext</td>
</tr>
<tr style="padding-left: 40px">
<td style="padding-left: 40px">restricted</td>
<td style="padding-left: 40px">Drop ALL capabilities</p>
<p>runAsNonRoot: true</p>
<p>allowPrivilegeEscalation: false</p>
<p>seCompProfile: RuntimeDefault</td>
<td style="padding-left: 40px">Drop ALL capabilities</p>
<p>runAsNonRoot: true</p>
<p>allowPrivilegeEscalation: false</p>
<p>seCompProfile: RuntimeDefault</td>
</tr>
<tr style="padding-left: 40px">
<td style="padding-left: 40px">netadmin</td>
<td style="padding-left: 40px">Add NET_ADMIN, NET_RAW Cap</td>
<td style="padding-left: 40px">Add NET_ADMIN, NET_RAW Cap</p>
<p>Use HostNetwork, HostPID Namespace,HostIPC Namespace</td>
</tr>
<tr style="padding-left: 40px">
<td style="padding-left: 40px">sysadmin</td>
<td style="padding-left: 40px">privileged: true</p>
<p>Use HostNetwork, HostPID Namespace,HostIPC Namespace</td>
<td style="padding-left: 40px">privileged: true</p>
<p>Use HostNetwork, HostPID Namespace,HostIPC Namespace</p>
<p>Attach host “/” filesystem.</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><span style="font-weight: 400">The pod’s execution behavior depends on the profile chosen when running the </span><span style="font-weight: 400">kubectl debug</span><span style="font-weight: 400"> command.</span></p>
<h2><span style="font-weight: 400">Caveats with Ephemeral Containers</span></h2>
<p><span style="font-weight: 400">Even though ephemeral containers are useful, there are several caveats and potential security risks that users should be aware of:</span></p>
<ol>
<li style="font-weight: 400"><span style="font-weight: 400">Ephemeral containers may be able to inspect processes, network traffic, environment variables, mounted volumes, or service account context depending on the Pod and cluster configuration.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">They can bypass the security benefits of distroless or minimal images.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Ephemeral containers can expose secrets</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Once an ephemeral container is added, it remains part of the Pod spec; it is not possible to remove it.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">As long as the ephemeral container’s main process is running, you can attach to it using </span><span style="font-weight: 400">kubectl attach</span><span style="font-weight: 400">.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Ephemeral containers behaviour is unpredictable, containers might terminate abruptly depending on the resource configuration and utilization of the pod.</span></li>
</ol>
<h2><span style="font-weight: 400">Guardrails and Best practices with Ephemeral Containers</span></h2>
<p><span style="font-weight: 400">Ephemeral containers are powerful, but they can create operational and security risks if used carelessly. Adhering to the following guardrails and best practices can help mitigate these risks:</span></p>
<ol>
<li style="font-weight: 400"><span style="font-weight: 400">Control ephemeral containers access through RBAC. Only necessary users should have the privilege.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Avoid using the <code></span><span style="font-weight: 400"><span style="color: #0000ff">sysadmin</span></code></span><span style="font-weight: 400"> profile when possible. The </span><span style="font-weight: 400">restricted</span><span style="font-weight: 400"> profile is better suited for maintaining a strong security posture.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Always use approved, scanned images that contain only the tools required for debugging, rather than generic images like </span><span style="font-weight: 400">ubuntu</span><span style="font-weight: 400">.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Avoid running debug containers with long-running processes like <code><span style="color: #0000ff">sleep infinity</span></code> or <code><span style="color: #0000ff">bash</span></code>. Instead, run specific tools or commands that perform the required action and then terminate.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Audit ephemeral containers usage.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Recycle Pods that contain ephemeral containers whenever possible (e.g., during maintenance windows), especially if the ephemeral process has not terminated.</span></li>
</ol>
<h2><span style="font-weight: 400">Conclusion</span></h2>
<p><span style="font-weight: 400">Ephemeral containers are a powerful troubleshooting tool for Kubernetes workloads, especially when application images are minimal, distroless, or missing debugging utilities. They allow engineers to inspect a running Pod without rebuilding the image or restarting the workload.</span></p>
<p><span style="font-weight: 400">However, they should be treated as controlled operational access, not as a default debugging shortcut. Ephemeral containers can expose sensitive runtime details such as processes, environment variables, mounted volumes, and network state.</span></p>
<p><span style="font-weight: 400">Always restrict usage with proper RBAC. Use approved debug images, prefer the least-privileged debug profile, and reserve powerful profiles such as </span><span style="font-weight: 400">sysadmin</span><span style="font-weight: 400"> for &#8220;break-glass&#8221; scenarios only.</span></p>
<p><span style="font-weight: 400">Debug sessions should be short-lived, intentional, and tied to a real troubleshooting need. In short, ephemeral containers improve debuggability, but they must be used with clear security, audit, and operational guardrails.</span></p>
<p>The post <a href="https://www.percona.com/blog/debugging-with-ephemeral-containers/">Debugging with Ephemeral Containers</a> appeared first on <a href="https://www.percona.com">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/debugging-with-ephemeral-containers/">Debugging with Ephemeral Containers</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Why I haven’t run my databases on Kubernetes</title>
        <link>https://www.percona.com/blog/why-i-havent-run-my-databases-on-kubernetes/</link>
        <pubDate>Tue, 30 Jun 2026 12:48:45 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>A few years ago, if there was a discussion on “Should we run databases on Kubernetes?”, there were more people saying no than yes. One of the common answers was, “No. Kubernetes is for stateless workloads. Keep your databases outside.” Thankfully, today the discussion is no longer about whether we should run databases on Kubernetes, … Continued<br />
The post Why I haven’t run my databases on Kubernetes appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/why-i-havent-run-my-databases-on-kubernetes/">Why I haven’t run my databases on Kubernetes</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><span style="font-weight: 400">A few years ago, if there was a discussion on “Should we run databases on Kubernetes?”, there were more people saying no than yes. One of the common answers was, “No. Kubernetes is for stateless workloads. Keep your databases outside.”</span></p>
<p><span style="font-weight: 400">Thankfully, today the discussion is no longer about </span><i><span style="font-weight: 400">whether</span></i><span style="font-weight: 400"> we should run databases on Kubernetes, but </span><i><span style="font-weight: 400">how</span></i><span style="font-weight: 400"> we can run them better on Kubernetes.</span></p>
<p><span style="font-weight: 400">In this post, we will look at some of the common arguments brought up against running databases on Kubernetes.</span></p>
<h2><span style="font-weight: 400">1. Kubernetes was designed for stateless workloads</span></h2>
<p><span style="font-weight: 400">By far the most common concern</span></p>
<p><span style="font-weight: 400">Even though Kubernetes was initially used mainly for stateless workloads, many additions have been made since its initial version to accommodate stateful workloads. Features like </span><span style="font-weight: 400">StatefulSet</span><span style="font-weight: 400"> and </span><span style="font-weight: 400">PersistentVolumes</span><span style="font-weight: 400"> were introduced, and storage usage has been streamlined through the Container Storage Interface (CSI). Furthermore, the platform itself has evolved to support system-level capabilities like </span><a href="https://kubernetes.io/docs/concepts/cluster-administration/swap-memory-management/"><span style="font-weight: 400">Swap space</span></a><span style="font-weight: 400"> to better manage memory-intensive databases.</span></p>
<p><span style="font-weight: 400">Today, a large number of users are successfully running stateful workloads on K8s. According to the latest CNCF Annual Survey Report, stateful containers have become a standard practice, with </span><a href="https://www.cncf.io/wp-content/uploads/2026/01/CNCF_Annual_Survey_Report_final.pdf"><span style="font-weight: 400">79% of Innovators</span></a><span style="font-weight: 400"> now running stateful applications in production.</span></p>
<h2><span style="font-weight: 400">2. Is my data safe on Kubernetes?</span></h2>
<p><span style="font-weight: 400">Is my data safe on Kubernetes even when pods, nodes, or the entire Kubernetes cluster go down?</span></p>
<p><span style="font-weight: 400">This sounds terrifying at first, but cloud-native architecture is built with failure in mind. Pods die, nodes crash, and entire clusters can fail. The golden rule of running databases on Kubernetes is that your data must never depend on the lifecycle of the compute layer.</span></p>
<p><span style="font-weight: 400">This is where the absolute decoupling of compute and storage becomes critical. The underlying storage infrastructure exists entirely independent of the Pod, Node, and even the Kubernetes cluster itself. As long as your storage backend is architected correctly, your data is preserved regardless of what happens to the compute environment.</span></p>
<p><span style="font-weight: 400">For a database, this tiered isolation changes everything:</span></p>
<ul>
<li style="font-weight: 400"><b>If a Pod or Node dies:</b><span style="font-weight: 400"> Kubernetes automatically schedules a replacement Pod and reattaches it to the existing, intact storage volume.</span></li>
<li style="font-weight: 400"><b>If the entire Kubernetes Cluster goes down:</b><span style="font-weight: 400"> Because the data lives safely outside the cluster boundary, you can spin up a completely new Kubernetes cluster, connect it to the existing storage backend, and restore your database operations.</span></li>
</ul>
<p><span style="font-weight: 400">For replicated databases, a Kubernetes Operator can automate this resilience, detecting failures, promoting replicas, and reconciling your state across nodes, or even helping orchestrate disaster recovery across entirely different clusters.</span></p>
<h2><span style="font-weight: 400">3. Won’t My Database Experience Downtime When Pods or Nodes Go Down?</span></h2>
<p><span style="font-weight: 400">What if a Pod or a node running a database goes down? Will the database experience downtime?</span></p>
<p><span style="font-weight: 400">While failover concepts remain similar to traditional environments, Kubernetes transforms this into an automated, declarative process via Operators</span><span style="font-weight: 400">. Kubernetes automatically schedules a replacement Pod and reattaches it to the existing, intact storage volume. If the database is properly configured with a redundant, highly available configuration (recommended configuration), the remaining healthy Pods will continue to serve traffic. When utilizing Kubernetes solutions, you are delivering a data service powered by specific database technology, where high availability is maintained through a cluster of N Pods. The critical shift in mindset here is to focus on the service&#8217;s resilience rather than the survival of individual Pods; our goal is to optimize the overall service, not the individual Pod, a distinction that is often misunderstood.</span></p>
<h2><span style="font-weight: 400">4. I have already built a lot of custom automation in our in-house environment. Why should I switch to Operators?</span></h2>
<p><span style="font-weight: 400">While custom scripts might work well today, proprietary automation always comes with heavy long-term maintenance overhead. To scale effectively, automation should be split into two distinct layers: </span><b>infrastructure</b><span style="font-weight: 400"> and </span><b>database management</b><span style="font-weight: 400">.</span></p>
<p><span style="font-weight: 400">Because Kubernetes is widely adopted and continuously updated by the global community, it handles the infrastructure layer (compute, networking, and storage) out of the box. By adopting a good </span><b>Operator</b><span style="font-weight: 400">, complex database-specific logic is offloaded. Ultimately, using Operators prevents you from reinventing the wheel and lets the teams focus on application value rather than maintaining custom infrastructure code.</span></p>
<h2><span style="font-weight: 400">5. Managing Pods, PVCs and configuration is painful</span></h2>
<p><span style="font-weight: 400">Manually managing StatefulSets, PersistentVolumeClaims (PVCs), and various other Kubernetes objects to run a database on Kubernetes can be tedious.</span></p>
<p><span style="font-weight: 400">This is where database operators emerge as game-changers.</span></p>
<p><span style="font-weight: 400">An operator is a Kubernetes-native controller that watches custom resources and continuously works to move the actual system toward the desired state. As a user, you describe something like: </span><i><span style="font-weight: 400">&#8220;I want a database cluster with three instances, backups enabled, this storage, these resources, this version, monitoring enabled, and this replication setup.&#8221;</span></i><span style="font-weight: 400"> The operator then handles everything under the hood, including managing Kubernetes objects and implementing the operational logic.</span></p>
<p><span style="font-weight: 400">Instead of playing the role of a mechanic who has to assemble all the parts and make everything run, you simply get into a car built by expert mechanics and drive it. The operator abstracts away the complexity so you can focus on the outcome rather than the implementation details.</span></p>
<h2><span style="font-weight: 400">6. I can configure bare-metal or VM nodes exactly how I want for database workloads, but Kubernetes makes this level of customization impossible.</span></h2>
<p class="isSelectedEnd">A very valid concern, especially for database engineers accustomed to carefully tuned virtual machines or bare-metal servers. Running databases inside Pods does introduce an additional abstraction layer. There may be a very small category of specialized, legacy &#8220;pet&#8221; databases that require highly specific bare-metal tuning and extreme isolation.</p>
<p class="isSelectedEnd">That said, the vast majority of configurations are achievable on Kubernetes. There are a few exceptions; for example, certain low-level storage tuning options may be limited by CSI driver abstractions. However, these are edge cases that rarely affect modern production deployments and do not impact the vast majority of database workloads.</p>
<p>For almost all modern production use cases, Kubernetes is more than capable of running databases reliably and efficiently.</p>
<h2><span style="font-weight: 400">7. Managed databases are way better than running on kubernetes</span></h2>
<p><span style="font-weight: 400">Managed databases are a great fit for many use cases, as they remove significant complexity and operational overhead.</span></p>
<p><span style="font-weight: 400">However, they do come with a few caveats:</span></p>
<ul>
<li style="font-weight: 400"><b>Cost at Scale:</b><span style="font-weight: 400"> Managed databases can become incredibly expensive compared to running databases yourself using Kubernetes Operators, especially as your data scales.</span></li>
<li style="font-weight: 400"><b>Vendor Lock-in:</b><span style="font-weight: 400"> When you rely on a cloud provider&#8217;s managed service, you are typically locked into their ecosystem, making it difficult and costly to migrate away.</span></li>
<li style="font-weight: 400"><b>Configuration Limits:</b><span style="font-weight: 400"> In many cases, cloud vendors restrict your control, making it impossible to apply deep custom configurations or install specific database extensions that your application might require.</span></li>
</ul>
<p><span style="font-weight: 400">In short, many of the concerns raised are no longer relevant today or do not apply to the majority of use cases.</span></p>
<h2><span style="font-weight: 400">Conclusion</span></h2>
<p><span style="font-weight: 400">It’s safe to say that databases run and run well on Kubernetes if configured well. In many cases, the shift is cultural rather than technical.</span></p>
<p><span style="font-weight: 400">Running databases on Kubernetes offers the advantage of preventing vendor lock-in. Even though database migration tools exist, cloud migrations remain difficult in practice. This is especially true with major cloud vendors, where your data layer is often tightly integrated with a complex web-native ecosystem of services.</span></p>
<p><span style="font-weight: 400">Operators excel at automating complex Day-2 operations like failovers, backups, and rolling updates. Running both your application and data layers under a single Kubernetes cluster provides a unified control plane for automation. This setup seamlessly aligns with GitOps workflows and becomes incredibly efficient when managing a large fleet of databases at scale.</span></p>
<p><span style="font-weight: 400">We have seen users derive incredible value by running databases on Kubernetes with operators. Some use it to manage standard database instances, while others have built their own fully fledged, internal DBaaS (Database-as-a-Service) platforms, and the list is long. Selecting the right Operator makes all the difference on this journey. Opting for free and open-source operators like the </span><a href="https://docs.percona.com/percona-operators/"><span style="font-weight: 400">Percona Operators</span></a><span style="font-weight: 400"> not only provides enterprise-grade databases but also saves your teams significant time and money.</span></p>
<p>&nbsp;</p>
<p>The post <a href="https://www.percona.com/blog/why-i-havent-run-my-databases-on-kubernetes/">Why I haven&#8217;t run my databases on Kubernetes</a> appeared first on <a href="https://www.percona.com">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/why-i-havent-run-my-databases-on-kubernetes/">Why I haven’t run my databases on Kubernetes</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Building Smart Semantic Search using PostgreSQL and pgvector. Part 3 &#8211; Hybrid Search, Percona Blog, and Widget Improvements</title>
        <link>https://percona.community/blog/2026/06/30/semantic-search-on-postgresql-part-3/</link>
        <pubDate>Tue, 30 Jun 2026 11:00:00 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>Here I write about what I changed after the first launch: hybrid search, filters and counts on the search page, the widget layout, indexer hardening, and the Percona Blog in the index. People often type short words or names, and pure vector search is weak at that. When I turned search on about a month ago I asked for feedback in Part 1, and most of what follows came from that.</p>
<p><a href="https://percona.community/blog/2026/06/30/semantic-search-on-postgresql-part-3/">Building Smart Semantic Search using PostgreSQL and pgvector. Part 3 &#8211; Hybrid Search, Percona Blog, and Widget Improvements</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Here I write about what I changed after the first launch: hybrid search, filters and counts on the search page, the widget layout, indexer hardening, and the Percona Blog in the index. People often type short words or names, and pure vector search is weak at that. When I turned search on about a month ago I asked for feedback in Part 1, and most of what follows came from that.</p>
<p><a href="https://percona.community/blog/2026/05/29/semantic-search-on-postgresql-part-1/">Part 1</a> is the introduction and stack overview. <a href="https://percona.community/blog/2026/05/31/semantic-search-on-postgresql-part-2/">Part 2</a> is Postgres, chunks, SQL, and the indexer.</p>
<p><figure>
<img decoding="async" src="https://percona.community/blog/2026/06/search-part-3-search-page-tabs-pgbackuprest.jpg" alt="Search page with pgbackrest, filter tabs and match quality slider" /></figure>
</p>
<h2 id="a-month-in-production">A month in production</h2>
<p>The API and indexer run in Docker on EC2. The engine is PostgreSQL with <a href="https://github.com/pgvector/pgvector" target="_blank" rel="noopener noreferrer">pgvector</a>. On the site there is a search widget in the blog header and a full results page at <a href="https://percona.community/search/" target="_blank" rel="noopener noreferrer">percona.community/search/</a>. Both call the same API. Search has been up since launch. I log queries for debugging and picked up feedback from colleagues, mostly in conversation and from my own tests, not from an analytics dashboard.</p>
<p>I keep <code>search_history</code> in Postgres as an engineering log: timings, regressions after hybrid changes, vector vs keyword splits. To be honest, the first month is mostly my smoke tests. Lots of <code>test</code>, the same names repeated while I debugged person-search, random widget checks. A “top user queries” chart from that log would look like internal QA, not real audience insight, so I am not publishing one here.</p>
<p>From feedback and from what I tried by hand, three kinds of queries kept showing up.</p>
<p>Short ones are a single product token (<code>pgbackrest</code>, <code>timescaledb</code>) or a person’s name (contributor or Percona Blog author). Long phrases like “zero downtime database migration” or “replication lag troubleshooting” still work fine with vector-only search, as in parts 1 and 2. People also want filters by content type and honest counts on the tabs, so it does not feel broken when the UI shows 30 cards but the tab says 900 matched.</p>
<p>That shaped what I worked on in June. The table below is illustrative, not a leaderboard from production logs.</p>
<table>
<thead>
<tr>
<th>Example query</th>
<th>Type</th>
<th>Why it matters</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>timescaledb</code></td>
<td>keyword</td>
<td>one word, weak vector, needs text</td>
</tr>
<tr>
<td><code>PMM</code></td>
<td>keyword</td>
<td>short product name</td>
</tr>
<tr>
<td><code>Peter Zaitsev</code></td>
<td>person</td>
<td>contributor profile plus author articles</td>
</tr>
<tr>
<td><code>slow queries mysql</code></td>
<td>hybrid</td>
<td>short tech phrase, not pure semantics</td>
</tr>
<tr>
<td><code>zero downtime database migration</code></td>
<td>semantic</td>
<td>long query as designed</td>
</tr>
</tbody>
</table>
<p>In <code>/demo</code> under History I left the log and the Word statistics tab for myself. When traffic grows and I filter out test noise, that view will be more useful.</p>
<h2 id="widget-and-the-search-page">Widget and the search page</h2>
<p>The widget has two modes, the popup in the header and the full <code>/search/</code> page (see the screenshot at the top of the post for tabs, counts, and the match quality slider).</p>
<p>From feedback I added filter tabs with multi-select (All, Blog, Percona Blog, Events, Talks, Contributors). The choice goes into the URL as <code>?type=blog,talk</code>. Tabs show counts in parentheses. Without a query that is indexed totals from public <code>GET /health</code>. After a search it is match counts per type from a separate <code>COUNT</code> in the API, without loading every card. There is a “Minimum match quality” slider for <code>min_score</code>, saved in <code>localStorage</code> and the URL. Search statistics (timings, vector vs keyword, score range) sit behind a compact link instead of taking half the page. Cards on <code>/search/</code> have a preview image, type, score, and a shorter excerpt.</p>
<p>I set the search page content width to 960px with tabs and controls centered. Small thing, but it reads better on mobile and desktop.</p>
<p>The next two screenshots use <code>Peter Zaitsev</code> as the person-search demo. <code>-pz-</code> in the filenames is shorthand for that query.</p>
<p><figure>
<img decoding="async" src="https://percona.community/blog/2026/06/search-part-3-search-stat-tabs-pz.jpg" alt="Search statistics for Peter Zaitsev, timings, hybrid split, tab match counts" /></figure>
</p>
<p>The popup in the site header uses the same API. Metadata stays compact above the results.</p>
<p><figure>
<img decoding="async" src="https://percona.community/blog/2026/06/search-part-3-widget-pz-top.jpg" alt="Header popup, Peter Zaitsev, contributor profile first" /></figure>
</p>
<h2 id="why-short-queries-hurt-pure-vector-search">Why short queries hurt pure vector search</h2>
<p>The embedding model is trained on phrases and context. A one-token query like <code>pgbackrest</code> or two words without a clear topic like <code>Peter Zaitsev</code> gives a short vector with a weak signal. In 768 dimensions many irrelevant chunks still land “not too far away”, especially across 18k chunks.</p>
<p>With <code>Peter Zaitsev</code>, vector search pulled random old posts that mention the name in the body. The contributor profile and recent author articles were not on top. With <code>pgbackrest</code>, semantics blurred and the top hits were “something about backup”, not necessarily pgBackRest.</p>
<p>A long query like “how to reduce replication lag on PostgreSQL” is a different story. Query and documents are rich in context and cosine similarity behaves predictably. For that I kept vector-only.</p>
<h2 id="hybrid-search-options">Hybrid search options</h2>
<p>I needed a stronger keyword leg for short queries without breaking semantic search for long ones.</p>
<table>
<thead>
<tr>
<th>Option</th>
<th>Pros</th>
<th>Cons / why not now</th>
</tr>
</thead>
<tbody>
<tr>
<td>PostgreSQL FTS (<code>to_tsvector</code>, <code>ts_rank</code>)</td>
<td>built-in, GIN indexes</td>
<td>dictionaries, stemming for names and brands</td>
</tr>
<tr>
<td><code>pg_trgm</code></td>
<td>good for typos</td>
<td>heavier at scale, extra indexes</td>
</tr>
<tr>
<td>OpenSearch / Elasticsearch</td>
<td>mature BM25</td>
<td>another cluster, I skipped this in Part 1</td>
</tr>
<tr>
<td>ILIKE plus heuristic score</td>
<td>fast to ship, one Postgres, easy to debug</td>
<td>not full BM25, <code>%pattern%</code> without GIN slows down at huge scale</td>
</tr>
</tbody>
</table>
<p>I started with ILIKE as step one. Something to compare against, with a clear upgrade path to FTS, trigram, or RRF. At community scale, about 7k documents, it is acceptable for now.</p>
<h2 id="how-hybrid-search-works-in-the-api">How hybrid search works in the API</h2>
<h3 id="query-mode">Query mode</h3>
<p><code>detect_search_mode()</code> in <code>search_hybrid.py</code> picks one of three modes.</p>
<ul>
<li><code>keyword</code> for one token (<code>timescaledb</code>, <code>audit_log</code>)</li>
<li><code>person</code> for 2-4 name-like tokens (<code>Peter Zaitsev</code>), with stop words like <code>percona</code>, <code>mysql</code></li>
<li><code>semantic</code> for everything else, vector only</li>
</ul>
<h3 id="two-search-legs">Two search legs</h3>
<p>For <code>keyword</code> and <code>person</code> I run vector search as before (best chunk per document, <code>score &gt;= min_score</code>, <code>LIMIT N</code>) and keyword SQL on <code>pages</code>, plus a chunk body check when needed:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-0">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">WHERE</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">author</span><span class="w"> </span><span class="k">ILIKE</span><span class="w"> </span><span class="s1">'%Peter Zaitsev%'</span><span class="w"> </span><span class="k">ESCAPE</span><span class="w"> </span><span class="s1">''</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">OR</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">title</span><span class="w"> </span><span class="k">ILIKE</span><span class="w"> </span><span class="s1">'%Peter Zaitsev%'</span><span class="w"> </span><span class="k">ESCAPE</span><span class="w"> </span><span class="s1">''</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">OR</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">description</span><span class="w"> </span><span class="k">ILIKE</span><span class="w"> </span><span class="s1">'%Peter Zaitsev%'</span><span class="w"> </span><span class="k">ESCAPE</span><span class="w"> </span><span class="s1">''</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">OR</span><span class="w"> </span><span class="err">…</span><span class="w"> </span><span class="n">tags</span><span class="p">,</span><span class="w"> </span><span class="n">chunk</span><span class="w"> </span><span class="n">body</span><span class="w"> </span><span class="err">…</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">ORDER</span><span class="w"> </span><span class="k">BY</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">CASE</span><span class="w"> </span><span class="k">WHEN</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">author</span><span class="w"> </span><span class="k">ILIKE</span><span class="w"> </span><span class="err">…</span><span class="w"> </span><span class="k">THEN</span><span class="w"> </span><span class="mi">0</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">WHEN</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">title</span><span class="w"> </span><span class="k">ILIKE</span><span class="w"> </span><span class="err">…</span><span class="w"> </span><span class="k">THEN</span><span class="w"> </span><span class="mi">1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">ELSE</span><span class="w"> </span><span class="mi">2</span><span class="w"> </span><span class="k">END</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="nb">date</span><span class="w"> </span><span class="k">DESC</span><span class="w"> </span><span class="n">NULLS</span><span class="w"> </span><span class="k">LAST</span></span></span></code></pre>
</div>
</div>
</div>
<p>For <code>person</code> I add ILIKE on each name part in author and title. Heuristic score 0.72-0.99 in Python (<code>score_keyword_row</code>). Exact author match ranks above a mention in the body.</p>
<p>ILIKE and user input. The SQL above uses literals for readability. In code every pattern is <code>ILIKE %s ESCAPE '\'</code> and psycopg2 binds the value. The query string is never concatenated into SQL, so classic injection like <code>' OR 1=1 --</code> does not apply. Parameters alone are not enough for ILIKE because <code>%</code> and <code>_</code> are wildcards inside the pattern. I escape <code></code>, <code>%</code>, and <code>_</code> in Python, wrap the term in <code>%…%</code>, and set <code>ESCAPE '\'</code> in SQL so a user cannot widen the match with their own <code>%</code>. Chunk body checks use <code>POSITION(LOWER(%s) IN LOWER(chunk_text))</code> with the same bound parameter.</p>
<h3 id="merge">Merge</h3>
<p><code>merge_search_results()</code> unions by <code>slug</code>. If both legs match the same document, I keep the higher score. Then sort by score, then recency for dated content. For <code>person</code>, the matching contributor profile goes first.</p>
<p>The user’s <code>min_score</code> is applied after merge so weak vector-only hits do not slip through when the threshold is raised.</p>
<h3 id="tab-counts">Tab counts</h3>
<p>For badges like <code>Percona Blog (905)</code> the API runs <code>COUNT(DISTINCT slug) … GROUP BY content_type</code> with the same keyword conditions, no row <code>LIMIT</code>. The UI still shows 30 best cards. The tab number is how many matched in total.</p>
<p>The response includes <code>stats.search_mode</code> (<code>semantic</code>, <code>keyword</code>, or <code>person</code>) and timings split into <code>vector_db_ms</code> and <code>keyword_db_ms</code>.</p>
<pre class="mermaid">
flowchart LR
Q["Query"] --&gt; D{detect_search_mode}
D --&gt;|semantic| V["vector_search"]
D --&gt;|keyword / person| V
D --&gt;|keyword / person| K["keyword_search ILIKE"]
V --&gt; M["merge by slug"]
K --&gt; M
M --&gt; F["filter min_score"]
F --&gt; R["≤ limit cards"]
K --&gt; C["COUNT for tabs"]
</pre>
<h2 id="the-bug-that-broke-person-search-in-production">The bug that broke person search in production</h2>
<p>After I shipped hybrid search, queries like <code>Peter Zaitsev</code> returned 500. The widget showed “Oops, sorry &#8211; something went wrong on our end.” Semantic queries still worked.</p>
<p>API logs:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">text</span><button class="code-block__copy" type="button" data-copy-target="codeblock-2" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-2">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">psycopg2.errors.InternalError_: could not load library "/usr/pgsql-18/lib/llvmjit.so":
</span></span><span class="line"><span class="cl">undefined symbol: _ZSt21__glibcxx_assert_failPKciS0_S0_</span></span></code></pre>
</div>
</div>
</div>
<p>Hybrid person search builds a heavy plan with <code>ILIKE</code> and <code>POSITION(LOWER(...) IN chunk_text)</code> over 18k chunks. PostgreSQL tried to JIT-compile it and failed loading <code>llvmjit.so</code>. The same error is described on the <a href="https://forums.percona.com/t/llvmjit-so-fails-to-load-in-percona-postgresql-17-container/40690" target="_blank" rel="noopener noreferrer">Percona forum</a>. I set <code>jit = off</code> on every API connection and search worked again.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-3" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-3">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SET</span><span class="w"> </span><span class="n">jit</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">off</span><span class="p">;</span><span class="w"> </span><span class="c1">-- on every API connection</span></span></span></code></pre>
</div>
</div>
</div>
<p>For tab <code>COUNT</code> in person mode I count on <code>pages</code> without scanning chunks. Author and title cover name search. Full keyword search with body still runs with <code>jit = off</code>.</p>
<p>On PG 18 with pgvector and text subqueries, test hybrid on person and keyword queries, not only long phrases. The planner behaves differently.</p>
<h2 id="percona-blog-in-one-index">Percona Blog in one index</h2>
<p>The community site already had blog posts, events, talks, and contributors. Without the <a href="https://www.percona.com/blog/" target="_blank" rel="noopener noreferrer">official Percona Blog</a> search felt incomplete. Talks and community posts link there every day.</p>
<h3 id="what-i-had-to-build">What I had to build</h3>
<ol>
<li>New <code>content_type</code>: <code>percona_blog</code>, its own RSS feed at <code>https://www.percona.com/blog/feed/</code>, separate crawler rules.</li>
<li>Same pipeline as the rest: RSS, HTML, chunks, embedding, <code>pages</code> and <code>community_nomic</code>. Same model <code>nomic-embed-text-v1</code>, prefixes <code>search_document:</code> and <code>search_query:</code> unchanged.</li>
<li>WordPress and RSS quirks on Percona Blog. Images in Open Graph, author in metadata, full text only on the HTML page. I added <code>fetch_percona_blog_image()</code> and a <code>percona_blog</code> branch in <code>crawler.py</code>.</li>
<li>Scale. Roughly 6200+ new documents. The index went from about 800 to about 7000 pages and 18,000 chunks. HNSW on a single Postgres on EC2 still copes, but a full re-index takes hours, not minutes.</li>
</ol>
<h3 id="indexer-after-crashes">Indexer after crashes</h3>
<p>The first full Percona Blog crawl failed several times. Worker OOM, Docker restarts, a long RSS walk. I hardened the indexer:</p>
<table>
<thead>
<tr>
<th>Problem</th>
<th>Fix</th>
</tr>
</thead>
<tbody>
<tr>
<td>Re-crawl from scratch after a crash</td>
<td><code>skip_known</code>, skip URLs already in <code>pages</code></td>
</tr>
<tr>
<td>Resume mid-RSS</td>
<td>start feed page near <code>indexed_count // 10</code></td>
</tr>
<tr>
<td>Cancel did not work</td>
<td><code>cancel_requested</code> checks between RSS pages, before fetch and encode</td>
</tr>
<tr>
<td>OOM during embedding</td>
<td><code>EMBED_BATCH_SIZE=8</code>, batched <code>model.encode()</code></td>
</tr>
<tr>
<td>No visibility</td>
<td><code>progress_log</code> on <code>indexer_runs</code>, live log in demo</td>
</tr>
<tr>
<td>Stuck task after kill</td>
<td>on worker startup honour cancel, re-queue resume tasks</td>
</tr>
</tbody>
</table>
<p>Same worker and <code>index_queue</code>, but behavior closer to production ETL than a one-off script.</p>
<p><figure>
<img decoding="async" src="https://percona.community/blog/2026/06/search-part-3-sources.jpg" alt="Admin dashboard, documents, chunks, and percona_blog in the index" /></figure>
</p>
<p><figure>
<img decoding="async" src="https://percona.community/blog/2026/06/search-part-3-index.jpg" alt="Percona Blog indexing, progress log and current URL" /></figure>
</p>
<h2 id="whats-next">What’s next</h2>
<ul>
<li>PostgreSQL FTS instead of bare ILIKE for the keyword leg</li>
<li>Pagination on <code>/search/</code> if I need to go past 30. Nobody needs all 900 author posts on one screen, “load 30 more” is enough</li>
<li>More sources from the Part 1 roadmap: video, GitHub, forum</li>
</ul>
<h2 id="try-it-yourself">Try it yourself</h2>
<p>Popup search is in the <a href="https://percona.community" target="_blank" rel="noopener noreferrer">percona.community</a> header. Full results are at <a href="https://percona.community/search/?q=zero+downtime+database+migration" target="_blank" rel="noopener noreferrer">percona.community/search/</a>.</p>
<p>Examples to try. These are demos of different modes, not a top from the log.</p>
<table>
<thead>
<tr>
<th>Query</th>
<th>Mode</th>
<th>What to check</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>zero downtime database migration</code></td>
<td>semantic</td>
<td>long phrase, vector-only</td>
</tr>
<tr>
<td><code>replication lag troubleshooting</code></td>
<td>semantic</td>
<td>same</td>
</tr>
<tr>
<td><code>pgbackrest</code></td>
<td>keyword</td>
<td>one-word product, hybrid</td>
</tr>
<tr>
<td><code>Peter Zaitsev</code></td>
<td>person</td>
<td>contributor plus author articles</td>
</tr>
<tr>
<td><code>best pizza recipe napoli</code></td>
<td>semantic</td>
<td>off-topic, empty above <code>min_score</code></td>
</tr>
</tbody>
</table>
<p>As in <a href="https://percona.community/blog/2026/05/29/semantic-search-on-postgresql-part-1/">Part 1</a>, I am not publishing the search service code. It is built for percona.community. These posts share observations and ideas you can adapt. Vector search schema and SQL are in <a href="https://percona.community/blog/2026/05/31/semantic-search-on-postgresql-part-2/">Part 2</a>. The database is open-source <a href="https://docs.percona.com/postgresql/18/index.html" target="_blank" rel="noopener noreferrer">Percona Distribution for PostgreSQL</a>.</p>
<p>If you are building something similar or hit an edge case, leave a comment. In Part 1 I asked for feedback and it led to this post.</p>
<p><a href="https://percona.community/blog/2026/06/30/semantic-search-on-postgresql-part-3/">Building Smart Semantic Search using PostgreSQL and pgvector. Part 3 &#8211; Hybrid Search, Percona Blog, and Widget Improvements</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Skipping Percona Server for MySQL 8.4.9 and 9.7.0</title>
        <link>https://www.percona.com/blog/percona-server-mysql-8-4-9-9-7-0-skipped/</link>
        <pubDate>Mon, 29 Jun 2026 15:19:11 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Upstream MySQL published an out-of-schedule release this week with two high-severity CVE fixes. We’ve pulled those fixes into our next builds and are skipping the two versions we had already queued: Percona Server for MySQL 8.4.9 and 9.7.0. These fixes arrived through Oracle’s new monthly Critical Security Patch Updates (CSPUs), which Oracle announced begin May … Continued<br />
The post Skipping Percona Server for MySQL 8.4.9 and 9.7.0 appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/percona-server-mysql-8-4-9-9-7-0-skipped/">Skipping Percona Server for MySQL 8.4.9 and 9.7.0</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Upstream MySQL published an out-of-schedule release this week with two high-severity CVE fixes. We&#8217;ve pulled those fixes into our next builds and are skipping the two versions we had already queued: Percona Server for MySQL 8.4.9 and 9.7.0.</p>
<p>These fixes arrived through Oracle&#8217;s new monthly Critical Security Patch Updates (CSPUs), which <a href="https://blogs.oracle.com/security/update-monthly-critical-security-patch-updates-cspus-begin-may-28-2026" target="_blank" rel="noopener">Oracle announced begin May 28, 2026</a>. CSPUs ship targeted high-severity fixes between Oracle&#8217;s quarterly Critical Patch Updates. For MySQL, these updates are issued as needed rather than on a fixed monthly schedule, so out-of-schedule security fixes like these may become more common.</p>
<p>We&#8217;ve handled a skip like this before. When MySQL Community Server 8.4.2 followed 8.4.1 by only a few weeks, we skipped 8.4.1 and shipped its contents in 8.4.2-2. This is the same approach.</p>
<h2>What&#8217;s happening</h2>
<p>The code for 8.4.9 and 9.7.0 was already ready for packaging when the CVE fixes landed. Rather than ship those builds and follow immediately with a security patch, we applied the fixes, re-tested, and re-tagged. Percona Server for MySQL 8.4.10 and 9.7.1 will carry everything 8.4.9 and 9.7.0 would have contained, plus the upstream high-severity CVE fixes.</p>
<p>These fixes come from Oracle&#8217;s <a href="https://www.oracle.com/security-alerts/cspujun2026.html" target="_blank" rel="noopener">June 2026 Critical Security Patch Update</a>; the specific CVE identifiers will be listed in the 8.4.10 and 9.7.1 release notes. No action is required on your part. The fixes reach you in 8.4.10 and 9.7.1, expected within days. If your security policy requires faster remediation, contact Percona Support to discuss interim options.</p>
<p>8.4.9 and 9.7.0 will not appear in the package repositories. A normal upgrade moves you straight to 8.4.10 or 9.7.1, which carry the skipped versions&#8217; content.</p>
<h2>Who this affects</h2>
<p>If you were waiting specifically for 8.4.9 or 9.7.0, those versions won&#8217;t be published. Point your upgrade at the next releases instead, which include the same content and the CVE fixes. The delay is a few days, not weeks. If you weren&#8217;t tracking a specific version number, nothing changes for you.</p>
<h2>What to do</h2>
<p>Nothing urgent. Upgrade to the next Percona Server for MySQL releases as you normally would once they&#8217;re published. We&#8217;ll announce them through release notes and the Percona Blog. For questions about timing or the security content, reach out to Percona Support or post in the Percona Community Forum.</p>
<h2>What to expect going forward</h2>
<p>Oracle&#8217;s monthly CSPUs mean out-of-schedule fixes will happen more often. Our approach stays consistent: we evaluate every upstream release, and when high-severity fixes land between our scheduled releases, we fold them into the next release rather than shipping a separate build for each one. Your LTS support commitments don&#8217;t change. We&#8217;re watching how often Oracle uses the monthly cadence and will adjust release planning if the volume warrants it.</p>
<p><!-- notionvc: df2d4121-e0ee-4824-bc7f-3c4c0773142e --></p>
<p>The post <a href="https://www.percona.com/blog/percona-server-mysql-8-4-9-9-7-0-skipped/">Skipping Percona Server for MySQL 8.4.9 and 9.7.0</a> appeared first on <a href="https://www.percona.com">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/percona-server-mysql-8-4-9-9-7-0-skipped/">Skipping Percona Server for MySQL 8.4.9 and 9.7.0</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Foundation Sea Lion Champions Nominees: Fariha Shaikh</title>
        <link>https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-fariha-shaikh/</link>
        <pubDate>Mon, 29 Jun 2026 04:43:34 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>The MariaDB Foundation Sea Lion Champions program celebrates the people and organizations who help make the MariaDB ecosystem stronger, more open, and more useful for everyone. …<br />
Continue reading "MariaDB Foundation Sea Lion Champions Nominees: Fariha Shaikh"<br />
The post MariaDB Foundation Sea Lion Champions Nominees: Fariha Shaikh appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-fariha-shaikh/">MariaDB Foundation Sea Lion Champions Nominees: Fariha Shaikh</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>The MariaDB Foundation Sea Lion Champions program celebrates the people and organizations who help make the MariaDB ecosystem stronger, more open, and more useful for everyone. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-fariha-shaikh/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;MariaDB Foundation Sea Lion Champions Nominees: Fariha Shaikh&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-fariha-shaikh/">MariaDB Foundation Sea Lion Champions Nominees: Fariha Shaikh</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-fariha-shaikh/">MariaDB Foundation Sea Lion Champions Nominees: Fariha Shaikh</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Preparing Your Analytical Databases for Agents</title>
        <link>https://vettabase.com/preparing-your-analytical-databases-for-agents/</link>
        <pubDate>Sat, 27 Jun 2026 15:15:52 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://vettabase.com/">Vettabase</source>
        <description><![CDATA[<p>Agents can query databases: this has always been the dream of many data people! But there is some work to do to make this process reliable, secure, and valuable for your team.</p>
<p><a href="https://vettabase.com/preparing-your-analytical-databases-for-agents/">Preparing Your Analytical Databases for Agents</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p class="wp-block-paragraph">Agents can query databases: this has always been the dream of many data people! Sure, SQL resembles English, so it makes it relatively easy to express your questions and get answers. The key here is <em>relatively</em>. You still need to think about your schema, which tables need to be joined to gather the information you need, recall column names, and follow a precise syntax.</p>
<p class="wp-block-paragraph">Agents save you that effort. You express your query in English, you get a result. Well, you might still have to wait if you have a lot of data and the query is complex, but during that time you can switch to other tasks. It feels like waving a magic wand and seeing your desires materialise&#8230; but it&#8217;s not exactly like that. Because both you and LLMs can make mistakes, especially if your schema isn&#8217;t clear.</p>
<p class="wp-block-paragraph">And that&#8217;s why I tell people that their schemas should be prepared for agents. Let&#8217;s see what this means.</p>
<h2 class="wp-block-heading">Security</h2>
<p class="wp-block-paragraph">The first thing to address is security. Make sure that agents and tools that read data can only access data they should be able to access, and they can only perform the authorised operations. For example, typically they must not be able to add, modify or delete any data. And if your database contains PII data (such as customer names, anagraphic data and contacts), you typically don&#8217;t want your AI to be able to query those data.</p>
<p class="wp-block-paragraph">In some cases, the data that the agent or tool should be able to see depend on the user. A sales representative might be authorised to see her own customers and performance data, but not her colleagues data. A member of the legal team might be authorised to see contracts that other users shouldn&#8217;t see.</p>
<p class="wp-block-paragraph">Databases have all the features you need to implement this level of security. It&#8217;s important that the agent or tool uses a dedicated database user, or if necessary, a database user that is dedicated to the AI&#8217;s current human user. Databases support different permissions for every type of supported operations &#8211; typically, you only want to grant AI the <code>SELECT</code> permission. That permission can be granted at schema, table, or column level. Implementing row-level permission is slightly more complex, but feasable. If the DBMS you use doesn&#8217;t support <a href="https://vettabase.com/row-level-security-policy-in-postgresql/" data-type="post" data-id="38404">a specific way</a> to do this, you can still implement row-based permissions <a href="https://vettabase.com/mariadb-mysql-using-views-to-grant-or-deny-row-level-privileges/" data-type="post" data-id="38278">using stored procedures and views</a>.</p>
<h2 class="wp-block-heading">Configuration</h2>
<p class="wp-block-paragraph">If you&#8217;re not using a database designed for analytical workloads (such as ClickHouse, Snowflake or Amazon Redshift) you should really configure it to optimise complex, long-running queries. We won&#8217;t dig into the details, because they greatly depend on which database you use.</p>
<p class="wp-block-paragraph">Regardless which technology you use, it&#8217;s important to make sure that:</p>
<ul class="wp-block-list">
<li>Your queries timeouts are long enough to permit analytical queries. I often insist that, for OLTP, granting all queries a timeout that is longer than 5 seconds is unreasonable. The user has already left the page, and the only effect of keeping the query running is consuming more database resources. But for analytical workloads, it would be utopic to assume than 10 minutes is a long time.</li>
<li>On the other hand, enough is enough. A query cannot run for days and make the database unresponsive or too slow for all other users. There should be a reasonable timeout. Some technologies or external tools allow to create more complex rules, and kill the queries that are using too many resources.</li>
</ul>
<h2 class="wp-block-heading">Database Design</h2>
<p class="wp-block-paragraph">Every table must express an entity or a relationship between entities, in a standard, clear, and clean way.</p>
<p class="wp-block-paragraph">When a table is a sparse matrix, the relationships between the objects it contains are unclear. When a table contains multiple entities, its meaning itself is unclear.</p>
<p class="wp-block-paragraph">Consider <a href="https://www.odoo-community.org/" rel="noopener">Odoo</a>&#8216;s schema. Odoo is a most important open source CRM, and it&#8217;s currently growing very fast in Europe. But &#8211; sorry to be blunt here &#8211; its PostgreSQL schema is poorly designed. Tables often have multiple meanings. Or they have one meaning for the developers, but this doesn&#8217;t match the customers&#8217; business objects and processes.</p>
<p class="wp-block-paragraph">For example, both customers and suppliers were stored in the <code>res_partner</code> table. In older versions, they could be distinguished thanks to boolean columns called <code>customer</code> and <code>supplier</code>. In newer versions, it got worse: to find customers we need to filter by <code>customer_rank &gt; 0</code>, and to find suppliers we need to filter by <code>supplier_rank &gt; 0</code>. While LLMs tend to know this, expect them to make many mistakes when you ask them to write complex queries that involve multiple unclear tables.</p>
<h2 class="wp-block-heading">Clear Naming</h2>
<p class="wp-block-paragraph">Unclear naming can easily confuse models. If a column tells you how many products of a certain type are in a certain warehouse, that column should be named <code>quantity</code>. It&#8217;s also acceptable to call it <code>qty</code>, because it&#8217;s a common abbreviation that models have encountered many times during their training. Calling it <code>count</code> can occasionally lead to confusion. Calling it <code>num</code> or <code>n</code> is a great way to get wrong results &#8211; and yes, I&#8217;ve seen columns called <code>num</code> or <code>n</code>.</p>
<p class="wp-block-paragraph">The model needs to know the <em>type</em> of columns, too, so it can produce correct syntax ( <code>text_col='text' AND int_col=1</code>). If the typing is confusing, it can lead to errors. When naming is acceptable but not very clear, wrong typing can mislead models. For example, <code>dob</code> usually means Date of Birth, but it can have many other meanings. At least one of which relates to people too: Degree of Burglary. Using the proper type can avoid funny mistakes.</p>
<p class="wp-block-paragraph">See also my article <a href="https://vettabase.com/why-your-database-deserves-consistent-names-and-types/" data-type="post" data-id="366159">Why Your Database Deserves Consistent Names and Types</a>.</p>
<h2 class="wp-block-heading">Comments</h2>
<p class="wp-block-paragraph">Tables, columns, views, and basically every schema object can have a comment. Use comments whenever the meaning of a column isn&#8217;t obvious. Use it to clarify acronyms, to indicate the format of text columns, and above all to clarify obscure cases.</p>
<p class="wp-block-paragraph">Don&#8217;t use comments when the meaning of something cannot realistically confuse the reader, avoiding added noise. Remember: humans and models need to focus their attention towards the right things to avoid making mistakes. Noise makes this difficult.</p>
<div id="awgt_1abfaecb7e8c" class="awgt-alert-content-wrap">#awgt_1abfaecb7e8c .awgt-alert-box {max-width: 100%;background: transparent;border-color: #007cba;}#awgt_1abfaecb7e8c .awgt-alert-content {color: #5a5a5a;padding: 15px 30px;}#awgt_1abfaecb7e8c .awgt-alert-content p {font-size: 16px;line-height: 24px;}#awgt_1abfaecb7e8c .awgt-alert-content a {color: #f44336;}#awgt_1abfaecb7e8c legend.awgt-alert-icon svg {fill: #007cba;width: 25px;height: 25px;}#awgt_1abfaecb7e8c legend.awgt-alert-icon {margin-left: 5%;padding: 0 12px;}#awgt_1abfaecb7e8c .awgt-alert-content.awgt-drop-cap p:first-child:first-letter {color: #000000;font-size: 40px;margin-top: 0px;}#awgt_1abfaecb7e8c .awgt-alert-content.awgt-first-bold &gt; p &gt; strong:first-child {color: #000000;padding-right: 5px;font-size: 16px;}#awgt_1abfaecb7e8c .awgt-alert-lay-3 .awgt-alert-content.awgt-first-bold &gt; p &gt; strong:first-child {display: block;padding-right: 0px !important;padding-bottom: 5px;}#awgt_1abfaecb7e8c fieldset.awgt-alert-box.awgt-alert-lay-3 legend.awgt-alert-icon:before {border-color: transparent transparent #007cba transparent;filter: brightness(0.7);}#awgt_1abfaecb7e8c fieldset.awgt-alert-box.awgt-alert-lay-3 legend.awgt-alert-icon:after {border: 26px solid #007cba;}</p>
<fieldset class="awgt-alert-box awgt-lay-one">
<legend class="awgt-alert-icon"></legend>
<div class="awgt-alert-content">
<p>Also, schemas change over time. Make sure that comments change along with the schema, rather than becoming obsolete.</p>
</div>
</fieldset>
</div>
<h2 class="wp-block-heading">Views</h2>
<p class="wp-block-paragraph">Views don&#8217;t eliminate complexity, they add up to existing complexity. The main undesirable consequences of this are that:</p>
<ol class="wp-block-list">
<li>The query planner / optimiser might ignore some indexes in the underlying tables, making your queries unnecessarily slow. In technical terms: views can prevent a predicate pushdown, forcing a view materialisation.</li>
<li>If models still learn about the underlying tables, they can get confused by multiple levels of complexity.</li>
</ol>
<p class="wp-block-paragraph">That said, if used wisely, views can make some queries simpler to create. If the model can avoid writing a JOIN involving many tables, filters and aggregations by using a single view, this will increase the chances that the rest of the query is correct and clean.</p>
<p class="wp-block-paragraph">You can also use views to <a href="https://vettabase.com/mariadb-mysql-using-views-to-grant-or-deny-row-level-privileges/" data-type="post" data-id="38278">hide sensitive information</a> from a model.</p>
<h2 class="wp-block-heading">Documentation and Data Dictionary</h2>
<p class="wp-block-paragraph">Schemas need to be documented. Agents didn&#8217;t eliminate this need, they made it more urgent.</p>
<p class="wp-block-paragraph">Suppose you ask &#8220;which warehouses are critically full?&#8221;. Maybe your schema has confusing naming, and warehouses are in a table called <code>store</code>. Maybe &#8220;critically full&#8221; is a precise concept used by your team, but its explanation can&#8217;t be found in the data. Maybe it even has a different meaning for different teams (far from uncommon in medium/big companies).</p>
<p class="wp-block-paragraph">In the simplest cases, it&#8217;s usually desirable to send some schema documentation to the models using the <em>system prompt</em> &#8211; the initial message that the agent sends to the model, followed by anything the user wrote. If you have dozens of tables, this is unlikely to be sufficient.</p>
<p class="wp-block-paragraph">For more complex cases, the system prompt should only include:</p>
<ul class="wp-block-list">
<li>A generic explanation of the business domain and the schema.</li>
<li>A dictionary of the business terms that might be found in the user&#8217;s request. If necessary, this dictionary should vary from team to team.</li>
<li>Documentation of naming rules that are used consistently across the schema.</li>
<li>Documentation of the most common tables &#8211; the ones that have a good chance of being referenced in a query.</li>
<li>A list of entity groups &#8211; for example: customer entities, inventory entities, payment entities, etc. Entities are tables and views. Some entities might be part of multiple groups.</li>
</ul>
<p class="wp-block-paragraph">With this information, the model should understand:</p>
<ul class="wp-block-list">
<li>How to compose very common queries.</li>
<li>Which groups it needs more information about to fulfill a user request.</li>
</ul>
<p class="wp-block-paragraph">The model will be instructed to let the agent know, in a machine-readable format, if it needs informaiton about some entity groups, and which ones. When this happens, the model will be provided with additional documentation. In the AI jargon, these pieces of additional documentation are called resources.</p>
<div id="awgt_32adfa4ad343" class="awgt-alert-content-wrap">#awgt_32adfa4ad343 .awgt-alert-box {max-width: 100%;background: transparent;border-color: #007cba;}#awgt_32adfa4ad343 .awgt-alert-content {color: #5a5a5a;padding: 15px 30px;}#awgt_32adfa4ad343 .awgt-alert-content p {font-size: 16px;line-height: 24px;}#awgt_32adfa4ad343 .awgt-alert-content a {color: #f44336;}#awgt_32adfa4ad343 legend.awgt-alert-icon svg {fill: #007cba;width: 25px;height: 25px;}#awgt_32adfa4ad343 legend.awgt-alert-icon {margin-left: 5%;padding: 0 12px;}#awgt_32adfa4ad343 .awgt-alert-content.awgt-drop-cap p:first-child:first-letter {color: #000000;font-size: 40px;margin-top: 0px;}#awgt_32adfa4ad343 .awgt-alert-content.awgt-first-bold &gt; p &gt; strong:first-child {color: #000000;padding-right: 5px;font-size: 16px;}#awgt_32adfa4ad343 .awgt-alert-lay-3 .awgt-alert-content.awgt-first-bold &gt; p &gt; strong:first-child {display: block;padding-right: 0px !important;padding-bottom: 5px;}#awgt_32adfa4ad343 fieldset.awgt-alert-box.awgt-alert-lay-3 legend.awgt-alert-icon:before {border-color: transparent transparent #007cba transparent;filter: brightness(0.7);}#awgt_32adfa4ad343 fieldset.awgt-alert-box.awgt-alert-lay-3 legend.awgt-alert-icon:after {border: 26px solid #007cba;}</p>
<fieldset class="awgt-alert-box awgt-lay-one">
<legend class="awgt-alert-icon"></legend>
<div class="awgt-alert-content">
<p>Remember that models, just like humans, understand examples and patterns better than long explanations. For example, it&#8217;s better to omit an explanation and tell the model that a string matches this format: &lt;project id-or-label=&#8221;?&#8221;&gt;&lt;customer id=&#8221;?&#8221;&gt;&lt;ticket title=&#8221;?&#8221;/&gt;&lt;/customer&gt;&lt;/project&gt;</p>
</div>
</fieldset>
</div>
<h2 class="wp-block-heading">SQL Advanced Features and Dialects</h2>
<p class="wp-block-paragraph">SQL has many advanced features that are incredibly powerful, but not widely used. To make things worse, every dialect has non-standard variations that normally work on one DBMS only. This often confuses models. I&#8217;ve seen cases where they suggest using MariaDB temporal tables features on PostgreSQL, or where they use PostgreSQL type conversion syntax in a query for MySQL.</p>
<p class="wp-block-paragraph">It is a good idea to use a set of <a href="http://agentskills.io/" rel="noopener">agent skills</a> or <a href="https://modelcontextprotocol.io/specification/2025-06-18/server/resources" rel="noopener">MCP resources</a> to inform the model about the syntaxes that are supported by the DBMS you use. For example, MariaDB Foundation maintains a set of <a href="https://github.com/MariaDB/skills" rel="noopener">MariaDB skills</a> that you can easily make available to your agents.</p>
<h2 class="wp-block-heading">Semantic Layers</h2>
<p class="wp-block-paragraph">There is a movement in the data industry toward Semantic Layers (like dbt Semantic Layer, Cube, LookML). You don&#8217;t have to necessarily adopt one of them, as you can build your semantics in a more reliable, cheaper and cleaner way by following the good practices listed here. However, I want to mention that semantic layers exist for the sake of completeness.</p>
<h2 class="wp-block-heading">Training</h2>
<p class="wp-block-paragraph">This is the last link of the chain, but make no mistake: you want to make sure it&#8217;s not the weakest! A technology can&#8217;t save humans from using it in a bad way.</p>
<p class="wp-block-paragraph">It&#8217;s important to train AI users. They need to know:</p>
<ul class="wp-block-list">
<li>How to formulate a good question;</li>
<li>How to make sure the model understands a question;</li>
<li>How to make sure the model has enough information to emit an informed answer;</li>
<li>How to make sure the model has made a correct reasoning;</li>
<li>How to spot hallucinations.</li>
</ul>
<p class="wp-block-paragraph">This is important to avoid the trap of AI&#8217;s hallucinations.</p>
<p class="wp-block-paragraph">AI training is not part of our services, but we can direct you to reliable partners.</p>
<h2 class="wp-block-heading">Conclusions</h2>
<p class="wp-block-paragraph">Many schemas are far from having a clean, self-documenting structure. You need to make sure that models understand user requests and translate them into correct SQL by fixing the schema where needed, and by adding relevant documentation. Changing the schema is better in terms of correctness of the results and token saving, but the required effort is not always reasonable. With clear, precise, well-structured documentation it is still possible to obtain good SQL queries from a model.</p>
<p class="wp-block-paragraph">We can help you prepare your schemas for agents. <a href="https://vettabase.com/contact/" data-type="page" data-id="11">Contact us</a> to discuss what we can do.</p>
<p class="wp-block-paragraph"><em>Federico Razzoli</em></p>
<p class="wp-block-paragraph">
<p class="wp-block-paragraph">
<p><a href="https://vettabase.com/preparing-your-analytical-databases-for-agents/">Preparing Your Analytical Databases for Agents</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Enterprise Server Q2 2026 Maintenance Releases</title>
        <link>https://mariadb.com/resources/blog/mariadb-enterprise-server-q2-2026-maintenance-releases/</link>
        <pubDate>Fri, 26 Jun 2026 22:25:04 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>New maintenance releases for MariaDB Enterprise Server: 11.8.8-5, 11.4.12-9, and 10.6.27-23 are now available. Download Now Notable Release Updates MariaDB […]</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-enterprise-server-q2-2026-maintenance-releases/">MariaDB Enterprise Server Q2 2026 Maintenance Releases</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>New maintenance releases for MariaDB Enterprise Server: 11.8.8-5, 11.4.12-9, and 10.6.27-23 are now available. Download Now MariaDB Enterprise Server is an enhanced, hardened and secured version of MariaDB Community Server that delivers enterprise reliability, stability and long-term support as well as greater operational efficiency when it comes…</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-enterprise-server-q2-2026-maintenance-releases/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/mariadb-enterprise-server-q2-2026-maintenance-releases/">MariaDB Enterprise Server Q2 2026 Maintenance Releases</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Privacy-First Stack: Nextcloud, Passbolt and MariaDB Server</title>
        <link>https://mariadb.org/mariadb-privacy-first-stack-nextcloud-passbolt-and-mariadb-server/</link>
        <pubDate>Fri, 26 Jun 2026 12:37:50 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>I hear this sentence a lot: “We care about privacy.”<br />
Good.<br />
But then you look a bit closer.<br />
Files are on some cloud platform. Nobody is completely sure which settings were changed two years ago. …<br />
Continue reading "MariaDB Privacy-First Stack: Nextcloud, Passbolt and MariaDB Server"<br />
The post MariaDB Privacy-First Stack: Nextcloud, Passbolt and MariaDB Server appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/mariadb-privacy-first-stack-nextcloud-passbolt-and-mariadb-server/">MariaDB Privacy-First Stack: Nextcloud, Passbolt and MariaDB Server</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>I hear this sentence a lot: &#8220;We care about privacy.&#8221;<br />
Good.<br />
But then you look a bit closer.<br />
Files are on some cloud platform. Nobody is completely sure which settings were changed two years ago. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/mariadb-privacy-first-stack-nextcloud-passbolt-and-mariadb-server/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;MariaDB Privacy-First Stack: Nextcloud, Passbolt and MariaDB Server&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/mariadb-privacy-first-stack-nextcloud-passbolt-and-mariadb-server/">MariaDB Privacy-First Stack: Nextcloud, Passbolt and MariaDB Server</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/mariadb-privacy-first-stack-nextcloud-passbolt-and-mariadb-server/">MariaDB Privacy-First Stack: Nextcloud, Passbolt and MariaDB Server</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Why PostgreSQL needs an AI usage policy</title>
        <link>https://percona.community/blog/2026/06/26/why-postgresql-needs-an-ai-usage-policy/</link>
        <pubDate>Fri, 26 Jun 2026 08:42:27 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>We often hear that open source is about people.</p>
<p><a href="https://percona.community/blog/2026/06/26/why-postgresql-needs-an-ai-usage-policy/">Why PostgreSQL needs an AI usage policy</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>We often hear that open source is about people.</p>
<p>People who contribute their time and, in a way, parts of their lives to work on software that is available for everyone without limitations and without licensing costs.</p>
<p>The more popular a project becomes, the more often we also hear about the need for sustainable open source. Nothing surprising here. Often projects start off as “scratching ones itch” and it’s very appreciated when others notice the work done. The more time passes and the more the work becomes appreciated, the higher the chances that there will be a need to spend more time on the project.</p>
<p>When projects graduate from a hobby project to software used by thousands of users, or even a foundational building block in production, things get interesting.</p>
<p>At that point, we may hope to see new contributors joining the project. This would normally be a good thing. But is it still the same in the AI hype era, where anyone can generate almost any content and claim it as their own?</p>
<p>AI was supposed to be a killer of open source. After all, a lot of publicly available code from open source communities was part of what AI systems trained on. The fear was that as it would become so easy to create our own software, there would not be as much need for the existing open source projects. While this was the hype speaking, we can notice another trend. It became much easier to propose patches, detect and report security threats, or submit code reviews. Even without any developer experience or coding capabilities.</p>
<h3 id="how-sustainable-is-that-for-the-human-maintainers">How sustainable is that for the human maintainers?</h3>
<p>It is easy to imagine that there is a very fine line between positively helpful and overwhelming. As with anything unwanted, AI-generated code or text can be harmful to many open source projects. Especially those with a single maintainer treating their project as a spare time hobby and suddenly experiencing a waterfall of <a href="https://en.wikipedia.org/wiki/AI_slop" target="_blank" rel="noopener noreferrer">AI-slop</a>.</p>
<p><figure><img decoding="async" src="https://percona.community/blog/2026/06/Jan-ps3.png" alt="RPCS3 plead to vibe coders social media post" /></figure>
</p>
<p><a href="https://github.com/RPCS3/rpcs3" target="_blank" rel="noopener noreferrer">Playstation 3 emulator project</a> recently <a href="https://x.com/rpcs3/status/2053248922974605431?lang=en" target="_blank" rel="noopener noreferrer">RPCS3 posted a plea</a> to the vibe coders to stop the AI-generated abuse already and they are not alone in this problem.</p>
<p><figure>
<img decoding="async" src="https://percona.community/blog/2026/06/Jan-fosdem-curl.png" alt="FOSDEM 2026 Daniel Stenberg presentation" /></figure>
</p>
<p>Daniel Stenberg from the <a href="https://curl.se/" target="_blank" rel="noopener noreferrer">curl project</a> captured this well in <a href="https://fosdem.org/2026/schedule/event/B7YKQ7-oss-in-spite-of-ai/" target="_blank" rel="noopener noreferrer">his FOSDEM 2026 talk</a> summarizing that: “AI gives us the worst and the best, simultaneously.”</p>
<p>In the same talk, he discussed how curl had to stop its bug bounty program. Curl has also posted on the <a href="https://curl.se/dev/contribute.html#on-ai-use-in-curl" target="_blank" rel="noopener noreferrer">rules of AI use</a>. Even that was not enough, which led to the “<a href="https://daniel.haxx.se/blog/2026/06/15/curl-summer-of-bliss/" target="_blank" rel="noopener noreferrer">curl summer of bliss</a>”, where they will:</p>
<blockquote>
<p>not accept or otherwise handle any vulnerability reports during the month of July 2026.</p>
</blockquote>
<p>Security reports are an especially sensitive case. An AI-generated vulnerability report is not harmless. Someone has to read it, reproduce it, evaluate it and decide whether it is real. Even when the issue is not there, the work is still very real. Like it or not but when it’s unfounded work that proves a ai-generated false it is abusive.</p>
<p>Knowing that some projects adopt AI-focused policies, I searched for examples of such policies, using AI obviously <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" />, and stumbled upon <a href="https://github.com/melissawm/open-source-ai-contribution-policies" target="_blank" rel="noopener noreferrer">a very useful (open source!) list that already gathers this kind of information</a>.</p>
<p>Further analysis of the resources linked in the list, as of June 2026, shows that most policies allow assisted use, but not “AI as the contributor.”</p>
<p>Commonly allowed uses include:</p>
<ul>
<li>drafting code,</li>
<li>generating tests,</li>
<li>improving docs,</li>
<li>debugging,</li>
<li>summarizing, or asking an LLM for help.</li>
</ul>
<p>All of that is usually acceptable as long as the human reviews and owns the result.</p>
<p>Typically banned practices include:</p>
<ul>
<li>fully AI-generated PRs with little human engagement</li>
<li>AI-generated “good first issue” work</li>
<li>AI as co-author</li>
<li>automated AI code reviews</li>
<li>unreviewed agentic output</li>
</ul>
<p>It is completely understandable that experienced developers and communities say “no” to submissions of low quality. That would not be sustainable. Maintainers already carry a lot of invisible work, and AI can easily multiply that work if contributors treat it as a shortcut instead of a tool.</p>
<p>What is very positive for the future of AI-enhanced work is that the general direction seems to be acceptance, as long as there is a human-in-the-loop.</p>
<p>AI-enhanced work, as long as a human was involved, is possible across a range of open source products: <a href="https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions" target="_blank" rel="noopener noreferrer">Apache Airflow</a>, <a href="https://datafusion.apache.org/contributor-guide/index.html#ai-assisted-contributions" target="_blank" rel="noopener noreferrer">Apache DataFusion</a>, <a href="https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code" target="_blank" rel="noopener noreferrer">Arrow</a>, <a href="https://github.com/cloudnative-pg/governance/blob/main/AI_POLICY.md" target="_blank" rel="noopener noreferrer">CloudNativePG (CNPG)</a>, <a href="https://devguide.python.org/getting-started/ai-tools/index.html" target="_blank" rel="noopener noreferrer">CPython</a>, <a href="https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/submitting-patches/#ai-assisted-contributions" target="_blank" rel="noopener noreferrer">Django</a>, <a href="https://firefox-source-docs.mozilla.org/contributing/ai-coding.html" target="_blank" rel="noopener noreferrer">Firefox</a>, <a href="https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines" target="_blank" rel="noopener noreferrer">Flutter</a>, <a href="https://github.com/ghostty-org/ghostty/blob/main/AI_POLICY.md" target="_blank" rel="noopener noreferrer">Ghostty</a>, <a href="https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md#ai-contribution-policy" target="_blank" rel="noopener noreferrer">Gitea</a>, <a href="https://github.com/Homebrew/brew/blob/main/CONTRIBUTING.md#artificial-intelligencelarge-language-model-aillm-usage" target="_blank" rel="noopener noreferrer">Homebrew</a>, <a href="https://www.kubernetes.dev/docs/guide/pull-requests/#ai-guidance" target="_blank" rel="noopener noreferrer">Kubernetes</a>, <a href="https://kernel.org/doc/html/next/process/coding-assistants.html" target="_blank" rel="noopener noreferrer">Linux Kernel</a>, <a href="https://llvm.org/docs//AIToolPolicy.html" target="_blank" rel="noopener noreferrer">LLVM</a>, <a href="https://matplotlib.org/devdocs/devel/contribute.html#generative-ai" target="_blank" rel="noopener noreferrer">Matplotlib</a>, <a href="https://numpy.org/devdocs/dev/ai_policy.html" target="_blank" rel="noopener noreferrer">NumPy</a>, <a href="https://pandas.pydata.org/docs/dev/development/contributing.html#automated-contributions-policy" target="_blank" rel="noopener noreferrer">Pandas</a>, <a href="https://github.com/pytorch/pytorch/blob/main/CONTRIBUTING.md#ai-assisted-development" target="_blank" rel="noopener noreferrer">PyTorch</a>, <a href="https://scipy.github.io/devdocs/dev/conduct/ai_policy.html" target="_blank" rel="noopener noreferrer">SciPy</a>, <a href="https://docs.sympy.org/dev/contributing/ai-generated-code-policy.html" target="_blank" rel="noopener noreferrer">SymPy</a>, <a href="https://docs.wagtail.org/en/latest/contributing/general_guidelines.html#general-coding-guidelines" target="_blank" rel="noopener noreferrer">Wagtail</a>, <a href="https://github.com/zulip/zulip/blob/main/CONTRIBUTING.md#ai-use-policy-and-guidelines" target="_blank" rel="noopener noreferrer">Zulip</a>, and <a href="https://github.com/zulip/zulip/blob/main/CONTRIBUTING.md#ai-use-policy-and-guidelines" target="_blank" rel="noopener noreferrer">others</a>.</p>
<p>What is interesting is that, at this moment, PostgreSQL does not have any official policy of this sort available.</p>
<h3 id="slonik-says-i-havent-noticed">Slonik says “I haven’t noticed…”</h3>
<p>While this may be a problem that does not directly touch PostgreSQL as a database server, it already has an impact on the PostgreSQL ecosystem, which consists of many other extensions and tools.</p>
<p>The reason may be quite trivial. Even with AI, the entry threshold for PostgreSQL core hacking is still higher than for many other tools. Hackers communicate through mailing lists, and even with the adoption of modern tools like Hackorum.dev, it is still not that easy to work with PostgreSQL compared with many other, more tempting projects.</p>
<p><figure>
<img decoding="async" src="https://percona.community/blog/2026/06/Jan-waterfall.png" alt="Beware of elephants drowning in AI slop" /></figure>
</p>
<p>The issue, as I often see it for PostgreSQL, is that there is not much leadership for the wider ecosystem from the core project. Availability of responsible AI usage policies for the ecosystem could make maintainers’ lives easier. And let’s be honest, for many smaller projects, creating such policies from scratch is a burden they could be spared.</p>
<p>Seems like any help would be appreciated.</p>
<h3 id="what-now-is-this-over-was-this-a-rant">What now? Is this over? Was this a rant?</h3>
<p>I like to say, and repeat myself, that “AI usage in open source is all about respect.” To me, this is enough to say all that is needed. People need to communicate. This was meant as a start of the discussion.</p>
<p><a href="https://2026.pgconf.eu/" target="_blank" rel="noopener noreferrer">PGConf.EU</a> is coming in October, as well as many smaller meetups this year. There will be lots of space for hallway track discussions and hopefully some outcomes. Not to mention async communication channels. What I hope is that we can leverage all these channels to propose some solutions, experiment, and get better.</p>
<p>Let this be a call to action to help us all be more reasonable and more respectful of other people’s time.</p>
<p>With this in mind,</p>
<details>
<summary>check out my original text before I refined it with AI if you want to see how it changed.</summary>
<p>Often we hear how open source is the people. The people who contribute their time, in a way their lives, to produce software available for everyone without limitations. Without licensing cost on the users.</p>
<p>The more a project becomes popular the higher chances we also hear about the need for sustainable open source from it. Nothing surprising here. At first we want others to notice the work we’ve done. The more times pass and the work becomes appreciated, the higher chances that there will be a need to spend more time on the project.</p>
<p>When it graduates from a hobby project to software used by thousands of users or even a production founding block things become really interesting. Now we may hope to see new contributors joining the project. This would normally be a good thing but is it the same in the AI hype era where anyone can generate any content and claim it their own?</p>
<p>AI was supposed to be open source killer because it will become so easy to create our own software and not use open source. While this was the hype speaking, we notice another trend. It became way easier to propose patches, detect and report security threats or submit code reviews. Even without any developer experience or any coding capabilities.</p>
<h4 id="how-sustainable-for-the-human-maintainers-is-that">How sustainable for the human maintainers is that?</h4>
<p>It’s easy to imagine that there is a very fine line between positively helpful and overwhelming. As with anything unwanted, the AI generated unwanted code or texts can be harmful to the many ope source projects. Especially those with a single maintainer treating their project as a spare time hobby and experiencing a waterfall of <a href="https://en.wikipedia.org/wiki/AI_slop" target="_blank" rel="noopener noreferrer">AI-slop</a>.</p>
<p><figure><img decoding="async" src="https://percona.community/blog/2026/06/Jan-ps3.png" alt="RPCS3 plead to vibe coders social media post" /></figure>
</p>
<p>Playstation 3 emulator RPCS3 posted a plead to the vibe coders to stop the AI-generated abuse already and they are not alone in this problem.</p>
<p><figure>
<img decoding="async" src="https://percona.community/blog/2026/06/Jan-fosdem-curl.png" alt="FOSDEM 2026 Daniel Stenberg presentation" /></figure>
</p>
<p>As Daniel Stenberg from curl says (check out his talk during FOSDEM 2026) “AI gives us the worst and the best &#8211; simultaneously”</p>
<p>Seeing that <a href="https://curl.se/" target="_blank" rel="noopener noreferrer">curl</a> had to stop their bug bounty program (as discussed in the talk above) and even this was not enough and ended up in the “<a href="https://daniel.haxx.se/blog/2026/06/15/curl-summer-of-bliss/" target="_blank" rel="noopener noreferrer">curl summer of bliss</a>” where they will:</p>
<blockquote>
<p>not accept or otherwise handle any vulnerability reports during the month of July 2026.</p>
</blockquote>
<p>Security reports are an especially sensitive case. A wrong AI-generated vulnerability report is not harmless. Someone has to read it, reproduce it, evaluate it and decide whether it is real. Even when the issue is not there, the work is still very real. Like it or not but when it’s unfounded work that proves a ai-generated false it is abusive.</p>
<p>Knowing that some projects adopt policies, I searched (using AI obviously <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" />) for examples of such policies and stumbled upon <a href="https://github.com/melissawm/open-source-ai-contribution-policies" target="_blank" rel="noopener noreferrer">a very useful list that gathers such information already</a>.</p>
<p>Further analysis of the resources linked in the list (state in June 2026) shows that:</p>
<ul>
<li>Most policies allow assisted use, not “AI as the contributor.”</li>
<li>Commonly allowed uses include drafting code, generating tests, improving docs, debugging, summarizing, or asking an LLM for help, as long as the human reviews and owns the result.</li>
<li>Typically banned practices include:
<ul>
<li>Fully AI-generated PRs with little human engagement</li>
<li>AI-generated “good first issue” work</li>
<li>AI as co-author</li>
<li>Automated AI code reviews</li>
<li>Unreviewed agentic output</li>
</ul>
</li>
</ul>
<p>It’s only understandable that experienced developers and Communities say “no” to low quality submissions. That would not be sustainable. What is very positive for the future of AI enhanced work is that the repo shows general acceptance as long as there is a “human in the loop”. AI enhanced work as long as human was involved is possible across a range of open source products: <a href="https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions" target="_blank" rel="noopener noreferrer">Apache Airflow</a>, <a href="https://datafusion.apache.org/contributor-guide/index.html#ai-assisted-contributions" target="_blank" rel="noopener noreferrer">Apache DataFusion</a>, <a href="https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code" target="_blank" rel="noopener noreferrer">Arrow</a>, <a href="https://github.com/cloudnative-pg/governance/blob/main/AI_POLICY.md" target="_blank" rel="noopener noreferrer">CloudNativePG (CNPG)</a>, <a href="https://devguide.python.org/getting-started/ai-tools/index.html" target="_blank" rel="noopener noreferrer">CPython</a>, <a href="https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/submitting-patches/#ai-assisted-contributions" target="_blank" rel="noopener noreferrer">Django</a>, <a href="https://firefox-source-docs.mozilla.org/contributing/ai-coding.html" target="_blank" rel="noopener noreferrer">Firefox</a>, <a href="https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines" target="_blank" rel="noopener noreferrer">Flutter</a>, <a href="https://github.com/ghostty-org/ghostty/blob/main/AI_POLICY.md" target="_blank" rel="noopener noreferrer">Ghostty</a>, <a href="https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md#ai-contribution-policy" target="_blank" rel="noopener noreferrer">Gitea</a>, <a href="https://github.com/Homebrew/brew/blob/main/CONTRIBUTING.md#artificial-intelligencelarge-language-model-aillm-usage" target="_blank" rel="noopener noreferrer">Homebrew</a>, <a href="https://www.kubernetes.dev/docs/guide/pull-requests/#ai-guidance" target="_blank" rel="noopener noreferrer">Kubernetes</a>, <a href="https://kernel.org/doc/html/next/process/coding-assistants.html" target="_blank" rel="noopener noreferrer">Linux Kernel</a>, <a href="https://llvm.org/docs//AIToolPolicy.html" target="_blank" rel="noopener noreferrer">LLVM</a>, <a href="https://matplotlib.org/devdocs/devel/contribute.html#generative-ai" target="_blank" rel="noopener noreferrer">Matplotlib</a>, <a href="https://numpy.org/devdocs/dev/ai_policy.html" target="_blank" rel="noopener noreferrer">NumPy</a>, <a href="https://pandas.pydata.org/docs/dev/development/contributing.html#automated-contributions-policy" target="_blank" rel="noopener noreferrer">Pandas</a>, <a href="https://github.com/pytorch/pytorch/blob/main/CONTRIBUTING.md#ai-assisted-development" target="_blank" rel="noopener noreferrer">PyTorch</a>, <a href="https://scipy.github.io/devdocs/dev/conduct/ai_policy.html" target="_blank" rel="noopener noreferrer">SciPy</a>, <a href="https://docs.sympy.org/dev/contributing/ai-generated-code-policy.html" target="_blank" rel="noopener noreferrer">SymPy</a>, <a href="https://docs.wagtail.org/en/latest/contributing/general_guidelines.html#general-coding-guidelines" target="_blank" rel="noopener noreferrer">Wagtail</a>, <a href="https://github.com/zulip/zulip/blob/main/CONTRIBUTING.md#ai-use-policy-and-guidelines" target="_blank" rel="noopener noreferrer">Zulip</a>, and <a href="https://github.com/zulip/zulip/blob/main/CONTRIBUTING.md#ai-use-policy-and-guidelines" target="_blank" rel="noopener noreferrer">others</a>.</p>
<h3 id="slonik-says-i-havent-noticed-1">Slonik says “I haven’t noticed…”</h3>
<p><figure>
<img decoding="async" src="https://percona.community/blog/2026/06/Jan-waterfall.png" alt="Beware of elephants drowning in AI slop" /></figure>
</p>
<p>What is interesting that at this moment PostgreSQL does not have any official policy of this sort available. While this may be a problem that does not touch PostgreSQL as a database server it already has an impact on the PostgreSQL ecosystem consisting of many other extensions and tools. The reason may be quite trivial &#8211; even with AI the entry threshold for PostgreSQL core hacking is still higher than any other tool. Hackers communicate via mailing lists and even with adoption of modern tools like Hackorum.dev it’s still not that easy to work with PostgreSQL comparing to a lot of other more tempting tools.</p>
<p>The issue as I often see it for PostgreSQL is that there is not much leadership for the ecosystem from the core. Availability of responsible AI usage policies for the Ecosystem could make the life of maintainers easier and let’s be honest, for a lot of smaller projects that’s a burden they could be spared. Seems like any help would be appreciated.</p>
<h4 id="what-now-is-this-over-was-this-a-rant-1">What now? Is this over? Was this a rant?</h4>
<p>I like to say, and repeat myself that “AI usage in open source is all about the respect”. To me this is enough to say all that’s needed. People need to communicate. This was meant as a start of the discussion.</p>
<p>PGConf.EU is coming in October, as well as many smaller meetups this year. Lots of space for hallway track discussion and hopefully some outcomes. Not to mention async communication channels. What I hope is we can leverage all these channels to propose some solutions, experiment and get better.</p>
<p>Let it be a call to action to help us all be more reasonable and respectful to others time.</p>
<p>With this in mind check out my original text I refined with AI if you want to see how it changed. Because of course I polished it to some extent to ensure that the grammar and phrasing is cleaner and crispier <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
</details>
<p>Because of course I polished it a little to make sure the grammar and phrasing are cleaner and crispier <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p><a href="https://percona.community/blog/2026/06/26/why-postgresql-needs-an-ai-usage-policy/">Why PostgreSQL needs an AI usage policy</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Passbolt renews its support for MariaDB Foundation</title>
        <link>https://mariadb.org/passbolt-renews-its-support-for-mariadb-foundation/</link>
        <pubDate>Thu, 25 Jun 2026 06:23:50 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB Foundation is pleased to announce that Passbolt has renewed its Silver sponsorship for another year, continuing its long-term support for the MariaDB open-source ecosystem. …<br />
Continue reading "Passbolt renews its support for MariaDB Foundation"<br />
The post Passbolt renews its support for MariaDB Foundation appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/passbolt-renews-its-support-for-mariadb-foundation/">Passbolt renews its support for MariaDB Foundation</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Foundation is pleased to announce that <a href="https://www.passbolt.com/">Passbolt</a> has renewed its <a href="https://mariadb.org/donate/#silver-tier-from-eur-5000-per-year">Silver sponsorship</a> for another year, continuing its long-term support for the MariaDB open-source ecosystem. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/passbolt-renews-its-support-for-mariadb-foundation/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;Passbolt renews its support for MariaDB Foundation&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/passbolt-renews-its-support-for-mariadb-foundation/">Passbolt renews its support for MariaDB Foundation</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/passbolt-renews-its-support-for-mariadb-foundation/">Passbolt renews its support for MariaDB Foundation</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Aqtra Joins MariaDB Foundation as a Gold Sponsor</title>
        <link>https://mariadb.org/aqtra-joins-mariadb-foundation-as-a-gold-sponsor/</link>
        <pubDate>Wed, 24 Jun 2026 08:31:00 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB Foundation is pleased to welcome Aqtra Platform as a new Gold Sponsor.<br />
Aqtra is a Development Infrastructure Layer (DIL) platform for building ERP solutions, business applications, internal and external portals, and workflows that connect multiple systems. …<br />
Continue reading "Aqtra Joins MariaDB Foundation as a Gold Sponsor"<br />
The post Aqtra Joins MariaDB Foundation as a Gold Sponsor appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/aqtra-joins-mariadb-foundation-as-a-gold-sponsor/">Aqtra Joins MariaDB Foundation as a Gold Sponsor</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Foundation is pleased to welcome <a href="http://Aqtra%20Joins%20MariaDB%20Foundation%20as%20a%20Gold%20Sponsor%20MariaDB%20Foundation%20is%20pleased%20to%20welcome%20Aqtra%20as%20a%20new%20Gold%20Sponsor.%20Aqtra%20is%20a%20Development%20Infrastructure%20Layer%20(DIL)%20platform%20for%20building%20ERP%20solutions,%20business%20applications,%20internal%20and%20external%20portals,%20and%20workflows%20that%20connect%20multiple%20systems.%20The%20platform%20provides%20the%20underlying%20architecture,%20governance,%20integration,%20and%20runtime%20capabilities%20required%20to%20develop%20and%20operate%20business%20applications%20at%20scale,%20helping%20organisations%20automate%20complex%20processes%20without%20building%20and%20maintaining%20every%20application%20from%20scratch.%20As%20part%20of%20the%20next%20stage%20of%20its%20platform%20evolution,%20Aqtra%20has%20selected%20MariaDB%20Server%20as%20the%20strategic%20database%20foundation%20for%20its%20next-generation%20architecture.%20By%20joining%20MariaDB%20Foundation%20as%20a%20Gold%20Sponsor,%20Aqtra%20is%20strengthening%20its%20connection%20with%20the%20MariaDB%20ecosystem%20and%20creating%20a%20foundation%20for%20broader%20collaboration%20around%20MariaDB-powered%20business%20automation.%20Building%20Business%20Applications%20on%20MariaDB%20Businesses%20often%20depend%20on%20many%20different%20systems%20for%20finance,%20purchasing,%20inventory,%20sales,%20reporting,%20human%20resources,%20customer%20management,%20and%20internal%20approvals.%20Connecting%20these%20systems%20can%20become%20expensive%20and%20difficult%20to%20maintain.%20Even%20a%20relatively%20simple%20business%20process%20may%20require%20data%20to%20move%20between%20several%20applications,%20with%20custom%20integrations,%20manual%20steps,%20and%20separate%20user%20interfaces.%20Aqtra%20provides%20a%20unified%20platform%20for%20building%20applications%20and%20workflows%20around%20an%20organisation%E2%80%99s%20data,%20processes,%20and%20existing%20systems.%20These%20can%20include%20ERP%20applications,%20procurement%20and%20supplier%20portals,%20CRM%20systems,%20inventory%20management,%20reporting%20solutions,%20HR%20applications,%20help%20desks,%20customer%20portals,%20and%20other%20operational%20tools.%20MariaDB%20Server%20will%20serve%20as%20the%20open%20source%20relational%20database%20foundation%20beneath%20the%20Aqtra%20platform.%20For%20the%20end%20user,%20the%20database%20may%20remain%20largely%20invisible.%20They%20interact%20with%20the%20applications,%20portals,%20reports,%20and%20workflows%20that%20help%20them%20run%20their%20business.%20Underneath%20those%20applications,%20MariaDB%20provides%20the%20data%20layer%20required%20to%20store%20and%20manage%20business%20information,%20application%20configuration,%20workflow%20state,%20and%20operational%20data.%20Aqtra%E2%80%99s%20decision%20therefore%20represents%20an%20important%20form%20of%20MariaDB%20adoption:%20MariaDB%20becomes%20part%20of%20the%20platform%20architecture%20and,%20through%20it,%20part%20of%20the%20applications%20deployed%20for%20Aqtra%20customers.%20Rather%20than%20being%20adopted%20for%20a%20single%20application,%20MariaDB%20becomes%20part%20of%20the%20underlying%20infrastructure%20used%20to%20deliver%20entire%20business%20solution%20stacks.%20As%20Aqtra%20is%20deployed%20across%20customers,%20industries,%20and%20cloud%20environments,%20MariaDB%20becomes%20a%20foundational%20component%20of%20each%20resulting%20application%20ecosystem.%20From%20Cloud%20Infrastructure%20to%20Business%20Automation%20Aqtra%20is%20designed%20to%20run%20within%20infrastructure%20selected%20by%20the%20customer%20or%20its%20service%20provider.%20This%20creates%20an%20opportunity%20for%20cloud%20providers,%20hosting%20companies,%20managed%20service%20providers,%20and%20other%20infrastructure%20partners%20to%20offer%20more%20than%20computing,%20storage,%20and%20hosting.%20Through%20Aqtra,%20infrastructure%20providers%20can%20extend%20their%20role%20beyond%20infrastructure%20delivery%20and%20offer%20a%20complete%20business%20application%20platform%20built%20on%20open%20technologies,%20with%20MariaDB%20serving%20as%20the%20core%20data%20foundation.%20A%20MariaDB-powered%20Aqtra%20deployment%20can%20enable%20providers%20to%20offer:%20ERP%20and%20business%20applications%20hosted%20within%20the%20customer%E2%80%99s%20selected%20infrastructure%20Internal,%20customer,%20supplier,%20and%20partner%20portals%20Automation%20of%20workflows%20spanning%20multiple%20systems%20Greater%20control%20over%20data%20location%20and%20deployment%20architecture%20An%20open%20source%20database%20foundation%20for%20business-critical%20applications%20A%20platform%20that%20can%20expand%20as%20the%20customer%E2%80%99s%20requirements%20grow%20This%20model%20is%20particularly%20relevant%20for%20organisations%20that%20need%20greater%20control%20over%20their%20data%20and%20infrastructure,%20including%20companies%20operating%20in%20regulated%20industries,%20public-sector%20organisations,%20and%20businesses%20looking%20for%20alternatives%20to%20fragmented%20collections%20of%20SaaS%20products.%20Expanding%20the%20MariaDB%20Ecosystem%20The%20collaboration%20between%20Aqtra%20and%20MariaDB%20Foundation%20will%20build%20on%20Aqtra%E2%80%99s%20adoption%20of%20MariaDB%20Server%20as%20a%20core%20component%20of%20its%20Development%20Infrastructure%20Layer%20architecture.%20The%20two%20organisations%20will%20explore%20opportunities%20to%20document%20the%20resulting%20architecture,%20develop%20practical%20deployment%20and%20integration%20materials,%20and%20present%20Aqtra%20as%20part%20of%20the%20broader%20ecosystem%20of%20applications%20and%20platforms%20built%20on%20MariaDB.%20The%20partnership%20will%20also%20focus%20on%20helping%20cloud%20and%20infrastructure%20providers%20understand%20how%20MariaDB%20and%20Aqtra%20can%20work%20together%20as%20a%20complete%20data%20and%20application%20platform.%20Potential%20areas%20of%20collaboration%20include:%20Technical%20and%20architectural%20content%20Deployment%20guides%20and%20reference%20architectures%20MariaDB%20Ecosystem%20Hub%20visibility%20Joint%20webinars,%20presentations,%20and%20case%20studies%20Cloud%20and%20service-provider%20deployment%20models%20Business%20automation%20and%20ERP-focused%20Solution%20Stacks%20MariaDB-powered%20ERP%20and%20business%20automation%20reference%20architectures%20Solution%20stacks%20for%20cloud%20providers%20and%20managed%20service%20providers%20Through%20these%20activities,%20Aqtra%20will%20be%20able%20to%20share%20its%20MariaDB%20experience%20with%20users,%20developers,%20and%20infrastructure%20partners,%20while%20MariaDB%20Foundation%20gains%20an%20important%20new%20application-platform%20use%20case.%20MariaDB%20Adoption%20Through%20Application%20Platforms%20MariaDB%20adoption%20often%20happens%20beneath%20the%20applications%20users%20interact%20with%20every%20day.%20A%20company%20may%20never%20make%20a%20direct%20database%20selection%20for%20every%20business%20application%20it%20uses.%20Instead,%20it%20chooses%20a%20platform,%20service,%20or%20solution%20whose%20architecture%20already%20includes%20MariaDB.%20Application%20platforms%20such%20as%20Aqtra%20can%20therefore%20play%20an%20important%20role%20in%20growing%20the%20MariaDB%20ecosystem.%20By%20embedding%20MariaDB%20into%20a%20reusable%20application%20infrastructure%20layer,%20adoption%20can%20scale%20across%20many%20applications,%20customers,%20and%20deployment%20environments%20without%20requiring%20each%20organisation%20to%20independently%20standardise%20on%20a%20database%20platform.%20As%20the%20platform%20is%20deployed%20for%20new%20customers,%20industries,%20and%20infrastructure%20environments,%20MariaDB%20becomes%20part%20of%20each%20resulting%20application%20architecture.%20%E2%80%9CAqtra%E2%80%99s%20decision%20to%20build%20its%20next%20platform%20database%20layer%20on%20MariaDB%20demonstrates%20how%20MariaDB%20can%20serve%20as%20the%20dependable%20open%20source%20foundation%20beneath%20a%20broad%20range%20of%20business%20applications.%20Aqtra%20brings%20a%20distinctive%20combination%20of%20model-driven%20development,%20ERP%20functionality,%20portals,%20and%20cross-system%20workflow%20automation,%20while%20opening%20new%20opportunities%20with%20cloud%20and%20infrastructure%20providers.%20We%20are%20delighted%20to%20welcome%20Aqtra%20as%20a%20Gold%20Sponsor%20of%20MariaDB%20Foundation.%E2%80%9D%20Anna%20Widenius%20CEO,%20MariaDB%20Foundation%20%E2%80%9CAt%20Aqtra,%20we%20are%20building%20a%20Development%20Infrastructure%20Layer%20that%20enables%20organisations,%20cloud%20providers,%20and%20service%20partners%20to%20create%20and%20operate%20business%20applications,%20ERP%20solutions,%20portals,%20and%20automation%20services%20on%20a%20common%20foundation.%20MariaDB%20stood%20out%20as%20a%20mature,%20reliable,%20and%20truly%20open%20database%20platform%20that%20aligns%20with%20our%20long-term%20architectural%20vision.%20By%20joining%20MariaDB%20Foundation%20as%20a%20Gold%20Sponsor,%20we%20are%20not%20only%20adopting%20MariaDB%20as%20a%20strategic%20technology%20component%20but%20also%20supporting%20the%20ecosystem%20that%20helps%20organisations%20build%20and%20operate%20business-critical%20applications%20on%20open%20infrastructure.%E2%80%9D%20Ilia%20Kors%20CTO%20&#038;%20Co-Founder,%20Aqtra%20Supporting%20the%20Future%20of%20MariaDB%20Server%20Aqtra%E2%80%99s%20Gold%20sponsorship%20directly%20supports%20MariaDB%20Foundation%E2%80%99s%20work%20to%20advance%20MariaDB%20Server,%20facilitate%20technical%20collaboration,%20and%20ensure%20that%20MariaDB%20remains%20open,%20accessible,%20and%20dependable%20for%20organisations%20around%20the%20world.%20It%20also%20gives%20Aqtra%20a%20closer%20connection%20with%20the%20MariaDB%20community%20as%20the%20company%20develops%20its%20MariaDB-based%20architecture%20and%20expands%20the%20platform%20across%20new%20infrastructure%20environments.%20We%20warmly%20welcome%20Aqtra%20to%20the%20MariaDB%20Foundation%20sponsor%20community%20and%20look%20forward%20to%20working%20together%20to%20expand%20the%20role%20of%20MariaDB%20in%20ERP,%20business%20automation,%20and%20cross-system%20application%20development.%20Learn%20more%20about%20Aqtra:%20https://aqtra.io/%20Learn%20more%20about%20MariaDB%20Foundation%20sponsorship:%20https://mariadb.org/donate/">Aqtra</a> Platform as a new Gold Sponsor.<br />
Aqtra is a Development Infrastructure Layer (DIL) platform for building ERP solutions, business applications, internal and external portals, and workflows that connect multiple systems. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/aqtra-joins-mariadb-foundation-as-a-gold-sponsor/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;Aqtra Joins MariaDB Foundation as a Gold Sponsor&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/aqtra-joins-mariadb-foundation-as-a-gold-sponsor/">Aqtra Joins MariaDB Foundation as a Gold Sponsor</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/aqtra-joins-mariadb-foundation-as-a-gold-sponsor/">Aqtra Joins MariaDB Foundation as a Gold Sponsor</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB 13.1 Preview: This One Is Full of Community Goodies!</title>
        <link>https://mariadb.org/mariadb-13-1-preview-this-one-is-full-of-community-goodies/</link>
        <pubDate>Tue, 23 Jun 2026 05:12:41 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>We just announced the availability of a preview of the MariaDB 13.1 series.<br />
MariaDB 13.1 is a rolling release preview, and, as usual, this is the right moment to test what is coming, give feedback, and help us polish the next MariaDB Server release. …<br />
Continue reading "MariaDB 13.1 Preview: This One Is Full of Community Goodies!"<br />
The post MariaDB 13.1 Preview: This One Is Full of Community Goodies! appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/mariadb-13-1-preview-this-one-is-full-of-community-goodies/">MariaDB 13.1 Preview: This One Is Full of Community Goodies!</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>We <a href="https://mariadb.org/mariadb-13-1-preview-available/">just announced the availability of a preview of the MariaDB 13.1</a> series.<br />
MariaDB 13.1 is a rolling release preview, and, as usual, this is the right moment to test what is coming, give feedback, and help us polish the next MariaDB Server release. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/mariadb-13-1-preview-this-one-is-full-of-community-goodies/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;MariaDB 13.1 Preview: This One Is Full of Community Goodies!&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/mariadb-13-1-preview-this-one-is-full-of-community-goodies/">MariaDB 13.1 Preview: This One Is Full of Community Goodies!</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/mariadb-13-1-preview-this-one-is-full-of-community-goodies/">MariaDB 13.1 Preview: This One Is Full of Community Goodies!</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Do not uselessly grant CREATE and ALTER TABLE</title>
        <link>https://jfg-mysql.blogspot.com/2026/06/do-not-uselessly-grant-create-and-alter-table.html</link>
        <pubDate>Sat, 20 Jun 2026 22:52:52 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://jfg-mysql.blogspot.com/">J-F Gagné&#039;s MySQL Blog</source>
        <description><![CDATA[<p>This lesson should have been learned with the CREATE TABLE of death, but it is worth a refresh.</p>
<p>Do not uselessly grant CREATE and ALTER TABLE</p>
<p>The reason I am posting this reminder is that another crashing bug related to DDL came to my attention.&#160; This bug is only fixed in a recent version of MySQL (probably not affecting 5.6 and 5.7), so if you are running the latest 8.0 or 8.4, you should</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/06/do-not-uselessly-grant-create-and-alter-table.html">Do not uselessly grant CREATE and ALTER TABLE</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>This lesson should have been learned with the CREATE TABLE of death, but it is worth a refresh.</p>
<p>Do not uselessly grant CREATE and ALTER TABLE</p>
<p>The reason I am posting this reminder is that another crashing bug related to DDL came to my attention.&amp;nbsp; This bug is only fixed in a recent version of MySQL (probably not affecting 5.6 and 5.7), so if you are running the latest 8.0 or 8.4, you should</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/06/do-not-uselessly-grant-create-and-alter-table.html">Do not uselessly grant CREATE and ALTER TABLE</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB 13.1 preview available</title>
        <link>https://mariadb.org/mariadb-13-1-preview-available/</link>
        <pubDate>Sat, 20 Jun 2026 20:24:51 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>We are pleased to announce the availability of a preview of the MariaDB 13.1 series. MariaDB 13.1 will be a rolling release. …<br />
Continue reading "MariaDB 13.1 preview available"<br />
The post MariaDB 13.1 preview available appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/mariadb-13-1-preview-available/">MariaDB 13.1 preview available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>We are pleased to announce the availability of a preview of the <a href="https://mariadb.com/docs/release-notes/community-server/13.1/mariadb-13.1-changes-and-improvements" target="_blank" rel="noreferrer noopener">MariaDB 13.1</a> series. MariaDB 13.1 will be a <a href="https://mariadb.com/kb/en/mariadb-release-model/" target="_blank" rel="noreferrer noopener">rolling release</a>. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/mariadb-13-1-preview-available/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;MariaDB 13.1 preview available&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/mariadb-13-1-preview-available/">MariaDB 13.1 preview available</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/mariadb-13-1-preview-available/">MariaDB 13.1 preview available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>CPU-bound sysbench on a large server: Postgres 12 to 19 beta1</title>
        <link>https://smalldatum.blogspot.com/2026/06/cpu-bound-sysbench-on-large-server.html</link>
        <pubDate>Sat, 20 Jun 2026 00:18:58 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://smalldatum.blogspot.com/">Small Datum</source>
        <description><![CDATA[<p>This has results from sysbench on a small server with Postgres versions 12 through 19 beta1. Sysbench is run with high concurrency (40 connections) and a cached database. The purpose is to search for changes in performance.Postgres remains boring, it is hard to find performance regressions.tl;dr for Postgres 17 to 19there are no regressionsthroughput on the read-only-count test improves by ~3X in 19 beta1 thanks to a better query plantl;dr for Postgres 12 to 19there are few regressions, throughput might have dropped by up to 5% on a few range query teststhere are a few large improvements for read-only teststhere are many large improvements for write-heavy testsBuilds, configuration and hardwareI compiled Postgres from source for versions 12.22, 13.23, 14.23, 15.18, 16.14, 17.10, 18.4 and 19 beta1.I used a 48-core server from Hetzneran ax162s with an AMD EPYC 9454P 48-Core Processor with SMT disabled2 Intel D7-P5520 NVMe storage devices with RAID 1 (3.8T each) using ext4128G RAMUbuntu 24.04Configuration files for Postgres:the config file is named conf.diff.cx10a_c32r128 (x10a_c32r128) and is here for versions 12, 13, 14, 15, 16 and 17.for Postgres 18 and 19 I used conf.diff.cx10b_c32r128 (x10b_c32r128) which is as close as possible to the Postgres 17 config and uses io_method=syncBenchmarkI used sysbench and my usage is explained here. I now run 32 of the 42 microbenchmarks listed in that blog post. Most test only one type of SQL statement. Benchmarks are run with the database cached by Postgres.The read-heavy microbenchmarks are run for 600 seconds and the write-heavy for 1200 seconds. The benchmark is run with 40 clients and 8 tables with 10M rows per table. The database is cached.The purpose is to search for regressions from new CPU overhead and mutex contention. I use the small server with low concurrency to find regressions from new CPU overheads and then larger servers with high concurrency to find regressions from new CPU overheads and mutex contention.The tests can be called microbenchmarks. They are very synthetic. But microbenchmarks also make it easy to understand which types of SQL statements have great or lousy performance. Performance testing benefits from a variety of workloads -- both more and less synthetic.ResultsThe microbenchmarks are split into 4 groups -- 1 for point queries, 2 for range queries, 1 for writes. For the range query microbenchmarks, part 1 has queries that don't do aggregation while part 2 has queries that do aggregation. I provide charts below with relative QPS (rQPS). The relative QPS is the following:(QPS for some version) / (QPS for base version)When the relative QPS is > 1 then some version is faster than base version.  When it is < 1 then there might be a regression. Values from iostat and vmstat divided by QPS are also provided here. These can help to explain why something is faster or slower because it shows how much HW is used per request.Here, base version is either Postgres 12.23 or 17.10 and some version is a more recent version. I use 12.23 as the base version to identify regressions over a long period of time. And then I use 17.10 as the base version to confirm there aren't recent, large regressions.I describe performance changes (changes to relative QPS) in terms of basis points. Performance changes by one basis point when the difference in rQPS is 0.01. When rQPS decreases from 0.95 to 0.85 then it changed by 10 basis points.Results: point queries, version 17 to 19Summary:there are no regressinsRelative to: PG 17.10col-1 : PG 18.4col-2 : PG 19 beta1col-1   col-21.00    0.99    hot-points1.01    1.01    point-query1.00    1.00    points-covered-pk0.98    0.99    points-covered-si1.01    1.00    points-notcovered-pk1.00    1.00    points-notcovered-si1.01    1.01    random-points_range=101.02    1.00    random-points_range=1001.00    1.00    random-points_range=1000Results: point queries, version 12 to 19Summarythere are no regressionsthroughput for the hot-points test improves by ~2X in versions 17.10, 18.4 and 19betaRelative to: PG 12.22col-1 : PG 13.23col-2 : PG 14.23col-3 : PG 15.18col-4 : PG 16.14col-5 : PG 17.10col-6 : PG 18.4col-7 : PG 19 beta1col-1   col-2   col-3   col-4   col-5   col-6   col-71.00    0.90    0.97    1.03    2.34    2.35    2.31    hot-points1.00    1.01    1.03    1.04    1.03    1.04    1.03    point-query1.02    1.04    1.04    1.07    1.04    1.04    1.04    points-covered-pk1.01    1.07    1.04    1.04    1.04    1.03    1.04    points-covered-si0.98    1.01    1.03    1.02    1.00    1.01    1.00    points-notcovered-pk0.99    1.03    1.03    1.01    1.02    1.02    1.01    points-notcovered-si0.99    1.01    1.03    1.03    1.00    1.01    1.01    random-points_range=100.99    1.02    1.04    1.04    1.01    1.03    1.01    random-points_range=1001.00    1.02    1.02    1.03    1.01    1.02    1.01    random-points_range=1000Results: range queries without aggregation, version 17 to 19Summarythere are no regressionswhile 19 beta1 has a better result on the scan test, that test has more variance with Postgres so I am reluctant to judge this without more resultsRelative to: PG 17.10col-1 : PG 18.4col-2 : PG 19 beta1col-1   col-20.98    0.99    range-covered-pk0.97    0.99    range-covered-si0.99    0.99    range-notcovered-pk1.02    1.01    range-notcovered-si0.96    1.07    scanResults: range queries without aggregation, version 12 to 19Summarythere are no regressionsscan throughput has improved a lot from version 12 to 19Relative to: PG 12.22col-1 : PG 13.23col-2 : PG 14.23col-3 : PG 15.18col-4 : PG 16.14col-5 : PG 17.10col-6 : PG 18.4col-7 : PG 19 beta1col-1   col-2   col-3   col-4   col-5   col-6   col-70.99    1.03    1.04    1.04    1.03    1.00    1.02    range-covered-pk0.99    1.04    1.04    1.04    1.03    1.00    1.03    range-covered-si1.00    1.00    1.00    0.99    1.00    0.99    0.99    range-notcovered-pk1.00    1.01    1.01    0.99    1.00    1.02    1.01    range-notcovered-si1.09    1.27    1.10    1.21    1.19    1.14    1.28    scanResults: range queries with aggregation, version 17 to 19Summarythere are no regressionsthroughput on the read-only-count test is ~3X better thanks to a new query plan. This improvement was also visible on my small serverRelative to: PG 17.10col-1 : PG 18.4col-2 : PG 19 beta1col-1   col-21.03    3.30    read-only-count1.02    0.99    read-only-distinct1.00    0.97    read-only-order0.99    0.99    read-only_range=100.99    0.99    read-only_range=1001.01    1.00    read-only_range=100001.03    1.01    read-only-simple1.03    1.01    read-only-sumResults: range queries with aggregation, version 12 to 19Summarythere might be a few small regressions, but losing 5% throughput from version 12 to 19 isn't a big dealthroughput on the read-only-count test is ~3X better thanks to a new query plan. This improvement was also visible on my small serverRelative to: PG 12.22col-1 : PG 13.23col-2 : PG 14.23col-3 : PG 15.18col-4 : PG 16.14col-5 : PG 17.10col-6 : PG 18.4col-7 : PG 19 beta1col-1   col-2   col-3   col-4   col-5   col-6   col-71.01    0.95    0.96    0.97    0.93    0.95    3.06    read-only-count1.00    0.98    0.98    0.98    0.96    0.98    0.95    read-only-distinct1.00    0.98    0.98    1.00    0.99    0.99    0.97    read-only-order0.99    1.00    1.01    1.00    1.01    0.99    1.00    read-only_range=100.99    1.00    1.00    1.00    1.01    1.00    0.99    read-only_range=1001.00    0.97    1.02    1.03    1.04    1.05    1.03    read-only_range=100001.00    0.97    0.99    0.97    0.95    0.98    0.96    read-only-simple1.00    0.96    0.97    0.97    0.94    0.97    0.95    read-only-sumResults: writes, version 17 to 19Summarythere are no regressionsRelative to: PG 17.10col-1 : PG 18.4col-2 : PG 19 beta1col-1   col-20.99    0.99    delete1.02    1.02    insert1.00    0.98    read-write_range=100.99    0.99    read-write_range=1001.01    1.03    update-index1.01    0.98    update-inlist0.98    1.01    update-nonindex1.01    1.03    update-one1.00    1.00    update-zipf0.97    0.99    write-onlyResults: writes, version 12 to 19Summarythere are no regressionsmany large improvements arrived in version 17 and remain in 19 beta1Relative to: PG 12.22col-1 : PG 13.23col-2 : PG 14.23col-3 : PG 15.18col-4 : PG 16.14col-5 : PG 17.10col-6 : PG 18.4col-7 : PG 19 beta1col-1   col-2   col-3   col-4   col-5   col-6   col-70.99    1.11    1.13    1.10    1.28    1.27    1.27    delete1.02    1.17    1.16    1.19    1.23    1.25    1.25    insert1.00    1.20    1.22    1.20    1.24    1.24    1.22    read-write_range=100.99    1.04    1.05    1.04    1.06    1.05    1.04    read-write_range=1000.98    1.08    1.05    0.94    1.84    1.85    1.90    update-index1.00    1.07    1.06    1.05    1.12    1.13    1.10    update-inlist1.01    1.07    1.07    0.86    1.87    1.84    1.88    update-nonindex1.04    0.96    0.96    1.10    1.39    1.41    1.43    update-one1.01    1.05    1.07    0.96    1.63    1.62    1.63    update-zipf0.99    1.11    1.13    1.09    1.41    1.37    1.40    write-only
</p>
<p><a href="https://smalldatum.blogspot.com/2026/06/cpu-bound-sysbench-on-large-server.html">CPU-bound sysbench on a large server: Postgres 12 to 19 beta1</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>This has results from sysbench on a small server with Postgres versions 12 through 19 beta1. Sysbench is run with high concurrency (40 connections) and a cached database. The purpose is to search for changes in performance.</p>
<p>Postgres remains boring, it is hard to find performance regressions.</p>
<p>tl;dr for Postgres 17 to 19</p>
</p>
<ul style="text-align: left">
<li>there are no regressions</li>
<li>throughput on the read-only-count test improves by ~3X in 19 beta1 thanks to a better query plan</li>
</ul>
<div>
<p>tl;dr for Postgres 12 to 19</p>
</p>
<ul>
<li>there are few regressions, throughput might have dropped by up to 5% on a few range query tests</li>
<li>there are a few large improvements for read-only tests</li>
<li>there are many large improvements for write-heavy tests</li>
</ul>
</div>
<div>
<div>
<div>
<div style="background-color: white"><b>Builds, configuration and hardware</b></div>
<div style="background-color: white">
<div>I compiled Postgres from source for versions 12.22, 13.23, 14.23, 15.18, 16.14, 17.10, 18.4 and 19 beta1.</div>
<div></div>
<div><span style="font-family: inherit">I used a 48-core server from Hetzner</span></div>
<div>
<ul>
<li>an ax162s with an AMD EPYC 9454P 48-Core Processor with SMT disabled</li>
<li>2 Intel D7-P5520 NVMe storage devices with RAID 1 (3.8T each) using ext4</li>
<li>128G RAM</li>
<li>Ubuntu 24.04</li>
</ul>
<div>
<div><span style="font-family: inherit">Configuration files for Postgres:</span></div>
<div>
<ul>
<li><span style="font-family: inherit">the config file is named conf.diff.cx10a_c32r128 (x10a_c32r128) and is here for versions </span><a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/pg1219_o2nofp/conf.diff.cx10a_c32r128">12</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/pg1315_o2nofp/conf.diff.cx10a_c32r128">13</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/pg1412_o2nofp/conf.diff.cx10a_c32r128">14</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/pg157_o2nofp/conf.diff.cx10a_c32r128">15</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/pg163_o2nofp/conf.diff.cx10a_c32r128">16</a> and <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/pg17beta1_o2nofp/conf.diff.cx10a_c32r128">17</a>.</li>
<li>for Postgres 18 and 19 I used <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/pg18beta3_o2nofp/conf.diff.cx10b_c32r128" style="font-family: inherit">conf.diff.cx10b_c32r128</a><span style="font-family: inherit"> </span><span style="font-family: inherit">(x10b_c32r128) which is as close as possible to the Postgres 17 config and </span>uses io_method=sync</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div><b>Benchmark</b></div>
<div>
<div></div>
<div>I used sysbench and my usage is <a href="http://smalldatum.blogspot.com/2017/02/using-modern-sysbench-to-compare.html">explained here</a>. I now run 32 of the 42 microbenchmarks listed in that blog post. Most test only one type of SQL statement. Benchmarks are run with the database cached by Postgres.</div>
<div>The read-heavy microbenchmarks are run for 600 seconds and the write-heavy for 1200 seconds. The benchmark is run with 40 clients and 8 tables with 10M rows per table. The database is cached.</div>
</div>
</div>
<div></div>
<div>The purpose is to search for regressions from new CPU overhead and mutex contention. I use the small server with low concurrency to find regressions from new CPU overheads and then larger servers with high concurrency to find regressions from new CPU overheads and mutex contention.</div>
</div>
<div>
<div></div>
<div>The tests can be called microbenchmarks. They are very synthetic. But microbenchmarks also make it easy to understand which types of SQL statements have great or lousy performance. Performance testing benefits from a variety of workloads &#8212; both more and less synthetic.</div>
<div></div>
<div>
<div style="font-family: inherit"><b>Results</b></div>
<div><span></p>
<div style="font-family: inherit"></div>
<div style="font-family: inherit"><span style="font-family: inherit">The microbenchmarks are split into 4 groups &#8212; 1 for point queries, 2 for range queries, 1 for writes. For the range query microbenchmarks, part 1 has queries that don&#8217;t do aggregation while part 2 has queries that do aggregation.&nbsp;</span></div>
<div style="font-family: inherit">I provide charts below with relative QPS (rQPS). The relative QPS is the following:</div>
<div style="font-family: inherit">
<div></div>
<blockquote><p>(QPS for some version) / (QPS for base version)</p></blockquote>
</div>
<div><span style="font-family: inherit">When the relative QPS is &gt; 1 then </span><i style="font-family: inherit">some version</i><span style="font-family: inherit"> is faster than </span><i style="font-family: inherit">base version</i><span style="font-family: inherit">.&nbsp; When it is &lt; 1 then there might be a regression. </span><span><span style="font-family: inherit">Values from iostat and vmstat divided by QPS are also </span><a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/aug25.sb.mem.in.1u.50m.600s.900s.pn53/o.met.all" style="font-family: inherit">provided here</a><span style="font-family: inherit">. These can help to explain why something is faster or slower because it shows how much HW is used per request.</span></span></div>
<div><span><br /></span></div>
<div><span>Here, <i>base version</i> is either Postgres 12.23 or 17.10 and <i>some version</i> is a more recent version. I use 12.23 as the base version to identify regressions over a long period of time. And then I use 17.10 as the base version to confirm there aren&#8217;t recent, large regressions.</p>
<p><span>I describe performance changes (changes to relative QPS) in terms of basis points. Performance changes by one </span><i style="font-family: inherit"><b>basis point</b></i><span> when the difference in rQPS is 0.01. When rQPS decreases from 0.95 to 0.85 then it changed by 10 basis points.</span></span></div>
<div><span><span><br /></span></span></div>
<div><b>Results: point queries, version 17 to 19</b></div>
<div><span><span><br /></span></span></div>
<div><span><span>Summary:</span></span></div>
<div>
<ul style="text-align: left">
<li><span><span>there are no regressins</span></span></li>
</ul>
</div>
<div><span style="font-family: courier;font-size: small">Relative to: PG 17.10</span></div>
<div><span><span style="font-family: courier;font-size: x-small"></p>
<div>col-1 : PG 18.4</div>
<div>col-2 : PG 19 beta1</div>
<div></div>
<div>
<div>col-1&nbsp; &nbsp;col-2</div>
<div>1.00&nbsp; &nbsp; 0.99&nbsp; &nbsp; hot-points</div>
<div>1.01&nbsp; &nbsp; 1.01&nbsp; &nbsp; point-query</div>
<div>1.00&nbsp; &nbsp; 1.00&nbsp; &nbsp; points-covered-pk</div>
<div>0.98&nbsp; &nbsp; 0.99&nbsp; &nbsp; points-covered-si</div>
<div>1.01&nbsp; &nbsp; 1.00&nbsp; &nbsp; points-notcovered-pk</div>
<div>1.00&nbsp; &nbsp; 1.00&nbsp; &nbsp; points-notcovered-si</div>
<div>1.01&nbsp; &nbsp; 1.01&nbsp; &nbsp; random-points_range=10</div>
<div>1.02&nbsp; &nbsp; 1.00&nbsp; &nbsp; random-points_range=100</div>
<div>1.00&nbsp; &nbsp; 1.00&nbsp; &nbsp; random-points_range=1000</div>
</div>
<p></span></span></div>
<div><span><span><br /></span></span></div>
<div><span><span><b>Results: point queries, version 12 to 19</b></span></span></div>
<div><span><span><b><br /></b></span></span></div>
<div>Summary</div>
<div>
<ul style="text-align: left">
<li>there are no regressions</li>
<li>throughput for the hot-points test improves by ~2X in versions 17.10, 18.4 and 19beta</li>
</ul>
</div>
<div><span style="font-family: courier;font-size: small">Relative to: PG 12.22</span></div>
<div><span><span style="font-family: courier;font-size: x-small"></p>
<div>col-1 : PG 13.23</div>
<div>col-2 : PG 14.23</div>
<div>col-3 : PG 15.18</div>
<div>col-4 : PG 16.14</div>
<div>col-5 : PG 17.10</div>
<div>col-6 : PG 18.4</div>
<div>col-7 : PG 19 beta1</div>
<p></span></span></div>
<div><span><span style="font-family: courier;font-size: x-small"><br /></span></span></div>
<div><span><span></p>
<div><span style="font-family: courier;font-size: x-small">col-1&nbsp; &nbsp;col-2&nbsp; &nbsp;col-3&nbsp; &nbsp;col-4&nbsp; &nbsp;col-5&nbsp; &nbsp;col-6&nbsp; &nbsp;col-7</span></div>
<div><span style="font-family: courier;font-size: x-small">1.00&nbsp; &nbsp; 0.90&nbsp; &nbsp; 0.97&nbsp; &nbsp; 1.03&nbsp; &nbsp; <span style="background-color: #d9ead3">2.34</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">2.35</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">2.31</span>&nbsp; &nbsp; hot-points</span></div>
<div><span style="font-family: courier;font-size: x-small">1.00&nbsp; &nbsp; 1.01&nbsp; &nbsp; 1.03&nbsp; &nbsp; 1.04&nbsp; &nbsp; 1.03&nbsp; &nbsp; 1.04&nbsp; &nbsp; 1.03&nbsp; &nbsp; point-query</span></div>
<div><span style="font-family: courier;font-size: x-small">1.02&nbsp; &nbsp; 1.04&nbsp; &nbsp; 1.04&nbsp; &nbsp; 1.07&nbsp; &nbsp; 1.04&nbsp; &nbsp; 1.04&nbsp; &nbsp; 1.04&nbsp; &nbsp; points-covered-pk</span></div>
<div><span style="font-family: courier;font-size: x-small">1.01&nbsp; &nbsp; 1.07&nbsp; &nbsp; 1.04&nbsp; &nbsp; 1.04&nbsp; &nbsp; 1.04&nbsp; &nbsp; 1.03&nbsp; &nbsp; 1.04&nbsp; &nbsp; points-covered-si</span></div>
<div><span style="font-family: courier;font-size: x-small">0.98&nbsp; &nbsp; 1.01&nbsp; &nbsp; 1.03&nbsp; &nbsp; 1.02&nbsp; &nbsp; 1.00&nbsp; &nbsp; 1.01&nbsp; &nbsp; 1.00&nbsp; &nbsp; points-notcovered-pk</span></div>
<div><span style="font-family: courier;font-size: x-small">0.99&nbsp; &nbsp; 1.03&nbsp; &nbsp; 1.03&nbsp; &nbsp; 1.01&nbsp; &nbsp; 1.02&nbsp; &nbsp; 1.02&nbsp; &nbsp; 1.01&nbsp; &nbsp; points-notcovered-si</span></div>
<div><span style="font-family: courier;font-size: x-small">0.99&nbsp; &nbsp; 1.01&nbsp; &nbsp; 1.03&nbsp; &nbsp; 1.03&nbsp; &nbsp; 1.00&nbsp; &nbsp; 1.01&nbsp; &nbsp; 1.01&nbsp; &nbsp; random-points_range=10</span></div>
<div><span style="font-family: courier;font-size: x-small">0.99&nbsp; &nbsp; 1.02&nbsp; &nbsp; 1.04&nbsp; &nbsp; 1.04&nbsp; &nbsp; 1.01&nbsp; &nbsp; 1.03&nbsp; &nbsp; 1.01&nbsp; &nbsp; random-points_range=100</span></div>
<div><span style="font-family: courier;font-size: x-small">1.00&nbsp; &nbsp; 1.02&nbsp; &nbsp; 1.02&nbsp; &nbsp; 1.03&nbsp; &nbsp; 1.01&nbsp; &nbsp; 1.02&nbsp; &nbsp; 1.01&nbsp; &nbsp; random-points_range=1000</span></div>
<p></span></span></div>
<p></span></div>
</div>
<div><br style="background-color: white" /></div>
</div>
<div>
<div><span><b>Results: range queries without aggregation, version 17 to 19</b></span></div>
<div><span><br /></span></div>
<div>
<div>Summary</div>
<div>
<ul>
<li>there are no regressions</li>
<li>while 19 beta1 has a better result on the scan test, that test has more variance with Postgres so I am reluctant to judge this without more results</li>
</ul>
</div>
</div>
</div>
<div><span style="font-family: courier;font-size: small">Relative to: PG 17.10</span></div>
<div><span style="font-family: courier;font-size: x-small"></p>
<div>col-1 : PG 18.4</div>
<div>col-2 : PG 19 beta1</div>
<p></span></div>
<div><span style="font-family: courier;font-size: x-small"><br /></span></div>
<div><span></p>
<div>
<div><span style="font-family: courier;font-size: x-small">col-1&nbsp; &nbsp;col-2</span></div>
<div><span style="font-family: courier;font-size: x-small">0.98&nbsp; &nbsp; 0.99&nbsp; &nbsp; range-covered-pk</span></div>
<div><span style="font-family: courier;font-size: x-small">0.97&nbsp; &nbsp; 0.99&nbsp; &nbsp; range-covered-si</span></div>
<div><span style="font-family: courier;font-size: x-small">0.99&nbsp; &nbsp; 0.99&nbsp; &nbsp; range-notcovered-pk</span></div>
<div><span style="font-family: courier;font-size: x-small">1.02&nbsp; &nbsp; 1.01&nbsp; &nbsp; range-notcovered-si</span></div>
<div><span style="font-family: courier;font-size: x-small">0.96&nbsp; &nbsp; <span style="background-color: #d9ead3">1.07</span>&nbsp; &nbsp; scan</span></div>
</div>
<p></span></div>
<div><span></p>
<div><span><span><br /></span></span></div>
<div><span><span><b>Results: range queries without aggregation, version 12 to 19</b></span></span></div>
<div><span><span><br /></span></span></div>
<div>Summary</div>
<div>
<ul style="text-align: left">
<li>there are no regressions</li>
<li>scan throughput has improved a lot from version 12 to 19</li>
</ul>
</div>
<div><span style="font-family: courier;font-size: small">Relative to: PG 12.22</span></div>
<div><span><span style="font-family: courier;font-size: x-small"></p>
<div>col-1 : PG 13.23</div>
<div>col-2 : PG 14.23</div>
<div>col-3 : PG 15.18</div>
<div>col-4 : PG 16.14</div>
<div>col-5 : PG 17.10</div>
<div>col-6 : PG 18.4</div>
<div>col-7 : PG 19 beta1</div>
<div></div>
<p></span></span></div>
<div><span><span style="font-family: courier;font-size: x-small"></p>
<div>col-1&nbsp; &nbsp;col-2&nbsp; &nbsp;col-3&nbsp; &nbsp;col-4&nbsp; &nbsp;col-5&nbsp; &nbsp;col-6&nbsp; &nbsp;col-7</div>
<div>0.99&nbsp; &nbsp; 1.03&nbsp; &nbsp; 1.04&nbsp; &nbsp; 1.04&nbsp; &nbsp; 1.03&nbsp; &nbsp; 1.00&nbsp; &nbsp; 1.02&nbsp; &nbsp; range-covered-pk</div>
<div>0.99&nbsp; &nbsp; 1.04&nbsp; &nbsp; 1.04&nbsp; &nbsp; 1.04&nbsp; &nbsp; 1.03&nbsp; &nbsp; 1.00&nbsp; &nbsp; 1.03&nbsp; &nbsp; range-covered-si</div>
<div>1.00&nbsp; &nbsp; 1.00&nbsp; &nbsp; 1.00&nbsp; &nbsp; 0.99&nbsp; &nbsp; 1.00&nbsp; &nbsp; 0.99&nbsp; &nbsp; 0.99&nbsp; &nbsp; range-notcovered-pk</div>
<div>1.00&nbsp; &nbsp; 1.01&nbsp; &nbsp; 1.01&nbsp; &nbsp; 0.99&nbsp; &nbsp; 1.00&nbsp; &nbsp; 1.02&nbsp; &nbsp; 1.01&nbsp; &nbsp; range-notcovered-si</div>
<div><span style="background-color: #d9ead3">1.09</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.27</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.10</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.21</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.19</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.14</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.28</span>&nbsp; &nbsp; scan</div>
<p></span></span></div>
<p></span></div>
<div><span></p>
<div></div>
<div><span><span><b>Results: range queries with aggregation, version 17 to 19</b></span></span></div>
<div><span><span><br /></span></span></div>
<div>Summary</div>
<div>
<ul style="text-align: left">
<li>there are no regressions</li>
<li>throughput on the read-only-count test is ~3X better thanks to a new query plan. This improvement <a href="https://smalldatum.blogspot.com/2026/06/postgres-19-beta1-vs-sysbench-on-small.html">was also visible</a> on my small server</li>
</ul>
</div>
<div><span style="font-family: courier;font-size: small">Relative to: PG 17.10</span></div>
<div><span><span style="font-family: courier;font-size: x-small"></p>
<div>col-1 : PG 18.4</div>
<div>col-2 : PG 19 beta1</div>
<div></div>
<div>
<div>col-1&nbsp; &nbsp;col-2</div>
<div>1.03&nbsp; &nbsp; <span style="background-color: #d9ead3">3.30</span>&nbsp; &nbsp; read-only-count</div>
<div>1.02&nbsp; &nbsp; 0.99&nbsp; &nbsp; read-only-distinct</div>
<div>1.00&nbsp; &nbsp; 0.97&nbsp; &nbsp; read-only-order</div>
<div>0.99&nbsp; &nbsp; 0.99&nbsp; &nbsp; read-only_range=10</div>
<div>0.99&nbsp; &nbsp; 0.99&nbsp; &nbsp; read-only_range=100</div>
<div>1.01&nbsp; &nbsp; 1.00&nbsp; &nbsp; read-only_range=10000</div>
<div>1.03&nbsp; &nbsp; 1.01&nbsp; &nbsp; read-only-simple</div>
<div>1.03&nbsp; &nbsp; 1.01&nbsp; &nbsp; read-only-sum</div>
</div>
<p></span></span></div>
<div><span><span></p>
<div><span><span><br /></span></span></div>
<div><span><span><b>Results: range queries with aggregation, version 12 to 19</b></span></span></div>
<div><span><span><br /></span></span></div>
<div><span><span></p>
<div>Summary</div>
<div>
<ul style="text-align: left">
<li>there might be a few small regressions, but losing 5% throughput from version 12 to 19 isn&#8217;t a big deal</li>
<li>throughput on the read-only-count test is ~3X better thanks to a new query plan. This improvement <a href="https://smalldatum.blogspot.com/2026/06/postgres-19-beta1-vs-sysbench-on-small.html">was also visible</a> on my small server</li>
</ul>
</div>
<div><span style="font-family: courier;font-size: small">Relative to: PG 12.22</span></div>
<div><span style="font-family: courier;font-size: x-small">col-1 : PG 13.23</span></div>
<div><span style="font-family: courier;font-size: x-small">col-2 : PG 14.23</span></div>
<div><span style="font-family: courier;font-size: x-small">col-3 : PG 15.18</span></div>
<div><span style="font-family: courier;font-size: x-small">col-4 : PG 16.14</span></div>
<div><span style="font-family: courier;font-size: x-small">col-5 : PG 17.10</span></div>
<div><span style="font-family: courier;font-size: x-small">col-6 : PG 18.4</span></div>
<div><span style="font-family: courier;font-size: x-small">col-7 : PG 19 beta1</span></div>
<div><span style="font-family: courier;font-size: x-small"><br /></span></div>
<p></span></span></div>
<div><span><span style="font-family: courier;font-size: x-small"></p>
<div>col-1&nbsp; &nbsp;col-2&nbsp; &nbsp;col-3&nbsp; &nbsp;col-4&nbsp; &nbsp;col-5&nbsp; &nbsp;col-6&nbsp; &nbsp;col-7</div>
<div>1.01&nbsp; &nbsp; 0.95&nbsp; &nbsp; 0.96&nbsp; &nbsp; 0.97&nbsp; &nbsp; 0.93&nbsp; &nbsp; 0.95&nbsp; &nbsp; <span style="background-color: #d9ead3">3.06</span>&nbsp; &nbsp; read-only-count</div>
<div>1.00&nbsp; &nbsp; 0.98&nbsp; &nbsp; 0.98&nbsp; &nbsp; 0.98&nbsp; &nbsp; 0.96&nbsp; &nbsp; 0.98&nbsp; &nbsp; <span style="background-color: #fff2cc">0.95</span>&nbsp; &nbsp; read-only-distinct</div>
<div>1.00&nbsp; &nbsp; 0.98&nbsp; &nbsp; 0.98&nbsp; &nbsp; 1.00&nbsp; &nbsp; 0.99&nbsp; &nbsp; 0.99&nbsp; &nbsp; 0.97&nbsp; &nbsp; read-only-order</div>
<div>0.99&nbsp; &nbsp; 1.00&nbsp; &nbsp; 1.01&nbsp; &nbsp; 1.00&nbsp; &nbsp; 1.01&nbsp; &nbsp; 0.99&nbsp; &nbsp; 1.00&nbsp; &nbsp; read-only_range=10</div>
<div>0.99&nbsp; &nbsp; 1.00&nbsp; &nbsp; 1.00&nbsp; &nbsp; 1.00&nbsp; &nbsp; 1.01&nbsp; &nbsp; 1.00&nbsp; &nbsp; 0.99&nbsp; &nbsp; read-only_range=100</div>
<div>1.00&nbsp; &nbsp; 0.97&nbsp; &nbsp; 1.02&nbsp; &nbsp; 1.03&nbsp; &nbsp; 1.04&nbsp; &nbsp; 1.05&nbsp; &nbsp; 1.03&nbsp; &nbsp; read-only_range=10000</div>
<div>1.00&nbsp; &nbsp; 0.97&nbsp; &nbsp; 0.99&nbsp; &nbsp; 0.97&nbsp; &nbsp; 0.95&nbsp; &nbsp; 0.98&nbsp; &nbsp; <span style="background-color: #fff2cc">0.96</span>&nbsp; &nbsp; read-only-simple</div>
<div>1.00&nbsp; &nbsp; 0.96&nbsp; &nbsp; 0.97&nbsp; &nbsp; 0.97&nbsp; &nbsp; 0.94&nbsp; &nbsp; 0.97&nbsp; &nbsp; <span style="background-color: #fff2cc">0.95</span>&nbsp; &nbsp; read-only-sum</div>
<p></span></span></div>
<p></span></span></div>
<div><span><span><br /></span></span></div>
<div><span><span></p>
<div><span><span><b>Results: writes, version 17 to 19</b></span></span></div>
<div><span><span><br /></span></span></div>
<div>Summary</div>
<div>
<ul style="text-align: left">
<li>there are no regressions</li>
</ul>
</div>
<div><span style="font-family: courier;font-size: small">Relative to: PG 17.10</span></div>
<div><span><span style="font-family: courier;font-size: x-small"></p>
<div>col-1 : PG 18.4</div>
<div>col-2 : PG 19 beta1</div>
<div></div>
<div>
<div>col-1&nbsp; &nbsp;col-2</div>
<div>0.99&nbsp; &nbsp; 0.99&nbsp; &nbsp; delete</div>
<div>1.02&nbsp; &nbsp; 1.02&nbsp; &nbsp; insert</div>
<div>1.00&nbsp; &nbsp; 0.98&nbsp; &nbsp; read-write_range=10</div>
<div>0.99&nbsp; &nbsp; 0.99&nbsp; &nbsp; read-write_range=100</div>
<div>1.01&nbsp; &nbsp; 1.03&nbsp; &nbsp; update-index</div>
<div>1.01&nbsp; &nbsp; 0.98&nbsp; &nbsp; update-inlist</div>
<div>0.98&nbsp; &nbsp; 1.01&nbsp; &nbsp; update-nonindex</div>
<div>1.01&nbsp; &nbsp; 1.03&nbsp; &nbsp; update-one</div>
<div>1.00&nbsp; &nbsp; 1.00&nbsp; &nbsp; update-zipf</div>
<div>0.97&nbsp; &nbsp; 0.99&nbsp; &nbsp; write-only</div>
</div>
<p></span></span></div>
<div><span><span></p>
<div><span><span><br /></span></span></div>
<div><span><span><b>Results: writes, version 12 to 19</b></span></span></div>
<div><span><span><b><br /></b></span></span></div>
<div>Summary</div>
<div>
<ul style="text-align: left">
<li>there are no regressions</li>
<li>many large improvements arrived in version 17 and remain in 19 beta1</li>
</ul>
</div>
<div><span style="font-family: courier;font-size: small">Relative to: PG 12.22</span></div>
<div><span><span style="font-family: courier;font-size: x-small"></p>
<div>col-1 : PG 13.23</div>
<div>col-2 : PG 14.23</div>
<div>col-3 : PG 15.18</div>
<div>col-4 : PG 16.14</div>
<div>col-5 : PG 17.10</div>
<div>col-6 : PG 18.4</div>
<div>col-7 : PG 19 beta1</div>
<div></div>
<p></span></span></div>
<div><span><span style="font-family: courier;font-size: x-small"></p>
<div>col-1&nbsp; &nbsp;col-2&nbsp; &nbsp;col-3&nbsp; &nbsp;col-4&nbsp; &nbsp;col-5&nbsp; &nbsp;col-6&nbsp; &nbsp;col-7</div>
<div>0.99&nbsp; &nbsp; 1.11&nbsp; &nbsp; 1.13&nbsp; &nbsp; 1.10&nbsp; &nbsp; <span style="background-color: #d9ead3">1.28</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.27</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.27</span>&nbsp; &nbsp; delete</div>
<div>1.02&nbsp; &nbsp; 1.17&nbsp; &nbsp; 1.16&nbsp; &nbsp; 1.19&nbsp; &nbsp; <span style="background-color: #d9ead3">1.23</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.25</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.25</span>&nbsp; &nbsp; insert</div>
<div>1.00&nbsp; &nbsp; 1.20&nbsp; &nbsp; 1.22&nbsp; &nbsp; 1.20&nbsp; &nbsp; <span style="background-color: #d9ead3">1.24</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.24</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.22</span>&nbsp; &nbsp; read-write_range=10</div>
<div>0.99&nbsp; &nbsp; 1.04&nbsp; &nbsp; 1.05&nbsp; &nbsp; 1.04&nbsp; &nbsp; 1.06&nbsp; &nbsp; 1.05&nbsp; &nbsp; 1.04&nbsp; &nbsp; read-write_range=100</div>
<div>0.98&nbsp; &nbsp; 1.08&nbsp; &nbsp; 1.05&nbsp; &nbsp; 0.94&nbsp; &nbsp; <span style="background-color: #d9ead3">1.84</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.85</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.90</span>&nbsp; &nbsp; update-index</div>
<div>1.00&nbsp; &nbsp; 1.07&nbsp; &nbsp; 1.06&nbsp; &nbsp; 1.05&nbsp; &nbsp; 1.12&nbsp; &nbsp; 1.13&nbsp; &nbsp; 1.10&nbsp; &nbsp; update-inlist</div>
<div>1.01&nbsp; &nbsp; 1.07&nbsp; &nbsp; 1.07&nbsp; &nbsp; 0.86&nbsp; &nbsp; <span style="background-color: #d9ead3">1.87</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.84</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.88</span>&nbsp; &nbsp; update-nonindex</div>
<div>1.04&nbsp; &nbsp; 0.96&nbsp; &nbsp; 0.96&nbsp; &nbsp; 1.10&nbsp; &nbsp; <span style="background-color: #d9ead3">1.39</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.41</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.43</span>&nbsp; &nbsp; update-one</div>
<div>1.01&nbsp; &nbsp; 1.05&nbsp; &nbsp; 1.07&nbsp; &nbsp; 0.96&nbsp; &nbsp; <span style="background-color: #d9ead3">1.63</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.62</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.63</span>&nbsp; &nbsp; update-zipf</div>
<div>0.99&nbsp; &nbsp; 1.11&nbsp; &nbsp; 1.13&nbsp; &nbsp; 1.09&nbsp; &nbsp; <span style="background-color: #d9ead3">1.41</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.37</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.40</span>&nbsp; &nbsp; write-only</div>
<p></span></span></div>
<p></span></span></div>
<p></span></span></div>
<p></span></div>
<p><a href="https://smalldatum.blogspot.com/2026/06/cpu-bound-sysbench-on-large-server.html">CPU-bound sysbench on a large server: Postgres 12 to 19 beta1</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Simple tool to build MariaDB commits for performance-change analysis</title>
        <link>https://mariadb.org/simple-tool-to-build-mariadb-commits-for-performance-change-analysis/</link>
        <pubDate>Thu, 18 Jun 2026 21:10:43 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Tracking down changes in database performance is one of the hardest parts of engineering, especially when the change is buried somewhere in a long commit history. …<br />
Continue reading "Simple tool to build MariaDB commits for performance-change analysis"<br />
The post Simple tool to build MariaDB commits for performance-change analysis appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/simple-tool-to-build-mariadb-commits-for-performance-change-analysis/">Simple tool to build MariaDB commits for performance-change analysis</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Tracking down changes in database performance is one of the hardest parts of engineering, especially when the change is buried somewhere in a long commit history. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/simple-tool-to-build-mariadb-commits-for-performance-change-analysis/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;Simple tool to build MariaDB commits for performance-change analysis&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/simple-tool-to-build-mariadb-commits-for-performance-change-analysis/">Simple tool to build MariaDB commits for performance-change analysis</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/simple-tool-to-build-mariadb-commits-for-performance-change-analysis/">Simple tool to build MariaDB commits for performance-change analysis</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Vector in Laravel: insights on choosing an embedding model</title>
        <link>https://mariadb.org/mariadb-vector-in-laravel-insights-on-choosing-an-embedding-model/</link>
        <pubDate>Thu, 18 Jun 2026 06:18:15 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>laravel-mariadb-vector is an open-source project by Erik Ros, bringing MariaDB’s native vector search to Laravel’s Eloquent ORM. In his guest post, Erik shares how it works, and his insights about picking an embedding model. …<br />
Continue reading "MariaDB Vector in Laravel: insights on choosing an embedding model"<br />
The post MariaDB Vector in Laravel: insights on choosing an embedding model appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/mariadb-vector-in-laravel-insights-on-choosing-an-embedding-model/">MariaDB Vector in Laravel: insights on choosing an embedding model</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><a href="https://packagist.org/packages/devilsberg/laravel-mariadb-vector">laravel-mariadb-vector</a>&#160;is an open-source project by Erik Ros, bringing MariaDB&#8217;s native vector search to Laravel&#8217;s Eloquent ORM. In his guest post, Erik shares how it works, and his insights about picking an embedding model. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/mariadb-vector-in-laravel-insights-on-choosing-an-embedding-model/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;MariaDB Vector in Laravel: insights on choosing an embedding model&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/mariadb-vector-in-laravel-insights-on-choosing-an-embedding-model/">MariaDB Vector in Laravel: insights on choosing an embedding model</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/mariadb-vector-in-laravel-insights-on-choosing-an-embedding-model/">MariaDB Vector in Laravel: insights on choosing an embedding model</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Security advisory: CVE-2026-9740 and CVE-2026-11933 in Percona Server for MongoDB</title>
        <link>https://www.percona.com/blog/security-advisory-cve-2026-9740-and-cve-2026-11933-in-percona-server-for-mongodb/</link>
        <pubDate>Wed, 17 Jun 2026 14:24:02 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>TL;DR: This advisory covers the two most important high-severity memory-safety vulnerabilities affecting MongoDB Community and our downstream Percona Server for MongoDB – CVE-2026-11933 and CVE-2026-9740. Both will be addressed in a single coordinated patch release, bundled with other recently revealed lower-scored CVE fixes: CVE-2026-9753, CVE-2026-9752, CVE-2026-9751, CVE-2026-9750, CVE-2026-9749, CVE-2026-9748, CVE-2026-9747, CVE-2026-9746, CVE-2026-9743, and CVE-2026-9741. Fixes land … Continued<br />
The post Security advisory: CVE-2026-9740 and CVE-2026-11933 in Percona Server for MongoDB appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/security-advisory-cve-2026-9740-and-cve-2026-11933-in-percona-server-for-mongodb/">Security advisory: CVE-2026-9740 and CVE-2026-11933 in Percona Server for MongoDB</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p data-sourcepos="7:1-7:352;461-812"><span style="font-weight: 400"><strong>TL;DR:</strong> This advisory covers the two most important high-severity memory-safety vulnerabilities affecting MongoDB Community and our downstream Percona Server for MongoDB &#8211; </span><a href="https://www.cve.org/CVERecord?id=CVE-2026-11933"><i><span style="font-weight: 400">CVE-2026-11933</span></i></a><span style="font-weight: 400"> and </span><a href="https://www.cve.org/CVERecord?id=CVE-2026-9740"><i><span style="font-weight: 400">CVE-2026-9740</span></i></a><span style="font-weight: 400">. Both will be addressed in a single coordinated patch release, bundled with other recently revealed lower-scored CVE fixes: </span><a href="https://www.cve.org/CVERecord?id=CVE-2026-9753"><span style="font-weight: 400">CVE-2026-9753</span></a><span style="font-weight: 400">, </span><a href="https://www.cve.org/CVERecord?id=CVE-2026-9752"><span style="font-weight: 400">CVE-2026-9752</span></a><span style="font-weight: 400">, </span><a href="https://www.cve.org/CVERecord?id=CVE-2026-9751"><span style="font-weight: 400">CVE-2026-9751</span></a><span style="font-weight: 400">, </span><a href="https://www.cve.org/CVERecord?id=CVE-2026-9750"><span style="font-weight: 400">CVE-2026-9750</span></a><span style="font-weight: 400">, </span><a href="https://www.cve.org/CVERecord?id=CVE-2026-9749"><span style="font-weight: 400">CVE-2026-9749</span></a><span style="font-weight: 400">, </span><a href="https://www.cve.org/CVERecord?id=CVE-2026-9748"><span style="font-weight: 400">CVE-2026-9748</span></a><span style="font-weight: 400">, </span><a href="https://www.cve.org/CVERecord?id=CVE-2026-9747"><span style="font-weight: 400">CVE-2026-9747</span></a><span style="font-weight: 400">, </span><a href="http://cve-2026-9746"><span style="font-weight: 400">CVE-2026-9746</span></a><span style="font-weight: 400">, </span><a href="http://cve-2026-9743"><span style="font-weight: 400">CVE-2026-9743</span></a><span style="font-weight: 400">, and </span><a href="https://www.cve.org/CVERecord?id=CVE-2026-9741"><span style="font-weight: 400">CVE-2026-9741</span></a><span style="font-weight: 400">.</span></p>
<p>Fixes land in Percona Server for MongoDB patch window starting next week. The first high-vulnerability issue has nothing between it and your <code class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]">mongod</code> process except your firewall. The second has a configuration off-switch you can flip during a maintenance window.  Read on to understand why, how, and what.</p>
<h2 data-sourcepos="11:1-11:58;915-972"><img loading="lazy" decoding="async" class="aligncenter wp-image-49971 size-large" src="https://www.percona.com/wp-content/uploads/2026/06/blog-hero-June-2026-1024x576.png" alt="" width="1024" height="576" /></h2>
<h2 class="text-text-100 mt-3 -mb-1 text-[1.125rem] font-bold" data-sourcepos="11:1-11:58;915-972">CVE-2026-9740 — the one that does not need credentials</h2>
<p>A stack overflow in the BSON validator, specifically in the BSONColumn interleaved-reference handling. The validator&#8217;s depth tracking resets on mutual recursion between validation functions, so a sufficiently nested input exhausts the thread&#8217;s stack before any explicit limit fires. The result: <code class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]">mongod</code> crashes.</p>
<p>CVSS 8.7. High severity. The reason it lands in High instead of merely Medium is the prerequisite for exploitation &#8211; there is none.</p>
<p>The attacker needs network reachability to a <code class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]">mongod</code> listener. No credentials, no prior session, and no application interaction. One crafted message over the wire and the process is down. Repeated crashes are trivially repeatable, so an attacker who can reach the port can keep the instance offline for as long as they keep that reachability. The urgency of this issue comes from the audience &#8211; everyone with a TCP route to your database.</p>
<p>Upstream tracking: <a class="underline underline underline-offset-2 decoration-1 decoration-current/40 hover:decoration-current focus:decoration-current" href="https://jira.mongodb.org/browse/SERVER-125063">SERVER-125063</a>. Affected versions are Percona Server for MongoDB 8.0 ≤ 8.0.23-10 and PSMDB 7.0 ≤ 7.0.34-19. The vulnerable BSONColumn code path was introduced in 7.0, so 6.0 and earlier are not in scope for this one.</p>
<h2 class="text-text-100 mt-3 -mb-1 text-[1.125rem] font-bold" data-sourcepos="25:1-25:55;2365-2419">CVE-2026-11933 — the one that does need credentials and permissions to read</h2>
<p><span style="font-weight: 400">The vulnerable code path is inside MongoDB Server&#8217;s server-side JavaScript engine, specifically in the BSON-to-array conversion routine. When a BSON document is materialized as a JavaScript array for use inside a server-side script, the engine can reach a state where it accesses memory that has already been freed. An attacker who can submit input that flows into that conversion path can shape what happens at the point of access.</span></p>
<p><b>Server-side JavaScript is reachable from the following surfaces:</b></p>
<ol>
<li style="font-weight: 400"><span style="font-weight: 400">The </span><span style="font-weight: 400">$where</span><span style="font-weight: 400"> query operator (deprecated in 8.0).</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">The </span><span style="font-weight: 400">$function</span><span style="font-weight: 400"> aggregation expression (deprecated in 8.0).</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">The </span><span style="font-weight: 400">$accumulator</span><span style="font-weight: 400"> aggregation expression (deprecated in 8.0).</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">The </span><span style="font-weight: 400">mapReduce</span><span style="font-weight: 400"> command (deprecated since 5.0).</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">JavaScript functions stored in </span><a href="http://system.js"><span style="font-weight: 400">system.js</span></a><span style="font-weight: 400">.</span></li>
</ol>
<p><span style="font-weight: 400">MongoDB logs a warning when you run deprecated functions.</span></p>
<p><b><br />
</b><b>Prerequisites for exploitation:</b></p>
<ol>
<li style="font-weight: 400"><span style="font-weight: 400">The attacker must be authenticated to MongoDB.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">The attacker must hold any role that permits running queries or aggregations against a collection. The built-in </span><span style="font-weight: 400">read</span><span style="font-weight: 400"> role on a single database is sufficient.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Server-side JavaScript must be enabled on the </span><span style="font-weight: 400">mongod</span><span style="font-weight: 400"> instance. This is the default; many production deployments leave it enabled even when they do not use it.</span></li>
</ol>
<p>CVSS 8.8. High severity. Two demonstrated outcomes:</p>
<ul>
<li>Information disclosure (reading other content out of the <code class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]">mongod</code> process memory) and</li>
<li>Denial of Service (crashing it).</li>
</ul>
<p>Upstream tracking: <a class="underline underline underline-offset-2 decoration-1 decoration-current/40 hover:decoration-current focus:decoration-current" href="https://jira.mongodb.org/browse/SERVER-128125">SERVER-128125</a>. Affected versions: every supported and End of Life Percona Server for MongoDB major from 4.4 through 8.0.</p>
<p data-sourcepos="31:1-31:160;3100-3259"><img loading="lazy" decoding="async" class="aligncenter wp-image-49973 size-full" src="https://www.percona.com/wp-content/uploads/2026/06/blog-11933-attack-flow.png" alt="" width="1600" height="860" /></p>
<h2 class="text-text-100 mt-3 -mb-1 text-[1.125rem] font-bold" data-sourcepos="43:1-43:37;4603-4639">The good news and bad news</h2>
<p>CVE-2026-11933 has a configuration off-switch. If your application does not use server-side JavaScript — <code class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]">$where</code>, <code class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]">$function</code>, <code class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]">$accumulator</code>, <code class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]">mapReduce</code>, or stored <code class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]">system.js</code> functions — you can disable server-side JavaScript on the server, removing the attack surface entirely until you patch.</p>
<h3><b>How to check whether your applications use server-side JavaScript before disabling:</b></h3>
<ol>
<li style="font-weight: 400"><span style="font-weight: 400">Enable MongoDB profiling at level 2 (all operations) on a representative mongod server for a representative time window. See details in </span><a href="https://www.mongodb.com/docs/manual/tutorial/manage-the-database-profiler/"><span style="font-weight: 400">Manage the database profiler</span></a><span style="font-weight: 400">.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Search the </span><span style="font-weight: 400">system.profile</span><span style="font-weight: 400"> collection for operations that include </span><span style="font-weight: 400">$where</span><span style="font-weight: 400">, </span><span style="font-weight: 400">$function</span><span style="font-weight: 400">, </span><span style="font-weight: 400">$accumulator</span><span style="font-weight: 400">, or </span><span style="font-weight: 400">mapReduce</span><span style="font-weight: 400">.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Inspect application code paths and stored aggregation pipelines for the same operators. Check </span><span style="font-weight: 400">system.js</span><span style="font-weight: 400"> in each database for stored functions.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">If any usage exists, treat disabling as not viable for those deployments and rely on patching plus the defense-in-depth controls below.</span></li>
</ol>
<h3><b>How to disable server-side JavaScript:</b></h3>
<p>Add to your configuration file for <code>mongod</code>and <code>mongos</code>:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">security: 
  javascriptEnabled: false</pre>
<p>Or pass <code class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]">--noscripting</code> on the command line. <span style="font-weight: 400">See the reference documentation for details about </span><a href="https://www.mongodb.com/docs/manual/reference/configuration-options/#mongodb-setting-security.javascriptEnabled"><span style="font-weight: 400">MongoDB Setting:  security.javascriptEnabled</span></a><span style="font-weight: 400">.</span></p>
<p>After a restart, any operation that reaches for server-side JavaScript will return an error. That is the catch: if your application <em>does</em> use one of those operators, this is not a viable mitigation for you, and you have to wait for the patch. If you are not sure whether your application uses them, turn on the database profiler at level 2 on a representative replica for a window long enough to be representative, then grep the profile collection for the operator names. Several teams have done this exercise in the last forty-eight hours and learned the answer is <em>&#8220;no, we don&#8217;t actually use any of that.&#8221;</em> The cost of disabling is then the cost of a <code class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]">mongod</code> or <code>mongos</code> restart.</p>
<p data-sourcepos="58:1-58:168;5736-5903">That was good news. Now the bad news: CVE-2026-9740 has no equivalent off-switch. The BSON validator is core to every client message; it cannot be disabled. Patch and network controls are the only options.</p>
<h2 class="text-text-100 mt-3 -mb-1 text-[1.125rem] font-bold" data-sourcepos="60:1-60:30;5905-5934">What is shipping, and when</h2>
<p>The fixes for both CVEs will land in a single coordinated patch release for each supported major:</p>
<ul class="[li_&amp;]:mb-0 [li_&amp;]:mt-1 [li_&amp;]:gap-1 [&amp;:not(:last-child)_ul]:pb-1 [&amp;:not(:last-child)_ol]:pb-1 list-disc flex flex-col gap-1 pl-8 mb-3" data-sourcepos="64:1-66:206;6035-6428">
<li><strong>Percona Server for MongoDB 7.0 series</strong> — fix targeted for  <strong>June 23, 2026</strong>.</li>
<li><strong>Percona Server for MongoDB 8.0 series</strong> — fix targeted for  <strong>June 25, 2026</strong>.</li>
<li><strong>Percona Server for MongoDB 6.0 series</strong> — fix targeted for  <strong>June 25, 2026 </strong>(for CVE-2026-11933).</li>
</ul>
<p>All dates are targets, not commitments. Plan one upgrade window covering all CVEs.</p>
<p>Percona is <strong>not</strong> building binary packages for the 5.x line. We’re being upfront about that — the calculus on extended support has a limit, and 5.x is past it for us. If you have a hard requirement on 5.x and the time pressure to meet it, the source is available for building. Percona customers on 5.x can open a ticket, and we’ll work on the case individually.</p>
<p>As usual, you can download patches from your package manager or Percona <a href="https://www.percona.com/downloads/">Software Downloads</a> page.</p>
<p>On <strong>Kubernetes via the Percona Operator for MongoDB</strong>: same drill as usual. When the patched image is published, edit the image tag in your <code>PerconaServerMongoDB</code> custom resource and let the operator roll the cluster. Don’t wait for the June operator release to do it for you. See details in our documentation on how to <a href="https://docs.percona.com/percona-operator-for-mongodb/update-db.html">Upgrade Percona Server for MongoDB</a>. You do not need to wait for an operator release to apply a security fix.</p>
<h2 class="text-text-100 mt-3 -mb-1 text-[1.125rem] font-bold" data-sourcepos="72:1-72:24;7030-7053">What to do this week</h2>
<p>In order of urgency, for most deployments:</p>
<ol class="[li_&amp;]:mb-0 [li_&amp;]:mt-1 [li_&amp;]:gap-1 [&amp;:not(:last-child)_ul]:pb-1 [&amp;:not(:last-child)_ol]:pb-1 list-decimal flex flex-col gap-1 pl-8 mb-3" data-sourcepos="76:1-79:226;7099-7810">
<li><strong>Confirm your <code class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]">mongod</code> or <code>mongos</code> listeners are not reachable from any source you would not trust with a shell on the host.</strong> If you find an exposure, fix that first. CVE-2026-9740 turns any such exposure into a DoS primitive.</li>
<li><strong>For deployments that do not use server-side JavaScript, disable it.</strong> Full mitigation for CVE-2026-11933 within a single <code class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]">mongod</code> restart.</li>
<li><strong>Plan your upgrade window</strong> for the week the relevant fixed release lands. One window. Both CVEs. Plus, the others scored lower.</li>
<li><strong>Audit which roles in your deployment can run ad-hoc queries or aggregations.</strong> The bar for CVE-2026-11933 is the standard read role, so the population of potential attackers is larger than for most memory-safety defects.</li>
</ol>
<p>One closing point, because it has come up several times in customer conversations this week. For a deployment behind tight network controls, the post-authenticated bug is the more urgent one. For a deployment reachable from broader networks — public cloud, shared internal LANs, multi-tenant infrastructure — the pre-authenticated bug is. Triage by <em>your</em> exposure, not by <em>their</em> CVSS.</p>
<hr class="border-border-200 border-t-0.5 my-3 mx-1.5" />
<p><em>Questions, or a deployment you&#8217;re not sure how to triage? Find us on the <a class="underline underline underline-offset-2 decoration-1 decoration-current/40 hover:decoration-current focus:decoration-current" href="https://forums.percona.com/">Percona Forum</a>, or, for customers, in the support portal.</em></p>
<p><i><span style="font-weight: 400">Reviewed by Ivan Groenewold.</span></i><i><span style="font-weight: 400"> Vetted for technical accuracy as of June 17, 2026.</span></i></p>
<p>The post <a href="https://www.percona.com/blog/security-advisory-cve-2026-9740-and-cve-2026-11933-in-percona-server-for-mongodb/">Security advisory: CVE-2026-9740 and CVE-2026-11933 in Percona Server for MongoDB</a> appeared first on <a href="https://www.percona.com">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/security-advisory-cve-2026-9740-and-cve-2026-11933-in-percona-server-for-mongodb/">Security advisory: CVE-2026-9740 and CVE-2026-11933 in Percona Server for MongoDB</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>The insert benchmark on a small server, IO-bound workload : Postgres 19 beta1</title>
        <link>https://smalldatum.blogspot.com/2026/06/the-insert-benchmark-on-small-server-io.html</link>
        <pubDate>Wed, 17 Jun 2026 01:29:04 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://smalldatum.blogspot.com/">Small Datum</source>
        <description><![CDATA[<p>This has results for Postgres versions 19 beta1, 18.4 and 17.10 with the Insert Benchmark on a small server using a cached and CPU-bound workload. I also used MySQL 8.4.8 to see where performance was different.Postgres continues to be boring in a good way. It is hard to find performance regressions. tl;drcreate index (the l.x step) is faster in Postgres 19beta1. A Postgres expert told me that the sort algorithm was changed to be more CPU efficientthe write heavy steps (l.i1, l.i2) are 15% and 9% faster in 19 beta1 vs Postgres 17.10the second write heavy step (l.i2) is more than 20X faster in MySQL 8.4.8 vs Postgres thanks to the CPU overhead from get_actual_variable_range. I have written about this before.Builds, configuration and hardwareI compiled Postgres from source using -O2 -fno-omit-frame-pointer for versions 19 beta1, 18.4 and 17.10.I compiled MySQL 8.4.8 from source as well.The server is an Beelink SER7 with a Ryzen 7 7840HS CPU with 8 cores and AMD SMT disabled, 32G of RAM. Storage is one SSD for the OS and an NVMe SSD for the database using ext-4 with discard enabled. The OS is Ubuntu 24.04.For 17.10 the config file is named conf.diff.cx10a_c8r32 (cx10a) and is here.For Postgres 18 and 19 the config file is conf.diff.cx10b_c8r32 (cx10b) which is as similar as possible to the config for version 17.For MySQL 8.4.8 the config file is my.cnf.cz12a_c8r32.The BenchmarkThe benchmark is explained here and is run with 1 client.The point query (qp100, qp500, qp1000) and range query (qr100, qr500, qr1000) steps are run for 3600 seconds each.The benchmark steps are:l.i0insert 800M rows per table in PK order. The table has a PK index but no secondary indexes. There is one connection per client.l.xcreate 3 secondary indexes per table. There is one connection per client.l.i1use 2 connections/client. One inserts 4M rows per table and the other does deletes at the same rate as the inserts. Each transaction modifies 50 rows (big transactions). This step is run for a fixed number of inserts, so the run time varies depending on the insert rate.l.i2like l.i1 but each transaction modifies 5 rows (small transactions) and 1M rows are inserted and deleted per table.Wait for S seconds after the step finishes to reduce variance during the read-write benchmark steps that follow. The value of S is a function of the table size.qr100use 3 connections/client. One does range queries and performance is reported for this. The second does does 100 inserts/s and the third does 100 deletes/s. The second and third are less busy than the first. The range queries use covering secondary indexes. If the target insert rate is not sustained then that is considered to be an SLA failure. If the target insert rate is sustained then the step does the same number of inserts for all systems tested. This step is frequently not IO-bound for the IO-bound workload.qp100like qr100 except uses point queries on the PK indexqr500like qr100 but the insert and delete rates are increased from 100/s to 500/sqp500like qp100 but the insert and delete rates are increased from 100/s to 500/sqr1000like qr100 but the insert and delete rates are increased from 100/s to 1000/sqp1000like qp100 but the insert and delete rates are increased from 100/s to 1000/sResultsThe performance summary with charts is here.This table lists relative QPS per benchmark step and relative QPS is:    (QPS for my version / QPS for Postgres 17.10)The background in the table cells is blue for big improvements and yellow for regressions. There are no regressions here. The improvements here for Postgres 19 beta1 are similar to what I reported for the cached workload.The index create (l.x) step is much faster in 19.10. I usually ignore results on this step but I am curious if something was done in 19.10 to improve index create. A Postgres expert told me that the sort algorithm for index create was changed in version 19 to be more CPU efficient.For the write-heavy steps (l.i1, l.i2):there are large improvements in 19 beta1 (15% and 9%). The CPU overhead is lower in 19 beta1 compared to 17.10 (see cpupq here).throughput for the l.i2 step is more than 20X larger for MySQL than for Postgres. From vmstat I see that the CPU overhead (cpupq here) is more than 10X larger with Postgres vs MySQL. From flamegraphs the problem is the CPU overhead in get_actual_variable_range. I have written about this before (see here). The Postgres query planner uses too much CPU skipping old versions to figure out selectivity for a query and there are too many old versions because Postgres doesn't collect them ASAP, vacuum takes time. The flamegraphs are in subdirectories here.For the range query steps (qr100, qr500, qr1000) throughput is ~3% less in 19 beta1 vs 17.10 and ~1% less in 18.4 vs 17.10. For 19 beta1 there is a small increase in CPU overhead (see cpupq here, here and here). I already have flamegraphs for MySQL 8.4.8 and Postgres 19 beta1, soon I will have them for Postgres 17.10 and 18.4 to try and explain this.dbmsl.i0l.xl.i1l.i2qr100qp100qr500qp500qr1000qp1000PG 17.101.001.001.001.001.001.001.001.001.001.00PG 18.41.011.031.001.000.981.000.990.990.990.99PG 19 beta11.011.151.051.090.971.010.961.010.971.00MySQL 8.4.80.770.890.7621.620.611.070.660.930.850.84</p>
<p><a href="https://smalldatum.blogspot.com/2026/06/the-insert-benchmark-on-small-server-io.html">The insert benchmark on a small server, IO-bound workload : Postgres 19 beta1</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>This has results for Postgres versions 19 beta1, 18.4 and 17.10 with the <a href="https://smalldatum.blogspot.com/2023/12/updates-for-insert-benchmark-december.html">Insert Benchmark</a> on a small server using a cached and CPU-bound workload. I also used MySQL 8.4.8 to see where performance was different.</p>
</p>
<p>Postgres continues to be boring in a good way. It is hard to find performance regressions.</p>
<p>&nbsp;tl;dr</p>
</p>
<ul style="text-align: left">
<li>create index (the l.x step) is faster in Postgres 19beta1. A Postgres expert told me that the sort algorithm was changed to be more CPU efficient</li>
<li>the write heavy steps (l.i1, l.i2) are 15% and 9% faster in 19 beta1 vs Postgres 17.10</li>
<li>the second write heavy step (l.i2) is more than 20X faster in MySQL 8.4.8 vs Postgres thanks to the CPU overhead from get_actual_variable_range. I have <a href="https://www.google.com/search?q=site%3Asmalldatum.blogspot.com+get_actual_variable_range">written about this</a> before.</li>
</ul>
<div><b>Builds, configuration and hardware</b></div>
<div>
<div></div>
<div>I compiled Postgres from source using&nbsp;<i>-O2 -fno-omit-frame-pointer</i>&nbsp;for versions 19 beta1, 18.4 and 17.10.</p>
<p>I compiled MySQL 8.4.8 from source as well.</p></div>
<div>The server is an Beelink SER7 with a Ryzen 7 7840HS CPU with 8 cores and AMD SMT disabled, 32G of RAM. Storage is one SSD for the OS and an NVMe SSD for the database using ext-4 with discard enabled. The OS is Ubuntu 24.04.</div>
<div></div>
<div>For 17.10 the config file is named conf.diff.cx10a_c8r32 (cx10a) and&nbsp;<a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/pg172_o2nofp/conf.diff.cx10a_c8r32">is here</a>.</div>
</p>
<div>For Postgres 18 and 19&nbsp;the config file is&nbsp;<a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/pg18_o2nofp/conf.diff.cx10b_c8r32">conf.diff.cx10b_c8r32</a>&nbsp;(cx10b) which is as similar as possible to the config for version 17.</div>
</div>
<div></div>
<div>For MySQL 8.4.8 the config file is <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/my8406_rel_o2nofp/etc/my.cnf.cz12a_c8r32">my.cnf.cz12a_c8r32</a>.</div>
<div></div>
<div>
<div><b>The Benchmark</b></div>
<div>
<div></div>
<div>The benchmark is <a href="https://smalldatum.blogspot.com/2023/12/updates-for-insert-benchmark-december.html">explained here</a> and is run with 1 client.</div>
<div></div>
<div>The point query (qp100, qp500, qp1000) and range query (qr100, qr500, qr1000) steps are run for 3600 seconds each.</div>
<div></div>
<div>The benchmark steps are:</div>
<div>
<div>
<ul>
<li>l.i0</li>
<ul>
<li>insert 800M rows per table in PK order. The table has a PK index but no secondary indexes. There is one connection per client.</li>
</ul>
<li>l.x</li>
<ul>
<li>create 3 secondary indexes per table. There is one connection per client.</li>
</ul>
<li>l.i1</li>
<ul>
<li>use 2 connections/client. One inserts 4M rows per table and the other does deletes at the same rate as the inserts. Each transaction modifies 50 rows (big transactions). This step is run for a fixed number of inserts, so the run time varies depending on the insert rate.</li>
</ul>
<li>l.i2</li>
<ul>
<li>like l.i1 but each transaction modifies 5 rows (small transactions) and 1M rows are inserted and deleted per table.</li>
<li>Wait for S seconds after the step finishes to reduce variance during the read-write benchmark steps that follow. The value of S is a function of the table size.</li>
</ul>
<li>qr100</li>
<ul>
<li>use 3 connections/client. One does range queries and performance is reported for this. The second does does 100 inserts/s and the third does 100 deletes/s. The second and third are less busy than the first. The range queries use covering secondary indexes. If the target insert rate is not sustained then that is considered to be an SLA failure. If the target insert rate is sustained then the step does the same number of inserts for all systems tested. This step is frequently not IO-bound for the IO-bound workload.</li>
</ul>
<li>qp100</li>
<ul>
<li>like qr100 except uses point queries on the PK index</li>
</ul>
<li>qr500</li>
<ul>
<li>like qr100 but the insert and delete rates are increased from 100/s to 500/s</li>
</ul>
<li>qp500</li>
<ul>
<li>like qp100 but the insert and delete rates are increased from 100/s to 500/s</li>
</ul>
<li>qr1000</li>
<ul>
<li>like qr100 but the insert and delete rates are increased from 100/s to 1000/s</li>
</ul>
<li>qp1000</li>
<ul>
<li>like qp100 but the insert and delete rates are increased from 100/s to 1000/s</li>
</ul>
</ul>
<div>
<div><b>Results</b></div>
<div></div>
<div>The performance summary with charts <a href="https://mdcallag.github.io/reports/jun26.ib.pn53.io.800m.5m.3600s.1u.pg.my/all.html#summary">is here</a>.</div>
<div></div>
<div>This table lists relative QPS per benchmark step and relative QPS is:<br />&nbsp; &nbsp; (QPS for my version / QPS for Postgres 17.10)</p>
<p>The background in the table cells is blue for big improvements and yellow for regressions. There are no regressions here.&nbsp;</p></div>
<div></div>
<div>The improvements here for Postgres 19 beta1 are similar to <a href="https://smalldatum.blogspot.com/2026/06/the-insert-benchmark-on-small-server.html">what I reported</a> for the cached workload.</div>
<div></div>
<div>The index create (l.x) step is much faster in 19.10. I usually ignore results on this step but I am curious if something was done in 19.10 to improve index create. A Postgres expert told me that the sort algorithm for index create was changed in version 19 to be more CPU efficient.</div>
<div></div>
<div>For the write-heavy steps (l.i1, l.i2):</div>
<div>
<ul style="text-align: left">
<li>there are large improvements in 19 beta1 (15% and 9%). The CPU overhead is lower in 19 beta1 compared to 17.10 (<a href="https://mdcallag.github.io/reports/jun26.ib.pn53.io.800m.5m.3600s.1u.pg.my/all.html#l.i1.metrics">see cpupq here</a>).</li>
<li>throughput for the l.i2 step is more than 20X larger for MySQL than for Postgres. From vmstat I see that the CPU overhead (<a href="https://mdcallag.github.io/reports/jun26.ib.pn53.io.800m.5m.3600s.1u.pg.my/all.html#l.i2.metrics">cpupq here</a>) is more than 10X larger with Postgres vs MySQL. From flamegraphs the problem is the CPU overhead in get_actual_variable_range. I have written about this before (<a href="https://www.google.com/search?q=site%3Asmalldatum.blogspot.com+get_actual_variable_range">see here</a>). The Postgres query planner uses too much CPU skipping old versions to figure out selectivity for a query and there are too many old versions because Postgres doesn&#8217;t collect them ASAP, vacuum takes time. The flamegraphs are in <a href="https://github.com/mdcallag/mytools/tree/master/bench/arc/jun26.pn53.ib.pg19b1.my848/io/svg.all">subdirectories here</a>.</li>
</ul>
</div>
<div>For the range query steps (qr100, qr500, qr1000) throughput is ~3% less in 19 beta1 vs 17.10 and ~1% less in 18.4 vs 17.10. For 19 beta1 there is a small increase in CPU overhead (see cpupq <a href="https://mdcallag.github.io/reports/jun26.ib.pn53.io.800m.5m.3600s.1u.pg.my/all.html#qr100.L1.metrics">here</a>, <a href="https://mdcallag.github.io/reports/jun26.ib.pn53.io.800m.5m.3600s.1u.pg.my/all.html#qr500.L3.metrics">here</a> and <a href="https://mdcallag.github.io/reports/jun26.ib.pn53.io.800m.5m.3600s.1u.pg.my/all.html#qr1000.L5.metrics">here</a>). I already have flamegraphs for MySQL 8.4.8 and Postgres 19 beta1, soon I will have them for Postgres 17.10 and 18.4 to try and explain this.</div>
<div></div>
<div>
<div>
<table border="1" cellpadding="8" style="color: black">
<tbody>
<tr>
<th><span style="font-size: x-small">dbms</span></th>
<th><span style="font-size: x-small">l.i0</span></th>
<th><span style="font-size: x-small">l.x</span></th>
<th><span style="font-size: x-small">l.i1</span></th>
<th><span style="font-size: x-small">l.i2</span></th>
<th><span style="font-size: x-small">qr100</span></th>
<th><span style="font-size: x-small">qp100</span></th>
<th><span style="font-size: x-small">qr500</span></th>
<th><span style="font-size: x-small">qp500</span></th>
<th><span style="font-size: x-small">qr1000</span></th>
<th><span style="font-size: x-small">qp1000</span></th>
</tr>
<tr>
<td style="text-align: right"><span style="font-size: x-small">PG 17.10</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
</tr>
<tr>
<td style="text-align: right"><span style="font-size: x-small">PG 18.4</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.01</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.03</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">0.98</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">0.99</span></td>
<td style="text-align: right"><span style="font-size: x-small">0.99</span></td>
<td style="text-align: right"><span style="font-size: x-small">0.99</span></td>
<td style="text-align: right"><span style="font-size: x-small">0.99</span></td>
</tr>
<tr>
<td style="text-align: right"><span style="font-size: x-small">PG 19 beta1</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.01</span></td>
<td id="chi" style="background-color: #81fff9;text-align: right"><span style="font-size: x-small">1.15</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.05</span></td>
<td id="chi" style="background-color: #81fff9;text-align: right"><span style="font-size: x-small">1.09</span></td>
<td style="text-align: right"><span style="font-size: x-small">0.97</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.01</span></td>
<td style="text-align: right"><span style="font-size: x-small">0.96</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.01</span></td>
<td style="text-align: right"><span style="font-size: x-small">0.97</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
</tr>
<tr>
<td style="text-align: right"><span style="font-size: x-small">MySQL 8.4.8</span></td>
<td id="clo" style="background-color: #ffdd81;text-align: right"><span style="font-size: x-small">0.77</span></td>
<td id="clo" style="background-color: #ffdd81;text-align: right"><span style="font-size: x-small">0.89</span></td>
<td id="clo" style="background-color: #ffdd81;text-align: right"><span style="font-size: x-small">0.76</span></td>
<td id="chi" style="background-color: #81fff9;text-align: right"><span style="font-size: x-small">21.62</span></td>
<td id="clo" style="background-color: #ffdd81;text-align: right"><span style="font-size: x-small">0.61</span></td>
<td id="chi" style="background-color: #81fff9;text-align: right"><span style="font-size: x-small">1.07</span></td>
<td id="clo" style="background-color: #ffdd81;text-align: right"><span style="font-size: x-small">0.66</span></td>
<td id="clo" style="background-color: #ffdd81;text-align: right"><span style="font-size: x-small">0.93</span></td>
<td id="clo" style="background-color: #ffdd81;text-align: right"><span style="font-size: x-small">0.85</span></td>
<td id="clo" style="background-color: #ffdd81;text-align: right"><span style="font-size: x-small">0.84</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p><a href="https://smalldatum.blogspot.com/2026/06/the-insert-benchmark-on-small-server-io.html">The insert benchmark on a small server, IO-bound workload : Postgres 19 beta1</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB R2DBC Connector 1.4.1 now available</title>
        <link>https://mariadb.com/resources/blog/mariadb-r2dbc-connector-1-4-1-now-available/</link>
        <pubDate>Tue, 16 Jun 2026 22:24:39 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>MariaDB is pleased to announce the immediate availability of the MariaDB Connector/R2DBC 1.4.1 GA release. Download Now Release Notes MariaDB […]</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-r2dbc-connector-1-4-1-now-available/">MariaDB R2DBC Connector 1.4.1 now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB is pleased to announce the immediate availability of the MariaDB Connector/R2DBC 1.4.1 GA release. Download Now MariaDB Connector/R2DBC 1.4.1 is a Stable (GA) release. Notable items in this release include: See the Connector/R2DBC 1.4.1 release notes page for details and visit mariadb.com/downloads/connectors/connectors-data-access/r2dbc-connector/</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-r2dbc-connector-1-4-1-now-available/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/mariadb-r2dbc-connector-1-4-1-now-available/">MariaDB R2DBC Connector 1.4.1 now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>High Performance Real-Time Analytics on MariaDB Cloud: MariaDB Exa Technical Preview</title>
        <link>https://mariadb.com/resources/blog/high-performance-real-time-analytics-on-mariadb-cloud-mariadb-exa-technical-preview/</link>
        <pubDate>Tue, 16 Jun 2026 14:59:25 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>We are excited to announce the technical preview of MariaDB Exa on MariaDB Cloud. This release brings high-performance Hybrid Transactional […]</p>
<p><a href="https://mariadb.com/resources/blog/high-performance-real-time-analytics-on-mariadb-cloud-mariadb-exa-technical-preview/">High Performance Real-Time Analytics on MariaDB Cloud: MariaDB Exa Technical Preview</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>We are excited to announce the technical preview of MariaDB Exa on MariaDB Cloud. This release brings high-performance Hybrid Transactional and Analytical Processing (HTAP) directly into the MariaDB environment by integrating Exasol’s massively parallel processing (MPP) engine. By removing the requirement for complex ETL pipelines, MariaDB Exa enables analytics on live transactional data at up to…</p>
<p><a href="https://mariadb.com/resources/blog/high-performance-real-time-analytics-on-mariadb-cloud-mariadb-exa-technical-preview/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/high-performance-real-time-analytics-on-mariadb-cloud-mariadb-exa-technical-preview/">High Performance Real-Time Analytics on MariaDB Cloud: MariaDB Exa Technical Preview</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Server 10.6 Reaches End of Life on July 6th</title>
        <link>https://mariadb.org/mariadb-server-10-6-reaches-end-of-life-on-july-6th/</link>
        <pubDate>Tue, 16 Jun 2026 12:26:27 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB Server 10.6 has been with us for a long time. It was the first MariaDB LTS release under the current release model, and it has served many users, distributions, applications, and production environments very well. …<br />
Continue reading "MariaDB Server 10.6 Reaches End of Life on July 6th"<br />
The post MariaDB Server 10.6 Reaches End of Life on July 6th appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/mariadb-server-10-6-reaches-end-of-life-on-july-6th/">MariaDB Server 10.6 Reaches End of Life on July 6th</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB Server 10.6 has been with us for a long time. It was the first MariaDB LTS release under the current release model, and it has served many users, distributions, applications, and production environments very well. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/mariadb-server-10-6-reaches-end-of-life-on-july-6th/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;MariaDB Server 10.6 Reaches End of Life on July 6th&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/mariadb-server-10-6-reaches-end-of-life-on-july-6th/">MariaDB Server 10.6 Reaches End of Life on July 6th</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/mariadb-server-10-6-reaches-end-of-life-on-july-6th/">MariaDB Server 10.6 Reaches End of Life on July 6th</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Extending pt-archiver with a Partition-Aware Plug-in for Fast Retention Policy Enforcement</title>
        <link>https://www.percona.com/blog/extending-pt-archiver-with-a-partition-aware-plug-in-for-fast-retention-policy-enforcement/</link>
        <pubDate>Tue, 16 Jun 2026 11:31:51 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Managing data retention policies is one of the most common operational tasks in MySQL. Applications continuously generate transactional, audit, logging, telemetry, and event data. Over time, these tables can grow to billions of rows, causing: Larger backups Longer recovery times Reduced buffer pool efficiency Slower index maintenance Increased storage costs Degraded query performance To address … Continued<br />
The post Extending pt-archiver with a Partition-Aware Plug-in for Fast Retention Policy Enforcement appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/extending-pt-archiver-with-a-partition-aware-plug-in-for-fast-retention-policy-enforcement/">Extending pt-archiver with a Partition-Aware Plug-in for Fast Retention Policy Enforcement</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Managing data retention policies is one of the most common operational tasks in MySQL.</p>
<p>Applications continuously generate transactional, audit, logging, telemetry, and event data. Over time, these tables can grow to billions of rows, causing:</p>
<ul>
<li>Larger backups</li>
<li>Longer recovery times</li>
<li>Reduced buffer pool efficiency</li>
<li>Slower index maintenance</li>
<li>Increased storage costs</li>
<li>Degraded query performance</li>
</ul>
<p>To address these problems, organizations typically implement retention policies based on dates or timestamps. Examples include deleting events older than 90 days or purging session data older than 30 days and so forth. The deleted data can then eventually be archived somewhere else, like in another DBMS or on external files.</p>
<p>One of the most widely used tools for implementing these policies in MySQL ecosystems is pt-archiver, part of the Percona Toolkit.</p>
<p>This article provides a review of what pt-archiver is and how to use it, but in particular it focuses on the fact this tool is not partitioning aware, and this can make the deletion phase more costly. The article shows how to extend pt-archiver with a Perl plugin to make it aware of partitioning.</p>
<p>&nbsp;</p>
<h2>What is pt-archiver?</h2>
<p>pt-archiver is a command-line utility from Percona Toolkit designed to:</p>
<ul>
<li>Archive rows from MySQL tables</li>
<li>Purge rows from MySQL tables</li>
<li>Move data between tables into the local database or a remote one</li>
<li>Export rows into files</li>
</ul>
<p>In a few words: implementing retention policies safely.</p>
<p>The tool processes rows incrementally in chunks, avoiding massive transactions and reducing impact on production systems.</p>
<p>Example:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">pt-archiver 
&nbsp;&nbsp;--source h=localhost,D=mydb,t=events 
&nbsp;&nbsp;--where &quot;created_at &amp;lt; '2026-05-01'&quot; 
&nbsp;&nbsp;--purge 
&nbsp;&nbsp;--limit 1000 
&nbsp;&nbsp;--commit-each</pre>
<p>This command:</p>
<ul>
<li>Scans rows matching the WHERE condition</li>
<li>Processes them in chunks of 1000 rows</li>
<li>Commits every chunk</li>
<li>Deletes matching rows from the source table</li>
</ul>
<p>pt-archiver provides several advantages compared to ad-hoc DELETE statements.</p>
<p>Instead of running:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">DELETE FROM events
WHERE created_at &amp;lt; '2026-05-01';</pre>
<p>which may:</p>
<ul>
<li>Lock rows for a long time</li>
<li>Generate massive undo/redo logs</li>
<li>Create replication lag</li>
<li>Exhaust transaction logs</li>
</ul>
<p>pt-archiver processes rows incrementally to make the process overhead less impactful for the database performance.</p>
<p>pt-archiver implementation permits flexible archival strategies</p>
<p>Rows can be copied to another table on a remote host, exported to files or removed completely</p>
<p>More details: <a href="https://docs.percona.com/percona-toolkit/pt-archiver.html#extending">ps://docs.percona.com/percona-toolkit/pt-archiver.html</a></p>
<h2></h2>
<h3>Example: Copy rows to a remote archive table</h3>
<p>The following example archives rows older than 90 days from a local table into an archive table hosted on a remote MySQL server:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">pt-archiver 
&nbsp;&nbsp;--source h=localhost,D=sales,t=orders,u=archiver,p=secret 
&nbsp;&nbsp;--dest h=archive-server,D=archive,t=orders_archive,u=archiver,p=secret 
&nbsp;&nbsp;--where &quot;created_at &amp;lt; '2026-05-01'&quot; 
&nbsp;&nbsp;--limit 1000 
&nbsp;&nbsp;--commit-each 
&nbsp;&nbsp;--progress 10000 
&nbsp;&nbsp;--statistics</pre>
<p>In this example:</p>
<ul>
<li><span style="color: #339966">&#8211;source</span> defines the source table</li>
<li><span style="color: #339966">&#8211;dest</span> defines the remote archive destination</li>
<li><span style="color: #339966">&#8211;where</span> selects rows eligible for archival</li>
<li><span style="color: #339966">&#8211;limit</span> controls batch size</li>
<li><span style="color: #339966">&#8211;commit-each</span> commits every batch independently to reduce transaction overhead</li>
</ul>
<p>&#8211;<span style="color: #339966">-progress</span> reports progress every 10,000 rows</p>
<p>If rows should be removed from the source table after being copied, add <span style="color: #339966">&#8211;purge</span></p>
<h3>Example: Export rows to a file</h3>
<p>The following example exports rows older than one year into a text file:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">pt-archiver 
&nbsp;&nbsp;--source h=localhost,D=sales,t=orders,u=archiver,p=secret 
&nbsp;&nbsp;--where &quot;created_at &amp;lt; NOW() - INTERVAL 1 YEAR&quot; 
&nbsp;&nbsp;--file '/tmp/orders_archive_%Y-%m-%d.txt' 
&nbsp;&nbsp;--output-format csv 
&nbsp;&nbsp;--limit 1000 
&nbsp;&nbsp;--commit-each 
&nbsp;&nbsp;--progress 10000 
&nbsp;&nbsp;--statistics</pre>
<p>In this example:</p>
<ul>
<li><span style="color: #339966">&#8211;file</span> specifies the output file</li>
<li>&#8211;<span style="color: #339966">-output-format csv</span> exports rows in CSV format</li>
<li>Date placeholders in the filename are expanded automatically</li>
</ul>
<p>Rows can optionally be deleted from the source table by adding <span style="color: #339966">&#8211;purge</span></p>
<p>This allows pt-archiver to be used both for data retention and for offline archival workflows.</p>
<h1></h1>
<h2>The Hidden Cost of DELETE Statements</h2>
<p>Although pt-archiver is much safer than massive DELETE operations, it still fundamentally relies on DELETE statements.</p>
<p>This is a critical point.</p>
<p>Even when there are proper indexes, the rows are processed in chunks, and transactions are small; the large-scale DELETE operations remain expensive.</p>
<p>Deleting rows is expensive in InnoDB because it involves:</p>
<ul>
<li>Locating rows via indexes</li>
<li>Modifying clustered indexes</li>
<li>Modifying secondary indexes</li>
<li>Generating undo logs</li>
<li>Generating redo logs</li>
<li>Purge thread processing</li>
<li>Replication event generation</li>
<li>Page fragmentation</li>
</ul>
<p>When deleting billions of rows, the overhead becomes enormous.</p>
<p>Indexes help for sure, but only partially.</p>
<p>Consider:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">DELETE FROM events
WHERE created_at &amp;lt; '2024-01-01';</pre>
<p>If <span style="color: #339966">created_at</span> is indexed, MySQL can efficiently locate rows.</p>
<p>However, locating rows efficiently is only part of the cost. The actual delete operations still require all those things we mentioned above.</p>
<p>At considerable scale, this becomes expensive.</p>
<h1></h1>
<h2>Why RANGE Partitioning is Superior for Retention Policies</h2>
<p>For time-based retention policies, partitioning is often dramatically more efficient. In particular, RANGE partitioning is very useful for these cases.</p>
<p>Example:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">CREATE TABLE events (
&nbsp;&nbsp;&nbsp;&nbsp;id BIGINT NOT NULL,
&nbsp;&nbsp;&nbsp;&nbsp;created_at DATETIME NOT NULL,
&nbsp;&nbsp;&nbsp;&nbsp;payload JSON,
&nbsp;&nbsp;&nbsp;&nbsp;PRIMARY KEY(id, created_at)
)

PARTITION BY RANGE (TO_DAYS(created_at)) (
&nbsp;&nbsp;&nbsp;&nbsp;PARTITION p202604 VALUES LESS THAN (TO_DAYS('2026-05-01')),
&nbsp;&nbsp;&nbsp;&nbsp;PARTITION p202605 VALUES LESS THAN (TO_DAYS('2026-06-01')),
&nbsp;&nbsp;&nbsp;&nbsp;PARTITION p202606 VALUES LESS THAN (TO_DAYS('2026-07-01'))
);</pre>
<p>With partitioning, dropping old data becomes:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">ALTER TABLE events DROP PARTITION p202604;</pre>
<p>This operation is dramatically faster than running a DELETE.</p>
<p>Dropping a partition:</p>
<ul>
<li>Removes an entire physical partition</li>
<li>Avoids row-by-row DELETE</li>
<li>Avoids undo generation for each row</li>
<li>Avoids secondary index maintenance per row</li>
<li>Minimizes redo generation</li>
<li>Is nearly metadata-only</li>
</ul>
<p>This can remove millions or billions of rows in a matter of seconds without the same large cost of DELETE.</p>
<h1></h1>
<h2>The Problem: pt-archiver is Not Partition-Aware</h2>
<p>Unfortunately, pt-archiver does not automatically understand partitioning strategies.</p>
<p>Even if the table is partitioned or the retention policy perfectly matches partition boundaries, pt-archiver still executes DELETE statements.</p>
<p>Example:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">pt-archiver 
&nbsp;&nbsp;--where &quot;created_at &amp;lt; NOW() - INTERVAL 90 DAY&quot; 
&nbsp;&nbsp;--purge</pre>
<p>Internally, this still produces <strong><span style="color: #339966">DELETE &#8230;</span></strong> instead of <strong><span style="color: #339966">ALTER TABLE &#8230; DROP PARTITION &#8230;</span></strong></p>
<p>This means organizations may lose the major operational benefits of partitioning, or they need to implement custom scripts for managing the selection of rows to copy using pt-archiver and then use DROP PARTITION separately from the tool. That is doable, and to be honest, not too complicated, but why not make pt-archiver aware of partitioning for some specific use cases?</p>
<h1></h1>
<h2>Extending pt-archiver with Pulg-ins</h2>
<p>Fortunately, pt-archiver supports Perl plug-ins.</p>
<p>A plug-in can do plenty of things. Like: inspect runtime conditions, interact with MySQL, override behaviors, and execute custom logic</p>
<p>This gives us an opportunity to implement partition-aware retention handling.</p>
<p>The plug-in can:</p>
<ol>
<li>Inspect partition definitions</li>
<li>Analyze the WHERE condition</li>
<li>Determine which partitions are fully expired</li>
<li>Execute ALTER TABLE DROP PARTITION</li>
<li>Prevent row-by-row DELETE processing</li>
</ol>
<p>This approach combines the scheduling/orchestration power of pt-archiver with the efficiency of partition pruning.</p>
<h3>Plug-in Design</h3>
<p>Our plug-in will:</p>
<ul>
<li>Connect using the pt-archiver DB handle</li>
<li>Inspect INFORMATION_SCHEMA.PARTITIONS</li>
<li>Identify partitions older than the retention cutoff</li>
<li>Issue DROP PARTITION statements</li>
<li>Log actions</li>
<li>Skip DELETE processing</li>
</ul>
<p>Assumptions:</p>
<ul>
<li>The table is RANGE partitioned</li>
<li>Partitions are DATETIME based using the TO_DAYS() function to define ranges</li>
<li>Partition naming convention contains dates</li>
<li>Retention policy aligns with partition boundaries; if the plugin cannot determine a specific boundary, pt-archiver does nothing</li>
</ul>
<h1></h1>
<h2>Full Perl Plug-in for pt-archiver</h2>
</p>
<pre class="urvanov-syntax-highlighter-plain-tag">package pt_archiver_partition_drop;

use strict;
use warnings;

sub new {
&nbsp;&nbsp;&nbsp;&nbsp;my ($class, %args) = @_;
&nbsp;&nbsp;&nbsp;&nbsp;my $self = {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dbh&nbsp; &nbsp; &nbsp; &nbsp; =&amp;gt; $args{dbh},
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;db &nbsp; &nbsp; &nbsp; &nbsp; =&amp;gt; $args{db},
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tbl&nbsp; &nbsp; &nbsp; &nbsp; =&amp;gt; $args{tbl},
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;statistics =&amp;gt; {},
&nbsp;&nbsp;&nbsp;&nbsp;};

&nbsp;&nbsp;&nbsp;&nbsp;bless $self, $class;
&nbsp;&nbsp;&nbsp;&nbsp;return $self;
}

sub statistics {
&nbsp;&nbsp;&nbsp;&nbsp;my ($self) = @_;
&nbsp;&nbsp;&nbsp;&nbsp;return $self-&amp;gt;{statistics};
}


sub before_begin {
&nbsp;&nbsp;&nbsp;&nbsp;my ($self) = @_;
 &nbsp;&nbsp;&nbsp;my $dbh = $self-&amp;gt;{dbh} or die &quot;Missing dbh from pt-archivern&quot;;
&nbsp;&nbsp;&nbsp;&nbsp;my $db&nbsp; = $self-&amp;gt;{db}&nbsp; or die &quot;Missing db from pt-archiver plugin argsn&quot;;
&nbsp;&nbsp;&nbsp;&nbsp;my $tbl = $self-&amp;gt;{tbl} or die &quot;Missing tbl from pt-archiver plugin argsn&quot;;
&nbsp;&nbsp;&nbsp;&nbsp;my $where&nbsp; = _get_cmdline_option('where');
&nbsp;&nbsp;&nbsp;&nbsp;my $dryrun = $ENV{PT_PARTITION_DROP_DRY_RUN} ? 1 : 0;

&nbsp;&nbsp;&nbsp;&nbsp;die &quot;Missing --where from original command linen&quot; unless $where;

&nbsp;&nbsp;&nbsp;&nbsp;print &quot;PLUGIN before_begin calledn&quot;;
&nbsp;&nbsp;&nbsp;&nbsp;print &quot;DB=$db TABLE=$tbln&quot;;
&nbsp;&nbsp;&nbsp;&nbsp;print &quot;WHERE=$wheren&quot;;
&nbsp;&nbsp;&nbsp;&nbsp;print &quot;PLUGIN_DRY_RUN=$dryrunn&quot;;

&nbsp;&nbsp;&nbsp;&nbsp;my ($column, $cutoff_date) = _parse_where($where);

&nbsp;&nbsp;&nbsp;&nbsp;my $partitions = _get_partitions($dbh, $db, $tbl);

&nbsp;&nbsp;&nbsp;&nbsp;if (!@$partitions) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;Table `$db`.`$tbl` is not partitioned. Refusing DELETE.n&quot;;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(0);
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;my $partition_expr = $partitions-&amp;gt;[0]-&amp;gt;{expression};
&nbsp;&nbsp;&nbsp;&nbsp;die &quot;Missing PARTITION_EXPRESSIONn&quot;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unless defined $partition_expr &amp;amp;&amp;amp; length $partition_expr;

&nbsp;&nbsp;&nbsp;&nbsp;print &quot;Partition expression: $partition_exprn&quot;;

&nbsp;&nbsp;&nbsp;&nbsp;my $cutoff_value = _evaluate_cutoff(
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$dbh,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$partition_expr,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$column,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$cutoff_date,
&nbsp;&nbsp;&nbsp;&nbsp;);

&nbsp;&nbsp;&nbsp;&nbsp;print &quot;Cutoff date: $cutoff_daten&quot;;
&nbsp;&nbsp;&nbsp;&nbsp;print &quot;Cutoff boundary value: $cutoff_valuen&quot;;

&nbsp;&nbsp;&nbsp;&nbsp;my $matched;

&nbsp;&nbsp;&nbsp;&nbsp;for my $p (@$partitions) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;next if !defined $p-&amp;gt;{description};
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;next if uc($p-&amp;gt;{description}) eq 'MAXVALUE';

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ($p-&amp;gt;{description} == $cutoff_value) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$matched = $p;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;last;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;}


&nbsp;&nbsp;&nbsp;&nbsp;if (!$matched) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;No exact partition boundary matches cutoff $cutoff_value. Refusing DELETE.n&quot;;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(0);
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;print &quot;Matched boundary partition: $matched-&amp;gt;{name}, position $matched-&amp;gt;{position}n&quot;;

&nbsp;&nbsp;&nbsp;&nbsp;my @drop;

&nbsp;&nbsp;&nbsp;&nbsp;for my $p (@$partitions) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;next if !defined $p-&amp;gt;{description};
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;next if uc($p-&amp;gt;{description}) eq 'MAXVALUE';

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ($p-&amp;gt;{position} &amp;lt;= $matched-&amp;gt;{position}) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;push @drop, $p-&amp;gt;{name};
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;Eligible for DROP: $p-&amp;gt;{name}, boundary $p-&amp;gt;{description}n&quot;;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;if (!@drop) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;No partitions eligible for DROP. Refusing DELETE.n&quot;;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(0);
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;my $sql = sprintf(
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;ALTER TABLE %s.%s DROP PARTITION %s&quot;,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_quote_ident($db),
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_quote_ident($tbl),
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;join(&quot;, &quot;, map { _quote_ident($_) } @drop),
&nbsp;&nbsp;&nbsp;&nbsp;);

&nbsp;&nbsp;&nbsp;&nbsp;print &quot;SQL: $sqln&quot;;

&nbsp;&nbsp;&nbsp;&nbsp;if ($dryrun) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;PT_PARTITION_DROP_DRY_RUN enabled. Not executing DROP PARTITION.n&quot;;
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;else {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$dbh-&amp;gt;do($sql);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;Dropped partitions: &quot; . join(&quot;, &quot;, @drop) . &quot;n&quot;;
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;$self-&amp;gt;{statistics}-&amp;gt;{partitions_dropped} = scalar @drop;

&nbsp;&nbsp;&nbsp;&nbsp;exit(0);
}


sub _parse_where {
&nbsp;&nbsp;&nbsp;&nbsp;my ($where) = @_;

&nbsp;&nbsp;&nbsp;&nbsp;$where =~ s/^s+|s+$//g;

&nbsp;&nbsp;&nbsp;&nbsp;die &quot;Only WHERE format supported: created_at &amp;lt; 'YYYY-MM-DD'n&quot;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unless $where =~ /^`?([A-Za-z0-9_]+)`?s*&amp;lt;s*'(d{4}-d{2}-d{2})'s*$/;

&nbsp;&nbsp;&nbsp;&nbsp;return ($1, $2);
}

sub _evaluate_cutoff {
&nbsp;&nbsp;&nbsp;&nbsp;my ($dbh, $partition_expr, $column, $cutoff_date) = @_;

&nbsp;&nbsp;&nbsp;&nbsp;my $expr = $partition_expr;
&nbsp;&nbsp;&nbsp;&nbsp;$expr =~ s/`//g;

&nbsp;&nbsp;&nbsp;&nbsp;die &quot;Partition expression does not reference column `$column`: $partition_exprn&quot;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unless $expr =~ /bQ$columnEb/i;

&nbsp;&nbsp;&nbsp;&nbsp;$expr =~ s/bQ$columnEb/'$cutoff_date'/ig;

&nbsp;&nbsp;&nbsp;&nbsp;die &quot;Unsafe generated expression: $exprn&quot;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unless $expr =~ /^[A-Za-z0-9_s()+-*/,.'&quot;:]+$/;

&nbsp;&nbsp;&nbsp;&nbsp;my $sql = &quot;SELECT $expr&quot;;

&nbsp;&nbsp;&nbsp;&nbsp;print &quot;Boundary evaluation SQL: $sqln&quot;;

&nbsp;&nbsp;&nbsp;&nbsp;my ($value) = $dbh-&amp;gt;selectrow_array($sql);

&nbsp;&nbsp;&nbsp;&nbsp;die &quot;Cannot evaluate cutoff expression: $sqln&quot;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unless defined $value;

&nbsp;&nbsp;&nbsp;&nbsp;return $value;
}

sub _get_partitions {
&nbsp;&nbsp;&nbsp;&nbsp;my ($dbh, $db, $tbl) = @_;

&nbsp;&nbsp;&nbsp;&nbsp;my $sql = q{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SELECT
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PARTITION_NAME,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PARTITION_DESCRIPTION,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PARTITION_EXPRESSION,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PARTITION_ORDINAL_POSITION
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FROM INFORMATION_SCHEMA.PARTITIONS
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE TABLE_SCHEMA = ?
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AND TABLE_NAME = ?
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AND PARTITION_NAME IS NOT NULL
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ORDER BY PARTITION_ORDINAL_POSITION
&nbsp;&nbsp;&nbsp;&nbsp;};

&nbsp;&nbsp;&nbsp;&nbsp;my $sth = $dbh-&amp;gt;prepare($sql);
&nbsp;&nbsp;&nbsp;&nbsp;$sth-&amp;gt;execute($db, $tbl);
&nbsp;&nbsp;&nbsp;&nbsp;my @partitions;

&nbsp;&nbsp;&nbsp;&nbsp;while (my $row = $sth-&amp;gt;fetchrow_hashref()) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;push @partitions, {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name&nbsp; &nbsp; &nbsp; &nbsp; =&amp;gt; $row-&amp;gt;{PARTITION_NAME},
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;description =&amp;gt; $row-&amp;gt;{PARTITION_DESCRIPTION},
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;expression&nbsp; =&amp;gt; $row-&amp;gt;{PARTITION_EXPRESSION},
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;position&nbsp; &nbsp; =&amp;gt; $row-&amp;gt;{PARTITION_ORDINAL_POSITION},
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;return @partitions;
}


sub _get_cmdline_option {

&nbsp;&nbsp;&nbsp;&nbsp;my ($name) = @_;

&nbsp;&nbsp;&nbsp;&nbsp;my $opt = &quot;--$name&quot;;

&nbsp;&nbsp;&nbsp;&nbsp;for (my $i = 0; $i &amp;lt; @ARGV; $i++) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ($ARGV[$i] eq $opt &amp;amp;&amp;amp; defined $ARGV[$i + 1]) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return $ARGV[$i + 1];
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ($ARGV[$i] =~ /^Q$optE=(.*)$/) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return $1;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;if (open my $fh, '&amp;lt;', &quot;/proc/$$/cmdline&quot;) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local $/;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;my $raw = &amp;lt;$fh&amp;gt;;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;close $fh;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;my @cmd = split //, $raw;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (my $i = 0; $i &amp;lt; @cmd; $i++) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ($cmd[$i] eq $opt &amp;amp;&amp;amp; defined $cmd[$i + 1]) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return $cmd[$i + 1];
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ($cmd[$i] =~ /^Q$optE=(.*)$/) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return $1;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;return undef;
}



sub _quote_ident {

&nbsp;&nbsp;&nbsp;&nbsp;my ($ident) = @_;

&nbsp;&nbsp;&nbsp;&nbsp;die &quot;Invalid identifier: $identn&quot;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unless defined $ident &amp;amp;&amp;amp; $ident =~ /^[A-Za-z0-9_]+$/;

&nbsp;&nbsp;&nbsp;&nbsp;return &quot;`$ident`&quot;;
}

1;</pre>
<p>Create the file named  <b>pt_archiver_partition_drop.pm</b> into the <b>/usr/local/share/perl5</b> path.</p>
<p>Also set the environment variable <b>PERL5LIB</b> to let pt-archiver where to find the Perl package</p>
<pre class="urvanov-syntax-highlighter-plain-tag">export PERL5LIB=/usr/local/share/perl5</pre>
</p>
<h1></h1>
<h2>Example Usage</h2>
<p>First, create the partitioned table events and insert some fake data.</p>
<pre class="urvanov-syntax-highlighter-plain-tag">DROP TABLE IF EXISTS events;


CREATE TABLE events (
&nbsp;&nbsp;id BIGINT NOT NULL,
&nbsp;&nbsp;created_at DATETIME NOT NULL,
&nbsp;&nbsp;payload JSON DEFAULT NULL,
&nbsp;&nbsp;PRIMARY KEY (id, created_at)
)
PARTITION BY RANGE (TO_DAYS(created_at)) (
&nbsp;&nbsp;PARTITION p202604 VALUES LESS THAN (TO_DAYS('2026-05-01')),
&nbsp;&nbsp;PARTITION p202605 VALUES LESS THAN (TO_DAYS('2026-06-01')),
&nbsp;&nbsp;PARTITION p202606 VALUES LESS THAN (TO_DAYS('2026-07-01')),
&nbsp;&nbsp;PARTITION pmax VALUES LESS THAN MAXVALUE
);

INSERT INTO events (id, created_at, payload) VALUES

-- p202604
(1,&nbsp; '2026-04-01 08:00:00', JSON_OBJECT('event', 'login',&nbsp; &nbsp; 'user', 'alice')),
(2,&nbsp; '2026-04-03 09:15:00', JSON_OBJECT('event', 'view', &nbsp; &nbsp; 'page', 'home')),
(3,&nbsp; '2026-04-05 10:30:00', JSON_OBJECT('event', 'click',&nbsp; &nbsp; 'button', 'signup')),
(4,&nbsp; '2026-04-08 11:45:00', JSON_OBJECT('event', 'search', &nbsp; 'term', 'mysql')),
(5,&nbsp; '2026-04-10 12:00:00', JSON_OBJECT('event', 'purchase', 'amount', 100)),
(6,&nbsp; '2026-04-14 13:20:00', JSON_OBJECT('event', 'logout', &nbsp; 'user', 'alice')),
(7,&nbsp; '2026-04-18 14:35:00', JSON_OBJECT('event', 'download', 'file', 'report.pdf')),
(8,&nbsp; '2026-04-22 15:50:00', JSON_OBJECT('event', 'upload', &nbsp; 'file', 'image.png')),
(9,&nbsp; '2026-04-26 16:05:00', JSON_OBJECT('event', 'click',&nbsp; &nbsp; 'button', 'buy')),
(10, '2026-04-30 23:59:59', JSON_OBJECT('event', 'month_end')),

-- p202605

(11, '2026-05-01 00:00:00', JSON_OBJECT('event', 'login',&nbsp; &nbsp; 'user', 'bob')),
(12, '2026-05-03 08:10:00', JSON_OBJECT('event', 'view', &nbsp; &nbsp; 'page', 'pricing')),
(13, '2026-05-06 09:20:00', JSON_OBJECT('event', 'search', &nbsp; 'term', 'percona')),
(14, '2026-05-09 10:30:00', JSON_OBJECT('event', 'purchase', 'amount', 250)),
(15, '2026-05-12 11:40:00', JSON_OBJECT('event', 'logout', &nbsp; 'user', 'bob')),
(16, '2026-05-16 12:50:00', JSON_OBJECT('event', 'download', 'file', 'backup.sql')),
(17, '2026-05-20 13:00:00', JSON_OBJECT('event', 'upload', &nbsp; 'file', 'data.csv')),
(18, '2026-05-24 14:10:00', JSON_OBJECT('event', 'click',&nbsp; &nbsp; 'button', 'subscribe')),
(19, '2026-05-28 15:20:00', JSON_OBJECT('event', 'view', &nbsp; &nbsp; 'page', 'docs')),
(20, '2026-05-31 23:59:59', JSON_OBJECT('event', 'month_end')),

-- p202606

(21, '2026-06-01 00:00:00', JSON_OBJECT('event', 'login',&nbsp; &nbsp; 'user', 'carol')),
(22, '2026-06-03 08:05:00', JSON_OBJECT('event', 'search', &nbsp; 'term', 'partitioning')),
(23, '2026-06-06 09:15:00', JSON_OBJECT('event', 'view', &nbsp; &nbsp; 'page', 'dashboard')),
(24, '2026-06-09 10:25:00', JSON_OBJECT('event', 'purchase', 'amount', 500)),
(25, '2026-06-12 11:35:00', JSON_OBJECT('event', 'logout', &nbsp; 'user', 'carol')),
(26, '2026-06-16 12:45:00', JSON_OBJECT('event', 'login',&nbsp; &nbsp; 'user', 'dave')),
(27, '2026-06-20 13:55:00', JSON_OBJECT('event', 'download', 'file', 'archive.zip')),
(28, '2026-06-24 14:05:00', JSON_OBJECT('event', 'upload', &nbsp; 'file', 'video.mp4')),
(29, '2026-06-28 15:15:00', JSON_OBJECT('event', 'click',&nbsp; &nbsp; 'button', 'checkout')),
(30, '2026-06-30 23:59:59', JSON_OBJECT('event', 'month_end')),

-- pmax
(31, '2026-07-01 00:00:00', JSON_OBJECT('event', 'login',&nbsp; &nbsp; 'user', 'eve')),
(32, '2026-07-05 08:30:00', JSON_OBJECT('event', 'view', &nbsp; &nbsp; 'page', 'future')),
(33, '2026-07-10 09:45:00', JSON_OBJECT('event', 'search', &nbsp; 'term', 'maxvalue')),
(34, '2026-08-01 10:00:00', JSON_OBJECT('event', 'purchase', 'amount', 750)),
(35, '2026-09-01 11:15:00', JSON_OBJECT('event', 'retained_future'));</pre>
<p>&nbsp;</p>
<p>Now you can run the following command to delete all rows before the 1st of May, which, by the way, matches the entire first partition in the table.</p>
<pre class="urvanov-syntax-highlighter-plain-tag">pt-archiver 
&nbsp;&nbsp;--source h=localhost,D=mydb,t=events,m=pt_archiver_partition_drop 
&nbsp;&nbsp;--where &quot;created_at &amp;lt; '2026-05-01'&quot; 
&nbsp;&nbsp;--purge</pre>
<p>&nbsp;</p>
<p>Notice the Perl plugin must be indicated with the <b>m</b> option in the DSN string.</p>
<p>In practice:</p>
<ul>
<li>pt-archiver initializes</li>
<li>The plug-in runs</li>
<li>Partitions are dropped</li>
<li>No DELETE statements are executed</li>
</ul>
<p>Here is what you get from the execution of the above command:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">PLUGIN before_begin called
DB=mydb TABLE=events
WHERE=created_at &amp;lt; '2026-05-01'
PLUGIN_DRY_RUN=0
Partition expression: to_days(`created_at`)
Boundary evaluation SQL: SELECT to_days('2026-05-01')
Cutoff date: 2026-05-01
Cutoff boundary value: 740102
Matched boundary partition: p202604, position 1
Eligible for DROP: p202604, boundary 740102
SQL: ALTER TABLE `mydb`.`events` DROP PARTITION `p202604`
Dropped partitions: p202604</pre>
<p>You can simply verify the table has been managed correctly:</p>
<p><span style="color: #339966">SELECT * FROM mydb.events;</span></p>
<p><span style="color: #339966">SHOW CREATE TABLE mydb.events;</span></p>
<p>&nbsp;</p>
<p>Now TRUNCATE the table and recreate the data and try now to specify the where conditions that match a RANGE that is not the first in the list of the boundaries.</p>
<pre class="urvanov-syntax-highlighter-plain-tag">pt-archiver 
&nbsp;&nbsp;--source h=localhost,D=mydb,t=events,m=pt_archiver_partition_drop 
&nbsp;&nbsp;--where &quot;created_at &amp;lt; '2026-06-01'&quot; 
&nbsp;&nbsp;--purge</pre>
<p>You should get:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">PLUGIN before_begin called
DB=mydb TABLE=events
WHERE=created_at &amp;lt; '2026-06-01'
PLUGIN_DRY_RUN=0
Partition expression: to_days(`created_at`)
Boundary evaluation SQL: SELECT to_days('2026-06-01')
Cutoff date: 2026-06-01
Cutoff boundary value: 740133
Matched boundary partition: p202605, position 2
Eligible for DROP: p202604, boundary 740102
Eligible for DROP: p202605, boundary 740133
SQL: ALTER TABLE `mydb`.`events` DROP PARTITION `p202604`, `p202605`
Dropped partitions: p202604, p202605</pre>
<p>In this case, two partitions have been identified and dropped.</p>
<p>&nbsp;</p>
<p>Truncate the table and recreate the data again. Try now to provide a WHERE condition that does not match any of the boundaries in the RANGE.</p>
<pre class="urvanov-syntax-highlighter-plain-tag">pt-archiver 
&nbsp;&nbsp;--source h=localhost,D=mydb,t=events,m=pt_archiver_partition_drop 
&nbsp;&nbsp;--where &quot;created_at &amp;lt; '2026-04-25'&quot; 
&nbsp;&nbsp;--purge</pre>
<p>&nbsp;</p>
<p>You get the following:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">PLUGIN before_begin called
DB=mydb TABLE=events
WHERE=created_at &amp;lt; '2026-04-25'
PLUGIN_DRY_RUN=0
Partition expression: to_days(`created_at`)
Boundary evaluation SQL: SELECT to_days('2026-04-25')
Cutoff date: 2026-04-25
Cutoff boundary value: 740096
No exact partition boundary matches cutoff 740096. Refusing DELETE.</pre>
<p>As expected, the tool now refuses to execute anything if it doesn’t find an exact match.</p>
<p>&nbsp;</p>
<h2>Operational Benefits</h2>
<p>This approach provides major advantages.</p>
<p>Dropping partitions is vastly faster than deleting rows, and minimal binary logging is needed, compared to billions of row deletes. There is no massive transactional overhead for managing undo logs and purging. You get then a better InnoDB Buffer Pool stability because of less page churn.</p>
<p>In the end, retention jobs are completed quickly and consistently in a predictable way and at the minimal cost.</p>
<p>&nbsp;</p>
<h2>Important Caveats</h2>
<h3>Partition Boundaries Must Match Retention Policy</h3>
<p>If partitions contain mixed retention windows, DROP PARTITION may remove too much data. For this reason, ensure correct partition design.</p>
<p>Recommended:</p>
<ul>
<li>daily partitions</li>
<li>weekly partitions</li>
<li>monthly partitions</li>
</ul>
<p>aligned with business retention requirements.</p>
<h3>Metadata Locks</h3>
<p><span style="color: #339966">ALTER TABLE DROP PARTITION</span> still acquires metadata locks.</p>
<p>Test carefully in production.</p>
<h3>Backup Awareness</h3>
<p>Ensure dropped partitions are no longer needed before removal or use pt-archiver to also copy the data into a remote server or dump the data into a CSV file before running the DROP PARTITION.</p>
<p>&nbsp;</p>
<h2>Possible Enhancements</h2>
<p>The plug-in can be extended further.</p>
<p>Potential improvements:</p>
<ul>
<li>Support for daily partitions</li>
<li>Support for UNIX timestamp partitions</li>
<li>Dry-run reporting</li>
<li>Automatic partition creation</li>
<li>Push Slack notifications</li>
<li>Export Prometheus metrics</li>
<li>Safety checks for replicas</li>
<li>GTID-aware orchestration</li>
<li>Integration with pt-online-schema-change workflows</li>
</ul>
<p>These are just some ideas I had meanwhile doing my tests. What you can do by implementing a Perl plugin is only limited by your imagination and your real needs.</p>
<h1></h1>
<h2>Conclusion</h2>
<p>pt-archiver remains an excellent tool for implementing retention policies and archival workflows.</p>
<p>However, DELETE-based purging becomes increasingly expensive at scale, even with proper indexing and chunked processing.</p>
<p>For large time-series or historical datasets, RANGE partitioning is often a dramatically superior strategy.</p>
<p>The challenge is that pt-archiver does not natively leverage partition-level operations.</p>
<p>Fortunately, its Perl plug-in architecture allows advanced users to extend its behavior and implement partition-aware cleanup logic.</p>
<p>By combining:</p>
<ul>
<li>pt-archiver orchestration</li>
<li>MySQL RANGE partitioning</li>
<li>Custom Perl plug-ins</li>
</ul>
<p>Organizations can achieve:</p>
<ul>
<li>Faster retention enforcement</li>
<li>Lower operational overhead</li>
<li>Smaller replication impact</li>
<li>Dramatically improved scalability</li>
</ul>
<p>For large MySQL deployments, this hybrid approach can turn multi-hour purge operations into near-instant metadata operations.</p>
<p>The use case presented in this article is limited to a specific scenario, but you can reuse it or customize it if you have a different kind of RANGE partitioning, for example, not using TO_DAYS().</p>
<p>Take this as just an example of how you can extend pt-archiver. What you can do for real is driven by your needs and/or only limited by your imagination.</p>
<p>More info about extending pt-archiver:<br />
<a href="https://docs.percona.com/percona-toolkit/pt-archiver.html#extending">https://docs.percona.com/percona-toolkit/pt-archiver.html#extending</a></p>
<p>&nbsp;</p>
<p>The post <a href="https://www.percona.com/blog/extending-pt-archiver-with-a-partition-aware-plug-in-for-fast-retention-policy-enforcement/">Extending pt-archiver with a Partition-Aware Plug-in for Fast Retention Policy Enforcement</a> appeared first on <a href="https://www.percona.com">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/extending-pt-archiver-with-a-partition-aware-plug-in-for-fast-retention-policy-enforcement/">Extending pt-archiver with a Partition-Aware Plug-in for Fast Retention Policy Enforcement</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Java Connector 3.5.9, 3.4.3, 3.3.5, and 2.7.14 now available</title>
        <link>https://mariadb.com/resources/blog/mariadb-java-connector-3-5-9-3-4-3-3-3-5-and-2-7-14-now-available/</link>
        <pubDate>Mon, 15 Jun 2026 18:14:03 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>MariaDB is pleased to announce the immediate availability of the MariaDB Connector/J 3.5.9, 3.4.3, 3.3.5, and 2.7.14 releases. Download Now […]</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-java-connector-3-5-9-3-4-3-3-3-5-and-2-7-14-now-available/">MariaDB Java Connector 3.5.9, 3.4.3, 3.3.5, and 2.7.14 now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB is pleased to announce the immediate availability of the MariaDB Connector/J 3.5.9, 3.4.3, 3.3.5, and 2.7.14 releases. Download Now Notable items in this release include: Notable items in this release include: Notable items in this release include: Notable items in this release include: See…</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-java-connector-3-5-9-3-4-3-3-3-5-and-2-7-14-now-available/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/mariadb-java-connector-3-5-9-3-4-3-3-3-5-and-2-7-14-now-available/">MariaDB Java Connector 3.5.9, 3.4.3, 3.3.5, and 2.7.14 now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Group Replication VS Percona XtraDB Cluster: The True Cost of Consistency</title>
        <link>https://www.percona.com/blog/group-replication-vs-percona-xtradb-cluster-the-true-cost-of-consistency/</link>
        <pubDate>Mon, 15 Jun 2026 06:58:17 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Overview When building high-availability MySQL environments, the choice between MySQL Group Replication (GR) and Percona XtraDB Cluster (PXC) often comes down to how they handle the eternal database dilemma: data consistency versus performance.        While both provide “synchronous-like” replication, they approach the problem of stale reads—reading data that has been committed on one node but not … Continued<br />
The post Group Replication VS Percona XtraDB Cluster: The True Cost of Consistency appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/group-replication-vs-percona-xtradb-cluster-the-true-cost-of-consistency/">Group Replication VS Percona XtraDB Cluster: The True Cost of Consistency</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<h2><span style="font-weight: 400">Overview</span></h2>
<p><span style="font-weight: 400">When building high-availability MySQL environments, the choice between MySQL Group Replication (GR) and Percona XtraDB Cluster (PXC) often comes down to how they handle the eternal database dilemma: data consistency versus performance.       <img loading="lazy" decoding="async" class=" wp-image-49842 alignright" src="https://www.percona.com/wp-content/uploads/2026/06/dolphin_vs_goath_small.jpg" alt="" width="546" height="273" /></span></p>
<p><span style="font-weight: 400">While both provide &#8220;synchronous-like&#8221; replication, they approach the problem of </span><b>stale reads</b><span style="font-weight: 400">—reading data that has been committed on one node but not yet applied on another—in distinct ways. Understanding these differences, and the performance penalties associated with fixing them, is critical for any production environment.</span></p>
<h3><span style="font-weight: 400">Technology Overviews</span></h3>
<p><b>MySQL Group Replication (GR)</b></p>
<p><span style="font-weight: 400">Group Replication is the native, albeit more recent, high-availability solution built by Oracle for MySQL. It is based on a distributed state machine architecture and uses the Paxos consensus protocol.</span></p>
<ul>
<li style="font-weight: 400"><b>Mechanism:</b><span style="font-weight: 400"> When a transaction is committed, it is sent to all group members. The members must agree (consensus) on the order of transactions. Once a majority agrees, the transaction is &#8220;certified&#8221; and committed on the originator.</span></li>
<li style="font-weight: 400"><b>Replication Type:</b> <i><span style="font-weight: 400">Virtually synchronous.</span></i><span style="font-weight: 400"> The consensus ensures the data is received and ordered across nodes, but the actual applying of the data to the database happens asynchronously in the background.</span></li>
</ul>
<p><b>Percona XtraDB Cluster (PXC)</b></p>
<p><span style="font-weight: 400">PXC is an open-source enterprise solution based on Percona Server for MySQL and the Galera Replication library, which is the first and most mature virtually synchronous solution for MySQL.</span></p>
<ul>
<li style="font-weight: 400"><b>Mechanism:</b><span style="font-weight: 400"> When a node commits a transaction, it sends it to all other members of the Primary component (active group). All nodes must certify the transaction (check for conflicts), this is done on each node in the cluster, including the node that originates the write-set, before the originating node can finalize the commit.</span></li>
<li style="font-weight: 400"><b>Replication Type:</b> <i><span style="font-weight: 400">Strictly synchronous (up to the certification level)</span></i><span style="font-weight: 400">, asynchronous afterward. If the certification test fails, the node drops the write-set and the cluster rolls back the original transaction. If the test succeeds, however, the transaction commits and the write-set is applied to the rest of the cluster.</span></li>
</ul>
<h2><span style="font-weight: 400">The Battle Against &#8220;Stale Reads&#8221;: Why It Matters</span></h2>
<p><span style="font-weight: 400">The most critical distinction for developers is whether a SELECT query on </span><b>Node B</b><span style="font-weight: 400"> will immediately see the INSERT just performed on </span><b>Node A</b><span style="font-weight: 400">.</span></p>
<p><span style="font-weight: 400">In a distributed system, there is a microsecond-to-millisecond gap between a transaction being globally ordered (everyone knows it happened) and being locally applied (the data is physically readable in the table). Reading executed on a secondary during this gap results in a </span><b>stale read</b><span style="font-weight: 400">.</span></p>
<h3><span style="font-weight: 400">Why is avoiding stale reads so critical?</span></h3>
<p><span style="font-weight: 400">While a stale read might just mean a user temporarily sees their old profile picture after updating it, in many business cases, it breaks the application&#8217;s core logic:</span></p>
<ol>
<li style="font-weight: 400"><b>Financial Transactions:</b><span style="font-weight: 400"> A user deposits $100 on the Primary node and immediately refreshes their balance page, which reads from a Replica. If the read is stale, the balance hasn&#8217;t updated. The user panics, thinking their money is lost.</span></li>
<li style="font-weight: 400"><b>E-commerce &amp; Inventory:</b><span style="font-weight: 400"> A customer buys the last item in stock. The next user immediately loads the product page. A stale read tells the second user the item is still available, leading to a cancelled order and a frustrated customer.</span></li>
<li style="font-weight: 400"><b>Security &amp; Access:</b><span style="font-weight: 400"> A user changes their password or updates a critical permission. If the next authentication request hits a node lagging by just a fraction of a second, their valid login might be rejected, or a revoked session might still be active.</span></li>
</ol>
<p><span style="font-weight: 400">To prevent these scenarios, we must tell the database to enforce strict consistency. But how do GR and PXC handle this, and what does it cost?</span></p>
<h3><span style="font-weight: 400">Consistency Controls Comparison</span></h3>
<p><span style="font-weight: 400">Both Group Replication and Percona XtraDB Cluster provide built-in mechanisms to enforce consistency and eliminate stale reads when your application demands it. However, they approach this problem using entirely different variables and distinct levels of granularity. The table below breaks down the specific controls each technology offers, highlighting exactly what it takes to force a node to serve fresh data.</span></p>
<table>
<thead>
<tr>
<th><b>Feature</b></th>
<th><b>MySQL Group Replication</b></th>
<th><b>Percona XtraDB Cluster</b></th>
</tr>
</thead>
<tbody>
<tr>
<td><b>Default Behavior</b></td>
<td><span style="font-weight: 400">Reads on secondaries may be stale because the applier thread might be lagging after consensus.</span></td>
<td><span style="font-weight: 400">Reads on secondaries may be stale due to asynchronous background applying.</span></td>
</tr>
<tr>
<td><b>Stale Read Fix</b></td>
<td><span style="font-weight: 400">Uses the group_replication_consistency variable.</span></td>
<td><span style="font-weight: 400">Uses the wsrep-sync-wait variable.</span></td>
</tr>
<tr>
<td><b>Consistency Levels</b></td>
<td><span style="font-weight: 400">Offers EVENTUAL, BEFORE, AFTER, and BEFORE_AND_AFTER.</span></td>
<td><span style="font-weight: 400">Offers granular levels from 0 (default, no checks) up to 7 (checks on all READ, UPDATE, DELETE, INSERT, and REPLACE statements).</span></td>
</tr>
<tr>
<td><b>The Fix</b></td>
<td><span style="font-weight: 400">Setting to AFTER ensures the next read is fresh.</span></td>
<td><span style="font-weight: 400">Setting to 7 ensures we have a comparable scenario with GR. However in PXC setting wsrep_sync_wait = 1 will be enough to avoid stale reads.</span></td>
</tr>
</tbody>
</table>
<h2><span style="font-weight: 400">The True Cost of Being Consistent</span></h2>
<p><span style="font-weight: 400">If we know stale reads are bad, why don&#8217;t we just enforce strict consistency everywhere? </span></p>
<p><span style="font-weight: 400">An image can help to understand:</span></p>
<p><img loading="lazy" decoding="async" class="wp-image-49841 alignnone" src="https://www.percona.com/wp-content/uploads/2026/06/dirty_comparative2-1024x566.png" alt="" width="695" height="384" /></p>
<p><span style="font-weight: 400">Because in distributed databases, </span><b>consistency is incredibly expensive.</b><span style="font-weight: 400"> To test this, we used a 3-node internal lab environment to run a Sysbench-based TPC-C derivative test (50/50 read/write split, running for 600 seconds, scaling from 1 to 1024 threads).</span></p>
<p><span style="font-weight: 400">You can find the detailed machine specifications </span><a href="https://github.com/Tusamarco/blogs/blob/master/testmachine/chaos_test_machine.txt"><b>here</b></a><span style="font-weight: 400">. The benchmarks were executed using a TPC-C derivative test based on </span><a href="https://github.com/Tusamarco/sysbench-tpcc"><b>sysbench</b></a><span style="font-weight: 400">. Finally—and crucially—you can review the </span><a href="https://github.com/Tusamarco/blogs/blob/master/testmachine/ps_vs_pxc_configuration.md"><b>configuration files</b></a><span style="font-weight: 400"> used for the tests. I maintained the same baseline MySQL configuration across the board, only adjusting the parameters specific to each replication technology.</span></p>
<p>&nbsp;</p>
<h3><span style="font-weight: 400">Scenario 1: Default (Relaxed) Consistency</span></h3>
<p><i><span style="font-weight: 400">(GR = EVENTUAL, PXC = wsrep-sync-wait 0)</span></i></p>
<p><span style="font-weight: 400">I want to remind, that MySQL CE and Percona Server are running using Group Replication, while PXC is using galera.</span></p>
<p><span style="font-weight: 400">With default settings, both systems allow stale reads.</span></p>
<p><img loading="lazy" decoding="async" class="alignnone size-large wp-image-49838" src="https://www.percona.com/wp-content/uploads/2026/06/CHAOS_tpcc_PXC_VS_PS_eventual_run_tpcc_RepeatableRead-1024x597.png" alt="" width="1024" height="597" /></p>
<p><img decoding="async" loading="lazy" class="alignnone size-large wp-image-49837" src="https://www.percona.com/wp-content/uploads/2026/06/CHAOS_tpcc_PXC_VS_PS_eventual_run_tpcc_ReadCommitted-1024x597.png" alt="" width="1024" height="597" /></p>
<p><span style="font-weight: 400">Both technologies scales well up to 128 threads:</span></p>
<ul>
<li style="font-weight: 400"><b>Group Replication</b><span style="font-weight: 400"> performs exceptionally well, handling up to 15K operations/sec before dropping off after 128 threads.</span></li>
<li style="font-weight: 400"><b>PXC (Galera)</b><span style="font-weight: 400"> is slightly less efficient at peak but scales very nicely and predictably.</span></li>
</ul>
<p><span style="font-weight: 400">At this level, the lag between the moment of commit and the moment the server returns the answer is minimal. But we are entirely exposed to stale reads.</span></p>
<h3><span style="font-weight: 400">Scenario 2: Enforced Consistency (The Cost)</span></h3>
<p><i><span style="font-weight: 400">(GR = AFTER, PXC = wsrep-sync-wait 7)</span></i></p>
<p><span style="font-weight: 400">When we configure the servers to prevent stale reads, the systems must wait for transactions to be fully applied before returning a read. This is where the architectural differences become glaringly apparent:</span></p>
<p><img decoding="async" loading="lazy" class="alignnone size-large wp-image-49835" src="https://www.percona.com/wp-content/uploads/2026/06/CHAOS_tpcc_PXC_VS_PS_after_run_tpcc_ReadCommitted-1024x597.png" alt="" width="1024" height="597" /> <img decoding="async" loading="lazy" class="alignnone size-large wp-image-49836" src="https://www.percona.com/wp-content/uploads/2026/06/CHAOS_tpcc_PXC_VS_PS_after_run_tpcc_RepeatableRead-1024x597.png" alt="" width="1024" height="597" /></p>
<ul>
<li style="font-weight: 400"><b>PXC (Galera):</b><span style="font-weight: 400"> Performance drops but not too much from a peak of ~9K ops/sec (in the previous test)  to roughly </span><b>~8.5K ops/sec</b><span style="font-weight: 400">. This is a hit but not huge and the database remains highly functional and stable.</span></li>
<li style="font-weight: 400"><b>Group Replication:</b><span style="font-weight: 400"> Performance catastrophically drops from ~15K ops/sec (in the previous test) to a staggering </span><b>~3.8K ops/sec</b><span style="font-weight: 400">.</span></li>
</ul>
<h3><span style="font-weight: 400">This is the crucial takeaway</span></h3>
<p><span style="font-weight: 400">Enforcing strict consistency in Group Replication results in a massive ~75% performance penalty. The latency between the commit and the server response increases significantly compared to PXC. </span></p>
<h2><span style="font-weight: 400">The intermediate way</span></h2>
<p><span style="font-weight: 400">There is another approach which is to inject the higher consistency only when it is really needed.</span></p>
<p><b>The Solution: Session-Level Consistency</b><span style="font-weight: 400"> You do not need, and should not use, full consistency at the global level for general cases. Instead, force consistency </span><i><span style="font-weight: 400">only when and where it is critical</span></i><span style="font-weight: 400">.</span></p>
<p><span style="font-weight: 400">While for Group Replication there is no support for SQL injection hints like SELECT /*+ SET_VAR(&#8230;) */, you can enforce this at the session level right before a critical read:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">SET SESSION group_replication_consistency = 'AFTER';
-- OR for PXC:
SET SESSION wsrep_sync_wait = 7;</pre>
<p>&nbsp;</p>
<p><span style="font-weight: 400">To note that  PXC offers more flexibility and you can use hints:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">select /*+ SET_VAR(wsrep_sync_wait=7) */ @@session.wsrep_sync_wait ,@@global.wsrep_sync_wait;
+---------------------------+--------------------------+
| @@session.wsrep_sync_wait | @@global.wsrep_sync_wait |
+---------------------------+--------------------------+
|                         7 |                        0 |
+---------------------------+--------------------------+</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><span style="font-weight: 400">By isolating these variables to specific sessions (like the immediate redirect after a password change or a checkout process), you ensure data integrity exactly where the business requires it, while allowing the rest of your application to enjoy the high-speed performance of relaxed consistency. </span></p>
<p><img decoding="async" loading="lazy" class="alignnone size-large wp-image-49839" src="https://www.percona.com/wp-content/uploads/2026/06/CHAOS_tpcc_PXC_VS_PS_partial_run_tpcc_ReadCommitted-1024x597.png" alt="" width="1024" height="597" /> <img decoding="async" loading="lazy" class="alignnone size-large wp-image-49840" src="https://www.percona.com/wp-content/uploads/2026/06/CHAOS_tpcc_PXC_VS_PS_partial_run_tpcc_RepeatableRead-1024x597.png" alt="" width="1024" height="597" /></p>
<p><b>PXC:</b><span style="font-weight: 400"> The performance drop is minimal and the solution is able to provide a consistent delivery with nice scalability up to 256 threads.</span></p>
<p><b>Group Replication: </b><span style="font-weight: 400">The solution suffers from a significant drop, not as if we set the AFTER condition at global level, but still we see a drop of ~52%. </span></p>
<p><span style="font-weight: 400">Comparing the two solutions we can see that PXC is able to deal with the additional requested consistency better. </span></p>
<p>&nbsp;</p>
<h2><span style="font-weight: 400">Additional differences</span></h2>
<p><span style="font-weight: 400">But these are not the only differences we can immediately see.</span><span style="font-weight: 400"><br />
</span><span style="font-weight: 400">Performing a comparison about resources utilization, we can see that while both solutions </span><i><span style="font-weight: 400">move</span></i><span style="font-weight: 400"> the same amount of data as IO operations:</span></p>
<p><img decoding="async" loading="lazy" class="alignnone size-large wp-image-49846" src="https://www.percona.com/wp-content/uploads/2026/06/pxc_vs_gr_disk_util-1024x500.png" alt="" width="1024" height="500" /></p>
<p>&nbsp;</p>
<p><img decoding="async" loading="lazy" class="alignnone size-large wp-image-49847" src="https://www.percona.com/wp-content/uploads/2026/06/pxc_vs_gr_memory_used-1024x514.png" alt="" width="1024" height="514" /></p>
<p><span style="font-weight: 400">Yes, for exactly the same load and traffic Group Replication </span><i><span style="font-weight: 400">consumes</span></i><span style="font-weight: 400"><strong> 8GB</strong> more than PXC, which in this environment represents 26% memory more, over total available.</span></p>
<p><img decoding="async" loading="lazy" class="alignnone size-large wp-image-49845" src="https://www.percona.com/wp-content/uploads/2026/06/pxc_vs_gr_cpu-1024x507.png" alt="" width="1024" height="507" /></p>
<p><span style="font-weight: 400">Cost that is reflected also as CPU utilization.</span></p>
<p>&nbsp;</p>
<h2><span style="font-weight: 400">Conclusion: How to Survive the Cost</span></h2>
<p><span style="font-weight: 400">How impactful is enforcing strict consistency at a global level in a production environment? </span><b>Massively.</b><span style="font-weight: 400"> If you blindly enforce strict consistency globally without understanding your architecture, you will decimate your database throughput. Here is the reality of how the two solutions handle that tax:</span></p>
<ul>
<li style="font-weight: 400"><b>The Group Replication Reality:</b><span style="font-weight: 400"> By default (using </span><span style="font-weight: 400">EVENTUAL</span><span style="font-weight: 400"> consistency), MySQL Group Replication behaves essentially as semi-synchronous replication paired with an automated topology manager </span><i><span style="font-weight: 400">(see <a href="https://www.percona.com/blog/the-failover-brownout-rethinking-high-availability-in-mysql-group-replication/">The Failover Brownout: Rethinking High Availability in MySQL Group Replication</a>)</span></i><span style="font-weight: 400">. The Primary is allowed to forge ahead and serve traffic even if the Secondaries are lagging significantly behind. The moment you demand strict consistency, the Primary is violently tethered back to the rest of the cluster, and its performance drops off a cliff as it waits for the slowest node.</span></li>
<li style="font-weight: 400"><b>The PXC Advantage:</b><span style="font-weight: 400"> Percona XtraDB Cluster (PXC) absorbs the &#8220;consistency penalty&#8221; much more gracefully. While varying consistency levels exist in PXC, adjusting them does not cause the same dramatic throughput shock seen in MGR. This is because PXC enforces a virtually synchronous, high-consistency baseline from the start. It simply does not allow the node receiving writes to deviate too far from the rest of the cluster. You pay a baseline performance tax upfront, but in exchange, you get guaranteed, ironclad High Availability out of the box.</span></li>
</ul>
<p><b>The Final Verdict</b><span style="font-weight: 400"> Modifying consistency values at the global server level should only be done after rigorous load testing and a complete understanding of the performance tax you are about to pay.</span></p>
<p><span style="font-weight: 400">Ultimately, it comes down to choosing the right tool for your specific SLA:</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">If your architecture demands a true, virtually synchronous solution with strict High Availability out of the box, </span><b>PXC</b><span style="font-weight: 400"> is the purpose-built engine for the job.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">If you are looking for a highly automated, semi-synchronous solution, </span><b>Group Replication</b><span style="font-weight: 400"> delivers excellent default performance—but tuning it to mimic PXC&#8217;s strict consistency will cost you heavily in throughput.</span></li>
</ul>
<p>&nbsp;</p>
<h2><span style="font-weight: 400">References</span></h2>
<p><a href="https://mariadb.com/docs/galera-cluster/galera-architecture/certification-based-replication"><span style="font-weight: 400">https://www.google.com/url?q=https://mariadb.com/docs/galera-cluster/galera-architecture/certification-based-replication&amp;sa=D&amp;source=docs&amp;ust=1777342808813139&amp;usg=AOvVaw3SAf2g7NO9d681ZJ0VVEMB</span></a></p>
<p><a href="https://docs.percona.com/percona-xtradb-cluster/5.7/wsrep-system-index.html#wsrep_sync_wait"><span style="font-weight: 400">https://docs.percona.com/percona-xtradb-cluster/5.7/wsrep-system-index.html#wsrep_sync_wait</span></a></p>
<p>The post <a href="https://www.percona.com/blog/group-replication-vs-percona-xtradb-cluster-the-true-cost-of-consistency/">Group Replication VS Percona XtraDB Cluster: The True Cost of Consistency</a> appeared first on <a href="https://www.percona.com">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/group-replication-vs-percona-xtradb-cluster-the-true-cost-of-consistency/">Group Replication VS Percona XtraDB Cluster: The True Cost of Consistency</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>The Failover Brownout: Rethinking High Availability in MySQL Group Replication</title>
        <link>https://www.percona.com/blog/the-failover-brownout-rethinking-high-availability-in-mysql-group-replication/</link>
        <pubDate>Mon, 15 Jun 2026 06:57:24 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>It is time to talk again about Flow control and group replication. This time with a special eye on the use of Group Replication in the Kubernetes context. In this article we will dig a bit on how it works and what are the various side effects.    The problem Recently I was refining the … Continued<br />
The post The Failover Brownout: Rethinking High Availability in MySQL Group Replication appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/the-failover-brownout-rethinking-high-availability-in-mysql-group-replication/">The Failover Brownout: Rethinking High Availability in MySQL Group Replication</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><span style="font-weight: 400">It is time to talk again about Flow control and group replication. This time with a special eye on the use of Group Replication in the Kubernetes context. In this article we will dig a bit on how it works and what are the various side effects. </span></p>
<p>&nbsp;</p>
<h2><span style="font-weight: 400">The problem</span></h2>
<p><span style="font-weight: 400">Recently I was refining the calculation I use in the </span><a href="https://github.com/Tusamarco/mysqloperatorcalculator"><span style="font-weight: 400">MySQL calculator for Operator</span></a><span style="font-weight: 400"> given I was constantly encountering a very serious problem with the Percona Server Operator.</span></p>
<p><span style="font-weight: 400">The problem is that when the deployment was/is serving a high level of traffic, it will, no matter what, end up in getting OMMKill by the K8 system. </span></p>
<p><span style="font-weight: 400">This because the pod was gradually consuming more and more memory, reaching the memory limit set in the CR specification. </span></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400">Now let me clarify a few things, to get straight to the facts.</span></p>
<p><span style="font-weight: 400">Kubernetes itself does not OOMKill a pod for hitting its memory limit, the mechanism works as described below with mention on how Working Set Size (WSS) is calculated, and how OOMKills are triggered, and in the resource sections, the links to the official documentation and source code.</span></p>
<p>&nbsp;</p>
<h3><span style="font-weight: 400">1. The Reality of OOMKills vs. Kubelet Evictions</span></h3>
<p><span style="font-weight: 400">It is crucial to distinguish between what the Linux kernel does and what Kubernetes does:</span></p>
<ul>
<li style="font-weight: 400"><b>OOMKilled (Exit Code 137):</b><span style="font-weight: 400"> This is executed entirely by the </span><b>Linux kernel&#8217;s OOM Killer</b><span style="font-weight: 400">, not Kubernetes. When we set a memory limit in our Pod spec, Kubernetes translates that into a Linux cgroup constraint (</span><span style="font-weight: 400">memory.limit_in_bytes</span><span style="font-weight: 400"> for cgroups v1, or </span><span style="font-weight: 400">memory.max</span><span style="font-weight: 400"> for cgroups v2). If our container attempts to allocate more memory than this hard limit, and the kernel cannot reclaim any page cache (like inactive files), the kernel directly intervenes and terminates the process.</span></li>
<li style="font-weight: 400"><b>Node-Pressure Evictions:</b><span style="font-weight: 400"> This is where Kubernetes actively observes memory. The </span><span style="font-weight: 400">kubelet</span><span style="font-weight: 400"> monitors the </span><span style="font-weight: 400">working_set_bytes</span><span style="font-weight: 400"> metric to protect the </span><i><span style="font-weight: 400">node</span></i><span style="font-weight: 400"> from running out of memory. If the node&#8217;s memory drops below an eviction threshold, Kubernetes will actively evict pods to prevent the kernel from initiating a system-wide OOM kill.</span></li>
</ul>
<h3><span style="font-weight: 400">2. How Working Set Size (WSS) is Calculated for the container</span></h3>
<p><span style="font-weight: 400">Kubernetes monitors container memory via </span><b>cAdvisor</b><span style="font-weight: 400">, which is integrated directly into the </span><span style="font-weight: 400">kubelet</span><span style="font-weight: 400">. cAdvisor calculates the Working Set Size by taking the total memory usage and subtracting the inactive file cache (memory that the kernel can easily reclaim if it faces memory pressure).</span></p>
<p><span style="font-weight: 400">Because active file caches and anonymous memory (like our application&#8217;s heap) cannot be easily evicted, this working set metric is the most accurate representation of the memory your container is forcing the system to hold.</span></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400">The Calculation &amp; cgroups Evolution The core mathematical calculation is </span><i><span style="font-weight: 400">Memory Usage</span></i><i><span style="font-weight: 400"> &#8211; </span></i><i><span style="font-weight: 400">Inactive File Cache</span></i><span style="font-weight: 400">, but </span><i><span style="font-weight: 400">how</span></i><span style="font-weight: 400"> cAdvisor fetches this data from the Linux kernel depends entirely on your node&#8217;s cgroup version. Modern cAdvisor relies heavily on the </span><span style="font-weight: 400">opencontainers/runc/libcontainer</span><span style="font-weight: 400"> library to read these raw cgroup files:</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">cgroups v1: cAdvisor starts with the raw usage from </span><span style="font-weight: 400">memory.usage_in_bytes</span><span style="font-weight: 400"> and subtracts the reclaimable cache found under the </span><span style="font-weight: 400">total_inactive_file</span><span style="font-weight: 400"> key.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">cgroups v2 (Unified): cAdvisor starts with the raw usage from </span><span style="font-weight: 400">memory.current</span><span style="font-weight: 400"> and subtracts the reclaimable cache found under the </span><span style="font-weight: 400">inactive_file</span><span style="font-weight: 400"> key.</span></li>
</ul>
<p>&nbsp;</p>
<p><span style="font-weight: 400">The Underlying Code Logic While older versions used a static </span><span style="font-weight: 400">setMemoryStats</span><span style="font-weight: 400"> function, modern Kubernetes branches handle this dynamically. The logic executes the following flow before reporting back to the </span><span style="font-weight: 400">kubelet</span><span style="font-weight: 400">:</span></p>
<ol>
<li style="font-weight: 400"><span style="font-weight: 400">Detects Version: It identifies whether the node runs cgroups v1 or v2 to determine the correct inactive file key name.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Fetch Usage: It pulls the raw memory usage from the container.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Subtract Cache: It looks up the inactive file value and safely subtracts it from the usage (including a safeguard to ensure the working set never drops below zero).</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Report Metric: It sets this final calculated value as </span><span style="font-weight: 400">container_memory_working_set_bytes</span><span style="font-weight: 400">, which the </span><span style="font-weight: 400">kubelet</span><span style="font-weight: 400"> then uses to decide if the node is under memory pressure.</span></li>
</ol>
<h2><span style="font-weight: 400">Back to us </span></h2>
<p><span style="font-weight: 400">At the end the point is that if our pod reaches the limit and we ARE NOT using the new </span><a href="https://docs.google.com/document/d/1WSoJxaAPMP4tdiT_-U4YwgoHBI8zKJ0Hw-y6iUXJQBc/edit#bookmark=id.59zqn83hsx1p"><span style="font-weight: 400">swap feature</span></a><span style="font-weight: 400"> existing in Kubernetes, our pod will be brutally killed, and in 99% of the cases our production will suffer a lot. !Ops spoiler!</span></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400">To clearly understand what was causing the issue about this memory consumption and having my calculator fail, I started to collect the information about the memory usage in MySQL itself.</span></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400">SELECT EVENT_NAME,CURRENT_NUMBER_OF_BYTES_USED / 1024 / 1024 AS current_usage_mb FROM performance_schema.memory_summary_global_by_event_name WHERE EVENT_NAME like &#8216;memory/%&#8217; and EVENT_NAME not like &#8216;memory/performance%&#8217;  order by current_usage_mb desc limit 25;</span></p>
<p><span style="font-weight: 400">Which will give you and output like this:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">+---------------------------------------+------------------+
| EVENT_NAME                            | current_usage_mb |
+---------------------------------------+------------------+
| memory/innodb/buf_buf_pool            |   46398.92578125 |
| memory/group_rpl/GCS_XCom::xcom_cache |    1066.66179943 |
| memory/group_rpl/certification_info   |      92.45250702 |
| memory/innodb/log_buffer_memory       |      64.00096130 |
| memory/sql/TABLE                      |      49.90627003 |
| memory/innodb/memory                  |      34.68734741 |
| memory/innodb/ut0link_buf             |      24.00006104 |
| memory/innodb/lock0lock               |      21.40064240 |
| memory/mysqld_openssl/openssl_malloc  |       9.51009655 |
| memory/innodb/read0read               |       8.19496155 |
| memory/mysys/KEY_CACHE                |       8.00215149 |
| memory/innodb/sync0arr                |       7.03147125 |
| memory/innodb/ha_innodb               |       6.87006950 |
| memory/innodb/lock_sys                |       5.25009155 |
| memory/sql/log_sink_pfs               |       5.00003052 |
| memory/innodb/ut0pool                 |       4.00017548 |
| memory/sql/dd::objects                |       2.83031464 |
| memory/innodb/std                     |       2.72618866 |
| memory/innodb/os0file                 |       2.63054657 |
| memory/innodb/os0event                |       2.34302521 |
| memory/sql/TABLE_SHARE::mem_root      |       2.31734467 |
| memory/innodb/trx0trx                 |       2.22647858 |
| memory/temptable/physical_ram         |       1.00003052 |
| memory/sql/dd::String_type            |       0.94942093 |
| memory/innodb/btr0pcur                |       0.89743423 |
+---------------------------------------+------------------+</pre>
<p>&nbsp;</p>
<p><span style="font-weight: 400">Plus I used PMM to collect memory information </span></p>
<p><img decoding="async" loading="lazy" class="alignnone wp-image-49857 size-medium_large" src="https://www.percona.com/wp-content/uploads/2026/06/allocation_with_incidents_describe-768x395.jpg" alt="" width="768" height="395" /></p>
<p><span style="font-weight: 400">To simulate the load I used the sysbench-tpcc (tpc-c derivate test) variant and run the tests simulating a load of 1024 threads against a cluster based on machine with 16 Core and 64Gb volumes ~3k IOPS, so not gigantic but not small. </span></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400">The finding was almost immediate:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">+---------------------------------------+------------------+
| EVENT_NAME                            | current_usage_mb |
+---------------------------------------+------------------+
| memory/innodb/buf_buf_pool            |   46398.92578125 |
| memory/group_rpl/certification_info   |    1431.67934418 | &lt;constantly increasing
| memory/group_rpl/GCS_XCom::xcom_cache |    1066.63542366 |
| memory/sql/Gtid_set::Interval_chunk   |      95.52413940 |
| memory/innodb/log_buffer_memory       |      64.00096130 |
| memory/sql/TABLE                      |      48.17613125 |
| memory/innodb/memory                  |      35.08897400 |
| memory/innodb/ut0link_buf             |      24.00006104 |
| memory/innodb/lock0lock               |      21.40064240 |
| memory/innodb/read0read               |      14.86782837 |
| memory/mysqld_openssl/openssl_malloc  |      12.05916119 |
| memory/mysys/KEY_CACHE                |       8.00215149 |
| memory/innodb/sync0arr                |       7.03147125 |
| memory/innodb/ha_innodb               |       6.84074974 |
| memory/innodb/lock_sys                |       5.25009155 |
| memory/sql/log_sink_pfs               |       5.00003052 |
| memory/innodb/ut0pool                 |       4.00017548 |
| memory/sql/dd::objects                |       2.82012177 |
| memory/innodb/std                     |       2.72515869 |
| memory/innodb/os0file                 |       2.63054657 |
| memory/innodb/os0event                |       2.35884857 |
| memory/innodb/trx0trx                 |       2.22647858 |
| memory/sql/TABLE_SHARE::mem_root      |       1.83777618 |
| memory/innodb/trx0undo                |       1.26304626 |
| memory/mysys/lf_node                  |       1.08828735 |
+---------------------------------------+------------------+</pre>
<p>&nbsp;</p>
<p><span style="font-weight: 400"><br />
</span><span style="font-weight: 400">Ok then … What is the certification info???</span></p>
<h2><span style="font-weight: 400">What is group_rpl/certification_info?</span></h2>
<p><span style="font-weight: 400">In MySQL, </span><span style="font-weight: 400">memory/group_rpl/certification_info</span><span style="font-weight: 400"> is a Performance Schema memory instrument. It tracks the exact amount of RAM allocated to store the Certification Database (or Certification Info).</span></p>
<p><span style="font-weight: 400">In Group Replication, nodes do not lock rows across the network while a transaction is executing. Instead, transactions execute locally and optimistically. When it is time to commit, the transaction undergoes a </span><i><span style="font-weight: 400">Certification Process</span></i><span style="font-weight: 400"> to ensure no other concurrent transaction in the cluster has modified the exact same rows. The </span><span style="font-weight: 400">certification_info</span><span style="font-weight: 400"> buffer is the in-memory hash map that makes this conflict detection possible.</span></p>
<h3><span style="font-weight: 400">1. What is it used for?</span></h3>
<p><span style="font-weight: 400">The </span><span style="font-weight: 400">certification_info</span><span style="font-weight: 400"> structure acts as a tracking ledger for recently modified rows.</span></p>
<p><span style="font-weight: 400">Here is how it works under the hood:</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">The Key-Value Pair: It is fundamentally an in-memory dictionary. The </span><i><span style="font-weight: 400">key</span></i><span style="font-weight: 400"> is the hash of a modified row (extracted from the transaction&#8217;s &#8220;write set&#8221;), and the </span><i><span style="font-weight: 400">value</span></i><span style="font-weight: 400"> is the Global Transaction Identifier (GTID) of the transaction that successfully modified it.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Conflict Detection: When a new transaction attempts to commit, it broadcasts its write set and the &#8220;snapshot version&#8221; of the database it saw when it started. The certifier cross-references the incoming transaction&#8217;s write set against the </span><span style="font-weight: 400">certification_info</span><span style="font-weight: 400"> map.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">The Decision: If the </span><span style="font-weight: 400">certification_info</span><span style="font-weight: 400"> shows that a row was modified by a newer GTID that the incoming transaction did not &#8220;see&#8221; when it started, a conflict is flagged, and the transaction is aborted. If no conflict exists, the transaction is certified, and the </span><span style="font-weight: 400">certification_info</span><span style="font-weight: 400"> map is updated with the new write set and GTID.</span></li>
</ul>
<p><span style="font-weight: 400">The primary does not hold onto this memory out of stubbornness; it does so because purging that data too early would destroy the cluster&#8217;s consistency in the event of a failover.</span></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400">In Group Replication, garbage collection for the </span><span style="font-weight: 400">certification_info</span><span style="font-weight: 400"> buffer is not triggered just because a transaction commits on the primary. It is triggered by a concept called the Stable Set. </span></p>
<p><span style="font-weight: 400">Every node in the cluster periodically broadcasts a message to the rest of the group saying, </span><i><span style="font-weight: 400">&#8220;Here are the GTIDs I have successfully applied to my disk.&#8221;</span></i><span style="font-weight: 400"> The cluster then calculates a </span><i><span style="font-weight: 400">global low watermark</span></i><span style="font-weight: 400">. This watermark is the highest transaction GTID that </span><i><span style="font-weight: 400">every single member</span></i><span style="font-weight: 400"> of the group has successfully applied. Garbage collection is only allowed to purge write-sets from the certification database that fall </span><i><span style="font-weight: 400">below</span></i><span style="font-weight: 400"> this global watermark. </span><span style="font-weight: 400"><br />
</span><span style="font-weight: 400">To note that this purge is a synchronous operation during which writes are forbidden.</span></p>
<h3><span style="font-weight: 400">2. How the Apply Queue Stalls the Watermark</span></h3>
<p><span style="font-weight: 400">When a secondary node starts lagging, its </span><i><span style="font-weight: 400">applier queue</span></i><span style="font-weight: 400"> grows. This means the secondary is receiving transactions from the network quickly, but its SQL thread is too slow to actually execute them and commit them to disk.</span></p>
<p><span style="font-weight: 400">Because the secondary hasn&#8217;t applied these transactions, it cannot report those GTIDs back to the group as &#8220;finished.&#8221;</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">The lagging secondary&#8217;s local watermark stalls.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Therefore, the </span><i><span style="font-weight: 400">global low watermark</span></i><span style="font-weight: 400"> for the entire cluster stalls.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Because the global watermark hasn&#8217;t moved forward, the </span><span style="font-weight: 400">garbage_collect</span><span style="font-weight: 400"> function on the primary (and all other nodes) says, </span><i><span style="font-weight: 400">&#8220;I am not allowed to delete any write-sets yet.&#8221;</span></i></li>
<li style="font-weight: 400"><span style="font-weight: 400">As the primary continues to process new writes, the </span><span style="font-weight: 400">certification_info</span><span style="font-weight: 400"> memory buffer grows continuously.</span></li>
</ul>
<h3><span style="font-weight: 400">3. Why the Primary Cannot Purge Early</span></h3>
<p><span style="font-weight: 400">we might wonder: </span><i><span style="font-weight: 400">If the transaction is already committed on the primary, why does the primary care if the secondary has applied it? Why not just drop the write-set from its own memory?</span></i></p>
<p><span style="font-weight: 400">The answer comes down to </span><i><span style="font-weight: 400">Failover Safety</span></i><span style="font-weight: 400"> and </span><i><span style="font-weight: 400">Distributed Conflict Detection</span></i><span style="font-weight: 400">. GR is a shared-nothing, decentralized architecture. Even if you are running in Single-Primary  mode (keep this in mind will be important later), the underlying engine uses the exact same logic as Multi-Primary mode. </span></p>
<p><span style="font-weight: 400">Here is why the primary is forbidden from purging that data:</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">The Failover Scenario: Imagine our primary node crashes right now. The lagging secondary (which still has a massive apply queue) is immediately elected as the new primary.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">The Conflict Risk: As the new primary, it starts accepting new writes from your application. However, it still has thousands of old transactions in its applier queue that it hasn&#8217;t written to disk yet!</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">The Necessity of the Buffer: When a new write comes in, the new primary </span><i><span style="font-weight: 400">must</span></i><span style="font-weight: 400"> check if that write conflicts with any of the pending transactions in its apply queue. It does this by checking the </span><span style="font-weight: 400">certification_info</span><span style="font-weight: 400"> map. If the old primary had purged the global certification data early, the new primary wouldn&#8217;t have the write-sets for those pending transactions. It would blindly accept the new write, causing a massive data conflict and breaking the replication group entirely.</span></li>
</ul>
<p><span style="font-weight: 400">Fine Marco, then what is the effect of this?</span></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400">Well, drums roll …</span></p>
<p><span style="font-weight: 400">… When a secondary node is elected as the new primary during a failover, it does not immediately open the floodgates to new writes. </span><b>It keeps its </b><b><i>super_read_only</i></b><b> variable set to ON until it has completely drained its local apply queue of all transactions that were certified prior to the election.</b></p>
<p><span style="font-weight: 400">This is an intentional design choice to guarantee that the new primary&#8217;s state is completely consistent with the old primary before it starts accepting new data.</span></p>
<p>&nbsp;</p>
<h3><span style="font-weight: 400">4. Immediate Write Rejections (No Built-in Queuing)</span></h3>
<p><span style="font-weight: 400">The most critical impact to understand is that the new primary does not queue or pause new incoming writes while it catches up. It outright rejects them.</span></p>
<p><span style="font-weight: 400">If our application or proxy routes a COMMIT, INSERT, UPDATE, or DELETE to the new primary while it is still processing the old queue, MySQL will immediately throw an error back to the client:</span></p>
<p><span style="font-weight: 400">ERROR 1290 (HY000): The MySQL server is running with the &#8211;super-read-only option so it cannot execute this statement</span></p>
<h3><span style="font-weight: 400">5. The &#8220;Brownout&#8221; Window (Write Outage)</span></h3>
<p><span style="font-weight: 400">Because of this behavior, a failover in MySQL Group Replication does not instantly restore write availability. Our cluster experiences a &#8220;brownout&#8221;, a period where reads might succeed, but writes are entirely blocked.</span></p>
<p><span style="font-weight: 400">The duration of this write outage is directly proportional to the size of the apply queue.</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">If the secondary was fully caught up, write availability is restored in milliseconds.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">If the secondary was lagging by 50 minutes, your application will suffer a 50 minute write outage while the node applies the backlog.</span></li>
</ul>
<h3><span style="font-weight: 400">6. Impact on Proxies (e.g., MySQL Router or ProxySQL)</span></h3>
<p><span style="font-weight: 400">If we are using a proxy layer to route your database traffic, the apply queue dictates how the proxy behaves during the transition:</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">MySQL Router: It continuously monitors the cluster topology and the super_read_only flag. Even though the node has technically been elected primary, Router will not open the read-write port to it until the apply queue drains and super_read_only flips to OFF. Depending on your application timeouts, client connections will either hang waiting for a writable connection or fail completely.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">ProxySQL: Similar to Router, if it is configured to check for the read_only state, it will temporarily quarantine the new primary from the write hostgroup.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">HAProxy (in Operator): Monitor both Primary state and read_only state, but it expose the Primary to writes causing the application to fail (bug we need to fix)  </span></li>
</ul>
<h3><span style="font-weight: 400">7. Read Traffic and Stale Data</span></h3>
<p><span style="font-weight: 400">During this catch-up phase, the node will accept incoming </span><span style="font-weight: 400">SELECT</span><span style="font-weight: 400"> queries (since it is still a valid database). However, because it is actively churning through the old primary&#8217;s backlog, the data being read is temporarily stale.</span></p>
<p><span style="font-weight: 400">If your application reads a row that is sitting in the apply queue but hasn&#8217;t been committed to disk yet, it will get the old version of that row.</span></p>
<h2><span style="font-weight: 400">Why Flow Control is Critical</span></h2>
<p><span style="font-weight: 400">Because a large apply queue turns a seamless failover into a severe, application-breaking write outage, Group Replication includes the Flow Control feature.</span></p>
<p><span style="font-weight: 400">Flow Control monitors the size of the apply queues across all secondaries. If a secondary starts lagging too far behind, Flow Control should actively throttle the write throughput on the </span><i><span style="font-weight: 400">current</span></i><span style="font-weight: 400"> primary to allow the lagging node to catch up. It is essentially a trade-off: we accept a slight performance hit during normal operations to guarantee that your database recovers almost instantly during a failover.</span></p>
<p><b>However, this is not what really happens</b><span style="font-weight: 400">.</span></p>
<h3><span style="font-weight: 400">1. It is Reactive, Not Proactive (The Polling Blind Spot)</span></h3>
<p><span style="font-weight: 400">Flow control does not intercept and evaluate every single transaction in real-time. Instead, it relies on a periodic polling interval governed by </span><span style="font-weight: 400">group_replication_flow_control_period</span><span style="font-weight: 400"> (which defaults to 1 second).</span></p>
<p><span style="font-weight: 400">Once a second, the cluster checks the size of the apply queues and the certifier queues.</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">The Vulnerability: If our application generates a massive spike of 50,000 writes in 500 milliseconds, the primary will happily accept and certify all of them. Flow control will not even notice the spike until the next 1 second polling interval hits. By the time it decides to apply a throttle, the damage is already done, and the secondary&#8217;s queue is already overflowing.</span></li>
</ul>
<h3><span style="font-weight: 400">2. The PID Controller&#8217;s &#8220;Soft Brake&#8221; Math</span></h3>
<p><span style="font-weight: 400">When flow control does decide to throttle, it does not simply freeze the primary. It uses a PID (Proportional-Integral-Derivative) controller algorithm to calculate a &#8220;write quota&#8221; (the maximum number of transactions the primary is allowed to commit in the next second).</span></p>
<p><span style="font-weight: 400">The PID controller is deliberately tuned to be gentle. It wants to gracefully degrade performance rather than cause immediate application timeouts.</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">When the secondary&#8217;s queue breaches the </span><span style="font-weight: 400">group_replication_flow_control_applier_threshold</span><span style="font-weight: 400"> (default 25,000 transactions), the PID controller reduces the primary&#8217;s quota incrementally.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">The Failure Point: If the primary&#8217;s incoming write rate is astronomically higher than the secondary&#8217;s disk IO capacity, this incremental &#8220;step down&#8221; in the quota is too slow. The primary is still allowed to write, say, 10,000 transactions per second, while the secondary is only applying 2,000. The queue continues to grow aggressively despite the throttle being &#8220;active.&#8221;</span></li>
</ul>
<h3><span style="font-weight: 400">3. The Concurrency Mismatch (Parallel vs. Serial)</span></h3>
<p><span style="font-weight: 400">This is often the silent killer that defeats flow control. Flow control makes mathematical assumptions about how fast the secondary </span><i><span style="font-weight: 400">should</span></i><span style="font-weight: 400"> be able to apply transactions based on recent history.</span></p>
<p><span style="font-weight: 400">However, the primary node might be executing writes using hundreds of highly concurrent threads. The secondary relies on the parallel applier to keep up. If the incoming workload suddenly includes transactions that cannot be parallelized, such as writes hitting overlapping rows, cascading foreign key updates, or DDL statements, the secondary&#8217;s applier instantly drops from executing in parallel down to a single, serialized thread.</span></p>
<p><span style="font-weight: 400">When this serialization happens, the secondary&#8217;s applier rate plummets instantly. Flow control, which only checks in once a second and adjusts gradually, cannot brake the primary fast enough to compensate for the secondary suddenly dropping to a crawl.</span></p>
<h2><span style="font-weight: 400">What can we do?</span></h2>
<p><span style="font-weight: 400">At the moment of writing there are only two things that can be done.</span></p>
<ol>
<li style="font-weight: 400"><span style="font-weight: 400">Make Flow control more aggressive</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Increase the number of replication appliers</span></li>
</ol>
<p>&nbsp;</p>
<h3><span style="font-weight: 400">1. Making Flow Control More Aggressive</span></h3>
<p><span style="font-weight: 400">We can configure Flow Control to be a bit more aggressive. It will still remain a </span><i><span style="font-weight: 400">suggestion</span></i><span style="font-weight: 400"> but a strong one.</span></p>
<p><span style="font-weight: 400">How it works (The Configuration):</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">Lower the Threshold: By reducing </span><span style="font-weight: 400">group_replication_flow_control_applier_threshold</span><span style="font-weight: 400"> (default is 25,000) to something like 1,000 or 500, we force the PID controller to kick in almost immediately when a spike occurs.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Remove the Safety Net: By keeping  </span><span style="font-weight: 400">group_replication_flow_control_min_quota</span><span style="font-weight: 400"> to </span><span style="font-weight: 400">0 </span><span style="font-weight: 400">(default), we remove the minimum write guarantee. If the secondary falls behind, Flow Control is allowed to throttle the primary&#8217;s writes down to zero, also if this will never happen.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Increase the Sensitivity: We can tweak the PID controller&#8217;s math (using the derivative and proportional tuning variables) to react much more aggressively to queue growth.</span><span style="font-weight: 400"><br />
</span><span style="font-weight: 400">       group_replication_flow_control_hold_percent=100</span><span style="font-weight: 400"><br />
</span><span style="font-weight: 400">       group_replication_flow_control_release_percent=5</span></li>
</ul>
<p>&nbsp;</p>
<p><b>The reality check, does it work?:</b></p>
<p><span style="font-weight: 400">If the expectation is to have a rigid control over the applier queue on the lagging secondary, then the answer is </span><b>NO</b><span style="font-weight: 400">. No matter what, at the moment flow control is not designed to act as we are used to in PXC (Percona Xtradb Cluster), where we have a rigid control of the pending queue also at the cost of delaying the writes. In Group Replication  the Flow Control will never bring the write to 0, the unfortunate aspect is that the mechanism is not enough to keep the queue under control.</span></p>
<p>&nbsp;</p>
<h3><span style="font-weight: 400">2. Increasing Replication Appliers </span></h3>
<p><span style="font-weight: 400">To help the secondary chew through the queue faster, we can increase the number of parallel threads it uses to write to disk.</span></p>
<p><b>How it works</b><span style="font-weight: 400">: We can increase the </span><span style="font-weight: 400">replica_parallel_workers</span><span style="font-weight: 400"> (formerly </span><span style="font-weight: 400">slave_parallel_workers</span><span style="font-weight: 400">) setting. GR is exceptionally smart about this. Because of the certification process we discussed earlier, GR already knows exactly which transactions modify which rows. It uses a writeset-based dependency tracker to safely hand off non-conflicting transactions to multiple worker threads simultaneously.</span><span style="font-weight: 400"><br />
</span><span style="font-weight: 400">The formula that is normally used to calculate the number of replication workers is to set 2.5 workers for each available core. IE if we have 14000m CPUs in our CR (K8) then we can assign ~35 workers, this is definitely higher than the default value of 4.   </span></p>
<p><b>The reality check, does it work?</b><span style="font-weight: 400">:  </span><b>Yes</b><span style="font-weight: 400">, but only if our workload allows it.</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">The Catch &#8211; The Serialization Wall: Parallel appliers only work if the transactions do not conflict. If our application has 50 concurrent threads all trying to update the same &#8220;inventory count&#8221; row, or updating a highly contentious table, those transactions </span><i><span style="font-weight: 400">cannot</span></i><span style="font-weight: 400"> be parallelized. The secondary&#8217;s coordinator thread will see the row-level conflicts and force those transactions to wait in line and execute sequentially. We could allocate 128 parallel workers, but 127 of them will sit idle while one thread does all the work.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">The Catch &#8211; Context Switching: More threads do not magically create more disk IOPS. If we set the workers too high (e.g., beyond the physical CPU core count or disk IO capacity), the secondary&#8217;s InnoDB engine will spend more time context-switching and fighting over internal mutex locks than actually committing data. In many cases, over-allocating parallel workers actually </span><i><span style="font-weight: 400">slows down</span></i><span style="font-weight: 400"> the apply rate.</span></li>
</ul>
<h2><span style="font-weight: 400">Do we have any conclusions?</span></h2>
<h3><span style="font-weight: 400">1. If HA is the goal, enforce Strict Flow Control</span></h3>
<p><span style="font-weight: 400">If our absolute top priority is High Availability, specifically achieving a near-zero Recovery Time Objective (RTO), we must configure an aggressive flow control.</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">The Logic: Fast failovers require small apply queues. To guarantee a small apply queue, we must strictly throttle the primary the millisecond the secondary starts to lag.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">The Trade-off: we are protecting the cluster&#8217;s failover readiness at the expense of application write latency. If there is a massive write spike, our application will face timeouts and connection errors, but if the primary server suddenly catches fire, our database will recover and elect a new primary almost instantly.</span></li>
</ul>
<p><span style="font-weight: 400">The problem is that Group Replication is not able to act like that today, this is something we eventually need to implement to have better HA.</span></p>
<h3><span style="font-weight: 400">2. If Performance is the goal, relax Flow Control</span></h3>
<p><span style="font-weight: 400">If our top priority is keeping the application fast and ensuring </span><span style="font-weight: 400">COMMIT</span><span style="font-weight: 400"> latencies remain extremely low, we should relax flow control or rely on the generous defaults.</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">The Logic: By relaxing flow control, we allow the primary to run at the absolute maximum speed its local disks and CPU allow. It does not care if the secondaries fall behind. Our application users remain happy and experience zero throttling.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">The Trade-off: We are accepting severe risks to your HA posture. If the primary crashes while the secondaries have a massive apply queue, we will suffer a long write outage (the brownout) while the new primary catches up. Additionally, we are accepting the risk that the </span><span style="font-weight: 400">certification_info</span><span style="font-weight: 400"> memory buffer will grow significantly on the primary and eventually have the pod OOMKilled .</span></li>
</ul>
<h3><span style="font-weight: 400">3. Is this not what Asynchronous replication with semy-sync offers?</span></h3>
<p>&nbsp;</p>
<h4><i><span style="font-weight: 400">1. The Similarities</span></i></h4>
<p><span style="font-weight: 400">If we look purely at how a single transaction flows and how a failover behaves, GR and Semi-Sync look like twins:</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">The Durability Guarantee: </span><i><span style="font-weight: 400">Semi-Sync:</span></i><span style="font-weight: 400"> The primary waits to commit until at least one secondary confirms it has received the transaction and written it to its local Relay Log. </span>
<ul>
<li style="font-weight: 400"><i><span style="font-weight: 400">GR:</span></i><span style="font-weight: 400"> The primary waits to commit until a majority quorum of nodes confirm they have received the transaction, certified it, and written it to their local relay logs.</span></li>
</ul>
</li>
<li style="font-weight: 400"><span style="font-weight: 400">The Failover Delay (The Queue):  In both systems, the secondary receiving the data does not mean the secondary has applied the data to its InnoDB tables.</span>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">If a crash happens, both systems require the new primary to completely execute its pending queue (Relay Log for Semi-Sync, Apply Queue for GR) before it is safe to accept new writes.</span></li>
</ul>
</li>
</ul>
<h4><i><span style="font-weight: 400">2. The Crucial Differences</span></i></h4>
<p><span style="font-weight: 400">If they behave so similarly, why use GR at all? </span><span style="font-weight: 400"><br />
</span><span style="font-weight: 400">The differences lie entirely in automation, consensus, and split-brain protection. Semi-Sync is just a data transport mechanism; GR is a full state-machine cluster.</span></p>
<p><span style="font-weight: 400">Here is what GR gives you that Semi-Sync does not:</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">Automatic Election and Orchestration:</span>
<ul>
<li style="font-weight: 400"><i><span style="font-weight: 400">Semi-Sync:</span></i><span style="font-weight: 400"> If the primary dies, Semi-Sync does nothing. The cluster sits there broken. You must rely on external tools (like Orchestrator or manual DBA intervention) to detect the crash, pick the most up-to-date secondary, wait for its relay log to apply, disable </span><span style="font-weight: 400">read_only</span><span style="font-weight: 400">, and re-point the application.</span></li>
<li style="font-weight: 400"><i><span style="font-weight: 400">GR:</span></i><span style="font-weight: 400"> The cluster detects the failure natively. The remaining nodes use Paxos consensus to elect a new primary automatically, manage the queue drain natively via the </span><span style="font-weight: 400">super_read_only</span><span style="font-weight: 400"> flip we discussed, and self-heal.</span></li>
</ul>
</li>
<li style="font-weight: 400"><span style="font-weight: 400">Split-Brain Protection (Network Partitions):</span>
<ul>
<li style="font-weight: 400"><i><span style="font-weight: 400">Semi-Sync:</span></i><span style="font-weight: 400"> If our network splits in half, an external failover tool might accidentally promote a secondary while the old primary is still alive and accepting writes. We now have a split-brain, and our data is permanently corrupted.</span></li>
<li style="font-weight: 400"><i><span style="font-weight: 400">GR:</span></i><span style="font-weight: 400"> GR enforces strict quorum. If a network split happens, the side of the network with the minority of nodes will automatically fence itself off and refuse all writes. Split-brain is mathematically prevented.</span></li>
</ul>
</li>
<li style="font-weight: 400"><span style="font-weight: 400">The Certification Database:</span>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">As we established, GR requires the certification map to ensure the new primary doesn&#8217;t accept writes that conflict with its unapplied queue. Semi-Sync does not have this; it relies entirely on the external failover tool to guarantee no writes touch the new primary until the relay log is 100% applied.</span></li>
</ul>
</li>
</ul>
<h4><i><span style="font-weight: 400">3. Final observation</span></i></h4>
<p><span style="font-weight: 400">If we are using Single-Primary GR with relaxed flow control, we have essentially built a highly-automated, consensus-driven version of Semi-Sync replication. </span></p>
<p><span style="font-weight: 400">We have the exact same apply-queue bottleneck during failover, but we have traded the need for external orchestrator tools for built-in Paxos consensus and native split-brain protection.</span></p>
<p>&nbsp;</p>
<h2><span style="font-weight: 400">Conclusions (for real)</span></h2>
<p><span style="font-weight: 400">When we run MySQL on a traditional, dedicated Virtual Machine, memory limits are &#8220;soft.&#8221; If the </span><span style="font-weight: 400">certification_info</span><span style="font-weight: 400"> database explodes and consumes an extra 10GB of RAM because of the applier lag, the Linux OS might start aggressively swapping inactive pages to disk, but the MySQL process usually survives. Performance degrades, but the database stays online.</span></p>
<p><span style="font-weight: 400">In Kubernetes, memory limits are &#8220;hard.&#8221; As we discussed earlier, Kubernetes enforces pod memory limits via cgroups v2 (</span><span style="font-weight: 400">memory.max</span><span style="font-weight: 400">). The Linux kernel&#8217;s OOM Killer has no understanding of database quorum, failover states, or apply queues. It only sees math: </span><i><span style="font-weight: 400">Working Set Size &gt; </span></i><i><span style="font-weight: 400">memory.max</span></i><i><span style="font-weight: 400"> = Terminate Process (Exit Code 137).</span></i></p>
<h3><span style="font-weight: 400">The Chain Reaction of Relaxed Flow Control in k8s</span></h3>
<p><span style="font-weight: 400">If we prioritize &#8220;performance&#8221; by relaxing Flow Control in a Kubernetes environment, we are essentially setting a ticking time bomb. Here is the chain of events:</span></p>
<ol>
<li style="font-weight: 400"><b>The Spike</b><span style="font-weight: 400">: Our application experiences a massive write spike.</span></li>
<li style="font-weight: 400"><b>The Queue</b><span style="font-weight: 400">: The secondary pod&#8217;s disk cannot keep up, and its applier queue grows to 1,000,000 transactions.</span></li>
<li style="font-weight: 400"><b>The Memory Sprawl</b><span style="font-weight: 400">: Because the queue is large, the global low-watermark stalls. The Primary pod is forbidden from garbage collecting the </span><span style="font-weight: 400">certification_info</span><span style="font-weight: 400"> map. The in-memory hash map balloons in size.</span></li>
<li style="font-weight: 400"><b>The Execution</b><span style="font-weight: 400">: The </span><i><span style="font-weight: 400">memory.current</span></i><span style="font-weight: 400"> metric will reach the </span><i><span style="font-weight: 400">memory.max</span></i><span style="font-weight: 400">, kernel will trigger the OMMKill process. First action will be to try to free the page.cache related to the process. If the purge is successful and the memory.current is less than </span><i><span style="font-weight: 400">memory.max</span></i><span style="font-weight: 400"> then the process will persist, otherwise the kernel will kill it. </span><span style="font-weight: 400"><br />
</span><span style="font-weight: 400">We can use the WSS metric to predict a successful OMMKill.</span><span style="font-weight: 400"><br />
</span><span style="font-weight: 400"> The Primary pod&#8217;s Working Set Size (WSS) breaches its Kubernetes memory limit, this is a fair estimate not an absolute value.</span></li>
<li style="font-weight: 400"><b>The Catastrophe</b><span style="font-weight: 400">: The Linux OOM Killer instantly assassinates the Primary MySQL process.</span></li>
</ol>
<p><span style="font-weight: 400">Because we tried to avoid a few seconds of write latency by keeping relaxed Flow Control, we inadvertently caused a hard crash of the primary database pod, with long write downtime.</span></p>
<h3><span style="font-weight: 400">The Architectural Law</span></h3>
<p><span style="font-weight: 400">Therefore, here is my statement as architectural law for containerized environments: </span><b>In Kubernetes, High Availability and Pod stability are so intrinsically linked that Flow Control </b><b><i>must</i></b><b> act as hard as it can to cap the apply queue.</b></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">We cannot allow unbounded memory growth in a container. The only way to bound </span><span style="font-weight: 400">certification_info</span><span style="font-weight: 400"> memory is to bound the apply queue.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">The only way to bound the apply queue is with strict, aggressive Flow Control.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Increasing the number of replication appliers helps but is not the conclusive answer.</span></li>
</ul>
<p><span style="font-weight: 400">In a Kubernetes environment, we must tune </span><span style="font-weight: 400">group_replication_flow_control_applier_threshold</span><span style="font-weight: 400"> to a strict, low number, and accept that during massive traffic spikes, our application </span><i><span style="font-weight: 400">will</span></i><span style="font-weight: 400"> experience write throttling. It is infinitely better for our application&#8217;s connection pool to wait 2 seconds for a </span><span style="font-weight: 400">COMMIT</span><span style="font-weight: 400"> to succeed than for the primary database pod to be violently OOMKilled by the kernel, and have to wait for minutes or hours to recover write capabilities.</span></p>
<h3><span style="font-weight: 400">Note</span></h3>
<p><span style="font-weight: 400">Just as a mention this is exactly how Percona Operator with Percona Xtradb Cluster works. To be more specific, PXC and in general solutions based on Galera have a Flow Control mechanism that enforces the queue to be inside hard limits. While this more invasive control may be noticeable at application level, it guarantees that the other nodes are not lagging behind the primary and this is why it is a stronger HA solution in the Kubernetes environment.</span></p>
<p>&nbsp;</p>
<h2><span style="font-weight: 400">Reference</span></h2>
<p><a href="https://github.com/Tusamarco/mysqloperatorcalculator"><span style="font-weight: 400">https://github.com/Tusamarco/mysqloperatorcalculator</span></a></p>
<p><span style="font-weight: 400">Managing Resources and OOMKills: </span><a href="https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/"><span style="font-weight: 400">Resource Management for Pods and Containers</span></a> <i><span style="font-weight: 400">(This page details how memory limits are enforced reactively by the Linux kernel via OOM kills).</span></i></p>
<p><span style="font-weight: 400">How WSS triggers Evictions: </span><a href="https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/"><span style="font-weight: 400">Node-pressure Eviction</span></a> <i><span style="font-weight: 400">(This page explicitly details how the </span></i><i><span style="font-weight: 400">kubelet</span></i><i><span style="font-weight: 400"> uses the </span></i><i><span style="font-weight: 400">memory.available</span></i><i><span style="font-weight: 400"> signal, which is derived from node capacity minus the working set size).</span></i></p>
<p><span style="font-weight: 400">Latest changes. </span><a href="https://github.com/google/cadvisor/blob/195858077459e69455fd9621fcbaeaf377d69d0e/container/libcontainer/handler.go#L865"><span style="font-weight: 400">Pointer to the code</span></a><span style="font-weight: 400"> </span></p>
<p><span style="font-weight: 400">Swap Memory Management (Core Concepts &amp; Configuration): </span><a href="https://kubernetes.io/docs/concepts/cluster-administration/swap-memory-management/"><span style="font-weight: 400">https://kubernetes.io/docs/concepts/cluster-administration/swap-memory-management/</span></a></p>
<p>The post <a href="https://www.percona.com/blog/the-failover-brownout-rethinking-high-availability-in-mysql-group-replication/">The Failover Brownout: Rethinking High Availability in MySQL Group Replication</a> appeared first on <a href="https://www.percona.com">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/the-failover-brownout-rethinking-high-availability-in-mysql-group-replication/">The Failover Brownout: Rethinking High Availability in MySQL Group Replication</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Foundation Sea Lion Champions Nominees: Sylvain Arbaudie</title>
        <link>https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-sylvain-arbaudie/</link>
        <pubDate>Mon, 15 Jun 2026 06:30:16 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Interview with Sylvain Arbaudie, nominated in the Technical Excellence category.<br />
The MariaDB Foundation Sea Lion Champions program celebrates the people and organizations who help make the MariaDB ecosystem stronger, more open, and more useful for everyone. …<br />
Continue reading "MariaDB Foundation Sea Lion Champions Nominees: Sylvain Arbaudie"<br />
The post MariaDB Foundation Sea Lion Champions Nominees: Sylvain Arbaudie appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-sylvain-arbaudie/">MariaDB Foundation Sea Lion Champions Nominees: Sylvain Arbaudie</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Interview with Sylvain Arbaudie, nominated in the Technical Excellence category.<br />
The MariaDB Foundation Sea Lion Champions program celebrates the people and organizations who help make the MariaDB ecosystem stronger, more open, and more useful for everyone. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-sylvain-arbaudie/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;MariaDB Foundation Sea Lion Champions Nominees: Sylvain Arbaudie&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-sylvain-arbaudie/">MariaDB Foundation Sea Lion Champions Nominees: Sylvain Arbaudie</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-sylvain-arbaudie/">MariaDB Foundation Sea Lion Champions Nominees: Sylvain Arbaudie</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>HammerDB tproc-c on a large server, Postgres 14 to 19 beta1</title>
        <link>https://smalldatum.blogspot.com/2026/06/hammerdb-tproc-c-on-large-server.html</link>
        <pubDate>Sat, 13 Jun 2026 01:00:03 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://smalldatum.blogspot.com/">Small Datum</source>
        <description><![CDATA[<p>This has results for HammerDB tproc-c on a large server using MySQL and Postgres. I am new to HammerDB and still figuring out how to explain and present results so I will keep this simple and just share graphs without explaining the results.tl;drThere are small regressions in versions 16, 17 and 18NOPM usually improves a small amount in 19 beta1 relative to 18Builds, configuration and hardwareI compiled Postgres versions from source: 14.22, 14.23, 15.17, 15.18, 16.13, 16.14, 17.9, 17.10, 18.0, 18.1, 18.2, 18.3, 18.4 and 19 beta1.I used a 48-core server from Hetzneran ax162s with an AMD EPYC 9454P 48-Core Processor with SMT disabled2 Intel D7-P5520 NVMe storage devices with RAID 1 (3.8T each) using ext4128G RAMUbuntu 24.04Postgres configuration files:prior to version 18 the config file is named conf.diff.cx10a50g_c32r128 (x10a_c32r128) and is here for versions 14, 15, 16 and 17.for Postgres 18 and 19 I used conf.diff.cx10b_c32r128 (x10b_c32r128) with io_method=sync to be similar to the config used for versions 14 through 17.BenchmarkThe benchmark is tproc-c from HammerDB. The tproc-c benchmark is derived from TPC-C.The benchmark was run for several workloads:vu=10, wh=1000 - 10 virtual users, 1000 warehousesvu=20, wh=1000 - 20 virtual users, 1000 warehousesvu=40, wh=1000 - 40 virtual users, 1000 warehousesvu=10, wh=2000 - 10 virtual users, 2000 warehousesvu=20, wh=2000 - 20 virtual users, 2000 warehousesvu=40, wh=2000 - 40 virtual users, 2000 warehousesvu=10, wh=4000 - 10 virtual users, 4000 warehousesvu=20, wh=4000 - 20 virtual users, 4000 warehousesvu=40, wh=4000 - 40 virtual users, 4000 warehousesThe wh=1000 workloads are less heavy on IO. The wh=4000 workloads are more heavy on IO.The benchmark for Postgres is run by a variant of this script which depends on scripts here.stored procedures are enabledpartitioning is used because the warehouse count is >= 1000a 5 minute rampup is usedthen performance is measured for 60 minutesResultsMy analysis at this point is simple -- I only consider average throughput. Eventually I will examine throughput over time and efficiency (CPU and IO).On the charts that follow y-axis does not start at 0 to improve readability at the risk of overstating the differences. The y-axis shows relative throughput. There might be a regression when the relative throughput is less than 1.0. There might be an improvement when it is > 1.0. The relative throughput is:(NOPM for some-version / NOPM for base-version)The base version is Postgres 14.22.A spreadsheet with absolute and relative values for NOPM is here.Results: vu=10, wh=1000Summary:There are small regressions in versions 16, 17 and 18 while NOPM improves is 19 beta1Results: vu=20, wh=1000Summary:There are small regressions in versions 16, 17 and 18 while NOPM improves is 19 beta1Results: vu=40, wh=1000Summary:There are small regressions in versions 17 and 18 while NOPM improves is 19 beta1Results: vu=10, wh=2000Summary:There are small regressions in version 18 while NOPM improves is 19 beta1Results: vu=20, wh=2000Summary:There are small regressions in versions 16, 17 and 18 while NOPM improves is 19 beta1Results: vu=40, wh=2000Summary:There are small regressions in versions 16, 17 and 18 while NOPM improves is 19 beta1There is no result for 18.1 because of a bug in my test scriptsResults: vu=10, wh=4000Summary:There are small regressions in versions 16, 17 and 18 while NOPM improves is 19 beta1Results: vu=20, wh=4000Summary:There are small regressions in versions 16, 17 and 18Results: vu=40, wh=4000Summary:There are small regressions in versions 16, 17 and 18 while NOPM improves is 19 beta1</p>
<p><a href="https://smalldatum.blogspot.com/2026/06/hammerdb-tproc-c-on-large-server.html">HammerDB tproc-c on a large server, Postgres 14 to 19 beta1</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>This has results for <a href="https://www.hammerdb.com/">HammerDB</a> tproc-c on a large server using MySQL and Postgres. I am new to HammerDB and still figuring out how to explain and present results so I will keep this simple and just share graphs without explaining the results.</p>
<p>tl;dr</p>
</p>
<ul style="text-align: left"></ul>
</p>
<ul style="text-align: left">
<li>There are small regressions in versions 16, 17 and 18</li>
<li>NOPM usually improves a small amount in 19 beta1 relative to 18</li>
</ul>
<div><b>Builds, configuration and hardware</b></div>
<div>
<div>
<div>
<div></div>
<div>I compiled Postgres versions from source: 14.22, 14.23, 15.17, 15.18, 16.13, 16.14, 17.9, 17.10, 18.0, 18.1, 18.2, 18.3, 18.4 and 19 beta1.</div>
</div>
<div></div>
<div>
<div>I used a 48-core server from Hetzner</div>
<div>
<ul>
<li>an ax162s with an AMD EPYC 9454P 48-Core Processor with SMT disabled</li>
<li>2 Intel D7-P5520 NVMe storage devices with RAID 1 (3.8T each) using ext4</li>
<li>128G RAM</li>
<li>Ubuntu 24.04</li>
</ul>
<div>
<div><span style="font-family: inherit">Postgres configuration files:</span></div>
<div>
<ul>
<li><span style="font-family: inherit">prior to version 18 the config file is named conf.diff.cx10a50g_c32r128 (x10a_c32r128) and is here for versions </span><a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/pg1412_o2nofp/conf.diff.cx10a50g_c32r128">14</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/pg157_o2nofp/conf.diff.cx10a50g_c32r128">15</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/pg163_o2nofp/conf.diff.cx10a50g_c32r128">16</a> and <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/pg17beta1_o2nofp/conf.diff.cx10a50g_c32r128">17</a>.</li>
<li>for Postgres 18 and 19 I used <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/pg18beta3_o2nofp/conf.diff.cx10b50g_c32r128">conf.diff.cx10b_c32r128</a> (x10b_c32r128) with io_method=sync to be similar to the config used for versions 14 through 17.</li>
</ul>
<div>
<div><b>Benchmark</b></p>
<div></div>
</div>
<div></div>
<div>The benchmark is <a href="https://www.hammerdb.com/docs/ch03.html">tproc-c</a> from <a href="https://www.hammerdb.com/">HammerDB</a>. The tproc-c benchmark is derived from TPC-C.</p>
<p>The benchmark was run for several workloads:</p></div>
<div>
<ul>
<li>vu=10, wh=1000 &#8211; 10 virtual users, 1000 warehouses</li>
<li>vu=20, wh=1000 &#8211; 20 virtual users, 1000 warehouses</li>
<li>vu=40, wh=1000 &#8211; 40 virtual users, 1000 warehouses</li>
<li>vu=10, wh=2000 &#8211; 10 virtual users, 2000 warehouses</li>
<li>vu=20, wh=2000 &#8211; 20 virtual users, 2000 warehouses</li>
<li>vu=40, wh=2000 &#8211; 40 virtual users, 2000 warehouses</li>
<li>vu=10, wh=4000 &#8211; 10 virtual users, 4000 warehouses</li>
<li>vu=20, wh=4000 &#8211; 20 virtual users, 4000 warehouses</li>
<li>vu=40, wh=4000 &#8211; 40 virtual users, 4000 warehouses</li>
</ul>
<div>The wh=1000 workloads are less heavy on IO. The wh=4000 workloads are more heavy on IO.</div>
<div></div>
<div>The benchmark for Postgres is run by a variant of <a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/jan26.tprocc.pn53.pg/allpg.N.sh">this script</a> which depends on <a href="https://github.com/mdcallag/mytools/tree/master/bench/arc/jan26.tprocc.pn53.pg/testscripts">scripts here</a>.</div>
<div>
<ul>
<li>stored procedures are enabled</li>
<li>partitioning is used because the warehouse count is &gt;= 1000</li>
<li>a 5 minute rampup is used</li>
<li>then performance is measured for 60 minutes</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div><b>Results</b></div>
<div><b><br /></b></div>
<div>My analysis at this point is simple &#8212; I only consider average throughput. Eventually I will examine throughput over time and efficiency (CPU and IO).</div>
<div></div>
<div>On the charts that follow y-axis does not start at 0 to improve readability <b>at the risk of overstating the differences</b>. The y-axis shows relative throughput. There might be a regression when the relative throughput is less than 1.0. There might be an improvement when it is &gt; 1.0. The relative throughput is:</div>
</div>
<blockquote style="border-color: currentcolor;border-style: none;border-width: medium;border: none;margin: 0px 0px 0px 40px;padding: 0px"><p>(NOPM for <i>some-version</i> / NOPM for <i>base-version</i>)</p></blockquote>
<p>The base version is Postgres 14.22.</p>
<p>A spreadsheet with absolute and relative values for NOPM <a href="https://docs.google.com/spreadsheets/d/1OTrl-jTwfBUzl32B6R2Az2WL8ysDy6f2Iljg3zMfdAo/edit?usp=sharing">is here</a>.</p>
<p><b>Results: vu=10, wh=1000</b></p>
<p>Summary:</p>
</p>
</p>
<ul style="text-align: left">
<li>There are small regressions in versions 16, 17 and 18 while NOPM improves is 19 beta1</li>
</ul>
<div class="separator" style="clear: both;text-align: center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm3Ts72epDSYxW4mDZw_9bNJ5dPgLwMn07XAKtJWiGhIro3-Jo5e7lEdSFrKexARX1da3mGuaR17ANgwpudMAXGvDCGats5zdNANPFge4cT2-au-utPsMrHiXHucKtNU8aoQbQGSt_108RIwqy1EmmSyBWcEN8fcPhEwGlDE4C5AmbDmUkv9rltQ-i5j2W/s600/relative%20NOPM_%201000%20warehouses,%2010%20virtual%20users.png" style="margin-left: 1em;margin-right: 1em"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm3Ts72epDSYxW4mDZw_9bNJ5dPgLwMn07XAKtJWiGhIro3-Jo5e7lEdSFrKexARX1da3mGuaR17ANgwpudMAXGvDCGats5zdNANPFge4cT2-au-utPsMrHiXHucKtNU8aoQbQGSt_108RIwqy1EmmSyBWcEN8fcPhEwGlDE4C5AmbDmUkv9rltQ-i5j2W/w640-h396/relative%20NOPM_%201000%20warehouses,%2010%20virtual%20users.png" width="640" /></a></div>
<p><b>Results: vu=20, wh=1000</b></p>
<p>Summary:</p>
</p>
</p>
<ul style="text-align: left">
<li>There are small regressions in versions 16, 17 and 18 while NOPM improves is 19 beta1</li>
</ul>
<div class="separator" style="clear: both;text-align: center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4g__41do5Fskg5kucMPbOZOMgUKsBc11ntmPhSsmQxUA2XBFfJLnn0YrHrprKtJPgOcHEA-viSbbVnStEHbL5Gy2GWxaYRzfQQ76EJDLUiFyMn2XqnEao9K5ZB2Ne5fOY304OE8hMxAhtRcHOye8g0P7U8Z9iFTde_nc6DIznuZM_CDdDxDScZ5oQgsUk/s600/relative%20NOPM_%201000%20warehouses,%2020%20virtual%20users.png" style="margin-left: 1em;margin-right: 1em"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4g__41do5Fskg5kucMPbOZOMgUKsBc11ntmPhSsmQxUA2XBFfJLnn0YrHrprKtJPgOcHEA-viSbbVnStEHbL5Gy2GWxaYRzfQQ76EJDLUiFyMn2XqnEao9K5ZB2Ne5fOY304OE8hMxAhtRcHOye8g0P7U8Z9iFTde_nc6DIznuZM_CDdDxDScZ5oQgsUk/w640-h396/relative%20NOPM_%201000%20warehouses,%2020%20virtual%20users.png" width="640" /></a></div>
<p><b>Results: vu=40, wh=1000</b></p>
<p>Summary:</p>
</p>
</p>
<ul style="text-align: left">
<li>There are small regressions in versions 17 and 18 while NOPM improves is 19 beta1</li>
</ul>
<div class="separator" style="clear: both;text-align: center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZf60hioew3Mutsk-R2jGKFh1uvw-ljdyuN_-HEnulX34bCAJZlzLpyXkAuwynurAluRi_m6wCw5aKH6raptWcN16G13Fgol_8a-WV4gMslq4WIKIJ5EAcKK3l5Df7SVXF60ev13SuyFemwOaGn9jh1lNlHAW5TKCY745rCdgK-BDzQGfdt0WDkP2QxPtj/s600/relative%20NOPM_%201000%20warehouses,%2040%20virtual%20users.png" style="margin-left: 1em;margin-right: 1em"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZf60hioew3Mutsk-R2jGKFh1uvw-ljdyuN_-HEnulX34bCAJZlzLpyXkAuwynurAluRi_m6wCw5aKH6raptWcN16G13Fgol_8a-WV4gMslq4WIKIJ5EAcKK3l5Df7SVXF60ev13SuyFemwOaGn9jh1lNlHAW5TKCY745rCdgK-BDzQGfdt0WDkP2QxPtj/w640-h396/relative%20NOPM_%201000%20warehouses,%2040%20virtual%20users.png" width="640" /></a></div>
<p><b>Results: vu=10, wh=2000</b></p>
<p>Summary:</p>
</p>
</p>
<ul style="text-align: left">
<li>There are small regressions in version 18 while NOPM improves is 19 beta1</li>
</ul>
<div class="separator" style="clear: both;text-align: center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3X2SQitxMnSt9I4kvHyJCm-Jjnk4tp07RFfu2J8aaq_XoVdr5ABj-A_JJIB1g7BrHo4MpkJQSSPdsH1_3V75Nv_960Ba9rnfbW6_VBKC1vsiUJCQ-0_lhuz0th2PrplLR1JqQUlcRCvk8p2WsCfi-Cx6eGEm2BAxd6IR9S7I6PvdIw57EvO0NjgwWP87x/s600/relative%20NOPM_%202000%20warehouses,%2010%20virtual%20users.png" style="margin-left: 1em;margin-right: 1em"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3X2SQitxMnSt9I4kvHyJCm-Jjnk4tp07RFfu2J8aaq_XoVdr5ABj-A_JJIB1g7BrHo4MpkJQSSPdsH1_3V75Nv_960Ba9rnfbW6_VBKC1vsiUJCQ-0_lhuz0th2PrplLR1JqQUlcRCvk8p2WsCfi-Cx6eGEm2BAxd6IR9S7I6PvdIw57EvO0NjgwWP87x/w640-h396/relative%20NOPM_%202000%20warehouses,%2010%20virtual%20users.png" width="640" /></a></div>
<p><b>Results: vu=20, wh=2000</b></p>
<p>Summary:</p>
</p>
</p>
<ul style="text-align: left">
<li>There are small regressions in versions 16, 17 and 18 while NOPM improves is 19 beta1</li>
</ul>
<div class="separator" style="clear: both;text-align: center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqeXwXngBg6LPDxjgODIDS_XTcB4y-KqFNg8VsV3goBCzx6AX5Qf6oPg7p7aOtAjNCtmGrx9C8QidDxiKHoD-YW9Xc5fYsljaC4pcTUUr8RlXLVLTxKH2zzW6jScbPRpRRbgN65BKv-0zrZ4tFjPDlwO-lBgqa_Zcn-uYjCEOzoA5PZt4t15ENvEV1tiVR/s600/relative%20NOPM_%202000%20warehouses,%2020%20virtual%20users.png" style="margin-left: 1em;margin-right: 1em"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqeXwXngBg6LPDxjgODIDS_XTcB4y-KqFNg8VsV3goBCzx6AX5Qf6oPg7p7aOtAjNCtmGrx9C8QidDxiKHoD-YW9Xc5fYsljaC4pcTUUr8RlXLVLTxKH2zzW6jScbPRpRRbgN65BKv-0zrZ4tFjPDlwO-lBgqa_Zcn-uYjCEOzoA5PZt4t15ENvEV1tiVR/w640-h396/relative%20NOPM_%202000%20warehouses,%2020%20virtual%20users.png" width="640" /></a></div>
<p><b>Results: vu=40, wh=2000</b></p>
<p>Summary:</p>
</p>
<ul style="text-align: left">
<li>There are small regressions in versions 16, 17 and 18 while NOPM improves is 19 beta1</li>
<li>There is no result for 18.1 because of a bug in my test scripts</li>
</ul>
<div class="separator" style="clear: both;text-align: center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWg70aQKWVWL6QuQuy_rXmnB-Y-SN9FR1w7vKbb2TELL50feiivF-T8iYBTvVDEjzbAEqXICOzAJJFn8BJZwvqkoqLze6_76tUm-84luHscpRouH2yHJ7IA-TuMEUMdel0QljbqZ4cqBJIx1qANR3gv5rNvaqlmEAdKMjFnzi8Aiw2faTDuNmxEXEBhrf1/s600/relative%20NOPM_%202000%20warehouses,%2040%20virtual%20users.png" style="margin-left: 1em;margin-right: 1em"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWg70aQKWVWL6QuQuy_rXmnB-Y-SN9FR1w7vKbb2TELL50feiivF-T8iYBTvVDEjzbAEqXICOzAJJFn8BJZwvqkoqLze6_76tUm-84luHscpRouH2yHJ7IA-TuMEUMdel0QljbqZ4cqBJIx1qANR3gv5rNvaqlmEAdKMjFnzi8Aiw2faTDuNmxEXEBhrf1/w640-h396/relative%20NOPM_%202000%20warehouses,%2040%20virtual%20users.png" width="640" /></a></div>
<p><b>Results: vu=10, wh=4000</b></p>
<p>Summary:</p>
</p>
</p>
<ul style="text-align: left">
<li>There are small regressions in versions 16, 17 and 18 while NOPM improves is 19 beta1</li>
</ul>
<div class="separator" style="clear: both;text-align: center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq5B0YaewnHC3323e_8hMgC7LOa9xZMfTfkQct_EC1Q5YgbiLKDb6SZh7k1lMGzTP_ngq_kGzzIbUaH2AAE9d6ih0bjxXaugGaBQGvBwCjqhQH5XxXeKQFiPS8Itu2XLkvN5yTueNOW1rqnk8IfqCFVgRk5BlUY5BRfcqbVHgE5abHLMLl1rfHy-o2gq7L/s600/relative%20NOPM_%204000%20warehouses,%2010%20virtual%20users.png" style="margin-left: 1em;margin-right: 1em"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq5B0YaewnHC3323e_8hMgC7LOa9xZMfTfkQct_EC1Q5YgbiLKDb6SZh7k1lMGzTP_ngq_kGzzIbUaH2AAE9d6ih0bjxXaugGaBQGvBwCjqhQH5XxXeKQFiPS8Itu2XLkvN5yTueNOW1rqnk8IfqCFVgRk5BlUY5BRfcqbVHgE5abHLMLl1rfHy-o2gq7L/w640-h396/relative%20NOPM_%204000%20warehouses,%2010%20virtual%20users.png" width="640" /></a></div>
<p><b>Results: vu=20, wh=4000</b></p>
<p>Summary:</p>
</p>
</p>
<ul style="text-align: left">
<li>There are small regressions in versions 16, 17 and 18</li>
</ul>
<div class="separator" style="clear: both;text-align: center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDDMWDhUQC6sr4Oh36Blj8C4I4QQRAQxDv_JpU908j335B4ML-ul062sy4l2x08k2o_GTIfjardMpiFjyF54LRHT_5kxHXCbwwhCMvetGNFFB-fw_4CFtIrGhcbSBvWDJK1BQZaoZXJG0aOs2o4mw0Yj6TnCNmjVMPm5YZJYix1VgqFpP-UAbc1XdDeOxR/s600/relative%20NOPM_%204000%20warehouses,%2020%20virtual%20users.png" style="margin-left: 1em;margin-right: 1em"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDDMWDhUQC6sr4Oh36Blj8C4I4QQRAQxDv_JpU908j335B4ML-ul062sy4l2x08k2o_GTIfjardMpiFjyF54LRHT_5kxHXCbwwhCMvetGNFFB-fw_4CFtIrGhcbSBvWDJK1BQZaoZXJG0aOs2o4mw0Yj6TnCNmjVMPm5YZJYix1VgqFpP-UAbc1XdDeOxR/w640-h396/relative%20NOPM_%204000%20warehouses,%2020%20virtual%20users.png" width="640" /></a></div>
<p><b>Results: vu=40, wh=4000</b></p>
<p>Summary:</p>
</p>
</p>
<ul style="text-align: left">
<li>There are small regressions in versions 16, 17 and 18 while NOPM improves is 19 beta1</li>
</ul>
<div class="separator" style="clear: both;text-align: center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4OGWuarn45EqrYg0CJljnMjxxma62kaQWRQ9vpFBfDM6lkGTMU2zrGSGCJHY35D7L4GTI-Ad6JzOtehh5HfwMPgHOzEzbtKBv2-vWGWbkrFMUCfar5RJm3i9kADaP6XsqCH3NSrpzQ3_EZa_uCDLR_XoGCgxOvLWdaq1FtGOadNhXCtbsLN0XXX7w6ygW/s600/relative%20NOPM_%204000%20warehouses,%2040%20virtual%20users.png" style="margin-left: 1em;margin-right: 1em"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4OGWuarn45EqrYg0CJljnMjxxma62kaQWRQ9vpFBfDM6lkGTMU2zrGSGCJHY35D7L4GTI-Ad6JzOtehh5HfwMPgHOzEzbtKBv2-vWGWbkrFMUCfar5RJm3i9kADaP6XsqCH3NSrpzQ3_EZa_uCDLR_XoGCgxOvLWdaq1FtGOadNhXCtbsLN0XXX7w6ygW/w640-h396/relative%20NOPM_%204000%20warehouses,%2040%20virtual%20users.png" width="640" /></a></div>
<p></p>
</div>
<div>
<div></div>
</div>
</div>
</div>
<p><a href="https://smalldatum.blogspot.com/2026/06/hammerdb-tproc-c-on-large-server.html">HammerDB tproc-c on a large server, Postgres 14 to 19 beta1</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB + DuckDB: A New Playground for Analytics – A First Look at the New Storage Engine</title>
        <link>https://mariadb.org/mariadb-duckdb-a-new-playground-for-analytics-a-first-look-at-the-new-storage-engine/</link>
        <pubDate>Fri, 12 Jun 2026 11:53:16 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>MariaDB just announced it has learned to quack: the new DuckDB storage engine has joined the large family of storage engines in MariaDB Server. …<br />
Continue reading "MariaDB + DuckDB: A New Playground for Analytics – A First Look at the New Storage Engine"<br />
The post MariaDB + DuckDB: A New Playground for Analytics – A First Look at the New Storage Engine appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/mariadb-duckdb-a-new-playground-for-analytics-a-first-look-at-the-new-storage-engine/">MariaDB + DuckDB: A New Playground for Analytics – A First Look at the New Storage Engine</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB just <a href="https://mariadb.org/duckdb-storage-engine-for-mariadb-when-the-sea-lion-learns-to-quack/">announced </a>it has learned to quack: the new DuckDB storage engine has joined the large family of storage engines in MariaDB Server. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/mariadb-duckdb-a-new-playground-for-analytics-a-first-look-at-the-new-storage-engine/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;MariaDB + DuckDB: A New Playground for Analytics &#8211; A First Look at the New Storage Engine&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/mariadb-duckdb-a-new-playground-for-analytics-a-first-look-at-the-new-storage-engine/">MariaDB + DuckDB: A New Playground for Analytics &#8211; A First Look at the New Storage Engine</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/mariadb-duckdb-a-new-playground-for-analytics-a-first-look-at-the-new-storage-engine/">MariaDB + DuckDB: A New Playground for Analytics – A First Look at the New Storage Engine</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Guide Multi-Cluster MongoDB on GKE with MCS, Percona Operator</title>
        <link>https://percona.community/blog/2026/06/12/multi-cluster-mongodb-percona-operator/</link>
        <pubDate>Fri, 12 Jun 2026 11:00:00 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>Multi-Cluster MongoDB on GKE with MCS Guide Deploying the Percona Operator for MongoDB across two GKE clusters using Multi-Cluster Services (MCS)</p>
<p><a href="https://percona.community/blog/2026/06/12/multi-cluster-mongodb-percona-operator/">Guide Multi-Cluster MongoDB on GKE with MCS, Percona Operator</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<h1 id="multi-cluster-mongodb-on-gke-with-mcs-guide">Multi-Cluster MongoDB on GKE with MCS Guide</h1>
<p>Deploying the Percona Operator for MongoDB across two GKE clusters using Multi-Cluster Services (MCS)</p>
<p>This guide walks through deploying a highly available MongoDB replica set that spans two GKE clusters using the <a href="https://github.com/percona/percona-server-mongodb-operator" target="_blank" rel="noopener noreferrer">Percona Operator for MongoDB</a> and <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/multi-cluster-services" target="_blank" rel="noopener noreferrer">GKE Multi-Cluster Services (MCS)</a>.</p>
<h2 id="architecture-overview">Architecture Overview</h2>
<p>Both clusters belong to the same <strong>GKE Fleet</strong>. MCS gives each cluster DNS names for the<br />
other cluster’s services (<code>*.psmdb.svc.clusterset.local</code>). <strong><code>externalNodes</code></strong> in the<br />
Percona CR tells MongoDB to use those names as replica-set members. MCS provides<br />
cross-cluster DNS; <code>externalNodes</code> wires MongoDB to use it.</p>
<h3 id="what-runs-on-each-cluster">What runs on each cluster</h3>
<p>Each site runs a <strong>sharded</strong> MongoDB cluster (not a single 6-node replset):</p>
<pre class="mermaid">
flowchart TB
subgraph Main["Main cluster, Operator MANAGED"]
direction TB
MO["mongos ×3"]
MC["cfg replset: cfg-0, cfg-1, cfg-2"]
MR["shard rs0: rs0-0, rs0-1, rs0-2"]
MO --&gt; MC
MO --&gt; MR
end
subgraph Replica["Replica cluster, Operator UNMANAGED"]
direction TB
RO["mongos ×3"]
RC["cfg replset: cfg-0, cfg-1, cfg-2"]
RR["shard rs0: rs0-0, rs0-1, rs0-2"]
RO --&gt; RC
RO --&gt; RR
end
MC |"6 members, config servers"| RC
MR |"6 members, shard data"| RR
</pre>
<p>Once interconnected, each replset has <strong>6 members</strong> (3 on main + 3 on replica). One<br />
PRIMARY per replset; the rest are SECONDARY.</p>
<h3 id="mcs-is-bidirectional">MCS is bidirectional</h3>
<p>Both clusters <strong>export</strong> their own services and <strong>import</strong> the other cluster’s services:</p>
<pre class="mermaid">
flowchart LR
subgraph Main["Main cluster"]
ExpM["ServiceExportn(main services)"]
ImpM["ServiceImportn(replica services)"]
end
subgraph Replica["Replica cluster"]
ExpR["ServiceExportn(replica services)"]
ImpR["ServiceImportn(main services)"]
end
ExpM --&gt;|"MCS Fleet"| ImpR
ExpR --&gt;|"MCS Fleet"| ImpM
ImpM --&gt; DNS["*.psmdb.svc.clusterset.local"]
ImpR --&gt; DNS
</pre>
<p>Each cluster sees <strong>18 ServiceImports</strong>, 9 from main + 9 from replica.</p>
<h2 id="prerequisites">Prerequisites</h2>
<ul>
<li><code>gcloud</code> CLI installed and authenticated</li>
<li><code>kubectl</code> installed</li>
<li><code>yq</code> installed (<code>brew install yq</code> on macOS or <code>apt install yq</code> on Linux)</li>
<li>A GCP project with billing enabled</li>
<li>Owner or Editor role on the project</li>
</ul>
<p>If you want to see all the command in a Readmefile, see the Github repository <a href="https://github.com/edithturn/psmdb-operator-multicluster-demo/blob/main/README.md" target="_blank" rel="noopener noreferrer">here</a>.</p>
<h2 id="file-layout">File Layout</h2>
<p>After completing this guide you will have:</p>
<p><strong>Kubeconfigs</strong> (in <code>~/.kube/psmdb-demo/</code>, outside this repo):</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-2" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-2">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">~/.kube/psmdb-demo/gcp-main_config # kubeconfig for main cluster
</span></span><span class="line"><span class="cl">~/.kube/psmdb-demo/gcp-replica_config # kubeconfig for replica cluster</span></span></code></pre>
</div>
</div>
</div>
<p><strong>Manifests and exports</strong> (in this working directory):</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-3" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-3">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">cr-main.yaml # Main cluster initial config
</span></span><span class="line"><span class="cl">cr-main-after.yaml # Main cluster config with externalNodes
</span></span><span class="line"><span class="cl">cr-replica.yaml # Replica cluster config
</span></span><span class="line"><span class="cl">cr-replica-after.yaml # Replica cluster config with externalNodes</span></span></code></pre>
</div>
</div>
</div>
<p>The following files are local only, created during the guide, listed in <code>.gitignore</code>, <strong>do not commit</strong> (contain passwords, TLS keys, and encryption keys):</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-4" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-4">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">my-cluster-secrets.yml # exported from main (do not apply directly)
</span></span><span class="line"><span class="cl">main-cluster-ssl.yml # exported from main (do not apply directly)
</span></span><span class="line"><span class="cl">main-cluster-ssl-internal.yml # exported from main (do not apply directly)
</span></span><span class="line"><span class="cl">my-cluster-name-mongodb-encryption-key.yml # exported from main (do not apply directly)
</span></span><span class="line"><span class="cl">my-cluster-secrets-replica.yaml # modified for replica, apply this
</span></span><span class="line"><span class="cl">replica-cluster-ssl.yml # modified for replica, apply this
</span></span><span class="line"><span class="cl">replica-cluster-ssl-internal.yml # modified for replica, apply this
</span></span><span class="line"><span class="cl">my-cluster-name-mongodb-encryption-key-replica.yml # modified for replica, apply this</span></span></code></pre>
</div>
</div>
</div>
<blockquote>
<p><strong>Why two versions of cr-main.yaml?</strong><br />
The initial <code>cr-main.yaml</code> deploys the cluster without knowing the replica node addresses.<br />
After the replica cluster is running and ServiceImports are confirmed, <code>cr-main-after.yaml</code><br />
adds <code>externalNodes</code> to interconnect the two clusters. This avoids DNS failures during<br />
initial deployment.</p>
</blockquote>
<h2 id="step-1-set-your-project-id">Step 1: Set your project ID</h2>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-5" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-5">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">export</span> <span class="nv">PROJECT_ID</span><span class="o">=</span>your_project_id</span></span></code></pre>
</div>
</div>
</div>
<p>Verify:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-6" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-6">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">echo</span> <span class="nv">$PROJECT_ID</span></span></span></code></pre>
</div>
</div>
</div>
<h2 id="step-2-enable-required-gcp-apis">Step 2: Enable required GCP APIs</h2>
<p>These APIs are required for MCS, Fleet, and Workload Identity to work.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-7" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-7">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">gcloud services <span class="nb">enable</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> multiclusterservicediscovery.googleapis.com <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> gkehub.googleapis.com <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> cloudresourcemanager.googleapis.com <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> trafficdirector.googleapis.com <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> dns.googleapis.com <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --project <span class="nv">$PROJECT_ID</span></span></span></code></pre>
</div>
</div>
</div>
<p>Expected output: each API shows <code>Enabling API...</code> then <code>Operation finished successfully</code>.</p>
<h2 id="step-3-create-two-gke-clusters">Step 3: Create two GKE clusters</h2>
<p>Both clusters must be created with <code>--workload-metadata=GKE_METADATA</code> and <code>--workload-pool</code><br />
to enable Workload Identity Federation, which is required by the MCS importer.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-8" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-8">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># Main cluster</span>
</span></span><span class="line"><span class="cl">gcloud container clusters create main-cluster <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --zone us-central1-a <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --machine-type n1-standard-4 <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --num-nodes<span class="o">=</span><span class="m">3</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --workload-metadata<span class="o">=</span>GKE_METADATA <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --workload-pool<span class="o">=</span><span class="nv">$PROJECT_ID</span>.svc.id.goog
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Replica cluster</span>
</span></span><span class="line"><span class="cl">gcloud container clusters create replica-cluster <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --zone us-central1-a <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --machine-type n1-standard-4 <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --num-nodes<span class="o">=</span><span class="m">3</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --workload-metadata<span class="o">=</span>GKE_METADATA <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --workload-pool<span class="o">=</span><span class="nv">$PROJECT_ID</span>.svc.id.goog</span></span></code></pre>
</div>
</div>
</div>
<blockquote>
<p>Both clusters use <code>us-central1-a</code> here for simplicity. In a production setup,<br />
use different zones or regions (e.g. <code>us-east1-b</code>) for the replica to achieve<br />
true regional isolation.</p>
</blockquote>
<h2 id="step-4-enable-mcs-and-register-clusters-to-the-fleet">Step 4: Enable MCS and register clusters to the Fleet</h2>
<p>GKE uses a Fleet to group clusters. There is exactly one Fleet per GCP project,<br />
automatically named after the project ID. MCS works across all clusters in the same Fleet.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-9" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-9">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># Enable MCS at the Fleet level</span>
</span></span><span class="line"><span class="cl">gcloud container fleet multi-cluster-services <span class="nb">enable</span> --project <span class="nv">$PROJECT_ID</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Register main cluster to the Fleet</span>
</span></span><span class="line"><span class="cl">gcloud container fleet memberships register main-cluster <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --gke-cluster us-central1-a/main-cluster <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --enable-workload-identity
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Register replica cluster to the Fleet</span>
</span></span><span class="line"><span class="cl">gcloud container fleet memberships register replica-cluster <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --gke-cluster us-central1-a/replica-cluster <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --enable-workload-identity</span></span></code></pre>
</div>
</div>
</div>
<h2 id="step-5-grant-iam-permissions-to-the-mcs-importer">Step 5: Grant IAM permissions to the MCS Importer</h2>
<p>The MCS Importer is a GKE-managed pod in the <code>gke-mcs</code> namespace on each cluster.<br />
Its job is to watch for <code>ServiceExport</code> resources and create <code>ServiceImport</code> objects<br />
on other clusters. It needs read access to your VPC network configuration to do this.</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-10" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-10">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># Get the numeric project number (different from the project ID string)</span>
</span></span><span class="line"><span class="cl"><span class="nv">PROJECT_NUMBER</span><span class="o">=</span><span class="k">$(</span>gcloud projects describe <span class="nv">$PROJECT_ID</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --format<span class="o">=</span><span class="s2">"value(projectNumber)"</span><span class="k">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Grant compute.networkViewer to the MCS importer service account</span>
</span></span><span class="line"><span class="cl">gcloud projects add-iam-policy-binding <span class="nv">$PROJECT_ID</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --member <span class="s2">"principal://iam.googleapis.com/projects/</span><span class="nv">$PROJECT_NUMBER</span><span class="s2">/locations/global/workloadIdentityPools/</span><span class="nv">$PROJECT_ID</span><span class="s2">.svc.id.goog/subject/ns/gke-mcs/sa/gke-mcs-importer"</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --role <span class="s2">"roles/compute.networkViewer"</span></span></span></code></pre>
</div>
</div>
</div>
<h2 id="step-6-verify-mcs-is-active-on-both-clusters">Step 6: Verify MCS is active on both clusters</h2>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-11" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-11">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">gcloud container fleet multi-cluster-services describe --project <span class="nv">$PROJECT_ID</span></span></span></code></pre>
</div>
</div>
</div>
<p>Expected output, both clusters must show <code>code: OK</code>:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">yaml</span><button class="code-block__copy" type="button" data-copy-target="codeblock-12" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-12">
<div class="highlight">
<pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">membershipStates</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">projects/XXXXXXX/locations/us-central1/memberships/main-cluster</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">state</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">code</span><span class="p">:</span><span class="w"> </span><span class="l">OK</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">description</span><span class="p">:</span><span class="w"> </span><span class="l">Firewall successfully updated</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">projects/XXXXXXX/locations/us-central1/memberships/replica-cluster</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">state</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">code</span><span class="p">:</span><span class="w"> </span><span class="l">OK</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">description</span><span class="p">:</span><span class="w"> </span><span class="l">Firewall successfully updated</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">resourceState</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">state</span><span class="p">:</span><span class="w"> </span><span class="l">ACTIVE</span></span></span></code></pre>
</div>
</div>
</div>
<blockquote>
<p>If you see <code>code: PENDING</code> wait 2–3 minutes and re-run. If you see errors,<br />
check that both clusters were created with <code>--workload-pool</code> and the IAM<br />
binding in Step 5 was applied successfully.</p>
</blockquote>
<h2 id="step-7-generate-kubeconfig-files">Step 7: Generate kubeconfig files</h2>
<blockquote>
<p><strong>Security:</strong> Kubeconfig files contain credentials that grant access to your clusters.<br />
Keep both files in <code>~/.kube/psmdb-demo</code> only, do not copy them elsewhere, commit them<br />
to version control, or share them with anyone.</p>
</blockquote>
<p>Store kubeconfig files in a dedicated directory outside this project:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-13" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-13">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">mkdir -p ~/.kube/psmdb-demo
</span></span><span class="line"><span class="cl">chmod <span class="m">700</span> ~/.kube/psmdb-demo</span></span></code></pre>
</div>
</div>
</div>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-14" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-14">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># Generate kubeconfig for main cluster</span>
</span></span><span class="line"><span class="cl"><span class="nv">KUBECONFIG</span><span class="o">=</span>~/.kube/psmdb-demo/gcp-main_config gcloud container clusters <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> get-credentials main-cluster --zone us-central1-a
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Generate kubeconfig for replica cluster</span>
</span></span><span class="line"><span class="cl"><span class="nv">KUBECONFIG</span><span class="o">=</span>~/.kube/psmdb-demo/gcp-replica_config gcloud container clusters <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> get-credentials replica-cluster --zone us-central1-a
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">chmod <span class="m">600</span> ~/.kube/psmdb-demo/gcp-main_config ~/.kube/psmdb-demo/gcp-replica_config</span></span></code></pre>
</div>
</div>
</div>
<p>Verify both files were created:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-15" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-15">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ls -la ~/.kube/psmdb-demo/gcp-main_config ~/.kube/psmdb-demo/gcp-replica_config</span></span></code></pre>
</div>
</div>
</div>
<p>Verify each connects to the correct cluster:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-16" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-16">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl --kubeconfig ~/.kube/psmdb-demo/gcp-main_config get nodes
</span></span><span class="line"><span class="cl">kubectl --kubeconfig ~/.kube/psmdb-demo/gcp-replica_config get nodes</span></span></code></pre>
</div>
</div>
</div>
<blockquote>
<p><strong>Two terminals, set up once:</strong> Open <strong>two terminal windows</strong> for the rest of this<br />
guide. Run each export <strong>once</strong> when you open the terminal, you do not need to repeat<br />
it in later steps unless you open a new window:</p>
<table>
<thead>
<tr>
<th>Terminal</th>
<th>Cluster</th>
<th>Run once when opening the terminal</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Terminal 1</strong></td>
<td>Main</td>
<td><code>export KUBECONFIG=~/.kube/psmdb-demo/gcp-main_config</code></td>
</tr>
<tr>
<td><strong>Terminal 2</strong></td>
<td>Replica</td>
<td><code>export KUBECONFIG=~/.kube/psmdb-demo/gcp-replica_config</code></td>
</tr>
</tbody>
</table>
<p>Verify:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-17" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-17">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl get nodes</span></span></code></pre>
</div>
</div>
</div>
<p>From Step 8 onward, every <code>kubectl</code> block is labeled <strong>Terminal 1</strong> or <strong>Terminal 2</strong><br />
only. Run the command in the matching terminal.<br />
Re-export only if you open a <strong>new</strong> terminal window.</p>
</blockquote>
<p>Example: This is how the cluster looks like:</p>
<p><strong>Terminal 1 · main cluster</strong></p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-18" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-18">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ kubectl get nodes
</span></span><span class="line"><span class="cl">NAME STATUS ROLES AGE VERSION
</span></span><span class="line"><span class="cl">gke-main-cluster-default-pool-9c0082b4-19wj Ready  68m v1.35.3-gke.2190000
</span></span><span class="line"><span class="cl">gke-main-cluster-default-pool-9c0082b4-q78p Ready  68m v1.35.3-gke.2190000
</span></span><span class="line"><span class="cl">gke-main-cluster-default-pool-9c0082b4-rb6r Ready  68m v1.35.3-gke.2190000</span></span></code></pre>
</div>
</div>
</div>
<p><strong>Terminal 2 · replica cluster</strong></p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-19" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-19">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ kubectl get nodes
</span></span><span class="line"><span class="cl">NAME STATUS ROLES AGE VERSION
</span></span><span class="line"><span class="cl">gke-replica-cluster-default-pool-3f3e6f2b-1qkb Ready  56m v1.35.3-gke.2190000
</span></span><span class="line"><span class="cl">gke-replica-cluster-default-pool-3f3e6f2b-gl5j Ready  56m v1.35.3-gke.2190000
</span></span><span class="line"><span class="cl">gke-replica-cluster-default-pool-3f3e6f2b-h6hk Ready  56m v1.35.3-gke.2190000</span></span></code></pre>
</div>
</div>
</div>
<h2 id="step-8-grant-cluster-admin-permissions-to-your-account">Step 8: Grant cluster-admin permissions to your account</h2>
<p>GCP project access and Kubernetes permissions inside each cluster are separate,<br />
Step 7’s kubeconfig lets you authenticate, but from Step 9 onward you need<br />
cluster-wide rights to install the operator and deploy MongoDB. Main and replica are<br />
independent clusters with their own RBAC, so run the same command on each; a binding<br />
on one does not apply to the other.</p>
<p><strong>Terminal 1:</strong></p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-20" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-20">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl create clusterrolebinding cluster-admin-binding <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --clusterrole cluster-admin <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --user <span class="k">$(</span>gcloud config get-value core/account<span class="k">)</span></span></span></code></pre>
</div>
</div>
</div>
<p><strong>Terminal 2:</strong></p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-21" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-21">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl create clusterrolebinding cluster-admin-binding <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --clusterrole cluster-admin <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --user <span class="k">$(</span>gcloud config get-value core/account<span class="k">)</span></span></span></code></pre>
</div>
</div>
</div>
<blockquote>
<p>If you see <code>AlreadyExists</code> on either cluster, the binding was already created in a<br />
previous session. This is not an error; continue to the next step.</p>
</blockquote>
<p>Verify on both clusters, each should return <code>yes</code>:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-22" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-22">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl auth can-i <span class="s1">'*'</span> <span class="s1">'*'</span> --all-namespaces <span class="c1"># Terminal 1</span>
</span></span><span class="line"><span class="cl">kubectl auth can-i <span class="s1">'*'</span> <span class="s1">'*'</span> --all-namespaces <span class="c1"># Terminal 2</span></span></span></code></pre>
</div>
</div>
</div>
<hr>
<h2 id="step-9-create-namespace-and-install-the-operator-on-both-clusters">Step 9: Create namespace and install the Operator on both clusters</h2>
<p>The namespace <strong>must be identical on both clusters</strong>. The MCS DNS name includes<br />
the namespace (e.g. <code>rs0.psmdb.svc.clusterset.local</code>). If the namespaces differ,<br />
nodes cannot find each other.</p>
<p><strong>Terminal 1 (main cluster):</strong></p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-23" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-23">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl create namespace psmdb
</span></span><span class="line"><span class="cl">kubectl config set-context --current --namespace<span class="o">=</span>psmdb
</span></span><span class="line"><span class="cl">kubectl apply --server-side <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> -f https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v1.20.1/deploy/bundle.yaml <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> -n psmdb</span></span></code></pre>
</div>
</div>
</div>
<p><strong>Terminal 2 (replica cluster):</strong></p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-24" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-24">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl create namespace psmdb
</span></span><span class="line"><span class="cl">kubectl config set-context --current --namespace<span class="o">=</span>psmdb
</span></span><span class="line"><span class="cl">kubectl apply --server-side <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> -f https://raw.githubusercontent.com/percona/percona-server-mongodb-operator/v1.20.1/deploy/bundle.yaml <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> -n psmdb</span></span></code></pre>
</div>
</div>
</div>
<p>Verify the Operator is running on each cluster:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-25" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-25">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># Terminal 1</span>
</span></span><span class="line"><span class="cl">kubectl get pods
</span></span><span class="line"><span class="cl">NAME READY STATUS RESTARTS AGE
</span></span><span class="line"><span class="cl">percona-server-mongodb-operator-6877fcf797-stv4s 1/1 Running <span class="m">0</span> 33s
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Terminal 2</span>
</span></span><span class="line"><span class="cl">kubectl get pods
</span></span><span class="line"><span class="cl">NAME READY STATUS RESTARTS AGE
</span></span><span class="line"><span class="cl">percona-server-mongodb-operator-6877fcf797-gslpz 1/1 Running <span class="m">0</span> 9s</span></span></code></pre>
</div>
</div>
</div>
<h2 id="step-10-create-the-main-cluster">Step 10: Create the Main cluster</h2>
<p>Run all commands in <strong>Terminal 1</strong> (main cluster).</p>
<p>Create <code>cr-main.yaml</code>:</p>
<blockquote>
<p><strong>Important notes:</strong></p>
<ul>
<li><code>type: ClusterIP</code> is <strong>required</strong> for MCS, LoadBalancer will not work</li>
<li><code>multiCluster.DNSSuffix: svc.clusterset.local</code> enables cross-cluster DNS</li>
<li><code>crVersion: 1.20.1</code>, use a released version only. The Operator derives the<br />
init container image tag from <code>crVersion</code>.</li>
</ul>
</blockquote>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-26" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-26">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">cat &gt; cr-main.yaml <span class="s">&lt;&lt; &#039;EOF&#039;
</span></span></span><span class="line"><span class="cl"><span class="s">apiVersion: psmdb.percona.com/v1
</span></span></span><span class="line"><span class="cl"><span class="s">kind: PerconaServerMongoDB
</span></span></span><span class="line"><span class="cl"><span class="s">metadata:
</span></span></span><span class="line"><span class="cl"><span class="s"> name: main-cluster
</span></span></span><span class="line"><span class="cl"><span class="s">spec:
</span></span></span><span class="line"><span class="cl"><span class="s"> crVersion: 1.20.1
</span></span></span><span class="line"><span class="cl"><span class="s"> image: percona/percona-server-mongodb:7.0.14-8-multi
</span></span></span><span class="line"><span class="cl"><span class="s"> updateStrategy: SmartUpdate
</span></span></span><span class="line"><span class="cl"><span class="s"> multiCluster:
</span></span></span><span class="line"><span class="cl"><span class="s"> enabled: true
</span></span></span><span class="line"><span class="cl"><span class="s"> DNSSuffix: svc.clusterset.local
</span></span></span><span class="line"><span class="cl"><span class="s"> upgradeOptions:
</span></span></span><span class="line"><span class="cl"><span class="s"> apply: disabled
</span></span></span><span class="line"><span class="cl"><span class="s"> schedule: "0 2 * * *"
</span></span></span><span class="line"><span class="cl"><span class="s"> secrets:
</span></span></span><span class="line"><span class="cl"><span class="s"> users: my-cluster-name-secrets
</span></span></span><span class="line"><span class="cl"><span class="s"> encryptionKey: my-cluster-name-mongodb-encryption-key
</span></span></span><span class="line"><span class="cl"><span class="s"> replsets:
</span></span></span><span class="line"><span class="cl"><span class="s"> - name: rs0
</span></span></span><span class="line"><span class="cl"><span class="s"> size: 3
</span></span></span><span class="line"><span class="cl"><span class="s"> expose:
</span></span></span><span class="line"><span class="cl"><span class="s"> enabled: true
</span></span></span><span class="line"><span class="cl"><span class="s"> type: ClusterIP
</span></span></span><span class="line"><span class="cl"><span class="s"> volumeSpec:
</span></span></span><span class="line"><span class="cl"><span class="s"> persistentVolumeClaim:
</span></span></span><span class="line"><span class="cl"><span class="s"> resources:
</span></span></span><span class="line"><span class="cl"><span class="s"> requests:
</span></span></span><span class="line"><span class="cl"><span class="s"> storage: 3Gi
</span></span></span><span class="line"><span class="cl"><span class="s"> sharding:
</span></span></span><span class="line"><span class="cl"><span class="s"> enabled: true
</span></span></span><span class="line"><span class="cl"><span class="s"> configsvrReplSet:
</span></span></span><span class="line"><span class="cl"><span class="s"> size: 3
</span></span></span><span class="line"><span class="cl"><span class="s"> expose:
</span></span></span><span class="line"><span class="cl"><span class="s"> enabled: true
</span></span></span><span class="line"><span class="cl"><span class="s"> type: ClusterIP
</span></span></span><span class="line"><span class="cl"><span class="s"> volumeSpec:
</span></span></span><span class="line"><span class="cl"><span class="s"> persistentVolumeClaim:
</span></span></span><span class="line"><span class="cl"><span class="s"> resources:
</span></span></span><span class="line"><span class="cl"><span class="s"> requests:
</span></span></span><span class="line"><span class="cl"><span class="s"> storage: 3Gi
</span></span></span><span class="line"><span class="cl"><span class="s"> mongos:
</span></span></span><span class="line"><span class="cl"><span class="s"> size: 3
</span></span></span><span class="line"><span class="cl"><span class="s"> expose:
</span></span></span><span class="line"><span class="cl"><span class="s"> type: ClusterIP
</span></span></span><span class="line"><span class="cl"><span class="s">EOF</span></span></span></code></pre>
</div>
</div>
</div>
<p>Apply it:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-27" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-27">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl apply -f cr-main.yaml -n psmdb</span></span></code></pre>
</div>
</div>
</div>
<p>Watch until status is <code>ready</code> (takes 3–5 minutes):</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-28" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-28">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl get psmdb -n psmdb -w</span></span></code></pre>
</div>
</div>
</div>
<p>Expected output:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-29" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-29">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">kubectl get psmdb -n psmdb
</span></span><span class="line"><span class="cl">NAME ENDPOINT STATUS AGE
</span></span><span class="line"><span class="cl">main-cluster main-cluster-mongos.psmdb.svc.cluster.local:27017 ready 13m</span></span></code></pre>
</div>
</div>
</div>
<p>Verify ServiceExport resources were created (takes up to 5 minutes after ready):</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-30" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-30">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl get serviceexport -n psmdb</span></span></code></pre>
</div>
</div>
</div>
<p>Expected output:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-31" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-31">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">NAME AGE
</span></span><span class="line"><span class="cl">main-cluster-cfg 27m
</span></span><span class="line"><span class="cl">main-cluster-cfg-0 27m
</span></span><span class="line"><span class="cl">main-cluster-cfg-1 27m
</span></span><span class="line"><span class="cl">main-cluster-cfg-2 26m
</span></span><span class="line"><span class="cl">main-cluster-mongos 27m
</span></span><span class="line"><span class="cl">main-cluster-rs0 27m
</span></span><span class="line"><span class="cl">main-cluster-rs0-0 27m
</span></span><span class="line"><span class="cl">main-cluster-rs0-1 27m
</span></span><span class="line"><span class="cl">main-cluster-rs0-2 26m</span></span></code></pre>
</div>
</div>
</div>
<h2 id="step-11-export-secrets-from-the-main-cluster">Step 11: Export secrets from the Main cluster</h2>
<p>Run all commands in <strong>Terminal 1</strong> (main cluster).</p>
<p>The Replica cluster runs in <code>unmanaged: true</code> mode and cannot generate its own<br />
TLS certificates or credentials. It must receive exact copies of the Main cluster secrets:</p>
<ul>
<li>Without TLS secrets → pods never start</li>
<li>Without user credentials → pods start but fail liveness checks and restart continuously</li>
</ul>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-32" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-32">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl get secret my-cluster-name-secrets -n psmdb -o yaml &gt; my-cluster-secrets.yml
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">kubectl get secret main-cluster-ssl -n psmdb -o yaml &gt; main-cluster-ssl.yml
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">kubectl get secret main-cluster-ssl-internal -n psmdb -o yaml &gt; main-cluster-ssl-internal.yml
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">kubectl get secret my-cluster-name-mongodb-encryption-key -n psmdb -o yaml &gt; <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span>my-cluster-name-mongodb-encryption-key.yml</span></span></code></pre>
</div>
</div>
</div>
<h2 id="step-12-modify-secrets-for-the-replica-cluster">Step 12: Modify secrets for the Replica cluster</h2>
<p>The exported secrets contain cluster-specific metadata that must be removed before<br />
applying to another cluster. The <code>resourceVersion</code> and <code>uid</code> fields are unique to the<br />
Main cluster and cause a conflict error if reused unchanged.</p>
<p>The secret <strong>data</strong> (passwords, TLS certificates, encryption key) is copied as-is,<br />
the replica must use the same credentials to join the same MongoDB deployment. The<br />
Kubernetes secret <strong>names</strong> for user credentials and the encryption key stay the same<br />
(<code>my-cluster-name-secrets</code>, <code>my-cluster-name-mongodb-encryption-key</code>) because<br />
<code>cr-replica.yaml</code> references those exact names. Only the TLS secrets are renamed<br />
(<code>main-cluster-ssl</code> → <code>replica-cluster-ssl</code>) via <code>sed</code>; the <code>yq</code> step strips stale<br />
metadata, it does not rename those two secrets.</p>
<blockquote>
<p><strong>Linux vs macOS:</strong> <code>sed -i ''</code> is macOS-only syntax.<br />
On Linux, use <code>sed -i</code> without the empty string argument.</p>
</blockquote>
<p><strong>Terminal 1 (main cluster)</strong>, modify the exported files locally:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-33" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-33">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># Secret 1, user credentials</span>
</span></span><span class="line"><span class="cl">yq <span class="nb">eval</span> <span class="s1">'del(.metadata.ownerReferences, .metadata.annotations,
</span></span></span><span class="line"><span class="cl"><span class="s1"> .metadata.creationTimestamp, .metadata.resourceVersion,
</span></span></span><span class="line"><span class="cl"><span class="s1"> .metadata.selfLink, .metadata.uid)'</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> my-cluster-secrets.yml &gt; my-cluster-secrets-replica.yaml
</span></span><span class="line"><span class="cl">sed -i <span class="s1">'s/main-cluster/replica-cluster/g'</span> my-cluster-secrets-replica.yaml
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Secret 2, SSL client certificates</span>
</span></span><span class="line"><span class="cl">yq <span class="nb">eval</span> <span class="s1">'del(.metadata.ownerReferences, .metadata.annotations,
</span></span></span><span class="line"><span class="cl"><span class="s1"> .metadata.creationTimestamp, .metadata.resourceVersion,
</span></span></span><span class="line"><span class="cl"><span class="s1"> .metadata.selfLink, .metadata.uid)'</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> main-cluster-ssl.yml &gt; replica-cluster-ssl.yml
</span></span><span class="line"><span class="cl">sed -i <span class="s1">'s/main-cluster/replica-cluster/g'</span> replica-cluster-ssl.yml
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Secret 3, SSL internal replication certificates</span>
</span></span><span class="line"><span class="cl">yq <span class="nb">eval</span> <span class="s1">'del(.metadata.ownerReferences, .metadata.annotations,
</span></span></span><span class="line"><span class="cl"><span class="s1"> .metadata.creationTimestamp, .metadata.resourceVersion,
</span></span></span><span class="line"><span class="cl"><span class="s1"> .metadata.selfLink, .metadata.uid)'</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> main-cluster-ssl-internal.yml &gt; replica-cluster-ssl-internal.yml
</span></span><span class="line"><span class="cl">sed -i <span class="s1">'s/main-cluster/replica-cluster/g'</span> replica-cluster-ssl-internal.yml
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Secret 4, encryption key</span>
</span></span><span class="line"><span class="cl">yq <span class="nb">eval</span> <span class="s1">'del(.metadata.ownerReferences, .metadata.annotations,
</span></span></span><span class="line"><span class="cl"><span class="s1"> .metadata.creationTimestamp, .metadata.resourceVersion,
</span></span></span><span class="line"><span class="cl"><span class="s1"> .metadata.selfLink, .metadata.uid)'</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> my-cluster-name-mongodb-encryption-key.yml &gt; <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> my-cluster-name-mongodb-encryption-key-replica.yml
</span></span><span class="line"><span class="cl">sed -i <span class="s1">'s/main-cluster/replica-cluster/g'</span> <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> my-cluster-name-mongodb-encryption-key-replica.yml</span></span></code></pre>
</div>
</div>
</div>
<blockquote>
<p><strong>Important:</strong> If you delete and recreate the Main cluster, re-export all four<br />
secrets before applying to the Replica. The <code>resourceVersion</code> and <code>uid</code> change<br />
on every cluster recreation, stale values cause a conflict error.</p>
</blockquote>
<p><strong>Terminal 2 (replica cluster)</strong>, apply and verify:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-34" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-34">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl apply -f my-cluster-secrets-replica.yaml -n psmdb
</span></span><span class="line"><span class="cl">kubectl apply -f replica-cluster-ssl.yml -n psmdb
</span></span><span class="line"><span class="cl">kubectl apply -f replica-cluster-ssl-internal.yml -n psmdb
</span></span><span class="line"><span class="cl">kubectl apply -f my-cluster-name-mongodb-encryption-key-replica.yml -n psmdb
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">kubectl get secrets -n psmdb</span></span></code></pre>
</div>
</div>
</div>
<p>Expected output should include:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-35" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-35">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">NAME TYPE DATA AGE
</span></span><span class="line"><span class="cl">my-cluster-name-mongodb-encryption-key Opaque 1 8s
</span></span><span class="line"><span class="cl">my-cluster-name-secrets Opaque 10 33s
</span></span><span class="line"><span class="cl">replica-cluster-ssl kubernetes.io/tls 3 24s
</span></span><span class="line"><span class="cl">replica-cluster-ssl-internal kubernetes.io/tls 3 16s</span></span></code></pre>
</div>
</div>
</div>
<h2 id="step-13-create-the-replica-cluster">Step 13: Create the Replica cluster</h2>
<p>Run all commands in <strong>Terminal 2</strong> (replica cluster).</p>
<p>Create <code>cr-replica.yaml</code>:</p>
<blockquote>
<p><strong>Key differences from cr-main.yaml:</strong></p>
<ul>
<li><code>unmanaged: true</code> prevents the Operator from initializing a new replica set,<br />
avoiding split-brain with the Main cluster’s Operator</li>
<li><code>updateStrategy: RollingUpdate</code>, SmartUpdate is not supported on unmanaged clusters</li>
<li>SSL secrets are explicitly referenced because the Operator does not generate them here</li>
</ul>
</blockquote>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-36" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-36">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">cat &gt; cr-replica.yaml <span class="s">&lt;&lt; &#039;EOF&#039;
</span></span></span><span class="line"><span class="cl"><span class="s">apiVersion: psmdb.percona.com/v1
</span></span></span><span class="line"><span class="cl"><span class="s">kind: PerconaServerMongoDB
</span></span></span><span class="line"><span class="cl"><span class="s">metadata:
</span></span></span><span class="line"><span class="cl"><span class="s"> name: replica-cluster
</span></span></span><span class="line"><span class="cl"><span class="s">spec:
</span></span></span><span class="line"><span class="cl"><span class="s"> unmanaged: true
</span></span></span><span class="line"><span class="cl"><span class="s"> crVersion: 1.20.1
</span></span></span><span class="line"><span class="cl"><span class="s"> image: percona/percona-server-mongodb:7.0.14-8-multi
</span></span></span><span class="line"><span class="cl"><span class="s"> updateStrategy: RollingUpdate
</span></span></span><span class="line"><span class="cl"><span class="s"> multiCluster:
</span></span></span><span class="line"><span class="cl"><span class="s"> enabled: true
</span></span></span><span class="line"><span class="cl"><span class="s"> DNSSuffix: svc.clusterset.local
</span></span></span><span class="line"><span class="cl"><span class="s"> upgradeOptions:
</span></span></span><span class="line"><span class="cl"><span class="s"> apply: disabled
</span></span></span><span class="line"><span class="cl"><span class="s"> schedule: "0 2 * * *"
</span></span></span><span class="line"><span class="cl"><span class="s"> secrets:
</span></span></span><span class="line"><span class="cl"><span class="s"> users: my-cluster-name-secrets
</span></span></span><span class="line"><span class="cl"><span class="s"> encryptionKey: my-cluster-name-mongodb-encryption-key
</span></span></span><span class="line"><span class="cl"><span class="s"> ssl: replica-cluster-ssl
</span></span></span><span class="line"><span class="cl"><span class="s"> sslInternal: replica-cluster-ssl-internal
</span></span></span><span class="line"><span class="cl"><span class="s"> replsets:
</span></span></span><span class="line"><span class="cl"><span class="s"> - name: rs0
</span></span></span><span class="line"><span class="cl"><span class="s"> size: 3
</span></span></span><span class="line"><span class="cl"><span class="s"> expose:
</span></span></span><span class="line"><span class="cl"><span class="s"> enabled: true
</span></span></span><span class="line"><span class="cl"><span class="s"> type: ClusterIP
</span></span></span><span class="line"><span class="cl"><span class="s"> volumeSpec:
</span></span></span><span class="line"><span class="cl"><span class="s"> persistentVolumeClaim:
</span></span></span><span class="line"><span class="cl"><span class="s"> resources:
</span></span></span><span class="line"><span class="cl"><span class="s"> requests:
</span></span></span><span class="line"><span class="cl"><span class="s"> storage: 3Gi
</span></span></span><span class="line"><span class="cl"><span class="s"> sharding:
</span></span></span><span class="line"><span class="cl"><span class="s"> enabled: true
</span></span></span><span class="line"><span class="cl"><span class="s"> configsvrReplSet:
</span></span></span><span class="line"><span class="cl"><span class="s"> size: 3
</span></span></span><span class="line"><span class="cl"><span class="s"> expose:
</span></span></span><span class="line"><span class="cl"><span class="s"> enabled: true
</span></span></span><span class="line"><span class="cl"><span class="s"> type: ClusterIP
</span></span></span><span class="line"><span class="cl"><span class="s"> volumeSpec:
</span></span></span><span class="line"><span class="cl"><span class="s"> persistentVolumeClaim:
</span></span></span><span class="line"><span class="cl"><span class="s"> resources:
</span></span></span><span class="line"><span class="cl"><span class="s"> requests:
</span></span></span><span class="line"><span class="cl"><span class="s"> storage: 3Gi
</span></span></span><span class="line"><span class="cl"><span class="s"> mongos:
</span></span></span><span class="line"><span class="cl"><span class="s"> size: 3
</span></span></span><span class="line"><span class="cl"><span class="s"> expose:
</span></span></span><span class="line"><span class="cl"><span class="s"> type: ClusterIP
</span></span></span><span class="line"><span class="cl"><span class="s">EOF</span></span></span></code></pre>
</div>
</div>
</div>
<p>Apply it:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-37" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-37">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl apply -f cr-replica.yaml -n psmdb</span></span></code></pre>
</div>
</div>
</div>
<p>Watch until status is <code>ready</code>:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-38" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-38">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl get psmdb -n psmdb -w</span></span></code></pre>
</div>
</div>
</div>
<p>Expected output:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-39" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-39">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl get pods
</span></span><span class="line"><span class="cl">NAME READY STATUS RESTARTS AGE
</span></span><span class="line"><span class="cl">percona-server-mongodb-operator-6877fcf797-gslpz 1/1 Running <span class="m">0</span> 119m
</span></span><span class="line"><span class="cl">replica-cluster-cfg-0 1/1 Running <span class="m">11</span> <span class="o">(</span>25s ago<span class="o">)</span> 43m
</span></span><span class="line"><span class="cl">replica-cluster-cfg-1 1/1 Running <span class="m">10</span> <span class="o">(</span>7m49s ago<span class="o">)</span> 43m
</span></span><span class="line"><span class="cl">replica-cluster-cfg-2 1/1 Running <span class="m">10</span> <span class="o">(</span>7m25s ago<span class="o">)</span> 42m
</span></span><span class="line"><span class="cl">replica-cluster-mongos-0 0/1 Running <span class="m">10</span> <span class="o">(</span>6m46s ago<span class="o">)</span> 42m
</span></span><span class="line"><span class="cl">replica-cluster-rs0-0 1/1 Running <span class="m">11</span> <span class="o">(</span>22s ago<span class="o">)</span> 43m
</span></span><span class="line"><span class="cl">replica-cluster-rs0-1 1/1 Running <span class="m">10</span> <span class="o">(</span>7m17s ago<span class="o">)</span> 43m
</span></span><span class="line"><span class="cl">replica-cluster-rs0-2 1/1 Running <span class="m">10</span> <span class="o">(</span>7m21s ago<span class="o">)</span> 42m</span></span></code></pre>
</div>
</div>
</div>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-40" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-40">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl get pods
</span></span><span class="line"><span class="cl">NAME READY STATUS RESTARTS AGE
</span></span><span class="line"><span class="cl">percona-server-mongodb-operator-6877fcf797-gslpz 1/1 Running <span class="m">0</span> 113m
</span></span><span class="line"><span class="cl">replica-cluster-cfg-0 0/1 CrashLoopBackOff <span class="m">9</span> <span class="o">(</span>108s ago<span class="o">)</span> 37m
</span></span><span class="line"><span class="cl">replica-cluster-cfg-1 0/1 CrashLoopBackOff <span class="m">9</span> <span class="o">(</span>72s ago<span class="o">)</span> 36m
</span></span><span class="line"><span class="cl">replica-cluster-cfg-2 0/1 CrashLoopBackOff <span class="m">9</span> <span class="o">(</span>48s ago<span class="o">)</span> 36m
</span></span><span class="line"><span class="cl">replica-cluster-mongos-0 0/1 CrashLoopBackOff <span class="m">9</span> <span class="o">(</span>9s ago<span class="o">)</span> 36m
</span></span><span class="line"><span class="cl">replica-cluster-rs0-0 0/1 CrashLoopBackOff <span class="m">9</span> <span class="o">(</span>104s ago<span class="o">)</span> 37m
</span></span><span class="line"><span class="cl">replica-cluster-rs0-1 0/1 CrashLoopBackOff <span class="m">9</span> <span class="o">(</span>40s ago<span class="o">)</span> 36m
</span></span><span class="line"><span class="cl">replica-cluster-rs0-2 0/1 CrashLoopBackOff <span class="m">9</span> <span class="o">(</span>44s ago<span class="o">)</span> 36m</span></span></code></pre>
</div>
</div>
</div>
<blockquote>
<p><strong>Expected behavior before interconnect (Step 15):</strong> The replica cluster runs with<br />
<code>unmanaged: true</code>, so the Operator starts mongoc pods but does <strong>not</strong> initialize a<br />
separate replica set, that happens on the main cluster after you add <code>externalNodes</code><br />
in Step 15. While waiting, replica pods may show <code>CrashLoopBackOff</code> with many<br />
restarts. This is usually the liveness probe timing out, not mongoc crashing. It is<br />
common for <code>cfg</code> and <code>rs0</code> pods to settle to <code>1/1 Running</code> before interconnect;<br />
<code>mongos</code> often stays <code>0/1</code> the longest. <code>kubectl get psmdb</code> may not show <code>ready</code><br />
yet, that is expected. Continue to Steps 14 and 15.<br />
If pods keep restarting <strong>after</strong> Step 15, re-check the secrets from Steps 11–12.</p>
</blockquote>
<p>Verify ServiceExport resources were created (takes up to 5 minutes after ready):</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-41" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-41">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl get serviceexport -n psmdb</span></span></code></pre>
</div>
</div>
</div>
<p>Expected output:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-42" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-42">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">NAME AGE
</span></span><span class="line"><span class="cl">replica-cluster-cfg 59m
</span></span><span class="line"><span class="cl">replica-cluster-cfg-0 59m
</span></span><span class="line"><span class="cl">replica-cluster-cfg-1 58m
</span></span><span class="line"><span class="cl">replica-cluster-cfg-2 58m
</span></span><span class="line"><span class="cl">replica-cluster-mongos 59m
</span></span><span class="line"><span class="cl">replica-cluster-rs0 59m
</span></span><span class="line"><span class="cl">replica-cluster-rs0-0 59m
</span></span><span class="line"><span class="cl">replica-cluster-rs0-1 58m
</span></span><span class="line"><span class="cl">replica-cluster-rs0-2 57m</span></span></code></pre>
</div>
</div>
</div>
<h2 id="step-14-verify-serviceimports-on-both-clusters">Step 14: Verify ServiceImports on both clusters</h2>
<p>After both clusters are running, the MCS controller creates <code>ServiceImport</code> objects<br />
automatically. This takes approximately 5 minutes after the ServiceExports appear.</p>
<p><strong>Terminal 1 (main cluster):</strong></p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-43" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-43">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl get serviceimport -n psmdb</span></span></code></pre>
</div>
</div>
</div>
<p><strong>Terminal 2 (replica cluster):</strong></p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-44" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-44">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl get serviceimport -n psmdb</span></span></code></pre>
</div>
</div>
</div>
<p>Each cluster should show <strong>18 total ServiceImports</strong>, 9 for each cluster.<br />
Example output on the replica cluster:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-45" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-45">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">NAME TYPE IP AGE
</span></span><span class="line"><span class="cl">main-cluster-cfg Headless 127m
</span></span><span class="line"><span class="cl">main-cluster-cfg-0 ClusterSetIP ["34.118.239.158"] 127m
</span></span><span class="line"><span class="cl">main-cluster-cfg-1 ClusterSetIP ["34.118.230.45"] 125m
</span></span><span class="line"><span class="cl">main-cluster-cfg-2 ClusterSetIP ["34.118.237.3"] 123m
</span></span><span class="line"><span class="cl">main-cluster-mongos ClusterSetIP ["34.118.230.127"] 127m
</span></span><span class="line"><span class="cl">main-cluster-rs0 Headless 127m
</span></span><span class="line"><span class="cl">main-cluster-rs0-0 ClusterSetIP ["34.118.237.28"] 127m
</span></span><span class="line"><span class="cl">main-cluster-rs0-1 ClusterSetIP ["34.118.230.37"] 125m
</span></span><span class="line"><span class="cl">main-cluster-rs0-2 ClusterSetIP ["34.118.226.30"] 123m
</span></span><span class="line"><span class="cl">replica-cluster-cfg Headless 62m
</span></span><span class="line"><span class="cl">replica-cluster-cfg-0 ClusterSetIP ["34.118.231.166"] 62m
</span></span><span class="line"><span class="cl">replica-cluster-cfg-1 ClusterSetIP ["34.118.234.146"] 59m
</span></span><span class="line"><span class="cl">replica-cluster-cfg-2 ClusterSetIP ["34.118.225.208"] 59m
</span></span><span class="line"><span class="cl">replica-cluster-mongos ClusterSetIP ["34.118.239.237"] 62m
</span></span><span class="line"><span class="cl">replica-cluster-rs0 Headless 62m
</span></span><span class="line"><span class="cl">replica-cluster-rs0-0 ClusterSetIP ["34.118.228.53"] 62m
</span></span><span class="line"><span class="cl">replica-cluster-rs0-1 ClusterSetIP ["34.118.238.50"] 59m
</span></span><span class="line"><span class="cl">replica-cluster-rs0-2 ClusterSetIP ["34.118.232.241"] 59m</span></span></code></pre>
</div>
</div>
</div>
<p>If any are missing, check the MCS importer logs on the affected cluster:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-46" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-46">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl logs -n gke-mcs -l k8s-app<span class="o">=</span>gke-mcs-importer --tail<span class="o">=</span><span class="m">30</span> <span class="c1"># run in Terminal 1 or 2</span></span></span></code></pre>
</div>
</div>
</div>
<h2 id="step-15-interconnect-the-clusters-add-externalnodes">Step 15: Interconnect the clusters (add externalNodes)</h2>
<p><code>ServiceImport</code> objects give each cluster a way to resolve DNS names for services<br />
in other clusters. <code>externalNodes</code> tells MongoDB to actually use those addresses<br />
as replica set members. Both are needed, ServiceImport is the phone book,<br />
externalNodes is the instruction to call.</p>
<p><strong>Why two voting and one non-voting external node?</strong><br />
Adding two voting nodes (<code>votes: 1</code>) and one non-voting node (<code>votes: 0</code>) from the<br />
other site prevents split-brain. If the network between sites is severed, neither<br />
side can accidentally promote a new Primary using only its external nodes.</p>
<h3 id="15a-add-replica-nodes-to-main-cluster">15a: Add Replica nodes to Main cluster</h3>
<p>Run in <strong>Terminal 1</strong> (main cluster).</p>
<p>Copy <code>cr-main.yaml</code> to <code>cr-main-after.yaml</code> and add an <strong><code>externalNodes</code></strong> block under<br />
<code>replsets.rs0</code> and under <code>sharding.configsvrReplSet</code>, everything else stays the same.</p>
<p>Create <code>cr-main-after.yaml</code>:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-47" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-47">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">cat &gt; cr-main-after.yaml <span class="s">&lt;&lt; &#039;EOF&#039;
</span></span></span><span class="line"><span class="cl"><span class="s">apiVersion: psmdb.percona.com/v1
</span></span></span><span class="line"><span class="cl"><span class="s">kind: PerconaServerMongoDB
</span></span></span><span class="line"><span class="cl"><span class="s">metadata:
</span></span></span><span class="line"><span class="cl"><span class="s"> name: main-cluster
</span></span></span><span class="line"><span class="cl"><span class="s">spec:
</span></span></span><span class="line"><span class="cl"><span class="s"> crVersion: 1.20.1
</span></span></span><span class="line"><span class="cl"><span class="s"> image: percona/percona-server-mongodb:7.0.14-8-multi
</span></span></span><span class="line"><span class="cl"><span class="s"> updateStrategy: SmartUpdate
</span></span></span><span class="line"><span class="cl"><span class="s"> multiCluster:
</span></span></span><span class="line"><span class="cl"><span class="s"> enabled: true
</span></span></span><span class="line"><span class="cl"><span class="s"> DNSSuffix: svc.clusterset.local
</span></span></span><span class="line"><span class="cl"><span class="s"> upgradeOptions:
</span></span></span><span class="line"><span class="cl"><span class="s"> apply: disabled
</span></span></span><span class="line"><span class="cl"><span class="s"> schedule: "0 2 * * *"
</span></span></span><span class="line"><span class="cl"><span class="s"> secrets:
</span></span></span><span class="line"><span class="cl"><span class="s"> users: my-cluster-name-secrets
</span></span></span><span class="line"><span class="cl"><span class="s"> encryptionKey: my-cluster-name-mongodb-encryption-key
</span></span></span><span class="line"><span class="cl"><span class="s"> replsets:
</span></span></span><span class="line"><span class="cl"><span class="s"> - name: rs0
</span></span></span><span class="line"><span class="cl"><span class="s"> size: 3
</span></span></span><span class="line"><span class="cl"><span class="s"> externalNodes:
</span></span></span><span class="line"><span class="cl"><span class="s"> - host: replica-cluster-rs0-0.psmdb.svc.clusterset.local
</span></span></span><span class="line"><span class="cl"><span class="s"> votes: 1
</span></span></span><span class="line"><span class="cl"><span class="s"> priority: 1
</span></span></span><span class="line"><span class="cl"><span class="s"> - host: replica-cluster-rs0-1.psmdb.svc.clusterset.local
</span></span></span><span class="line"><span class="cl"><span class="s"> votes: 1
</span></span></span><span class="line"><span class="cl"><span class="s"> priority: 1
</span></span></span><span class="line"><span class="cl"><span class="s"> - host: replica-cluster-rs0-2.psmdb.svc.clusterset.local
</span></span></span><span class="line"><span class="cl"><span class="s"> votes: 0
</span></span></span><span class="line"><span class="cl"><span class="s"> priority: 0
</span></span></span><span class="line"><span class="cl"><span class="s"> expose:
</span></span></span><span class="line"><span class="cl"><span class="s"> enabled: true
</span></span></span><span class="line"><span class="cl"><span class="s"> type: ClusterIP
</span></span></span><span class="line"><span class="cl"><span class="s"> volumeSpec:
</span></span></span><span class="line"><span class="cl"><span class="s"> persistentVolumeClaim:
</span></span></span><span class="line"><span class="cl"><span class="s"> resources:
</span></span></span><span class="line"><span class="cl"><span class="s"> requests:
</span></span></span><span class="line"><span class="cl"><span class="s"> storage: 3Gi
</span></span></span><span class="line"><span class="cl"><span class="s"> sharding:
</span></span></span><span class="line"><span class="cl"><span class="s"> enabled: true
</span></span></span><span class="line"><span class="cl"><span class="s"> configsvrReplSet:
</span></span></span><span class="line"><span class="cl"><span class="s"> size: 3
</span></span></span><span class="line"><span class="cl"><span class="s"> externalNodes:
</span></span></span><span class="line"><span class="cl"><span class="s"> - host: replica-cluster-cfg-0.psmdb.svc.clusterset.local
</span></span></span><span class="line"><span class="cl"><span class="s"> votes: 1
</span></span></span><span class="line"><span class="cl"><span class="s"> priority: 1
</span></span></span><span class="line"><span class="cl"><span class="s"> - host: replica-cluster-cfg-1.psmdb.svc.clusterset.local
</span></span></span><span class="line"><span class="cl"><span class="s"> votes: 1
</span></span></span><span class="line"><span class="cl"><span class="s"> priority: 1
</span></span></span><span class="line"><span class="cl"><span class="s"> - host: replica-cluster-cfg-2.psmdb.svc.clusterset.local
</span></span></span><span class="line"><span class="cl"><span class="s"> votes: 0
</span></span></span><span class="line"><span class="cl"><span class="s"> priority: 0
</span></span></span><span class="line"><span class="cl"><span class="s"> expose:
</span></span></span><span class="line"><span class="cl"><span class="s"> enabled: true
</span></span></span><span class="line"><span class="cl"><span class="s"> type: ClusterIP
</span></span></span><span class="line"><span class="cl"><span class="s"> volumeSpec:
</span></span></span><span class="line"><span class="cl"><span class="s"> persistentVolumeClaim:
</span></span></span><span class="line"><span class="cl"><span class="s"> resources:
</span></span></span><span class="line"><span class="cl"><span class="s"> requests:
</span></span></span><span class="line"><span class="cl"><span class="s"> storage: 3Gi
</span></span></span><span class="line"><span class="cl"><span class="s"> mongos:
</span></span></span><span class="line"><span class="cl"><span class="s"> size: 3
</span></span></span><span class="line"><span class="cl"><span class="s"> expose:
</span></span></span><span class="line"><span class="cl"><span class="s"> type: ClusterIP
</span></span></span><span class="line"><span class="cl"><span class="s">EOF</span></span></span></code></pre>
</div>
</div>
</div>
<p>Apply:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-48" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-48">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl apply -f cr-main-after.yaml -n psmdb</span></span></code></pre>
</div>
</div>
</div>
<h3 id="15b-add-main-nodes-to-replica-cluster">15b: Add Main nodes to Replica cluster</h3>
<p>Run in <strong>Terminal 2</strong> (replica cluster).</p>
<p>Copy <code>cr-replica.yaml</code> to <code>cr-replica-after.yaml</code> and add an <strong><code>externalNodes</code></strong> block under<br />
<code>replsets.rs0</code> and under <code>sharding.configsvrReplSet</code>, everything else stays the same.</p>
<p>Create <code>cr-replica-after.yaml</code>:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-49" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-49">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">cat &gt; cr-replica-after.yaml <span class="s">&lt;&lt; &#039;EOF&#039;
</span></span></span><span class="line"><span class="cl"><span class="s">apiVersion: psmdb.percona.com/v1
</span></span></span><span class="line"><span class="cl"><span class="s">kind: PerconaServerMongoDB
</span></span></span><span class="line"><span class="cl"><span class="s">metadata:
</span></span></span><span class="line"><span class="cl"><span class="s"> name: replica-cluster
</span></span></span><span class="line"><span class="cl"><span class="s">spec:
</span></span></span><span class="line"><span class="cl"><span class="s"> unmanaged: true
</span></span></span><span class="line"><span class="cl"><span class="s"> crVersion: 1.20.1
</span></span></span><span class="line"><span class="cl"><span class="s"> image: percona/percona-server-mongodb:7.0.14-8-multi
</span></span></span><span class="line"><span class="cl"><span class="s"> updateStrategy: RollingUpdate
</span></span></span><span class="line"><span class="cl"><span class="s"> multiCluster:
</span></span></span><span class="line"><span class="cl"><span class="s"> enabled: true
</span></span></span><span class="line"><span class="cl"><span class="s"> DNSSuffix: svc.clusterset.local
</span></span></span><span class="line"><span class="cl"><span class="s"> upgradeOptions:
</span></span></span><span class="line"><span class="cl"><span class="s"> apply: disabled
</span></span></span><span class="line"><span class="cl"><span class="s"> schedule: "0 2 * * *"
</span></span></span><span class="line"><span class="cl"><span class="s"> secrets:
</span></span></span><span class="line"><span class="cl"><span class="s"> users: my-cluster-name-secrets
</span></span></span><span class="line"><span class="cl"><span class="s"> encryptionKey: my-cluster-name-mongodb-encryption-key
</span></span></span><span class="line"><span class="cl"><span class="s"> ssl: replica-cluster-ssl
</span></span></span><span class="line"><span class="cl"><span class="s"> sslInternal: replica-cluster-ssl-internal
</span></span></span><span class="line"><span class="cl"><span class="s"> replsets:
</span></span></span><span class="line"><span class="cl"><span class="s"> - name: rs0
</span></span></span><span class="line"><span class="cl"><span class="s"> size: 3
</span></span></span><span class="line"><span class="cl"><span class="s"> externalNodes:
</span></span></span><span class="line"><span class="cl"><span class="s"> - host: main-cluster-rs0-0.psmdb.svc.clusterset.local
</span></span></span><span class="line"><span class="cl"><span class="s"> votes: 1
</span></span></span><span class="line"><span class="cl"><span class="s"> priority: 1
</span></span></span><span class="line"><span class="cl"><span class="s"> - host: main-cluster-rs0-1.psmdb.svc.clusterset.local
</span></span></span><span class="line"><span class="cl"><span class="s"> votes: 1
</span></span></span><span class="line"><span class="cl"><span class="s"> priority: 1
</span></span></span><span class="line"><span class="cl"><span class="s"> - host: main-cluster-rs0-2.psmdb.svc.clusterset.local
</span></span></span><span class="line"><span class="cl"><span class="s"> votes: 0
</span></span></span><span class="line"><span class="cl"><span class="s"> priority: 0
</span></span></span><span class="line"><span class="cl"><span class="s"> expose:
</span></span></span><span class="line"><span class="cl"><span class="s"> enabled: true
</span></span></span><span class="line"><span class="cl"><span class="s"> type: ClusterIP
</span></span></span><span class="line"><span class="cl"><span class="s"> volumeSpec:
</span></span></span><span class="line"><span class="cl"><span class="s"> persistentVolumeClaim:
</span></span></span><span class="line"><span class="cl"><span class="s"> resources:
</span></span></span><span class="line"><span class="cl"><span class="s"> requests:
</span></span></span><span class="line"><span class="cl"><span class="s"> storage: 3Gi
</span></span></span><span class="line"><span class="cl"><span class="s"> sharding:
</span></span></span><span class="line"><span class="cl"><span class="s"> enabled: true
</span></span></span><span class="line"><span class="cl"><span class="s"> configsvrReplSet:
</span></span></span><span class="line"><span class="cl"><span class="s"> size: 3
</span></span></span><span class="line"><span class="cl"><span class="s"> externalNodes:
</span></span></span><span class="line"><span class="cl"><span class="s"> - host: main-cluster-cfg-0.psmdb.svc.clusterset.local
</span></span></span><span class="line"><span class="cl"><span class="s"> votes: 1
</span></span></span><span class="line"><span class="cl"><span class="s"> priority: 1
</span></span></span><span class="line"><span class="cl"><span class="s"> - host: main-cluster-cfg-1.psmdb.svc.clusterset.local
</span></span></span><span class="line"><span class="cl"><span class="s"> votes: 1
</span></span></span><span class="line"><span class="cl"><span class="s"> priority: 1
</span></span></span><span class="line"><span class="cl"><span class="s"> - host: main-cluster-cfg-2.psmdb.svc.clusterset.local
</span></span></span><span class="line"><span class="cl"><span class="s"> votes: 0
</span></span></span><span class="line"><span class="cl"><span class="s"> priority: 0
</span></span></span><span class="line"><span class="cl"><span class="s"> expose:
</span></span></span><span class="line"><span class="cl"><span class="s"> enabled: true
</span></span></span><span class="line"><span class="cl"><span class="s"> type: ClusterIP
</span></span></span><span class="line"><span class="cl"><span class="s"> volumeSpec:
</span></span></span><span class="line"><span class="cl"><span class="s"> persistentVolumeClaim:
</span></span></span><span class="line"><span class="cl"><span class="s"> resources:
</span></span></span><span class="line"><span class="cl"><span class="s"> requests:
</span></span></span><span class="line"><span class="cl"><span class="s"> storage: 3Gi
</span></span></span><span class="line"><span class="cl"><span class="s"> mongos:
</span></span></span><span class="line"><span class="cl"><span class="s"> size: 3
</span></span></span><span class="line"><span class="cl"><span class="s"> expose:
</span></span></span><span class="line"><span class="cl"><span class="s"> type: ClusterIP
</span></span></span><span class="line"><span class="cl"><span class="s">EOF</span></span></span></code></pre>
</div>
</div>
</div>
<p>Apply:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-50" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-50">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl apply -f cr-replica-after.yaml -n psmdb</span></span></code></pre>
</div>
</div>
</div>
<blockquote>
<p><strong>After interconnect:</strong> Pods may restart on both clusters while MongoDB reconfigures<br />
the replica sets, brief <code>CrashLoopBackOff</code> on replica is normal. Wait until all<br />
pods are <code>1/1 Running</code> before continuing to Step 16.</p>
</blockquote>
<h2 id="step-16-verify-cross-cluster-replication">Step 16: Verify cross-cluster replication</h2>
<p>Run in <strong>Terminal 1</strong> (main cluster).</p>
<p>Get the clusterAdmin password:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-51" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-51">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl get secret my-cluster-name-secrets <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> -n psmdb <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> -o <span class="nv">jsonpath</span><span class="o">=</span><span class="s2">"{.data.MONGODB_CLUSTER_ADMIN_PASSWORD}"</span> <span class="p">|</span> base64 --decode</span></span></code></pre>
</div>
</div>
</div>
<p>Connect to the main cluster config server:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-52" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-52">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl <span class="nb">exec</span> -it main-cluster-cfg-0 -n psmdb -- /bin/bash</span></span></code></pre>
</div>
</div>
</div>
<p>Inside the pod:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-53" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-53">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">mongosh admin -u clusterAdmin -p </span></span></code></pre>
</div>
</div>
</div>
<p>Check replica set members:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">javascript</span><button class="code-block__copy" type="button" data-copy-target="codeblock-54" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-54">
<div class="highlight">
<pre class="chroma"><code class="language-javascript" data-lang="javascript"><span class="line"><span class="cl"><span class="nx">rs</span><span class="p">.</span><span class="nx">status</span><span class="p">().</span><span class="nx">members</span></span></span></code></pre>
</div>
</div>
</div>
<p>Expected output, 6 members total, all using <code>svc.clusterset.local</code> DNS names:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">javascript</span><button class="code-block__copy" type="button" data-copy-target="codeblock-55" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-55">
<div class="highlight">
<pre class="chroma"><code class="language-javascript" data-lang="javascript"><span class="line"><span class="cl"><span class="nx">cfg</span> <span class="p">[</span><span class="nx">direct</span><span class="o">:</span> <span class="nx">primary</span><span class="p">]</span> <span class="nx">admin</span><span class="o">&gt;</span> <span class="nx">rs</span><span class="p">.</span><span class="nx">status</span><span class="p">().</span><span class="nx">members</span>
</span></span><span class="line"><span class="cl"><span class="p">[</span>
</span></span><span class="line"><span class="cl"> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nx">_id</span><span class="o">:</span> <span class="mi">0</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">name</span><span class="o">:</span> <span class="s1">'main-cluster-cfg-0.psmdb.svc.clusterset.local:27017'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">health</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">state</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">stateStr</span><span class="o">:</span> <span class="s1">'PRIMARY'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">uptime</span><span class="o">:</span> <span class="mi">17202</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">syncSourceHost</span><span class="o">:</span> <span class="s1">''</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">syncSourceId</span><span class="o">:</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">infoMessage</span><span class="o">:</span> <span class="s1">''</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">electionTime</span><span class="o">:</span> <span class="nx">Timestamp</span><span class="p">({</span> <span class="nx">t</span><span class="o">:</span> <span class="mi">1780921358</span><span class="p">,</span> <span class="nx">i</span><span class="o">:</span> <span class="mi">2</span> <span class="p">}),</span>
</span></span><span class="line"><span class="cl"> <span class="nx">electionDate</span><span class="o">:</span> <span class="nx">ISODate</span><span class="p">(</span><span class="s1">'2026-06-08T12:22:38.000Z'</span><span class="p">),</span>
</span></span><span class="line"><span class="cl"> <span class="nx">configVersion</span><span class="o">:</span> <span class="mi">14</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">configTerm</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">self</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">lastHeartbeatMessage</span><span class="o">:</span> <span class="s1">''</span>
</span></span><span class="line"><span class="cl"> <span class="p">},</span>
</span></span><span class="line"><span class="cl"> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nx">_id</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">name</span><span class="o">:</span> <span class="s1">'main-cluster-cfg-1.psmdb.svc.clusterset.local:27017'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">health</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">state</span><span class="o">:</span> <span class="mi">2</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">stateStr</span><span class="o">:</span> <span class="s1">'SECONDARY'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">uptime</span><span class="o">:</span> <span class="mi">17034</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">pingMs</span><span class="o">:</span> <span class="nx">Long</span><span class="p">(</span><span class="s1">'0'</span><span class="p">),</span>
</span></span><span class="line"><span class="cl"> <span class="nx">lastHeartbeatMessage</span><span class="o">:</span> <span class="s1">''</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">syncSourceHost</span><span class="o">:</span> <span class="s1">'main-cluster-cfg-0.psmdb.svc.clusterset.local:27017'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">syncSourceId</span><span class="o">:</span> <span class="mi">0</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">infoMessage</span><span class="o">:</span> <span class="s1">''</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">configVersion</span><span class="o">:</span> <span class="mi">14</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">configTerm</span><span class="o">:</span> <span class="mi">1</span>
</span></span><span class="line"><span class="cl"> <span class="p">},</span>
</span></span><span class="line"><span class="cl"> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nx">_id</span><span class="o">:</span> <span class="mi">2</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">name</span><span class="o">:</span> <span class="s1">'main-cluster-cfg-2.psmdb.svc.clusterset.local:27017'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">health</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">state</span><span class="o">:</span> <span class="mi">2</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">stateStr</span><span class="o">:</span> <span class="s1">'SECONDARY'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">uptime</span><span class="o">:</span> <span class="mi">16861</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">pingMs</span><span class="o">:</span> <span class="nx">Long</span><span class="p">(</span><span class="s1">'0'</span><span class="p">),</span>
</span></span><span class="line"><span class="cl"> <span class="nx">lastHeartbeatMessage</span><span class="o">:</span> <span class="s1">''</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">syncSourceHost</span><span class="o">:</span> <span class="s1">'main-cluster-cfg-1.psmdb.svc.clusterset.local:27017'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">syncSourceId</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">infoMessage</span><span class="o">:</span> <span class="s1">''</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">configVersion</span><span class="o">:</span> <span class="mi">14</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">configTerm</span><span class="o">:</span> <span class="mi">1</span>
</span></span><span class="line"><span class="cl"> <span class="p">},</span>
</span></span><span class="line"><span class="cl"> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nx">_id</span><span class="o">:</span> <span class="mi">3</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">name</span><span class="o">:</span> <span class="s1">'replica-cluster-cfg-0.psmdb.svc.clusterset.local:27017'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">health</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">state</span><span class="o">:</span> <span class="mi">2</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">stateStr</span><span class="o">:</span> <span class="s1">'SECONDARY'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">uptime</span><span class="o">:</span> <span class="mi">3214</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">pingMs</span><span class="o">:</span> <span class="nx">Long</span><span class="p">(</span><span class="s1">'0'</span><span class="p">),</span>
</span></span><span class="line"><span class="cl"> <span class="nx">lastHeartbeatMessage</span><span class="o">:</span> <span class="s1">''</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">syncSourceHost</span><span class="o">:</span> <span class="s1">'main-cluster-cfg-0.psmdb.svc.clusterset.local:27017'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">syncSourceId</span><span class="o">:</span> <span class="mi">0</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">infoMessage</span><span class="o">:</span> <span class="s1">''</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">configVersion</span><span class="o">:</span> <span class="mi">14</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">configTerm</span><span class="o">:</span> <span class="mi">1</span>
</span></span><span class="line"><span class="cl"> <span class="p">},</span>
</span></span><span class="line"><span class="cl"> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nx">_id</span><span class="o">:</span> <span class="mi">4</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">name</span><span class="o">:</span> <span class="s1">'replica-cluster-cfg-1.psmdb.svc.clusterset.local:27017'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">health</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">state</span><span class="o">:</span> <span class="mi">2</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">stateStr</span><span class="o">:</span> <span class="s1">'SECONDARY'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">uptime</span><span class="o">:</span> <span class="mi">3181</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">pingMs</span><span class="o">:</span> <span class="nx">Long</span><span class="p">(</span><span class="s1">'0'</span><span class="p">),</span>
</span></span><span class="line"><span class="cl"> <span class="nx">lastHeartbeatMessage</span><span class="o">:</span> <span class="s1">''</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">syncSourceHost</span><span class="o">:</span> <span class="s1">'replica-cluster-cfg-0.psmdb.svc.clusterset.local:27017'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">syncSourceId</span><span class="o">:</span> <span class="mi">3</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">infoMessage</span><span class="o">:</span> <span class="s1">''</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">configVersion</span><span class="o">:</span> <span class="mi">14</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">configTerm</span><span class="o">:</span> <span class="mi">1</span>
</span></span><span class="line"><span class="cl"> <span class="p">},</span>
</span></span><span class="line"><span class="cl"> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nx">_id</span><span class="o">:</span> <span class="mi">5</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">name</span><span class="o">:</span> <span class="s1">'replica-cluster-cfg-2.psmdb.svc.clusterset.local:27017'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">health</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">state</span><span class="o">:</span> <span class="mi">2</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">stateStr</span><span class="o">:</span> <span class="s1">'SECONDARY'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">uptime</span><span class="o">:</span> <span class="mi">3164</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">pingMs</span><span class="o">:</span> <span class="nx">Long</span><span class="p">(</span><span class="s1">'0'</span><span class="p">),</span>
</span></span><span class="line"><span class="cl"> <span class="nx">lastHeartbeatMessage</span><span class="o">:</span> <span class="s1">''</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">syncSourceHost</span><span class="o">:</span> <span class="s1">'main-cluster-cfg-2.psmdb.svc.clusterset.local:27017'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">syncSourceId</span><span class="o">:</span> <span class="mi">2</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">infoMessage</span><span class="o">:</span> <span class="s1">''</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">configVersion</span><span class="o">:</span> <span class="mi">14</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">configTerm</span><span class="o">:</span> <span class="mi">1</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">]</span></span></span></code></pre>
</div>
</div>
</div>
<p>If all 6 members appear with <code>health: 1</code>, cross-cluster replication is working.</p>
<h2 id="step-17-test-the-switchover-process">Step 17: Test the switchover process</h2>
<p>In a multi-cluster deployment, <strong>only one Operator should actively manage the replica<br />
set at a time</strong>, otherwise both sites could try to reconfigure MongoDB and cause<br />
split-brain.</p>
<p>Until now, the <strong>main</strong> Operator was in charge (<code>unmanaged</code> not set, so managed by<br />
default). The <strong>replica</strong> Operator only kept pods running (<code>unmanaged: true</code>) and<br />
did not drive failover or replica-set changes.</p>
<p>This step simulates a site failover in two moves:</p>
<ol>
<li><strong>Main → unmanaged</strong>: main Operator stops managing the replica set.</li>
<li><strong>Replica → managed</strong>: replica Operator takes over and can elect a new PRIMARY.</li>
</ol>
<p>Apply both changes below, then verify MongoDB elects a new PRIMARY on the replica side.</p>
<p><strong>Terminal 1 (main cluster)</strong>, release Operator control on main:</p>
<p>Edit <code>cr-main-after.yaml</code> under <code>spec:</code>, add <code>unmanaged: true</code> and change<br />
<code>updateStrategy</code> from <code>SmartUpdate</code> to <code>RollingUpdate</code> (SmartUpdate requires a<br />
managed cluster):</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">yaml</span><button class="code-block__copy" type="button" data-copy-target="codeblock-56" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-56">
<div class="highlight">
<pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="w"> </span><span class="nt">unmanaged</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">updateStrategy</span><span class="p">:</span><span class="w"> </span><span class="l">RollingUpdate</span></span></span></code></pre>
</div>
</div>
</div>
<p>Apply:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-57" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-57">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl apply -f cr-main-after.yaml -n psmdb</span></span></code></pre>
</div>
</div>
</div>
<p><strong>Terminal 2 (replica cluster)</strong>, give Operator control on replica:</p>
<p>Edit <code>cr-replica-after.yaml</code> under <code>spec:</code>, change <code>unmanaged: true</code> to<br />
<code>unmanaged: false</code> so the replica Operator can manage failover and replica-set<br />
reconfiguration:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">yaml</span><button class="code-block__copy" type="button" data-copy-target="codeblock-58" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-58">
<div class="highlight">
<pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="w"> </span><span class="nt">unmanaged</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span></span></span></code></pre>
</div>
</div>
</div>
<p>Apply:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-59" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-59">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl apply -f cr-replica-after.yaml -n psmdb</span></span></code></pre>
</div>
</div>
</div>
<p>Verify a new PRIMARY was elected on the replica side (<strong>Terminal 2</strong>):</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-60" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-60">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">kubectl <span class="nb">exec</span> -it replica-cluster-cfg-0 -n psmdb -- /bin/bash</span></span></code></pre>
</div>
</div>
</div>
<p>Inside the pod:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-61" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-61">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">mongosh admin -u clusterAdmin -p </span></span></code></pre>
</div>
</div>
</div>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">javascript</span><button class="code-block__copy" type="button" data-copy-target="codeblock-62" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-62">
<div class="highlight">
<pre class="chroma"><code class="language-javascript" data-lang="javascript"><span class="line"><span class="cl"><span class="nx">rs</span><span class="p">.</span><span class="nx">status</span><span class="p">().</span><span class="nx">members</span></span></span></code></pre>
</div>
</div>
</div>
<p>Expected: <code>replica-cluster-cfg-0</code> is PRIMARY, main-side members are SECONDARY:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">javascript</span><button class="code-block__copy" type="button" data-copy-target="codeblock-63" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-63">
<div class="highlight">
<pre class="chroma"><code class="language-javascript" data-lang="javascript"><span class="line"><span class="cl"><span class="p">[</span>
</span></span><span class="line"><span class="cl"> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nx">_id</span><span class="o">:</span> <span class="mi">0</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">name</span><span class="o">:</span> <span class="s1">'main-cluster-cfg-0.psmdb.svc.clusterset.local:27017'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">health</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">state</span><span class="o">:</span> <span class="mi">2</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">stateStr</span><span class="o">:</span> <span class="s1">'SECONDARY'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">uptime</span><span class="o">:</span> <span class="mi">19106</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">syncSourceHost</span><span class="o">:</span> <span class="s1">'replica-cluster-cfg-1.psmdb.svc.clusterset.local:27017'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">syncSourceId</span><span class="o">:</span> <span class="mi">4</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">infoMessage</span><span class="o">:</span> <span class="s1">''</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">configVersion</span><span class="o">:</span> <span class="mi">20</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">configTerm</span><span class="o">:</span> <span class="mi">2</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">self</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">lastHeartbeatMessage</span><span class="o">:</span> <span class="s1">''</span>
</span></span><span class="line"><span class="cl"> <span class="p">},</span>
</span></span><span class="line"><span class="cl"> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nx">_id</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">name</span><span class="o">:</span> <span class="s1">'main-cluster-cfg-1.psmdb.svc.clusterset.local:27017'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">health</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">state</span><span class="o">:</span> <span class="mi">2</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">stateStr</span><span class="o">:</span> <span class="s1">'SECONDARY'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">uptime</span><span class="o">:</span> <span class="mi">18938</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">pingMs</span><span class="o">:</span> <span class="nx">Long</span><span class="p">(</span><span class="s1">'0'</span><span class="p">),</span>
</span></span><span class="line"><span class="cl"> <span class="nx">lastHeartbeatMessage</span><span class="o">:</span> <span class="s1">''</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">syncSourceHost</span><span class="o">:</span> <span class="s1">'main-cluster-cfg-0.psmdb.svc.clusterset.local:27017'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">syncSourceId</span><span class="o">:</span> <span class="mi">0</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">infoMessage</span><span class="o">:</span> <span class="s1">''</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">configVersion</span><span class="o">:</span> <span class="mi">20</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">configTerm</span><span class="o">:</span> <span class="mi">2</span>
</span></span><span class="line"><span class="cl"> <span class="p">},</span>
</span></span><span class="line"><span class="cl"> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nx">_id</span><span class="o">:</span> <span class="mi">2</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">name</span><span class="o">:</span> <span class="s1">'main-cluster-cfg-2.psmdb.svc.clusterset.local:27017'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">health</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">state</span><span class="o">:</span> <span class="mi">2</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">stateStr</span><span class="o">:</span> <span class="s1">'SECONDARY'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">uptime</span><span class="o">:</span> <span class="mi">18765</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">pingMs</span><span class="o">:</span> <span class="nx">Long</span><span class="p">(</span><span class="s1">'0'</span><span class="p">),</span>
</span></span><span class="line"><span class="cl"> <span class="nx">lastHeartbeatMessage</span><span class="o">:</span> <span class="s1">''</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">syncSourceHost</span><span class="o">:</span> <span class="s1">'main-cluster-cfg-1.psmdb.svc.clusterset.local:27017'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">syncSourceId</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">infoMessage</span><span class="o">:</span> <span class="s1">''</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">configVersion</span><span class="o">:</span> <span class="mi">20</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">configTerm</span><span class="o">:</span> <span class="mi">2</span>
</span></span><span class="line"><span class="cl"> <span class="p">},</span>
</span></span><span class="line"><span class="cl"> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nx">_id</span><span class="o">:</span> <span class="mi">3</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">name</span><span class="o">:</span> <span class="s1">'replica-cluster-cfg-0.psmdb.svc.clusterset.local:27017'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">health</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">state</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">stateStr</span><span class="o">:</span> <span class="s1">'PRIMARY'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">uptime</span><span class="o">:</span> <span class="mi">5118</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">pingMs</span><span class="o">:</span> <span class="nx">Long</span><span class="p">(</span><span class="s1">'0'</span><span class="p">),</span>
</span></span><span class="line"><span class="cl"> <span class="nx">lastHeartbeatMessage</span><span class="o">:</span> <span class="s1">''</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">syncSourceHost</span><span class="o">:</span> <span class="s1">''</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">syncSourceId</span><span class="o">:</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">infoMessage</span><span class="o">:</span> <span class="s1">''</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">electionTime</span><span class="o">:</span> <span class="nx">Timestamp</span><span class="p">({</span> <span class="nx">t</span><span class="o">:</span> <span class="mi">1780940264</span><span class="p">,</span> <span class="nx">i</span><span class="o">:</span> <span class="mi">1</span> <span class="p">}),</span>
</span></span><span class="line"><span class="cl"> <span class="nx">electionDate</span><span class="o">:</span> <span class="nx">ISODate</span><span class="p">(</span><span class="s1">'2026-06-08T17:37:44.000Z'</span><span class="p">),</span>
</span></span><span class="line"><span class="cl"> <span class="nx">configVersion</span><span class="o">:</span> <span class="mi">20</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">configTerm</span><span class="o">:</span> <span class="mi">2</span>
</span></span><span class="line"><span class="cl"> <span class="p">},</span>
</span></span><span class="line"><span class="cl"> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nx">_id</span><span class="o">:</span> <span class="mi">4</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">name</span><span class="o">:</span> <span class="s1">'replica-cluster-cfg-1.psmdb.svc.clusterset.local:27017'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">health</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">state</span><span class="o">:</span> <span class="mi">2</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">stateStr</span><span class="o">:</span> <span class="s1">'SECONDARY'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">uptime</span><span class="o">:</span> <span class="mi">5085</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">pingMs</span><span class="o">:</span> <span class="nx">Long</span><span class="p">(</span><span class="s1">'0'</span><span class="p">),</span>
</span></span><span class="line"><span class="cl"> <span class="nx">lastHeartbeatMessage</span><span class="o">:</span> <span class="s1">''</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">syncSourceHost</span><span class="o">:</span> <span class="s1">'replica-cluster-cfg-0.psmdb.svc.clusterset.local:27017'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">syncSourceId</span><span class="o">:</span> <span class="mi">3</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">infoMessage</span><span class="o">:</span> <span class="s1">''</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">configVersion</span><span class="o">:</span> <span class="mi">20</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">configTerm</span><span class="o">:</span> <span class="mi">2</span>
</span></span><span class="line"><span class="cl"> <span class="p">},</span>
</span></span><span class="line"><span class="cl"> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nx">_id</span><span class="o">:</span> <span class="mi">5</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">name</span><span class="o">:</span> <span class="s1">'replica-cluster-cfg-2.psmdb.svc.clusterset.local:27017'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">health</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">state</span><span class="o">:</span> <span class="mi">2</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">stateStr</span><span class="o">:</span> <span class="s1">'SECONDARY'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">uptime</span><span class="o">:</span> <span class="mi">5068</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">pingMs</span><span class="o">:</span> <span class="nx">Long</span><span class="p">(</span><span class="s1">'0'</span><span class="p">),</span>
</span></span><span class="line"><span class="cl"> <span class="nx">lastHeartbeatMessage</span><span class="o">:</span> <span class="s1">''</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">syncSourceHost</span><span class="o">:</span> <span class="s1">'replica-cluster-cfg-0.psmdb.svc.clusterset.local:27017'</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">syncSourceId</span><span class="o">:</span> <span class="mi">3</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">infoMessage</span><span class="o">:</span> <span class="s1">''</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">configVersion</span><span class="o">:</span> <span class="mi">20</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nx">configTerm</span><span class="o">:</span> <span class="mi">2</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">]</span></span></span></code></pre>
</div>
</div>
</div>
<h2 id="step-18-cleanup">Step 18: Cleanup</h2>
<p>To remove the GKE clusters when you are done:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">bash</span><button class="code-block__copy" type="button" data-copy-target="codeblock-64" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content" id="codeblock-64">
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">gcloud container clusters delete main-cluster <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --zone us-central1-a <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --quiet
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">gcloud container clusters delete replica-cluster <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --zone us-central1-a <span class="se">
</span></span></span><span class="line"><span class="cl"><span class="se"></span> --quiet</span></span></code></pre>
</div>
</div>
</div>
<h2 id="references">References</h2>
<ul>
<li>
<p><a href="https://www.percona.com/blog/deploying-percona-operator-for-mongodb-across-gke-clusters-with-mcs/" target="_blank" rel="noopener noreferrer">Original blog post by Ivan Groenewold</a></p>
</li>
<li>
<p><a href="https://docs.percona.com/percona-operator-for-mongodb/replication-mcs.html" target="_blank" rel="noopener noreferrer">Percona Operator for MongoDB, Multi-Cluster Services</a></p>
</li>
<li>
<p><a href="https://cloud.google.com/kubernetes-engine/docs/concepts/multi-cluster-services" target="_blank" rel="noopener noreferrer">GKE Multi-Cluster Services overview</a></p>
</li>
<li>
<p><a href="https://docs.percona.com/percona-operator-for-mongodb/replication-mcs-gke.html" target="_blank" rel="noopener noreferrer">GKE MCS setup, Percona docs</a></p>
</li>
<li>
<p><a href="https://www.mongodb.com/docs/manual/core/replica-set-elections/" target="_blank" rel="noopener noreferrer">MongoDB replica set elections</a></p>
</li>
<li>
<p><a href="https://github.com/kubernetes/enhancements/blob/master/keps/sig-multicluster/1645-multi-cluster-services-api/README.md" target="_blank" rel="noopener noreferrer">Kubernetes MCS API KEP-1645</a></p>
</li>
</ul>
<p><a href="https://percona.community/blog/2026/06/12/multi-cluster-mongodb-percona-operator/">Guide Multi-Cluster MongoDB on GKE with MCS, Percona Operator</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Write-heavy sysbench tests, a large server, modern Postgres and MySQL</title>
        <link>https://smalldatum.blogspot.com/2026/06/write-heavy-sysbench-tests-large-server.html</link>
        <pubDate>Fri, 12 Jun 2026 01:16:04 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://smalldatum.blogspot.com/">Small Datum</source>
        <description><![CDATA[<p>This has results for modern Postgres and MySQL using write-heavy tests from sysbench and a large server. I think there are regressions in Postgres that arrive in some of versions 16, 17, 18 and 19 beta1 but I am far from certain and this blog post is just another step in my journey to figure that out.tl;drPostgres suffers a lot from throughput variation while MySQL+InnoDB does notInnoDB gets much better average throughput on 6 of 10 tests, similar throughput one one and then Postgres does better on 3 of 10 testsFor tests from which I provided vmstat and iostat results, Postgres does more write IO per operation. In some cases InnoDB uses more CPU, in other cases it does not.Builds, configuration and hardwareI compiled:Postgres from source for versions 15.17, 16.13, 17.9 and 18.3.MySQL from source for version 8.4.7I used a 48-core server from Hetzneran ax162s with an AMD EPYC 9454P 48-Core Processor with SMT disabled2 Intel D7-P5520 NVMe storage devices with RAID 1 (3.8T each) using ext4128G RAMUbuntu 24.04Configuration files for Postgres:the config file is named conf.diff.cx10a_c32r128 (x10a_c32r128) and is here for versions 15, 16 and 17.for Postgres 18 I used conf.diff.cx10b_c32r128 (x10b_c32r128) which is as close as possible to the Postgres 17 config and uses io_method=syncBenchmarkI used sysbench and my usage is explained here. Normally I run 32 of the 42 microbenchmarks listed in that blog post using tables small enough to be cached by the DBMS. Most test only one type of SQL statement.The tests can be called microbenchmarks. They are very synthetic. But microbenchmarks also make it easy to understand which types of SQL statements have great or lousy performance. Performance testing benefits from a variety of workloads -- both more and less synthetic.But I did things differently here:I only run the write-heavy tests (to save time)The tables are larger than memory and cannot be cachedEach test (microbenchmark) is run for 2 hours when I normally run each for 15 minutesAfter each test a vacuum is doneThe purpose is to search for regressions from new CPU overhead and mutex contention related to MVCC GC (vacuum for Postgres, purge for InnoDB).ResultsI provide charts below with relative QPS. The relative QPS is the following:(QPS for some version) / (QPS for Postgres 15.17)When the relative QPS is > 1 then some version is faster than base version.  When it is < 1 then there might be a regression. When the relative QPS is 1.2 then some version is about 20% faster than base version.The per-test results from vmstat and iostat can help to explain why something is faster or slower because it shows how much HW is used per request, including CPU overhead per operation (cpu/o) and context switches per operation (cs/o) which are often a proxy for mutex contention.Results: writesThe table below has relative QPS for Postgres 16 to 19 and then InnoDB all relative to the throughput for Postgres 15.17. Columns 1 to 4 have results for Postgres and the numbers in yellow highlight the tests where there is a regression in Postgres. For column 5 (MySQL with InnoDB) the numbers in yellow and red indicate tests where InnoDB's throughput is less than Postgres. And then the numbers in green indicate tests where InnoDB's throughput is much larger than Postgres.Note that when relative QPS (rQPS) is 0.90 then throughput dropped by ~10%.Summary:throughput for Postgres drops after version 15.17. I don't know yet whether this is a regression.throughput for InnoDB is much better than Postgres in 6 of 10 tests, similar in one test, and much worse in 3 of 10 tests.The sections that follow this one have more detail on results from the update-index, update-zipf tests and insert tests.Relative to: Postgres 15.17col-1 : Postgres 16.13col-2 : Postgres 17.9col-3 : Postgres 18.3col-4 : Postgres 19 beta1col-5 : MySQL 8.4.7col-1   col-2   col-3   col-4   col-50.94    0.97    0.98    1.02    1.88    update-inlist0.94    0.90    0.88    0.92    1.43    update-index0.91    0.86    0.87    0.92    1.19    update-nonindex0.96    0.99    0.98    0.98    0.71    update-one0.92    0.83    0.81    0.85    0.93    update-zipf0.95    0.93    0.84    0.81    1.71    write-only0.94    0.94    0.90    0.92    1.14    read-write_range=100.95    0.96    0.95    0.95    1.93    read-write_range=1000.89    0.82    0.80    0.84    1.01    delete1.05    1.05    1.01    1.10    0.53    insertResults: update-indexSummary:Postgres suffers from too much varianceAverage throughput is ~1.55X larger for InnoDB than for PostgresPer operation, Postgres does ~1.20X more write IO (KB written) to storage than InnoDBPer operation, InnoDB uses more CPU and does more context switches. While autovacuum was enabled and was likely running during the test, my measurements exclude the manual vacuum done at the end of each test.iostat, vmstat normalized by operation rater/s     rMB/s   w/s     wMB/s   r/o     rKB/o   wKB/o   o/s     dbms35503.0 373.7   58795.7 1345.1  1.375   14.824  53.351  25817   PG 19b133140.6 517.8   53449.6 1735.3  0.827   13.226  44.326  40090   MySQL 8.4.7cs/s    cpu/s   cs/o    cpu/o   dbms176167  14.4     6.824  .000557 PG 19b1661395  41.9    16.498  .001046 MySQL 8.4.7Results: update-zipfSummary:Postgres suffers from too much varianceAverage throughput is ~1.09X larger for InnoDB than for PostgresPer operation, Postgres does ~1.30X more write IO (KB written) to storage than InnoDBPer operation, InnoDB uses more CPU and does more context switches. While autovacuum was enabled and was likely running during the test, my measurements exclude the manual vacuum done at the end of each test.iostat, vmstat normalized by operation rater/s     rMB/s   w/s     wMB/s   r/o     rKB/o   wKB/o   o/s     dbms55595.5 620.7   64264.4 1352.3  0.622   7.110   15.490  89396   PG 19b127405.9 428.2   37465.1 1133.6  0.282   4.508   11.933  97270   MySQL 8.4.7cs/s    cpu/s   cs/o    cpu/o   dbms424392  27.2     4.747  .000304 PG 19b11213054 44.5    12.471  .000458 MySQL 8.4.7Results: insertSummary:Postgres suffers from too much varianceAverage throughput is ~2.06X larger for Postgres than for InnoDBPer operation, Postgres does ~1.67X more write IO (KB written) to storage than InnoDBPer operation, Postgres uses more CPU and does more context switches. This is the opposite of what happens above for update-index and update-zipf.iostat, vmstat normalized by operation rater/s     rMB/s   w/s     wMB/s   r/o     rKB/o   wKB/o   o/s     dbms1615.5  56.0    15321.7 1170.9  0.007   0.242   5.059   237009  PG 19b13.6     0.1     8275.4  340.7   0.000   0.000   3.029   115155  MySQL 8.4.7cs/s    cpu/s   cs/o    cpu/o   dbms1214563 46.0    10.547  .000399 PG 19b1800827  50.5     3.379  .000213 MySQL 8.4.7
</p>
<p><a href="https://smalldatum.blogspot.com/2026/06/write-heavy-sysbench-tests-large-server.html">Write-heavy sysbench tests, a large server, modern Postgres and MySQL</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>This has results for modern Postgres and MySQL using write-heavy tests from sysbench and a large server. I think there are regressions in Postgres that arrive in some of versions 16, 17, 18 and 19 beta1 but I am far from certain and this blog post is just another step in my journey to figure that out.</p>
<p>tl;dr</p>
</p>
<ul style="text-align: left">
<li>Postgres suffers a lot from throughput variation while MySQL+InnoDB does not</li>
<li>InnoDB gets much better average throughput on 6 of 10 tests, similar throughput one one and then Postgres does better on 3 of 10 tests</li>
<li>For tests from which I provided vmstat and iostat results, Postgres does more write IO per operation. In some cases InnoDB uses more CPU, in other cases it does not.</li>
</ul>
<div style="background-color: white"><b>Builds, configuration and hardware</b></div>
<div>
<div style="background-color: white">
<div>I compiled:</div>
<div>
<ul>
<li>Postgres from source for versions 15.17, 16.13, 17.9 and 18.3.</li>
<li>MySQL from source for version 8.4.7</li>
</ul>
</div>
<div><span style="font-family: inherit">I used a 48-core server from Hetzner</span></div>
<div>
<ul>
<li>an ax162s with an AMD EPYC 9454P 48-Core Processor with SMT disabled</li>
<li>2 Intel D7-P5520 NVMe storage devices with RAID 1 (3.8T each) using ext4</li>
<li>128G RAM</li>
<li>Ubuntu 24.04</li>
</ul>
<div>
<div><span style="font-family: inherit">Configuration files for Postgres:</span></div>
<div>
<ul>
<li><span style="font-family: inherit">the config file is named conf.diff.cx10a_c32r128 (x10a_c32r128) and is here for versions </span><a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/pg157_o2nofp/conf.diff.cx10a_c32r128">15</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/pg163_o2nofp/conf.diff.cx10a_c32r128">16</a> and <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/pg17beta1_o2nofp/conf.diff.cx10a_c32r128">17</a>.</li>
<li>for Postgres 18 I used <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/pg18beta3_o2nofp/conf.diff.cx10b_c32r128" style="font-family: inherit">conf.diff.cx10b_c32r128</a><span style="font-family: inherit"> </span><span style="font-family: inherit">(x10b_c32r128) which is as close as possible to the Postgres 17 config and </span>uses io_method=sync</li>
</ul>
<div>
<div>
<div>
<div><b>Benchmark</b></div>
<div>
<div></div>
<div>I used sysbench and my usage is <a href="http://smalldatum.blogspot.com/2017/02/using-modern-sysbench-to-compare.html">explained here</a>. Normally I run 32 of the 42 microbenchmarks listed in that blog post using tables small enough to be cached by the DBMS. Most test only one type of SQL statement.</div>
<div></div>
<div>The tests can be called microbenchmarks. They are very synthetic. But microbenchmarks also make it easy to understand which types of SQL statements have great or lousy performance. Performance testing benefits from a variety of workloads &#8212; both more and less synthetic.</div>
<div></div>
<div>But I did things differently here:</div>
<div>
<ul style="text-align: left">
<li>I only run the write-heavy tests (to save time)</li>
<li>The tables are larger than memory and cannot be cached</li>
<li>Each test (microbenchmark) is run for 2 hours when I normally run each for 15 minutes</li>
<li>After each test a vacuum is done</li>
</ul>
</div>
</div>
</div>
<div>The purpose is to search for regressions from new CPU overhead and mutex contention related to MVCC GC (vacuum for Postgres, purge for InnoDB).</div>
</div>
<div></div>
<div>
<div style="font-family: inherit"><b>Results</b></div>
<div><span></p>
<div style="font-family: inherit"></div>
<div style="font-family: inherit">I provide charts below with relative QPS. The relative QPS is the following:</div>
<div style="font-family: inherit">
<div></div>
<blockquote><p>(QPS for some version) / (QPS for Postgres 15.17)</p></blockquote>
</div>
<div><span style="font-family: inherit">When the relative QPS is &gt; 1 then </span><i style="font-family: inherit">some version</i><span style="font-family: inherit"> is faster than <i>base version</i></span><span style="font-family: inherit">.&nbsp; When it is &lt; 1 then there might be a regression. When the relative QPS is 1.2 then <i>some version</i> is about 20% faster than </span><i>base version</i><span style="font-family: inherit">.</span></div>
<div><span style="font-family: inherit"><br /></span></div>
<div><span style="font-family: inherit">The per-test results from vmstat and iostat </span><span style="font-family: inherit">can help to explain why something is faster or slower because it shows how much HW is used per request, including CPU overhead per operation (cpu/o) and context switches per operation (cs/o) which are often a proxy for mutex contention.</span></div>
<div><span style="font-family: inherit"><br /></span></div>
<div><span style="font-family: inherit"><b>Results: writes</b></span></div>
<div><span style="font-family: inherit"><br /></span></div>
<div><span style="font-family: inherit">The table below has relative QPS for Postgres 16 to 19 and then InnoDB all relative to the throughput for Postgres 15.17. Columns 1 to 4 have results for Postgres and the numbers in yellow highlight the tests where there is a regression in Postgres. For column 5 (MySQL with InnoDB) the numbers in yellow and red indicate tests where InnoDB&#8217;s throughput is less than Postgres. And then the numbers in green indicate tests where InnoDB&#8217;s throughput is much larger than Postgres.</span></div>
<div><span style="font-family: inherit"><br /></span></div>
<div><span style="font-family: inherit">Note that when relative QPS (rQPS) is 0.90 then throughput dropped by ~10%.</span></div>
<div><span style="font-family: inherit"><br />Summary:</p>
<ul style="text-align: left">
<li>throughput for Postgres drops after version 15.17. I don&#8217;t know yet whether this is a regression.</li>
<li>throughput for InnoDB is much better than Postgres in 6 of 10 tests, similar in one test, and much worse in 3 of 10 tests.</li>
</ul>
<div>The sections that follow this one have more detail on results from the update-index, update-zipf tests and insert tests.</div>
<div></div>
<p></span></div>
<div><span></p>
<div><span style="font-family: courier">Relative to: Postgres 15.17</span></div>
<div><span style="font-family: courier">col-1 : Postgres 16.13</span></div>
<div><span style="font-family: courier">col-2 : Postgres 17.9</span></div>
<div><span style="font-family: courier">col-3 : Postgres 18.3</span></div>
<div><span style="font-family: courier">col-4 : Postgres 19 beta1</span></div>
<div><span style="font-family: courier">col-5 : MySQL 8.4.7</span></div>
<div><span style="font-family: courier"><br /></span></div>
<div><span style="font-family: courier">col-1&nbsp; &nbsp;col-2&nbsp; &nbsp;col-3&nbsp; &nbsp;col-4&nbsp; &nbsp;col-5</span></div>
<div><span style="font-family: courier">0.94&nbsp; &nbsp; 0.97&nbsp; &nbsp; 0.98&nbsp; &nbsp; 1.02&nbsp; &nbsp; <span style="background-color: #d9ead3">1.88</span>&nbsp; &nbsp; update-inlist</span></div>
<div><span style="font-family: courier"><span style="background-color: #fff2cc">0.94&nbsp; &nbsp; 0.90&nbsp; &nbsp; 0.88&nbsp; &nbsp; 0.92</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.43</span>&nbsp; &nbsp; update-index</span></div>
<div><span style="font-family: courier"><span style="background-color: #fff2cc">0.91&nbsp; &nbsp; 0.86&nbsp; &nbsp; 0.87&nbsp; &nbsp; 0.92</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.19</span>&nbsp; &nbsp; update-nonindex</span></div>
<div><span style="font-family: courier">0.96&nbsp; &nbsp; 0.99&nbsp; &nbsp; 0.98&nbsp; &nbsp; 0.98&nbsp; &nbsp; <span style="background-color: #f4cccc">0.71</span>&nbsp; &nbsp; update-one</span></div>
<div><span style="font-family: courier"><span style="background-color: #fff2cc">0.92&nbsp; &nbsp; 0.83&nbsp; &nbsp; 0.81&nbsp; &nbsp; 0.85</span>&nbsp; &nbsp; <span style="background-color: #fff2cc">0.93</span>&nbsp; &nbsp; update-zipf</span></div>
<div><span style="font-family: courier"><span style="background-color: #fff2cc">0.95&nbsp; &nbsp; 0.93&nbsp; &nbsp; 0.84&nbsp; &nbsp; 0.81</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.71</span>&nbsp; &nbsp; write-only</span></div>
<div><span style="font-family: courier"><span style="background-color: #fff2cc">0.94&nbsp; &nbsp; 0.94&nbsp; &nbsp; 0.90&nbsp; &nbsp; 0.92</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.14</span>&nbsp; &nbsp; read-write_range=10</span></div>
<div><span style="font-family: courier"><span style="background-color: #fff2cc">0.95&nbsp; &nbsp; 0.96&nbsp; &nbsp; 0.95&nbsp; &nbsp; 0.95</span>&nbsp; &nbsp; <span style="background-color: #d9ead3">1.93</span>&nbsp; &nbsp; read-write_range=100</span></div>
<div><span style="font-family: courier"><span style="background-color: #fff2cc">0.89&nbsp; &nbsp; 0.82&nbsp; &nbsp; 0.80&nbsp; &nbsp; 0.84</span>&nbsp; &nbsp; 1.01&nbsp; &nbsp; delete</span></div>
<div><span style="font-family: courier">1.05&nbsp; &nbsp; 1.05&nbsp; &nbsp; 1.01&nbsp; &nbsp; 1.10&nbsp; &nbsp; <span style="background-color: #f4cccc">0.53</span>&nbsp; &nbsp; insert</span></div>
<div></div>
<div><b>Results: update-index</b></div>
<div></div>
<div>Summary:</div>
<div>
<ul style="text-align: left">
<li>Postgres suffers from too much variance</li>
<li>Average throughput is ~1.55X larger for InnoDB than for Postgres</li>
<li>Per operation, Postgres does ~1.20X more write IO (KB written) to storage than InnoDB</li>
<li>Per operation, InnoDB uses more CPU and does more context switches. While autovacuum was enabled and was likely running during the test, my measurements exclude the manual vacuum done at the end of each test.</li>
</ul>
</div>
<div class="separator" style="clear: both;text-align: center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4AIH6vKcDIjgnw-Y-8WvPaxGwZO3rBf_kDeSjiQBgtEH8XWXhDWd7Ft2gGXPwc_BXVxgXhSTn6AWmFjtJLB83l4Igbd6TUPAH9-8jf2IZ0gPGR0ixMoZdTqR4a9DJnQjrmltwkxKqDc9RWvtTCLO4N-TmU1BTSZhbh5P1GHESDSi6oN1OvV91UnPJdoxk/s600/update-index_%20Postgres%2019b1%20and%20MySQL%208.4.7.png" style="margin-left: 1em;margin-right: 1em"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4AIH6vKcDIjgnw-Y-8WvPaxGwZO3rBf_kDeSjiQBgtEH8XWXhDWd7Ft2gGXPwc_BXVxgXhSTn6AWmFjtJLB83l4Igbd6TUPAH9-8jf2IZ0gPGR0ixMoZdTqR4a9DJnQjrmltwkxKqDc9RWvtTCLO4N-TmU1BTSZhbh5P1GHESDSi6oN1OvV91UnPJdoxk/w640-h396/update-index_%20Postgres%2019b1%20and%20MySQL%208.4.7.png" width="640" /></a></div>
<div>
<div><span style="font-family: courier;font-size: x-small">iostat, vmstat normalized by operation rate</span></div>
<div><span style="font-family: courier;font-size: x-small">r/s&nbsp; &nbsp; &nbsp;rMB/s&nbsp; &nbsp;w/s&nbsp; &nbsp; &nbsp;wMB/s&nbsp; &nbsp;r/o&nbsp; &nbsp; &nbsp;rKB/o&nbsp; &nbsp;wKB/o&nbsp; &nbsp;o/s&nbsp; &nbsp; &nbsp;dbms</span></div>
<div><span style="font-family: courier;font-size: x-small">35503.0 373.7&nbsp; &nbsp;58795.7 1345.1&nbsp; 1.375&nbsp; &nbsp;14.824&nbsp; <span style="background-color: #fff2cc">53.351</span>&nbsp; <span style="background-color: #fff2cc">25817</span>&nbsp; &nbsp;PG 19b1</span></div>
<div><span style="font-family: courier;font-size: x-small">33140.6 517.8&nbsp; &nbsp;53449.6 1735.3&nbsp; 0.827&nbsp; &nbsp;13.226&nbsp; <span style="background-color: #d9ead3">44.326</span>&nbsp; <span style="background-color: #d9ead3">40090</span>&nbsp; &nbsp;MySQL 8.4.7</span></div>
<div><span style="font-family: courier;font-size: x-small"><br /></span></div>
<div><span style="font-family: courier;font-size: x-small">cs/s&nbsp; &nbsp; cpu/s&nbsp; &nbsp;cs/o&nbsp; &nbsp; cpu/o&nbsp; &nbsp;dbms</span></div>
<div><span style="font-family: courier;font-size: x-small">176167&nbsp; 14.4&nbsp; &nbsp; &nbsp;<span style="background-color: #d9ead3">6.824</span>&nbsp;&nbsp;<span style="background-color: #d9ead3">.000557</span> PG 19b1</span></div>
<div><span style="font-family: courier;font-size: x-small">661395&nbsp; 41.9&nbsp; &nbsp; <span style="background-color: #fff2cc">16.498</span>&nbsp; <span style="background-color: #fff2cc">.001046</span> MySQL 8.4.7</span></div>
</div>
<div><b><br /></b></div>
<div><b>Results: update-zipf</b></div>
<div></div>
<div>
<div>Summary:</div>
<div>
<ul>
<li>Postgres suffers from too much variance</li>
<li>Average throughput is ~1.09X larger for InnoDB than for Postgres</li>
<li>Per operation, Postgres does ~1.30X more write IO (KB written) to storage than InnoDB</li>
<li>Per operation, InnoDB uses more CPU and does more context switches. While autovacuum was enabled and was likely running during the test, my measurements exclude the manual vacuum done at the end of each test.</li>
</ul>
</div>
</div>
<div class="separator" style="clear: both;text-align: center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBpMvt9NeKpNXTBkF99Qdgjhy5cA4QFu__1yTl5KMkGpLKxlPUJ-WnNJAHDQI72w1-ySz3b-tmL6j2P5G-ogs0WNl9ZA0hezzA9CyxRSpigd87RoU1rgiCgpm1xjUEpNitGyq6eXGPUrECd2P7nWoQH_l504xfdelFU2bKb3yXJ18WpRLogreQXJCGxc6e/s600/update-zipf_%20Postgres%2019b1%20and%20MySQL%208.4.7.png" style="margin-left: 1em;margin-right: 1em"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBpMvt9NeKpNXTBkF99Qdgjhy5cA4QFu__1yTl5KMkGpLKxlPUJ-WnNJAHDQI72w1-ySz3b-tmL6j2P5G-ogs0WNl9ZA0hezzA9CyxRSpigd87RoU1rgiCgpm1xjUEpNitGyq6eXGPUrECd2P7nWoQH_l504xfdelFU2bKb3yXJ18WpRLogreQXJCGxc6e/w640-h396/update-zipf_%20Postgres%2019b1%20and%20MySQL%208.4.7.png" width="640" /></a></div>
<div>
<div><span style="font-family: courier;font-size: x-small">iostat, vmstat normalized by operation rate</span></div>
<div><span style="font-family: courier;font-size: x-small">r/s&nbsp; &nbsp; &nbsp;rMB/s&nbsp; &nbsp;w/s&nbsp; &nbsp; &nbsp;wMB/s&nbsp; &nbsp;r/o&nbsp; &nbsp; &nbsp;rKB/o&nbsp; &nbsp;wKB/o&nbsp; &nbsp;o/s&nbsp; &nbsp; &nbsp;dbms</span></div>
<div><span style="font-family: courier;font-size: x-small">55595.5 620.7&nbsp; &nbsp;64264.4 1352.3&nbsp; 0.622&nbsp; &nbsp;7.110&nbsp; &nbsp;<span style="background-color: #fff2cc">15.490</span>&nbsp; <span style="background-color: #fff2cc">89396</span>&nbsp; &nbsp;PG 19b1</span></div>
<div><span style="font-family: courier;font-size: x-small">27405.9 428.2&nbsp; &nbsp;37465.1 1133.6&nbsp; 0.282&nbsp; &nbsp;4.508&nbsp; &nbsp;<span style="background-color: #d9ead3">11.933</span>&nbsp; <span style="background-color: #d9ead3">97270</span>&nbsp; &nbsp;MySQL 8.4.7</span></div>
<div><span style="font-family: courier;font-size: x-small"><br /></span></div>
<div><span style="font-family: courier;font-size: x-small">cs/s&nbsp; &nbsp; cpu/s&nbsp; &nbsp;cs/o&nbsp; &nbsp; cpu/o&nbsp; &nbsp;dbms</span></div>
<div><span style="font-family: courier;font-size: x-small">424392&nbsp; 27.2&nbsp; &nbsp; &nbsp;<span style="background-color: #d9ead3">4.747</span>&nbsp;&nbsp;<span style="background-color: #d9ead3">.000304</span> PG 19b1</span></div>
<div><span style="font-family: courier;font-size: x-small">1213054 44.5&nbsp; &nbsp; <span style="background-color: #fff2cc">12.471</span>&nbsp; <span style="background-color: #fff2cc">.000458</span> MySQL 8.4.7</span></div>
</div>
<div><b><br /></b></div>
<div><b>Results: insert</b></div>
<p></span></div>
<p></span></div>
</div>
<div></div>
<div>
<div>Summary:</div>
<div>
<ul>
<li>Postgres suffers from too much variance</li>
<li>Average throughput is ~2.06X larger for Postgres than for InnoDB</li>
<li>Per operation, Postgres does ~1.67X more write IO (KB written) to storage than InnoDB</li>
<li>Per operation, Postgres uses more CPU and does more context switches. This is the opposite of what happens above for update-index and update-zipf.</li>
</ul>
</div>
</div>
<div class="separator" style="clear: both;text-align: center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWbY3tiGRuHceEWnN5sIEPuufQGA49wSYP1MmCAb1lGL79Jh0uvRyv2bGaQZo2uDTkWTfLVIONEObrQajeUZ1qxJPYZ6EnjMI9Nkb5XV3x6w_rrgNoqA9qtVDNsW09QcM89pht9VVBklAWeQPmfRt6zZuYU_YoXzo7VOINjy9gh5-b0GjN4WrW5AjaV3W-/s600/insert_%20Postgres%2019b1%20and%20MySQL%208.4.7.png" style="margin-left: 1em;margin-right: 1em"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWbY3tiGRuHceEWnN5sIEPuufQGA49wSYP1MmCAb1lGL79Jh0uvRyv2bGaQZo2uDTkWTfLVIONEObrQajeUZ1qxJPYZ6EnjMI9Nkb5XV3x6w_rrgNoqA9qtVDNsW09QcM89pht9VVBklAWeQPmfRt6zZuYU_YoXzo7VOINjy9gh5-b0GjN4WrW5AjaV3W-/w640-h396/insert_%20Postgres%2019b1%20and%20MySQL%208.4.7.png" width="640" /></a></div>
<div></div>
<div>
<div><span style="font-family: courier;font-size: x-small">iostat, vmstat normalized by operation rate</span></div>
<div><span style="font-family: courier;font-size: x-small">r/s&nbsp; &nbsp; &nbsp;rMB/s&nbsp; &nbsp;w/s&nbsp; &nbsp; &nbsp;wMB/s&nbsp; &nbsp;r/o&nbsp; &nbsp; &nbsp;rKB/o&nbsp; &nbsp;wKB/o&nbsp; &nbsp;o/s&nbsp; &nbsp; &nbsp;dbms</span></div>
<div><span style="font-family: courier;font-size: x-small">1615.5&nbsp; 56.0&nbsp; &nbsp; 15321.7 1170.9&nbsp; 0.007&nbsp; &nbsp;0.242&nbsp; &nbsp;<span style="background-color: #fff2cc">5.059</span>&nbsp; &nbsp;<span style="background-color: #d9ead3">237009</span>&nbsp; PG 19b1</span></div>
<div><span style="font-family: courier;font-size: x-small">3.6&nbsp; &nbsp; &nbsp;0.1&nbsp; &nbsp; &nbsp;8275.4&nbsp; 340.7&nbsp; &nbsp;0.000&nbsp; &nbsp;0.000&nbsp; &nbsp;<span style="background-color: #d9ead3">3.029</span>&nbsp; &nbsp;<span style="background-color: #fff2cc">115155</span>&nbsp; MySQL 8.4.7</span></div>
<div><span style="font-family: courier;font-size: x-small"><br /></span></div>
<div><span style="font-family: courier;font-size: x-small">cs/s&nbsp; &nbsp; cpu/s&nbsp; &nbsp;cs/o&nbsp; &nbsp; cpu/o&nbsp; &nbsp;dbms</span></div>
<div><span style="font-family: courier;font-size: x-small">1214563 46.0&nbsp; &nbsp; <span style="background-color: #fff2cc">10.547</span>&nbsp; <span style="background-color: #fff2cc">.000399</span> PG 19b1</span></div>
<div><span style="font-family: courier;font-size: x-small">800827&nbsp; 50.5&nbsp; &nbsp; &nbsp;<span style="background-color: #d9ead3">3.379</span>&nbsp; <span style="background-color: #d9ead3">.000213</span> MySQL 8.4.7</span></div>
</div>
<div></div>
<div></div>
</div>
</div>
</div>
</div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<p><a href="https://smalldatum.blogspot.com/2026/06/write-heavy-sysbench-tests-large-server.html">Write-heavy sysbench tests, a large server, modern Postgres and MySQL</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>The insert benchmark on a small server, cached workload : Postgres 19 beta1</title>
        <link>https://smalldatum.blogspot.com/2026/06/the-insert-benchmark-on-small-server.html</link>
        <pubDate>Thu, 11 Jun 2026 17:05:28 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://smalldatum.blogspot.com/">Small Datum</source>
        <description><![CDATA[<p>This has results for Postgres versions 19 beta1, 18.4 and 17.10 with the Insert Benchmark on a small server using a cached and CPU-bound workload.Postgres continues to be boring in a good way. It is hard to find performance regressions. tl;drI don't see regressions here in 19 beta1I see some improvements here in 19 beta1index create (l.x) is faster but the step is short-running so I don't assume much from thisthe write-heavy steps (l.i1, l.i2) are faster and CPU overhead is lower in 19 beta1, I hope to explain why the CPU overhead is lower, but that waits for another day.Builds, configuration and hardwareI compiled Postgres from source using -O2 -fno-omit-frame-pointer for versions 19 beta1, 18.4 and 17.10.The server is an Beelink SER7 with a Ryzen 7 7840HS CPU with 8 cores and AMD SMT disabled, 32G of RAM. Storage is one SSD for the OS and an NVMe SSD for the database using ext-4 with discard enabled. The OS is Ubuntu 24.04.For 17.10 the config file is named conf.diff.cx10a_c8r32 (cx10a) and is here.For Postgres 18 and 19 the config file is conf.diff.cx10b_c8r32 (cx10b) which is as similar as possible to the config for version 17.The BenchmarkThe benchmark is explained here and is run with 1 client.The point query (qp100, qp500, qp1000) and range query (qr100, qr500, qr1000) steps are run for 3600 seconds each.The benchmark steps are:l.i0insert 30M rows per table in PK order. The table has a PK index but no secondary indexes. There is one connection per client.l.xcreate 3 secondary indexes per table. There is one connection per client.l.i1use 2 connections/client. One inserts 40M rows per table and the other does deletes at the same rate as the inserts. Each transaction modifies 50 rows (big transactions). This step is run for a fixed number of inserts, so the run time varies depending on the insert rate.l.i2like l.i1 but each transaction modifies 5 rows (small transactions) and 10M rows are inserted and deleted per table.Wait for S seconds after the step finishes to reduce variance during the read-write benchmark steps that follow. The value of S is a function of the table size.qr100use 3 connections/client. One does range queries and performance is reported for this. The second does does 100 inserts/s and the third does 100 deletes/s. The second and third are less busy than the first. The range queries use covering secondary indexes. If the target insert rate is not sustained then that is considered to be an SLA failure. If the target insert rate is sustained then the step does the same number of inserts for all systems tested. This step is frequently not IO-bound for the IO-bound workload.qp100like qr100 except uses point queries on the PK indexqr500like qr100 but the insert and delete rates are increased from 100/s to 500/sqp500like qp100 but the insert and delete rates are increased from 100/s to 500/sqr1000like qr100 but the insert and delete rates are increased from 100/s to 1000/sqp1000like qp100 but the insert and delete rates are increased from 100/s to 1000/sResultsThe performance summary with charts is here.This table lists relative QPS per benchmark step and relative QPS is:    (QPS for my version / QPS for Postgres 17.10)The background in the table cells is blue for big improvements and yellow for regressions. There are no regressions here. The index create (l.x) step is much faster in 19.10. I usually ignore results on this step but I am curious if something was done in 19.10 to improve index create. But this step takes between 1 and 2 minutes and I am reluctant to assume too much from a short running step.For the write-heavy steps (l.i1, l.i2)there are small improvements in 18.4there are large improvements in 19 beta1. The CPU overhead is lower in 19 beta1 compared to 17.10, ~15% lower for l.i1 and ~10% lower for l.i2. Hopefully I can explain why. But the lower CPU overhead might explain the improved performance in 19 beta1. Some of the metrics from iostat and vmstat are here.dbmsl.i0l.xl.i1l.i2qr100qp100qr500qp500qr1000qp100017.101.001.001.001.001.001.001.001.001.001.0018.41.001.031.021.070.991.001.001.001.011.0019 beta11.011.161.231.220.991.000.990.991.001.00</p>
<p><a href="https://smalldatum.blogspot.com/2026/06/the-insert-benchmark-on-small-server.html">The insert benchmark on a small server, cached workload : Postgres 19 beta1</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>This has results for Postgres versions 19 beta1, 18.4 and 17.10 with the <a href="https://smalldatum.blogspot.com/2023/12/updates-for-insert-benchmark-december.html">Insert Benchmark</a> on a small server using a cached and CPU-bound workload.</p>
</p>
<p>Postgres continues to be boring in a good way. It is hard to find performance regressions.</p>
<p>&nbsp;tl;dr</p>
</p>
<ul style="text-align: left">
<li>I don&#8217;t see regressions here in 19 beta1</li>
<li>I see some improvements here in 19 beta1</li>
<ul>
<li>index create (l.x) is faster but the step is short-running so I don&#8217;t assume much from this</li>
<li>the write-heavy steps (l.i1, l.i2) are faster and CPU overhead is lower in 19 beta1, I hope to explain why the CPU overhead is lower, but that waits for another day.</li>
</ul>
</ul>
<div><b>Builds, configuration and hardware</b></div>
<div>
<div></div>
<div>I compiled Postgres from source using&nbsp;<i>-O2 -fno-omit-frame-pointer</i>&nbsp;for versions 19 beta1, 18.4 and 17.10.</div>
<div>The server is an Beelink SER7 with a Ryzen 7 7840HS CPU with 8 cores and AMD SMT disabled, 32G of RAM. Storage is one SSD for the OS and an NVMe SSD for the database using ext-4 with discard enabled. The OS is Ubuntu 24.04.</div>
<div></div>
<div>For 17.10 the config file is named conf.diff.cx10a_c8r32 (cx10a) and&nbsp;<a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/pg172_o2nofp/conf.diff.cx10a_c8r32">is here</a>.</div>
</p>
<div>For Postgres 18 and 19&nbsp;the config file is&nbsp;<a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/pg18_o2nofp/conf.diff.cx10b_c8r32">conf.diff.cx10b_c8r32</a>&nbsp;(cx10b) which is as similar as possible to the config for version 17.</div>
</div>
<div></div>
<div>
<div><b>The Benchmark</b></div>
<div>
<div></div>
<div>The benchmark is <a href="https://smalldatum.blogspot.com/2023/12/updates-for-insert-benchmark-december.html">explained here</a> and is run with 1 client.</div>
<div></div>
<div>
<div>The point query (qp100, qp500, qp1000) and range query (qr100, qr500, qr1000) steps are run for 3600 seconds each.</div>
</div>
<div></div>
<div>The benchmark steps are:</div>
<div>
<div>
<ul>
<li>l.i0</li>
<ul>
<li>insert 30M rows per table in PK order. The table has a PK index but no secondary indexes. There is one connection per client.</li>
</ul>
<li>l.x</li>
<ul>
<li>create 3 secondary indexes per table. There is one connection per client.</li>
</ul>
<li>l.i1</li>
<ul>
<li>use 2 connections/client. One inserts 40M rows per table and the other does deletes at the same rate as the inserts. Each transaction modifies 50 rows (big transactions). This step is run for a fixed number of inserts, so the run time varies depending on the insert rate.</li>
</ul>
<li>l.i2</li>
<ul>
<li>like l.i1 but each transaction modifies 5 rows (small transactions) and 10M rows are inserted and deleted per table.</li>
<li>Wait for S seconds after the step finishes to reduce variance during the read-write benchmark steps that follow. The value of S is a function of the table size.</li>
</ul>
<li>qr100</li>
<ul>
<li>use 3 connections/client. One does range queries and performance is reported for this. The second does does 100 inserts/s and the third does 100 deletes/s. The second and third are less busy than the first. The range queries use covering secondary indexes. If the target insert rate is not sustained then that is considered to be an SLA failure. If the target insert rate is sustained then the step does the same number of inserts for all systems tested. This step is frequently not IO-bound for the IO-bound workload.</li>
</ul>
<li>qp100</li>
<ul>
<li>like qr100 except uses point queries on the PK index</li>
</ul>
<li>qr500</li>
<ul>
<li>like qr100 but the insert and delete rates are increased from 100/s to 500/s</li>
</ul>
<li>qp500</li>
<ul>
<li>like qp100 but the insert and delete rates are increased from 100/s to 500/s</li>
</ul>
<li>qr1000</li>
<ul>
<li>like qr100 but the insert and delete rates are increased from 100/s to 1000/s</li>
</ul>
<li>qp1000</li>
<ul>
<li>like qp100 but the insert and delete rates are increased from 100/s to 1000/s</li>
</ul>
</ul>
<div><b>Results</b></div>
</div>
</div>
</div>
</div>
<div></div>
<div>The performance summary with charts <a href="https://mdcallag.github.io/reports/jun26.ib.pn52.mem.30m.50m.3600s.1u.pg/all.html#summary">is here</a>.</div>
<div></div>
<div>This table lists relative QPS per benchmark step and relative QPS is:<br />&nbsp; &nbsp; (QPS for my version / QPS for Postgres 17.10)</p>
<p>The background in the table cells is blue for big improvements and yellow for regressions. There are no regressions here.&nbsp;</p></div>
<div></div>
<div>The index create (l.x) step is much faster in 19.10. I usually ignore results on this step but I am curious if something was done in 19.10 to improve index create. But this step takes between 1 and 2 minutes and I am reluctant to assume too much from a short running step.</div>
<div></div>
<div>For the write-heavy steps (l.i1, l.i2)</div>
<div>
<ul style="text-align: left">
<li>there are small improvements in 18.4</li>
<li>there are large improvements in 19 beta1. The CPU overhead is lower in 19 beta1 compared to 17.10, ~15% lower for l.i1 and ~10% lower for l.i2. Hopefully I can explain why. But the lower CPU overhead might explain the improved performance in 19 beta1. Some of the metrics from iostat and vmstat <a href="https://mdcallag.github.io/reports/jun26.ib.pn52.mem.30m.50m.3600s.1u.pg/all.html#l.i1.metrics">are here</a>.</li>
</ul>
</div>
<div>
<table border="1" cellpadding="8" style="color: black">
<tbody>
<tr>
<th><span style="font-size: x-small">dbms</span></th>
<th><span style="font-size: x-small">l.i0</span></th>
<th><span style="font-size: x-small">l.x</span></th>
<th><span style="font-size: x-small">l.i1</span></th>
<th><span style="font-size: x-small">l.i2</span></th>
<th><span style="font-size: x-small">qr100</span></th>
<th><span style="font-size: x-small">qp100</span></th>
<th><span style="font-size: x-small">qr500</span></th>
<th><span style="font-size: x-small">qp500</span></th>
<th><span style="font-size: x-small">qr1000</span></th>
<th><span style="font-size: x-small">qp1000</span></th>
</tr>
<tr>
<td style="text-align: right"><span style="font-size: x-small">17.10</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
</tr>
<tr>
<td style="text-align: right"><span style="font-size: x-small">18.4</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.03</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.02</span></td>
<td id="chi" style="background-color: #81fff9;text-align: right"><span style="font-size: x-small">1.07</span></td>
<td style="text-align: right"><span style="font-size: x-small">0.99</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.01</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
</tr>
<tr>
<td style="text-align: right"><span style="font-size: x-small">19 beta1</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.01</span></td>
<td id="chi" style="background-color: #81fff9;text-align: right"><span style="font-size: x-small">1.16</span></td>
<td id="chi" style="background-color: #81fff9;text-align: right"><span style="font-size: x-small">1.23</span></td>
<td id="chi" style="background-color: #81fff9;text-align: right"><span style="font-size: x-small">1.22</span></td>
<td style="text-align: right"><span style="font-size: x-small">0.99</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">0.99</span></td>
<td style="text-align: right"><span style="font-size: x-small">0.99</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00</span></td>
<td style="text-align: right"><span style="font-size: x-small">1.00<br /></span></td>
</tr>
</tbody>
</table>
</div>
<p><a href="https://smalldatum.blogspot.com/2026/06/the-insert-benchmark-on-small-server.html">The insert benchmark on a small server, cached workload : Postgres 19 beta1</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB shortens maintenance period from 5 to 3 years</title>
        <link>https://www.fromdual.com/blog/mariadb-shortens-maintenance-period-from-5-to-3-years/</link>
        <pubDate>Thu, 11 Jun 2026 07:34:00 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.fromdual.com/aggregator/categories/9/">FromDual GmbH</source>
        <description><![CDATA[<p>Somehow this news slipped past me: MariaDB has shortened the support period for the long-term releases of the MariaDB Community Server from 5 to 3 years. OK, I guess that’s not really surprising — I’ve been offline for a good month…<br />
MariaDB Server LTS Release Support Periods</p>
<p> Release<br />
 GA date<br />
 EoL date<br />
 Duration</p>
<p> 12.3<br />
 28 May 2026<br />
 Jun 2029<br />
 3 years</p>
<p> 11.8<br />
 4 Jun 2025<br />
 4 Jun 2028<br />
 3 years</p>
<p> 11.4<br />
 29 May 2024<br />
 29 May 2029<br />
 5 years</p>
<p> 10.11<br />
 16 Feb 2023<br />
 16 Feb 2028<br />
 5 years</p>
<p> 10.6<br />
 6 Jul 2021<br />
 6 Jul 2026<br />
 5 years</p>
<p> 10.5<br />
 24 Jun 2020<br />
 24 Jun 2025<br />
 5 years</p>
<p> 10.4<br />
 18 Jun 2019<br />
 18 Jun 2024<br />
 5 years</p>
<p> 10.3<br />
 25 May 2018<br />
 25 May 2023<br />
 5 years</p>
<p> 10.2<br />
 23 May 2017<br />
 23 May 2022<br />
 5 years</p>
<p> 10.1<br />
 17 Oct 2015<br />
 17 Oct 2020<br />
 5 years</p>
<p> 10.0<br />
 31 Mar 2014<br />
 31 Mar 2019<br />
 5 years</p>
<p>Source: MariaDB Server long-term release maintenance periods<br />
I am curious to see how all the distributions will handle this. They have significantly longer support periods, after all.<br />
And what about the competitors — the other databases?<br />
Debian</p>
<p>Debian Long Term Support (LTS) is a project to extend the lifetime of all Debian stable releases to (at least) 5 years.<br />
Source: Debian Long Term Support</p>
<p> Version<br />
 Name<br />
 Release<br />
 ext-LTS<br />
 EoL<br />
 Duration</p>
<p> Debian 13<br />
 trixie<br />
 2025-08-09<br />
 2030-07-01<br />
 2035-06-30<br />
 5 / 10 years</p>
<p> Debian 12<br />
 bookworm<br />
 2023-06-10<br />
 2028-07-01<br />
 2033-06-30<br />
 5 / 10 years</p>
<p> Debian 11<br />
 bullseye<br />
 2021-08-14<br />
 2026-09-01<br />
 2031-06-30<br />
 5 / 10 years</p>
<p> Debian 10<br />
 buster<br />
 2019-06-06<br />
 2024-07-01<br />
 2029-06-30<br />
 5 / 10 years</p>
<p> Debian 9<br />
 stretch<br />
 2017-06-17<br />
 2022-07-01<br />
 2027-06-30<br />
 5 / 10 years</p>
<p> Debian 8<br />
 jessie<br />
 2015-04-26<br />
 2020-07-01<br />
 2025-06-30<br />
 5 / 10 years</p>
<p> Debian 7<br />
 wheezy<br />
 2013-05-04<br />
 2018-06-01<br />
 2020-06-30<br />
 5 / 7 years</p>
<p>Source: Extended Long Term Support<br />
Ubuntu</p>
<p> Version<br />
 Name<br />
 Release<br />
 End of Support<br />
 EoL<br />
 Duration</p>
<p> Ubuntu 26.04 LTS<br />
 Resolute Raccoon<br />
 23. April 2026<br />
 May 2031<br />
 April 2041<br />
 5 / 15 years</p>
<p> Ubuntu 24.04 LTS<br />
 Noble Numbat<br />
 25. April 2024<br />
 June 2029<br />
 April 2039<br />
 5 / 15 years</p>
<p> Ubuntu 22.04 LTS<br />
 Jammy Jellyfish<br />
 21. April 2022<br />
 June 2027<br />
 April 2037<br />
 5 / 15 years</p>
<p> Ubuntu 20.04 LTS<br />
 Focal Fossa<br />
 23. April 2020<br />
 May 2025<br />
 April 2035<br />
 5 / 15 years</p>
<p> Ubuntu 18.04 LTS<br />
 Bionic Beaver<br />
 26. April 2018<br />
 June 2023<br />
 April 2033<br />
 5 / 15 years</p>
<p> Ubuntu 16.04 LTS<br />
 Xenial Xerus<br />
 21. April 2016<br />
 April 2021<br />
 April 2031<br />
 5 / 15 years</p>
<p> Ubuntu 14.04 LTS<br />
 Trusty Tahr<br />
 17. April 2014<br />
 April 2019<br />
 April 2029<br />
 5 / 15 years</p>
<p>Source: List of releases<br />
Rocky Linux</p>
<p> Release<br />
 Codename<br />
 Release Date<br />
 Active Support End<br />
 End of Life<br />
 Duration</p>
<p> Rocky Linux 10<br />
 Red Quartz<br />
 June 11, 2025<br />
 May 31, 2030<br />
 May 31, 2035<br />
 5 / 10 years</p>
<p> Rocky Linux 9<br />
 Blue Onyx<br />
 July 14, 2022<br />
 May 31, 2027<br />
 May 31, 2032<br />
 5 / 10 years</p>
<p> Rocky Linux 8<br />
 Green Obsidian<br />
 May 1, 2021<br />
 May 31, 2024<br />
 May 31, 2029<br />
 3 / 8 years</p>
<p>Source: Rocky Linux Release and Version Guide<br />
Oracle / MySQL Releases</p>
<p> Release<br />
 GA Date<br />
 Premier Support End<br />
 Extended Support End<br />
 Duration</p>
<p> MySQL 9.7<br />
 Apr 2026<br />
 Apr 2031<br />
 Apr 2034<br />
 5 / 8 years</p>
<p> MySQL 8.4<br />
 Apr 2024<br />
 Apr 2029<br />
 Apr 2032<br />
 5 / 8 years</p>
<p> MySQL 8.0<br />
 Apr 2018<br />
 Apr 2025<br />
 Apr 2026<br />
 7 years / 8 years</p>
<p> MySQL 5.7<br />
 Oct 2015<br />
 Oct 2020<br />
 Oct 2023<br />
 5 years / 8 years</p>
<p> MySQL 5.6<br />
 Feb 2013<br />
 Feb 2018<br />
 Feb 2021<br />
 5 years / 8 years</p>
<p> MySQL 5.5<br />
 Dec 2010<br />
 Dec 2015<br />
 Dec 2018<br />
 5 years / 8 years</p>
<p> MySQL 5.1<br />
 Dec 2008<br />
 Dec 2013<br />
 Not Available<br />
 5 years</p>
<p> MySQL 5.0<br />
 Oct 2005<br />
 Dec 2011<br />
 Not Available<br />
 6 years</p>
<p>Source: Oracle Lifetime Support Policy<br />
Percona<br />
Percona Distribution for PostgreSQL (PDPG) und Percona Server for MySQL (PS): At least 5 years, if I am interpreting the support matrix correctly…<br />
Source: Percona Release Lifecycle Overview<br />
OurSQL / VillageSQL<br />
No finished software is available yet, and thus no support policies, as far as I know. Is that even planned at all?<br />
Source: OurSQL und VillageSQL<br />
PostgreSQL</p>
<p> Version<br />
 First Release<br />
 Final Release<br />
 Duration</p>
<p> 18<br />
 September 25, 2025<br />
 November 14, 2030<br />
 5 years</p>
<p> 17<br />
 September 26, 2024<br />
 November 8, 2029<br />
 5 years</p>
<p> 16<br />
 September 14, 2023<br />
 November 9, 2028<br />
 5 years</p>
<p> 15<br />
 October 13, 2022<br />
 November 11, 2027<br />
 5 years</p>
<p> 14<br />
 September 30, 2021<br />
 November 12, 2026<br />
 5 years</p>
<p> 13<br />
 September 24, 2020<br />
 November 13, 2025<br />
 5 years</p>
<p> 12<br />
 October 3, 2019<br />
 November 21, 2024<br />
 5 years</p>
<p> 11<br />
 October 18, 2018<br />
 November 9, 2023<br />
 5 years</p>
<p> 10<br />
 October 5, 2017<br />
 November 10, 2022<br />
 5 years</p>
<p>Source: Versioning Policy<br />
Further sources</p>
<p>MariaDB 10.6 Changes &#038; Improvements<br />
MariaDB 10.6 is a long-term maintenance stable version. The first stable release was in July 2021, and it will be maintained until July 2026.<br />
MariaDB 10.11 Changes &#038; Improvements<br />
MariaDB 10.11 is a long-term maintenance release series, maintained until February 2028.<br />
MariaDB 11.4 Changes &#038; Improvements<br />
MariaDB 11.4 is a current long-term series, maintained until May 2029.<br />
MariaDB 11.8 Changes &#038; Improvements<br />
MariaDB 11.8 is a long-term release, maintained until June 2028.<br />
MariaDB 12.3 Changes &#038; Improvements<br />
MariaDB 12.3 is a long term release, maintained until June 2029.</p>
<p><a href="https://www.fromdual.com/blog/mariadb-shortens-maintenance-period-from-5-to-3-years/">MariaDB shortens maintenance period from 5 to 3 years</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Somehow this news slipped past me: MariaDB has shortened the support period for the long-term releases of the MariaDB Community Server from 5 to 3 years. OK, I guess that’s not really surprising — I’ve been offline for a good month&hellip;</p>
<h2 id="mariadb-server-lts-release-support-periods">MariaDB Server LTS Release Support Periods</h2>
<table>
<thead>
<tr>
<th>Release</th>
<th>GA date</th>
<th>EoL date</th>
<th>Duration</th>
</tr>
</thead>
<tbody>
<tr>
<td>12.3</td>
<td>28 May 2026</td>
<td>Jun 2029</td>
<td><strong>3 years</strong></td>
</tr>
<tr>
<td>11.8</td>
<td>4 Jun 2025</td>
<td>4 Jun 2028</td>
<td><strong>3 years</strong></td>
</tr>
<tr>
<td>11.4</td>
<td>29 May 2024</td>
<td>29 May 2029</td>
<td>5 years</td>
</tr>
<tr>
<td>10.11</td>
<td>16 Feb 2023</td>
<td>16 Feb 2028</td>
<td>5 years</td>
</tr>
<tr>
<td>10.6</td>
<td>6 Jul 2021</td>
<td>6 Jul 2026</td>
<td>5 years</td>
</tr>
<tr>
<td>10.5</td>
<td>24 Jun 2020</td>
<td>24 Jun 2025</td>
<td>5 years</td>
</tr>
<tr>
<td>10.4</td>
<td>18 Jun 2019</td>
<td>18 Jun 2024</td>
<td>5 years</td>
</tr>
<tr>
<td>10.3</td>
<td>25 May 2018</td>
<td>25 May 2023</td>
<td>5 years</td>
</tr>
<tr>
<td>10.2</td>
<td>23 May 2017</td>
<td>23 May 2022</td>
<td>5 years</td>
</tr>
<tr>
<td>10.1</td>
<td>17 Oct 2015</td>
<td>17 Oct 2020</td>
<td>5 years</td>
</tr>
<tr>
<td>10.0</td>
<td>31 Mar 2014</td>
<td>31 Mar 2019</td>
<td>5 years</td>
</tr>
</tbody>
</table>
<p>Source: <a href="https://mariadb.org/about/#maintenance-policy" target="_blank" rel="noopener">MariaDB Server long-term release maintenance periods</a></p>
<p>I am curious to see how all the distributions will handle this. They have significantly longer support periods, after all.</p>
<p>And what about the competitors — the other databases?</p>
<h2 id="debian">Debian</h2>
<blockquote>
<p>Debian Long Term Support (LTS) is a project to extend the lifetime of all Debian stable releases to (at least) 5 years.</p>
</blockquote>
<p>Source: <a href="https://wiki.debian.org/LTS" target="_blank" rel="noopener">Debian Long Term Support</a></p>
<table>
<thead>
<tr>
<th>Version</th>
<th>Name</th>
<th>Release</th>
<th>ext-LTS</th>
<th>EoL</th>
<th>Duration</th>
</tr>
</thead>
<tbody>
<tr>
<td>Debian 13</td>
<td>trixie</td>
<td>2025-08-09</td>
<td>2030-07-01</td>
<td>2035-06-30</td>
<td>5 / 10 years</td>
</tr>
<tr>
<td>Debian 12</td>
<td>bookworm</td>
<td>2023-06-10</td>
<td>2028-07-01</td>
<td>2033-06-30</td>
<td>5 / 10 years</td>
</tr>
<tr>
<td>Debian 11</td>
<td>bullseye</td>
<td>2021-08-14</td>
<td>2026-09-01</td>
<td>2031-06-30</td>
<td>5 / 10 years</td>
</tr>
<tr>
<td>Debian 10</td>
<td>buster</td>
<td>2019-06-06</td>
<td>2024-07-01</td>
<td>2029-06-30</td>
<td>5 / 10 years</td>
</tr>
<tr>
<td>Debian 9</td>
<td>stretch</td>
<td>2017-06-17</td>
<td>2022-07-01</td>
<td>2027-06-30</td>
<td>5 / 10 years</td>
</tr>
<tr>
<td>Debian 8</td>
<td>jessie</td>
<td>2015-04-26</td>
<td>2020-07-01</td>
<td>2025-06-30</td>
<td>5 / 10 years</td>
</tr>
<tr>
<td>Debian 7</td>
<td>wheezy</td>
<td>2013-05-04</td>
<td>2018-06-01</td>
<td>2020-06-30</td>
<td>5 / 7 years</td>
</tr>
</tbody>
</table>
<p>Source: <a href="https://wiki.debian.org/LTS/Extended" target="_blank" rel="noopener">Extended Long Term Support</a></p>
<h2 id="ubuntu">Ubuntu</h2>
<table>
<thead>
<tr>
<th>Version</th>
<th>Name</th>
<th>Release</th>
<th>End of Support</th>
<th>EoL</th>
<th>Duration</th>
</tr>
</thead>
<tbody>
<tr>
<td>Ubuntu 26.04 LTS</td>
<td>Resolute Raccoon</td>
<td>23. April 2026</td>
<td>May 2031</td>
<td>April 2041</td>
<td>5 / 15 years</td>
</tr>
<tr>
<td>Ubuntu 24.04 LTS</td>
<td>Noble Numbat</td>
<td>25. April 2024</td>
<td>June 2029</td>
<td>April 2039</td>
<td>5 / 15 years</td>
</tr>
<tr>
<td>Ubuntu 22.04 LTS</td>
<td>Jammy Jellyfish</td>
<td>21. April 2022</td>
<td>June 2027</td>
<td>April 2037</td>
<td>5 / 15 years</td>
</tr>
<tr>
<td>Ubuntu 20.04 LTS</td>
<td>Focal Fossa</td>
<td>23. April 2020</td>
<td>May 2025</td>
<td>April 2035</td>
<td>5 / 15 years</td>
</tr>
<tr>
<td>Ubuntu 18.04 LTS</td>
<td>Bionic Beaver</td>
<td>26. April 2018</td>
<td>June 2023</td>
<td>April 2033</td>
<td>5 / 15 years</td>
</tr>
<tr>
<td>Ubuntu 16.04 LTS</td>
<td>Xenial Xerus</td>
<td>21. April 2016</td>
<td>April 2021</td>
<td>April 2031</td>
<td>5 / 15 years</td>
</tr>
<tr>
<td>Ubuntu 14.04 LTS</td>
<td>Trusty Tahr</td>
<td>17. April 2014</td>
<td>April 2019</td>
<td>April 2029</td>
<td>5 / 15 years</td>
</tr>
</tbody>
</table>
<p>Source: <a href="https://documentation.ubuntu.com/project/release-team/list-of-releases/" target="_blank" rel="noopener">List of releases</a></p>
<h2 id="rocky-linux">Rocky Linux</h2>
<table>
<thead>
<tr>
<th>Release</th>
<th>Codename</th>
<th>Release Date</th>
<th>Active Support End</th>
<th>End of Life</th>
<th>Duration</th>
</tr>
</thead>
<tbody>
<tr>
<td>Rocky Linux 10</td>
<td>Red Quartz</td>
<td>June 11, 2025</td>
<td>May 31, 2030</td>
<td>May 31, 2035</td>
<td>5 / 10 years</td>
</tr>
<tr>
<td>Rocky Linux 9</td>
<td>Blue Onyx</td>
<td>July 14, 2022</td>
<td>May 31, 2027</td>
<td>May 31, 2032</td>
<td>5 / 10 years</td>
</tr>
<tr>
<td>Rocky Linux 8</td>
<td>Green Obsidian</td>
<td>May 1, 2021</td>
<td>May 31, 2024</td>
<td>May 31, 2029</td>
<td>3 / 8 years</td>
</tr>
</tbody>
</table>
<p>Source: <a href="https://wiki.rockylinux.org/rocky/version/#current-supported-releases" target="_blank" rel="noopener">Rocky Linux Release and Version Guide</a></p>
<h2 id="oracle--mysql-releases">Oracle / MySQL Releases</h2>
<table>
<thead>
<tr>
<th>Release</th>
<th>GA Date</th>
<th>Premier Support End</th>
<th>Extended Support End</th>
<th>Duration</th>
</tr>
</thead>
<tbody>
<tr>
<td>MySQL 9.7</td>
<td>Apr 2026</td>
<td>Apr 2031</td>
<td>Apr 2034</td>
<td>5 / 8 years</td>
</tr>
<tr>
<td>MySQL 8.4</td>
<td>Apr 2024</td>
<td>Apr 2029</td>
<td>Apr 2032</td>
<td>5 / 8 years</td>
</tr>
<tr>
<td>MySQL 8.0</td>
<td>Apr 2018</td>
<td>Apr 2025</td>
<td>Apr 2026</td>
<td>7 years / 8 years</td>
</tr>
<tr>
<td>MySQL 5.7</td>
<td>Oct 2015</td>
<td>Oct 2020</td>
<td>Oct 2023</td>
<td>5 years / 8 years</td>
</tr>
<tr>
<td>MySQL 5.6</td>
<td>Feb 2013</td>
<td>Feb 2018</td>
<td>Feb 2021</td>
<td>5 years / 8 years</td>
</tr>
<tr>
<td>MySQL 5.5</td>
<td>Dec 2010</td>
<td>Dec 2015</td>
<td>Dec 2018</td>
<td>5 years / 8 years</td>
</tr>
<tr>
<td>MySQL 5.1</td>
<td>Dec 2008</td>
<td>Dec 2013</td>
<td>Not Available</td>
<td>5 years</td>
</tr>
<tr>
<td>MySQL 5.0</td>
<td>Oct 2005</td>
<td>Dec 2011</td>
<td>Not Available</td>
<td>6 years</td>
</tr>
</tbody>
</table>
<p>Source: <a href="https://www.oracle.com/us/support/library/lifetime-support-technology-069183.pdf" target="_blank" rel="noopener">Oracle Lifetime Support Policy</a></p>
<h2 id="percona">Percona</h2>
<p>Percona Distribution for PostgreSQL (PDPG) und Percona Server for MySQL (PS): At least 5 years, if I am interpreting the support matrix correctly&hellip;</p>
<p>Source: <a href="https://www.percona.com/release-lifecycle-overview/" target="_blank" rel="noopener">Percona Release Lifecycle Overview</a></p>
<h2 id="oursql--villagesql">OurSQL / VillageSQL</h2>
<p>No finished software is available yet, and thus no support policies, as far as I know. Is that even planned at all?</p>
<p>Source: <a href="https://oursqlfoundation.org/" target="_blank" rel="noopener">OurSQL</a> und <a href="https://villagesql.com/" target="_blank" rel="noopener">VillageSQL</a></p>
<h2 id="postgresql">PostgreSQL</h2>
<table>
<thead>
<tr>
<th>Version</th>
<th>First Release</th>
<th>Final Release</th>
<th>Duration</th>
</tr>
</thead>
<tbody>
<tr>
<td>18</td>
<td>September 25, 2025</td>
<td>November 14, 2030</td>
<td>5 years</td>
</tr>
<tr>
<td>17</td>
<td>September 26, 2024</td>
<td>November 8, 2029</td>
<td>5 years</td>
</tr>
<tr>
<td>16</td>
<td>September 14, 2023</td>
<td>November 9, 2028</td>
<td>5 years</td>
</tr>
<tr>
<td>15</td>
<td>October 13, 2022</td>
<td>November 11, 2027</td>
<td>5 years</td>
</tr>
<tr>
<td>14</td>
<td>September 30, 2021</td>
<td>November 12, 2026</td>
<td>5 years</td>
</tr>
<tr>
<td>13</td>
<td>September 24, 2020</td>
<td>November 13, 2025</td>
<td>5 years</td>
</tr>
<tr>
<td>12</td>
<td>October 3, 2019</td>
<td>November 21, 2024</td>
<td>5 years</td>
</tr>
<tr>
<td>11</td>
<td>October 18, 2018</td>
<td>November 9, 2023</td>
<td>5 years</td>
</tr>
<tr>
<td>10</td>
<td>October 5, 2017</td>
<td>November 10, 2022</td>
<td>5 years</td>
</tr>
</tbody>
</table>
<p>Source: <a href="https://www.postgresql.org/support/versioning/" target="_blank" rel="noopener">Versioning Policy</a></p>
<h2 id="further-sources">Further sources</h2>
<ul>
<li><a href="https://mariadb.com/docs/release-notes/community-server/10.6/what-is-mariadb-106" target="_blank" rel="noopener">MariaDB 10.6 Changes &amp; Improvements</a><br />
<em>MariaDB 10.6 is a long-term maintenance stable version. The first stable release was in July 2021, and it will be maintained until July 2026.</em></li>
<li><a href="https://mariadb.com/docs/release-notes/community-server/10.11/what-is-mariadb-1011" target="_blank" rel="noopener">MariaDB 10.11 Changes &amp; Improvements</a><br />
<em>MariaDB 10.11 is a long-term maintenance release series, maintained until February 2028.</em></li>
<li><a href="https://mariadb.com/docs/release-notes/community-server/11.4/what-is-mariadb-114" target="_blank" rel="noopener">MariaDB 11.4 Changes &amp; Improvements</a><br />
<em>MariaDB 11.4 is a current long-term series, maintained until May 2029.</em></li>
<li><a href="https://mariadb.com/docs/release-notes/community-server/11.8/what-is-mariadb-118" target="_blank" rel="noopener">MariaDB 11.8 Changes &amp; Improvements</a><br />
<em>MariaDB 11.8 is a long-term release, maintained until June 2028.</em></li>
<li><a href="https://mariadb.com/docs/release-notes/community-server/12.3/mariadb-12.3-changes-and-improvements" target="_blank" rel="noopener">MariaDB 12.3 Changes &amp; Improvements</a><br />
<em>MariaDB 12.3 is a long term release, maintained until June 2029.</em></li>
</ul>
<p><a href="https://www.fromdual.com/blog/mariadb-shortens-maintenance-period-from-5-to-3-years/">MariaDB shortens maintenance period from 5 to 3 years</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Connector/C 3.4.9, and 3.3.19 now available</title>
        <link>https://mariadb.com/resources/blog/mariadb-connector-c-3-4-9-and-3-3-19-now-available/</link>
        <pubDate>Wed, 10 Jun 2026 17:42:44 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>MariaDB is pleased to announce the immediate availability of MariaDB Connector/C 3.4.9, and 3.3.19. Download Now Release Notes and Changelogs […]</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-connector-c-3-4-9-and-3-3-19-now-available/">MariaDB Connector/C 3.4.9, and 3.3.19 now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB is pleased to announce the immediate availability of MariaDB Connector/C 3.4.9, and 3.3.19. Download Now Notable items: Notable items: See the release notes and changelogs for more details and visit mariadb.com/downloads/connectors to download.</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-connector-c-3-4-9-and-3-3-19-now-available/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/mariadb-connector-c-3-4-9-and-3-3-19-now-available/">MariaDB Connector/C 3.4.9, and 3.3.19 now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Vector Support Upstreamed to Open-WebUI: Single-Database RAG Just Got Faster and Simpler</title>
        <link>https://shatteredsilicon.net/mariadb-vector-open-webui/</link>
        <pubDate>Wed, 10 Jun 2026 12:21:46 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://shatteredsilicon.net/wp-json/;%20rel=https://api.w.org/,%20https://shatteredsilicon.net/wp-json/wp/v2/categories/17;%20type=application/json,%20https://shatteredsilicon.net/category/databases-mysql-mariadb-postgresql/;%20rel=canonical">Databases (MySQL, MariaDB, PostgreSQL) Archives - Shattered Silicon</source>
        <description><![CDATA[<p>At Shattered Silicon, we live at the intersection of high-performance databases and production-grade AI. As an open-source contributor in the MariaDB ecosystem and a serious player bridging relational databases with modern AI workloads, we are excited to share our upstream contribution to one of the most popular self-hosted AI platforms: Open-WebUI. Why MariaDB Vector Changes […]<br />
The post MariaDB Vector Support Upstreamed to Open-WebUI: Single-Database RAG Just Got Faster and Simpler appeared first on Shattered Silicon.</p>
<p><a href="https://shatteredsilicon.net/mariadb-vector-open-webui/">MariaDB Vector Support Upstreamed to Open-WebUI: Single-Database RAG Just Got Faster and Simpler</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>At Shattered Silicon, we live at the intersection of high-performance databases and production-grade AI. As an open-source contributor in the MariaDB ecosystem and a serious player bridging relational databases with modern AI workloads, we are excited to share our upstream contribution to one of the most popular self-hosted AI platforms: Open-WebUI. Why MariaDB Vector Changes [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://shatteredsilicon.net/mariadb-vector-open-webui/">MariaDB Vector Support Upstreamed to Open-WebUI: Single-Database RAG Just Got Faster and Simpler</a> appeared first on <a rel="nofollow" href="https://shatteredsilicon.net">Shattered Silicon</a>.</p>
<p><a href="https://shatteredsilicon.net/mariadb-vector-open-webui/">MariaDB Vector Support Upstreamed to Open-WebUI: Single-Database RAG Just Got Faster and Simpler</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Server 12.3, 11.8, 11.4, 10.11, 10.6 – May 2026’s releases: thank you for your contributions</title>
        <link>https://mariadb.org/mariadb-server-12-3-11-8-11-4-10-11-10-6-may-2026s-releases-thank-you-for-your-contributions/</link>
        <pubDate>Wed, 10 Jun 2026 11:38:37 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>On May… we have released an update of our 5 current LTS releases:<br />
These new releases contain a large amount of external contributions. The number of contributors is constantly growing, which is great! …<br />
Continue reading "MariaDB Server 12.3, 11.8, 11.4, 10.11, 10.6 – May 2026’s releases: thank you for your contributions"<br />
The post MariaDB Server 12.3, 11.8, 11.4, 10.11, 10.6 – May 2026’s releases: thank you for your contributions appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/mariadb-server-12-3-11-8-11-4-10-11-10-6-may-2026s-releases-thank-you-for-your-contributions/">MariaDB Server 12.3, 11.8, 11.4, 10.11, 10.6 – May 2026’s releases: thank you for your contributions</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>On May&#8230; we have released an update of our 5 current LTS releases:<br />
These new releases contain a large amount of external contributions. The number of contributors is constantly growing, which is great! &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/mariadb-server-12-3-11-8-11-4-10-11-10-6-may-2026s-releases-thank-you-for-your-contributions/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;MariaDB Server 12.3, 11.8, 11.4, 10.11, 10.6 – May 2026’s releases: thank you for your contributions&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/mariadb-server-12-3-11-8-11-4-10-11-10-6-may-2026s-releases-thank-you-for-your-contributions/">MariaDB Server 12.3, 11.8, 11.4, 10.11, 10.6 – May 2026’s releases: thank you for your contributions</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/mariadb-server-12-3-11-8-11-4-10-11-10-6-may-2026s-releases-thank-you-for-your-contributions/">MariaDB Server 12.3, 11.8, 11.4, 10.11, 10.6 – May 2026’s releases: thank you for your contributions</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>File and post data confusion in PHP</title>
        <link>https://www.sjoerdlangkemper.nl/2026/06/10/files-post-confusion-in-laminas/</link>
        <pubDate>Wed, 10 Jun 2026 05:00:00 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.sjoerdlangkemper.nl/">Sjoerd Langkemper</source>
        <description><![CDATA[<p>PHP has several superglobal variables which contain values from the request or the environment. These differ in whether they contain trustworthy data or not:</p>
<p><a href="https://www.sjoerdlangkemper.nl/2026/06/10/files-post-confusion-in-laminas/">File and post data confusion in PHP</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>PHP has several superglobal variables which contain values from the request or the environment. These differ in whether they contain trustworthy data or not:</p>
<p><a href="https://www.sjoerdlangkemper.nl/2026/06/10/files-post-confusion-in-laminas/">File and post data confusion in PHP</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Node.js Connector 3.5.3 and 3.4.6 now available</title>
        <link>https://mariadb.com/resources/blog/mariadb-node-js-connector-3-5-3-and-3-4-6-now-available/</link>
        <pubDate>Tue, 09 Jun 2026 19:46:19 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>MariaDB is pleased to announce the immediate availability of the MariaDB Connector/Node.js 3.5.3 and 3.4.6 GA releases. Download Now Release […]</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-node-js-connector-3-5-3-and-3-4-6-now-available/">MariaDB Node.js Connector 3.5.3 and 3.4.6 now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>MariaDB is pleased to announce the immediate availability of the MariaDB Connector/Node.js 3.5.3 and 3.4.6 GA releases. Download Now MariaDB Connector/Node.js 3.5.3 is a Stable (GA) release. Notable changes in this release include: MariaDB Connector/Node.js 3.4.6 is a Stable (GA) release. Notable changes in this release include: See…</p>
<p><a href="https://mariadb.com/resources/blog/mariadb-node-js-connector-3-5-3-and-3-4-6-now-available/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/mariadb-node-js-connector-3-5-3-and-3-4-6-now-available/">MariaDB Node.js Connector 3.5.3 and 3.4.6 now available</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Comprehensive Self-Service Backups for Continuous Data Protection in MariaDB Cloud</title>
        <link>https://mariadb.com/resources/blog/comprehensive-self-service-backups-for-continuous-data-protection-in-mariadb-cloud/</link>
        <pubDate>Tue, 09 Jun 2026 18:57:49 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.com/">MariaDB</source>
        <description><![CDATA[<p>The MariaDB Cloud Backup Service provides organizations with a fully managed service for continuous data protection, mitigating risks from hardware […]</p>
<p><a href="https://mariadb.com/resources/blog/comprehensive-self-service-backups-for-continuous-data-protection-in-mariadb-cloud/">Comprehensive Self-Service Backups for Continuous Data Protection in MariaDB Cloud</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>The MariaDB Cloud Backup Service provides organizations with a fully managed service for continuous data protection, mitigating risks from hardware failure, zonal disruptions, data corruption, and cyberattacks. By offering a comprehensive API and intuitive interface, this service allows companies to automate recovery strategies tailored to specific compliance and business continuity requirements.</p>
<p><a href="https://mariadb.com/resources/blog/comprehensive-self-service-backups-for-continuous-data-protection-in-mariadb-cloud/" rel="nofollow">Source</a></p>
<p><a href="https://mariadb.com/resources/blog/comprehensive-self-service-backups-for-continuous-data-protection-in-mariadb-cloud/">Comprehensive Self-Service Backups for Continuous Data Protection in MariaDB Cloud</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>DuckDB Storage Engine for MariaDB. When the Sea Lion Learns to Quack.</title>
        <link>https://mariadb.org/duckdb-storage-engine-for-mariadb-when-the-sea-lion-learns-to-quack/</link>
        <pubDate>Tue, 09 Jun 2026 16:30:22 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>An early look at the DuckDB storage engine for MariaDB — columnar, vectorized analytics that live right next to your transactional tables.<br />
The problem<br />
MariaDB’s InnoDB is excellent at what it was built for: transactions. …<br />
Continue reading "DuckDB Storage Engine for MariaDB. When the Sea Lion Learns to Quack."<br />
The post DuckDB Storage Engine for MariaDB. When the Sea Lion Learns to Quack. appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/duckdb-storage-engine-for-mariadb-when-the-sea-lion-learns-to-quack/">DuckDB Storage Engine for MariaDB. When the Sea Lion Learns to Quack.</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>An early look at the DuckDB storage engine for MariaDB &#8212; columnar, vectorized analytics that live right next to your transactional tables.<br />
The problem<a id="the-problem"></a><br />
MariaDB&#8217;s InnoDB is excellent at what it was built for: transactions. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/duckdb-storage-engine-for-mariadb-when-the-sea-lion-learns-to-quack/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;DuckDB Storage Engine for MariaDB. When the Sea Lion Learns to Quack.&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/duckdb-storage-engine-for-mariadb-when-the-sea-lion-learns-to-quack/">DuckDB Storage Engine for MariaDB. When the Sea Lion Learns to Quack.</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/duckdb-storage-engine-for-mariadb-when-the-sea-lion-learns-to-quack/">DuckDB Storage Engine for MariaDB. When the Sea Lion Learns to Quack.</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Managing ClickHouse Resources in Multi-Tenant  Environments</title>
        <link>https://severalnines.com/blog/managing-clickhouse-resources-in-multi-tenant-environments/</link>
        <pubDate>Tue, 09 Jun 2026 11:20:22 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://severalnines.com/">Severalnines</source>
        <description><![CDATA[<p>When people first deploy ClickHouse, their initial reaction is often surprise. Queries that used to take minutes now finish in seconds. Dashboards feel instant even when reading billions of rows. To see this in action, here is a simple aggregation query running against a 200 million row events table: ClickHouse delivers exceptional speed, scanning 200 […]<br />
The post Managing ClickHouse Resources in Multi-Tenant Environments appeared first on Severalnines.</p>
<p><a href="https://severalnines.com/blog/managing-clickhouse-resources-in-multi-tenant-environments/">Managing ClickHouse Resources in Multi-Tenant  Environments</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>When people first deploy ClickHouse, their initial reaction is often surprise. Queries that used to take minutes now finish in seconds. Dashboards feel instant even when reading billions of rows. </p>
<p>To see this in action, here is a simple aggregation query running against a 200 million row events table:</p>
<pre class="wp-block-code"><code>SELECT customer_id, count()
FROM my_db.events GROUP BY customer_id ORDER BY count() DESC;</code></pre>
<p>ClickHouse delivers exceptional speed, scanning 200 million rows in under a second on a 3-node cluster. This efficiency powers real-time analytics and observability platforms.</p>
<p>However, production environments are often multi-tenant, where dashboards, ETL pipelines, and background processes share CPU, memory, and disk resources. Without proper resource management, greedy workloads can saturate the system, causing performance degradation across all tasks.</p>
<p>This post explores operational strategies for managing ClickHouse in shared environments. Using a live 3-node replicated cluster with 200 million rows, we demonstrate how to identify contention, implement workload scheduling, and validate system stability.</p>
<h2 class="wp-block-heading" id="h-understanding-resource-contention-in-clickhouse">Understanding Resource Contention in ClickHouse</h2>
<p>ClickHouse is built for analytical processing. It scans large datasets fast by spreading work across many CPU threads at the same time. That design is what makes it so quick. But it also means that when multiple workloads run together, they start competing for the same resources at the same time.</p>
<p>This is different from databases like MySQL or PostgreSQL. In those systems, contention usually shows up as lock waits or transaction conflicts. In ClickHouse, the problem is almost always infrastructure saturation.</p>
<p>Take this query running against our 200 million row events table:</p>
<pre class="wp-block-code"><code>SELECT customer_id, count()
FROM my_db.events GROUP BY customer_id ORDER BY count() DESC;</code></pre>
<p>This query looks simple but it scans all 200 million rows, builds aggregation buffers in memory, uses multiple CPU threads in parallel, and reads a significant amount of data from disk. Run one and the cluster handles it fine. Run several at the same time and things start to break down. You can verify this directly by checking the query log:</p>
<pre class="wp-block-code"><code>SELECT query_duration_ms, read_rows, read_bytes, memory_usage
FROM system.query_log
WHERE type = 'QueryFinish' AND query LIKE '%customer_id%'
ORDER BY event_time DESC LIMIT 5;</code></pre>
<p>This gets even more complicated in multi-tenant environments. A tenant can be a different team, a different application, or a different customer all sharing the same cluster at the same time. The challenges are real. One heavy query slows down everyone else. </p>
<p>Without proper row policies data can leak between tenants. Without resource controls one tenant can consume everything and leave nothing for others. And without careful schema design, performance problems become very hard to fix later. These are not just performance problems. In multi-tenant environments they become operational risks.</p>
<p>When contention builds up, operators start noticing these symptoms: CPU stays near 100% even between queries, dashboard responses get slower, replication starts falling behind, merge queues keep growing, insert throughput drops, and network pressure is also real. In our 3 node setup every insert gets replicated to two other nodes at the same time. </p>
<p>During heavy inserts, replication traffic and query traffic compete for the same network interface and replication lag starts climbing:</p>
<pre class="wp-block-code"><code>SELECT replica_name, absolute_delay, queue_size, inserts_in_queue
FROM system.replicas
ORDER BY absolute_delay DESC;</code></pre>
<p>ClickHouse is not broken when this happens. It is doing exactly what it was designed to do, which is use every available resource to finish analytical work as fast as possible. The job of the operator is to make sure no single workload takes more than its fair share.</p>
<p><strong>That is what the rest of this article is about.</strong></p>
<h3 class="wp-block-heading" id="h-cpu-contention-and-thread-management">CPU Contention and Thread Management</h3>
<p>In shared ClickHouse environments, CPU contention is frequent because the system defaults to using maximum threads for speed. While effective for single queries, concurrent workloads compete for threads, overwhelming the CPU.</p>
<p>A common way to control this is with the <code>max_threads</code> setting: <code>SET max_threads = 4;</code></p>
<p>The first reaction most people have is, &#8220;Why would I want to make my queries slower?&#8221; The honest answer is that fewer threads does not always mean slower. Sometimes it means faster.</p>
<p>We tested this directly on our 3 node cluster with 200 million rows. We ran the same query under different conditions and checked the query log:</p>
<pre class="wp-block-code"><code>SELECT query_duration_ms, read_rows, Settings&#091;'max_threads'] AS max_threads 
FROM system.query_log
WHERE type = 'QueryFinish' AND query LIKE '%customer_id%' ORDER BY event_time DESC LIMIT 4;</code></pre>
<p>In a shared cluster the benefit becomes even more obvious. When 10 analysts run queries at the same time on a 32 core server and each query tries to use 16 threads, that is 160 threads competing for 32 cores. The CPU scheduler gets overwhelmed and everything slows down together. By giving each query fewer threads the cluster stays stable and responsive for everyone.</p>
<p>Think of it this way. A single lane highway moves fast until everyone tries to use it at once. Splitting into more lanes and slowing everyone down slightly keeps traffic moving for all users.</p>
<p><strong>When lowering <code>max_threads</code> makes sense:</strong></p>
<ul class="wp-block-list">
<li>A shared cluster where many users run queries at the same time</li>
<li>Dashboard workloads that need consistent low latency</li>
<li>Environments where insert pipelines and merges need to keep running alongside analytical queries</li>
</ul>
<p><strong>When raising <code>max_threads</code> makes sense:</strong></p>
<ul class="wp-block-list">
<li>A dedicated batch environment running a small number of heavy jobs</li>
<li>Overnight ETL workloads where the cluster is mostly idle</li>
<li>Single user environments where there is no competition for resources</li>
</ul>
<p>The most important thing to understand is that more threads is not always better. The right value always depends on your hardware, your data, and how many workloads are sharing the cluster at the same time.</p>
<h3 class="wp-block-heading" id="h-memory-management-and-query-stability">Memory Management and Query Stability</h3>
<p>Memory is the next resource that gets squeezed in a shared ClickHouse environment. Analytical queries are hungry for memory. Operations like GROUP BY, JOIN, sorting, DISTINCT, and distributed aggregations all need to build large temporary buffers while they run.</p>
<p>The setting that controls this is <code>SET max_memory_usage = '1G';</code></p>
<p>This limits how much memory a single query can use. Most people assume that giving queries more memory is always better because they finish faster. In practice that thinking is one of the fastest ways to destabilize a shared cluster.</p>
<p>Our 3 node cluster is a good real world example of this. Each node has 4GB of total RAM with no swap configured. Here is the actual memory picture on each node:</p>
<pre class="wp-block-code"><code>               total        used        free      
available
Mem:           4.0Gi       1.7Gi       2.1Gi       
2.3Gi
Swap:             0B          0B          0B</code></pre>
<p>ClickHouse is already consuming around 415MB just to keep the server running. That leaves roughly 2.3GB actually available for queries, merges, replication, and the operating system to share.</p>
<p>The default <code>max_memory_usage</code> is set to 0 which means unlimited. On a node with no swap that is dangerous. If a query tries to allocate more memory than the node has available, the operating system will immediately kill the ClickHouse process. There is no swap to fall back on. The process just dies. You can verify your current memory usage and limit with these queries:</p>
<pre class="wp-block-code"><code>SELECT metric, value FROM system.metrics WHERE metric LIKE '%Memory%';
SELECT name, value FROM system.settings WHERE name = 'max_memory_usage';</code></pre>
<p>On our cluster the result looks like this:</p>
<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="694" height="120" src="https://severalnines.com/wp-content/uploads/2026/05/clickhouse-system-metrics-memory-tracking.png" alt="ClickHouse system metrics output (likely from system.metrics) detailing active memory tracking counters, including total MemoryTracking at ~389.14 million bytes and serialization cache sizes." class="wp-image-43522" /></figure>
<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="557" height="57" src="https://severalnines.com/wp-content/uploads/2026/05/clickhouse-settings-max-memory-usage.png" alt="Query output showing the max_memory_usage setting or profile parameter value, currently set to 0 (typically indicating unlimited or unrestricted memory for the context)." class="wp-image-43523" /></figure>
<p>The fix is a per query limit in the user config and a server wide cap in <code>/etc/clickhouse-server/config.d/memory.xml</code>. For our environment we set <code>max_memory_usage</code> to 1GB per query and <code>max_server_memory_usage</code> to 3GB total. This leaves 1GB free for the OS, Keeper, and background processes.</p>
<p>When the limit is hit users will see <code>MEMORY_LIMIT_EXCEEDED</code>. That error is actually a good sign. It means the limit is working and protecting the node from going down entirely.</p>
<p>But setting limits too low creates the opposite problem. Some workloads genuinely need large buffers. If limits are too tight legitimate queries start failing.</p>
<p><strong>When lowering <code>max_memory_usage</code> makes sense:</strong></p>
<ul class="wp-block-list">
<li>A shared cluster with many concurrent users</li>
<li>Nodes with limited RAM and no swap like our environment</li>
<li>Environments prone to sudden traffic spikes</li>
</ul>
<p><strong>When raising <code>max_memory_usage</code> makes sense:</strong></p>
<ul class="wp-block-list">
<li>Isolated reporting workloads running on a schedule</li>
<li>Heavy ETL jobs running during off peak hours</li>
<li>Dedicated nodes with higher memory capacity</li>
</ul>
<p>On our 4GB nodes with no swap, keeping memory limits tight is not optional; it is what keeps the cluster alive.</p>
<h3 class="wp-block-heading" id="h-disk-i-o-and-merge-pressure">Disk I/O and Merge Pressure</h3>
<p>Disk behavior in ClickHouse is very different from most traditional databases because of how the MergeTree engine works. Every insert gets written as a new immutable part on disk. A background process continuously merges these small parts into larger ones to keep storage efficient and queries fast. Without merges, parts accumulate, queries slow down, and storage becomes fragmented.</p>
<p>The most common way operators create merge problems without realizing it is by inserting data in very small batches. We simulated this on our cluster by running 1000 single row inserts in a loop. The parts count jumped significantly with each insert. You can see this directly by checking parts before and after:</p>
<pre class="wp-block-code"><code>SELECT database, table, count() AS parts_count, sum(rows) AS total_rows
FROM system.parts
WHERE active = 1 AND database = 'my_db'
GROUP BY database, table;</code></pre>
<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="645" height="90" src="https://severalnines.com/wp-content/uploads/2026/05/clickhouse-table-parts-count-total-rows.png" alt="ClickHouse query result tracking table health metrics for my_db.events, indicating a parts_count of 71 across a massive dataset of 200 million total rows." class="wp-image-43524" /></figure>
<p>Each tiny insert creates a new part on disk. This is what people call a merge explosion. The merge queue builds up faster than ClickHouse can clear it, disk I/O gets saturated from background merges competing with foreground queries, replication falls behind, and query performance drops because ClickHouse has to scan many more physical files.</p>
<p>The fix is simple. Insert data in large batches instead of small ones. Instead of 1 row at a time, insert at least 10,000 rows per batch. When we loaded 200 million rows in large batches the part count stayed manageable throughout.</p>
<p>You can monitor merge activity at any time with:</p>
<pre class="wp-block-code"><code>SELECT database, table, elapsed, progress, num_parts
FROM system.merges
ORDER BY elapsed DESC;</code></pre>
<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="678" height="59" src="https://severalnines.com/wp-content/uploads/2026/05/clickhouse-active-merges-in-progress.png" alt="Monitoring output from system.merges showing an active background data part merge operation (merges_in_progress: 1) currently running on the my_db.events MergeTree table." class="wp-image-43525" /></figure>
<p>Operators can also tune background merge concurrency with <code>background_pool_size</code>. Higher values help clear backlogs faster but on our 4GB nodes with no swap, more merge threads means more memory and disk I/O competing with foreground queries at the same time.</p>
<p><strong>When increasing <code>background_pool_size</code> makes sense:</strong></p>
<ul class="wp-block-list">
<li>Merge queues are growing consistently and not clearing</li>
<li>Disks have spare I/O capacity</li>
<li>Nodes have enough RAM to handle additional merge threads</li>
</ul>
<p><strong>When keeping <code>background_pool_size</code> lower makes sense:</strong></p>
<ul class="wp-block-list">
<li>Disks are already saturated</li>
<li>Nodes have limited RAM like our 4GB environment</li>
<li>Query latency is more important than insert throughput</li>
</ul>
<p>Higher values do not automatically mean better performance. On constrained hardware like ours, keeping merge concurrency modest is what keeps queries responsive while background work continues steadily.</p>
<h2 class="wp-block-heading" id="h-workload-scheduling-and-prioritization">Workload Scheduling and Prioritization</h2>
<p>Even with thread and memory limits in place, a shared cluster still struggles when different workload types compete for the same resources at the same time. Dashboard queries need millisecond responses. ETL jobs can take minutes. Without scheduling, both are treated equally and dashboards suffer. ClickHouse solves this with a workload scheduling system that controls how disk IO, CPU threads, and query slots are shared between workloads.</p>
<pre class="wp-block-code"><code>root
├── realtime
│   ├── dashboards
│   └── api_queries
├── batch
│   ├── etl
│   └── exports
└── background
   ├── merges
   └── replication</code></pre>
<h3 class="wp-block-heading" id="h-scheduling-hierarchy-and-resource-definitions">Scheduling Hierarchy and Resource Definitions</h3>
<p>The foundation of workload scheduling in ClickHouse is the concept of a resource. A resource represents a shared physical asset that multiple workloads compete for. ClickHouse supports three types: disk IO, CPU threads, and query slots.</p>
<p>Start by defining what resources exist on your cluster:</p>
<pre class="wp-block-code"><code>CREATE RESOURCE disk_read (READ ANY DISK);
CREATE RESOURCE disk_write (WRITE ANY DISK);
CREATE RESOURCE cpu (MASTER THREAD, WORKER THREAD);
CREATE RESOURCE query (QUERY);</code></pre>
<p>The READ and WRITE disk definitions are important. They let you control read and write IO separately. In a shared cluster, dashboard read traffic and insert write traffic compete for the same disk bandwidth. Separating them gives you independent control over each.</p>
<p>Once resources are defined, build a workload hierarchy on top of them. The root workload sits at the top and distributes resources down to everything below it:</p>
<pre class="wp-block-code"><code>CREATE WORKLOAD root
SETTINGS
    max_concurrent_threads = 50,
    max_concurrent_queries = 50,
    max_queries_per_second = 20;

CREATE WORKLOAD realtime IN root SETTINGS priority = 1;
CREATE WORKLOAD batch IN root SETTINGS priority = 10;
CREATE WORKLOAD background IN root SETTINGS priority = 100;</code></pre>
<p>You can also apply bandwidth limits per resource directly on a workload. This caps read bandwidth at 100 MB/s and write bandwidth at 50 MB/s:</p>
<pre class="wp-block-code"><code>CREATE WORKLOAD all IN root
SETTINGS
    max_bytes_per_second = 104857600 FOR disk_read,
    max_bytes_per_second = 52428800 FOR disk_write;</code></pre>
<p>The root workload manages resource distribution across the hierarchy. High-priority &#8220;realtime&#8221; traffic like dashboards requires fast, consistent responses. The &#8220;batch&#8221; branch handles latency-tolerant tasks such as ETL pipelines, while &#8220;background&#8221; operations like replication run steadily without impacting foreground performance.</p>
<p>You can verify which workloads exist on your cluster:</p>
<pre class="wp-block-code"><code>SELECT * FROM system.workloads;
SELECT * FROM system.resources;</code></pre>
<p>In ClickHouse lower priority numbers mean higher priority. Realtime gets served first, then batch, then background. Assign users to workloads by creating dedicated users:</p>
<pre class="wp-block-code"><code>CREATE USER dashboard_user IDENTIFIED BY 'dashboard123'
SETTINGS workload = 'realtime';

CREATE USER analyst IDENTIFIED BY 'analyst123'
SETTINGS workload = 'batch';</code></pre>
<p>You can also assign workloads through the user config file for existing users. Add the workload setting to <code>/etc/clickhouse-server/users.d/default-password.xml</code></p>
<p><strong>N.B. A common mistake is giving all workloads equal priority.</strong> When a heavy batch job and a lightweight dashboard query compete equally, the batch job almost always wins because it consumes more resources per query. Proper prioritization flips this; the batch job still runs, it just waits its turn when realtime traffic needs resources first.</p>
<h3 class="wp-block-heading" id="h-memory-overcommit-and-query-queueing">Memory Overcommit and Query Queueing</h3>
<p>Memory overcommit controls what happens when total memory demand from all running queries exceeds what is physically available. On our 4GB nodes with no swap this is critical. Without overcommit controls, if multiple queries simultaneously try to allocate more memory than is available the OS kills the ClickHouse process immediately.</p>
<p>ClickHouse handles this by waiting briefly for other queries to release memory before terminating the most overcommitted query first. This is much safer than having no limit at all:</p>
<pre class="wp-block-code"><code>SET max_memory_usage = 1073741824;
SET memory_usage_overcommit_max_wait_microseconds = 5000000;</code></pre>
<p>Instead of the entire node going down, only the most memory hungry query gets cancelled. Everything else keeps running. On our 4GB nodes this is the difference between a graceful query failure and a full cluster crash.</p>
<p>Query queueing handles overload at the concurrency level. When more queries arrive than the cluster can handle they queue up instead of all running at once. You can set this at the server level <code>in /etc/clickhouse-server/config.d/cluster.xml</code>. Or via workload scheduling:</p>
<pre class="wp-block-code"><code>CREATE OR REPLACE WORKLOAD root SETTINGS
    max_concurrent_threads = 50,
    max_concurrent_queries = 50,
    max_queries_per_second = 20;</code></pre>
<p>On our 4GB nodes, 50 concurrent queries is a safe ceiling. New queries that arrive when the limit is hit wait for a slot instead of crashing the node. Monitor active and queued queries at any time:</p>
<pre class="wp-block-code"><code>SELECT query, elapsed, memory_usage, read_rows
FROM system.processes
ORDER BY elapsed DESC;</code></pre>
<p>When lowering <code>max_concurrent_queries</code> makes sense:</p>
<ul class="wp-block-list">
<li>Nodes with limited RAM like our 4GB environment</li>
<li>Clusters with no swap configured</li>
<li>Environments where query stability matters more than raw throughput</li>
</ul>
<p>When raising <code>max_concurrent_queries</code> makes sense:</p>
<ul class="wp-block-list">
<li>Nodes with large amounts of RAM and fast disks</li>
<li>Clusters serving many lightweight queries simultaneously</li>
<li>Environments where queries are short and memory usage per query is low</li>
</ul>
<p>A cluster managing a queue is more often more stable than one where unlimited queries run simultaneously. On constrained hardware, queueing is not a limitation but what keeps the cluster alive under pressure. When workload scheduling makes the most difference:</p>
<ul class="wp-block-list">
<li>Customer facing dashboards sharing a cluster with internal ETL jobs</li>
<li>Clusters serving multiple teams with different SLA requirements</li>
<li>Environments where insert pipelines and analytical queries run simultaneously</li>
</ul>
<p><strong>N.B. The goal is not to make batch jobs slow.</strong> The goal is to make sure realtime workloads stay fast even when the cluster is under pressure.</p>
<h2 class="wp-block-heading" id="h-isolation-strategies-in-multi-tenant-environments">Isolation Strategies in Multi-Tenant Environments</h2>
<p>Everything we have covered so far assumes different workloads share the same cluster. That works well up to a point; but, some organizations eventually reach a scale where sharing creates too much risk. One bad query from one tenant can still affect everyone else no matter how carefully the limits are tuned — this is the noisy neighbor problem. The solution depends on how much isolation you actually need. There are three main ways organizations handle this depending on their scale and operational maturity.</p>
<h3 class="wp-block-heading" id="h-approach-1-shared-cluster-with-schema-level-isolation">Approach 1: Shared Cluster with Schema Level Isolation</h3>
<p>This is the most common starting point. All tenants share the same cluster and the same table. Isolation is handled through schema design and row policies.</p>
<p>The most important thing to get right is the schema. Including <code>tenant_id</code> in the sorting key makes a significant difference:</p>
<pre class="wp-block-code"><code>CREATE TABLE my_db.events ON CLUSTER my_cluster
(
    tenant_id       UInt32,
    event_date      Date,
    event_id        UInt64,
    customer_id     UInt32,
    event_type      LowCardinality(String),
    event_timestamp DateTime,
    metadata        String
)
ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/events', '{replica}')
PARTITION BY toYYYYMM(event_date)
ORDER BY (tenant_id, event_date, customer_id, event_id);</code></pre>
<p>With <code>tenant_id</code> first in the sort key, ClickHouse physically stores each tenant&#8217;s data together on disk. A query filtering by <code>tenant_id</code> only reads that tenant&#8217;s data and skips everything else.</p>
<p>For dashboard workloads, pre-aggregate data per tenant into materialized views instead of letting tenants query the raw table directly:</p>
<pre class="wp-block-code"><code>CREATE MATERIALIZED VIEW my_db.events_tenant1_mv
ENGINE = SummingMergeTree()
ORDER BY (event_date, customer_id)
AS SELECT
    event_date,
    customer_id,
    count() AS event_count
FROM my_db.events
WHERE tenant_id = 1
GROUP BY event_date, customer_id;</code></pre>
<p>This keeps tenant queries physically separated and pre-computed so one tenant&#8217;s heavy scan cannot slow down another&#8217;s dashboard.</p>
<p>Then enforce data isolation with restrictive row policies:</p>
<pre class="wp-block-code"><code>-- Grant access
GRANT SELECT ON my_db.events TO tenant1_user;
GRANT SELECT ON my_db.events TO tenant2_user;

-- Create restrictive row policies
CREATE ROW POLICY tenant1_policy ON my_db.events
AS RESTRICTIVE
FOR SELECT USING tenant_id = 1
TO tenant1_user;

CREATE ROW POLICY tenant2_policy ON my_db.events
AS RESTRICTIVE
FOR SELECT USING tenant_id = 2
TO tenant2_user;

-- Verify policies
SELECT short_name, select_filter, is_restrictive, apply_to_list
FROM system.row_policies
WHERE table = 'events';</code></pre>
<p>On our cluster with 200 million rows distributed across 5 tenants, each tenant user can only see their own 40 million rows and gets zero results when querying other tenant data.</p>
<h3 class="wp-block-heading" id="h-approach-2-database-level-isolation">Approach 2: Database Level Isolation</h3>
<p>A step up from row policies. Each tenant gets their own database but shares the same cluster infrastructure:</p>
<pre class="wp-block-code"><code>CREATE DATABASE tenant1_db ON CLUSTER my_cluster;
CREATE DATABASE tenant2_db ON CLUSTER my_cluster;
CREATE TABLE tenant1_db.events ON CLUSTER my_cluster
(
    event_date      Date,
    event_id        UInt64,
    customer_id     UInt32,
    event_type      LowCardinality(String),
    event_timestamp DateTime,
    metadata        String
)
ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/tenant1/events', '{replica}')
PARTITION BY toYYYYMM(event_date)
ORDER BY (event_date, customer_id, event_id);</code></pre>
<p>This gives cleaner separation and makes per tenant storage, backups, and access controls easier to manage. The tradeoff is more tables to maintain as tenant count grows.</p>
<h3 class="wp-block-heading" id="h-approach-3-cluster-level-isolation">Approach 3: Cluster Level Isolation</h3>
<p>The strongest form of isolation. Different workload types get entirely separate clusters:</p>
<figure class="wp-block-table">
<table class="has-fixed-layout">
<tbody>
<tr>
<td>Ingestion cluster</td>
<td>handles high throughput data loading</td>
</tr>
<tr>
<td>Dashboard cluster</td>
<td>optimized for low latency concurrent reads</td>
</tr>
<tr>
<td>ETL cluster</td>
<td>reserved for heavy transformation jobs</td>
</tr>
</tbody>
</table>
</figure>
<p>This eliminates the noisy neighbor problem completely. The tradeoff is higher infrastructure cost and more operational complexity.</p>
<h3 class="wp-block-heading" id="h-using-settings-to-prioritize-workloads">Using Settings to Prioritize Workloads</h3>
<p>Beyond isolation approach, individual query settings give operators per query control over resource consumption per tenant without changing global settings:</p>
<pre class="wp-block-code"><code>-- Heavy report query - limit resources
SELECT customer_id, count()
FROM my_db.events
WHERE tenant_id = 1
GROUP BY customer_id
SETTINGS max_threads = 4, max_memory_usage = 1073741824, workload = 'batch';

-- Dashboard query - allow more resources
SELECT count()
FROM my_db.events
WHERE tenant_id = 1
AND event_date = today()
SETTINGS max_threads = 8, workload = 'realtime';</code></pre>
<p>A heavy analytical report from one tenant can be throttled while their dashboard queries remain fast.</p>
<h3 class="wp-block-heading" id="h-choosing-the-right-approach">Choosing the Right Approach</h3>
<figure class="wp-block-table">
<table class="has-fixed-layout">
<tbody>
<tr>
<td>Approach</td>
<td>Best for</td>
<td>Tradeoff</td>
</tr>
<tr>
<td>Shared cluster with row policies</td>
<td>Small tenant count, limited hardware</td>
<td>Noisy neighbor risk remains</td>
</tr>
<tr>
<td>Separate databases per tenant</td>
<td>Medium tenant count, cleaner isolation</td>
<td>More tables to manage</td>
</tr>
<tr>
<td>Dedicated clusters</td>
<td>Large scale, strict SLAs</td>
<td>Higher cost and complexity</td>
</tr>
</tbody>
</table>
</figure>
<p>Most organizations start with Approach 1, move to Approach 2 as tenant count grows, and only adopt Approach 3 when SLA requirements become strict enough to justify the cost. For our 3 node cluster with 4GB RAM per node, Approach 1 with row policies, materialized views, and workload assignment is the most practical starting point.</p>
<h2 class="wp-block-heading" id="h-operational-best-practices">Operational Best Practices</h2>
<p>Resource issues in ClickHouse rarely announce themselves immediately. A cluster can look perfectly healthy from the outside while merge queues, memory pressure, or replication lag quietly build up internally. By the time users start complaining the problem has usually been growing for a while. This is why operational visibility and proper configuration are just as important as the tuning settings we covered in earlier sections.</p>
<h3 class="wp-block-heading" id="h-setting-up-workload-classes-and-assigning-quotas">Setting Up Workload Classes and Assigning Quotas</h3>
<pre class="wp-block-code"><code>CREATE WORKLOAD realtime IN root SETTINGS priority = 1;
CREATE WORKLOAD batch IN root SETTINGS priority = 10;
CREATE WORKLOAD background IN root SETTINGS priority = 100;</code></pre>
<p>Then assign users to workloads:</p>
<pre class="wp-block-code"><code>CREATE USER dashboard_user IDENTIFIED BY 'dashboard123'
SETTINGS workload = 'realtime';

CREATE USER analyst IDENTIFIED BY 'analyst123'
SETTINGS workload = 'batch';</code></pre>
<p>Quotas add a second layer of control on top of workload priority. Even if a user has high priority, quotas prevent them from consuming unlimited resources over time:</p>
<pre class="wp-block-code"><code>-- Tenant users: 1000 queries per hour, max 10 billion rows read
CREATE QUOTA tenant_quota
    FOR INTERVAL 1 HOUR
    MAX queries = 1000,
    MAX read_rows = 10000000000
    TO tenant1_user, tenant2_user;

-- Analysts: 100 queries per hour, max 5 billion rows read
CREATE QUOTA analyst_quota
    FOR INTERVAL 1 HOUR
    MAX queries = 100,
    MAX read_rows = 5000000000
    TO analyst;</code></pre>
<h2 class="wp-block-heading" id="h-monitoring-resource-usage">Monitoring Resource Usage</h2>
<p><a href="https://severalnines.com/blog/clickhouse-monitoring-and-observability-decision-points/">Good monitoring practices</a> catch problems before they become visible to users. On our 3 node cluster with 200 million rows we focus on five key signals.</p>
<p><strong>Query latency</strong> is usually the first visible sign of contention:</p>
<pre class="wp-block-code"><code>SELECT query_duration_ms, read_rows, memory_usage, query
FROM system.query_log
WHERE type = 'QueryFinish'
AND event_time &gt;= now() - INTERVAL 10 MINUTE
ORDER BY query_duration_ms DESC
LIMIT 10;</code></pre>
<p><strong>Replication lag</strong> signals network pressure or overloaded replicas:</p>
<pre class="wp-block-code"><code>SELECT replica_name, absolute_delay, queue_size, inserts_in_queue
FROM system.replicas
ORDER BY absolute_delay DESC;</code></pre>
<p><strong>Parts growth</strong> indicates merge pressure from small inserts:</p>
<pre class="wp-block-code"><code>SELECT database, table, count() AS parts_count, sum(rows) AS total_rows
FROM system.parts
WHERE active = 1 AND database = 'my_db'
GROUP BY database, table
ORDER BY parts_count DESC;</code></pre>
<p>For a full cluster health snapshot combine all signals into one query:</p>
<pre class="wp-block-code"><code>SELECT
    (SELECT count() FROM system.processes) AS active_queries,
    (SELECT count() FROM system.merges) AS active_merges,
    (SELECT max(absolute_delay) FROM system.replicas) AS max_replication_delay,
    (SELECT max(queue_size) FROM system.replicas) AS max_replication_queue,
    (SELECT count() FROM system.parts WHERE active = 1 AND database = 'my_db') AS parts_count,
    (SELECT value FROM system.metrics WHERE metric = 'MemoryTracking' LIMIT 1) AS memory_used_bytes;</code></pre>
<p>Run this regularly and you will catch problems before they reach users.</p>
<p>One important thing to keep in mind is that tuning ClickHouse rarely eliminates a bottleneck completely. It usually just moves it somewhere else. Increasing <code>background_pool_size</code> may clear the merge queue faster but adds more disk I/O pressure. Lowering <code>max_memory_usage</code> may stabilize the cluster but some queries will start failing. The system tables covered in this section are your best tool for observing exactly what changed after each adjustment.</p>
<p>The best way to understand ClickHouse resource management is not to read about it but to test it directly on a real cluster with real data and watch what happens.</p>
<h2 class="wp-block-heading" id="h-integrating-with-ops-tooling">Integrating with Ops Tooling</h2>
<p>Running ClickHouse in production is not just about tuning settings and writing good queries. At some point the cluster needs to integrate with the broader operational infrastructure that the rest of your organization already uses. Alerts need to fire before users notice problems. Capacity needs to grow before resource pressure becomes a crisis. And in organizations running multiple database technologies, policies need to be enforced consistently across all of them.</p>
<h3 class="wp-block-heading" id="h-alerts-for-resource-exhaustion">Alerts for Resource Exhaustion</h3>
<p>ClickHouse exposes metrics via its HTTP interface that can be scraped by Prometheus or any compatible monitoring system: <code>curl http://server1:8123/metrics</code></p>
<figure class="wp-block-table">
<table class="has-fixed-layout">
<tbody>
<tr>
<td>Metric</td>
<td>Warning</td>
<td>Critical</td>
</tr>
<tr>
<td>Memory usage</td>
<td>&gt; 2.5GB</td>
<td>&gt; 3GB</td>
</tr>
<tr>
<td>Replication delay</td>
<td>&gt; 30s</td>
<td>&gt; 300s</td>
</tr>
<tr>
<td>Active merges</td>
<td>&gt; 10</td>
<td>&gt; 20</td>
</tr>
<tr>
<td>Concurrent queries</td>
<td>&gt; 40</td>
<td>&gt; 50</td>
</tr>
<tr>
<td>Parts count</td>
<td>&gt; 500</td>
<td>&gt; 1000</td>
</tr>
</tbody>
</table><figcaption class="wp-element-caption"><strong>Recommended alert thresholds for our 4GB nodes</strong></figcaption></figure>
<h2 class="wp-block-heading" id="h-scaling-out-nodes-and-shards-when-resource-pressure-builds">Scaling Out Nodes and Shards When Resource Pressure Builds</h2>
<p>Our current setup is 1 shard with 3 replicas. When pressure builds consistently across all nodes it is a signal to grow. Scale up by adding more CPU or memory to existing nodes. Scale out by adding more shards to distribute data and query load across more hardware.</p>
<p>Signs it is time to scale out:</p>
<ul class="wp-block-list">
<li>CPU stays above 80% consistently,</li>
<li>memory errors appear regularly,</li>
<li>merge queues keep growing despite tuning,</li>
<li>and replication lag keeps climbing.</li>
</ul>
<h2 class="wp-block-heading" id="h-using-unified-management-to-enforce-policies-across-databases">Using Unified Management to Enforce Policies Across Databases</h2>
<p>Organizations running ClickHouse alongside MySQL or PostgreSQL face the challenge of managing resource policies, backups, and monitoring separately for each technology. Purpose built database management tools provide a unified management layer across heterogeneous database environments. From a single interface operators can monitor ClickHouse alongside other databases, enforce consistent backup policies, manage user access across multiple clusters, and get unified alerting across all database technologies. The goal is not to replace ClickHouse native tooling. It is to reduce operational overhead when running ClickHouse as part of a larger database fleet.</p>
<h2 class="wp-block-heading" id="h-conclusion">Conclusion</h2>
<p>ClickHouse is genuinely fast. But in shared environments, speed without governance becomes a liability. Throughout this article we ran real workloads against 200 million rows on constrained 4GB nodes to show exactly how contention happens and how to control it.<br />The key takeaways are simple. </p>
<p>Lower <code>max_threads</code> in shared clusters. Set <code>max_memory_usage</code> explicitly especially on nodes with no swap. Insert in large batches to avoid merge explosions. Assign workload classes so dashboards always get priority over batch jobs. Put your primary identifier column first in the sort key and enforce row policies per tenant.</p>
<p>Before going to production with a shared cluster run through this quick checklist:</p>
<p>Primary identifier column is first in the sort key<br />Row policies are set to <code>AS RESTRICTIVE</code><br /><code>max_memory_usage</code> and <code>max_server_memory_usage</code> are explicitly set<br />Workload hierarchy is defined with realtime, batch, and background<br />Quotas are assigned per user type<br />Inserts are batched at minimum 10,000 rows<br />Health snapshot query is running regularly</p>
<p>Good ClickHouse operations are not about maximizing every resource. They are about finding the right balance between throughput, latency, fairness, and stability for your specific workload.</p>
<p>The post <a href="https://severalnines.com/blog/managing-clickhouse-resources-in-multi-tenant-environments/">Managing ClickHouse Resources in Multi-Tenant  Environments</a> appeared first on <a href="https://severalnines.com">Severalnines</a>.</p>
<p><a href="https://severalnines.com/blog/managing-clickhouse-resources-in-multi-tenant-environments/">Managing ClickHouse Resources in Multi-Tenant  Environments</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Percona Operator for MySQL (PXC) 1.20.0: Automatic Storage Resizing, TLS Certificate Rotation, and ARM64 Support</title>
        <link>https://www.percona.com/blog/percona-operator-for-mysql-pxc-1-20-0-automatic-storage-resizing-tls-rotation-arm64/</link>
        <pubDate>Tue, 09 Jun 2026 10:25:46 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://www.percona.com/blog/">Blog - Percona</source>
        <description><![CDATA[<p>Percona Operator for MySQL PXC 1.20.0 is out today, and it addresses three long-requested operational headaches: storage that grows on its own before it fills up, TLS certificates that rotate without cluster downtime, and images that run natively on ARM64. Disk-full incidents on PXC clusters often arrive at 2 AM when monitoring alerts fire, and … Continued<br />
The post Percona Operator for MySQL (PXC) 1.20.0: Automatic Storage Resizing, TLS Certificate Rotation, and ARM64 Support appeared first on Percona.</p>
<p><a href="https://www.percona.com/blog/percona-operator-for-mysql-pxc-1-20-0-automatic-storage-resizing-tls-rotation-arm64/">Percona Operator for MySQL (PXC) 1.20.0: Automatic Storage Resizing, TLS Certificate Rotation, and ARM64 Support</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="aligncenter wp-image-49249 size-large" src="https://www.percona.com/wp-content/uploads/2026/06/Hero-1-1024x376.png" alt="" width="1024" height="376" /></p>
<p><span style="font-weight: 400">Percona Operator for MySQL PXC 1.20.0 is out today, and it addresses three long-requested operational headaches: storage that grows on its own before it fills up, TLS certificates that rotate without cluster downtime, and images that run natively on ARM64.</span></p>
<p><span style="font-weight: 400">Disk-full incidents on PXC clusters often arrive at 2 AM when monitoring alerts fire, and someone has to manually expand PVCs before writes grind to a halt. Certificate rotations have traditionally meant a carefully timed series of kubectl edits with real downtime risk. And ARM64 hardware has been increasingly common in dev clusters and cost-optimized cloud node pools, where x86-only images created extra friction. 1.20.0 addresses all three in a single release.</span></p>
<div data-line="17" data-line-type="change-addition" data-line-index="17,16">The operator is open source and runs on any CNCF-conformant Kubernetes distribution, including GKE, EKS, AKS, and OpenShift. <span data-diff-span="">It supports </span>Kubernetes 1.33 through 1.36 and PXC 8.4, 8.0, and 5.7.</div>
<p>&nbsp;</p>
<p><span style="font-weight: 400">In this post, you&#8217;ll learn about:</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">Automatic PVC storage resizing with configurable thresholds and a hard cap</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Zero-downtime TLS certificate rotation via a new Secret naming convention</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Native ARM64 support across all operator images</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">PITR validation that catches misconfigured targets before restores begin</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Configurable leader election for high-latency or unstable networks</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Other improvements in this release</span></li>
</ul>
<p>&nbsp;</p>
<h2><span style="font-weight: 400">Automatic Storage Resizing</span></h2>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-49251 size-large" src="https://www.percona.com/wp-content/uploads/2026/06/storage-resizing-1024x563.png" alt="" width="1024" height="563" /></p>
<p>&nbsp;</p>
<h3><span style="font-weight: 400">Why it matters</span></h3>
<p><span style="font-weight: 400">A full data volume is the most common cause of unplanned maintenance on a PXC cluster. Until now, avoiding it required external monitoring, manual </span><span style="color: #ff6600"><i><span style="font-weight: 400">kubectl patch pvc</span></i></span><span style="font-weight: 400"> steps, and waiting for the storage class to honor the resize. Even with good alerting, the operator itself had no mechanism to react: it could only expand PVCs when you changed the spec by hand.</span></p>
<p>1.20.0 introduces built-in storage autoscaling. The operator polls each PVC&#8217;s actual disk usage, and when usage crosses a configured threshold, it automatically expands the claim. You set the trigger percentage, the step size per resize event, and an optional upper bound. <span data-diff-span="">The operator handles everything else</span>.</p>
<p>&nbsp;</p>
<h3><span style="font-weight: 400">How it works</span></h3>
<p>The autoscaler runs inside the normal reconcile loop. It reads <em><span style="color: #ff6600">status.capacity.storage</span></em> from each PXC PVC, compares current usage against <em><span style="color: #ff6600">triggerThresholdPercent</span></em>, and issues a PVC resize when the threshold is crossed. <span data-diff-span="">It sets a </span><em><span style="color: #ff6600">percona.com/pvc-resize-in-progress</span></em> annotation on the CR while an expansion is active. This annotation blocks concurrent rolling restarts or upgrades from starting<span data-diff-span="">,</span> so <span data-diff-span="">nothing disrupts </span>the cluster mid-resize.</p>
<p>You can also set <em><span style="color: #ff6600">enableExternalAutoscaling: true</span></em><span style="color: #ff6600"> </span>if an external tool, such as KEDA, already manages PVC sizes for your cluster. When <span data-diff-span="">you enable external autoscaling</span>, the built-in loop skips its resize check entirely to avoid conflicts.</p>
<p>&nbsp;</p>
<h3><span style="font-weight: 400">Wiring it up</span></h3>
<p><span style="font-weight: 400">Add </span><span style="color: #ff6600"><i><span style="font-weight: 400">storageScaling</span></i></span><span style="font-weight: 400"> to your </span><span style="color: #ff6600"><i><span style="font-weight: 400">PerconaXtraDBCluster</span></i></span><span style="font-weight: 400"> spec:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">apiVersion: pxc.percona.com/v1
kind: PerconaXtraDBCluster
metadata:
  name: cluster1
spec:
  crVersion: 1.20.0
  storageScaling:
    enableVolumeScaling: true
    autoscaling:
      enabled: true
      triggerThresholdPercent: 80   # resize when a PVC is 80% full
      growthStep: 2Gi               # add 2Gi per resize event
      maxSize: 100Gi                # never grow beyond 100Gi per PVC
#     enableExternalAutoscaling: false</pre>
<p><span data-diff-span="">Any </span>PVC expansion <span data-diff-span="">requires <span style="color: #ff6600"><em>enableVolumeScaling: true</em></span></span>, whether the autoscaler or a manual spec change<span data-diff-span=""> triggers it</span>. Setting <span style="color: #ff6600"><em>autoscaling.enabled: true</em></span> enables the threshold-based path on top of that. Leave the <em><span style="color: #ff6600">autoscaling</span></em> block out if you only want to permit manual spec-driven resizes.</p>
<p>&nbsp;</p>
<h3><span style="font-weight: 400">Caveats</span></h3>
<p><span style="font-weight: 400">Storage expansion requires a StorageClass with </span><span style="color: #ff6600"><i><span style="font-weight: 400">allowVolumeExpansion: true</span></i><i><span style="font-weight: 400">.</span></i></span><span style="font-weight: 400"> Check before enabling:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">kubectl get storageclass 
  -o jsonpath='{range .items[*]}{.metadata.name}{"t"}{.allowVolumeExpansion}{"n"}{end}'</pre>
<p><span style="font-weight: 400">Autoscaling applies only to PXC data volumes. If your storage class or CSI driver handles expansion externally, use </span><span style="color: #ff6600"><i><span style="font-weight: 400">enableExternalAutoscaling: true</span></i></span><span style="font-weight: 400"> to prevent the two mechanisms from racing.</span></p>
<p>&nbsp;</p>
<h2><span style="font-weight: 400">Automated TLS Certificate Rotation</span></h2>
<h3><span style="font-weight: 400">Why it matters</span></h3>
<p><span style="font-weight: 400">Rotating TLS certificates on a live PXC cluster has always carried risk. The Galera protocol requires all nodes to trust each other&#8217;s CA simultaneously. Swap the CA on one node before the others accept it, and inter-node communication breaks. The safe approach requires a three-phase CA swap with rolling restarts between each phase: a process that is easy to get wrong under time pressure.</span></p>
<p><span style="font-weight: 400">1.20.0 formalizes this into a first-class operator workflow. Create a Secret named </span><span style="color: #ff6600"><i><span style="font-weight: 400">&lt;ssl-secret&gt;-new </span></i></span><span style="font-weight: 400">containing the replacement credentials, and the operator runs the full three-phase rotation automatically, pausing for rolling restarts between each step.</span></p>
<p>&nbsp;</p>
<h3><span style="font-weight: 400">How it works</span></h3>
<p>The rotation proceeds in three steps <span data-diff-span="">that </span>the operator<span data-diff-span=""> coordinates</span>:</p>
<ol>
<li style="font-weight: 400"><b>Combined CA phase</b><span style="font-weight: 400">. The old CA and new CA are merged into a single </span><span style="color: #ff6600"><i><span style="font-weight: 400">ca.crt</span></i></span><span style="font-weight: 400"> and pushed to all nodes. Every node now trusts both roots.</span></li>
<li style="font-weight: 400"><b>New leaf phase.</b><span style="font-weight: 400"> The new </span><span style="color: #ff6600"><i><span style="font-weight: 400">tls.crt</span></i></span><span style="font-weight: 400"> and</span><span style="color: #ff6600"><i><span style="font-weight: 400"> tls.key</span></i></span><span style="font-weight: 400"> are pushed node by node with a rolling restart. New leaf certs are signed by the new CA, and the combined CA means all nodes trust them.</span></li>
<li style="font-weight: 400"><b>New CA only phase.</b><span style="font-weight: 400"> The combined </span><span style="color: #ff6600"><i><span style="font-weight: 400">ca.crt</span></i></span><span style="font-weight: 400"> is replaced with the new CA only. The old root is removed. Another rolling restart completes the rotation.</span></li>
</ol>
<p><span style="font-weight: 400">When step 3 completes, the operator automatically deletes the </span><span style="color: #ff6600"><i><span style="font-weight: 400">-new</span></i></span><span style="font-weight: 400"> Secret. The cluster never loses TLS connectivity between nodes during the process.</span></p>
<p>&nbsp;</p>
<h3><span style="font-weight: 400">Wiring it up</span></h3>
<p><span style="font-weight: 400">Given a cluster named </span><span style="color: #ff6600"><i><span style="font-weight: 400">cluster1 </span></i></span><span style="font-weight: 400">using the default SSL Secret </span><span style="color: #ff6600"><i><span style="font-weight: 400">cluster1-ssl</span></i></span><span style="font-weight: 400">, create the replacement:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">kubectl create secret generic cluster1-ssl-new 
  --from-file=ca.crt=new-ca.crt 
  --from-file=tls.crt=new-server.crt 
  --from-file=tls.key=new-server.key</pre>
<p><span data-diff-span="">You do not need </span>to <span data-diff-span="">change </span>the <span style="color: #ff6600"><em>PerconaXtraDBCluster</em></span> CR. The operator detects the <em><span style="color: #ff6600">-new</span></em> Secret on the next reconcile and starts the rotation. No <span style="color: #ff6600"><em>kubectl patch</em></span> on the CR, no operator restart.</p>
<p>&nbsp;</p>
<h3><span style="font-weight: 400">Caveats</span></h3>
<p><span style="font-weight: 400">The operator does not yet surface rotation progress in</span><span style="color: #ff6600"><i><span style="font-weight: 400"> .status.conditions</span></i></span><span style="font-weight: 400">. Monitor the rotation by watching PXC pods restart in sequence and checking that the </span><span style="color: #ff6600"><i><span style="font-weight: 400">-new </span></i></span><span style="font-weight: 400">Secret is eventually gone:</span></p>
<pre class="urvanov-syntax-highlighter-plain-tag">kubectl get pods -w -l app.kubernetes.io/component=pxc
kubectl get secret cluster1-ssl-new  # should 404 when rotation is complete</pre>
<p>&nbsp;</p>
<h2><span style="font-weight: 400">ARM64 Support</span></h2>
<p>&nbsp;</p>
<h3><span style="font-weight: 400">Why it matters</span></h3>
<p><span style="font-weight: 400">AWS Graviton3, Google Axion, and Azure Cobalt100 instances deliver better price-to-performance on memory-intensive workloads like PXC. Previously, running the operator on ARM64 nodes required cross-architecture scheduling workarounds or explicit node exclusions for operator pods. All PXC operator images now publish native </span><span style="color: #ff6600"><i><span style="font-weight: 400">linux/arm64 </span></i></span><span style="font-weight: 400">layers alongside </span><span style="color: #ff6600"><i><span style="font-weight: 400">nodeSelector<br />
</span></i></span></p>
<p>&nbsp;</p>
<h3><span style="font-weight: 400">What is covered</span></h3>
<p><span style="font-weight: 400">Every image in the PXC operator stack ships multi-arch manifests in 1.20.0:</span></p>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">The operator manager image</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">The PXC xtrabackup sidecar</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">The log collector (Fluentbit-based)</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">The init container</span></li>
</ul>
<p>This release also fixes a logrotate crash on ARM64 (<a href="https://perconadev.atlassian.net/browse/K8SPXC-1821">K8SPXC-1821</a>) <span data-diff-span="">that </span>a missing dependency in the ARM64 container layer<span data-diff-span=""> caused</span>. 1.20.0<span data-diff-span=""> ships the fix</span>.<br />
&nbsp;</p>
<h3><span style="font-weight: 400">Wiring it up</span></h3>
<p><span data-diff-span="">You do not need any configuration change</span>. Pull the 1.20.0 operator image and Kubernetes schedules it on whichever architecture is available. To pin PXC pods explicitly to ARM64 nodes, add a <span style="color: #ff6600"><em>nodeSelector</em></span> or node affinity in the <em><span style="color: #ff6600">spec.pxc</span></em> block:</p>
<pre class="urvanov-syntax-highlighter-plain-tag">spec:
  pxc:
    nodeSelector:
      kubernetes.io/arch: arm64</pre>
<p>&nbsp;</p>
<h2><span style="font-weight: 400">Other Improvements</span></h2>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">PITR target validation before restore begins (</span><a href="https://perconadev.atlassian.net/browse/K8SPXC-1318"><span style="font-weight: 400">K8SPXC-1318</span></a><span style="font-weight: 400">, </span><a href="https://perconadev.atlassian.net/browse/K8SPXC-1634"><span style="font-weight: 400">K8SPXC-1634</span></a><span style="font-weight: 400">, </span><a href="https://perconadev.atlassian.net/browse/K8SPXC-1635"><span style="font-weight: 400">K8SPXC-1635</span></a><span style="font-weight: 400">, </span><a href="https://perconadev.atlassian.net/browse/K8SPXC-1793"><span style="font-weight: 400">K8SPXC-1793</span></a><span style="font-weight: 400">): The operator now validates PITR targets (type, GTID, timestamp) against available binary logs before starting a restore. <span data-diff-span="">It catches a </span>misconfigured target <span data-diff-span="">before it pauses</span> the cluster, rather than after.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Configurable leader election (</span><a href="https://perconadev.atlassian.net/browse/K8SPXC-1805"><span style="font-weight: 400">K8SPXC-1805</span></a><span style="font-weight: 400">): Three new environment variables tune leader election timing for high-latency or flaky network environments.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">SST retry limit (</span><a href="https://perconadev.atlassian.net/browse/K8SPXC-1619"><span style="font-weight: 400">K8SPXC-1619</span></a><span style="font-weight: 400">): A new </span><span style="color: #ff6600"><i><span style="font-weight: 400">spec.pxc.sstRetryCount</span></i></span><span style="font-weight: 400"> field caps the number of State Snapshot Transfer retry attempts, preventing a node that repeatedly fails SST from looping indefinitely.</span></li>
<li style="font-weight: 400"><span style="font-weight: 400">Custom logrotate configuration (</span><a href="https://perconadev.atlassian.net/browse/K8SPXC-1789"><span style="font-weight: 400">K8SPXC-1789</span></a><span style="font-weight: 400">): Supply a custom logrotate config via a ConfigMap reference in </span><span style="color: #ff6600"><i><span style="font-weight: 400">spec.logcollector.logRotate </span></i></span><span style="font-weight: 400">for fine-grained control over log rotation for PXC and utility containers.</span></li>
<li>Enhanced full cluster crash recovery (<a class="text-[var(--accent)] hover:underline underline-offset-[1px] outline-none hide-focus-ring ring-focus rounded-r2" href="https://perconadev.atlassian.net/browse/K8SPXC-1828" target="_blank" rel="noopener noreferrer">K8SPXC-1828</a>): 1.20.0 hardens the crash recovery path to prevent potential data loss after sudden node power-offs.</li>
</ul>
<p>&nbsp;</p>
<blockquote>
<p><b><i>Deprecation notice:</i></b><i><span style="font-weight: 400"> PMM2 monitoring integration is deprecated in 1.20.0. Migrate to PMM 3 before version 1.22.0, when PMM2 support will be removed.</span></i></p>
</blockquote>
<p>&nbsp;</p>
<h2><span style="font-weight: 400">Conclusion</span></h2>
<p><span style="font-weight: 400">PXC Operator 1.20.0 turns three previously manual steps into operator-managed concerns: disk growth, certificate rotation, and ARM64 scheduling. Combined with PITR validation improvements and configurable leader election, this release reduces the operational surface area for clusters running under production pressure. If you run into edge cases with automatic storage resizing or TLS rotation, the community forum is the right place to share them.</span></p>
<p>&nbsp;</p>
<h2><span style="font-weight: 400">Try It Out</span></h2>
<ul>
<li style="font-weight: 400"><span style="font-weight: 400">Release notes: </span><a href="https://docs.percona.com/percona-operator-for-mysql/pxc/ReleaseNotes/Kubernetes-Operator-for-PXC-RN1.20.0.html"><span style="font-weight: 400">Percona Operator for MySQL (PXC) 1.20.0 Release Notes</span></a></li>
<li style="font-weight: 400"><span style="font-weight: 400">GitHub: </span><a href="https://github.com/percona/percona-xtradb-cluster-operator"><span style="font-weight: 400">percona/percona-xtradb-cluster-operator</span></a></li>
<li style="font-weight: 400"><span style="font-weight: 400">Public roadmap: </span><a href="https://github.com/orgs/percona/projects/10/views/5"><span style="font-weight: 400">Percona public roadmap</span></a><span style="font-weight: 400">. See what is coming and vote on priorities.</span></li>
<li style="font-weight: 400">Community Forum: <a href="https://forums.percona.com/">forums.percona.com</a>. Share feedback, ask questions, or report issues.</li>
</ul>
<p>&nbsp;</p>
<p>The post <a href="https://www.percona.com/blog/percona-operator-for-mysql-pxc-1-20-0-automatic-storage-resizing-tls-rotation-arm64/">Percona Operator for MySQL (PXC) 1.20.0: Automatic Storage Resizing, TLS Certificate Rotation, and ARM64 Support</a> appeared first on <a href="https://www.percona.com">Percona</a>.</p>
<p><a href="https://www.percona.com/blog/percona-operator-for-mysql-pxc-1-20-0-automatic-storage-resizing-tls-rotation-arm64/">Percona Operator for MySQL (PXC) 1.20.0: Automatic Storage Resizing, TLS Certificate Rotation, and ARM64 Support</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Foundation Sea Lion Champions Nominees: Mark Callaghan</title>
        <link>https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-mark-callaghan/</link>
        <pubDate>Tue, 09 Jun 2026 05:55:04 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Interview with Mark Callaghan, nominated in the Technical Excellence category.<br />
I had the pleasure of speaking with Mark Callaghan, recently nominated for the MariaDB Sea Lion Champions program in the “Technical Excellence” …<br />
Continue reading "MariaDB Foundation Sea Lion Champions Nominees: Mark Callaghan"<br />
The post MariaDB Foundation Sea Lion Champions Nominees: Mark Callaghan appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-mark-callaghan/">MariaDB Foundation Sea Lion Champions Nominees: Mark Callaghan</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Interview with Mark Callaghan, nominated in the Technical Excellence category.<br />
I had the pleasure of speaking with Mark Callaghan, recently nominated for the MariaDB Sea Lion Champions program in the &#8220;Technical Excellence&#8221; &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-mark-callaghan/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;MariaDB Foundation Sea Lion Champions Nominees: Mark Callaghan&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-mark-callaghan/">MariaDB Foundation Sea Lion Champions Nominees: Mark Callaghan</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-mark-callaghan/">MariaDB Foundation Sea Lion Champions Nominees: Mark Callaghan</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>SpacemiT K3 is a compelling RISC-V AI CPU, but difficult to buy</title>
        <link>https://optimizedbyotto.com/post/buying-spacemit-k3-risc-v-ai-cpu/</link>
        <pubDate>Tue, 09 Jun 2026 00:00:00 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://optimizedbyotto.com/">Optimized by Otto</source>
        <description><![CDATA[<p>The RISC-V CPU architecture has been gaining a lot of popularity since it launched in 2014, and now that the industry is standardizing on the RVA23 level that includes vector support as a mandatory extension, we are likely to see a lot more edge- and IoT devices with the ability to run local LLMs at reasonable speed, and most importantly at very compelling prices.<br />
SpacemiT is a Chinese RISC-V CPU manufacturer that launched on May 11th, 2026, their long-anticipated next-gen RISC-V AI chip K3. It is among the earliest RISC-V CPUs that adhere to the RVA23 standard and performance-wise it is quite capable, providing 130 KDMIPS general computing power, 60 TOPS on INT4 which translates to about 15 tokens per second when running a 30 billion parameter large language model.<br />
The aspect that really makes it stand out is:</p>
<p>the RISC-V CPU architecture is open source,<br />
the price point is within reach of home and small business users and<br />
the overall feature set makes it an ideal platform to build local and offline AI systems.</p>
<p>SpacemiT also develops their own Debian-based Linux distribution Bianbu OS, and seems to have collaboration going on with the wider community. Their community site seems active, and they also have a dedicated X account @spacemit_riscv and Reddit account r/spacemit_riscv posting relevant progress info on Linux kernel upstreaming activities. The X account is also responsive, as evidenced by its replies to my questions.<br />
Canonical lists the SpacemiT K3 pico-ITX and K3 CoM260 Kit on its official Ubuntu for RISC-V partner-built hardware page, which strengthens the perception that upstream Linux support is being taken seriously. The SpacemiT folks also gave an interesting talk at the 2026 Ubuntu Summit that includes a peek into their roadmap with future K3, K7 and K9 models.<br />
For technical details, see SpacemiT’s K3 pico-ITX documentation, the Jetson Orin Nano-compatible K3 CoM260 board documentation and documentation of the K3 processor itself.</p>
<p>Comparing the resellers<br />
SpacemiT does not sell anything directly to consumers. Instead you need to buy a board that includes the K3 chip from an integrator. Currently the main resellers are:</p>
<p>Milk-V<br />
Sipeed<br />
Banana Pi<br />
Firefly<br />
DeepComputing</p>
<p>All of the above are Chinese companies that ship to customers both inside and outside China. DeepComputing stands out as the only one that actually has done real integration and ships the K3 on a custom board, while the others simply resell the SpacemiT-produced K3 pico-ITX and K3 CoM260 Kit.<br />
Milk-V<br />
Milk-V is a RISC-V specialized integrator, as the name already implies. They sell the K3 under the name Jupiter2. Of all the K3 pico-ITX reseller product pages, the Jupiter2 presentation is the nicest and most detailed. Unfortunately their order page at arace.tech only states that it is a “pre-order” with no information about shipping schedule, taxes, or other details like what SSD is included (if any). Based on the pictures it does ship with a Milk-V branded case. The 32 GB RAM lists at 504 EUR, which is a very reasonable price. The @MilkV_Official account on X recently promoted the K3.<br />
Documentation and support<br />
As of this writing, the Milk-V Jupiter2 documentation site is just a stub and has no actual content, and only two links to the SpacemiT K3 documentation site. For support there is a web forum with a dedicated Jupiter2 section. There is also a Matrix space, but unlike their other products, there is no dedicated Jupiter (neither v1 nor v2) channel.<br />
Community size and open source involvement<br />
At least one prior Milk-V product was certified by Canonical, which indicates there is some collaboration in progress. Canonical also lists the Milk-V Titan on its official Ubuntu for RISC-V partner-built hardware page.<br />
Sipeed<br />
The Sipeed K3 announcement is well written (in English) with all the relevant details and links to additional PDF manuals. However, their main page at sipeed.com says nothing about the K3, so one must know the subpage URL to access it. They offer both the K3 CoM260 kit compatible with Jetson Orin Nano carrier boards, and the stand-alone K3 pico-ITX-sized motherboard. The CoM260 kit is only 10 USD cheaper than the full pico-ITX motherboard, so choosing the latter is a no-brainer if starting from scratch. The pico-ITX model with 32 GB DDR5 RAM sells for 639 USD. The product page does not mention anything about hard disk size, so you don’t really know exactly what you will be getting if placing an order. There is no indication about case, Wi-Fi antennas or power supply either, so most likely they are not included.<br />
Their store.sipeed.com website does not work at all, and their Taobao and AliExpress stores are not public and only accessible to registered users. The order page also says nothing about shipping time, delivery time, or taxes. The X account @SipeedIO is active and recently posted pictures of shipments in progress.<br />
Documentation and support<br />
The main documentation wiki does not yet have any K3 content at the time of writing. There is a Discord channel for general RISC-V discussion, and their MaixHub also has a discussion board, but I didn’t find anything K3-specific.<br />
Community size and open source involvement<br />
Sipeed has had at least one of their previous devices certified by Canonical, which indicates they are active in the community.<br />
Note that the other RISC-V company SiFive that also has had hardware certified and officially supported by Canonical is a different company, despite the very similar name.<br />
Banana Pi<br />
Banana Pi announced that they offer both the K3 CoM260 kit and the K3 pico-ITX motherboard version. Their product page for the K3 confusingly shows a MediaTek product in the page banner rather than the SpacemiT K3. Based on the product description and the fact they renamed the product as BPI-SM10, it seems to ship with some carrier board. The product pictures look identical to the SpacemiT documentation and there is no picture of the carrier board, and details are very sparse. The pico-ITX version with 8 GB RAM and 128 GB SSD sells for 293 USD and the CoM260 developer kit with the same specs sells for 287 USD and the 32 GB RAM with 128 GB SSD model sells for 595 USD. The shop page shows only five orders so far and items are currently out of stock. As there was no 32 GB RAM version of the pico-ITX available at all, this isn’t an option for me as I want to run 30B parameter models that need the larger memory version.<br />
Of all of these resellers, the Banana Pi website seems the most outdated. It does not have a search feature, it is not mobile-friendly, pictures can’t be pinched to zoom in and so forth. Product names are also almost all identical, and as the product listings only show the beginning of the product name, figuring out what product is what requires extra effort that just makes the online purchase experience plain bad.<br />
Documentation and support<br />
I was only able to find the documentation page for the CoM260 kit, but none for the pico-ITX version. For support there is a forum, but the category list does not show any section for K3, and the forum search prohibits using the search term “k3” as too short.<br />
Community size and open source involvement<br />
Banana Pi has a long history in the ARM single-board computer market, but their presence in the RISC-V ecosystem is still growing. Their X account @sinovoip has posted only once about the K3 and otherwise promotes their ARM boards. However, their community culture page does express a commitment to open hardware in general, but there is no visible K3-specific community activity.<br />
Firefly<br />
Firefly’s K3 product page is comprehensive. Based on the details, they do not offer the K3 pico-ITX variant at all, but only the K3 CoM260 board inside the AIBOX-K3 Firefly RISC-V Edge Mini PC product. This is a feature-complete offering with a Jetson Orin Nano carrier board and case. The AIBOX-K3 with 32 GB RAM and 128 GB SSD in a case sells for 689 USD in their own Firefly.store. Unfortunately it only has HDMI and there is no USB-C with DisplayPort support, which is a deal-breaker for me personally.<br />
Interestingly, Firefly also offers rack-mounted servers with K3 as the CPU.<br />
Documentation and support<br />
The wiki link on the product page is broken. The Firefly wiki does have a section for the AIBOX-K3, but it too has a broken link. It seems that as of the time of writing, there is no wiki section for this product yet.<br />
For support there is a web forum, which does have at least one K3 thread covering guides such as Hermes Agent installation, though broader K3-specific sections are still sparse.<br />
Community size and open source involvement<br />
Firefly’s X account @TeeFirefly has had no posts since 2024, and their GitLab/T-Firefly shows mostly 2024 activity, with only one repository updated in 2025 and nothing in 2026. Historically they have built a moderate community around their ARM-based Rockchip boards, with active forums and wiki contributions for those product lines. Their RISC-V K3 offerings are newer, and likely need a lot more polish to be attractive products overall.<br />
DeepComputing<br />
Last, but certainly not least, is the laptop manufacturer DeepComputing that offers a Framework laptop compatible motherboard with the SpacemiT K3 chip. They also sell the plain motherboard, or with the Cooler Master case, which allows one to easily connect it to an external monitor and keyboard and use it as a desktop computer. The plain board with 32 GB RAM and no SSD sells for about 882 EUR. Shipping of the first batch is expected to start by end of June 2026. Their X account @DeepComputingio promotes this DC-ROMA RISC-V Mainboard III as their flagship product, so they seem to put a lot of effort into it.<br />
The overall product design and packaging seems good. Of all the K3 resellers and integrators that I was able to find, DeepComputing is the only one that actually designs their own boards with the K3 processor, while all the other vendors above are simply reselling the vanilla K3 boards with or without a case.<br />
After reviewing all these options I decided to buy the DC-ROMA RISC-V Mainboard III for Framework Laptop 13 with 32 GB RAM, 1 TB SSD and the Cooler Master case, totalling about 1100 EUR.<br />
Documentation and support<br />
DeepComputing maintains product information for their RISC-V hardware at github.com/DC-DeepComputing/Framework, with documentation of the newest Mainboard III (FML13V05) still being finalized ahead of the first batch shipment. They provide community support through Discord and web forum, although the latter has very little activity.<br />
Community size and open source involvement<br />
DeepComputing has established itself as a pioneer in RISC-V laptops, beginning with the DC-ROMA. I have seen their stand at FOSDEM, which shows they are genuinely active in the open source community. Canonical lists DeepComputing’s first mainboard / FML13V01 on its official Ubuntu for RISC-V partner-built hardware page, and it seems likely that they will continue to collaborate with Canonical with the new model once it ships. While the underlying Linux enablement depends on SpacemiT’s upstream efforts, DeepComputing’s involvement helps bridge the gap between reference hardware and consumer-ready products.</p>
<p>Conclusion<br />
After weighing all the options, I ended up placing an order with DeepComputing for their custom K3 board with the Cooler Master case. Despite the premium price, the active community support and the properly documented promise of a complete, working system made it easy to place an order with confidence.<br />
The SpacemiT K3 is poised to be one of the most significant RISC-V chips for local AI workloads, thanks to its RVA23 compliance and high tokens per second potential. Yet the buying experience in mid-2026 remains fragmented and incomplete. Hopefully this is just because the product is new, and they will get the purchase experience polished soon.<br />
What struck me most during this process was how poor the customer experience is across nearly all of these vendor websites: broken links, missing search functions, outdated product banners, pages that show the wrong product entirely, and no information about shipping times, stock levels, taxes, and so on. One wonders why these companies don’t fully invest in their web presence.<br />
Personally I would assume they likely have enough customers already, primarily through domestic channels like Taobao and JD.com, that they do not feel any pressure to improve their international-facing sites. However, I did also review what was offered on Taobao, and the product details were very incomplete there too. Taobao, however, has a built-in live chat with almost all sellers, which can be used to ask questions and thus compensate for missing product details.<br />
I don’t fully understand why the sales process seems unpolished. The websites feel almost like an afterthought – a checkbox to claim global reach while the real business apparently happens elsewhere via closed platforms or via inaccessible reseller channels. It is a frustrating reminder that in the RISC-V hardware world, the technology may be open and global, but the purchase experience is less so.</p>
<p><a href="https://optimizedbyotto.com/post/buying-spacemit-k3-risc-v-ai-cpu/">SpacemiT K3 is a compelling RISC-V AI CPU, but difficult to buy</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><img decoding="async" src="https://optimizedbyotto.com/post/buying-spacemit-k3-risc-v-ai-cpu/spacemit-k3.jpg" alt="Featured image of post SpacemiT K3 is a compelling RISC-V AI CPU, but difficult to buy" /></p>
<p>The RISC-V CPU architecture has been gaining a lot of popularity since it launched in 2014, and now that the industry is standardizing on the RVA23 level that includes vector support as a mandatory extension, we are likely to see a lot more edge- and IoT devices with the ability to run local LLMs at reasonable speed, and most importantly at very compelling prices.</p>
<p><a class="link" href="https://www.spacemit.com/" target="_blank" rel="noopener">SpacemiT</a> is a Chinese RISC-V CPU manufacturer that launched on May 11th, 2026, their <a class="link" href="https://canonical.com/blog/spacemit-announces-availability-of-ubuntu-on-k3-k1-series" target="_blank" rel="noopener">long-anticipated next-gen RISC-V</a> AI chip <a class="link" href="https://www.spacemit.com/products/keystone/k3" target="_blank" rel="noopener">K3</a>. It is among the earliest RISC-V CPUs that adhere to the <a class="link" href="https://www.heise.de/en/news/RISC-V-and-Linux-Ubuntu-25-10-forces-brand-new-processors-10538066.html" target="_blank" rel="noopener">RVA23 standard</a> and performance-wise it is quite capable, providing 130 KDMIPS general computing power, 60 TOPS on INT4 which translates to about 15 tokens per second when running a 30 billion parameter large language model.</p>
<p>The aspect that really makes it stand out is:</p>
<ul>
<li>the <a class="link" href="https://en.wikipedia.org/wiki/RISC-V" target="_blank" rel="noopener">RISC-V CPU architecture is open source</a>,</li>
<li>the price point is within reach of home and small business users and</li>
<li>the overall feature set makes it an ideal platform to build <strong><em>local</em> and <em>offline</em> AI systems</strong>.</li>
</ul>
<p>SpacemiT also develops their own Debian-based Linux distribution Bianbu OS, and seems to have collaboration going on with the wider community. Their <a class="link" href="https://www.spacemit.com/community" target="_blank" rel="noopener">community site</a> seems active, and they also have a dedicated <a class="link" href="https://x.com/spacemit_riscv" target="_blank" rel="noopener">X account @spacemit_riscv</a> and <a class="link" href="https://www.reddit.com/r/spacemit_riscv/comments/1t5yimh/upstream-progress-updates/" target="_blank" rel="noopener">Reddit account r/spacemit_riscv</a> posting relevant progress info on Linux kernel upstreaming activities. The X account is also responsive, as evidenced by <a class="link" href="https://x.com/ottokekalainen/status/2056375593722356207" target="_blank" rel="noopener">its replies to my questions</a>.</p>
<p>Canonical lists the SpacemiT K3 pico-ITX and K3 CoM260 Kit on its official <a class="link" href="https://ubuntu.com/download/risc-v/partner-built" target="_blank" rel="noopener">Ubuntu for RISC-V partner-built hardware page</a>, which strengthens the perception that upstream Linux support is being taken seriously. The SpacemiT folks also gave an interesting <a class="link" href="https://www.youtube.com/watch?v=BaY2l17OBRQ" target="_blank" rel="noopener">talk at the 2026 Ubuntu Summit</a> that includes a peek into their roadmap with future K3, K7 and K9 models.</p>
<p>For technical details, see SpacemiT&rsquo;s <a class="link" href="https://www.spacemit.com/community/development-kit/k3-pico-itx" target="_blank" rel="noopener">K3 pico-ITX documentation</a>, the Jetson Orin Nano-compatible <a class="link" href="https://www.spacemit.com/community/development-kit/k3-com260" target="_blank" rel="noopener">K3 CoM260 board documentation</a> and <a class="link" href="https://www.spacemit.com/community/document/info?lang=en&amp;nodepath=hardware/key_stone/k3" target="_blank" rel="noopener">documentation of the K3 processor itself</a>.</p>
<p><img decoding="async" src="https://optimizedbyotto.com/post/buying-spacemit-k3-risc-v-ai-cpu/spacemit-k3-pico-itx-and-k3-com260-kit.webp" width="1200" height="628" loading="lazy" alt="The SpacemiT K3 pico-ITX board and the K3 CoM260 board side-by-side (not to scale)" class="gallery-image" data-flex-grow="191" data-flex-basis="458px">
</p>
<h2 id="comparing-the-resellers"><a href="#comparing-the-resellers" class="header-anchor"></a>Comparing the resellers<br />
</h2>
<p>SpacemiT does not sell anything directly to consumers. Instead you need to buy a board that includes the K3 chip from an integrator. Currently the main resellers are:</p>
<ul>
<li><a class="link" href="#milkv">Milk-V</a></li>
<li><a class="link" href="#sipeed">Sipeed</a></li>
<li><a class="link" href="#banana-pi">Banana Pi</a></li>
<li><a class="link" href="#firefly">Firefly</a></li>
<li><a class="link" href="#deepcomputing">DeepComputing</a></li>
</ul>
<p>All of the above are Chinese companies that ship to customers both inside and outside China. DeepComputing stands out as the only one that actually has done real integration and ships the K3 on a custom board, while the others simply resell the SpacemiT-produced K3 pico-ITX and K3 CoM260 Kit.</p>
<h2 id="milk-v"><a href="#milk-v" class="header-anchor"></a>Milk-V<br />
</h2>
<p>Milk-V is a RISC-V specialized integrator, as the name already implies. They sell the K3 under the name <a class="link" href="https://milkv.io/jupiter2" target="_blank" rel="noopener">Jupiter2</a>. Of all the K3 pico-ITX reseller product pages, the Jupiter2 presentation is the nicest and most detailed. Unfortunately their <a class="link" href="https://arace.tech/products/milk-v-jupiter-2" target="_blank" rel="noopener">order page at arace.tech</a> only states that it is a &ldquo;pre-order&rdquo; with no information about shipping schedule, taxes, or other details like what SSD is included (if any). Based on the pictures it does ship with a Milk-V branded case. The 32 GB RAM lists at 504 EUR, which is a very reasonable price. The <a class="link" href="https://x.com/MilkV_Official" target="_blank" rel="noopener">@MilkV_Official account on X</a> recently promoted the K3.</p>
<h3 id="documentation-and-support"><a href="#documentation-and-support" class="header-anchor"></a>Documentation and support<br />
</h3>
<p>As of this writing, the <a class="link" href="https://milkv.io/docs/jupiter2/" target="_blank" rel="noopener">Milk-V Jupiter2 documentation site</a> is just a stub and has no actual content, and only two links to the SpacemiT K3 documentation site. For support there is a web forum with a <a class="link" href="https://community.milkv.io/c/jupiter/jupiter2/19" target="_blank" rel="noopener">dedicated Jupiter2 section</a>. There is also a <a class="link" href="https://matrix.to/#/#milk-v:matrix.org" target="_blank" rel="noopener">Matrix space</a>, but unlike their other products, there is no dedicated Jupiter (neither v1 nor v2) channel.</p>
<h3 id="community-size-and-open-source-involvement"><a href="#community-size-and-open-source-involvement" class="header-anchor"></a>Community size and open source involvement<br />
</h3>
<p>At least one prior Milk-V product <a class="link" href="https://canonical.com/blog/canonical-enables-ubuntu-on-milk-v-mars" target="_blank" rel="noopener">was certified by Canonical</a>, which indicates there is some collaboration in progress. Canonical also lists the <a class="link" href="https://ubuntu.com/download/risc-v/partner-built" target="_blank" rel="noopener">Milk-V Titan</a> on its official Ubuntu for RISC-V partner-built hardware page.</p>
<h2 id="sipeed"><a href="#sipeed" class="header-anchor"></a>Sipeed<br />
</h2>
<p>The <a class="link" href="https://sipeed.com/k3" target="_blank" rel="noopener">Sipeed K3 announcement</a> is well written (in English) with all the relevant details and links to additional PDF manuals. However, their main page at <a class="link" href="https://sipeed.com/" target="_blank" rel="noopener">sipeed.com</a> says nothing about the K3, so one must know the subpage URL to access it. They offer both the K3 CoM260 kit compatible with Jetson Orin Nano carrier boards, and the stand-alone K3 pico-ITX-sized motherboard. The CoM260 kit is only 10 USD cheaper than the full pico-ITX motherboard, so choosing the latter is a no-brainer if starting from scratch. The pico-ITX model with 32 GB DDR5 RAM sells for 639 USD. The product page does not mention anything about hard disk size, so you don&rsquo;t really know exactly what you will be getting if placing an order. There is no indication about case, Wi-Fi antennas or power supply either, so most likely they are not included.</p>
<p>Their <a class="link" href="http://store.sipeed.com" target="_blank" rel="noopener">store.sipeed.com</a> website does not work at all, and their Taobao and AliExpress stores are not public and only accessible to registered users. The order page also says nothing about shipping time, delivery time, or taxes. The <a class="link" href="https://x.com/SipeedIO/status/2055549071931404291" target="_blank" rel="noopener">X account @SipeedIO</a> is active and recently posted pictures of shipments in progress.</p>
<h3 id="documentation-and-support-1"><a href="#documentation-and-support-1" class="header-anchor"></a>Documentation and support<br />
</h3>
<p>The main <a class="link" href="https://wiki.sipeed.com/" target="_blank" rel="noopener">documentation wiki</a> does not yet have any K3 content at the time of writing. There is a <a class="link" href="https://discord.com/channels/1359800784375644291/1503600021646479500" target="_blank" rel="noopener">Discord channel for general RISC-V discussion</a>, and their MaixHub also has a discussion board, but I didn&rsquo;t find anything K3-specific.</p>
<h3 id="community-size-and-open-source-involvement-1"><a href="#community-size-and-open-source-involvement-1" class="header-anchor"></a>Community size and open source involvement<br />
</h3>
<p>Sipeed has had at least one of their previous devices <a class="link" href="https://ubuntu.com/blog/canonical-enables-ubuntu-on-sipeeds-licheerv-risc-v-board" target="_blank" rel="noopener">certified by Canonical</a>, which indicates they are active in the community.</p>
<p>Note that the other RISC-V company <a class="link" href="https://ubuntu.com/tutorials/how-to-install-ubuntu-on-risc-v-hifive-boards" target="_blank" rel="noopener">SiFive</a> that <a class="link" href="https://canonical.com/blog/sifive-eswin-computing-and-canonical-announce-availability-of-ubuntu-on-the-hifive-premier-p550" target="_blank" rel="noopener">also</a> has had hardware certified and officially supported by Canonical is a different company, despite the very similar name.</p>
<h2 id="banana-pi"><a href="#banana-pi" class="header-anchor"></a>Banana Pi<br />
</h2>
<p><a class="link" href="https://banana-pi.org/en/product-news/591.html" target="_blank" rel="noopener">Banana Pi announced</a> that they offer both the K3 CoM260 kit and the K3 pico-ITX motherboard version. Their <a class="link" href="https://banana-pi.org/en/core-board-and-kit/207.html" target="_blank" rel="noopener">product page for the K3</a> confusingly shows a MediaTek product in the page banner rather than the SpacemiT K3. Based on the product description and the fact they renamed the product as <em>BPI-SM10</em>, it seems to ship with some carrier board. The product pictures look identical to the SpacemiT documentation and there is no picture of the carrier board, and details are very sparse. The <a class="link" href="https://www.bpi-shop.com/products/k3-pico-itx-spacemit-k3-8-cores--60tops-al-performance-wifi6.html" target="_blank" rel="noopener">pico-ITX version</a> with 8 GB RAM and 128 GB SSD sells for 293 USD and the <a class="link" href="https://www.bpi-shop.com/products/bpi-sm10-k3-com260.html" target="_blank" rel="noopener">CoM260 developer kit</a> with the same specs sells for 287 USD and the 32 GB RAM with 128 GB SSD model sells for 595 USD. The shop page shows only five orders so far and items are currently out of stock. As there was no 32 GB RAM version of the pico-ITX available at all, this isn&rsquo;t an option for me as I want to run 30B parameter models that need the larger memory version.</p>
<p>Of all of these resellers, the <strong>Banana Pi website seems the most outdated</strong>. It does not have a search feature, it is not mobile-friendly, pictures can&rsquo;t be pinched to zoom in and so forth. Product names are also almost all identical, and as the product listings only show the beginning of the product name, figuring out what product is what requires extra effort that just makes the online purchase experience plain bad.</p>
<h3 id="documentation-and-support-2"><a href="#documentation-and-support-2" class="header-anchor"></a>Documentation and support<br />
</h3>
<p>I was only able to find the <a class="link" href="https://docs.banana-pi.org/en/BPI-SM10/BananaPi_BPI-SM10" target="_blank" rel="noopener">documentation page for the CoM260 kit</a>, but none for the pico-ITX version. For support there is a <a class="link" href="https://forum.banana-pi.org/" target="_blank" rel="noopener">forum</a>, but the category list does not show any section for K3, and the forum search prohibits using the search term &ldquo;k3&rdquo; as too short.</p>
<h3 id="community-size-and-open-source-involvement-2"><a href="#community-size-and-open-source-involvement-2" class="header-anchor"></a>Community size and open source involvement<br />
</h3>
<p>Banana Pi has a long history in the ARM single-board computer market, but their presence in the RISC-V ecosystem is still growing. Their <a class="link" href="https://x.com/sinovoip" target="_blank" rel="noopener">X account @sinovoip</a> has posted only once about the K3 and otherwise promotes their ARM boards. However, their <a class="link" href="https://banana-pi.org/en/community-culture/" target="_blank" rel="noopener">community culture page</a> does express a commitment to open hardware in general, but there is no visible K3-specific community activity.</p>
<h2 id="firefly"><a href="#firefly" class="header-anchor"></a>Firefly<br />
</h2>
<p><a class="link" href="https://en.t-firefly.com/p/aibox-k3" target="_blank" rel="noopener">Firefly&rsquo;s K3 product page</a> is comprehensive. Based on the details, they do not offer the K3 pico-ITX variant at all, but only the K3 CoM260 board inside the AIBOX-K3 Firefly RISC-V Edge Mini PC product. This is a feature-complete offering with a Jetson Orin Nano carrier board and case. The AIBOX-K3 with 32 GB RAM and 128 GB SSD in a case sells for 689 USD in their own <a class="link" href="https://www.firefly.store/products/aibox-k3-risc-v-edge-mini-pc?variant=46857894821972" target="_blank" rel="noopener">Firefly.store</a>. Unfortunately it only has HDMI and there is no USB-C with DisplayPort support, which is a deal-breaker for me personally.</p>
<p>Interestingly, Firefly also offers <a class="link" href="https://www.firefly.store/blogs/news/firefly-k3-series-launches-with-powerful-risc-v-chips-supports-30b-ai-models" target="_blank" rel="noopener">rack-mounted servers with K3</a> as the CPU.</p>
<h3 id="documentation-and-support-3"><a href="#documentation-and-support-3" class="header-anchor"></a>Documentation and support<br />
</h3>
<p>The wiki link on the product page is broken. The <a class="link" href="https://en.t-firefly.com/wiki" target="_blank" rel="noopener">Firefly wiki</a> does have a section for the AIBOX-K3, but it too has a broken link. It seems that as of the time of writing, there is no wiki section for this product yet.</p>
<p>For support there is a <a class="link" href="https://bbs.t-firefly.com/" target="_blank" rel="noopener">web forum</a>, which does have at least <a class="link" href="https://bbs.t-firefly.com/forum.php?mod=viewthread&amp;tid=66517&amp;extra=page%3D1" target="_blank" rel="noopener">one K3 thread</a> covering guides such as Hermes Agent installation, though broader K3-specific sections are still sparse.</p>
<h3 id="community-size-and-open-source-involvement-3"><a href="#community-size-and-open-source-involvement-3" class="header-anchor"></a>Community size and open source involvement<br />
</h3>
<p>Firefly&rsquo;s <a class="link" href="https://x.com/TeeFirefly" target="_blank" rel="noopener">X account @TeeFirefly</a> has had no posts since 2024, and their <a class="link" href="https://gitlab.com/T-Firefly" target="_blank" rel="noopener">GitLab/T-Firefly</a> shows mostly 2024 activity, with only one repository updated in 2025 and nothing in 2026. Historically they have built a moderate community around their ARM-based Rockchip boards, with active forums and wiki contributions for those product lines. Their RISC-V K3 offerings are newer, and likely need a lot more polish to be attractive products overall.</p>
<h2 id="deepcomputing"><a href="#deepcomputing" class="header-anchor"></a>DeepComputing<br />
</h2>
<p>Last, but certainly not least, is the laptop manufacturer <a class="link" href="https://deepcomputing.io" target="_blank" rel="noopener">DeepComputing</a> that offers a <a class="link" href="https://deepcomputing.io/product/dc-roma-risc-v-mainboard-iii/" target="_blank" rel="noopener">Framework laptop compatible motherboard with the SpacemiT K3 chip</a>. They also sell the plain motherboard, or with the Cooler Master case, which allows one to easily connect it to an external monitor and keyboard and use it as a desktop computer. The plain board with 32 GB RAM and no SSD sells for about 882 EUR. Shipping of the first batch is expected to start by end of June 2026. Their <a class="link" href="https://x.com/DeepComputingio" target="_blank" rel="noopener">X account @DeepComputingio</a> promotes this DC-ROMA RISC-V Mainboard III as their flagship product, so they seem to put a lot of effort into it.</p>
<p>The overall product design and packaging seems good. Of all the K3 resellers and integrators that I was able to find, <strong>DeepComputing is the only one that actually designs their own boards</strong> with the K3 processor, while all the other vendors above are simply reselling the vanilla K3 boards with or without a case.</p>
<p><strong>After reviewing all these options I decided to buy the <a class="link" href="https://store.deepcomputing.io/products/dc-roma-risc-v-mainboard-iii-for-framework-laptop-13?variant=51310183088292" target="_blank" rel="noopener">DC-ROMA RISC-V Mainboard III</a></strong> for Framework Laptop 13 with 32 GB RAM, 1 TB SSD and the Cooler Master case, totalling about 1100 EUR.</p>
<h3 id="documentation-and-support-4"><a href="#documentation-and-support-4" class="header-anchor"></a>Documentation and support<br />
</h3>
<p>DeepComputing maintains product information for their RISC-V hardware at <a class="link" href="https://github.com/DC-DeepComputing/Framework" target="_blank" rel="noopener">github.com/DC-DeepComputing/Framework</a>, with documentation of the newest <em>Mainboard III (FML13V05)</em> still being finalized ahead of the first batch shipment. They provide community support through <a class="link" href="https://discord.com/invite/DycykxSxWH" target="_blank" rel="noopener">Discord</a> and <a class="link" href="https://deepcomputing.discourse.group/" target="_blank" rel="noopener">web forum</a>, although the latter has very little activity.</p>
<h3 id="community-size-and-open-source-involvement-4"><a href="#community-size-and-open-source-involvement-4" class="header-anchor"></a>Community size and open source involvement<br />
</h3>
<p>DeepComputing has established itself as a pioneer in RISC-V laptops, beginning with the DC-ROMA. I have seen their stand at FOSDEM, which shows they are genuinely active in the open source community. Canonical lists <a class="link" href="https://ubuntu.com/download/risc-v/partner-built" target="_blank" rel="noopener">DeepComputing&rsquo;s first mainboard / FML13V01</a> on its official Ubuntu for RISC-V partner-built hardware page, and it seems likely that they will continue to collaborate with Canonical with the new model once it ships. While the underlying Linux enablement depends on SpacemiT&rsquo;s upstream efforts, DeepComputing&rsquo;s involvement helps bridge the gap between reference hardware and consumer-ready products.</p>
<p><img decoding="async" src="https://optimizedbyotto.com/post/buying-spacemit-k3-risc-v-ai-cpu/deepcomputing-cool-master-spacemit-k3.webp" width="531" height="381" loading="lazy" alt="DeepComputing K3 board in the Cooler Master case" class="gallery-image" data-flex-grow="139" data-flex-basis="334px">
</p>
<h2 id="conclusion"><a href="#conclusion" class="header-anchor"></a>Conclusion<br />
</h2>
<p>After weighing all the options, I ended up placing an order with DeepComputing for their custom K3 board with the Cooler Master case. Despite the premium price, the active community support and the properly documented promise of a complete, working system made it easy to place an order with confidence.</p>
<p>The SpacemiT K3 is poised to be one of the most significant RISC-V chips for local AI workloads, thanks to its RVA23 compliance and high tokens per second potential. Yet the buying experience in mid-2026 remains fragmented and incomplete. Hopefully this is just because the product is new, and they will get the purchase experience polished soon.</p>
<p>What struck me most during this process was how poor the customer experience is across nearly all of these vendor websites: broken links, missing search functions, outdated product banners, pages that show the wrong product entirely, and no information about shipping times, stock levels, taxes, and so on. One wonders why these companies don&rsquo;t fully invest in their web presence.</p>
<p>Personally I would assume they <strong>likely have enough customers already,</strong> primarily through domestic channels like <em>Taobao</em> and <em>JD.com</em>, that they do not feel any pressure to improve their international-facing sites. However, I did also review what was offered on Taobao, and the product details were very incomplete there too. Taobao, however, has a built-in live chat with almost all sellers, which can be used to ask questions and thus compensate for missing product details.</p>
<p>I don&rsquo;t fully understand why the sales process seems unpolished. The websites feel almost like an afterthought – a checkbox to claim global reach while the real business apparently happens elsewhere via closed platforms or via inaccessible reseller channels. It is a frustrating reminder that in the RISC-V hardware world, the technology may be open and global, but the purchase experience is less so.</p>
<p><a href="https://optimizedbyotto.com/post/buying-spacemit-k3-risc-v-ai-cpu/">SpacemiT K3 is a compelling RISC-V AI CPU, but difficult to buy</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB Foundation Sea Lion Champions Nominees: Sumit Srivastava</title>
        <link>https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-sumit-srivastava/</link>
        <pubDate>Mon, 08 Jun 2026 08:41:43 +0000</pubDate>
        <dc:creator></dc:creator>
        <guid isPermaLink="false"></guid>
        <source url="https://mariadb.org/">MariaDB.org</source>
        <description><![CDATA[<p>Interview with Sumit Srivastava, nominated in the Adoption &#038; Industry Impact category.<br />
I had the pleasure of speaking with Sumit Srivastava, SVP Business Development &#038; Products at Tayana, a Bangalore-based telecom software company. …<br />
Continue reading "MariaDB Foundation Sea Lion Champions Nominees: Sumit Srivastava"<br />
The post MariaDB Foundation Sea Lion Champions Nominees: Sumit Srivastava appeared first on MariaDB.org.</p>
<p><a href="https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-sumit-srivastava/">MariaDB Foundation Sea Lion Champions Nominees: Sumit Srivastava</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Interview with Sumit Srivastava, nominated in the Adoption &#038; Industry Impact category.<br />
I had the pleasure of speaking with Sumit Srivastava, SVP Business Development &#038; Products at Tayana, a Bangalore-based telecom software company. &#8230; </p>
<p class="link-more"><a href="https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-sumit-srivastava/" class="more-link">Continue reading<span class="screen-reader-text"> &#8220;MariaDB Foundation Sea Lion Champions Nominees: Sumit Srivastava&#8221;</span></a></p>
<p>The post <a rel="nofollow" href="https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-sumit-srivastava/">MariaDB Foundation Sea Lion Champions Nominees: Sumit Srivastava</a> appeared first on <a rel="nofollow" href="https://mariadb.org">MariaDB.org</a>.</p>
<p><a href="https://mariadb.org/mariadb-foundation-sea-lion-champions-nominees-sumit-srivastava/">MariaDB Foundation Sea Lion Champions Nominees: Sumit Srivastava</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Inserting in Two Tables in a Single Round-Trip with JSON Duality Views in MySQL 9.7</title>
        <link>https://jfg-mysql.blogspot.com/2026/06/inserting-in-two-tables-in-single-round-trip.html</link>
        <pubDate>Thu, 04 Jun 2026 14:17:32 +0000</pubDate>
        <dc:creator>Jean-François Gagné</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/inserting-in-two-tables-in-a-single-round-trip-with-json-duality-views-in-mysql-9-7-2/</guid>
        <source url="https://jfg-mysql.blogspot.com/">J-F Gagné&#039;s MySQL Blog</source>
        <description><![CDATA[<p>A few months ago, I was asking myself how to insert in two tables in a single round-trip to the database.  I wanted to do that to optimize a process.  My optimization involved splitting a table in two, which would need inserting in two tables atomically.  The downside was changing an auto-commit INSERT to a transaction with two inserts, which was changing the shape of the workload</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/06/inserting-in-two-tables-in-single-round-trip.html">Inserting in Two Tables in a Single Round-Trip with JSON Duality Views in MySQL 9.7</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>A few months ago, I was asking myself how to insert in two tables in a single round-trip to the database.  I wanted to do that to optimize a process.  My optimization involved splitting a table in two, which would need inserting in two tables atomically.  The downside was changing an auto-commit INSERT to a transaction with two inserts, which was changing the shape of the workload</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/06/inserting-in-two-tables-in-single-round-trip.html">Inserting in Two Tables in a Single Round-Trip with JSON Duality Views in MySQL 9.7</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Inserting in Two Tables in a Single Round-Trip with JSON Duality Views in MySQL 9.7</title>
        <link>https://jfg-mysql.blogspot.com/2026/06/inserting-in-two-tables-in-single-round-trip.html</link>
        <pubDate>Thu, 04 Jun 2026 14:17:32 +0000</pubDate>
        <dc:creator>Jean-François Gagné</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/inserting-in-two-tables-in-a-single-round-trip-with-json-duality-views-in-mysql-9-7/</guid>
        <source url="https://jfg-mysql.blogspot.com/">J-F Gagné&#039;s MySQL Blog</source>
        <description><![CDATA[<p>A few months ago, I was asking myself how to insert in two tables in a single round-trip to the database.  I wanted to do that to optimize a process.  My optimization involved splitting a table in two, which would need inserting in two tables atomically.  The downside was changing an auto-commit INSERT to a transaction with two inserts, which was changing the shape of the workload</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/06/inserting-in-two-tables-in-single-round-trip.html">Inserting in Two Tables in a Single Round-Trip with JSON Duality Views in MySQL 9.7</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>A few months ago, I was asking myself how to insert in two tables in a single round-trip to the database.  I wanted to do that to optimize a process.  My optimization involved splitting a table in two, which would need inserting in two tables atomically.  The downside was changing an auto-commit INSERT to a transaction with two inserts, which was changing the shape of the workload</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/06/inserting-in-two-tables-in-single-round-trip.html">Inserting in Two Tables in a Single Round-Trip with JSON Duality Views in MySQL 9.7</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>I got swarmed by a replication issue</title>
        <link>https://medium.com/@arbaudie.it/i-got-swarmed-by-a-replication-issue-556c179783cc?source=rss-c779d007e7fe------2</link>
        <pubDate>Tue, 02 Jun 2026 20:18:02 +0000</pubDate>
        <dc:creator>ArBauDie.IT</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/i-got-swarmed-by-a-replication-issue/</guid>
        <source url="https://medium.com/@arbaudie.it?source=rss-c779d007e7fe------2">Stories by ArBauDie.IT on Medium</source>
        <description><![CDATA[<p>I recently worked with a client who runs a mature CI/CD pipeline on GitLab. Docker Swarm as the orchestrator, config files versioned and pulled at deploy time, the whole nine yards. They had been deploying standalone MariaDB instances this way for a while, without a hitch.Then came the ask : stand up an async replication cluster. One primary, two replicas, one MaxScale instance sitting in front of it all. Quite classical, nothing out of the ordinary really.First deployment ? Smooth. Replication is running, MaxScale routing reads to the replicas, writes to the primary. We are all happy.Then we had to redeploy the replicas.Every time we redeployed the replica containers, replication broke. Every time, the fix was the same manual ceremony : connect to each replica, run CHANGE MASTER TO, START SLAVE, check SHOW SLAVE STATUS. Everything works fine after that.Until the next redeployment that is.Same config files, same image. No changes, just as promised by the CI/CD pipeline. Or so i thought.The error log is always your first stop in this situation. And it told us exactly what was wrong :[ERROR] Failed to open the relay log './568165be8cc3-relay-bin.000002' (relay_log_pos 4463864)[ERROR] Could not find target log during relay log initialization[ERROR] Failed to initialize the master info structureThe replica was looking for a relay log file that did not exist. But it took me a while (3 hours actually) to connect the dots as i focused on the last line for a while.Here is the thing about MariaDB relay log file naming : by default MariaDB derives the relay log basename from the server's hostname. On a bare metal or VM setup, that hostname is immutable. You set it once, it never changes.In Docker, not so much. By default, Docker does set a container’s hostname to its short container ID — a random hash that changes at every docker run or container recreation. Swarm makes it even worse as it also rotates task IDs on every redeployment, so even if we would try and rely on some predictable naming pattern, Swarm would break it further. A task that was replica_1.1.xk3f8a9b2c becomes replica_1.1.yz9q2m7nkp after redeployment.So on the previous deployment, the relay logs were named something like xk3f8a9b2c-relay-bin.000001. On the new deployment, the relay log index file references those old names. The new container starts up, checks the index, finds filenames that don't match its own generated basename (yz9q2m7nkp-relay-bin.000001) , can't locate the relay logs, and replication fails to resume.The root cause : i had not explicitly set the relay log basename in configuration files. I had set everything else. Just not that.Fixing it only took one line in my.cnf. Yes, one line and voilà !relay_log     = relay-binHardcoding the relay log basename decouples replication state from container identity. Whatever hostname Docker Swarm decides to assign to the replica container, the relay log filenames stay constant. Replication resumes cleanly.While you’re at it, a few other directives are worth reviewing in any containerized replication setup :log_slave_updates = 1 — useful if you ever plan to chain replicas or use the replicas as a source for another downstream replica. Good habit regardless.relay_log_purge = 1 — keeps relay logs cleaned up automatically. In a container environment with limited storage you really want this on.relay_log_recovery = 1 — instructs the replica to recover relay log state from the master position on startup rather than relying on the relay log index. A solid safety net in ephemeral environments.expire_logs_days = 5 — instructs the replica to delete any binary log file in which the last event is older than 5 days. Helps with disk capacity planning.MaxScale was configured to monitor replication state on the replicas. And it did exactly what it was supposed to : the moment replication stopped, it pulled both replicas out of the read pool and flagged them as unavailable.MaxScale hid this bug from the app as expected. It also helped notice the issue. Proper replication monitoring in your proxy layer is not optional.One missing line in a configuration file ended up with three hours of head-scratching because of the following (wrong) assumptions :Docker Swarm and stateful services do not share the same concept of identity. Containers are stateless disposable resources, cattle. Rename, kill, redeploy as you see fit. Databases on the other hand are very much stateful. Stability is an implicit contract, including the hostname.Config-as-code is not the same as config completeness. The GitLab-driven deployment pipeline was running smooth. The config was versioned, reviewed, deployed automatically. The pipeline does exactly what it is instructed to, it does not tell what one forgot.Any MariaDB system variable that derives its default from a system value is a redeployment time-bomb in orchestrated environments. relay_log is the one that got our focus here. But the same logic applies to many other variables. If you run MariaDB in a stateless environment set these explicitly. Always.Stateful services in stateless environments will always bite back if you let the environment make assumptions on your behalf. The fix is one line but the overall lesson is to never let the orchestrator decide what you should control.Lessons learned !!If you’ve ever spent an afternoon staring at SHOW SLAVE STATUS wondering why a cluster that worked yesterday doesn't work today after a "routine" redeployment — I hope this saves you some trouble.Do not hesitate to reach out if you want to discuss your replication architecture or containerized database setup.</p>
<p><a href="https://medium.com/@arbaudie.it/i-got-swarmed-by-a-replication-issue-556c179783cc?source=rss-c779d007e7fe------2">I got swarmed by a replication issue</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>I recently worked with a client who runs a mature CI/CD pipeline on GitLab. Docker Swarm as the orchestrator, config files versioned and pulled at deploy time, the whole nine yards. They had been deploying standalone MariaDB instances this way for a while, without a hitch.</p>
<p>Then came the ask : stand up an async replication cluster. One primary, two replicas, one MaxScale instance sitting in front of it all. Quite classical, nothing out of the ordinary really.</p>
<p>First deployment ? Smooth. Replication is running, MaxScale routing reads to the replicas, writes to the primary. We are all happy.</p>
<p>Then we had to redeploy the replicas.</p>
<p>Every time we redeployed the replica containers, replication broke. <br />Every time, the fix was the same manual ceremony : connect to each replica, run CHANGE MASTER TO, START SLAVE, check SHOW SLAVE STATUS. Everything works fine after that.</p>
<p>Until the next redeployment that is.</p>
<p>Same config files, same image. No changes, just as promised by the CI/CD pipeline. Or so i thought.</p>
<p>The error log is always your first stop in this situation. And it told us exactly what was wrong :</p>
<pre>[ERROR] Failed to open the relay log './568165be8cc3-relay-bin.000002' (relay_log_pos 4463864)<br>[ERROR] Could not find target log during relay log initialization<br>[ERROR] Failed to initialize the master info structure</pre>
<p>The replica was looking for a relay log file that did not exist. But it took me a while (3 hours actually) to connect the dots as i focused on the last line for a while.</p>
<p>Here is the thing about MariaDB relay log file naming : by default MariaDB derives the relay log basename from the server&#8217;s hostname. On a bare metal or VM setup, that hostname is immutable. You set it once, it never changes.</p>
<p>In Docker, not so much. By default, Docker does set a container’s hostname to its short container ID — a random hash that changes at every docker run or container recreation. Swarm makes it even worse as it also rotates task IDs on every redeployment, so even if we would try and rely on some predictable naming pattern, Swarm would break it further. A task that was replica_1.1.xk3f8a9b2c becomes replica_1.1.yz9q2m7nkp after redeployment.</p>
<p>So on the previous deployment, the relay logs were named something like xk3f8a9b2c-relay-bin.000001. On the new deployment, the relay log index file references those old names. The new container starts up, checks the index, finds filenames that don&#8217;t match its own generated basename (yz9q2m7nkp-relay-bin.000001) , can&#8217;t locate the relay logs, and replication fails to resume.</p>
<p>The root cause : i had not explicitly set the relay log basename in configuration files. I had set everything else. Just not that.</p>
<p>Fixing it only took one line in my.cnf. Yes, one line and voilà !</p>
<pre>relay_log          = relay-bin</pre>
<p>Hardcoding the relay log basename decouples replication state from container identity. Whatever hostname Docker Swarm decides to assign to the replica container, the relay log filenames stay constant. Replication resumes cleanly.</p>
<p>While you’re at it, a few other directives are worth reviewing in any containerized replication setup :</p>
<ul>
<li>log_slave_updates = 1 — useful if you ever plan to chain replicas or use the replicas as a source for another downstream replica. Good habit regardless.</li>
<li>relay_log_purge = 1 — keeps relay logs cleaned up automatically. In a container environment with limited storage you really want this on.</li>
<li>relay_log_recovery = 1 — instructs the replica to recover relay log state from the master position on startup rather than relying on the relay log index. A solid safety net in ephemeral environments.</li>
<li>expire_logs_days = 5 — instructs the replica to delete any binary log file in which the last event is older than 5 days. Helps with disk capacity planning.</li>
</ul>
<p>MaxScale was configured to monitor replication state on the replicas. And it did exactly what it was supposed to : the moment replication stopped, it pulled both replicas out of the read pool and flagged them as unavailable.</p>
<p>MaxScale hid this bug from the app as expected. It also helped notice the issue. Proper replication monitoring in your proxy layer is not optional.</p>
<p>One missing line in a configuration file ended up with three hours of head-scratching because of the following (wrong) assumptions :</p>
<ol>
<li><strong>Docker Swarm and stateful services do not share the same concept of identity.</strong> Containers are stateless disposable resources, cattle. Rename, kill, redeploy as you see fit. Databases on the other hand are very much stateful. Stability is an implicit contract, including the hostname.</li>
<li><strong>Config-as-code is not the same as config completeness.</strong> The GitLab-driven deployment pipeline was running smooth. The config was versioned, reviewed, deployed automatically. The pipeline does exactly what it is instructed to, it does not tell what one forgot.</li>
<li><strong>Any MariaDB system variable that derives its default from a system value is a redeployment time-bomb in orchestrated environments.</strong> relay_log is the one that got our focus here. But the same logic applies to many other variables. If you run MariaDB in a stateless environment set these explicitly. Always.</li>
</ol>
<p>Stateful services in stateless environments will always bite back if you let the environment make assumptions on your behalf. The fix is one line but the overall lesson is to never let the orchestrator decide what you should control.</p>
<p>Lessons learned !!</p>
<p>If you’ve ever spent an afternoon staring at SHOW SLAVE STATUS wondering why a cluster that worked yesterday doesn&#8217;t work today after a &#8220;routine&#8221; redeployment — I hope this saves you some trouble.</p>
<p>Do not hesitate to <a href="https://arbaudie.it/">reach out</a> if you want to discuss your replication architecture or containerized database setup.</p>
<p><img loading="lazy" decoding="async" src="https://medium.com/_/stat?event=post.clientViewed&amp;referrerSource=full_rss&amp;postId=556c179783cc" width="1" height="1" alt=""></p>
<p><a href="https://medium.com/@arbaudie.it/i-got-swarmed-by-a-replication-issue-556c179783cc?source=rss-c779d007e7fe------2">I got swarmed by a replication issue</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>The Percona Community Slack is open — come hang out</title>
        <link>https://percona.community/blog/2026/06/02/percona-community-slack-open/</link>
        <pubDate>Tue, 02 Jun 2026 11:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/the-percona-community-slack-is-open-come-hang-out/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>The Percona Community Slack is open — come hang out There’s a new place for the people behind the databases to actually talk to each other.</p>
<p><a href="https://percona.community/blog/2026/06/02/percona-community-slack-open/">The Percona Community Slack is open — come hang out</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<h1>The Percona Community Slack is open — come hang out</h1>
<p>There’s a new place for the people behind the databases to actually talk to each other.</p>
<p>The Percona Community Slack is open. Right now it’s one channel — General — and that’s intentional. It’s a place for DBAs, developers, contributors, and database people of all kinds to meet, swap stories, and get to know who else is out there running open source databases for a living. No silos. No sub-channels for every topic. Just a room.</p>
<h2>What it’s for</h2>
<p>Come here to talk shop. Share what you’re building, breaking, or fixing. Post about the migration that went sideways, the config that finally clicked, the pager incident you survived. Ask the kind of questions that belong in a conversation rather than a ticket — “how do other people handle X?” is exactly the right energy.</p>
<p>It’s also where we’ll share events we’re attending and, when we have tickets or a spare seat, offer them to the community first. If Percona is heading to a conference near you, this is where you’ll hear about it. And if you’re going somewhere yourself — a meetup, a conference, a local user group — tell us. There might be community members nearby who want to meet up.</p>
<p>That’s the point, really. Less broadcast, more conversation.</p>
<h2>What it’s not for</h2>
<p>Technical support questions belong on the <a href="https://forums.percona.com/" target="_blank" rel="noopener noreferrer">Percona Community Forums</a>. Forum answers are searchable and don’t disappear into scrollback. Percona engineers and experienced community members watch the forums for questions. Your problem is more likely to get a useful answer there — and it’ll help the person who hits the same issue three months from now.</p>
<p>If you post a support question in Slack, expect to be pointed to the forums. That’s not a brush-off.</p>
<h2>A few things that make this work</h2>
<p><strong>Introduce yourself.</strong> One or two sentences about what you work on and where in the world you are. That’s it. You don’t need a bio.</p>
<p><strong>Share what you’re up to.</strong> An event you’re going to, a tool you’ve been testing, a war story from production. The low-key post about a thing you just dealt with is exactly what people come here for.</p>
<p><strong>Lurk freely.</strong> You don’t have to post to belong. Read, learn, jump in when you have something to say.</p>
<h2>The short version of the rules</h2>
<p>Be the person you’d want to share an on-call rotation with.</p>
<p>Treat everyone as a peer. Assume good faith. No harassment. Critique technology on technical merits. Don’t cold-DM people with pitches. Keep private things private. If something needs a moderator’s attention, DM one directly — reports stay confidential.</p>
<h2>Come in</h2>
<p>If you’re a DBA, a developer, a contributor, or just someone who runs databases and occasionally wants to talk to other people who run databases — you belong here.</p>
<p><a href="https://join.slack.com/t/percona/shared_invite/zt-3zqzw80xz-864PxCOIiiilYSVMnoN5ow" target="_blank" rel="noopener noreferrer">Join the Percona Community Slack →</a></p>
<p><a href="https://percona.community/blog/2026/06/02/percona-community-slack-open/">The Percona Community Slack is open — come hang out</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Building Smart Semantic Search using PostgreSQL and pgvector. Case Study &#8211; Part 2 &#8211; Postgres Layer</title>
        <link>https://percona.community/blog/2026/05/31/semantic-search-on-postgresql-part-2/</link>
        <pubDate>Sun, 31 May 2026 11:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/building-smart-semantic-search-using-postgresql-and-pgvector-case-study-part-2-postgres-layer/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>I’ll explain how I built the Postgres layer for semantic vector search on the Percona Community website: pgvector, chunks, two table modifications, the database schema, how the indexer populates Postgres, and what the SELECT statement looks like during a search.</p>
<p><a href="https://percona.community/blog/2026/05/31/semantic-search-on-postgresql-part-2/">Building Smart Semantic Search using PostgreSQL and pgvector. Case Study &#8211; Part 2 &#8211; Postgres Layer</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>I’ll explain how I built the <strong>Postgres layer</strong> for semantic vector search on the Percona Community website: pgvector, chunks, two table modifications, the database schema, how the indexer populates Postgres, and <strong>what the SELECT statement looks like during a search</strong>.</p>
<blockquote>
<p><a href="https://percona.community/blog/2026/05/29/semantic-search-on-postgresql-part-1/">Part 1</a>: why semantic search, what’s already working on the site, the widget, and an overview of the stack.</p>
</blockquote>
<p><figure><img decoding="async" width="2496" height="1708" src="https://percona.community/blog/2026/05/search-part-2-postgres-website-search_hu_40abd7714926c564.webp" alt="Percona.community website search" loading="lazy"></figure>
</p>
<h2>Architecture</h2>
<p>Search runs separately from the website at <strong>search.percona.community</strong>: FastAPI, a background indexer, and PostgreSQL with pgvector are all in a single Docker Compose file. <a href="https://percona.community/" target="_blank" rel="noopener noreferrer">percona.community</a> remains static on Hugo and GitHub Pages, it doesn’t write directly to the database.</p>
<pre class="mermaid">
flowchart TB
subgraph users["Users"]
direction TB
User(["User"]) --&gt; Widget["Widget · percona.community"]
Admin(["Admin"]) --&gt; Dash["Admin dashboard · /demo"]
Site["Site · RSS + HTML"]
end
subgraph app["Application"]
direction TB
API["FastAPI · search.percona.community"]
Model["nomic-embed-text-v1"]
Worker["Indexer worker"]
API --&gt;|embed query| Model
Model --&gt;|embedding| API
Worker --&gt;|embed chunks| Model
Model --&gt;|embeddings| Worker
end
subgraph data["Database"]
direction TB
DB[("PostgreSQL + pgvector")]
end
Widget --&gt; API
Dash --&gt; API
Site --&gt; Worker
API --&gt;|read vectors · write queue/history| DB
Worker --&gt;|write vectors · read queue| DB
</pre>
<h3>Search</h3>
<p>A visitor enters a query into the widget. The widget sends a <code>POST /search</code> request to FastAPI. The service computes the query embedding with nomic with the prefix <code>search_query:</code> and searches for the nearest vectors in Postgres. The widget knows nothing about pgvector, it only receives JSON with links.</p>
<h3>Admin dashboard</h3>
<p>On the same FastAPI service I run an admin dashboard at <code>/demo</code>: test queries, search history, a database summary, viewing documents and chunks. The dashboard does not talk to Postgres directly, it only calls the API; the API reads and writes Postgres (<code>search_history</code>, <code>index_queue</code>, search results).</p>
<p><figure><img decoding="async" width="2364" height="1706" src="https://percona.community/blog/2026/05/search-part-2-postgres-dashboard-status_hu_494ee04c729ede44.webp" alt="Admin dashboard - Dashboard" loading="lazy"></figure>
</p>
<h3>Indexing</h3>
<p>To refresh the index, I click <strong>Start Indexing</strong> in the dashboard, that hits <code>POST /index/start</code>. The same endpoint can be called from outside: a GitHub webhook after a push to the site repo, cron, or curl while debugging. FastAPI enqueues the job in <code>index_queue</code>. A worker in the indexer container picks it up, downloads RSS and HTML from the site, splits text into chunks, computes vectors with nomic (<code>search_document:</code>), and writes to <code>pages</code>, <code>community_nomic</code>, and <code>indexer_runs</code>. The crawl runs in the background and does not block HTTP.</p>
<p><figure><img decoding="async" width="2262" height="1648" src="https://percona.community/blog/2026/05/search-part-2-postgres-dashboard-index_hu_45ebee06af7e8f31.webp" alt="Admin dashboard - Indexing" loading="lazy"></figure>
</p>
<p>Important limitation: the indexer and the API must use the same embedding model. The query vector and the vectors in the database must be from the same space, otherwise, cosine similarity doesn’t make sense.</p>
<h2>pgvector in Postgres</h2>
<p>For semantic search, you don’t need an LLM, but an <strong>embedding model</strong>: a string as input, a vector as output. I chose <strong>nomic-embed-text-v1</strong>, 768-dimensional, running via <code>sentence-transformers</code> on the CPU, without a paid API.</p>
<p>I’m using <strong><a href="https://docs.percona.com/postgresql/18/index.html" target="_blank" rel="noopener noreferrer">Percona Distribution for PostgreSQL 18</a></strong>, pgvector is already included in the distribution; <code>CREATE EXTENSION vector</code>, and you’re done (<a href="https://docs.percona.com/postgresql/18/enable-extensions.html#pgvector" target="_blank" rel="noopener noreferrer">documentation</a>).</p>
<p>The basic structure is a column with <strong>fixed dimensions</strong> for the model:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">CREATE</span><span class="w"> </span><span class="n">EXTENSION</span><span class="w"> </span><span class="k">IF</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">EXISTS</span><span class="w"> </span><span class="n">vector</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">CREATE</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">chunks</span><span class="w"> </span><span class="p">(</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">id</span><span class="w"> </span><span class="nb">SERIAL</span><span class="w"> </span><span class="k">PRIMARY</span><span class="w"> </span><span class="k">KEY</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">chunk_text</span><span class="w"> </span><span class="nb">TEXT</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">embedding</span><span class="w"> </span><span class="n">vector</span><span class="p">(</span><span class="mi">768</span><span class="p">)</span><span class="w"> </span><span class="c1">-- exactly 768 under nomic
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="p">);</span></span></span></code></pre>
</div>
</div>
</div>
<p>In the project, the table is named <code>community_nomic</code>: the prefix <code>community_</code> (site) + the model key <code>nomic</code>. I’m setting up a comparison of embedding models: <strong>each</strong> model has <strong>its own</strong> vector table (<code>community_</code>), because the dimensions and embedding spaces are different, so they can’t be mixed in a single table. Currently, there is one model in the project, <strong>nomic-embed-text-v1</strong>, 768 dimensions; later, I can add a second table <code>community_</code> and switch the index/API via <code>EMBEDDING_MODEL_KEY</code>.</p>
<p>pgvector compares vectors with several <strong>distance operators</strong>. I search with <strong>cosine distance</strong> (the <code></code> operator in SQL): the smaller the distance, the closer the match. In the widget and API I show <strong>similarity</strong>, not the raw distance, <code>similarity = 1 - distance</code>, so a higher score means a better hit. The operators:</p>
<table>
<thead>
<tr>
<th>Operator</th>
<th>When useful</th>
</tr>
</thead>
<tbody>
<tr>
<td><code></code></td>
<td>L2 (Euclidean)</td>
</tr>
<tr>
<td><code></code></td>
<td>inner product</td>
</tr>
<tr>
<td><code></code></td>
<td><strong>cosine</strong>, my choice for nomic</td>
</tr>
</tbody>
</table>
<p>Simplified search for “nearest chunks”:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-2" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SELECT</span><span class="w"> </span><span class="n">slug</span><span class="p">,</span><span class="w"> </span><span class="n">chunk_text</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="p">(</span><span class="n">embedding</span><span class="w"> </span><span class="o"></span><span class="w"> </span><span class="err">$</span><span class="n">query_vector</span><span class="p">)</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="n">score</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">FROM</span><span class="w"> </span><span class="n">community_nomic</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">ORDER</span><span class="w"> </span><span class="k">BY</span><span class="w"> </span><span class="n">embedding</span><span class="w"> </span><span class="o"></span><span class="w"> </span><span class="err">$</span><span class="n">query_vector</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">LIMIT</span><span class="w"> </span><span class="mi">20</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>The threshold in the API is <code>min_score</code> (my default is <strong>0.52</strong>): anything lower is discarded. On beta I tuned this number for a while, the results changed noticeably depending on this single parameter.</p>
<p>To avoid scanning the entire table as the index grows, I set up an <strong>HNSW</strong> index (approximate nearest neighbor search):</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-3" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">CREATE</span><span class="w"> </span><span class="k">INDEX</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="n">community_nomic</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">USING</span><span class="w"> </span><span class="n">hnsw</span><span class="w"> </span><span class="p">(</span><span class="n">embedding</span><span class="w"> </span><span class="n">vector_cosine_ops</span><span class="p">);</span></span></span></code></pre>
</div>
</div>
</div>
<p>At this scale, a separate vector database wasn’t necessary, a single Postgres instance handles metadata, vectors, and search.</p>
<h2>Postgres in Docker: <code>docker-compose</code></h2>
<p>I set up the stack using <strong>Docker Compose</strong>, Postgres, the API, and the indexer are all in containers, with the same setup locally and in production. Production, <strong>EC2 on AWS</strong> (<code>search.percona.community</code>), an ARM instance, using the same <code>docker-compose</code>.</p>
<p>In <code>docker-compose.yml</code>, Postgres on Percona looks like this (on Mac ARM):</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">yaml</span><button class="code-block__copy" type="button" data-copy-target="codeblock-4" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">postgres</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l">percona/percona-distribution-postgresql:18.1-3-arm64</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">environment</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">POSTGRES_USER</span><span class="p">:</span><span class="w"> </span><span class="l">postgres</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">POSTGRES_PASSWORD</span><span class="p">:</span><span class="w"> </span><span class="l">postgres</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">POSTGRES_DB</span><span class="p">:</span><span class="w"> </span><span class="l">community_search</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">ports</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="s2">"5433:5432"</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">volumes</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">pgdata:/var/lib/postgresql/data</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">./init:/docker-entrypoint-initdb.d</span></span></span></code></pre>
</div>
</div>
</div>
<p>In <code>init/01-enable-pgvector.sql</code>, include only <code>CREATE EXTENSION IF NOT EXISTS vector</code>. If you’re developing on <strong>x86</strong>, <strong>use</strong> amd64 in the image tag instead of <code>arm64</code>, see the options in the <a href="https://docs.percona.com/postgresql/18/index.html" target="_blank" rel="noopener noreferrer">Percona documentation</a>. I left <strong>arm64</strong> on both Mac and EC2: the configuration is the same.</p>
<p>I view the tables and data in <strong>pgAdmin</strong>. The <code>pages</code>, <code>community_nomic</code>, and service tables themselves are created when the API and indexer start using <code>ensure_*</code> functions in the code: these are <code>CREATE TABLE IF NOT EXISTS</code> and <code>CREATE INDEX IF NOT EXISTS</code>, not a separate migration directory.</p>
<h2>Indexing and Chunking</h2>
<p>The site doesn’t write directly to the database, the database is populated by an <strong>indexer</strong>: a worker fetches RSS and HTML from <a href="https://percona.community/" target="_blank" rel="noopener noreferrer">percona.community</a>, splits the text into chunks, computes embeddings, and writes the rows to <code>community_nomic</code> and <code>pages</code>. The widget and API only read what has already been written during searches.</p>
<h3>Why Chunks</h3>
<p>At first, I tried <strong>a single vector for the entire article</strong>. I quickly ran into three problems:</p>
<ul>
<li>Long text takes longer to encode and consumes more memory;</li>
<li>The model has an input length limit;</li>
<li>a single vector for long text <strong>blurs</strong> the meaning, a query about a specific paragraph doesn’t map well to the “averaged” embedding of the entire article.</li>
</ul>
<p>I settled on a <strong>400-word</strong> window with a <strong>50</strong>-word overlap (<code>chunker.py</code>). Each chunk is a separate line with its own <code>embedding</code>.</p>
<p>The first version of the chunker sliced <strong>only the body</strong> of the article, without the title, author, date, or tags. For queries like “articles by a certain author,” the results were off: the model saw the text but not the document’s context. I added <strong>metadata to each chunk</strong>, a <code>Title / Author / Date / Tags / Type</code> block at the beginning of each fragment before calculating the vector.</p>
<p><figure><img decoding="async" width="2068" height="1574" src="https://percona.community/blog/2026/05/search-part-2-postgres-dashboard-chunking_hu_448f58d17c5cf19c.webp" alt="Admin dashboard - Chunking" loading="lazy"></figure>
</p>
<p>When searching, the API finds the closest chunks, but the card shows <strong>the best chunk for the document</strong> (one <code>slug</code>, one card). Without this, a long article would clutter the results with multiple lines.</p>
<h2>Database Schema: Two Revisions of the Chunk Tables</h2>
<p>I revised the chunk storage schema <strong>twice</strong>, and separately added utility tables for background indexing and search logs.</p>
<h3>Version 1: Everything in a Single Table</h3>
<p>The first working schema was <strong>a single table for all chunks and document information</strong>: each row represented a single article fragment, and it also contained duplicated page metadata (<strong>url, title, author, date, tags, content_type</strong>) along with <code>chunk_text</code> and <code>embedding</code>.</p>
<p>Pros: one <code>INSERT</code>, one <code>SELECT</code>, no joins.</p>
<p>Cons I encountered:</p>
<ul>
<li>one article, dozens of identical copies of title and author;</li>
<li>when updating a page, it’s easy to get out of sync (one title in chunk #0, another in chunk #3);</li>
<li>fetching the image and description for the card from <code>chunk_text</code> was unreliable.</li>
</ul>
<p>Conclusion: A <strong>vector layer</strong> and a <strong>card in the UI</strong> serve different purposes.</p>
<p>The code still includes <code>_migrate_chunks_table</code>: when the API and indexer start up (inside <code>ensure_content_table</code>), it drops any extra columns from the chunk table if they are left over from the old prototype.</p>
<h3>Version 2: <code>pages</code> + <code>community_nomic</code></h3>
<p>I split the data into two tables:</p>
<ul>
<li><strong><code>pages</code></strong>, one row per document: url, title, type, author, date, tags, images, description.</li>
<li><strong><code>community_nomic</code></strong>, only chunks: slug, chunk_index, chunk_text, embedding.</li>
</ul>
<p>They are linked by <code>slug</code> (stable key from the URL). Search: find the nearest chunks in <code>community_nomic</code>, assemble the card from <code>pages</code>.</p>
<p>In the admin dashboard I can open any indexed document and see what landed in <code>pages</code> (metadata, image, description) and what text was split into chunks.</p>
<p><figure><img decoding="async" width="2234" height="1192" src="https://percona.community/blog/2026/05/search-part-2-postgres-dashboard-details_hu_280bec26c6ad4f25.webp" alt="Admin dashboard, document details (pages) and chunks" loading="lazy"></figure>
</p>
<p>HNSW on <code>community_nomic</code>:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-5" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">CREATE</span><span class="w"> </span><span class="k">INDEX</span><span class="w"> </span><span class="p">...</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="n">community_nomic</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">USING</span><span class="w"> </span><span class="n">hnsw</span><span class="w"> </span><span class="p">(</span><span class="n">embedding</span><span class="w"> </span><span class="n">vector_cosine_ops</span><span class="p">);</span></span></span></code></pre>
</div>
</div>
</div>
<p>That’s why, when switching models, I don’t reuse <code>community_nomic</code>; instead, I create a new table and re-index it. A single search query involves vectors from <strong>only one</strong> model, both during indexing and in the API.</p>
<h2>Indexer: RSS, HTTP, and Queue</h2>
<p>The indexer is a separate container that crawls <a href="https://percona.community/" target="_blank" rel="noopener noreferrer">percona.community</a> and populates the database. It starts with <strong>RSS</strong>, four feeds:</p>
<ul>
<li><a href="https://percona.community/blog/index.xml" target="_blank" rel="noopener noreferrer">blog/index.xml</a></li>
<li><a href="https://percona.community/events/index.xml" target="_blank" rel="noopener noreferrer">events/index.xml</a></li>
<li><a href="https://percona.community/talks/index.xml" target="_blank" rel="noopener noreferrer">talks/index.xml</a></li>
<li><a href="https://percona.community/contributors/index.xml" target="_blank" rel="noopener noreferrer">contributors/index.xml</a></li>
</ul>
<p>RSS feeds contain a title, link, date, author, tags, and often a short description, but <strong>not the full text of the article</strong>. For each entry, I perform an <strong>HTTP GET</strong> on the HTML page and extract the main content (in <code>crawler.py</code>). If the HTML is empty, I fall back to the description from the RSS feed.</p>
<p>The <strong>Index</strong> and <strong>Status</strong> tabs in the dashboard, without them, debugging the crawl and embedding would have been a guessing game.</p>
<p><figure><img decoding="async" width="2016" height="1622" src="https://percona.community/blog/2026/05/search-part-2-postgres-dashboard-index-running_hu_8d5557a28fba57a9.webp" alt="Admin dashboard - Index Running" loading="lazy"></figure>
</p>
<p><figure><img decoding="async" width="1986" height="690" src="https://percona.community/blog/2026/05/search-part-2-postgres-dashboard-index-history_hu_50a243ec8175dee5.webp" alt="Admin dashboard - Index history" loading="lazy"></figure>
</p>
<p><figure><img decoding="async" width="2078" height="1324" src="https://percona.community/blog/2026/05/search-part-2-postgres-dashboard-index-stats_hu_c4c215e93a9a0c6a.webp" alt="Admin dashboard - Index overview" loading="lazy"></figure>
</p>
<h2>Table Schema</h2>
<p>All tables are created when the API and indexer start (<code>ensure_*</code> in code, <code>CREATE TABLE IF NOT EXISTS</code>, <code>CREATE INDEX IF NOT EXISTS</code>). There is no separate migrations folder. I don’t use foreign keys between search and utility tables: reindexing deletes and re-inserts rows by <code>slug</code>, and the queue tables are only loosely linked.</p>
<h3>Search data</h3>
<p><strong><code>pages</code></strong> and <strong><code>community_nomic</code></strong> are linked by <code>slug</code> (no FK). The indexer writes both; the API reads them on <code>POST /search</code>.</p>
<h4>pages</h4>
<p>One row per document.</p>
<table>
<thead>
<tr>
<th>Column</th>
<th>Type</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>slug</code></td>
<td>TEXT</td>
<td>primary key, stable key from the URL</td>
</tr>
<tr>
<td><code>url</code></td>
<td>TEXT</td>
<td>canonical link (UNIQUE)</td>
</tr>
<tr>
<td><code>content_type</code></td>
<td>TEXT</td>
<td>blog, event, talk, contributor</td>
</tr>
<tr>
<td><code>title</code></td>
<td>TEXT</td>
<td>card title</td>
</tr>
<tr>
<td><code>date</code></td>
<td>TEXT</td>
<td>publication date from RSS/HTML</td>
</tr>
<tr>
<td><code>author</code></td>
<td>TEXT</td>
<td>author name</td>
</tr>
<tr>
<td><code>tags</code></td>
<td>TEXT[]</td>
<td>tags for search and chunk metadata</td>
</tr>
<tr>
<td><code>image_url</code></td>
<td>TEXT</td>
<td>full image from the site</td>
</tr>
<tr>
<td><code>image_thumb_url</code></td>
<td>TEXT</td>
<td>smaller image for the widget popup</td>
</tr>
<tr>
<td><code>description</code></td>
<td>TEXT</td>
<td>short description for the card</td>
</tr>
<tr>
<td><code>updated_at</code></td>
<td>TIMESTAMPTZ</td>
<td>last time the row was indexed</td>
</tr>
</tbody>
</table>
<h4>community_nomic</h4>
<p>Chunks and vectors (table name = site + model key).</p>
<table>
<thead>
<tr>
<th>Column</th>
<th>Type</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>id</code></td>
<td>SERIAL</td>
<td>primary key</td>
</tr>
<tr>
<td><code>slug</code></td>
<td>TEXT</td>
<td>link to <code>pages</code></td>
</tr>
<tr>
<td><code>chunk_index</code></td>
<td>INT</td>
<td>chunk position in the document (UNIQUE with <code>slug</code>)</td>
</tr>
<tr>
<td><code>chunk_text</code></td>
<td>TEXT</td>
<td>text passed to the embedding model</td>
</tr>
<tr>
<td><code>embedding</code></td>
<td>vector(768)</td>
<td>nomic vector for cosine search</td>
</tr>
</tbody>
</table>
<h3>Utility</h3>
<p>Three small tables for indexing and debugging.</p>
<h4>index_queue</h4>
<p>Pending jobs. Written by the API.</p>
<table>
<thead>
<tr>
<th>Column</th>
<th>Type</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>id</code></td>
<td>SERIAL</td>
<td>primary key</td>
</tr>
<tr>
<td><code>created_at</code></td>
<td>TIMESTAMPTZ</td>
<td>when the job was queued</td>
</tr>
<tr>
<td><code>status</code></td>
<td>TEXT</td>
<td>pending, running, done, cancelled</td>
</tr>
<tr>
<td><code>model</code></td>
<td>TEXT</td>
<td>embedding model key (<code>nomic</code>)</td>
</tr>
<tr>
<td><code>feeds</code></td>
<td>TEXT</td>
<td>RSS feed URLs (comma-separated)</td>
</tr>
<tr>
<td><code>crawl_delay</code></td>
<td>FLOAT</td>
<td>pause between HTTP requests (seconds)</td>
</tr>
<tr>
<td><code>limit_per_type</code></td>
<td>INT</td>
<td>cap per content type (partial reindex)</td>
</tr>
<tr>
<td><code>run_id</code></td>
<td>INT</td>
<td><code>indexer_runs.id</code> once the worker starts</td>
</tr>
<tr>
<td><code>cancel_requested</code></td>
<td>BOOLEAN</td>
<td>cancel flag from the dashboard</td>
</tr>
</tbody>
</table>
<h4>indexer_runs</h4>
<p>Crawl progress. Written by the indexer worker.</p>
<table>
<thead>
<tr>
<th>Column</th>
<th>Type</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>id</code></td>
<td>SERIAL</td>
<td>primary key</td>
</tr>
<tr>
<td><code>started_at</code></td>
<td>TIMESTAMPTZ</td>
<td>run start</td>
</tr>
<tr>
<td><code>finished_at</code></td>
<td>TIMESTAMPTZ</td>
<td>run end</td>
</tr>
<tr>
<td><code>status</code></td>
<td>TEXT</td>
<td>running, done, error, cancelled</td>
</tr>
<tr>
<td><code>model</code></td>
<td>TEXT</td>
<td>embedding model key</td>
</tr>
<tr>
<td><code>total_docs</code></td>
<td>INT</td>
<td>documents processed</td>
</tr>
<tr>
<td><code>total_chunks</code></td>
<td>INT</td>
<td>chunks written</td>
</tr>
<tr>
<td><code>current_url</code></td>
<td>TEXT</td>
<td>page being crawled</td>
</tr>
<tr>
<td><code>current_doc_num</code></td>
<td>INT</td>
<td>document counter</td>
</tr>
<tr>
<td><code>errors</code></td>
<td>INT</td>
<td>error count</td>
</tr>
<tr>
<td><code>message</code></td>
<td>TEXT</td>
<td>status or error text</td>
</tr>
</tbody>
</table>
<h4>search_history</h4>
<p>Search log. Written by the API on each <code>POST /search</code>.</p>
<table>
<thead>
<tr>
<th>Column</th>
<th>Type</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>id</code></td>
<td>SERIAL</td>
<td>primary key</td>
</tr>
<tr>
<td><code>created_at</code></td>
<td>TIMESTAMPTZ</td>
<td>query time</td>
</tr>
<tr>
<td><code>query</code></td>
<td>TEXT</td>
<td>user query</td>
</tr>
<tr>
<td><code>content_type</code></td>
<td>TEXT</td>
<td>filter: all or one type</td>
</tr>
<tr>
<td><code>limit_requested</code></td>
<td>INT</td>
<td>requested result limit</td>
</tr>
<tr>
<td><code>results_count</code></td>
<td>INT</td>
<td>rows returned</td>
</tr>
<tr>
<td><code>chunks_in_index</code></td>
<td>INT</td>
<td>snapshot: chunk count at query time</td>
</tr>
<tr>
<td><code>by_type</code></td>
<td>JSONB</td>
<td>hit counts per content type</td>
</tr>
<tr>
<td><code>prepare_ms</code></td>
<td>REAL</td>
<td>API timing breakdown</td>
</tr>
<tr>
<td><code>model_load_ms</code></td>
<td>REAL</td>
<td>model load time</td>
</tr>
<tr>
<td><code>embed_ms</code></td>
<td>REAL</td>
<td>embedding time</td>
</tr>
<tr>
<td><code>db_ms</code></td>
<td>REAL</td>
<td>Postgres search time</td>
</tr>
<tr>
<td><code>format_ms</code></td>
<td>REAL</td>
<td>JSON formatting time</td>
</tr>
<tr>
<td><code>total_ms</code></td>
<td>REAL</td>
<td>end-to-end time</td>
</tr>
<tr>
<td><code>model</code></td>
<td>TEXT</td>
<td>embedding model key</td>
</tr>
</tbody>
</table>
<h3>Indexes</h3>
<p>Created in the same <code>ensure_*</code> functions as the tables. Besides primary keys and <code>UNIQUE</code> on <code>pages.url</code> and <code>(slug, chunk_index)</code> in <code>community_nomic</code>:</p>
<ul>
<li><strong><code>pages_content_type_idx</code></strong> on <code>content_type</code>, filter by blog / event / talk / contributor in search;</li>
<li><strong><code>community_nomic_embedding_idx</code></strong>, <strong>HNSW</strong> on <code>embedding</code> (<code>vector_cosine_ops</code>); without it, nearest-neighbor search would scan the whole table as chunks grow;</li>
<li><strong><code>community_nomic_slug_idx</code></strong> on <code>slug</code>, delete all chunks for one document on reindex;</li>
<li><strong><code>search_history_created_at_idx</code></strong>, recent queries first in the dashboard History tab.</li>
</ul>
<p><code>index_queue</code> and <code>indexer_runs</code> only have a serial primary key, few rows, a full scan is fine.</p>
<h2>How Postgres Responds to a Search Query</h2>
<p>The API receives the query text, computes a vector with nomic (<code>search_query:</code> + text), and runs SQL that finds the nearest chunks and joins row metadata from <code>pages</code>.</p>
<h3>The First Query Was Naive</h3>
<p>At first, I did what the pgvector tutorials suggest, “find the 20 closest vectors”:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-6" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SELECT</span><span class="w"> </span><span class="n">slug</span><span class="p">,</span><span class="w"> </span><span class="n">chunk_index</span><span class="p">,</span><span class="w"> </span><span class="n">chunk_text</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="p">(</span><span class="n">embedding</span><span class="w"> </span><span class="o"></span><span class="w"> </span><span class="err">$</span><span class="n">query_vector</span><span class="p">)</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="n">score</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">FROM</span><span class="w"> </span><span class="n">community_nomic</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">ORDER</span><span class="w"> </span><span class="k">BY</span><span class="w"> </span><span class="n">embedding</span><span class="w"> </span><span class="o"></span><span class="w"> </span><span class="err">$</span><span class="n">query_vector</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">LIMIT</span><span class="w"> </span><span class="mi">20</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>The query <strong>worked</strong>, but the results were incorrect from a UI perspective. It returns <strong>20 chunks</strong>, not <strong>20 documents</strong>. A long article with fifteen chunks could take up <strong>half the list</strong> with a single <code>slug</code>; a short post with one good paragraph didn’t make it to the top. The user sees <strong>pages</strong> (cards with links), but we search the database by <strong>chunks</strong>, I close that gap in SQL.</p>
<h3>What I do now</h3>
<ol>
<li><strong>Join</strong> <code>community_nomic</code> + <code>pages</code> by <code>slug</code>.</li>
<li><code>ROW_NUMBER() PARTITION BY slug</code>, I keep <strong>one</strong> best chunk per document.</li>
<li><code>WHERE score &gt;= min_score</code> (default <strong>0.52</strong>).</li>
<li><code>ORDER BY score DESC LIMIT N</code>.</li>
</ol>
<p>Simplified version of the final query:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-7" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">WITH</span><span class="w"> </span><span class="n">ranked</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="p">(</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">SELECT</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">url</span><span class="p">,</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">title</span><span class="p">,</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">content_type</span><span class="p">,</span><span class="w"> </span><span class="k">c</span><span class="p">.</span><span class="n">slug</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="p">(</span><span class="k">c</span><span class="p">.</span><span class="n">embedding</span><span class="w"> </span><span class="o"></span><span class="w"> </span><span class="err">$</span><span class="n">query_vector</span><span class="p">)</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="n">score</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">ROW_NUMBER</span><span class="p">()</span><span class="w"> </span><span class="n">OVER</span><span class="w"> </span><span class="p">(</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">PARTITION</span><span class="w"> </span><span class="k">BY</span><span class="w"> </span><span class="k">c</span><span class="p">.</span><span class="n">slug</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">ORDER</span><span class="w"> </span><span class="k">BY</span><span class="w"> </span><span class="k">c</span><span class="p">.</span><span class="n">embedding</span><span class="w"> </span><span class="o"></span><span class="w"> </span><span class="err">$</span><span class="n">query_vector</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="n">rn</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">community_nomic</span><span class="w"> </span><span class="k">c</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">INNER</span><span class="w"> </span><span class="k">JOIN</span><span class="w"> </span><span class="n">pages</span><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">slug</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">c</span><span class="p">.</span><span class="n">slug</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c1">-- AND p.content_type = 'blog' -- optional: filter by type
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="p">),</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="n">best_per_page</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="p">(</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="k">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">ranked</span><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">rn</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">SELECT</span><span class="w"> </span><span class="n">url</span><span class="p">,</span><span class="w"> </span><span class="n">title</span><span class="p">,</span><span class="w"> </span><span class="n">content_type</span><span class="p">,</span><span class="w"> </span><span class="n">slug</span><span class="p">,</span><span class="w"> </span><span class="n">score</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">FROM</span><span class="w"> </span><span class="n">best_per_page</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">WHERE</span><span class="w"> </span><span class="n">score</span><span class="w"> </span><span class="o">&gt;=</span><span class="w"> </span><span class="mi">0</span><span class="p">.</span><span class="mi">52</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">ORDER</span><span class="w"> </span><span class="k">BY</span><span class="w"> </span><span class="n">score</span><span class="w"> </span><span class="k">DESC</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">LIMIT</span><span class="w"> </span><span class="mi">20</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<h3>Filtering by content type</h3>
<p>The site has blog, event, talk, and contributor, in the widget and on <code>/search/</code>, you can search for <strong>all at once</strong> or a single type. In the API, this is the <code>content_type</code> field in <code>POST /search</code>; in SQL, <code>AND p.content_type = %s</code> is added when a single type is selected.</p>
<h3>Sort order in the widget</h3>
<p>In SQL, results are ranked by similarity (<code>ORDER BY score DESC</code>), “what matches the query best?”</p>
<p>On a community site, <strong>recent material often matters as much as the top semantic match</strong>. An older article might score 0.71 while a newer post on the same topic scores 0.66. I still build the shortlist in SQL (one best chunk per document, <code>min_score</code> threshold), but the API then <strong>re-sorts blog, event, and talk by publication date</strong>, newest first. Contributors and rows without a date stay at the bottom.</p>
<p>The widget still shows the <strong>similarity score</strong> on each card so you can see why the page was included:</p>
<p><figure><img decoding="async" width="2426" height="1700" src="https://percona.community/blog/2026/05/search-part-2-postgres-widget-scores_hu_18e89fd6122bbc80.webp" alt="Widget search results with similarity scores" loading="lazy"></figure>
</p>
<h2>Summary</h2>
<p><strong>Postgres layer</strong>: I set this up without a separate vector DB, using pgvector in Percona, two table modifications for chunking, auxiliary tables for background indexing, HNSW, and SQL with “best-fit chunk per document.” The indexer processes RSS and HTML; I manage the database in pgAdmin.</p>
<p>Currently, the search index has about <strong>803</strong> documents and <strong>1,656</strong> vectors, thousands of rows, not billions. This is a community-scale setup: a single Postgres instance on EC2, embedding on the CPU, HNSW on all chunks, the solutions above were chosen with this in mind. When I add videos, GitHub issues, and the forum, the volume will grow, then I’ll re-evaluate the indexing time and hardware.</p>
<h3>Note from the author</h3>
<p>About <strong>six months ago</strong>, I already tried to set up something similar to Postgres + vectors using AI agents. Back then, I kept running into the same issues: a clunky <strong>startup</strong> of the environment, the <strong>schema</strong> and its <strong>modifications</strong>, <strong>initializing Percona Distribution for PostgreSQL</strong>, and pgvector, the agent would either skip a step or suggest incompatible configuration snippets.</p>
<p>This time, with <a href="https://percona.community/" target="_blank" rel="noopener noreferrer">percona.community</a>, went better: the agent set up Compose, <code>ensure_*</code>, search SQL, and the admin dashboard, without that series of failures at startup. More time was spent on the logic (chunks, <code>min_score</code>, result ordering) rather than on “why the database won’t start.”</p>
<p>If you try this setup yourself or notice any inaccuracies, please leave a comment.</p>
<p><a href="https://percona.community/blog/2026/05/31/semantic-search-on-postgresql-part-2/">Building Smart Semantic Search using PostgreSQL and pgvector. Case Study &#8211; Part 2 &#8211; Postgres Layer</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Building Smart Semantic Search using PostgreSQL and pgvector. Case Study &#8211; Part 1 &#8211; Introduction</title>
        <link>https://percona.community/blog/2026/05/29/semantic-search-on-postgresql-part-1/</link>
        <pubDate>Fri, 29 May 2026 11:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/building-smart-semantic-search-using-postgresql-and-pgvector-case-study-part-1-introduction/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>Type “zero downtime database migration” into the site’s search bar and you’ll get articles and talks about database migration with minimal downtime, even if those words aren’t in the titles or content. This is semantic search on PostgreSQL and pgvector, without paid embedding APIs or a separate vector database. In this series I’ll cover how it works and why I chose this stack.</p>
<p><a href="https://percona.community/blog/2026/05/29/semantic-search-on-postgresql-part-1/">Building Smart Semantic Search using PostgreSQL and pgvector. Case Study &#8211; Part 1 &#8211; Introduction</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Type “zero downtime database migration” into the site’s search bar and you’ll get articles and talks about database migration with minimal downtime, even if those words aren’t in the titles or content. This is <strong>semantic search</strong> on <strong>PostgreSQL</strong> and <strong><a href="https://github.com/pgvector/pgvector" target="_blank" rel="noopener noreferrer">pgvector</a></strong>, without paid embedding APIs or a separate vector database. In this series I’ll cover how it works and why I chose this stack.</p>
<p>I’ll walk through how and why I built the search for our community site: blog, events, talks, and profiles. The post should help if you want to repeat the approach or need a practical case study on simple components. If you’ve done something similar, I’d like to hear your feedback.</p>
<p><figure><img decoding="async" width="2238" height="1698" src="https://percona.community/blog/2026/05/search-part-1-intro-kubernetes_hu_be512b221b02d108.webp" alt="Smart Semantic Search using PostgreSQL and pgvector - Introduction" loading="lazy"></figure>
</p>
<h2>Context: Website, Search, and Task</h2>
<p>The community team has a website on <strong>Hugo</strong>, an open source static site generator, hosted for free on <strong>GitHub Pages</strong>. The site has articles, events, talks, videos, and more.</p>
<blockquote>
<p>If you’re thinking of starting your own, I recommend checking out these examples: <a href="https://blog.koehntopp.info/" target="_blank" rel="noopener noreferrer">blog.koehntopp.info</a>, <a href="https://openeverest.io/" target="_blank" rel="noopener noreferrer">openeverest.io</a>, <a href="https://perconalive.com/" target="_blank" rel="noopener noreferrer">perconalive.com</a>, <a href="https://oursqlfoundation.org/" target="_blank" rel="noopener noreferrer">oursqlfoundation.org</a></p>
</blockquote>
<p>But a Hugo site is a collection of HTML files without a backend. Search or filters only work via frontend JS or an external service. For a long time our site had no search at all. Then <strong>Kai Wagner</strong> contributed a JS search for the blog that matched exact words (<a href="https://percona.community/blog" target="_blank" rel="noopener noreferrer">percona.community/blog</a>).</p>
<p>Recently our community lead <strong>Laura Czajkowski</strong> asked for smart AI search on the site. We tried several off-the-shelf products; they were either too expensive or a poor fit. We also want search to cover more than the site itself eventually: videos from other platforms, the forum, our GitHub repos, and maybe documentation later.</p>
<p>I suggested building it ourselves. Modern AI assistants are good enough for a prototype like this. Below I’ll explain the stack.</p>
<h2>What We’ll Do</h2>
<p>The site stays on Hugo and GitHub Pages. The search service runs <strong>separately</strong>; for this architecture that’s the sensible option. The goal is simple: the user types a query in plain language and gets a list of semantically relevant links.</p>
<p>Kai’s keyword search was a step forward, but it doesn’t catch <strong>meaning</strong>. Type “postgresql” and you get pages where the word appears. An article about slow queries or replication may be missing if the wording is different. <strong>Semantic search</strong> works differently: the query and documents become <strong>vectors</strong>, numeric representations of meaning (<strong>embedding</strong>). Similar meaning lands nearby in vector space even when the words differ. A query like “how to speed up slow queries in MySQL” can surface tuning and optimization content without those words in the title.</p>
<p>Why not another engine? <strong><a href="https://opensearch.org/" target="_blank" rel="noopener noreferrer">OpenSearch</a></strong> is a solid open-source option: full-text and vector search, mature ecosystem. I also looked at <strong><a href="https://manticoresearch.com/" target="_blank" rel="noopener noreferrer">Manticore Search</a></strong>. Both work, but <strong>semantics</strong> still need an embedding pipeline (model at index time and on each query). That’s another service to run beside the model.</p>
<p>I wanted my own stack on <strong>Postgres</strong> with pgvector: a practical experiment, not a hunt for the perfect search product. <strong>PostgreSQL with <a href="https://github.com/pgvector/pgvector" target="_blank" rel="noopener noreferrer">pgvector</a></strong> keeps page metadata, chunks, vectors, and query history in one database. <strong><a href="https://docs.percona.com/postgresql/18/index.html" target="_blank" rel="noopener noreferrer">Percona Distribution for PostgreSQL 18</a></strong> ships pgvector in the distribution; run <code>CREATE EXTENSION vector</code> and you’re set.</p>
<p>The plan has four parts:</p>
<ol>
<li><strong>Widget</strong> on the site: search field and results (plain JS; Hugo unchanged).</li>
<li><strong>API</strong>: takes the query, embeds it with the same model as indexing, searches the DB, returns JSON links.</li>
<li><strong>Indexer</strong>: background worker that reads RSS/HTML, chunks text, embeds, writes to the DB.</li>
<li><strong>PostgreSQL + pgvector</strong>: one database for metadata, chunks, vectors, and search history.</li>
</ol>
<p>Hugo stays static; the smart parts live in a separate service. No separate vector DB, no paid embedding API, no RAG chat, only links.</p>
<p>The diagram shows two flows: <strong>search</strong> (user query) and <strong>indexing</strong> (refresh the DB on demand or on a schedule). Top to bottom, from the user:</p>
<pre class="mermaid">
flowchart TB
User(["<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f464.png" alt="👤" class="wp-smiley" style="height: 1em; max-height: 1em;" /> User"])
Widget["<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f50d.png" alt="🔍" class="wp-smiley" style="height: 1em; max-height: 1em;" /> JS widget<br>percona.community · GitHub Pages"]
API["<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/26a1.png" alt="⚡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> FastAPI<br>search.percona.community"]
Model["<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f9e0.png" alt="🧠" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Embedding model<br>shared · API &amp; indexer"]
DB[("<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f5c4.png" alt="🗄" class="wp-smiley" style="height: 1em; max-height: 1em;" /> PostgreSQL + pgvector")]
Content["<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4f0.png" alt="📰" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Content<br>blog · events · talks"]
Indexer["<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4e5.png" alt="📥" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Indexer worker"]
User --&gt;|"① query"| Widget
Widget --&gt;|"② POST /search"| API
API |embed query| Model
API |"③ vector search"| DB
API --&gt;|"④ results"| Widget
Widget --&gt; User
Content --&gt;|"A. RSS + HTML"| Indexer
Indexer |embed chunks| Model
Indexer --&gt;|"B. chunks + vectors"| DB
style User fill:#e1f5ff
style Widget fill:#fff4e6
style Content fill:#fff9e6
style API fill:#ffe6e6
style Model fill:#fff0f5
style Indexer fill:#f0e6ff
style DB fill:#e6ffe6
</pre>
<p>The diagram shows the shared <strong>embedding model</strong>; worth stating explicitly anyway. <strong>The indexer and the API must use the same model.</strong> Query vectors and stored vectors must share one space or search is meaningless. Don’t mix Nomic at index time with OpenAI at query time, for example. The widget only sends text; it doesn’t know which model runs behind the API.</p>
<p>On paper it looked simple. In practice I changed the database schema <strong>three times</strong> and tuned ranking so blog posts didn’t crowd out events and talks. The <strong>similarity threshold</strong> mattered more than I expected: one parameter, large swing in results. Still, within a few days we had a working beta on the live site. Here’s what shipped.</p>
<h2>The Result (Spoiler)</h2>
<p>It took about <strong>three unhurried days</strong> and roughly <strong>$20 in Cursor tokens</strong> to build, debug, and deploy. Try it on <strong><a href="https://percona.community/" target="_blank" rel="noopener noreferrer">percona.community</a></strong> (search icon in the header) or <strong><a href="https://percona.community/search/" target="_blank" rel="noopener noreferrer">percona.community/search/</a></strong>.</p>
<p>The index currently covers the site: blog, events, talks, member profiles. Video from other platforms, the forum, and GitHub are planned; the design should allow new sources without replacing the stack.</p>
<p>This is <strong>beta</strong>: the content is public and search isn’t business-critical, but I watch stability and security.</p>
<h3>Website Widget</h3>
<p>The header has a search icon. Click it to get an input field and a popup with results, <strong>similarity score</strong> (0 to 1, how close the hit is in meaning), and API latency. The site stays static; the widget calls <code>search.percona.community</code> and renders JSON. “All results” opens <code>/search/</code>.</p>
<p>Try it on <a href="https://percona.community/" target="_blank" rel="noopener noreferrer">percona.community</a>, e.g. <code>slow queries mysql tuning</code> or <code>kubernetes operator database</code>. Comments welcome if something feels off.</p>
<p><figure><img decoding="async" width="2414" height="1696" src="https://percona.community/blog/2026/05/search-part-1-intro-pz-talks_hu_1dcd2ecc4916d346.webp" alt="Smart Semantic Search using PostgreSQL and pgvector - Widget" loading="lazy"></figure>
</p>
<h3>Full Results Page</h3>
<p>A separate <code>/search/</code> page with filters by content type, cards, and links.</p>
<p><figure><img decoding="async" width="2726" height="1714" src="https://percona.community/blog/2026/05/search-part-1-intro-page_hu_ef00d7ba277d81ba.webp" alt="Smart Semantic Search using PostgreSQL and pgvector - Search Page" loading="lazy"></figure>
</p>
<p><a href="https://percona.community/search/?q=Postgres+backup+solutions&amp;type=blog" target="_blank" rel="noopener noreferrer">Example</a></p>
<h3>API</h3>
<p><strong>FastAPI</strong> at <code>https://search.percona.community</code>: embed the query, search Postgres, return JSON with links, scores, and timings (model vs database).</p>
<p>The service runs on <strong>AWS EC2</strong> in Docker Compose: API, indexer, Postgres.</p>
<h3>Demo Dashboard</h3>
<p>The Cursor AI agent handled a lot of the boilerplate, so I also built a <strong>dev dashboard</strong> (<code>/demo</code>) to test search, run indexing, inspect history, and browse indexed chunks. Not for production, but it saved debugging time.</p>
<p>Demo Dashboard</p>
<figure><img decoding="async" width="2300" height="1616" src="https://percona.community/blog/2026/05/search-part-1-intro-demo-search_hu_b171c38bfdc07801.webp" alt="Smart Semantic Search using PostgreSQL and pgvector - Demo Dashboard Search" loading="lazy"></figure>
</p>
<p>Search history: making search better</p>
<p><figure><img decoding="async" width="2190" height="1000" src="https://percona.community/blog/2026/05/search-part-1-intro-demo-history_hu_70c2a3d3114aef9f.webp" alt="Smart Semantic Search using PostgreSQL and pgvector - Demo Dashboard Search history" loading="lazy"></figure>
</p>
<p>Indexing status, to see when search data was last updated</p>
<p><figure><img decoding="async" width="2434" height="1478" src="https://percona.community/blog/2026/05/search-part-1-intro-demo-status_hu_8b567ed32a4500bb.webp" alt="Smart Semantic Search using PostgreSQL and pgvector - Demo Dashboard Indexing status" loading="lazy"></figure>
</p>
<p>Indexed documents with the ability to view data and chunks.</p>
<p><figure><img decoding="async" width="2486" height="1574" src="https://percona.community/blog/2026/05/search-part-1-intro-demo-pages_hu_f026d5ac3a4d0b12.webp" alt="Smart Semantic Search using PostgreSQL and pgvector - Demo Dashboard Indexed documents" loading="lazy"></figure>
</p>
<h3>What I Used</h3>
<p>Briefly, <strong>why</strong> this stack (deeper comparison in <strong>part two</strong>):</p>
<ul>
<li>
<p><strong><a href="https://www.postgresql.org/" target="_blank" rel="noopener noreferrer">PostgreSQL</a></strong> + <strong><a href="https://github.com/pgvector/pgvector" target="_blank" rel="noopener noreferrer">pgvector</a></strong>: vectors and metadata in one DB. Cosine similarity plus an HNSW index is enough at community scale. (<a href="https://docs.percona.com/postgresql/18/enable-extensions.html#pgvector" target="_blank" rel="noopener noreferrer">pgvector in Percona docs</a>)</p>
</li>
<li>
<p><strong><a href="https://docs.percona.com/postgresql/18/index.html" target="_blank" rel="noopener noreferrer">Percona Distribution for PostgreSQL 18</a></strong>: PostgreSQL with pgvector and a Docker image. Vanilla Postgres works too if you install the extension; I used Percona to try “their” Postgres + pgvector in a real deploy.</p>
</li>
<li>
<p><strong><a href="https://www.python.org/" target="_blank" rel="noopener noreferrer">Python</a></strong> + <strong><a href="https://fastapi.tiangolo.com/" target="_blank" rel="noopener noreferrer">FastAPI</a></strong>: fast API setup, OpenAPI included, good libraries for crawl/embed/Postgres.</p>
</li>
<li>
<p><strong><a href="https://huggingface.co/nomic-ai/nomic-embed-text-v1" target="_blank" rel="noopener noreferrer">nomic-embed-text-v1</a></strong> + <strong><a href="https://www.sbert.net/" target="_blank" rel="noopener noreferrer">sentence-transformers</a></strong>: open model, 768 dims, CPU-friendly, no per-chunk API bill. Index and query must use the <strong>same</strong> model; Nomic fits. I’ll compare others later.</p>
</li>
<li>
<p><strong><a href="https://gohugo.io/" target="_blank" rel="noopener noreferrer">Hugo</a></strong> + <strong>JavaScript</strong>: thin widget on existing static site.</p>
</li>
<li>
<p><strong><a href="https://www.docker.com/" target="_blank" rel="noopener noreferrer">Docker</a></strong> / <strong>Docker Compose</strong>: same layout locally and on EC2.</p>
</li>
<li>
<p><strong><a href="https://aws.amazon.com/ec2/" target="_blank" rel="noopener noreferrer">AWS EC2</a></strong> + <strong>nginx</strong>: HTTPS on <code>search.percona.community</code>, CORS for GitHub Pages.</p>
</li>
<li>
<p><strong>AI-assisted development</strong> (I used <a href="https://cursor.com/" target="_blank" rel="noopener noreferrer">Cursor</a>): the agent handled boilerplate, wiring, and Docker fixes. I reviewed everything. Any similar AI coding tool would work; the point is having one.</p>
</li>
</ul>
<h3>How long it took</h3>
<ul>
<li><strong>~6 hours</strong> with an AI coding assistant to a first prototype: crawl, API, Docker, basic demo;</li>
<li><strong>~2 more days</strong> for schema changes, per-type ranking, embed/page widget, search history, dashboard, indexer fixes, EC2 deploy;</li>
<li><strong>~$20</strong> in AI assistant tokens total.</li>
</ul>
<p>Without AI I’d have stretched the same work over weeks. With the agent I mostly wrote tasks, checked output, and fixed edges.</p>
<h3>About the code and repository</h3>
<p>I’m not publishing the repo yet. The code is tied to <strong>percona.community</strong>: our RSS feeds, content types, Hugo widget, EC2 layout. It’s an internal prototype, not a reusable library.</p>
<p>If you wanted a drop-in repo: porting someone else’s monolith often takes longer than rebuilding from a clear sketch. Part two will have architecture, schema, and stack notes enough for a Cursor agent (or similar) to rebuild for <strong>your</strong> feeds and UI.</p>
<p>Interested in a <strong>generic open source</strong> or <strong>search-as-a-service</strong> version? Say so in the comments; I’m weighing whether it’s worth a separate project.</p>
<h3>What’s Next</h3>
<p>Try search on <a href="https://percona.community/" target="_blank" rel="noopener noreferrer">percona.community</a> and comment what you find, especially where semantics beat the old substring search.</p>
<p>Part <strong>two</strong> will go inside: schema (including those three rewrites), chunking, HNSW, per-type result caps, and a local Docker Compose walkthrough.</p>
<p><a href="https://percona.community/blog/2026/05/29/semantic-search-on-postgresql-part-1/">Building Smart Semantic Search using PostgreSQL and pgvector. Case Study &#8211; Part 1 &#8211; Introduction</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Write for the Percona Community</title>
        <link>https://percona.community/blog/2026/05/22/write-for-percona-community/</link>
        <pubDate>Fri, 22 May 2026 11:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/write-for-the-percona-community/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>You’ve fixed something gnarly in production this year. You’ve migrated a database that nobody wanted to touch. You’ve built something on top of Percona Operators, or Percona Toolkit, or Percona Monitoring and Management (PMM), and you’ve learned things along the way that aren’t written down anywhere yet.</p>
<p><a href="https://percona.community/blog/2026/05/22/write-for-percona-community/">Write for the Percona Community</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>You’ve fixed something gnarly in production this year. You’ve migrated a database that nobody wanted to touch. You’ve built something on top of Percona Operators, or Percona Toolkit, or Percona Monitoring and Management (PMM), and you’ve learned things along the way that aren’t written down anywhere yet.</p>
<p>Write it up. We’ll publish it, and we’ll pay you.</p>
<h2>What we’re doing</h2>
<p>The Percona Community Writers Program publishes technical posts from the people actually using these tools — DBAs, developers, contributors, and engineers running real workloads. Posts go up on <a href="https://percona.community/blog" target="_blank" rel="noopener noreferrer">percona.community/blog</a> under your name, with your bio and links.</p>
<p>For every post we publish, you get:</p>
<ul>
<li><strong>$350</strong> paid out after publication</li>
<li><strong>Community engagement points</strong> you can redeem in our swag store for t-shirts, stickers, and other items</li>
</ul>
<p>The points stack across contributions. The more you write, the more you collect.</p>
<h3>A note on payment</h3>
<p><em>Not everyone can accept payment for writing — employment contracts, tax situations, visa rules, and conflict-of-interest policies all get in the way. If that’s you, we’ll donate the same $350 to an open source project or community of your choice on your behalf. Tell us who to send it to when you pitch.</em></p>
<h2>What we want to read</h2>
<p>Anything you’ve done with the Percona stack — or alongside it — that another engineer would learn from. Some directions to consider:</p>
<ul>
<li><strong>Percona Operators</strong> — running databases on Kubernetes, scaling decisions, upgrade paths, what surprised you</li>
<li><strong>Percona Toolkit</strong> — how you use specific tools in your day-to-day, scripts you’ve built around them, edge cases</li>
<li><strong>Migrations</strong> — moving between versions, between database engines, on-premises to cloud, the parts that aren’t in the docs</li>
<li><strong>Troubleshooting</strong> — a real incident, what you saw, what fixed it, what you’d do differently</li>
<li><strong>Percona Monitoring and Management (PMM)</strong> — dashboards you’ve built, alerts that actually catch things, integrations</li>
<li><strong>Databases themselves</strong> — MySQL, PostgreSQL, MongoDB, MariaDB, Valkey, anything in the open source database world you’re hands-on with</li>
</ul>
<p>We’re not only interested in Percona-product posts. If you’re active in the wider open source database community — contributing to MySQL, PostgreSQL, Valkey, or anywhere else — we want to hear about that work too. Your projects, your perspective, your hard-won opinions.</p>
<h2>Standards</h2>
<p>Every submission is reviewed by the community team for technical accuracy and grammar before it goes live. We’re not gatekeeping — we’re making sure your name goes on something solid.</p>
<p>One firm rule: <strong>no AI-generated content</strong>. We run every submission through <a href="https://gptzero.me/" target="_blank" rel="noopener noreferrer">GPTZero</a> and it has to come back clean. We’re publishing your voice and your experience, not a model’s summary of either. If you used AI to help draft, that’s fine — but the post needs to read as yours and pass the check.</p>
<h2>How to start</h2>
<p>Pitch us first. A couple of sentences on what you want to write about and why you’re the person to write it is enough. We’ll reply with feedback, a timeline, and any direction that helps you write a stronger post.</p>
<p>You don’t need to be a published writer. You need to have done something and be willing to explain how. A 900-word post about how you debugged a replication lag issue last quarter is more valuable than a 3,000-word survey of the database landscape.</p>
<p>Send pitches and questions to the Percona Community team — by filling in <strong><a href="https://share.hsforms.com/2quoru-zrSli2l-89aiiJggg9e0" target="_blank" rel="noopener noreferrer">this form</a></strong>.</p>
<div class="hs-form-frame" data-region="na1" data-form-id="aaea2bbb-eceb-4a58-b697-ef3d6a288982" data-portal-id="758664"></div>
<h3>Open topics: blog, talks, guides</h3>
<p>Not sure where to start? Here are some directions we’d love to see covered. Pick one, narrow it down to something you’ve actually done, and pitch us.</p>
<p><strong>Databases</strong></p>
<ul>
<li>Automating database setup for production in under a few hours</li>
<li>Backup and disaster recovery strategies that hold up</li>
<li>Failure stories — what broke, what you learned</li>
</ul>
<p><strong>DevOps and reliability</strong></p>
<ul>
<li>Database Reliability Engineering (DBRE) in practice</li>
<li>Site Reliability Engineering (SRE) applied to databases</li>
<li>Monitoring and SLAs that mean something</li>
<li>Useful scripts you actually run in production</li>
<li>Testing and QA for database changes</li>
</ul>
<p><strong>Distributed computing</strong></p>
<ul>
<li>Consensus algorithms and real-world implementations</li>
<li>Synchronous vs asynchronous replication — trade-offs and where each fits</li>
</ul>
<p><strong>How-tos</strong></p>
<ul>
<li>Moving from a single node to a cluster (any DB engine)</li>
<li>Batch processing patterns</li>
<li>Stream processing patterns</li>
<li>Metrics that actually tell you something</li>
</ul>
<p><strong>Open source</strong></p>
<ul>
<li>Measuring your open source project’s success</li>
<li>Bug squashing done right</li>
<li>Licensing — what to know before you pick one</li>
<li>Vendor lock-in and how to spot it early</li>
</ul>
<hr>
<p>We pay engineers to share what they’ve learned. That’s the whole offer. If you’ve got something worth writing, write it.</p>
<h2>Content Ownership and Licensing</h2>
<p>Contributors to the Percona Community Blog retain copyright of their work. By submitting content, authors grant Percona a non-exclusive, worldwide, royalty-free license to publish, distribute, and promote the content as part of the Percona Community platform. Unless otherwise specified, all community blog posts are published under the Creative Commons Attribution 4.0 International (CC BY 4.0) license.</p>
<p><a href="https://percona.community/blog/2026/05/22/write-for-percona-community/">Write for the Percona Community</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Knowing when new open source database engine versions release on Amazon Aurora and Amazon RDS</title>
        <link>https://aws.amazon.com/blogs/database/knowing-when-new-open-source-database-engine-versions-release-on-amazon-aurora-and-amazon-rds/</link>
        <pubDate>Thu, 21 May 2026 18:36:46 +0000</pubDate>
        <dc:creator>Betty Chun</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/knowing-when-new-open-source-database-engine-versions-release-on-amazon-aurora-and-amazon-rds/</guid>
        <source url="https://aws.amazon.com/blogs/database/">RDS for MariaDB – AWS Database Blog</source>
        <description><![CDATA[<p>In this post, we share the version currency timelines for Aurora and RDS open source engines. We also explain why timelines differ across engines and how you can use them to plan your upgrades.</p>
<p><a href="https://aws.amazon.com/blogs/database/knowing-when-new-open-source-database-engine-versions-release-on-amazon-aurora-and-amazon-rds/">Knowing when new open source database engine versions release on Amazon Aurora and Amazon RDS</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>If you’re running or considering <a href="https://aws.amazon.com/rds/aurora/" target="_blank" rel="noopener">Amazon Aurora</a> with PostgreSQL or MySQL compatibility, you’ve likely wondered, “When will the latest community version be available on AWS?” The same question applies if you run <a href="https://aws.amazon.com/rds/" target="_blank" rel="noopener">Amazon Relational Database Service</a> (Amazon RDS) for PostgreSQL, MySQL, or MariaDB. Whether you want the newest features quickly or prefer to standardize on stable long-term support (LTS) versions, our release timelines help you plan upgrades and maintenance cycles. In this post, we share the version currency timelines for Aurora and RDS open source engines. We also explain why timelines differ across engines and how you can use them to plan your upgrades.</p>
<p>Today, we are publishing version currency timelines for Aurora and RDS open source engines. The timelines apply to new major and minor versions going forward and define when you and your teams can expect new versions on AWS. With this predictability, you can plan maintenance windows, upgrade cycles, and Aurora LTS adoption for workloads that prioritize long-term stability.</p>
<table border="1px" cellpadding="10px" width="100%">
<tbody>
<tr>
<td><strong>Database engine</strong></td>
<td><strong>Release type</strong></td>
<td><strong>Timeline</strong></td>
</tr>
<tr>
<td rowspan="2"><strong><a href="https://docs.aws.amazon.com/AmazonRDS/latest/PostgreSQLReleaseNotes/postgresql-release-calendar.html" rel="noopener" target="_blank">RDS for PostgreSQL</a></strong></td>
<td>Minor versions</td>
<td>Within 7 days of community release</td>
</tr>
<tr>
<td>Major versions</td>
<td>Within 30 days of the community <code>.1</code> release</td>
</tr>
<tr>
<td rowspan="2"><strong><a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.Concepts.VersionMgmt.html" rel="noopener" target="_blank">RDS for MySQL</a></strong></td>
<td>Minor versions</td>
<td>Within 30 days of community release</td>
</tr>
<tr>
<td>Major versions</td>
<td>Within 6 months of community <code>.1</code> release (Oracle MySQL LTS majors)</td>
</tr>
<tr>
<td rowspan="2"><strong><a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MariaDB.Concepts.VersionMgmt.html" rel="noopener" target="_blank">RDS for MariaDB</a></strong></td>
<td>Minor versions</td>
<td>Within 30 days of community release</td>
</tr>
<tr>
<td>Major versions</td>
<td>Within 3 months of community’s first patch release</td>
</tr>
<tr>
<td rowspan="3"><strong><a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraPostgreSQLReleaseNotes/aurorapostgresql-release-calendar.html" rel="noopener" target="_blank">Aurora PostgreSQL</a></strong></td>
<td>Minor versions</td>
<td>Within 3 months of community release</td>
</tr>
<tr>
<td>Major versions</td>
<td>Within 8 months of the community <code>.1</code> release</td>
</tr>
<tr>
<td>Aurora LTS per major</td>
<td>Within 12 months of Aurora major GA</td>
</tr>
<tr>
<td rowspan="3"><strong><a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraMySQLReleaseNotes/AuroraMySQL.release-calendars.html" rel="noopener" target="_blank">Aurora MySQL</a></strong></td>
<td>Minor versions</td>
<td>Within 3 months of community release</td>
</tr>
<tr>
<td>Major versions</td>
<td>Within 12 months of community <code>.1</code> release (Oracle MySQL LTS majors)</td>
</tr>
<tr>
<td>Aurora LTS per major</td>
<td>Within 12 months of Aurora major GA</td>
</tr>
</tbody>
</table>
<p>For the current schedule of upcoming and recently shipped versions, including specific version numbers and target dates, see the release calendar linked from each engine name in the table. </p>
<h2>Why timelines differ across engines</h2>
<p>The timelines differ by engine because the upstream development and integration models differ. PostgreSQL and MariaDB communities develop in the open, which lets us start validation early. MySQL commits are available closer to public releases. RDS runs the community engine on managed infrastructure, so after a community release passes validation it can ship quickly. Aurora adds a distributed storage layer, Global Database, and serverless capabilities underneath PostgreSQL- and MySQL-compatible engines. Every new version goes through additional validation to verify that those capabilities continue to function correctly. This is why Aurora timelines are longer than RDS timelines for the same engine. Aurora also offers Long-Term Support releases for multi-year stability on a single minor version.</p>
<h2>How we choose major version starting points</h2>
<p>For PostgreSQL, our first production release of a new major version is typically based on the community <code>.1</code> release rather than <code>.0</code>. The <code>.1</code> release generally arrives roughly three months after the initial major release. It incorporates the first round of bug fixes and security patches identified during early production deployments, which provides a more stable starting point for production workloads.</p>
<p>MariaDB follows a similar pattern. The published major version timelines are measured from the community’s first patch release for a new major version rather than the initial <code>.0</code> release. This gives customers a more mature production baseline to target.</p>
<p>For MySQL, the major version timelines apply to Oracle MySQL LTS major releases and are measured from the corresponding <code>.1</code> release. This aligns the timelines to the first patch release after the initial LTS major becomes generally available.</p>
<h2>What this means for your upgrade planning</h2>
<p>Published version currency timelines give you and your teams earlier visibility into release planning and upgrade scheduling. With RDS for PostgreSQL minor versions arriving within 7 days of community release, teams can stay current on security patches and bug fixes with relatively little operational planning. You can enable automatic minor version upgrades to receive patches during maintenance windows. You can also use <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html" rel="noopener" target="_blank">AWS Organizations upgrade rollout policies</a> to manage deployment sequencing across your development, test, and production environments, or apply upgrades manually based on your own operational processes.</p>
<p>Earlier visibility into major version timelines helps your teams adopt new database capabilities on your own schedule. Knowing when a new version is expected on Aurora or RDS gives teams more time to review release notes, validate application behavior, and prepare rollout plans ahead of adoption. With RDS Database Preview, you get early access to PostgreSQL and MySQL major versions in a non-production environment so you can test application compatibility in advance. With Blue/Green Deployments, you can validate changes before cutover and transition production traffic with minimal downtime.</p>
<p>With Aurora LTS releases, you can prioritize operational stability over rapid feature adoption. Your teams can remain on a stable minor baseline for multiple years while aligning major version upgrades with broader application and infrastructure roadmaps.</p>
<p>For workloads approaching or beyond community end-of-life timelines, Amazon RDS Extended Support gives you additional time to finish upgrades while continuing to receive critical security updates.</p>
<h2>Learn more</h2>
<p>For detailed upgrade procedures and release guidance, see the <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html" target="_blank" rel="noopener">Amazon Aurora User Guide</a> and the <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html" target="_blank" rel="noopener">Amazon RDS User Guide</a>.</p>
<hr>
<h2>About the authors</h2>
<footer>
<div class="blog-author-box">
<div class="blog-author-image">
   <img loading="lazy" decoding="async" class="alignleft size-full" src="https://d2908q01vomqb2.cloudfront.net/887309d048beef83ad3eabf2a79a64a389ab1c9f/2026/05/18/DB5644a1.jpg" alt="Betty Chun" width="100" height="100">
  </div>
<h3 class="lb-h4">Betty Chun</h3>
<p><a target="_blank" href="https://www.linkedin.com/in/betty-chun-3b8811/" rel="noopener">Betty</a> is a Principal Product Marketing Manager at AWS. She focuses on relational database services, such as Amazon Aurora. She is based on Seattle and enjoys cooking and the outdoors.</p>
</p></div>
<div class="blog-author-box">
<div class="blog-author-image">
   <img decoding="async" loading="lazy" class="aligncenter size-full wp-image-29797" src="https://d2908q01vomqb2.cloudfront.net/887309d048beef83ad3eabf2a79a64a389ab1c9f/2025/11/24/DBBLOG-5173-14.png" alt="Keyur Diwan" width="120" height="160">
  </div>
<h3 class="lb-h4">Keyur Diwan</h3>
<p><a href="https://www.linkedin.com/in/keyurdiwan/" target="_blank" rel="noopener">Keyur</a> is a Principal Product Manager with Amazon Aurora/RDS in Seattle, where he builds next-generation capabilities in managed PostgreSQL, Blue/Green deployments, seamless upgrades, security, and analytics technologies such as HTAP, ZETL, and CDC streaming.</p>
</p></div>
<div class="blog-author-box">
<div class="blog-author-image">
   <img decoding="async" loading="lazy" class="aligncenter size-full wp-image-29797" src="https://d2908q01vomqb2.cloudfront.net/887309d048beef83ad3eabf2a79a64a389ab1c9f/2026/05/22/image-10.png" alt="Abhinav Dhandh" width="120" height="160">
  </div>
<h3 class="lb-h4">Abhinav Dhandh</h3>
<p><a target="_blank" href="https://www.linkedin.com/in/abhinav-dhandh-35139418/" rel="noopener">Abhinav</a> is a Product Management Leader at AWS, where he leads a team responsible for the vision, delivery, and growth of Amazon Aurora and RDS open source database engines. His team’s focus areas include horizontal scaling, migrations, multi-cloud experiences, and agentic AI experiences that help customers operate and evolve their database workloads.</p>
</p></div>
</footer>
<p><a href="https://aws.amazon.com/blogs/database/knowing-when-new-open-source-database-engine-versions-release-on-amazon-aurora-and-amazon-rds/">Knowing when new open source database engine versions release on Amazon Aurora and Amazon RDS</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>AI-Assisted Production Database Ops with ClusterControl MCP and CCX MCP</title>
        <link>https://severalnines.com/blog/ai-assisted-production-database-ops-with-clustercontrol-mcp-and-ccx-mcp/</link>
        <pubDate>Thu, 21 May 2026 10:22:01 +0000</pubDate>
        <dc:creator>Kyle Buzzell</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/ai-assisted-production-database-ops-with-clustercontrol-mcp-and-ccx-mcp-2/</guid>
        <source url="https://severalnines.com/">Severalnines</source>
        <description><![CDATA[<p>In December, we introduced how Model Context Protocol could make ClusterControl easier to work with from AI assistants. Since then, Severalnines has expanded that MCP direction across its database operations platforms with ClusterControl MCP and CCX MCP. The latest ClusterControl MCP is the major update, providing a more robust implementation with 69 tools and 20 […]<br />
The post AI-Assisted Production Database Ops with ClusterControl MCP and CCX MCP appeared first on Severalnines.</p>
<p><a href="https://severalnines.com/blog/ai-assisted-production-database-ops-with-clustercontrol-mcp-and-ccx-mcp/">AI-Assisted Production Database Ops with ClusterControl MCP and CCX MCP</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>In December, we introduced how Model Context Protocol could make <a href="https://severalnines.com/clustercontrol">ClusterControl</a> easier to work with from AI assistants. Since then, Severalnines has expanded that MCP direction across its database operations platforms with <strong>ClusterControl MCP</strong> and <strong>CCX MCP</strong>.</p>
<p>The latest ClusterControl MCP is the major update, providing a more robust implementation with <strong>69 tools and 20 MCP resources / templates</strong> for production database operations across ClusterControl-managed environments. CCX MCP is the companion MCP server for <a href="https://severalnines.com/ccx">CCX</a>, bringing AI-assisted workflows to managed cloud database operations.</p>
<p>Together, they give Severalnines users a practical way to inspect, troubleshoot, and act on database infrastructure from MCP-compatible clients such as Claude Desktop, Claude Code, OpenAI Codex, and other tools that support MCP.</p>
<h2 class="wp-block-heading">What is new in ClusterControl MCP?</h2>
<p>N.B. For a full breakdown, <a href="https://severalnines.com/blog/enhancing-database-operations-with-clustercontrol-and-model-context-protocol-mcp/">go to our updated original ClusterControl MCP blog post</a>.</p>
<p>ClusterControl MCP 1.0 moves beyond the earlier MCP concept and provides broader coverage across daily database operations. You can ask questions such as:</p>
<ul class="wp-block-list">
<li>“List all my database clusters and their status.”</li>
<li>“Show me the topology of cluster 2.”</li>
<li>“Are there any active alarms across all clusters?”</li>
<li>“What backup jobs have run on cluster 3?”</li>
<li>“Show me the top queries by wait time on cluster 1.”</li>
<li>“Are there any tables without primary keys?”</li>
<li>“Show me recent transaction deadlocks.”</li>
<li>“List the log files collected from cluster 1.”</li>
<li>“Who made changes to cluster 3 in the last hour?”</li>
</ul>
<p>You can also prepare actions such as:</p>
<ul class="wp-block-list">
<li>“Run a backup on cluster 1 right now.”</li>
<li>“Create a nightly backup schedule at 02:00.”</li>
<li>“Put db1.example.com into maintenance from 22:00 to 23:00 UTC.”</li>
<li>“Create a read-only database user for reporting.”</li>
<li>“Set max_connections to 500 on db1.example.com.”</li>
<li>“Restore backup #42 to cluster 1.”</li>
</ul>
<p>Write operations use a dry-run-first model. The assistant describes what would happen before anything is executed, and high-risk operations include extra warnings.</p>
<h2 class="wp-block-heading">Example: move from alarm to evidence faster</h2>
<p>A common operational flow starts with a broad question:</p>
<p>“Are there any active alarms across all clusters?”</p>
<p>From there, you can drill down:</p>
<ul class="wp-block-list">
<li>“Show me alarms for cluster 3.”</li>
<li>“Show me the CMON log for cluster 3 from the last hour.”</li>
<li>“Summarize the warnings by component and hostname.”</li>
</ul>
<p>That is where the 1.0 implementation becomes useful. It is not just returning a static dashboard view. It can help you move across related operational data: alarms, jobs, CMON controller logs, database server logs, topology, backup history, maintenance windows, and audit events.</p>
<h2 class="wp-block-heading">Example: inspect and manage backups conversationally</h2>
<p>Backups are another area where ClusterControl MCP 1.0 adds practical coverage. You can ask:</p>
<ul class="wp-block-list">
<li>“When was the last successful backup on my MongoDB cluster?”</li>
<li>“Show me only failed backups on cluster 1.”</li>
<li>“Does cluster 1 have a backup schedule configured?”</li>
</ul>
<p>And then prepare a change:</p>
<p>“Create a nightly backup schedule at 02:00 on cluster 1 using xtrabackup.”</p>
<p>The assistant first returns a dry-run preview. Only after confirmation does it execute the change.</p>
<h2 class="wp-block-heading">Installing ClusterControl MCP</h2>
<p>ClusterControl MCP packages are published through the Severalnines repository alongside other ClusterControl components.</p>
<p>Debian / Ubuntu:</p>
<pre class="wp-block-code"><code>apt-get install clustercontrol-mcp</code></pre>
<p>RHEL / Rocky / AlmaLinux:</p>
<pre class="wp-block-code"><code>yum install clustercontrol-mcp</code></pre>
<p>The binary installs to:</p>
<pre class="wp-block-code"><code>/usr/bin/cmon-mcp</code></pre>
<p>The package also installs:</p>
<pre class="wp-block-code"><code>/etc/systemd/system/cmon-mcp.service
/etc/default/cmon-mcp</code></pre>
<h2 class="wp-block-heading">Setting up ClusterControl MCP in stdio mode</h2>
<p>First, we’ll start with stdio mode for when the AI client runs the MCP server locally, such as Claude Desktop or Claude Code.</p>
<p>Claude Desktop configuration:</p>
<pre class="wp-block-code"><code>{
 "mcpServers": {
   "clustercontrol": {
     "command": "cmon-mcp",
     "env": {
       "CMON_ENDPOINT": "https://your-cc-host:9501",
       "CMON_USERNAME": "admin",
       "CMON_PASSWORD": "your-password"
     }
   }
 }
}</code></pre>
<p>Restart Claude Desktop. The hammer icon confirms that the MCP server loaded.</p>
<p>For Claude Code:</p>
<pre class="wp-block-code"><code>claude mcp add clustercontrol -- cmon-mcp 
 -endpoint https://your-cc-host:9501 
 -username admin 
 -password your-password</code></pre>
<h2 class="wp-block-heading">Setting up ClusterControl MCP in HTTP mode</h2>
<p>Use HTTP mode for OpenAI Codex, team access, or multi-client access. Edit:</p>
<pre class="wp-block-code"><code>/etc/default/cmon-mcp</code></pre>
<p>Example:</p>
<pre class="wp-block-code"><code>CMON_ENDPOINT=https://127.0.0.1:9501
CMON_USERNAME=admin
CMON_KEY_FILE=/etc/clustercontrol/id_rsa

MCP_BIND_ADDRESS=0.0.0.0:3000
MCP_BASE_URL=http://your-cc-host:3000
MCP_AUTH_TOKEN=</code></pre>
<p>Generate a strong token:</p>
<pre class="wp-block-code"><code>openssl rand -hex 32</code></pre>
<p>Restart the service:</p>
<pre class="wp-block-code"><code>systemctl restart cmon-mcp
journalctl -u cmon-mcp -n 20</code></pre>
<p>Connect OpenAI Codex:</p>
<pre class="wp-block-code"><code>codex --mcp-server-uri http://your-cc-host:3000/mcp 
     --mcp-header "Authorization: Bearer "</code></pre>
<p>Connect Claude Code over SSE:</p>
<pre class="wp-block-code"><code>claude mcp add clustercontrol --transport sse http://your-cc-host:3000/sse 
 --header "Authorization: Bearer "</code></pre>
<p>Connect Claude Desktop over SSE:</p>
<pre class="wp-block-code"><code>{
 "mcpServers": {
   "clustercontrol": {
     "type": "sse",
     "url": "http://your-cc-host:3000/sse",
     "headers": {
       "Authorization": "Bearer "
     }
   }
 }
}</code></pre>
<h2 class="wp-block-heading">CCX MCP: AI-Assisted Workflows for CCX</h2>
<p>As noted upfront, <strong>CCX MCP</strong> brings the MCP-based workflow to Severalnines users running managed cloud databases in CCX. It lets MCP-compatible AI clients interact with CCX datastores, cloud providers, plans, databases, users, firewall rules, backups, parameter groups, and performance data.</p>
<p>Typical prompts include:</p>
<ul class="wp-block-list">
<li>“List my datastores.”</li>
<li>“Create a PostgreSQL cluster.”</li>
<li>“Get the connection string for my production database.”</li>
<li>“Add 10.0.0.0/24 as a trusted source.”</li>
<li>“Show me the slowest queries.”</li>
<li>“List available backups for this datastore.”</li>
</ul>
<p>CCX MCP supports PostgreSQL, MySQL / Percona, MariaDB, Redis, Valkey, and Microsoft SQL Server. It also includes protection behavior for destructive operations, which are blocked by default unless protection is explicitly disabled.</p>
<h2 class="wp-block-heading">Installing and setting up CCX MCP</h2>
<p>CCX MCP can be installed from npm:</p>
<pre class="wp-block-code"><code>npm install @severalnines/ccx-mcp</code></pre>
<p>Or used directly through <code>npx</code> in your MCP client configuration:</p>
<pre class="wp-block-code"><code>{
 "mcpServers": {
   "ccx": {
     "command": "npx",
     "args": ["-y", "@severalnines/ccx-mcp"],
     "env": {
       "CCX_BASE_URL": "https://app.myccx.io",
       "CCX_USERNAME": "your-email@example.com",
       "CCX_PASSWORD": "your-password"
     }
   }
 }
}</code></pre>
<p>OAuth2 is also supported:</p>
<pre class="wp-block-code"><code>{
 "CCX_CLIENT_ID": "your-client-id",
 "CCX_CLIENT_SECRET": "your-client-secret"
}</code></pre>
<h3 class="wp-block-heading">Claude Code</h3>
<p>For Claude Code, register the CCX MCP server in one command. No manual config file editing is required:</p>
<pre class="wp-block-code"><code>claude mcp add ccx -- npx -y @severalnines/ccx-mcp@latest 
 --endpoint https://app.myccx.io 
 --client-id  
 --client-secret </code></pre>
<p>Create OAuth2 credentials in the CCX UI under <strong>Account &gt; Security</strong>.</p>
<p>Then restart Claude Code, or run <code>/mcp</code> and reconnect. After that, you are ready to start using CCX MCP from your Claude Code session.</p>
<h2 class="wp-block-heading">Wrapping up</h2>
<p>The original ClusterControl MCP work showed how AI assistants could become useful in database operations when connected to the right operational context. The latest version makes that idea much more complete, providing a broader and safer operational interface across clusters, jobs, alarms, backups, logs, performance, users, maintenance, audit, and configuration. <a href="https://docs.severalnines.com/clustercontrol/latest/reference-manuals/clustercontrol-mcp/">Go here for more information on how it works and detailed documentation.</a></p>
<p>For CCX and service provider users, CCX MCP provides the companion interface for managed cloud database operations. Together, they give database teams a practical way to use AI where it matters: inside real operational workflows, with context, control, and safety.</p>
<p>The post <a href="https://severalnines.com/blog/ai-assisted-production-database-ops-with-clustercontrol-mcp-and-ccx-mcp/">AI-Assisted Production Database Ops with ClusterControl MCP and CCX MCP</a> appeared first on <a href="https://severalnines.com/">Severalnines</a>.</p>
<p><a href="https://severalnines.com/blog/ai-assisted-production-database-ops-with-clustercontrol-mcp-and-ccx-mcp/">AI-Assisted Production Database Ops with ClusterControl MCP and CCX MCP</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>AI-Assisted Production Database Ops with ClusterControl MCP and CCX MCP</title>
        <link>https://severalnines.com/blog/ai-assisted-production-database-ops-with-clustercontrol-mcp-and-ccx-mcp/</link>
        <pubDate>Thu, 21 May 2026 10:22:01 +0000</pubDate>
        <dc:creator>Kyle Buzzell</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/ai-assisted-production-database-ops-with-clustercontrol-mcp-and-ccx-mcp/</guid>
        <source url="https://severalnines.com/">Severalnines</source>
        <description><![CDATA[<p>In December, we introduced how Model Context Protocol could make ClusterControl easier to work with from AI assistants. Since then, Severalnines has expanded that MCP direction across its database operations platforms with ClusterControl MCP and CCX MCP. The latest ClusterControl MCP is the major update, providing a more robust implementation with 69 tools and 20 […]<br />
The post AI-Assisted Production Database Ops with ClusterControl MCP and CCX MCP appeared first on Severalnines.</p>
<p><a href="https://severalnines.com/blog/ai-assisted-production-database-ops-with-clustercontrol-mcp-and-ccx-mcp/">AI-Assisted Production Database Ops with ClusterControl MCP and CCX MCP</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>In December, we introduced how Model Context Protocol could make <a href="https://severalnines.com/clustercontrol">ClusterControl</a> easier to work with from AI assistants. Since then, Severalnines has expanded that MCP direction across its database operations platforms with <strong>ClusterControl MCP</strong> and <strong>CCX MCP</strong>.</p>
<p>The latest ClusterControl MCP is the major update, providing a more robust implementation with <strong>69 tools and 20 MCP resources / templates</strong> for production database operations across ClusterControl-managed environments. CCX MCP is the companion MCP server for <a href="https://severalnines.com/ccx">CCX</a>, bringing AI-assisted workflows to managed cloud database operations.</p>
<p>Together, they give Severalnines users a practical way to inspect, troubleshoot, and act on database infrastructure from MCP-compatible clients such as Claude Desktop, Claude Code, OpenAI Codex, and other tools that support MCP.</p>
<h2 class="wp-block-heading">What is new in ClusterControl MCP?</h2>
<p>N.B. For a full breakdown, <a href="https://severalnines.com/blog/enhancing-database-operations-with-clustercontrol-and-model-context-protocol-mcp/">go to our updated original ClusterControl MCP blog post</a>.</p>
<p>ClusterControl MCP 1.0 moves beyond the earlier MCP concept and provides broader coverage across daily database operations. You can ask questions such as:</p>
<ul class="wp-block-list">
<li>“List all my database clusters and their status.”</li>
<li>“Show me the topology of cluster 2.”</li>
<li>“Are there any active alarms across all clusters?”</li>
<li>“What backup jobs have run on cluster 3?”</li>
<li>“Show me the top queries by wait time on cluster 1.”</li>
<li>“Are there any tables without primary keys?”</li>
<li>“Show me recent transaction deadlocks.”</li>
<li>“List the log files collected from cluster 1.”</li>
<li>“Who made changes to cluster 3 in the last hour?”</li>
</ul>
<p>You can also prepare actions such as:</p>
<ul class="wp-block-list">
<li>“Run a backup on cluster 1 right now.”</li>
<li>“Create a nightly backup schedule at 02:00.”</li>
<li>“Put db1.example.com into maintenance from 22:00 to 23:00 UTC.”</li>
<li>“Create a read-only database user for reporting.”</li>
<li>“Set max_connections to 500 on db1.example.com.”</li>
<li>“Restore backup #42 to cluster 1.”</li>
</ul>
<p>Write operations use a dry-run-first model. The assistant describes what would happen before anything is executed, and high-risk operations include extra warnings.</p>
<h2 class="wp-block-heading">Example: move from alarm to evidence faster</h2>
<p>A common operational flow starts with a broad question:</p>
<p>“Are there any active alarms across all clusters?”</p>
<p>From there, you can drill down:</p>
<ul class="wp-block-list">
<li>“Show me alarms for cluster 3.”</li>
<li>“Show me the CMON log for cluster 3 from the last hour.”</li>
<li>“Summarize the warnings by component and hostname.”</li>
</ul>
<p>That is where the 1.0 implementation becomes useful. It is not just returning a static dashboard view. It can help you move across related operational data: alarms, jobs, CMON controller logs, database server logs, topology, backup history, maintenance windows, and audit events.</p>
<h2 class="wp-block-heading">Example: inspect and manage backups conversationally</h2>
<p>Backups are another area where ClusterControl MCP 1.0 adds practical coverage. You can ask:</p>
<ul class="wp-block-list">
<li>“When was the last successful backup on my MongoDB cluster?”</li>
<li>“Show me only failed backups on cluster 1.”</li>
<li>“Does cluster 1 have a backup schedule configured?”</li>
</ul>
<p>And then prepare a change:</p>
<p>“Create a nightly backup schedule at 02:00 on cluster 1 using xtrabackup.”</p>
<p>The assistant first returns a dry-run preview. Only after confirmation does it execute the change.</p>
<h2 class="wp-block-heading">Installing ClusterControl MCP</h2>
<p>ClusterControl MCP packages are published through the Severalnines repository alongside other ClusterControl components.</p>
<p>Debian / Ubuntu:</p>
<pre class="wp-block-code"><code>apt-get install clustercontrol-mcp</code></pre>
<p>RHEL / Rocky / AlmaLinux:</p>
<pre class="wp-block-code"><code>yum install clustercontrol-mcp</code></pre>
<p>The binary installs to:</p>
<pre class="wp-block-code"><code>/usr/bin/cmon-mcp</code></pre>
<p>The package also installs:</p>
<pre class="wp-block-code"><code>/etc/systemd/system/cmon-mcp.service
/etc/default/cmon-mcp</code></pre>
<h2 class="wp-block-heading">Setting up ClusterControl MCP in stdio mode</h2>
<p>First, we’ll start with stdio mode for when the AI client runs the MCP server locally, such as Claude Desktop or Claude Code.</p>
<p>Claude Desktop configuration:</p>
<pre class="wp-block-code"><code>{
 "mcpServers": {
   "clustercontrol": {
     "command": "cmon-mcp",
     "env": {
       "CMON_ENDPOINT": "https://your-cc-host:9501",
       "CMON_USERNAME": "admin",
       "CMON_PASSWORD": "your-password"
     }
   }
 }
}</code></pre>
<p>Restart Claude Desktop. The hammer icon confirms that the MCP server loaded.</p>
<p>For Claude Code:</p>
<pre class="wp-block-code"><code>claude mcp add clustercontrol -- cmon-mcp 
 -endpoint https://your-cc-host:9501 
 -username admin 
 -password your-password</code></pre>
<h2 class="wp-block-heading">Setting up ClusterControl MCP in HTTP mode</h2>
<p>Use HTTP mode for OpenAI Codex, team access, or multi-client access. Edit:</p>
<pre class="wp-block-code"><code>/etc/default/cmon-mcp</code></pre>
<p>Example:</p>
<pre class="wp-block-code"><code>CMON_ENDPOINT=https://127.0.0.1:9501
CMON_USERNAME=admin
CMON_KEY_FILE=/etc/clustercontrol/id_rsa

MCP_BIND_ADDRESS=0.0.0.0:3000
MCP_BASE_URL=http://your-cc-host:3000
MCP_AUTH_TOKEN=</code></pre>
<p>Generate a strong token:</p>
<pre class="wp-block-code"><code>openssl rand -hex 32</code></pre>
<p>Restart the service:</p>
<pre class="wp-block-code"><code>systemctl restart cmon-mcp
journalctl -u cmon-mcp -n 20</code></pre>
<p>Connect OpenAI Codex:</p>
<pre class="wp-block-code"><code>codex --mcp-server-uri http://your-cc-host:3000/mcp 
     --mcp-header "Authorization: Bearer "</code></pre>
<p>Connect Claude Code over SSE:</p>
<pre class="wp-block-code"><code>claude mcp add clustercontrol --transport sse http://your-cc-host:3000/sse 
 --header "Authorization: Bearer "</code></pre>
<p>Connect Claude Desktop over SSE:</p>
<pre class="wp-block-code"><code>{
 "mcpServers": {
   "clustercontrol": {
     "type": "sse",
     "url": "http://your-cc-host:3000/sse",
     "headers": {
       "Authorization": "Bearer "
     }
   }
 }
}</code></pre>
<h2 class="wp-block-heading">CCX MCP: AI-Assisted Workflows for CCX</h2>
<p>As noted upfront, <strong>CCX MCP</strong> brings the MCP-based workflow to Severalnines users running managed cloud databases in CCX. It lets MCP-compatible AI clients interact with CCX datastores, cloud providers, plans, databases, users, firewall rules, backups, parameter groups, and performance data.</p>
<p>Typical prompts include:</p>
<ul class="wp-block-list">
<li>“List my datastores.”</li>
<li>“Create a PostgreSQL cluster.”</li>
<li>“Get the connection string for my production database.”</li>
<li>“Add 10.0.0.0/24 as a trusted source.”</li>
<li>“Show me the slowest queries.”</li>
<li>“List available backups for this datastore.”</li>
</ul>
<p>CCX MCP supports PostgreSQL, MySQL / Percona, MariaDB, Redis, Valkey, and Microsoft SQL Server. It also includes protection behavior for destructive operations, which are blocked by default unless protection is explicitly disabled.</p>
<h2 class="wp-block-heading">Installing and setting up CCX MCP</h2>
<p>CCX MCP can be installed from npm:</p>
<pre class="wp-block-code"><code>npm install @severalnines/ccx-mcp</code></pre>
<p>Or used directly through <code>npx</code> in your MCP client configuration:</p>
<pre class="wp-block-code"><code>{
 "mcpServers": {
   "ccx": {
     "command": "npx",
     "args": ["-y", "@severalnines/ccx-mcp"],
     "env": {
       "CCX_BASE_URL": "https://app.myccx.io",
       "CCX_USERNAME": "your-email@example.com",
       "CCX_PASSWORD": "your-password"
     }
   }
 }
}</code></pre>
<p>OAuth2 is also supported:</p>
<pre class="wp-block-code"><code>{
 "CCX_CLIENT_ID": "your-client-id",
 "CCX_CLIENT_SECRET": "your-client-secret"
}</code></pre>
<h3 class="wp-block-heading">Claude Code</h3>
<p>For Claude Code, register the CCX MCP server in one command. No manual config file editing is required:</p>
<pre class="wp-block-code"><code>claude mcp add ccx -- npx -y @severalnines/ccx-mcp@latest 
 --endpoint https://app.myccx.io 
 --client-id  
 --client-secret </code></pre>
<p>Create OAuth2 credentials in the CCX UI under <strong>Account &gt; Security</strong>.</p>
<p>Then restart Claude Code, or run <code>/mcp</code> and reconnect. After that, you are ready to start using CCX MCP from your Claude Code session.</p>
<h2 class="wp-block-heading">Wrapping up</h2>
<p>The original ClusterControl MCP work showed how AI assistants could become useful in database operations when connected to the right operational context. The latest version makes that idea much more complete, providing a broader and safer operational interface across clusters, jobs, alarms, backups, logs, performance, users, maintenance, audit, and configuration. <a href="https://docs.severalnines.com/clustercontrol/latest/reference-manuals/clustercontrol-mcp/">Go here for more information on how it works and detailed documentation.</a></p>
<p>For CCX and service provider users, CCX MCP provides the companion interface for managed cloud database operations. Together, they give database teams a practical way to use AI where it matters: inside real operational workflows, with context, control, and safety.</p>
<p>The post <a href="https://severalnines.com/blog/ai-assisted-production-database-ops-with-clustercontrol-mcp-and-ccx-mcp/">AI-Assisted Production Database Ops with ClusterControl MCP and CCX MCP</a> appeared first on <a href="https://severalnines.com/">Severalnines</a>.</p>
<p><a href="https://severalnines.com/blog/ai-assisted-production-database-ops-with-clustercontrol-mcp-and-ccx-mcp/">AI-Assisted Production Database Ops with ClusterControl MCP and CCX MCP</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Backrest&#8217;s back, alright!</title>
        <link>https://percona.community/blog/2026/05/19/backrests-back-alright/</link>
        <pubDate>Tue, 19 May 2026 11:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/backrests-back-alright/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>Events unfolded quickly over the course of a couple of weeks starting on 27 April 2026, when a message appeared on the pgBackRest project announcing: that the repository would be archived and active maintenance would stop.</p>
<p><a href="https://percona.community/blog/2026/05/19/backrests-back-alright/">Backrest&#8217;s back, alright!</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Events unfolded quickly over the course of a couple of weeks starting on 27 April 2026, when a <a href="https://pgbackrest.org/news.html" target="_blank" rel="noopener noreferrer">message appeared on the pgBackRest project announcing</a>:<br />
that the repository would be archived and active maintenance would stop.</p>
<p><figure><img decoding="async" width="2068" height="1206" src="https://percona.community/blog/2026/05/Jan-pgb-news-1_hu_a93328b56bbefc92.webp" alt="blog/2026/05/Jan-pgb-news-1.png" loading="lazy"></figure>
</p>
<p>For many in the PostgreSQL ecosystem, this landed like a shock. <a href="https://pgbackrest.org/" target="_blank" rel="noopener noreferrer">pgBackRest</a> is one of the most widely used backup and recovery tools for PostgreSQL, deeply embedded in production environments across enterprises large and small. Now it was suddenly described as “<a href="https://mydbanotebook.org/posts/pgbackrest-is-dead.-now-what/" target="_blank" rel="noopener noreferrer">dead</a>”, “<a href="https://www.gabrielebartolini.it/articles/2026/04/why-the-cycle-of-open-source-sustainability-needs-to-be-virtuous/" target="_blank" rel="noopener noreferrer">EOL</a>”, or “<a href="https://news.ycombinator.com/item?id=47919997" target="_blank" rel="noopener noreferrer">abandoned</a>”. The trigger was clear: its long-time maintainer, after more than a decade of work, announced he could no longer continue without sustainable funding and would archive the repository.<br />
i<br />
That message spread fast. The interpretation spread even faster.</p>
<p>And it was wrong.</p>
<h2>This wasn’t EOL</h2>
<p>Open source software doesn’t simply “go end of life” in the way proprietary software does. There is no vendor switch flipped to OFF. No license revoked. No binaries disappearing overnight.</p>
<p>What actually happens is more subtle and more important:</p>
<ul>
<li>Maintainers step away</li>
<li>Funding runs out</li>
<li>Work stops</li>
</ul>
<p>That’s not EOL. That’s a sustainability gap.</p>
<p><a href="https://github.com/pgbackrest/pgbackrest" target="_blank" rel="noopener noreferrer">pgBackRest</a> didn’t die. It hit a problem seen too often in open source world: a critical piece of infrastructure maintained by fewer and fewer people, until it ultimately depended on one person being able to justify working on it full time.</p>
<h2>The real problem</h2>
<p>The message from the maintainer was not about abandoning the project. It was about reality:</p>
<blockquote>
<p>maintaining a widely used tool requires time, and time requires funding</p>
</blockquote>
<p>For years, pgBackRest was supported through corporate sponsorship from mainly one vendor. When that disappeared due to the Crunchy Data acquisition, so did the ability to keep investing the same level of effort.</p>
<p>This is the “<a href="https://xkcd.com/2347/" target="_blank" rel="noopener noreferrer">Nebraska guy problem</a>” in action: software used by a large part of the industry, sustained by a very small number of people.</p>
<p>Yes, anyone can fork the project (and some already did), but:</p>
<ul>
<li>trust doesn’t fork</li>
<li>community doesn’t fork</li>
<li>sustainability definitely doesn’t fork</li>
</ul>
<p>A fork without coordination creates fragmentation without adding real value and that weakens the ecosystem. What pgBackRest needed was not a replacement, but continuity.</p>
<h2>The danger of bad framing</h2>
<p>Calling the project “dead” shifted the conversation in the wrong direction.</p>
<p><figure><img decoding="async" width="1402" height="1122" src="https://percona.community/blog/2026/05/Jan-pgb-not-dead_hu_85bcece67808178.webp" alt="blog/2026/05/Jan-pgb-not-dead.png" loading="lazy"></figure>
</p>
<p>Instead of asking:</p>
<blockquote>
<p>how do we keep this project healthy?</p>
</blockquote>
<p>the discussion drifted at best toward:</p>
<blockquote>
<p>what is the strategic solution here?</p>
</blockquote>
<p>and more often to:</p>
<blockquote>
<p>what do we replace it with?</p>
</blockquote>
<p>and</p>
<blockquote>
<p>what do we name our fork?</p>
</blockquote>
<p>That’s a natural reaction, but it’s not a good one.</p>
<p>Critical infrastructure should not be treated as disposable. Doing so erodes trust in the solutions we rely on and weakens the ecosystem. These foundational pieces should be treated as a shared responsibility so that the entire community becomes stronger.</p>
<h2>What happened next</h2>
<p>Behind the scenes, things moved quickly, with coordination between David and companies active in the PostgreSQL community.</p>
<p><figure><img decoding="async" width="2134" height="1084" src="https://percona.community/blog/2026/05/Jan-pgb-news-2_hu_f4016fa9b115ee82.webp" alt="blog/2026/05/Jan-pgb-news-2.png" loading="lazy"></figure>
</p>
<p>Conversations started across companies, contributors and the wider ecosystem. The goal wasn’t to “rescue” pgBackRest, but to do something far more valuable: to restore a sustainable model around it.</p>
<p>This is what open source actually requires: not heroics, but coordination.</p>
<h2>So what’s with pgBackRest?</h2>
<p>It’s all good. Well, better.</p>
<p><figure><img decoding="async" width="1536" height="1024" src="https://percona.community/blog/2026/05/Jan-pgb-back-cover_hu_491d36ba3bcded32.webp" alt="blog/2026/05/Jan-pgb-back-cover.png" loading="lazy"></figure>
</p>
<p>The short version:</p>
<ul>
<li><a href="https://pgbackrest.org/news.html#will-continue" target="_blank" rel="noopener noreferrer">Multiple companies coordinated together</a> to <a href="https://www.globenewswire.com/news-release/2026/05/19/3297383/0/en/open-source-stays-open-percona-sponsors-pgbackrest-to-keep-postgresql-backups-running.html" target="_blank" rel="noopener noreferrer">ensure continued funding and support around pgBackRest</a></li>
<li>Engineering effort is now being shared more broadly to expand the contributor and maintainer base</li>
<li>Discussions around longer term sustainability and governance in the PostgreSQL ecosystem accelerated significantly</li>
<li><strong>Percona</strong> played an active role in coordinating these efforts, contributing engineering resources, and helping bring organizations together around a sustainable path forward</li>
</ul>
<p><figure><img decoding="async" width="2134" height="1914" src="https://percona.community/blog/2026/05/Jan-pgb-news-3_hu_450f770f15b12e4f.webp" alt="blog/2026/05/Jan-pgb-news-3.png" loading="lazy"></figure>
</p>
<p>The project was never closed.</p>
<h2>The way (forward) is open</h2>
<p>pgBackRest’s situation is not unique. It’s a signal.</p>
<p><figure><img decoding="async" width="1402" height="1122" src="https://percona.community/blog/2026/05/Jan-pgb-back_hu_b092c398056379ed.webp" alt="blog/2026/05/Jan-pgb-back.png" loading="lazy"></figure>
</p>
<p>The PostgreSQL ecosystem depends on a wide range of tools that don’t have the same visibility, or funding, as the database itself. That gap is becoming harder to ignore.</p>
<p>There’s growing alignment on a few things:</p>
<ul>
<li>sustainability needs to be intentional</li>
<li>funding needs to be easier to organize</li>
<li>engineering effort needs to be shared</li>
</ul>
<p>Whether that leads to an umbrella foundation or another model, one thing is clear: the ecosystem needs structures that support both users and maintainers.</p>
<p><a href="https://percona.community/blog/2026/05/19/backrests-back-alright/">Backrest&#8217;s back, alright!</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Our Experience at MongoDB.local London 2026: The Era of AI Agents, Badges, and Surviving on Chips!</title>
        <link>https://percona.community/blog/2026/05/11/our-experience-at-mongodb.local-london-2026-the-era-of-ai-agents-badges-and-surviving-on-chips/</link>
        <pubDate>Mon, 11 May 2026 00:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/our-experience-at-mongodb-local-london-2026-the-era-of-ai-agents-badges-and-surviving-on-chips/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>On May 7th, Keith (Quality Engineer, Percona for MongoDB) and I had the super cool opportunity to head over to MongoDB.local London! The event was amazing and packed with insights about where the database ecosystem is heading.</p>
<p><a href="https://percona.community/blog/2026/05/11/our-experience-at-mongodb.local-london-2026-the-era-of-ai-agents-badges-and-surviving-on-chips/">Our Experience at MongoDB.local London 2026: The Era of AI Agents, Badges, and Surviving on Chips!</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>On May 7th, <strong>Keith</strong> (Quality Engineer, Percona for MongoDB) and I had the super cool opportunity to head over to <a href="https://www.mongodb.com/events/mongodb-local/london" target="_blank" rel="noopener noreferrer">MongoDB.local London</a>! The event was amazing and packed with insights about where the database ecosystem is heading.</p>
<p>If there was one massive takeaway from the day, it was this: <strong>We are officially in the Era of AI and “Agentic” Systems.</strong> During the event, the message was clear: we are shifting from basic LLMs (that just answer a prompt and forget it) to autonomous AI Agents that follow a continuous loop of Perception → Planning → Action. MongoDB’s President and CEO, CJ Desai, repeated a powerful phrase:</p>
<blockquote>
<p>While AI models change rapidly, the Data Layer is the constant.</p>
</blockquote>
<p><figure><img decoding="async" width="1376" height="893" src="https://percona.community/blog/2026/05/mongodb-desai_hu_912d92aa6b06692d.webp" alt="ceo" loading="lazy"></figure>
</p>
<p>Here is a look at our day, what we learned, and the fun we had along the way!</p>
<p><figure><img decoding="async" width="1376" height="1002" src="https://percona.community/blog/2026/05/mongodb-team_hu_4eee40ce0e67bf17.webp" alt="team" loading="lazy"></figure>
</p>
<h3>Arriving Early and Chasing Badges</h3>
<p>We got a great tip before the event: arrive early to get a head start on the gamified learning! MongoDB had a super nice setup where you could take tests on Credly to earn knowledge badges.</p>
<p>We jumped right in. I got a <strong>MongoDB Overview badge</strong>, but Keith was on a mission. He completed three different tests (including MongoDB for Developers) and unlocked some cool swag: a really cute, high-quality bag! It was a brilliant way to get attendees engaged right from the morning.</p>
<p><figure><img decoding="async" width="1018" height="724" src="https://percona.community/blog/2026/05/mongodb-skills_hu_dfaf421f5927c84d.webp" alt="skills" loading="lazy"></figure>
</p>
<p><a href="https://www.credly.com/organizations/mongodb/collections/mongodb-skill-badges/badge_templates" target="_blank" rel="noopener noreferrer">Here</a> are more badges in case you want to get yours!</p>
<p><figure><img decoding="async" width="1268" height="961" src="https://percona.community/blog/2026/05/mongodb-badges_hu_d3fd3baeff71149b.webp" alt="badges" loading="lazy"></figure>
</p>
<h3>General Session Highlights</h3>
<p>We spent a lot of our time in the main room for the General Session, and the announcements were packed with impressive numbers and tech:</p>
<ul>
<li><strong>MongoDB 8.3 is Fast:</strong> Osmar Olivo (Senior Director, Database Product Management) shared that the new version brings up to 35% more write throughput, 45% more read throughput, and 15% more for ACID transactions.</li>
<li><strong>The Scale is Real:</strong> We learned that Stripe uses MongoDB to process over $1 trillion in payments volume every year (maintaining 5 nines of availability!). Osmar framed this perfectly: that is 1.5% of the global GDP running through MongoDB.</li>
<li><strong>LangGraph.js Store Integration:</strong> This was a big one for developers. MongoDB is positioning itself as the “memory hard drive” for AI agents. By supporting JavaScript and TypeScript, they are making it super easy for companies to use their existing web developers to build complex AI workflows.</li>
<li><strong>Hugging Face Partnership:</strong> They are scaling with MongoDB Atlas to support over 3 million models, officially tying themselves to the “GitHub for AI.”</li>
</ul>
<p>Feel free to explore the recorded sessions for more: <a href="https://www.youtube.com/watch?v=mHOQWeuoreM&amp;t=1877s" target="_blank" rel="noopener noreferrer">MongoDB.local London 2026</a></p>
<h3>Guest Speakers</h3>
<p><strong>Ulku Rowe</strong> (CIO, Commercial Business at Lloyds Banking Group) talked about this being the “Decade of AI.” Lloyds is actively upskilling their current engineers through an internal “AI Academy” built in partnership with Cambridge University! She emphasized that as they build out this infrastructure, partnerships are absolutely critical to their success.</p>
<p>We also heard from <strong>Alex Holt</strong> from ElevenLabs, a company focused on producing the absolute best, human-sounding voice AI. Their scale is wild: they have 40 million agents running and hit $500 million in Annual Recurring Revenue in just 3 years! Alex mentioned that because many enterprises don’t know how to build agents yet, ElevenLabs uses “forward deployed engineers” to sit directly with customers to build, deploy, and prove the ROI of their voice agents.</p>
<p><figure><img decoding="async" width="1366" height="857" src="https://percona.community/blog/2026/05/mongodb-eleven_hu_56f02d97a48c8a54.webp" alt="eleven" loading="lazy"></figure>
</p>
<h3>The Hands-on Workshop and Our Lunch “Diet”</h3>
<p>Later in the day, we attended a hands-on workshop: <strong>Designing Memory Systems for AI Agents</strong>, hands-on workshop about how AI agents can remember information and use it later to give better responses. We used Python and MongoDB Atlas to build memory into an AI agent and learned how to store, search, update, and manage that memory.<br />
The setup was good, everything was prepared in advance so we could focus on executing the commands and truly understanding the concepts. At the end, we answered some questions and earned another badge!</p>
<p><figure><img decoding="async" width="1264" height="750" src="https://percona.community/blog/2026/05/mongodb-workshop_hu_73b6877a1ca1c922.webp" alt="badges" loading="lazy"></figure>
</p>
<p>However, the workshop ran until 1:00 PM. One of our friends had warned us to “go for food fast,” but we were too focused on the workshop! By the time we made it to the lunch area, all the main food was completely sold out.</p>
<p><strong>How did we survive?</strong> Chips, candies, and a lot of beverages. Between the sodas, coffee, and tea, we kept our energy, but it was definitely a funny learning experience for next time! I can imagine Keith arriving home for dinner!!</p>
<p><figure><img decoding="async" src="https://percona.community/blog/2026/05/mongodb-gif.gif" alt="badges"></figure>
</p>
<h3>Exploring the Sponsor Hall (And Doing a Podcast!)</h3>
<p>We spent our afternoon speaking with sponsors and even got to participate in a quick podcast focusing on AI and how Atlas is being used as a strong platform for these projects!</p>
<p><figure><img decoding="async" width="1176" height="791" src="https://percona.community/blog/2026/05/mongodb-podcast_hu_34afb51909661144.webp" alt="podcast" loading="lazy"></figure>
</p>
<p>The person being interviewed was <strong>Bikram Das</strong>, who is Chief Data Architect at Tata Consulting Services, and we had a great chat with him. TCS and MongoDB have partnered on a super impressive real-time payment and fraud detection platform. They use autonomous AI agents to instantly assess risk, investigate anomalies, and route safe transactions to networks like Visa and SWIFT without any downtime.</p>
<p>We also talked with IBM folks; they showed us their “plug-and-play” enterprise AI foundation. They are focused on letting large companies safely deploy AI agents without having to completely rip out and rebuild their current data infrastructure.</p>
<p>We also stopped by the Accenture booth! They are actively working on integrating AI directly into their platforms so they can offer smarter, more advanced solutions to their customers.</p>
<h3>Wrapping Up!</h3>
<p>To cap off a great day, MongoDB had one last treat. If you took less than 3 minutes to fill out the end-of-event survey, they handed you a super nice pair of socks. <em>(We love community ideas like this!)</em>.</p>
<p><figure><img decoding="async" width="534" height="651" src="https://percona.community/blog/2026/05/mongodb-socks_hu_de3306139b649507.webp" alt="podcast" loading="lazy"></figure>
</p>
<p>Overall, <strong>MongoDB.local London</strong> was a great experience. It was a nice space to learn, connect, have hands-on experience, and see exactly how the database world is evolving to meet the Agentic AI era head-on.</p>
<p>See you at the next event!</p>
<p><figure><img decoding="async" width="699" height="614" src="https://percona.community/blog/2026/05/mongodb-percona_hu_e0b941a7bf1554f2.webp" alt="bye" loading="lazy"></figure></p>
<p><a href="https://percona.community/blog/2026/05/11/our-experience-at-mongodb.local-london-2026-the-era-of-ai-agents-badges-and-surviving-on-chips/">Our Experience at MongoDB.local London 2026: The Era of AI Agents, Badges, and Surviving on Chips!</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Meet the Percona Community team</title>
        <link>https://percona.community/blog/2026/05/07/meet-the-percona-community-team/</link>
        <pubDate>Thu, 07 May 2026 09:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/meet-the-percona-community-team/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>We’ve just landed on X and Mastodon, and before the first real post goes out, we wanted to do something we don’t do often enough: introduce ourselves.</p>
<p><a href="https://percona.community/blog/2026/05/07/meet-the-percona-community-team/">Meet the Percona Community team</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>We’ve just landed on X and Mastodon, and before the first real post goes out, we wanted to do something we don’t do often enough: introduce ourselves.</p>
<p>If you’ve been to Percona Live, a Percona.connect, a PGConf, KubeCon, FOSDEM, or pretty much any open source database event in the past few years, you’ve probably already met one of us. We’re the people behind the booth, on stage, organising the speakers, herding the giant Jenga set, or trying to convince you to play a quick game of chess between sessions. Now we’re also the people behind @PerconaCommunity on X and our new Mastodon account on the fediverse.</p>
<p>Each of us will sign our posts with our initials, so you’ll always know who you’re talking to. Here’s who we are.</p>
<h2>Laura Czajkowski &#8211; Director of Community (LC)</h2>
<p>Laura runs the team. She’s been in open source community work since the early 2000s, starting at the University of Limerick’s Skynet computer society and going on to lead community at Canonical (Ubuntu), MongoDB, Couchbase, Vonage, Solace, and Dragonfly before joining Percona. Former Ubuntu LoCo Council and Community Council member. Outside work she’s a Munster and Ireland rugby fan, runs a book club, plays tennis, and books regular trips to Disney World. Find her at <a href="https://laura.community/" target="_blank" rel="noopener noreferrer">laura.community</a>.</p>
<h2>Alastair Turner &#8211; Postgres Community Advocate (AT)</h2>
<p>Alastair has been working with databases since 1995, settling on Postgres around 2002. If you’ve spoken to anyone at Percona about PostgreSQL, Kubernetes, Transparent Data Encryption, or extensions, there’s a good chance it was him. He writes regularly on the <a href="https://percona.community/" target="_blank" rel="noopener noreferrer">Percona Community blog</a> and speaks at PGConf events across Europe and North America. He’s particularly interested in how open source communities work together &#8211; and what they can learn from each other.</p>
<h2>Daniil Bazhenov &#8211; Senior Community Manager (DB)</h2>
<p>Daniil organises our conference speakers, runs the Percona Forums, and has been a long-time contributor to the Percona Community blog. If you’ve ever submitted a talk to Percona Live or asked a question on forums.percona.com, you’ve crossed paths with him. He writes hands-on technical content too &#8211; GitOps with ArgoCD, PMM monitoring, Percona Everest from source &#8211; and hosts the Russian-language Percona Podcast.</p>
<h2>Kyle Flanagan &#8211; Global Manager, Events (KF)</h2>
<p>Kyle is the reason any of our events actually happen. He runs Percona’s global events programme, from Percona Live and Percona.connect to our presence at Open Source Summit, KubeCon, and dozens of regional events each year. Before Percona, he ran executive events at Utah Valley University. If you’ve grabbed a sticker at one of our booths, Kyle probably packed the box it came in.</p>
<h2>Edith Puclla &#8211; Technology Evangelist (EP)</h2>
<p>Originally from Peru, now based in London, Edith is a CNCF Ambassador, Docker Captain, and Data on Kubernetes Ambassador. Her background is in DevOps and infrastructure &#8211; Kubernetes, GPUs, Linux, distributed systems &#8211; and she contributes to translating Kubernetes documentation into Spanish through SIG-Operators. She’s a regular speaker at FOSDEM, KubeCon, Cloud Native Rejekts, and Percona University events across Latin America.</p>
<h2>Why we’re doing this</h2>
<p>We spend a lot of our time at events because that’s where the most useful conversations happen &#8211; the ones over coffee, at the booth, in the hallway between talks. Being on social gives us a way to keep those conversations going when we’re not in the same room. Expect event updates, contributor shout-outs, things we’ve found useful, and the occasional opinion. If we’ve shared it, we’ve actually read it.</p>
<p>Photo below was taken at our recent team offsite in Antalya &#8211; five people who genuinely like working together, in case the smiles don’t give it away.</p>
<p><figure><img decoding="async" width="1974" height="1249" src="https://percona.community/blog/2026/05/community-team-with-names_hu_10e256588ef14484.webp" alt="The Percona Community team in Antalya" loading="lazy"></figure>
</p>
<p><strong>Find us:</strong></p>
<ul>
<li>X: <a href="https://x.com/PerconaBytes" target="_blank" rel="noopener noreferrer">@PerconaBytes</a></li>
<li>Mastodon: <a href="https://mastodon.social/@PerconaBytes" target="_blank" rel="noopener noreferrer">@PerconaBytes</a></li>
<li>Forums: <a href="https://forums.percona.com/" target="_blank" rel="noopener noreferrer">forums.percona.com</a></li>
<li>Community blog: <a href="https://percona.community/" target="_blank" rel="noopener noreferrer">percona.community</a></li>
</ul>
<p>Come say hi. If we’re at an event near you, the booth is open &#8211; and so is the giant Jenga.</p>
<p><a href="https://percona.community/blog/2026/05/07/meet-the-percona-community-team/">Meet the Percona Community team</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>How I Stopped Babysitting My Coding Agent (With Dotfiles)</title>
        <link>https://percona.community/blog/2026/05/05/how-i-stopped-babysitting-my-coding-agent-with-dotfiles/</link>
        <pubDate>Tue, 05 May 2026 00:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/how-i-stopped-babysitting-my-coding-agent-with-dotfiles/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>Most developers at least try to use coding agents for development-related tasks, but babysitting LLMs and managing their permissions is no fun. Completely skipping permission checks is a dangerous idea on your main machine, and setting up containers or VMs for sandboxing is a pain. Can we do better?</p>
<p><a href="https://percona.community/blog/2026/05/05/how-i-stopped-babysitting-my-coding-agent-with-dotfiles/">How I Stopped Babysitting My Coding Agent (With Dotfiles)</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Most developers at least try to use coding agents for development-related tasks, but babysitting LLMs and managing their permissions is no fun.<br />
Completely skipping permission checks is a dangerous idea on your main machine, and setting up containers or VMs for sandboxing is a pain.<br />
Can we do better?</p>
<h3>The autonomy problem</h3>
<p>If you work in software development, you have most certainly heard the phrase:</p>
<blockquote>
<p>Let’s just use an LLM to solve it!</p>
</blockquote>
<p>People tend to forget that it’s a bit more complicated than this:<br />
anybody can easily use LLMs, of course, but using them properly is a different question.<br />
Ideally, we could all just download a simple tool, give it some instructions, and relax:</p>
<p><figure><img decoding="async" width="1280" height="853" src="https://percona.community/blog/2026/05/ai-gardening_hu_42a05c1f0289c8d8.webp" alt=" " loading="lazy"></figure>
</p>
<div class="admonition admonition--warning">
<p>Disclaimer: your employer might not approve if you do gardening during work hours; I suggest choosing a different activity in this case!</p>
</div>
<p>In all seriousness, every panel in the above image contains details that people tend to ignore, which either results in inefficient workflows or the creation of slop.</p>
<p>We can’t talk about all of them in one go; it would be overly long and complex.<br />
I’ll only focus on panel 2:<br />
what can we do to ensure our uninterrupted <del>gardening</del> normal work?</p>
<p>If you simply download Claude/Codex and start using the CLI tool, VS Code extension, or anything else, you’ll quickly get bored of all the babysitting.</p>
<blockquote>
<p>Hey, user, can I execute another slightly different <code>ls</code> command?</p>
</blockquote>
<p>Either you decide it isn’t worth the effort because of all the interruptions, or you start blindly hitting Enter: “of course I approve, it should be safe…”</p>
<ol>
<li>Are you really thoroughly reviewing every command it throws at you?</li>
<li>Even that 100-line bash script the TUI doesn’t display properly, because it wouldn’t fit on the screen?</li>
<li>Have you ever seen an agent circumvent directory permissions by accessing the restricted files through a one-off script instead?</li>
</ol>
<p>Fine-grained permissions of course exist, and in theory, you could try to configure something like that.<br />
But let’s be honest, most of us won’t take the time, and we likely won’t notice if (3) happens as part of a long script.</p>
<h3>Let the AI run free</h3>
<p>That’s the point where you might discover the other option:<br />
completely disabling the permission system and letting the AI do whatever it wants.</p>
<p>Nothing can go wrong, it’s only on your machine, right?</p>
<p><figure><img decoding="async" width="1280" height="786" src="https://percona.community/blog/2026/05/ai-running_hu_bf25d1ba233085f2.webp" alt=" " loading="lazy"></figure>
</p>
<p>Except that:</p>
<ul>
<li>it will also have full network access, both for reading and posting</li>
<li>it can read all your secrets: its own OAuth token, your SSH key, and so on…</li>
<li>do you load your SSH key into ssh-agent? That’s convenient so you don’t have to enter your password every time, but do you also have a hardware key you have to touch on every use, or can the AI force-push your repository and later say</li>
</ul>
<blockquote>
<p>You are absolutely right! I shouldn’t have done that. If you have backups you can restore them with the following steps: …</p>
</blockquote>
<p>Or it might end up in any number of similar situations.<br />
Coding agents aren’t malicious by design, but they can be subject to prompt injection from the web, or simply reach dumb conclusions.<br />
There’s a good reason why Claude, for example, calls this option <code>--dangerously-skip-permissions</code>.</p>
<h3>Put them in a cage!</h3>
<p>The next obvious choice is to let them run free, but only within a cell:<br />
run the agent inside a container or virtual machine, where it can only access what you let it.</p>
<p>This, however, costs us some convenience, as we face new issues:</p>
<ul>
<li>If we completely separate the environment, we can’t access it from our main system.<br />
Allowing AI tools to push to your repo without confirmation is a bad idea, but maybe you yourself should be able to push somehow?<br />
Or to verify the changes in a more complex, outside environment?</li>
<li>Our environment and the AI’s environment are different… which means we have to set up both.<br />
I hope your project is easy to bootstrap, with proper scripting so you don’t have to do this by hand.<br />
But is your development environment also easy to bootstrap?</li>
</ul>
<p>There are some existing, ready-to-use solutions: for example, both Claude Code and OpenAI Codex have support for <a href="https://containers.dev/" target="_blank" rel="noopener noreferrer">devcontainers</a>.<br />
If you want an easy setup, these can be an option.</p>
<p>However, I wanted more:<br />
to replicate my main setup exactly – the same compilers, tools, shell and editor settings, and so on.<br />
The AI tools should have the same executables available.<br />
If I have to edit or do something directly in the container, I shouldn’t be surprised by something working differently.</p>
<p>That’s when I remembered: I already have a <a href="https://github.com/dutow/dotfiles" target="_blank" rel="noopener noreferrer">dotfiles</a> repo. Can I make it even better for this use case?</p>
<h3>Automate all the things!</h3>
<p>The idea of dotfiles is simple:<br />
a repository where you store your configuration, so when you reinstall your system, or when you have to start using another one, you can quickly replicate your preferred settings.<br />
Editors, shells, git – everything works the same, without spending hours figuring it all out again.</p>
<p>The problem is that it usually only focuses on configuring an already properly installed system.<br />
When you only buy a new PC every few years, or system administrators already set up every server you have to use before your first login, this isn’t a big issue.</p>
<p>But when you want to be able to quickly set up and iterate with throwaway systems?<br />
Then you need better automation!</p>
<p>This is also a solved problem; tools like Ansible and Puppet exist.</p>
<p>The idea is simple:</p>
<ul>
<li>instead of manually setting up your system, use an automation tool to install and configure everything</li>
<li>you can leverage free CI services to make sure that your scripts work when run on a clean system</li>
<li>while docker/podman traditionally uses its own setup scripting, it is possible to build an image using the same automation tool instead</li>
<li>the result? Main PC, containers, virtual machines, and quick VPS instances all behaving exactly the same way!</li>
</ul>
<p>The downside is, of course, that you either have to reinstall your main PC once your new setup is good enough, or accept that it will be slightly different until you do so.<br />
I went with the reinstall; it’s easy once you have things working.</p>
<p>And if you don’t know any of these tools?<br />
That’s the best part – we’re using AI, and AI knows them well.</p>
<h3>A side note on architecture</h3>
<p>The focus of this blog post is panel 2, not the others.<br />
But I want to at least mention that the architecture and human review, including design review, are as important as with any other AI-driven software project.</p>
<p>If you completely vibe-code it and create an unmaintainable, sloppy dotfiles configuration, you are going to regret it later. This is your everyday work environment.</p>
<p>After the initial idea, when I started to think more about my requirements, I quickly realized that I want something generic.</p>
<p>First, I want to install a different set of packages depending on where I am installing them: containers, WSL instances, or real machines.<br />
My laptop needs slightly different settings compared to my desktop.</p>
<p>Second, I want to be able to do this on multiple distributions.<br />
Previously it was really annoying when I had to debug a distro-specific bug, unless it happened to involve one of my primary Linux distributions.<br />
I am also using a different OS on my work laptop and personal desktop PC because of company requirements.</p>
<p>With a proper Ansible setup, I can make all of these work seamlessly, even autodetecting the environment, and verifying all important configurations on CI for every commit.</p>
<p>Your requirements will most likely be different.<br />
Think about these beforehand and structure your repository accordingly!</p>
<h3>Containers or virtual machines?</h3>
<p>So far I mentioned both as alternatives, and both have their pros and cons.</p>
<table>
<thead>
<tr>
<th>Aspect</th>
<th>Container</th>
<th>Virtual machine</th>
</tr>
</thead>
<tbody>
<tr>
<td>Resource overhead</td>
<td>Low</td>
<td>Higher</td>
</tr>
<tr>
<td>Spin-up time</td>
<td>Seconds</td>
<td>Minutes</td>
</tr>
<tr>
<td>Host integration (mounts, networks)</td>
<td>Easy, direct</td>
<td>Network only</td>
</tr>
<tr>
<td>Isolation from host</td>
<td>Partial</td>
<td>Strong</td>
</tr>
<tr>
<td>GUI / IDE support</td>
<td>Limited, terminal-friendly</td>
<td>Full desktop</td>
</tr>
<tr>
<td>Privileged tools (GDB, GPU)</td>
<td>Extra capabilities required</td>
<td>Native, inside the VM</td>
</tr>
<tr>
<td>Credential storage</td>
<td>Shares host’s filesystem</td>
<td>Must duplicate (SSH key, hardware key)</td>
</tr>
</tbody>
</table>
<p>For now, I went with containers.<br />
With a few helper scripts I can mount specific directories from the host OS, and I can also specify which docker/podman network the new container should join.<br />
This lets me start up my docker-compose development clusters directly on my main OS, and lets the agent access the development/test database and other containers for its work using the shared network.</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">dcont run --mount `pwd` --network hackorum_default --context main-dev</span></span></code></pre>
</div>
</div>
</div>
<p>I even have a <code>context</code> parameter, which lets me keep multiple independent AI configurations: different system-level CLAUDE.md, plugin set, hooks, and so on.<br />
Underneath, this is just a few specific mounts and symlinks, but the advantage is huge:</p>
<ul>
<li>I can quickly experiment without fearing that I’ll break my main workflows</li>
<li>I have completely separate setups for development and review work, without them conflicting with each other</li>
</ul>
<p>The upsides are easy integration, lower resource overhead, and quicker spin-up.<br />
I can mount directories directly from the host, and easily interact with docker containers running on the host.</p>
<p>The downside comes from that same integration:<br />
everything is still on the host, and the more access you give to the container, the less secure it becomes.<br />
Tools like GDB and GPU access require extra privileges, and you might have to relax SELinux features for the container.</p>
<p>The privilege problem, and the possibility of giving the container too much access, is a real risk.<br />
Docker, which runs as root on the host, and rootless podman, which maps the container root to the current host user, behave very differently if something is misconfigured – but neither protects the data accessible to the running user.</p>
<p>You can tighten the defaults with flags like <code>--cap-drop=ALL</code>, <code>--security-opt=no-new-privileges</code>, and read-only mounts where possible, but these only narrow the attack surface; they don’t fix what you mount in.<br />
Which means what you mount matters more than which runtime you pick.</p>
<h4>Mounts and credentials</h4>
<p><code>.env</code> files, for example, can be challenging:<br />
these can contain API keys, passwords, and other secrets required by the application, which ideally shouldn’t be accessible to the coding agent.<br />
I started using two levels of them – one in the project folder with only generic data, and another one level above containing sensitive login information for external services.<br />
This way, when I mount the project folder, the container can’t access the sensitive <code>.env</code> file.</p>
<p>There are also some special files to watch out for:<br />
mounting <code>/var/run/docker.sock</code> into the container, for example, can break the sandbox completely, as it grants access equivalent to root on the host.</p>
<h4>When to pick a VM instead</h4>
<p>A container also isn’t a full-fledged desktop.<br />
Personally, I am used to working in terminals; I like tools like tmux or neovim.<br />
But if you prefer desktop applications and IDEs, a full virtual machine might be a better option.</p>
<p>Full virtual machines aren’t more difficult to set up and give you a complete GUI, but they raise a different question:<br />
how do you set everything up without accidental credential leaks?</p>
<p>You either rely on network synchronization between your main OS and the virtual machine – pushing to remotes only from the main OS – or you give the virtual machine a hardware key and store your SSH key on it.</p>
<p>Agents can of course always access and leak their own API keys; we can’t do anything about that with 100% certainty.<br />
But we can aim to reduce their ability to leak anything else, by minimizing what they physically have access to.</p>
<h3>An example setup</h3>
<p>You can check out my <a href="https://github.com/dutow/dotfiles" target="_blank" rel="noopener noreferrer">dotfiles</a> for inspiration.<br />
It should be only that:<br />
something you can look at while designing your own version.</p>
<p>It is designed for my workflows, and yours are most likely different.<br />
You also shouldn’t blindly trust a script somebody else’s LLM generated.</p>
<h4>The helper script</h4>
<p>The repository has a readme; the most interesting part is probably <a href="https://github.com/dutow/dotfiles/blob/master/dcont" target="_blank" rel="noopener noreferrer">the script I mentioned earlier</a>, which builds and runs the containers.</p>
<p>It is long and complex, and deals with additional details I didn’t even mention here, to keep this introduction from getting too involved.</p>
<p>The basic idea, however, is easy to summarize.<br />
A basic docker command is simple:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">docker run -it ubuntu:latest /bin/bash</span></span></code></pre>
</div>
</div>
</div>
<p>But it also gets complicated quickly:</p>
<ul>
<li>what folders need mounting? (the project, specific directories for tools)</li>
<li>which networks to join?</li>
<li>do we have to set up specific hardware, like a GPU?</li>
<li>do we need specific access permissions for some software?</li>
<li>and so on</li>
</ul>
<p>The command quickly becomes longer and longer, and copy-pasting it from notes or shell history isn’t fun.<br />
It is also most likely project-specific.<br />
You want different mounts, different contexts for AIs, different specific permissions.<br />
All this should be configurable, and still simple.</p>
<p>In my case, most of my projects also have <code>.env</code> files set up, which makes it a no-brainer to also support configuration through environment variables.</p>
<p>Most of the time, all I have to do is <code>cd</code> into the project directory and execute <code>dcont</code> without any extra parameters. That starts up a ready-to-use, project-specific setup, and I can immediately start typing instructions to Claude.</p>
<h4>The Ansible part</h4>
<p>I already mentioned this before, but didn’t go into the details:<br />
you can build docker or podman images with Ansible.</p>
<p>Normally this isn’t that useful:<br />
if the only goal is a container cluster, a Containerfile is much easier to use, and more efficient for rebuilding, since it automatically detects which layers have to be rebuilt.</p>
<p>If the goal, however, is to replicate the same setup on a real host and in a container, the picture is different.<br />
These images are only meant for local use, so layering and image size don’t matter – we’ll never upload them.</p>
<p>Build times are also secondary.<br />
Even if a rebuild is needed once or twice a day, you can continue using the previous version in the meantime and switch later.<br />
And it’s not like we can’t do proper incremental builds with it; Ansible supports that too – it’s just a bit slower than how containers normally do it.</p>
<p>This is included in the same script, and the solution is surprisingly simple:</p>
<ol>
<li>start a container with <code>sleep infinity</code></li>
<li>copy the dotfiles repo into it, since it’s already checked out on the host</li>
<li>run the same dotfiles/Ansible script as on other hosts (with proper parameters)</li>
<li>set up a proper user</li>
<li>commit the image</li>
</ol>
<p>The same could be done using a <code>Containerfile</code>, but what’s the advantage?<br />
The image isn’t shareable or reusable anyway, and some operations are easier to implement directly in bash.<br />
This process also leaves open the possibility of doing incremental builds, instead of always rerunning the installation script from scratch.</p>
<h3>The unsaid part: network access</h3>
<p>In all of the sandboxing discussion above, I quietly ignored the question of network access:<br />
if you give unrestricted network access to an LLM agent, you can have a bad time.</p>
<p>Prompt injection exists, even if AI companies try to make it harder and harder.</p>
<p>For most use cases, a complete network ban is also a bad idea for productivity and code quality, which makes this another complex, open-ended question with its own options and tradeoffs – out of scope for this already long blog post.</p>
<p>I hope the information I provided here was useful, and that you can improve your AI setup based on it!</p>
<p><a href="https://percona.community/blog/2026/05/05/how-i-stopped-babysitting-my-coding-agent-with-dotfiles/">How I Stopped Babysitting My Coding Agent (With Dotfiles)</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>InnoDB Redo Log Sizing: Stop Guessing, Start Measuring</title>
        <link>https://percona.community/blog/2026/05/02/innodb-redo-log-sizing-stop-guessing-start-measuring/</link>
        <pubDate>Sat, 02 May 2026 00:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/innodb-redo-log-sizing-stop-guessing-start-measuring/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>Introduction Many MySQL configurations inherit redo log sizing from defaults, aging blog posts, or configuration folklore.</p>
<p><a href="https://percona.community/blog/2026/05/02/innodb-redo-log-sizing-stop-guessing-start-measuring/">InnoDB Redo Log Sizing: Stop Guessing, Start Measuring</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<h2>Introduction</h2>
<p>Many MySQL configurations inherit redo log sizing from defaults, aging blog posts, or configuration folklore.</p>
<p><code>innodb_redo_log_capacity</code> gets set once… and then quietly fades into the background.</p>
<p>But redo log capacity directly shapes how efficiently MySQL absorbs writes, manages checkpoint pressure, and handles burst-heavy workloads.</p>
<p>Set it too low, and aggressive flushing can throttle throughput.<br />
Set it too high, and crash recovery can become painfully long.</p>
<p>Redo logs are more than crash insurance.</p>
<p>They are part of your write-performance architecture.</p>
<blockquote>
<p>Redo logs are the shock absorbers of write-heavy MySQL. Too small, and performance jolts. Too large, and recovery drags.</p>
</blockquote>
<h2>Why Redo Logs Matter</h2>
<p>InnoDB redo logs are often described as crash recovery journals, but that description undersells their real operational value.</p>
<p>Redo logs function as a write buffer between committed transactions and eventual data file writes.</p>
<p>When a transaction commits:</p>
<ul>
<li>Changes are written to the redo log first</li>
<li>Dirty pages remain in memory</li>
<li>Data pages are flushed later</li>
</ul>
<p>This write-ahead logging (WAL) design allows MySQL to:</p>
<ul>
<li>Absorb bursts of write activity</li>
<li>Reduce immediate random disk writes</li>
<li>Smooth checkpoint behavior</li>
<li>Preserve durability</li>
</ul>
<p>Redo logs act like pressure regulators in a write-heavy system.</p>
<p>They absorb pressure spikes so the entire system doesn’t thrash every time demand increases.</p>
<p>Without enough redo capacity, MySQL has less room to absorb write bursts before it must flush aggressively.</p>
<h2>Checkpoint Age and Flushing Pressure</h2>
<p>Redo log sizing becomes most visible when checkpoint pressure builds.</p>
<p>Checkpoint age represents how far current write activity has advanced beyond the last durable checkpoint:</p>
<p><code>Checkpoint Age = Current LSN - Last Checkpoint LSN</code></p>
<p>As checkpoint age approaches total redo capacity:</p>
<ul>
<li>Adaptive flushing intensifies</li>
<li>Page cleaners become more aggressive</li>
<li>Dirty pages flush faster</li>
<li>Disk I/O spikes</li>
<li>Latency often becomes unstable</li>
</ul>
<p>This is where undersized redo logs can trigger flush storms.</p>
<blockquote>
<p>MySQL isn’t writing more data. It’s being forced to write sooner and less efficiently.</p>
</blockquote>
<h3>Useful metrics</h3>
<ul>
<li><code>Innodb_checkpoint_age</code></li>
<li><code>Innodb_buffer_pool_pages_dirty</code></li>
<li><code>Innodb_data_fsyncs</code></li>
<li><code>Innodb_log_waits</code></li>
</ul>
<blockquote>
<p>When redo space shrinks, MySQL doesn’t stop writing. It starts panicking earlier.</p>
</blockquote>
<h2>Symptoms of Undersized Redo</h2>
<p>Small redo logs rarely announce themselves directly.</p>
<p>Instead, they often masquerade as generalized storage or write-performance issues.</p>
<h3>Common warning signs</h3>
<ul>
<li>Periodic write stalls</li>
<li>Spikes in fsync activity</li>
<li>Sharp increases in page cleaner workload</li>
<li>TPS drops during burst traffic</li>
<li>Dirty page percentage volatility</li>
<li>Stable CPU, unstable write latency</li>
</ul>
<h3>A common misdiagnosis</h3>
<p>Many systems blame disks when the real issue is insufficient redo headroom.</p>
<p>If writes are arriving faster than redo can comfortably buffer them, MySQL is forced into reactive flushing patterns.</p>
<p>The problem may not be disk speed.</p>
<p>It may be timing pressure.</p>
<h2>Measuring with Status Counters</h2>
<p>Redo log sizing should be based on observed workload, not memory percentages or inherited defaults.</p>
<h3>Step 1: Measure redo generation rate</h3>
<p>Use:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SHOW</span><span class="w"> </span><span class="n">ENGINE</span><span class="w"> </span><span class="n">INNODB</span><span class="w"> </span><span class="n">STATUS</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>Track:</p>
<ul>
<li>Log sequence number</li>
<li>Log flushed up to</li>
<li>Last checkpoint at</li>
</ul>
<p>Measure LSN growth over time:</p>
<p><code>Redo Generation Rate = (LSN delta) / elapsed time</code></p>
<h3>Example</h3>
<p>If LSN grows by 4 GB over one hour:</p>
<ul>
<li>1 GB redo capacity = frequent pressure</li>
<li>4 GB redo capacity = ~1 hour buffer</li>
<li>8 GB redo capacity = larger burst tolerance</li>
</ul>
<h3>Step 2: Watch for log stress</h3>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SHOW</span><span class="w"> </span><span class="k">GLOBAL</span><span class="w"> </span><span class="n">STATUS</span><span class="w"> </span><span class="k">LIKE</span><span class="w"> </span><span class="s1">'Innodb_log_waits'</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">SHOW</span><span class="w"> </span><span class="k">GLOBAL</span><span class="w"> </span><span class="n">STATUS</span><span class="w"> </span><span class="k">LIKE</span><span class="w"> </span><span class="s1">'Innodb_os_log%'</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<h3>Key metric</h3>
<p><code>Innodb_log_waits</code></p>
<p>If this value increases, transactions are waiting for log free space.</p>
<p>That is one of the clearest signs your redo logs may be too small.</p>
<p><code>Innodb_log_waits</code> is less a tuning suggestion and more a smoke alarm.</p>
<h2>Practical Sizing Strategy</h2>
<p>Forget percentage-of-RAM formulas.</p>
<p>Redo logs should be sized around workload intensity.</p>
<p><strong>A practical starting point:</strong></p>
<p>Size redo capacity to hold 30 to 60 minutes of peak redo generation</p>
<h3>Example</h3>
<p>Peak redo generation = 6 GB/hour</p>
<p><strong>Minimum:</strong></p>
<p>30 minutes = 3 GB</p>
<p><strong>Safer:</strong></p>
<p>60 minutes = 6 GB</p>
<p><strong>Heavy burst environments:</strong></p>
<p>Larger sizing may reduce flush volatility further</p>
<h2>Trade-Offs</h2>
<h3>Smaller Redo Logs</h3>
<p><strong>Pros:</strong></p>
<ul>
<li>Faster crash recovery</li>
<li>Lower storage footprint</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>Increased checkpoint pressure</li>
<li>More aggressive flushing</li>
<li>Greater write instability</li>
</ul>
<h3>Larger Redo Logs</h3>
<p><strong>Pros:</strong></p>
<ul>
<li>Better burst absorption</li>
<li>Smoother sustained write performance</li>
<li>Reduced flush storms</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>Longer crash recovery</li>
<li>Delayed visibility into pressure buildup</li>
</ul>
<h2>Common Mistakes</h2>
<ol>
<li>
<p><strong>Treating redo like buffer pool sizing</strong><br />
Redo capacity is about write throughput buffering, not memory caching.</p>
</li>
<li>
<p><strong>Ignoring Innodb_log_waits</strong><br />
This can leave obvious pressure invisible until performance suffers.</p>
</li>
<li>
<p><strong>Oversizing without testing recovery</strong><br />
Large redo logs may improve runtime but worsen restart scenarios.</p>
</li>
<li>
<p><strong>Sizing for average load instead of peak</strong><br />
Redo logs exist to absorb pressure spikes, not calm periods.</p>
</li>
</ol>
<h2>Final Thoughts</h2>
<p>The right redo log size isn’t about maximizing a configuration value.</p>
<p>It’s about matching capacity to workload behavior.</p>
<ul>
<li>Too small, and MySQL becomes reactive.</li>
<li>Too large, and crash recovery becomes the hidden tax.</li>
</ul>
<p>When redo logs are properly sized, they fade into the background.</p>
<p>They quietly absorb bursts, smooth checkpoint behavior, and preserve performance consistency under pressure.</p>
<blockquote>
<p>Redo logs work best when they disappear into the background, quietly absorbing pressure instead of creating it.</p>
</blockquote>
<p>Stop guessing.</p>
<p>Measure your workload, observe your log pressure, and size with intent.</p>
<p><a href="https://percona.community/blog/2026/05/02/innodb-redo-log-sizing-stop-guessing-start-measuring/">InnoDB Redo Log Sizing: Stop Guessing, Start Measuring</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Open source doesn’t die. It gets unfunded.</title>
        <link>https://percona.community/blog/2026/04/30/open-source-doesnt-die-it-gets-unfunded/</link>
        <pubDate>Thu, 30 Apr 2026 11:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/open-source-doesnt-die-it-gets-unfunded/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>If you are using PostgreSQL in any capacity very likely this week has started for you with a bang. pgBackRest, one of the most known tools for PostgreSQL, praised for the scalable and reliable way to do backups has announced that the project is currently archived.</p>
<p><a href="https://percona.community/blog/2026/04/30/open-source-doesnt-die-it-gets-unfunded/">Open source doesn’t die. It gets unfunded.</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>If you are using PostgreSQL in any capacity very likely this week has started for you with a bang. pgBackRest, one of the most known tools for PostgreSQL, praised for the scalable and reliable way to do backups has announced that the project is currently archived.</p>
<h2>Archived, <a href="https://www.reddit.com/r/PostgreSQL/comments/1sx2ttg/comment/oilzdag/?utm_source=share&amp;utm_medium=web3x&amp;utm_name=web3xcss&amp;utm_term=1&amp;utm_content=share_button" target="_blank" rel="noopener noreferrer">you mean EOL</a>?</h2>
<p><figure><img decoding="async" width="1418" height="350" src="https://percona.community/blog/2026/04/opensourcedoesntdie-reddit_hu_9a813996646fa88a.webp" alt="blog/2026/04/opensourcedoesntdie-reddit.png" loading="lazy"></figure>
</p>
<p>No! Open source software rarely has a hard “end of life.” What it does have are maintainership gaps and those can be just as serious.</p>
<p>It’s different when PostgreSQL community announces a major version EOL. This happens because Community chooses to not to support it and move on to focus on newer versions.</p>
<p><figure><img decoding="async" width="1402" height="1122" src="https://percona.community/blog/2026/04/opensourcedoesntdie-thisisopensource_hu_65c6d17dd0fd1a8d.webp" alt="blog/2026/04/opensourcedoesntdie-thisisopensource.png" loading="lazy"></figure>
</p>
<p>Reading the message from David Steele, the long-time primary maintainer of pgBackRest you will not find “end of life” term. The project is marked read-only and no longer actively maintained, but that is not the same as being permanently dead.</p>
<p><figure><img decoding="async" width="1890" height="1762" src="https://percona.community/blog/2026/04/opensourcedoesntdie-maintenance_hu_3f66e23a0cf5d417.webp" alt="blog/2026/04/opensourcedoesntdie-maintenance.png" loading="lazy"></figure>
</p>
<p>pgBackRest is not “end of life.” There is no governing body declaring support ended. What happened is simpler and more common in open source: the maintainer can no longer afford to continue.</p>
<h2>So what happened then?</h2>
<p>This requires some story telling and I don’t think that I can do it better than <a href="https://mydbanotebook.org/about/" target="_blank" rel="noopener noreferrer">Lætitia Avrot</a> already did in her <a href="https://mydbanotebook.org/posts/pgbackrest-is-dead.-now-what/#what-happened" target="_blank" rel="noopener noreferrer">blogpost</a> (though I do not like the title):</p>
<blockquote>
<p>Crunchy Data, which had sponsored <code>pgBackRest</code> for most of its life and employed David, was sold. After that, David spent months looking for a position that would let him keep working on the project. He also tried to secure independent sponsorship. Neither worked out. He needs to make a living. The project requires sustained effort which he can no longer provide without being paid for it.</p>
</blockquote>
<p>This is the issue. An experienced developer, who wants to work on the project (that a big chunk of enterprises use) finds himself to be the “Nebraska guy” from <a href="https://xkcd.com/2347/" target="_blank" rel="noopener noreferrer">XKCD comic</a>.</p>
<p>When you look at the situation we’re in this is the classic “Nebraska guy problem”: critical infrastructure maintained by a single person. pgBackRest is widely used in production, yet its sustainability dependson one individual being able to justify working on it. That does not seem fair and David did right to point this out with his move.</p>
<p>Of course, if anyone in the community chose to, they can still maintain the project by forking it. But why, since the problem is elsewhere?</p>
<p>Most people understand that engineers need to be paid for their work. What not everyone realizes is that the free for all software that the open source license provides does not mean free as in beer. Someone still needs to fund it!</p>
<p>Unfortunately “someone” almost certainly is going to be “no-one” unless “anyone” realizes they are going to miss the software if nobody maintains it anymore.</p>
<p>While there’s a claim to be made that:</p>
<blockquote>
<p>Companies are as good as they have to and as bad as they are allowed to</p>
</blockquote>
<p>And often we see that an entity uses software they do not have to pay license fees for, treating this as cost optimization. There is also a large chunk of organizations that realize this is not a good long term strategy. Actively lowering the operational risk is important.</p>
<p>This is where foundations typically kick in: providing an easy way for organizations to contribute and ensure the longevity and healthiness of the projects. But PostgreSQL does not (yet) have one.</p>
<h2>Where are we now?</h2>
<p>There’s a lot of backchannel talks happening, join them and represent the open source point of view.</p>
<p>One example of such a channel is <a href="https://www.reddit.com/r/PostgreSQL/comments/1sx2ttg/pgbackrest_is_no_longer_being_maintained/" target="_blank" rel="noopener noreferrer">Reddit</a> though it requires quite a lot of karma (a Reddit thing) and not everyone will find it easy to successfully post there.</p>
<p>While there you can join Telegram, Slack or Discord discussions some of the channels there are private so we wanted to provide an open and visible place where you can let us know what is your stance and for this purpose <a href="https://forums.percona.com/t/pgbackrest-is-eol/40720" target="_blank" rel="noopener noreferrer">(Percona Community Forum thread is available)</a>.</p>
<p>A lot of blog posts have been written on this subject, check out <a href="https://planet.postgresql.org/" target="_blank" rel="noopener noreferrer">Planet PostgreSQL</a> to find some of them! I particularly enjoyed some of them, the <a href="https://proopensource.it/blog/postgresql-ecosystem-problems-2026" target="_blank" rel="noopener noreferrer">one</a> from <a href="https://proopensource.it/stefanie-janine-stoelting.html" target="_blank" rel="noopener noreferrer">Stefanie Janine Stölting</a>, I feel I am mostly aligned with. PostgreSQL needs an Ecosystem Umbrella Foundation</p>
<h2>The future of open source is on us</h2>
<p>Reading that a project is EOL is triggering to me. When long-time maintainer announced plans to step away after more than a decade of work, instead of focusing on what the problem is that caused him to do so and how to solve the issue.Naming it “dead” complicate things even further. Labeling the project as “dead” doesn’t solve the problem. Rather, it accelerates the wrong response. Users start looking for replacements instead of asking how to sustain the project.</p>
<p>This is not the way, young Padawan!</p>
<p><figure><img decoding="async" width="1402" height="1122" src="https://percona.community/blog/2026/04/opensourcedoesntdie-youngpadawan_hu_2d04686e1ca153e9.webp" alt="blog/2026/04/opensourcedoesntdie-youngpadawan.png" loading="lazy"></figure>
</p>
<p>We need a body that helps both users and authors by:</p>
<ol>
<li>Providing governance and a helping hand to the ecosystem. Yes, this is also funding</li>
<li>Providing guarantees of healthiness. This means users will have it easier to know the tools are in good shape.</li>
</ol>
<h2>So what’s with pgBackRest</h2>
<p>While we talk here in the public, a lot of decisions are being made and Percona among other companies is working towards resolving this situation.</p>
<p><figure><img decoding="async" width="1402" height="1122" src="https://percona.community/blog/2026/04/opensourcedoesntdie-allyouneed_hu_ba1a21dd7e603445.webp" alt="blog/2026/04/opensourcedoesntdie-allyouneed.png" loading="lazy"></figure>
</p>
<p>Have patience. Work is already underway behind the scenes, and the situation is evolving. There will be positive news resolving the situation coming soon, as Open Source doesn’t die!</p>
<p><a href="https://percona.community/blog/2026/04/30/open-source-doesnt-die-it-gets-unfunded/">Open source doesn’t die. It gets unfunded.</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>OIDC error scenarios</title>
        <link>https://percona.community/blog/2026/04/30/oidc-error-scenarios/</link>
        <pubDate>Thu, 30 Apr 2026 00:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/oidc-error-scenarios/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>Last time, in OIDC in PostgreSQL: With Keycloak, we created a working demo setup that was able to successfully authenticate a user using OIDC.</p>
<p><a href="https://percona.community/blog/2026/04/30/oidc-error-scenarios/">OIDC error scenarios</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Last time, in <a href="https://percona.community/blog/2026/01/19/oidc-in-postgresql-with-keycloak/">OIDC in PostgreSQL: With Keycloak</a>, we created a working demo setup that was able to successfully authenticate a user using OIDC.</p>
<p>In this blog post, we follow the same example, but instead of the success story, we explore how OAuth keeps our PostgreSQL servers secure.</p>
<p>We won’t focus on complex attack vectors, like the examples in the <a href="https://percona.community/blog/2025/11/17/oidc-in-postgresql-how-it-works-and-staying-secure/">second blog post</a> in the OIDC series.<br />
Instead of social engineering, we’ll look at practical errors, misconfigurations and honest mistakes &#8211; understanding error messages and how to fix them.</p>
<h3>Improved test setup</h3>
<p>Along with the step by step tutorial, previously we also linked a <a href="https://github.com/Percona-Lab/pg_oidc_validator/tree/main/examples/keycloak" target="_blank" rel="noopener noreferrer">docker/podman compose configuration</a>.<br />
This is still available, and we even improved it for testing the error scenarios.</p>
<p>If you want to update the configuration manually instead, this is what changed: we duplicated everything!</p>
<ul>
<li>Instead of a single testuser, we have two: <code>testuser</code> and <code>testuser2</code>, both using the same <code>asdfasdf</code> password</li>
<li>Instead of one client, we have two: <code>pgtest</code> and <code>pgtest2</code></li>
<li>Instead of one scope, we have two: <code>pgscope</code>, <code>pgscope2</code></li>
<li>Instead of one realm, we have two &#8211; containing exactly the same setup: <code>pgrealm</code> and <code>wrongrealm</code></li>
</ul>
<p>A role named <code>pgrole</code> is also defined.<br />
The <code>pgtest2</code> client and <code>pgscope2</code> scope both require the <code>pgrole</code> role.<br />
Only <code>testuser2</code> is assigned this role; <code>testuser</code> does not have it.</p>
<p>The following table summarizes the access matrix:</p>
<table>
<thead>
<tr>
<th></th>
<th>pgtest</th>
<th>pgtest2</th>
<th>pgscope</th>
<th>pgscope2</th>
</tr>
</thead>
<tbody>
<tr>
<td>testuser</td>
<td>OK</td>
<td>denied</td>
<td>OK</td>
<td>denied</td>
</tr>
<tr>
<td>testuser2</td>
<td>OK</td>
<td>OK</td>
<td>OK</td>
<td>OK</td>
</tr>
</tbody>
</table>
<h3>Success despite a FATAL error?</h3>
<p>However, before we start using all these additional items, let’s go back to the end of the Keycloak story, where we succeeded in logging in.<br />
Or did we?<br />
While <code>psql</code> logged us in, if we checked the server error log, we could see the following there:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">FATAL: OAuth bearer authentication failed for user "testuser"</span></span></code></pre>
</div>
</div>
</div>
<p>But if we are observant enough, this message is logged before we even go to the device authentication website of Keycloak, and enter the authentication code.<br />
This isn’t a real error, it’s just a side effect of how OAuth is implemented internally, and will most likely be fixed in PostgreSQL 19, the FATAL message will no longer show up.</p>
<p>As for PostgreSQL 18, unfortunately, we have to live with this.<br />
This also means that we can’t rely on simply looking for OAuth authentication errors in the server log, because all OAuth authentication failures will result in exactly the same message, no matter if they are logged because of this harmless situation or because of a real authentication issue.</p>
<p>A workaround is to rely on the validators instead: since the server is unaware of the exact error situation anyway – it delegates validation to the validator – these plugins will print out much more detailed <em>log messages</em>.<br />
We’ll see some examples later with pg_oidc_validator, as we explore the error scenarios.</p>
<p>However, keep in mind that the sentence above says <em>log messages</em>, and not <em>errors</em> or <em>fatal errors</em>.<br />
Validators are not allowed to print out ERROR and FATAL messages for authentication failures, so users have to look for WARNING or LOG level messages for the details.<br />
In practice, PostgreSQL will still print the same generic FATAL error message about OAuth bearer authentication failing – but it will appear after the validator-specific WARNING or LOG messages that contain the actual diagnostic information.</p>
<h3>Why does it happen?</h3>
<p>Earlier we already established that PostgreSQL validates that the client and the server use the same issuer, but didn’t go into more detail than this.</p>
<p>Usually when a service validates user input, it does so on the server.<br />
The main reason for this is that developers can trust the backend, controlled by administrators, while they can’t trust the frontend, potentially used by malicious users.</p>
<p>But are we validating user input in this case?<br />
Why does the user even have to specify the issuer, since the server already knows it, it’s in the HBA configuration?</p>
<p>Because this check isn’t the server validating the user, it’s the opposite:<br />
the user validating the server.</p>
<ol>
<li>The client sends an empty connection request to the server.</li>
<li>The server confirms that we are using OAuth, and sends back its issuer URL.</li>
<li>The client checks whether the issuer it is planning to use – or has already used, if it already has a valid token – matches the one sent by the server.
<ul>
<li>If it doesn’t match, it aborts the login attempt and prints an error.</li>
<li>If it does match, it continues with a real authentication attempt.</li>
</ul>
</li>
</ol>
<pre class="mermaid">
sequenceDiagram
participant C as psql (Client)
participant S as PostgreSQL Server
participant K as Keycloak
C-&gt;&gt;S: Connection request (no token)
S--&gt;&gt;S: No token, auth fails
Note right of S: FATAL logged here (harmless side effect)
S-&gt;&gt;C: OAuth challenge + issuer URL
C--&gt;&gt;C: Compare issuer URL with oauth_issuer
alt Issuer mismatch
C--&gt;&gt;C: Abort with error
else Issuer matches
C-&gt;&gt;K: Device authorization flow
K-&gt;&gt;C: Access token
C-&gt;&gt;S: Connection request (with token)
S-&gt;&gt;S: Validator checks token
S-&gt;&gt;C: Authentication success
end
</pre>
<p>The FATAL error in the server log is a side effect of the first empty authentication attempt, that wasn’t fixed in time before the PG18 release.</p>
<h3>Why do we need this check?</h3>
<p>With the improved configuration, we can test what happens when we specify the wrong issuer:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-2" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">bin/psql -h 127.0.0.1 'dbname=postgres oauth_issuer=https://keycloak:8443/realms/wrongrealm oauth_client_id=pgtest'
</span></span><span class="line"><span class="cl">psql: error: connection to server at "127.0.0.1", port 5432 failed: server's discovery document at https://keycloak:8443/realms/pgrealm/.well-known/openid-configuration (issuer "https://keycloak:8443/realms/pgrealm") is incompatible with oauth_issuer (https://keycloak:8443/realms/wrongrealm)</span></span></code></pre>
</div>
</div>
</div>
<p>Notice that compared to the correct command, which had the pgrealm, we are using the other Keycloak realm.<br />
And if we check the server log, we can see that there are no additional log messages there – we see a single OAuth FATAL error, which is not a real error, just the side effect we are investigating.<br />
This error is entirely on the client side.</p>
<p>And that brings us back to the question:<br />
why do we need this?</p>
<p>On one hand, it helps us prevent honest mistakes early.<br />
In our example, wrongrealm and pgrealm are exactly the same – they have users with the same name, scopes with the same names, clients with the same names.<br />
If there’s a misconfiguration, and the server and the client use different realms in a similar setup, everything would seem to work – the user trying to log in would be able to log in, get a token, psql would send it to the server…<br />
and then on the server the validator would reject it – assuming that it is a good validator, like pg_oidc_validator.<br />
No harm done – other than disclosing a token to the server that shouldn’t have been sent there –, but figuring out what the problem is could take a while.</p>
<p>On the other hand: what if we aren’t dealing with a malicious user, but a malicious server?</p>
<p>In the previous attack vectors we showcased, the attacker was always a third party:<br />
somebody who wanted to steal access to the database server.</p>
<p>But we don’t necessarily need a different unknown adversary, it could be the server we are using:<br />
do we absolutely know and trust its administrators?<br />
Sometimes yes, sometimes no.</p>
<p>Those administrators might be aware that we are also using OAuth for something else, and might plot to gain access to it.<br />
So instead of sending us the issuer we expect, the server sends us something else – for example a spoofed site, tricking us to complete login into a different service.</p>
<p>Remember the earlier situation where the Fake Photo Gallery Website used Client ID spoofing to gain access to the PostgreSQL Database?<br />
This situation is basically the same – the only difference is that this time PostgreSQL Database is trying to gain access to Photo Gallery.</p>
<pre class="mermaid">
sequenceDiagram
participant U as User (psql)
participant M as Malicious PostgreSQL Server
participant SSO as Other service
U-&gt;&gt;M: Connection request
M-&gt;&gt;U: OAuth challenge + spoofed issuer URL (instead of expected issuer)
Note over U: Without issuer check, user proceeds
U-&gt;&gt;SSO: Authenticates, thinking it is for PostgreSQL
SSO-&gt;&gt;U: Access token (valid for a different service)
U-&gt;&gt;M: Sends token to server
Note over M: Malicious server now holds a token valid for the other service
</pre>
<p>The client-side issuer check prevents this: psql compares the issuer URL from the server against the <code>oauth_issuer</code> it was configured with, and aborts if they don’t match.</p>
<p>While requiring the client to specify the issuer may seem redundant, it’s an important safeguard that prevents tokens from being disclosed to malicious servers.</p>
<h3>Can we verify the validator?</h3>
<p>If we specify an incorrect issuer, the client rejects it before completing the OAuth flow – that’s great, but this means the validator isn’t part of the picture.<br />
Can we even test that a validator handles this situation correctly, to verify that it properly rejects an attempt with an incorrect issuer?<br />
Security-aware users might want to double check that somebody using a modified psql is also properly rejected.</p>
<p>This is possible: in our next blog post, we’ll see how to implement custom clients outside psql, possibly using other OAuth flows.<br />
In that scenario, we’ll be able to send custom tokens to the server, which has many uses – one of which is internal testing of OAuth validators.</p>
<p>Rest assured, pg_oidc_validator handles this correctly – and we’ll show you how to verify it yourself in the next post.<br />
If you are using a different validator, stay tuned to see how you can verify it!</p>
<p>With pg_oidc_validator, you will see something like this in the server log:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-4" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">WARNING: OAuth validation failed with exception: claim value does not match expected value
</span></span><span class="line"><span class="cl">FATAL: OAuth bearer authentication failed for user "testuser"
</span></span><span class="line"><span class="cl">DETAIL: Connection matched file "/pg_hba.conf" line 119: "host all all 127.0.0.1/32 oauth issuer=https://keycloak:8443/realms/pgrealm,scope="pgscope email",map=kcmap"</span></span></code></pre>
</div>
</div>
</div>
<p>Here “claim value does not match expected value” means that a field (claim) in the JWT doesn’t match our expectation.<br />
While this might seem generic, currently pg_oidc_validator only validates exactly one field in this way: the issuer.</p>
<p>On the client side, you can see the following generic error message:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-5" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Connection error: connection to server at "127.0.0.1", port 5432 failed: retrying connection with new bearer token
</span></span><span class="line"><span class="cl">connection to server at "127.0.0.1", port 5432 failed: FATAL: OAuth bearer authentication failed for user "testuser"</span></span></code></pre>
</div>
</div>
</div>
<p>Which is generally true for most OAuth errors – validators are expected not to provide detailed information about why they reject a connection back to the client, to limit the information available to potential attackers.</p>
<h3>Signature failure</h3>
<p>For some it might be surprising that we are getting an error about the issuer, and not about the token.<br />
Why is that?</p>
<p>The reason we use JWTs for access tokens is because they are cryptographically signed tokens.<br />
While they contain the payload in clear text, the token ends with a signature, a proof that it was generated by the issuer we trust.</p>
<p>This means that if the token was generated by a different issuer, it is signed by a different key.</p>
<p>However, the order of operations inside the validator is different:<br />
first we validate the fields in the cleartext data we have strong expectations about – in this case the issuer.<br />
Then, after that’s valid, we also verify that the signature matches the public key of the issuer.</p>
<p>Since in the above situation the issuer is different, we never get to the point of signature validation.</p>
<p>To do that, somebody has to tamper with the token.<br />
For example, an attacker realizes that we require a specific scope, and since JWTs contain everything in clear text, decides to edit the <code>scp</code> claim and insert <code>pgscope</code> into it.<br />
In that situation, the issuer matches, the validator verifies the signature, and we end up with a different error:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-6" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">WARNING: OAuth validation failed with exception: failed to verify signature: VerifyFinal failed
</span></span><span class="line"><span class="cl">FATAL: OAuth bearer authentication failed for user "testuser"
</span></span><span class="line"><span class="cl">DETAIL: Connection matched file "/pg_hba.conf" line 119: "host all all 127.0.0.1/32 oauth issuer=https://keycloak:8443/realms/pgrealm,scope="pgscope email",map=kcmap"</span></span></code></pre>
</div>
</div>
</div>
<p>The client side error message didn’t change with this – this is clearly an attack attempt, we do not have to provide nice error messages for malicious users.</p>
<h3>What about expired tokens?</h3>
<p>Another interesting scenario you might wonder about is token lifetime:<br />
in OAuth, tokens have a limited period in which they are valid.</p>
<p>PostgreSQL currently has no facilities to enforce token lifetime when a connection is active – once somebody is logged in, they stay logged in until they disconnect for some reason –, but validators are expected to validate that tokens are still valid at least during authentication.</p>
<p>Similarly to the previous situation, testing this without a custom client isn’t possible, as psql always asks for a new token during the connection attempt, there is no way to send an earlier token with it.</p>
<p>As in the previous example, this scenario is rejected by pg_oidc_validator, which logs the following message on the server:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-7" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">WARNING: OAuth validation failed with exception: token expired
</span></span><span class="line"><span class="cl">FATAL: OAuth bearer authentication failed for user "testuser"
</span></span><span class="line"><span class="cl">DETAIL: Connection matched file "/pg_hba.conf" line 119: "host all all 127.0.0.1/32 oauth issuer=https://keycloak:8443/realms/pgrealm,scope="pgscope email",map=kcmap"</span></span></code></pre>
</div>
</div>
</div>
<p>On the client side, you can only see the same generic error message as before.</p>
<p>While this doesn’t seem too user friendly, keep in mind that both of these errors can only happen with faulty clients.<br />
Clients can, and should verify both the issuer and the expiration time before connecting to the server, and they should be able to provide nice error messages to the users based on that.</p>
<h3>Scope mismatch</h3>
<p>After the previous two situations, which are untestable with <code>psql</code>, let’s move to the realm of errors which don’t require custom code.</p>
<p>In the first and second blog posts we tried to emphasize how important scopes are in OAuth, how they can help prevent accidents.<br />
Obviously, validators have to make sure that all the scopes the server asked for are present in the received token.<br />
Having more scopes isn’t an issue – sometimes clients use the same token for multiple services –, but missing a required scope should be an error.</p>
<p>To verify what happens in this situation, we can simply modify the pg_hba line to include a scope that doesn’t exist on the server, for example adding <code>fooscope</code>:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-8" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">host all all 127.0.0.1/32 oauth issuer=https://keycloak:8443/realms/pgrealm,scope="pgscope email fooscope",map=kcmap</span></span></code></pre>
</div>
</div>
</div>
<p>And then we can connect with psql as before:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-9" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">bin/psql -h 127.0.0.1 'dbname=postgres oauth_issuer=https://keycloak:8443/realms/pgrealm oauth_client_id=pgtest'</span></span></code></pre>
</div>
</div>
</div>
<p>Which should result in the following detailed error message in the server log:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-10" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">LOG: Authorization failed because of scope mismatch. Required scopes: email, fooscope, pgscope. Received scopes: email, pgscope, profile
</span></span><span class="line"><span class="cl">LOG: OAuth bearer authentication failed for user "testuser"
</span></span><span class="line"><span class="cl">DETAIL: Validator failed to authorize the provided token.
</span></span><span class="line"><span class="cl">FATAL: OAuth bearer authentication failed for user "testuser"
</span></span><span class="line"><span class="cl">DETAIL: Connection matched file "/pg_hba.conf" line 119: "host all all 127.0.0.1/32 oauth issuer=https://keycloak:8443/realms/pgrealm,scope="pgscope email fooscope",map=kcmap"</span></span></code></pre>
</div>
</div>
</div>
<p>Similarly to the previous scenarios, this is completely validator specific, we can only showcase our validator.</p>
<p>This scenario also depends on the OAuth flow used and the identity provider.<br />
<strong>Note:</strong> Keycloak, for example, permits unknown scopes for the device flow – it simply ignores them and returns the scopes it can.<br />
However, it doesn’t do that for other flows – the Token Endpoint rejects unknown scopes with an error and doesn’t provide an access token.</p>
<p>On the client side, the error is the same as before – no details about what’s missing.<br />
Which is fine in this situation, as this is clearly a configuration error, something the administrators have to figure out and fix.</p>
<p>Now let’s see the error slightly differently.</p>
<p>The above example worked with the unmodified keycloak setup, described in the previous blog, but we have an improved test setup for this one.<br />
Instead of using a non existent foo scope, let’s change our requirement to <code>pgscope2</code>, which requires <code>pgrole</code>:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-11" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">host all all 127.0.0.1/32 oauth issuer=https://keycloak:8443/realms/pgrealm,scope="pgscope2 email",map=kcmap</span></span></code></pre>
</div>
</div>
</div>
<p>And similarly add <code>testuser2</code> to pg_ident, so both can log in:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-12" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl"># MAPNAME SYSTEM-USERNAME DATABASE-USERNAME
</span></span><span class="line"><span class="cl">kcmap testuser@example.com testuser
</span></span><span class="line"><span class="cl">kcmap testuser2@example.com testuser2</span></span></code></pre>
</div>
</div>
</div>
<p>In this new setup, we transformed the configuration problem into a permission issue where testuser2 can log in and testuser can not.</p>
<p>The error message on the client side is unchanged, it still doesn’t say “permission denied” or “scope mismatch”, or anything like that.<br />
This is debatable, but it is still mainly a task for administrators, and not the user:<br />
somebody will have to investigate the permission setup on keycloak, and fix it, if testuser also needs access to the server.</p>
<h3>Unknown user</h3>
<p>Another common error source is a problem with the user mapping.<br />
In our example we are using a pg_ident file with an email, but it would be similar with other configurations.</p>
<p>Regardless of the setup, there are many reasons why we can’t properly look up a username:</p>
<ul>
<li>using an incorrect field for <code>authn_field</code></li>
<li>missing an entry from <code>pg_ident</code></li>
<li>having a typo in the name either in <code>pg_ident</code> or in keycloak</li>
<li>and so on</li>
</ul>
<p>In all situations, the error message for this case won’t be generated in the validator, but in the PostgreSQL user mapping code instead.<br />
For example, if you previously added <code>testuser2</code> to the ident file, comment it out and try to log in with it again:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-13" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">LOG: no match in usermap "kcmap" for user "testuser" authenticated as "testuser2@example.com"
</span></span><span class="line"><span class="cl">FATAL: OAuth bearer authentication failed for user "testuser"
</span></span><span class="line"><span class="cl">DETAIL: Connection matched file "/pg_hba.conf" line 119: "host all all 127.0.0.1/32 oauth issuer=https://keycloak:8443/realms/pgrealm,scope="pgscope email",map=kcmap"</span></span></code></pre>
</div>
</div>
</div>
<p>In an alternative configuration – which is not part of the sample keycloak configuration – it is possible to create a custom claim “postgres_username” on keycloak, and skip the map file completely.<br />
In this situation, a mismatched username would result in a slightly different error message:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-14" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">LOG: provided user name (testuser) and authenticated user name (testuser2) do not match
</span></span><span class="line"><span class="cl">FATAL: OAuth bearer authentication failed for user "testuser"
</span></span><span class="line"><span class="cl">DETAIL: Connection matched file "/pg_hba.conf" line 119: "host all all 127.0.0.1/32 oauth issuer=https://keycloak:8443/realms/pgrealm,scope="pgscope email""</span></span></code></pre>
</div>
</div>
</div>
<h3>Connection problems</h3>
<p>While it usually isn’t a configuration or permission problem, it is possible that we have a network issue:<br />
either a localized routing error, where the client can connect to the identity provider but the server can’t, or a situation where the identity provider / network crashed between obtaining the access token and verifying it on the server.</p>
<p>The client executable has an access token and sends it to the server, which then has to validate it without being able to communicate with the identity provider.<br />
This is another situation which is difficult to validate with <code>psql</code>, but it is relatively easy with a custom client.</p>
<p>Our OIDC validator has to connect to the identity provider for two reasons:</p>
<ul>
<li>One, to retrieve the discovery document which contains the URL of the JWKS endpoint – which stores the public keys of the issuer</li>
<li>Two, to retrieve the public keys using that JWKS endpoint</li>
</ul>
<p>The validator also follows HTTP Cache headers:<br />
for example, if the server allows caching the keys for 4 days, the validator only retrieves them for the first attempt, and then keeps using them for that time.<br />
After it passes, it connects to the server one more time, and if it again receives a 4 day window, it will keep using the keys for 4 more days.<br />
This means that with a proper provider setup, the validator might not even notice a short service loss.</p>
<p>Fortunately for our testing, but not so fortunately for production use, keycloak doesn’t support JWKS caching at all.</p>
<p>An inaccessible OIDC server will result in logs similar to:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-15" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">WARNING: OAuth validation failed with exception: HTTP request failed: Could not connect to server
</span></span><span class="line"><span class="cl">FATAL: OAuth bearer authentication failed for user "testuser"
</span></span><span class="line"><span class="cl">DETAIL: Connection matched file "/pg_hba.conf" line 119: "host all all 127.0.0.1/32 oauth issuer=https://keycloak:8443/realms/pgrealm,scope="pgscope email",map=kcmap"</span></span></code></pre>
</div>
</div>
</div>
<p>Where the exact error message depends on the situation – a timeout, internal server error, etc, all would result in slightly different error messages, while a timeout would also slow down the response time of the authentication attempt.</p>
<h3>Let’s run without errors!</h3>
<p>We hope these examples will be useful for everybody. To avoid errors, to diagnose problems, and to simply understand the security model and guarantees given by OAuth and validators.</p>
<p>While this is not an all-inclusive list, as we can’t possibly cover every error scenario in a setup involving several components, it covers the most common scenarios, and should address all possible security problems.</p>
<p>In our next blog post, we’ll focus on a practical, minimal development example:<br />
while currently only the provided command line tools support OAuth, <code>libpq</code> already has the infrastructure in it to implement custom OAuth logic, allowing users to integrate it into their applications &#8211; we’ll provide examples how it is doable.</p>
<p><a href="https://percona.community/blog/2026/04/30/oidc-error-scenarios/">OIDC error scenarios</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>pgBackRest is archived, what now?</title>
        <link>https://percona.community/blog/2026/04/28/pgbackrest-is-archived-what-now/</link>
        <pubDate>Tue, 28 Apr 2026 11:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/pgbackrest-is-archived-what-now/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>pgBackRest is an open source backup and restore tool for PostgreSQL. It’s fair to say it’s one of the most popular options, widely used across the PostgreSQL ecosystem.</p>
<p><a href="https://percona.community/blog/2026/04/28/pgbackrest-is-archived-what-now/">pgBackRest is archived, what now?</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p><a href="https://github.com/pgbackrest/pgbackrest" target="_blank" rel="noopener noreferrer">pgBackRest</a> is an open source backup and restore tool for PostgreSQL. It’s fair to say it’s one of the most popular options, widely used across the PostgreSQL ecosystem.</p>
<p>On 27 April 2026, pgBackRest maintainer David Steele announced on <a href="https://www.linkedin.com/posts/davidsteele_after-a-lot-of-thought-i-have-decided-to-share-7454442611911655424-mVMS?utm_source=share&amp;utm_medium=member_desktop&amp;rcm=ACoAAAD3qpgBKSXefFXDYJlyIbIdar9mZh-NYBw" target="_blank" rel="noopener noreferrer">LinkedIn</a> and in the <a href="https://github.com/pgbackrest/pgbackrest" target="_blank" rel="noopener noreferrer">GitHub repository</a> that the project is becoming <del>unmaintained</del> archived, starting with:</p>
<blockquote>
<p>TL;DR: pgBackRest is no longer being maintained. If you fork pgBackRest, please select a new name for your project.</p>
</blockquote>
<div>
<p><figure><img decoding="async" width="1086" height="1216" src="https://percona.community/blog/2026/04/Jan-david-li_hu_95835d8f53db9d64.webp" alt=" " loading="lazy"></figure>
</p>
</div>
<p>If you’re reading this, you’re likely either affected or at least concerned. In this short write up I will do my best to calm your nerves, present short term as well as more long term ideas and options.</p>
<h2>Where are we now &#8211; the status quo</h2>
<p>pgBackRest is a critical part of the PostgreSQL ecosystem, and nobody seriously expects it to simply disappear. What happens next is now up to the community.<br />
One possible outcome is the emergence of multiple forks of pgBackRest. That raises the risk of fragmentation or, put bluntly, <del>Clone</del> Fork Wars.</p>
<div>
<p><figure><img decoding="async" width="1536" height="1024" src="https://percona.community/blog/2026/04/Jan-forks_hu_4282ae308d071fad.webp" alt=" " loading="lazy"></figure>
</p>
</div>
<p>That said, there has already been a significant amount of discussion across the community, and one thing is clear:</p>
<p>The PostgreSQL community acknowledges the problem and wants change.</p>
<p>The challenge now is twofold:</p>
<ul>
<li>What can we do immediately to stabilize the situation?</li>
<li>What direction should we take long term, without overcomplicating the short-term response?</li>
</ul>
<h2>What is Percona planning</h2>
<p><a href="https://docs.percona.com/postgresql/14/solutions/backup-recovery.html#pgbackrest" target="_blank" rel="noopener noreferrer">Percona includes pgBackRest</a> in the <a href="https://docs.percona.com/postgresql/14/index.html" target="_blank" rel="noopener noreferrer">Percona Distribution for PostgreSQL</a> as the recommended backup and restore solution. From our perspective, it remains the most mature, enterprise-ready and reliable option available. While alternatives like WAL-G or Barman are well regarded, our recommendation remains unchanged.</p>
<p>To emphasize the message:</p>
<blockquote>
<p>the current situation does <u>not</u> impact our recommendation.</p>
</blockquote>
<p>Percona will continue supporting pgBackRest. What that support looks like in terms of maintainership and collaboration with other organizations is still being actively discussed and will take time to solidify.</p>
<p>The immediate priority is to avoid fragmentation. We want to ensure we don’t end up with multiple independent forks maintained in isolation.</p>
<p>If you are a Percona customer, you remain fully supported. Please continue reporting issues through standard support channels. For our community users, we encourage you to use the <a href="https://forums.percona.com/" target="_blank" rel="noopener noreferrer">Percona Community Forums</a>, we will do our best to help there.</p>
<h2>The power of open source community</h2>
<p>In an era where we often hear about companies reducing teams due to AI-driven cost optimization, it’s easy to forget that software is still built and maintained by people. This is especially true in open source.</p>
<p>Two observations are worth calling out:</p>
<ol>
<li>People need sustainable funding, work cannot be assumed to be purely voluntary.</li>
<li>A healthy open source project should not depend on a single company or individual.</li>
</ol>
<p>The current situation is, to some extent, a result of the opposite model. pgBackRest development was largely driven by a single company and later single maintainer, <a href="https://github.com/dwsteele" target="_blank" rel="noopener noreferrer">David Steele</a>, with sponsorship from Crunchy Data. While others have contributed (e.g.i <a href="https://github.com/sfrost" target="_blank" rel="noopener noreferrer">Stephen Frost</a> and Stefan Fercot &#8211; <a href="https://github.com/pgstef" target="_blank" rel="noopener noreferrer">pgstef</a>), and there was a wider team maintaining the project in the past, recently the project effectively relied on one primary maintainer.</p>
<p>I think it’s fair to say we’ve seen a fair share <a href="https://xkcd.com/2347/" target="_blank" rel="noopener noreferrer">xkcd #2347</a> posted all over the internet over the course of last 24h. So here’s one more:</p>
<div>
<p><figure><img decoding="async" width="2236" height="2814" src="https://percona.community/blog/2026/04/Jan-comic-neb_hu_5371ac63ef109e55.webp" alt=" " loading="lazy"></figure>
</p>
</div>
<p>To avoid repeating this pattern, we (along with other vendors) are deliberately taking time before jumping into forks or immediate solutions. The goal is to find a sustainable, collaborative model rather than rushing into fragmentation.</p>
<p>For comparison, it took the Linux Foundation 6 days to respond to the <a href="https://github.com/redis/redis/pull/13157" target="_blank" rel="noopener noreferrer">Redis license change</a> by <a href="https://www.linuxfoundation.org/press/linux-foundation-launches-open-source-valkey-community" target="_blank" rel="noopener noreferrer">launching Valkey</a>. While this situation is different as there’s no license change in pgBackRest, it illustrates that meaningful coordination takes time.</p>
<p>This is exactly where the open source community can demonstrate its strength.</p>
<h2>What are the long term options?</h2>
<p>This situation is particularly surprising to me personally, as I recently referenced David’s proposed transparent funding model in <a href="https://www.postgresql.eu/events/pgconfde2026/" target="_blank" rel="noopener noreferrer">my talk</a> at <a href="http://pgconf.de/" target="_blank" rel="noopener noreferrer">PGConf.DE</a> just last week.</p>
<div>
<p><figure><img decoding="async" width="688" height="2228" src="https://percona.community/blog/2026/04/Jan-david-money_hu_2bf084722e534aaf.webp" alt=" " loading="lazy"></figure>
</p>
</div>
<p>The idea, distributing funding across organizations that rely on the project, seemed like a promising path toward a more sustainable ecosystem. In hindsight, it appears that adoption of this model was either too slow or insufficient to support ongoing maintenance.</p>
<p>Looking ahead, several long-term options are being discussed within the community:</p>
<ul>
<li>Establishing a foundation-backed project (similar to models used by <a href="https://codeberg.org/" target="_blank" rel="noopener noreferrer">Codeberg</a> or the Linux Foundation)</li>
<li>Creating a coordinated, multi-vendor stewardship model</li>
<li>In more extreme scenarios, moving critical tooling closer to the PostgreSQL core ecosystem</li>
</ul>
<p>These discussions are ongoing. If you’re attending <a href="https://2026.pgconf.dev/" target="_blank" rel="noopener noreferrer">PGConf.Dev</a>, this will almost certainly be a major topic, especially in the extensions ecosystem track of community sessions in the <a href="https://2026.pgconf.dev/schedule/tuesday" target="_blank" rel="noopener noreferrer">Canfor</a> room on Tuesday.</p>
<h2>So what should I do now?</h2>
<div>
<p><figure><img decoding="async" width="1402" height="1122" src="https://percona.community/blog/2026/04/Jan-what-now_hu_b262983f692a82be.webp" alt=" " loading="lazy"></figure>
</p>
</div>
<p>In short, nothing but wait. Yes, this means:</p>
<blockquote>
<p>Keep on using pgBackRest as you did!</p>
</blockquote>
<p>If your company is relying on pgBackRest, now is the time to engage. If you have capacity for this, please join the discussion (we’ve kicked off a thread on <a href="https://forums.percona.com/t/pgbackrest-archival-discussion/40725?u=jan_wieremjewicz" target="_blank" rel="noopener noreferrer">Percona Community Forums</a> if you are looking for a place to join this topic)</p>
<p>Rest assured that you can follow the updates from us, we will be messaging about the progress made in regards to establishing the future for pgBackRest.</p>
<p>One thing to clear is: are there any immediate risks?</p>
<blockquote>
<p>Not new ones. There is the uncertainty that this is not a comfortable feeling. Rest assured that the longevity of the solution is not in jeopardy as we do have an obligation to our customer and user base to make sure the project is continued.</p>
</blockquote>
<p><a href="https://percona.community/blog/2026/04/28/pgbackrest-is-archived-what-now/">pgBackRest is archived, what now?</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Incremental backups in Percona Kubernetes Operator for MySQL</title>
        <link>https://percona.community/blog/2026/04/17/incremental-backups-in-percona-kubernetes-operator-for-mysql/</link>
        <pubDate>Fri, 17 Apr 2026 10:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/incremental-backups-in-percona-kubernetes-operator-for-mysql/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>Starting with version 1.1.0, the Percona Kubernetes Operator for MySQL now supports incremental backups. This feature lets you backup only the changed data since the last backup, instead of copying your entire dataset each time. The result is dramatically smaller backup sizes, faster backup windows, and lower cloud storage costs.</p>
<p><a href="https://percona.community/blog/2026/04/17/incremental-backups-in-percona-kubernetes-operator-for-mysql/">Incremental backups in Percona Kubernetes Operator for MySQL</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Starting with version 1.1.0, the Percona Kubernetes Operator for MySQL now supports <strong>incremental backups</strong>. This feature lets you backup only the changed data since the last backup, instead of copying your entire dataset each time. The result is dramatically smaller backup sizes, faster backup windows, and lower cloud storage costs.</p>
<p>In this post, we’ll walk through how the feature works under the hood, how to configure it, and what to keep in mind when designing your backup strategy.</p>
<h2>How Incremental Backups Work in Percona XtraBackup</h2>
<p>The foundation of this feature is <a href="https://docs.percona.com/percona-xtrabackup/latest/" target="_blank" rel="noopener noreferrer">Percona XtraBackup (PXB)</a>, an open source backup tool for MySQL. PXB has supported incremental backups for a while, and the operator now brings that capability into the backup workflow.</p>
<p>Every InnoDB data page carries a <strong>Log Sequence Number (LSN)</strong>, which is a monotonically increasing counter that records when the page was last modified. When PXB takes an incremental backup, it scans data pages and copies only those with an LSN newer than a reference point. The output is a set of compact <code>.delta</code> files instead of full tablespace copies.</p>
<p>Each backup produces an <code>xtrabackup_checkpoints</code> file:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">backup_type = full-backuped
</span></span><span class="line"><span class="cl">from_lsn = 0
</span></span><span class="line"><span class="cl">to_lsn = 7345291
</span></span><span class="line"><span class="cl">last_lsn = 7345291</span></span></code></pre>
</div>
</div>
</div>
<p>Each incremental’s <code>from_lsn</code> must equal the previous backup’s <code>to_lsn</code>.</p>
<h2>Using Incremental Backups with the Operator</h2>
<h3>On-Demand Incremental Backup</h3>
<p>First, you need a full backup to serve as the base:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">yaml</span><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">apiVersion</span><span class="p">:</span><span class="w"> </span><span class="l">ps.percona.com/v1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">kind</span><span class="p">:</span><span class="w"> </span><span class="l">PerconaServerMySQLBackup</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">metadata</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">weekly-full</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">spec</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">clusterName</span><span class="p">:</span><span class="w"> </span><span class="l">my-cluster</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">storageName</span><span class="p">:</span><span class="w"> </span><span class="l">s3-us</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l">full</span></span></span></code></pre>
</div>
</div>
</div>
<p>Once the full backup succeeds, create an incremental:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">yaml</span><button class="code-block__copy" type="button" data-copy-target="codeblock-2" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">apiVersion</span><span class="p">:</span><span class="w"> </span><span class="l">ps.percona.com/v1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">kind</span><span class="p">:</span><span class="w"> </span><span class="l">PerconaServerMySQLBackup</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">metadata</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">daily-inc-1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">spec</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">clusterName</span><span class="p">:</span><span class="w"> </span><span class="l">my-cluster</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">storageName</span><span class="p">:</span><span class="w"> </span><span class="l">s3-us</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l">incremental</span></span></span></code></pre>
</div>
</div>
</div>
<p>The operator automatically discovers the latest succeeded full backup for the same cluster and storage, fetches its LSN, and creates an incremental backup. If you want to pin a specific base, simply use the <code>incrementalBaseBackupName</code> field:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">yaml</span><button class="code-block__copy" type="button" data-copy-target="codeblock-3" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">spec</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l">incremental</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">incrementalBaseBackupName</span><span class="p">:</span><span class="w"> </span><span class="l">weekly-full</span></span></span></code></pre>
</div>
</div>
</div>
<h3>Scheduled Backups: Full + Incremental</h3>
<p>The real power comes from combining full and incremental schedules. Here’s an example: weekly full backups with daily incrementals:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">yaml</span><button class="code-block__copy" type="button" data-copy-target="codeblock-4" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">spec</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">backup</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">schedule</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">weekly-full</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">schedule</span><span class="p">:</span><span class="w"> </span><span class="s2">"0 0 * * 0"</span><span class="w"> </span><span class="c"># Sunday midnight</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">keep</span><span class="p">:</span><span class="w"> </span><span class="m">4</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">storageName</span><span class="p">:</span><span class="w"> </span><span class="l">s3-us</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l">full</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">daily-incremental</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">schedule</span><span class="p">:</span><span class="w"> </span><span class="s2">"0 0 * * 1-6"</span><span class="w"> </span><span class="c"># Monday through Saturday</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">storageName</span><span class="p">:</span><span class="w"> </span><span class="l">s3-us</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l">incremental</span></span></span></code></pre>
</div>
</div>
</div>
<p>The <code>keep</code> rotation policy is chain-aware: it counts only full backups and automatically cascade-deletes all dependent incrementals when a full backup is rotated out.</p>
<h3>Restoring from an Incremental Backup</h3>
<p>The <code>PerconaServerMySQLRestore</code> custom resource allows you to restore from any point in an incremental, similar to restoring a full backup:</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">yaml</span><button class="code-block__copy" type="button" data-copy-target="codeblock-5" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">apiVersion</span><span class="p">:</span><span class="w"> </span><span class="l">ps.percona.com/v1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">kind</span><span class="p">:</span><span class="w"> </span><span class="l">PerconaServerMySQLRestore</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">metadata</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">restore-to-wednesday</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">spec</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">clusterName</span><span class="p">:</span><span class="w"> </span><span class="l">my-cluster</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">backupName</span><span class="p">:</span><span class="w"> </span><span class="l">daily-inc-3</span></span></span></code></pre>
</div>
</div>
</div>
<p>The operator handles the complexity behind the scenes:</p>
<ol>
<li>Discovers the full chain by listing the cloud storage directory</li>
<li>Downloads and prepares the base full backup</li>
<li>Applies each incremental in sequence</li>
<li>Applies the final incremental and rolls back uncommitted transactions</li>
<li>Moves the prepared data back to the MySQL data directory</li>
</ol>
<p>You don’t need to know which backup is the base or how many incrementals are in the chain, the operator figures it out.</p>
<h2>How It Works Under the Hood</h2>
<h3>Storage Layout</h3>
<p>The operator uses a specific directory convention to encode backup chains without any requiring any additional metadata:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-6" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">s3://bucket/prefix/
</span></span><span class="line"><span class="cl"> my-cluster-2026-04-06-full/ # base full backup
</span></span><span class="line"><span class="cl"> my-cluster-2026-04-06-full.incr/ # incremental chain directory
</span></span><span class="line"><span class="cl"> my-cluster-2026-04-07T000000-incr/ # Monday's incremental
</span></span><span class="line"><span class="cl"> my-cluster-2026-04-08T000000-incr/ # Tuesday's incremental
</span></span><span class="line"><span class="cl"> my-cluster-2026-04-09T000000-incr/ # Wednesday's incremental</span></span></code></pre>
</div>
</div>
</div>
<p>The <code>.incr/</code> suffix creates a self-describing structure. Any cluster with access to the storage bucket can reconstruct the chain, making cross-cluster restores straightforward.</p>
<h3>The Backup Flow</h3>
<p>Here’s what happens when you create an incremental backup:</p>
<ol>
<li><strong>Resolve the base.</strong> The controller finds the latest succeeded full backup (or the one you specified) and annotates the incremental CR with <code>percona.com/base-backup-name</code>.</li>
<li><strong>Fetch the LSN.</strong> The controller calls the xtrabackup sidecar’s <code>/backup/checkpoint-info</code> endpoint. The sidecar downloads <code>xtrabackup_checkpoints</code> from the previous backup via <code>xbcloud get</code>, parses it, and returns the <code>to_lsn</code>.</li>
<li><strong>Launch the backup job.</strong> A Kubernetes Job is created with the <code>INCREMENTAL_LSN</code> environment variable set.</li>
<li><strong>Stream to storage.</strong> The sidecar runs <code>xtrabackup --backup --stream=xbstream --incremental-lsn=</code> and pipes the output through <code>xbcloud put</code> to the cloud destination.</li>
</ol>
<h3>Chain Integrity Protection</h3>
<p>The operator enforces chain integrity at multiple levels:</p>
<ul>
<li><strong>Deletion guards:</strong> Only the latest incremental in a chain can be deleted. Attempting to delete a mid-chain backup is blocked using finalizers.</li>
<li><strong>Cascade deletion:</strong> Deleting a full backup automatically removes all dependent incrementals, from newest to oldest.</li>
<li><strong>Concurrent backup prevention:</strong> The controller uses a Lease-based mechanism to prevent multiple incremental backups from running at the same time.</li>
</ul>
<h2>Designing Your Backup Strategy</h2>
<h3>When to Use Incremental Backups</h3>
<p>Incremental backups shine when:</p>
<ul>
<li><strong>Your database is large but change rate is low.</strong> A 1 TB database with 2% daily change produces ~20 GB incremental backups instead of 1 TB full backups.</li>
<li><strong>You need frequent backup points.</strong> Run hourly incrementals with minimal overhead.</li>
<li><strong>Cloud storage costs matter.</strong> Example: with about <strong>2%</strong> of the data changing each day, <strong>one full backup</strong> plus <strong>six daily incrementals</strong> needs roughly <strong>one-fifth</strong> the space of keeping <strong>six separate full backups</strong> over the same week.</li>
</ul>
<h3>What to Keep in Mind</h3>
<ul>
<li><strong>All chain members must use the same storage backend.</strong> You can’t mix S3 and GCS within a chain.</li>
<li><strong>Chain integrity is critical.</strong> If a backup in the chain is corrupted, all subsequent incrementals in that chain become unrestorable. Regular full backups provide recovery checkpoints.</li>
<li><strong>Restore time increases with chain length.</strong> Each incremental adds a prepare step. For very long chains, consider more frequent full backups.</li>
</ul>
<h2>Try It Out</h2>
<p>Incremental backups are available in Percona Operator for MySQL version 1.1.0 and later. If you’re already running the operator, upgrade your CRDs and add a <code>type: incremental</code> schedule to your backup configuration.</p>
<p><!-- TODO --></p>
<ul>
<li><a href="https://percona.community/blog/2026/04/17/incremental-backups-in-percona-kubernetes-operator-for-mysql/">Operator documentation: Backups</a></li>
<li><a href="https://docs.percona.com/percona-xtrabackup/latest/create-incremental-backup.html" target="_blank" rel="noopener noreferrer">Percona XtraBackup: Incremental backups</a></li>
<li><a href="https://github.com/percona/percona-server-mysql-operator" target="_blank" rel="noopener noreferrer">GitHub: percona/percona-server-mysql-operator</a></li>
</ul>
<p>Have questions or feedback? Join the conversation on the <a href="https://forums.percona.com/" target="_blank" rel="noopener noreferrer">Percona Community Forum</a> or open an issue on GitHub. We’d love to hear how incremental backups are working for your MySQL-on-Kubernetes deployments.</p>
<p><a href="https://percona.community/blog/2026/04/17/incremental-backups-in-percona-kubernetes-operator-for-mysql/">Incremental backups in Percona Kubernetes Operator for MySQL</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>ClickHouse Monitoring and Observability Decision Points</title>
        <link>https://severalnines.com/blog/clickhouse-monitoring-and-observability-decision-points/</link>
        <pubDate>Fri, 17 Apr 2026 07:00:00 +0000</pubDate>
        <dc:creator>Paul Namuag</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/clickhouse-monitoring-and-observability-decision-points-2/</guid>
        <source url="https://severalnines.com/">Severalnines</source>
        <description><![CDATA[<p>Given ClickHouse’s ability to execute complex analytical queries across terabytes of data in a single operation, proper monitoring and observability is critical. Its distributed architecture and scalability add layers of complexity, as multi-node clusters require careful coordination monitoring across shards and replicas to ensure data consistency and availability. Adding to the operational pressure is users’ […]<br />
The post ClickHouse Monitoring and Observability Decision Points appeared first on Severalnines.</p>
<p><a href="https://severalnines.com/blog/clickhouse-monitoring-and-observability-decision-points/">ClickHouse Monitoring and Observability Decision Points</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Given ClickHouse’s ability to execute complex analytical queries across terabytes of data in a single operation, proper monitoring and observability is critical. Its distributed architecture and scalability add layers of complexity, as multi-node clusters require careful coordination monitoring across shards and replicas to ensure data consistency and availability.</p>
<p>Adding to the operational pressure is users’ expectations of real-time analytics with sub-second response times. Meeting them requires staying ahead of performance issues rather than simply reacting to them. Therefore, monitoring isn’t enough for <a href="https://severalnines.com/clustercontrol/databases/clickhouse">ClickHouse</a>, you need full observability.</p>
<p>So what’s the difference? Observability gives you the complete picture by bringing together three essential components: metrics, logs, and traces. Combined with smart alerting, you can catch issues early and keep your system running smoothly. For sysadmins and ops teams managing large-scale data in ClickHouse, this approach makes all the difference. </p>
<p>In this post, I’ll lay out the strategies, techniques and tooling needed to proactively optimize ClickHouse performance and maintain peak efficiency. First up, why monitoring and observability are essential for ClickHouse.</p>
<h2 class="wp-block-heading">Monitoring and observability is essential for ClickHouse</h2>
<p>An efficient observability and monitoring strategy facilitates the following operations:</p>
<ul class="wp-block-list">
<li>Early detection of performance bottlenecks – identifying slow queries, resource contention, and inefficient table designs before they impact user experience.</li>
<li>Maintaining and ensuring query optimization – tracking query execution patterns to fine-tune indexes, partitioning strategies, and materialized views for maximum throughput.</li>
<li>Determining resource utilization – monitoring CPU, memory, disk, and network to prevent resource exhaustion and maintain consistent performance under heavy workloads.</li>
<li>Observing data pipeline health – observing data ingestion rates, transforming / loading of  data (ETL), replication lag, and merge operations to ensure data freshness and reliability</li>
<li>Enabling proactive capacity planning – analyzing usage trends and growth patterns to scale infra before hitting limits, helping to determine horizontal vs. vertical scaling. </li>
<li>Troubleshooting distributed queries – Gaining visibility into multi-node query execution, network latency, and inter-node communication in clustered environments</li>
<li>Ensuring high availability – Monitoring replica synchronization, failover mechanisms, and cluster health to minimize downtime.</li>
<li>Tracking data quality and consistency – Validating data integrity, detecting anomalies, and ensuring compliance with SLAs.</li>
</ul>
<p>Without proper observability, even the most optimized ClickHouse deployment can suffer from hidden inefficiencies, unexpected failures, and degraded performance that only becomes apparent when it’s too late.</p>
<h2 class="wp-block-heading">Key ClickHouse metrics to track</h2>
<p>It’s worth noting that, without monitoring and observability in a ClickHouse cluster, you’re flying blind in an environment where the following scenario shall be the cluster’s state:</p>
<ul class="wp-block-list">
<li>A single poorly optimized query can consume cluster resources</li>
<li>Silent data quality issues can corrupt analytics</li>
<li>Replication lag can lead to inconsistent results</li>
<li>Resource exhaustion can cascade across the entire cluster</li>
</ul>
<p>Conversely, there are key areas that need to be tracked in order to monitor the database performance and analyze the health of your ClickHouse environment. We’ll go through them.</p>
<h3 class="wp-block-heading">Key observability components in ClickHouse</h3>
<p>There are extensive system tables for observability in ClickHouse which are very useful for observability to collect metrics, logs, and traces. These read-only tables are located in the system database and can be detached, but not dropped. The tables provide information about:</p>
<ul class="wp-block-list">
<li>Server states, processes (both internal and external), and environment.</li>
<li>Options used when the ClickHouse binary was built.</li>
</ul>
<p>The list of system tables below are commonly the source of insights you can rely for observability:</p>
<ul class="wp-block-list">
<li><code>system.query_log</code> – detailed query execution history</li>
<li><code>system.processes</code> – currently running queries</li>
<li><code>system.events</code> – cumulative event counters</li>
<li><code>system.parts</code> – information about data parts</li>
<li><code>system.metrics</code> – real-time metrics (current values)</li>
<li><code>system.dashboards</code> – queries used by /dashboard page accessible though HTTP </li>
<li><code>system.asynchronous_metrics</code> – periodically calculated metrics</li>
<li><code>system.backups </code>– all BACKUP or RESTORE operations and other details.</li>
<li><code>system.disks</code> – information about disks defined in the server configuration.</li>
<li><code>system.replicas</code> – replication status</li>
<li><code>system.clusters</code> – cluster configuration and health</li>
</ul>
<h3 class="wp-block-heading">Key areas to monitor in ClickHouse</h3>
<p>Practices used to administer database clusters, especially OLAP databases, depend heavily on the key areas that are regularly examined and observed. Monitoring key metrics in ClickHouse is essential to achieving and maintaining fast, reliable, and cost efficient analytical workloads. </p>
<p>By tracking metrics such as query latency, error rates, insert throughput, number of parts, and replication lag, you gain early visibility into performance bottlenecks and operational risks before they impact users. The goal of maintaining and applying best practices is to troubleshoot incidents quickly and preserve predictable behavior as your data and traffic grow. </p>
<p>Hence, these are the areas and key metrics that need your eyes and attention:</p>
<h4 class="wp-block-heading">Query performance</h4>
<ul class="wp-block-list">
<li>Queries per second</li>
<li>Query execution time</li>
<li>Read / write throughput</li>
<li>Number of rows processed</li>
</ul>
<h4 class="wp-block-heading">Performance &amp; resource utilization</h4>
<ul class="wp-block-list">
<li>CPU utilization based on the queries applied</li>
<li>Query latency &amp; throughput (by query type, user, or workload class)</li>
<li>Memory consumption</li>
<li>Disk I/O operations and latency</li>
<li>Merge performance (queue size, merge times)</li>
<li>Network bandwidth</li>
</ul>
<h4 class="wp-block-heading">Disk operations</h4>
<ul class="wp-block-list">
<li>Insert rate and volume</li>
<li>Merge operations frequency</li>
<li>Number of active parts</li>
<li>Data compression ratio</li>
</ul>
<h4 class="wp-block-heading">Cluster health</h4>
<ul class="wp-block-list">
<li>Replica synchronization and replication queue status</li>
<li>Coordination service (ZooKeeper / ClickHouse Keeper) session </li>
<li>Quorum status</li>
<li>Node availability and role health (ingest/query/background)</li>
<li>Failed queries (rate, error types)</li>
<li>Connection pool usage and connection failures</li>
</ul>
<h4 class="wp-block-heading">Network and topology (especially important for hybrid / on‑prem)</h4>
<ul class="wp-block-list">
<li>Inter-replica and inter-shard latency and errors</li>
<li>Cross‑DC / cross‑region traffic metrics</li>
<li>Bandwidth utilization for replication and large reads / writes</li>
</ul>
<h4 class="wp-block-heading">Reliability and operations</h4>
<ul class="wp-block-list">
<li>Backup and restore status</li>
<li>Schema changes &amp; mutation queue status</li>
<li>Coordination service stability (leader elections, latency spikes)</li>
</ul>
<h2 class="wp-block-heading">Alerting strategy</h2>
<p>An alerting strategy for ClickHouse should mainly prioritize those areas that are going to hit critical thresholds quickly e.g., resource exhaustion, query failures, etc. over noise. Using tools such as Prometheus / VictoriaMetrics + Grafana + Alertmanager + PagerDuty / Slack is ideal.</p>
<h3 class="wp-block-heading">Critical metrics and alert thresholds</h3>
<p>Below are good thresholds, organized by category that’ll get you started, as well their sources:</p>
<h4 class="wp-block-heading">System usage resource</h4>
<ul class="wp-block-list">
<li>CPU usage
<ul class="wp-block-list">
<li>Set a threshold around &gt;80% for 5min and throw a <em>Warning</em> alert.</li>
<li>Source:<em> </em><code>system.metrics</code></li>
</ul>
</li>
<li>Memory usage
<ul class="wp-block-list">
<li>Consider a threshold of &gt;90% then throw a <em>Critical </em>alert.</li>
<li>Source:<em> </em><code>system.metrics</code></li>
</ul>
</li>
<li>Disk space
<ul class="wp-block-list">
<li>Consider a threshold of &gt;85% used then throw a <em>Critical </em>alert.</li>
<li>Source:<code> system.disks</code></li>
</ul>
</li>
<li>Disk I/O wait
<ul class="wp-block-list">
<li>Set a threshold around &gt;85% used then throw a <em>Critical </em>alert.</li>
<li>Source:<em> </em>via <code>procfs</code> or <code>sysfs</code></li>
</ul>
</li>
</ul>
<h4 class="wp-block-heading">Query performance</h4>
<ul class="wp-block-list">
<li>Query duration (P95):
<ul class="wp-block-list">
<li>Set a threshold for &gt;10s and throw a <em>Warning </em>alert.</li>
<li>Source: <code>system.query_log</code></li>
</ul>
</li>
<li>Failed queries
<ul class="wp-block-list">
<li>Set a threshold for &gt;5% rate and throw a <em>Critical </em>alert.</li>
<li>Source: <code>system.query_log</code></li>
</ul>
</li>
<li>Concurrent queries
<ul class="wp-block-list">
<li>Set a threshold when the total number reaches &gt;100  and throw a <em>Warning </em>alert.</li>
<li>Source: <code>system.metrics</code></li>
</ul>
</li>
<li>Query queue size
<ul class="wp-block-list">
<li>Set a threshold when the total number reaches &gt; 50  and throw a <em>Critical </em>alert.</li>
<li>Source: <code>system.metrics</code></li>
</ul>
</li>
</ul>
<h4 class="wp-block-heading">Data Ingestion</h4>
<ul class="wp-block-list">
<li>Insert rate drop
<ul class="wp-block-list">
<li>Set a threshold when the rate drops &lt; 50% then throw a <em>Warning </em>alert.</li>
<li>Source: <code>system.events</code></li>
</ul>
</li>
<li>Insert failures
<ul class="wp-block-list">
<li>Set a threshold for &gt;1% rate and throw a <em>Critical </em>alert.</li>
<li>Source: <code>system.query_log</code></li>
</ul>
</li>
</ul>
<h4 class="wp-block-heading">Merge operations (MergeTree / ReplicatedMergeTree)</h4>
<ul class="wp-block-list">
<li>Parts count
<ul class="wp-block-list">
<li>Set a threshold &gt;300 per partition then throw a <em>Warning </em>alert.</li>
<li>Source: <code>system.parts</code></li>
</ul>
</li>
<li>Merge queue size
<ul class="wp-block-list">
<li>Set a threshold for &gt;100 then throw a <em>Warning </em>alert.</li>
<li>Source: <code>system.metrics</code></li>
</ul>
</li>
<li>Background tasks
<ul class="wp-block-list">
<li>Set a threshold when Pool saturation &gt;80% then throw a <em>Warning </em>alert.</li>
<li>Source: <code>system.metrics</code></li>
</ul>
</li>
<li>Mutations running
<ul class="wp-block-list">
<li>Set a threshold for mutations stuck &gt; 1h then throw a <em>Critical </em>alert.</li>
<li>Source: <code>system.mutations</code></li>
</ul>
</li>
</ul>
<h4 class="wp-block-heading">Replication</h4>
<ul class="wp-block-list">
<li>Replication lag
<ul class="wp-block-list">
<li>Set a threshold &gt;300 per partition then throw a <em>Warning </em>alert.</li>
<li>Source: <code>system.parts</code></li>
</ul>
</li>
<li>Replication queue
<ul class="wp-block-list">
<li>Set a threshold for &gt;100 tasks then throw a <em>Warning </em>alert.</li>
<li>Source: <code>system.replication_queue</code></li>
</ul>
</li>
<li>Replica status
<ul class="wp-block-list">
<li>Set a threshold when is_readonly=1 (something went broke in the replication) then throw a <em>Critical </em>alert.</li>
<li>Source: <code>system.replicas</code></li>
</ul>
</li>
</ul>
<h4 class="wp-block-heading">Cluster health</h4>
<ul class="wp-block-list">
<li>Node availability
<ul class="wp-block-list">
<li>Throw <em>Critical </em>alert if node(s) goes down.</li>
<li>Source: Prometheus or VictoriaMetrics</li>
</ul>
</li>
<li>Distributed query failures
<ul class="wp-block-list">
<li>Set a threshold for &gt;2% then throw a <em>Critical </em>alert.</li>
<li>Source: <code>system.query_log</code></li>
</ul>
</li>
<li>Network latency
<ul class="wp-block-list">
<li>Set a threshold when &gt;100ms inter-node communication then throw a <em>Warning </em>alert.</li>
<li>Source:<em> </em>via <code>procfs</code> or <code>sysfs</code></li>
</ul>
</li>
</ul>
<h2 class="wp-block-heading">Dashboard best practices</h2>
<p>It’s important to have a dashboard that is designed with a set of core principles that prioritize ease of use, performance, and flexibility  and is easy to set up and configure. From open-source to enterprise-grade tools, there are options. Relying on open-source tools, it’s widely common to use Prometheus / VictoriaMetrics + Grafana + AlertManager integrated with other 3rd party tools, such as PagerDuty, Slack, OpsGenie, etc. to send high-severity alerts.</p>
<p>Any tool you are evaluating should have these functionalities:</p>
<ul class="wp-block-list">
<li>Scraping: Use the ClickHouse built-in Prometheus-friendly output or a dedicated exporter (like the official one) to collect metrics.</li>
<li>Cardinality: ClickHouse metrics can have high cardinality e.g., many unique query IDs.</li>
<li>Recording Rules: Pre-calculate frequently queried or computationally expensive metrics.</li>
</ul>
<h3 class="wp-block-heading">Managing alerts</h3>
<p>Let’s look at Alertmanager as an example, which handles de-duplication, grouping, inhibition, and routing of alerts to receivers like Slack or PagerDuty. This allows to do the following:</p>
<h4 class="wp-block-heading">Actionable and clear alerts</h4>
<ul class="wp-block-list">
<li>Specificity: Use specific messages that are clear and specific to the intention of the alert such as <em>ClickHouse: High Insert Latency on Cluster X.</em></li>
<li>Context: Include labels (severity, instance, cluster) and annotations (summary, description, runbook links) in your Prometheus alert rules.</li>
<li>Severity levels: Assign clear severity labels (<em>critical, warning</em>) to all alerts to ensure proper routing to PagerDuty (for on-call) versus Slack (for general awareness).</li>
</ul>
<h4 class="wp-block-heading">Reduce alert fatigue</h4>
<ul class="wp-block-list">
<li>Grouping: Configure Alertmanager to group similar alerts e.g., group by alertname and cluster into a single notification. This prevents a cascade of alerts from overwhelming the on-call person.</li>
<li>Inhibition: Use inhibition rules to suppress less critical alerts when a major one is firing. For example, if the ClickHouseInstanceDown alert is active for a host, inhibit alerts for DiskSpaceLow on the same host, as the host being down is the root cause.</li>
<li>Throttling / timing: Utilize the for clause in Prometheus rules e.g., <em>for: 5m</em> to ensure a condition persists before an alert fires, avoiding alerts for transient issues (flapping). Configure <code>group_wait</code>, <code>group_interval</code>, and <code>repeat_interval</code> in Alertmanager to control notification frequency.</li>
</ul>
<h3 class="wp-block-heading">Integration with third-party tooling</h3>
<p>Using the example of Slack / PagerDuty for third-party integration tools, below are the recommendations and guidelines you can follow:</p>
<ul class="wp-block-list">
<li>Routing: Define routing tree in Alertmanager’s configuration to send high-severity alerts (<em>critical</em>) to PagerDuty for on-call immediate response and lower-severity alerts (warning, info) to Slack channels for visibility.</li>
<li>PagerDuty: Integrate using the Events API V2. Set <code>send_resolved: true</code> to automatically resolve PagerDuty incidents when the Prometheus alert is cleared. Use event rules in PagerDuty to filter or enrich events.</li>
<li>Slack: Create a dedicated channel for incident coordination. Leverage notification templates to standardize the look and feel of alerts, including buttons for acknowledging / resolving incidents directly from Slack (especially if using the PagerDuty integration).</li>
</ul>
<h3 class="wp-block-heading">Commercial or enterprise-grade tools</h3>
<p>ClickHouse also offers ClickStack which is a production-grade observability platform built specifically for ClickHouse. It features unifying logs, traces, metrics and sessions in a single high-performance solution. Designed for monitoring and debugging complex systems, ClickStack enables developers and SREs to trace issues end-to-end without switching between tools or manually stitching together data using timestamps or correlation IDs. </p>
<p>If it suits your budget, enterprise tools are highly advisable as it offers less headache, suitability for your environment, ease and comfortability to maintain the software as you rely on the maintainer itself plus the support mechanism that the software offers. </p>
<h2 class="wp-block-heading">Conclusion</h2>
<p>In the end, getting monitoring and observability right for ClickHouse is the difference between passively assuming the cluster is healthy and having hard, real-time data that tells you exactly what’s happening across queries, resources, and internals. When you focus on the right metrics, set up alerts that really matter, and build dashboards that answer real questions instead of just looking good, you put yourself in a much stronger position. You can catch issues early, understand what’s happening under the hood, and scale your cluster with a lot more confidence.</p>
<p>You also don’t need to have everything perfect on day one. Start simple: keep an eye on performance and resource usage, set alerts around the parts of the system you care about most, and build a few dashboards your team will actually check. As your ClickHouse workloads grow, you can refine what you track, adjust your alert thresholds, and evolve your setup over time.</p>
<p>By treating observability as an ongoing practice, ClickHouse becomes a system you understand, trust, and can tune as you go, instead of a blackbox you’re constantly second-guessing.</p>
<h2 class="wp-block-heading">Try ClickHouse yourself free for 30 days, install ClusterControl now!</h2>
<h3 class="wp-block-heading">Script Installation Instructions</h3>
<p>The installer script is the simplest way to get ClusterControl up and running. Run it on your chosen host, and it will take care of installing all required packages and dependencies.</p>
<p>Offline environments are supported as well. See the <a href="https://docs.severalnines.com/clustercontrol/latest/getting-started/installation/offline-installation/">Offline Installation</a> guide for more details.</p>
<p>On the ClusterControl server, run the following commands:</p>
<pre class="wp-block-code"><code>wget https://severalnines.com/downloads/cmon/install-cc
chmod +x install-cc
sudo ./install-cc     # omit sudo if you run as root</code></pre>
<p>After the installation is complete, open a web browser, navigate to <code>https:///</code>, and create the first admin user by entering a username (note that “admin” is reserved) and a password on the <a href="https://docs.severalnines.com/clustercontrol/latest/getting-started/quickstart/#step-2-create-the-first-admin-user">welcome page</a>. Once you’re in, you can <a href="https://docs.severalnines.com/clustercontrol/latest/user-guide/deployment/create-database-cluster/">deploy</a> a new database cluster or <a href="https://docs.severalnines.com/clustercontrol/latest/user-guide/deployment/import-database-cluster/">import</a> an existing one.</p>
<p>The installer script supports a range of environment variables for advanced setup. You can define them using export or by prefixing the install command.</p>
<p>See the <a href="https://docs.severalnines.com/clustercontrol/latest/getting-started/installation/online-installation/#environment-variables">list of supported variables</a> and <a href="https://docs.severalnines.com/clustercontrol/latest/getting-started/installation/online-installation/#example-use-cases">example use cases</a> to tailor your installation.</p>
<p>The post <a href="https://severalnines.com/blog/clickhouse-monitoring-and-observability-decision-points/">ClickHouse Monitoring and Observability Decision Points</a> appeared first on <a href="https://severalnines.com/">Severalnines</a>.</p>
<p><a href="https://severalnines.com/blog/clickhouse-monitoring-and-observability-decision-points/">ClickHouse Monitoring and Observability Decision Points</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>ClickHouse Monitoring and Observability Decision Points</title>
        <link>https://severalnines.com/blog/clickhouse-monitoring-and-observability-decision-points/</link>
        <pubDate>Fri, 17 Apr 2026 07:00:00 +0000</pubDate>
        <dc:creator>Paul Namuag</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/clickhouse-monitoring-and-observability-decision-points/</guid>
        <source url="https://severalnines.com/">Severalnines</source>
        <description><![CDATA[<p>Given ClickHouse’s ability to execute complex analytical queries across terabytes of data in a single operation, proper monitoring and observability is critical. Its distributed architecture and scalability add layers of complexity, as multi-node clusters require careful coordination monitoring across shards and replicas to ensure data consistency and availability. Adding to the operational pressure is users’ […]<br />
The post ClickHouse Monitoring and Observability Decision Points appeared first on Severalnines.</p>
<p><a href="https://severalnines.com/blog/clickhouse-monitoring-and-observability-decision-points/">ClickHouse Monitoring and Observability Decision Points</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Given ClickHouse’s ability to execute complex analytical queries across terabytes of data in a single operation, proper monitoring and observability is critical. Its distributed architecture and scalability add layers of complexity, as multi-node clusters require careful coordination monitoring across shards and replicas to ensure data consistency and availability.</p>
<p>Adding to the operational pressure is users’ expectations of real-time analytics with sub-second response times. Meeting them requires staying ahead of performance issues rather than simply reacting to them. Therefore, monitoring isn’t enough for <a href="https://severalnines.com/clustercontrol/databases/clickhouse">ClickHouse</a>, you need full observability.</p>
<p>So what’s the difference? Observability gives you the complete picture by bringing together three essential components: metrics, logs, and traces. Combined with smart alerting, you can catch issues early and keep your system running smoothly. For sysadmins and ops teams managing large-scale data in ClickHouse, this approach makes all the difference. </p>
<p>In this post, I’ll lay out the strategies, techniques and tooling needed to proactively optimize ClickHouse performance and maintain peak efficiency. First up, why monitoring and observability are essential for ClickHouse.</p>
<h2 class="wp-block-heading">Monitoring and observability is essential for ClickHouse</h2>
<p>An efficient observability and monitoring strategy facilitates the following operations:</p>
<ul class="wp-block-list">
<li>Early detection of performance bottlenecks – identifying slow queries, resource contention, and inefficient table designs before they impact user experience.</li>
<li>Maintaining and ensuring query optimization – tracking query execution patterns to fine-tune indexes, partitioning strategies, and materialized views for maximum throughput.</li>
<li>Determining resource utilization – monitoring CPU, memory, disk, and network to prevent resource exhaustion and maintain consistent performance under heavy workloads.</li>
<li>Observing data pipeline health – observing data ingestion rates, transforming / loading of  data (ETL), replication lag, and merge operations to ensure data freshness and reliability</li>
<li>Enabling proactive capacity planning – analyzing usage trends and growth patterns to scale infra before hitting limits, helping to determine horizontal vs. vertical scaling. </li>
<li>Troubleshooting distributed queries – Gaining visibility into multi-node query execution, network latency, and inter-node communication in clustered environments</li>
<li>Ensuring high availability – Monitoring replica synchronization, failover mechanisms, and cluster health to minimize downtime.</li>
<li>Tracking data quality and consistency – Validating data integrity, detecting anomalies, and ensuring compliance with SLAs.</li>
</ul>
<p>Without proper observability, even the most optimized ClickHouse deployment can suffer from hidden inefficiencies, unexpected failures, and degraded performance that only becomes apparent when it’s too late.</p>
<h2 class="wp-block-heading">Key ClickHouse metrics to track</h2>
<p>It’s worth noting that, without monitoring and observability in a ClickHouse cluster, you’re flying blind in an environment where the following scenario shall be the cluster’s state:</p>
<ul class="wp-block-list">
<li>A single poorly optimized query can consume cluster resources</li>
<li>Silent data quality issues can corrupt analytics</li>
<li>Replication lag can lead to inconsistent results</li>
<li>Resource exhaustion can cascade across the entire cluster</li>
</ul>
<p>Conversely, there are key areas that need to be tracked in order to monitor the database performance and analyze the health of your ClickHouse environment. We’ll go through them.</p>
<h3 class="wp-block-heading">Key observability components in ClickHouse</h3>
<p>There are extensive system tables for observability in ClickHouse which are very useful for observability to collect metrics, logs, and traces. These read-only tables are located in the system database and can be detached, but not dropped. The tables provide information about:</p>
<ul class="wp-block-list">
<li>Server states, processes (both internal and external), and environment.</li>
<li>Options used when the ClickHouse binary was built.</li>
</ul>
<p>The list of system tables below are commonly the source of insights you can rely for observability:</p>
<ul class="wp-block-list">
<li><code>system.query_log</code> – detailed query execution history</li>
<li><code>system.processes</code> – currently running queries</li>
<li><code>system.events</code> – cumulative event counters</li>
<li><code>system.parts</code> – information about data parts</li>
<li><code>system.metrics</code> – real-time metrics (current values)</li>
<li><code>system.dashboards</code> – queries used by /dashboard page accessible though HTTP </li>
<li><code>system.asynchronous_metrics</code> – periodically calculated metrics</li>
<li><code>system.backups </code>– all BACKUP or RESTORE operations and other details.</li>
<li><code>system.disks</code> – information about disks defined in the server configuration.</li>
<li><code>system.replicas</code> – replication status</li>
<li><code>system.clusters</code> – cluster configuration and health</li>
</ul>
<h3 class="wp-block-heading">Key areas to monitor in ClickHouse</h3>
<p>Practices used to administer database clusters, especially OLAP databases, depend heavily on the key areas that are regularly examined and observed. Monitoring key metrics in ClickHouse is essential to achieving and maintaining fast, reliable, and cost efficient analytical workloads. </p>
<p>By tracking metrics such as query latency, error rates, insert throughput, number of parts, and replication lag, you gain early visibility into performance bottlenecks and operational risks before they impact users. The goal of maintaining and applying best practices is to troubleshoot incidents quickly and preserve predictable behavior as your data and traffic grow. </p>
<p>Hence, these are the areas and key metrics that need your eyes and attention:</p>
<h4 class="wp-block-heading">Query performance</h4>
<ul class="wp-block-list">
<li>Queries per second</li>
<li>Query execution time</li>
<li>Read / write throughput</li>
<li>Number of rows processed</li>
</ul>
<h4 class="wp-block-heading">Performance &amp; resource utilization</h4>
<ul class="wp-block-list">
<li>CPU utilization based on the queries applied</li>
<li>Query latency &amp; throughput (by query type, user, or workload class)</li>
<li>Memory consumption</li>
<li>Disk I/O operations and latency</li>
<li>Merge performance (queue size, merge times)</li>
<li>Network bandwidth</li>
</ul>
<h4 class="wp-block-heading">Disk operations</h4>
<ul class="wp-block-list">
<li>Insert rate and volume</li>
<li>Merge operations frequency</li>
<li>Number of active parts</li>
<li>Data compression ratio</li>
</ul>
<h4 class="wp-block-heading">Cluster health</h4>
<ul class="wp-block-list">
<li>Replica synchronization and replication queue status</li>
<li>Coordination service (ZooKeeper / ClickHouse Keeper) session </li>
<li>Quorum status</li>
<li>Node availability and role health (ingest/query/background)</li>
<li>Failed queries (rate, error types)</li>
<li>Connection pool usage and connection failures</li>
</ul>
<h4 class="wp-block-heading">Network and topology (especially important for hybrid / on‑prem)</h4>
<ul class="wp-block-list">
<li>Inter-replica and inter-shard latency and errors</li>
<li>Cross‑DC / cross‑region traffic metrics</li>
<li>Bandwidth utilization for replication and large reads / writes</li>
</ul>
<h4 class="wp-block-heading">Reliability and operations</h4>
<ul class="wp-block-list">
<li>Backup and restore status</li>
<li>Schema changes &amp; mutation queue status</li>
<li>Coordination service stability (leader elections, latency spikes)</li>
</ul>
<h2 class="wp-block-heading">Alerting strategy</h2>
<p>An alerting strategy for ClickHouse should mainly prioritize those areas that are going to hit critical thresholds quickly e.g., resource exhaustion, query failures, etc. over noise. Using tools such as Prometheus / VictoriaMetrics + Grafana + Alertmanager + PagerDuty / Slack is ideal.</p>
<h3 class="wp-block-heading">Critical metrics and alert thresholds</h3>
<p>Below are good thresholds, organized by category that’ll get you started, as well their sources:</p>
<h4 class="wp-block-heading">System usage resource</h4>
<ul class="wp-block-list">
<li>CPU usage
<ul class="wp-block-list">
<li>Set a threshold around &gt;80% for 5min and throw a <em>Warning</em> alert.</li>
<li>Source:<em> </em><code>system.metrics</code></li>
</ul>
</li>
<li>Memory usage
<ul class="wp-block-list">
<li>Consider a threshold of &gt;90% then throw a <em>Critical </em>alert.</li>
<li>Source:<em> </em><code>system.metrics</code></li>
</ul>
</li>
<li>Disk space
<ul class="wp-block-list">
<li>Consider a threshold of &gt;85% used then throw a <em>Critical </em>alert.</li>
<li>Source:<code> system.disks</code></li>
</ul>
</li>
<li>Disk I/O wait
<ul class="wp-block-list">
<li>Set a threshold around &gt;85% used then throw a <em>Critical </em>alert.</li>
<li>Source:<em> </em>via <code>procfs</code> or <code>sysfs</code></li>
</ul>
</li>
</ul>
<h4 class="wp-block-heading">Query performance</h4>
<ul class="wp-block-list">
<li>Query duration (P95):
<ul class="wp-block-list">
<li>Set a threshold for &gt;10s and throw a <em>Warning </em>alert.</li>
<li>Source: <code>system.query_log</code></li>
</ul>
</li>
<li>Failed queries
<ul class="wp-block-list">
<li>Set a threshold for &gt;5% rate and throw a <em>Critical </em>alert.</li>
<li>Source: <code>system.query_log</code></li>
</ul>
</li>
<li>Concurrent queries
<ul class="wp-block-list">
<li>Set a threshold when the total number reaches &gt;100  and throw a <em>Warning </em>alert.</li>
<li>Source: <code>system.metrics</code></li>
</ul>
</li>
<li>Query queue size
<ul class="wp-block-list">
<li>Set a threshold when the total number reaches &gt; 50  and throw a <em>Critical </em>alert.</li>
<li>Source: <code>system.metrics</code></li>
</ul>
</li>
</ul>
<h4 class="wp-block-heading">Data Ingestion</h4>
<ul class="wp-block-list">
<li>Insert rate drop
<ul class="wp-block-list">
<li>Set a threshold when the rate drops &lt; 50% then throw a <em>Warning </em>alert.</li>
<li>Source: <code>system.events</code></li>
</ul>
</li>
<li>Insert failures
<ul class="wp-block-list">
<li>Set a threshold for &gt;1% rate and throw a <em>Critical </em>alert.</li>
<li>Source: <code>system.query_log</code></li>
</ul>
</li>
</ul>
<h4 class="wp-block-heading">Merge operations (MergeTree / ReplicatedMergeTree)</h4>
<ul class="wp-block-list">
<li>Parts count
<ul class="wp-block-list">
<li>Set a threshold &gt;300 per partition then throw a <em>Warning </em>alert.</li>
<li>Source: <code>system.parts</code></li>
</ul>
</li>
<li>Merge queue size
<ul class="wp-block-list">
<li>Set a threshold for &gt;100 then throw a <em>Warning </em>alert.</li>
<li>Source: <code>system.metrics</code></li>
</ul>
</li>
<li>Background tasks
<ul class="wp-block-list">
<li>Set a threshold when Pool saturation &gt;80% then throw a <em>Warning </em>alert.</li>
<li>Source: <code>system.metrics</code></li>
</ul>
</li>
<li>Mutations running
<ul class="wp-block-list">
<li>Set a threshold for mutations stuck &gt; 1h then throw a <em>Critical </em>alert.</li>
<li>Source: <code>system.mutations</code></li>
</ul>
</li>
</ul>
<h4 class="wp-block-heading">Replication</h4>
<ul class="wp-block-list">
<li>Replication lag
<ul class="wp-block-list">
<li>Set a threshold &gt;300 per partition then throw a <em>Warning </em>alert.</li>
<li>Source: <code>system.parts</code></li>
</ul>
</li>
<li>Replication queue
<ul class="wp-block-list">
<li>Set a threshold for &gt;100 tasks then throw a <em>Warning </em>alert.</li>
<li>Source: <code>system.replication_queue</code></li>
</ul>
</li>
<li>Replica status
<ul class="wp-block-list">
<li>Set a threshold when is_readonly=1 (something went broke in the replication) then throw a <em>Critical </em>alert.</li>
<li>Source: <code>system.replicas</code></li>
</ul>
</li>
</ul>
<h4 class="wp-block-heading">Cluster health</h4>
<ul class="wp-block-list">
<li>Node availability
<ul class="wp-block-list">
<li>Throw <em>Critical </em>alert if node(s) goes down.</li>
<li>Source: Prometheus or VictoriaMetrics</li>
</ul>
</li>
<li>Distributed query failures
<ul class="wp-block-list">
<li>Set a threshold for &gt;2% then throw a <em>Critical </em>alert.</li>
<li>Source: <code>system.query_log</code></li>
</ul>
</li>
<li>Network latency
<ul class="wp-block-list">
<li>Set a threshold when &gt;100ms inter-node communication then throw a <em>Warning </em>alert.</li>
<li>Source:<em> </em>via <code>procfs</code> or <code>sysfs</code></li>
</ul>
</li>
</ul>
<h2 class="wp-block-heading">Dashboard best practices</h2>
<p>It’s important to have a dashboard that is designed with a set of core principles that prioritize ease of use, performance, and flexibility  and is easy to set up and configure. From open-source to enterprise-grade tools, there are options. Relying on open-source tools, it’s widely common to use Prometheus / VictoriaMetrics + Grafana + AlertManager integrated with other 3rd party tools, such as PagerDuty, Slack, OpsGenie, etc. to send high-severity alerts.</p>
<p>Any tool you are evaluating should have these functionalities:</p>
<ul class="wp-block-list">
<li>Scraping: Use the ClickHouse built-in Prometheus-friendly output or a dedicated exporter (like the official one) to collect metrics.</li>
<li>Cardinality: ClickHouse metrics can have high cardinality e.g., many unique query IDs.</li>
<li>Recording Rules: Pre-calculate frequently queried or computationally expensive metrics.</li>
</ul>
<h3 class="wp-block-heading">Managing alerts</h3>
<p>Let’s look at Alertmanager as an example, which handles de-duplication, grouping, inhibition, and routing of alerts to receivers like Slack or PagerDuty. This allows to do the following:</p>
<h4 class="wp-block-heading">Actionable and clear alerts</h4>
<ul class="wp-block-list">
<li>Specificity: Use specific messages that are clear and specific to the intention of the alert such as <em>ClickHouse: High Insert Latency on Cluster X.</em></li>
<li>Context: Include labels (severity, instance, cluster) and annotations (summary, description, runbook links) in your Prometheus alert rules.</li>
<li>Severity levels: Assign clear severity labels (<em>critical, warning</em>) to all alerts to ensure proper routing to PagerDuty (for on-call) versus Slack (for general awareness).</li>
</ul>
<h4 class="wp-block-heading">Reduce alert fatigue</h4>
<ul class="wp-block-list">
<li>Grouping: Configure Alertmanager to group similar alerts e.g., group by alertname and cluster into a single notification. This prevents a cascade of alerts from overwhelming the on-call person.</li>
<li>Inhibition: Use inhibition rules to suppress less critical alerts when a major one is firing. For example, if the ClickHouseInstanceDown alert is active for a host, inhibit alerts for DiskSpaceLow on the same host, as the host being down is the root cause.</li>
<li>Throttling / timing: Utilize the for clause in Prometheus rules e.g., <em>for: 5m</em> to ensure a condition persists before an alert fires, avoiding alerts for transient issues (flapping). Configure <code>group_wait</code>, <code>group_interval</code>, and <code>repeat_interval</code> in Alertmanager to control notification frequency.</li>
</ul>
<h3 class="wp-block-heading">Integration with third-party tooling</h3>
<p>Using the example of Slack / PagerDuty for third-party integration tools, below are the recommendations and guidelines you can follow:</p>
<ul class="wp-block-list">
<li>Routing: Define routing tree in Alertmanager’s configuration to send high-severity alerts (<em>critical</em>) to PagerDuty for on-call immediate response and lower-severity alerts (warning, info) to Slack channels for visibility.</li>
<li>PagerDuty: Integrate using the Events API V2. Set <code>send_resolved: true</code> to automatically resolve PagerDuty incidents when the Prometheus alert is cleared. Use event rules in PagerDuty to filter or enrich events.</li>
<li>Slack: Create a dedicated channel for incident coordination. Leverage notification templates to standardize the look and feel of alerts, including buttons for acknowledging / resolving incidents directly from Slack (especially if using the PagerDuty integration).</li>
</ul>
<h3 class="wp-block-heading">Commercial or enterprise-grade tools</h3>
<p>ClickHouse also offers ClickStack which is a production-grade observability platform built specifically for ClickHouse. It features unifying logs, traces, metrics and sessions in a single high-performance solution. Designed for monitoring and debugging complex systems, ClickStack enables developers and SREs to trace issues end-to-end without switching between tools or manually stitching together data using timestamps or correlation IDs. </p>
<p>If it suits your budget, enterprise tools are highly advisable as it offers less headache, suitability for your environment, ease and comfortability to maintain the software as you rely on the maintainer itself plus the support mechanism that the software offers. </p>
<h2 class="wp-block-heading">Conclusion</h2>
<p>In the end, getting monitoring and observability right for ClickHouse is the difference between passively assuming the cluster is healthy and having hard, real-time data that tells you exactly what’s happening across queries, resources, and internals. When you focus on the right metrics, set up alerts that really matter, and build dashboards that answer real questions instead of just looking good, you put yourself in a much stronger position. You can catch issues early, understand what’s happening under the hood, and scale your cluster with a lot more confidence.</p>
<p>You also don’t need to have everything perfect on day one. Start simple: keep an eye on performance and resource usage, set alerts around the parts of the system you care about most, and build a few dashboards your team will actually check. As your ClickHouse workloads grow, you can refine what you track, adjust your alert thresholds, and evolve your setup over time.</p>
<p>By treating observability as an ongoing practice, ClickHouse becomes a system you understand, trust, and can tune as you go, instead of a blackbox you’re constantly second-guessing.</p>
<h2 class="wp-block-heading">Try ClickHouse yourself free for 30 days, install ClusterControl now!</h2>
<h3 class="wp-block-heading">Script Installation Instructions</h3>
<p>The installer script is the simplest way to get ClusterControl up and running. Run it on your chosen host, and it will take care of installing all required packages and dependencies.</p>
<p>Offline environments are supported as well. See the <a href="https://docs.severalnines.com/clustercontrol/latest/getting-started/installation/offline-installation/">Offline Installation</a> guide for more details.</p>
<p>On the ClusterControl server, run the following commands:</p>
<pre class="wp-block-code"><code>wget https://severalnines.com/downloads/cmon/install-cc
chmod +x install-cc
sudo ./install-cc     # omit sudo if you run as root</code></pre>
<p>After the installation is complete, open a web browser, navigate to <code>https:///</code>, and create the first admin user by entering a username (note that “admin” is reserved) and a password on the <a href="https://docs.severalnines.com/clustercontrol/latest/getting-started/quickstart/#step-2-create-the-first-admin-user">welcome page</a>. Once you’re in, you can <a href="https://docs.severalnines.com/clustercontrol/latest/user-guide/deployment/create-database-cluster/">deploy</a> a new database cluster or <a href="https://docs.severalnines.com/clustercontrol/latest/user-guide/deployment/import-database-cluster/">import</a> an existing one.</p>
<p>The installer script supports a range of environment variables for advanced setup. You can define them using export or by prefixing the install command.</p>
<p>See the <a href="https://docs.severalnines.com/clustercontrol/latest/getting-started/installation/online-installation/#environment-variables">list of supported variables</a> and <a href="https://docs.severalnines.com/clustercontrol/latest/getting-started/installation/online-installation/#example-use-cases">example use cases</a> to tailor your installation.</p>
<p>The post <a href="https://severalnines.com/blog/clickhouse-monitoring-and-observability-decision-points/">ClickHouse Monitoring and Observability Decision Points</a> appeared first on <a href="https://severalnines.com/">Severalnines</a>.</p>
<p><a href="https://severalnines.com/blog/clickhouse-monitoring-and-observability-decision-points/">ClickHouse Monitoring and Observability Decision Points</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Symlinks are Unsafe since MySQL 8.0.39 (and maybe even before)</title>
        <link>https://jfg-mysql.blogspot.com/2026/04/symlinks-are-unsafe-in-mysql.html</link>
        <pubDate>Tue, 14 Apr 2026 19:53:00 +0000</pubDate>
        <dc:creator>Jean-François Gagné</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/symlinks-are-unsafe-since-mysql-8-0-39-and-maybe-even-before-2/</guid>
        <source url="https://jfg-mysql.blogspot.com/">J-F Gagné&#039;s MySQL Blog</source>
        <description><![CDATA[<p>You read this right, symbolic links (symlinks) are unsafe in MySQL since at least 8.0.39.  As always, it is a little more complicated than that, but if you are using symbolic links and in certain conditions, you risk a crash.  I think it is important to raise awareness on this, hence this post.</p>
<p>My attention was brought to this via the now private Bug #120156: MySQL 8.0.39/8.0.42</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/04/symlinks-are-unsafe-in-mysql.html">Symlinks are Unsafe since MySQL 8.0.39 (and maybe even before)</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>You read this right, symbolic links (symlinks) are unsafe in MySQL since at least 8.0.39.  As always, it is a little more complicated than that, but if you are using symbolic links and in certain conditions, you risk a crash.  I think it is important to raise awareness on this, hence this post.</p>
<p>My attention was brought to this via the now private Bug #120156: MySQL 8.0.39/8.0.42</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/04/symlinks-are-unsafe-in-mysql.html">Symlinks are Unsafe since MySQL 8.0.39 (and maybe even before)</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Symlinks are Unsafe since MySQL 8.0.39 (and maybe even before)</title>
        <link>https://jfg-mysql.blogspot.com/2026/04/symlinks-are-unsafe-in-mysql.html</link>
        <pubDate>Tue, 14 Apr 2026 19:53:00 +0000</pubDate>
        <dc:creator>Jean-François Gagné</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/symlinks-are-unsafe-since-mysql-8-0-39-and-maybe-even-before/</guid>
        <source url="https://jfg-mysql.blogspot.com/">J-F Gagné&#039;s MySQL Blog</source>
        <description><![CDATA[<p>You read this right, symbolic links (symlinks) are unsafe in MySQL since at least 8.0.39.  As always, it is a little more complicated than that, but if you are using symbolic links and in certain conditions, you risk a crash.  I think it is important to raise awareness on this, hence this post.</p>
<p>My attention was brought to this via the now private Bug #120156: MySQL 8.0.39/8.0.42</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/04/symlinks-are-unsafe-in-mysql.html">Symlinks are Unsafe since MySQL 8.0.39 (and maybe even before)</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>You read this right, symbolic links (symlinks) are unsafe in MySQL since at least 8.0.39.  As always, it is a little more complicated than that, but if you are using symbolic links and in certain conditions, you risk a crash.  I think it is important to raise awareness on this, hence this post.</p>
<p>My attention was brought to this via the now private Bug #120156: MySQL 8.0.39/8.0.42</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/04/symlinks-are-unsafe-in-mysql.html">Symlinks are Unsafe since MySQL 8.0.39 (and maybe even before)</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MySQL 9.7.0 vs sysbench on a small server</title>
        <link>https://smalldatum.blogspot.com/2026/04/mysql-970-vs-sysbench-on-small-server.html</link>
        <pubDate>Fri, 10 Apr 2026 18:00:00 +0000</pubDate>
        <dc:creator>Mark Callaghan</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mysql-9-7-0-vs-sysbench-on-a-small-server/</guid>
        <source url="https://smalldatum.blogspot.com/">Small Datum</source>
        <description><![CDATA[<p>This has results from sysbench on a small server with MySQL 9.7.0 and 8.4.8. Sysbench is run with low concurrency (1 thread) and a cached database. The purpose is to search for changes in performance, often from new CPU overheads.I tested MySQL 9.7.0 with and without the hypergraph optimizer enabled. I don't expect it to help much because the queries run here are simple. I hope to learn it doesn't hurt performance in that case.tl;drThroughput improves on two tests with the Hypergraph optimizer in 9.7.0 because they get better query plans.One read-only test and several write-heavy tests have small regressions from 8.4.8 to 9.7.0. This might be from new CPU overheads but I don't see obvious problems in the flamegraphs. Builds, configuration and hardwareI compiled MySQL from source for versions 8.4.8 and 9.7.0.The server is an ASUS ExpertCenter PN53 with AMD Ryzen 7 7735HS, 32G RAM and an m.2 device for the database. More details on it are here. The OS is Ubuntu 24.04 and the database filesystem is ext4 with discard enabled.The my.cnf files os here for 8.4. I call this the z12a configs and variants of it are used for MySQL 5.6 through 8.4.For 9.7 I use two configs:z13aThis is as close as possible to z12a and adds two options to undo changes to the default values for two gtid-related options that arrived in 9.6. z13bThis is like z13a but then enables the hypergraph optimizerAll DBMS versions use the latin1 character set as explained here.BenchmarkI used sysbench and my usage is explained here. To save time I only run 32 of the 42 microbenchmarks and most test only 1 type of SQL statement. Benchmarks are run with the database cached by InnoDB.The tests are run using 1 table with 50M rows. The read-heavy microbenchmarks run for 600 seconds and the write-heavy for 1800 seconds.ResultsThe microbenchmarks are split into 4 groups -- 1 for point queries, 2 for range queries, 1 for writes. For the range query microbenchmarks, part 1 has queries that don't do aggregation while part 2 has queries that do aggregation. I provide tables below with relative QPS. When the relative QPS is &#62; 1 then some version is faster than the base version. When it is &#60; 1 then there might be a regression.  The relative QPS (rQPS) is:(QPS for some version) / (QPS for MySQL 8.4.8) Results: point queriesI describe performance changes (changes to relative QPS, rQPS) in terms of basis points. Performance changes by one basis point when the difference in rQPS is 0.01. When rQPS decreases from 0.95 to 0.85 then it changed by 10 basis points.This shows the rQPS for MySQL 9.7.0 using both the z13a and z13b configs. It is relative to the throughput from MySQL 8.4.8.Throughput with MySQL 9.7.0 is similar to 8.4.8 except for point-query where there are regressions as rQPS drops by 5 and 7 basis points. The point-query test uses simple queries that fetch one column from one row by PK. From vmstat metrics the CPU overhead per query for 9.7.0 is ~8% larger than for 8.4.8, with and without the hypergraph optimizer. I don&#039;t see anything obvious in the flamegraphs.z13a    z13b0.99    1.01    hot-points0.95    0.93    point-query0.99    1.01    points-covered-pk1.00    1.01    points-covered-si0.98    1.00    points-notcovered-pk0.99    1.01    points-notcovered-si1.00    1.02    random-points_range=10000.99    1.01    random-points_range=1000.96    1.00    random-points_range=10Results: range queries without aggregationI describe performance changes (changes to relative QPS, rQPS) in terms of basis points. When rQPS decreases from 0.95 to 0.85 then it changed by 10 basis points.This shows the rQPS for MySQL 9.7.0 using both the z13a and z13b configs. It is relative to the throughput from MySQL 8.4.8.Throughput with MySQL 9.7.0 is similar to 8.4.8. I am skeptical there is a regression for the scan test with the z13b config. I suspect that is noise.z13a    z13b0.99    0.99    range-covered-pk0.99    0.99    range-covered-si0.99    0.99    range-notcovered-pk0.98    0.98    range-notcovered-si1.00    0.96    scanResults: range queries with aggregationI describe performance changes (changes to relative QPS, rQPS) in terms of basis points. When rQPS decreases from 0.95 to 0.85 then it changed by 10 basis points.This shows the rQPS for MySQL 9.7.0 using both the z13a and z13b configs. It is relative to the throughput from MySQL 8.4.8.There might be small regressions in several tests with rQPS dropping by a few points but I will ignore that for now.There is a large improvement for the read-only-distinct test with the z13b config. The query for this test is select distinct c from sbtest where id between ? and ? order by c. The reason for the performance improvment is that the hypergraph optimizer chooses a better plan, see here.There is a large improvement for the read-only test with range=10000. This test uses the read-only version of the classic sysbench transaction (see here). One of the queries it runs is the query used by read-only-distinct. So it benefits from the better plan for that query. z13a    z13b0.97    0.97    read-only-count0.98    1.26    read-only-distinct0.96    0.95    read-only-order0.99    1.15    read-only_range=100000.97    1.00    read-only_range=1000.96    0.97    read-only_range=100.99    0.99    read-only-simple0.97    0.96    read-only-sumResults: writesI describe performance changes (changes to relative QPS, rQPS) in terms of basis points. When rQPS decreases from 0.95 to 0.85 then it changed by 10 basis points.This shows the rQPS for MySQL 9.7.0 using both the z13a and z13b configs. It is relative to the throughput from MySQL 8.4.8.There might be several small regressions here. I don&#039;t see obvious problems in the flamegraphs.z13a    z13b0.95    0.92    delete1.00    1.01    insert0.97    0.98    read-write_range=1000.96    0.95    read-write_range=100.97    0.96    update-index0.97    0.92    update-inlist0.95    0.93    update-nonindex0.95    0.92    update-one0.95    0.93    update-zipf0.97    0.95    write-only</p>
<p><a href="https://smalldatum.blogspot.com/2026/04/mysql-970-vs-sysbench-on-small-server.html">MySQL 9.7.0 vs sysbench on a small server</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>This has results from sysbench on a small server with MySQL 9.7.0 and 8.4.8. Sysbench is run with low concurrency (1 thread) and a cached database. The purpose is to search for changes in performance, often from new CPU overheads.</p>
<p>I tested MySQL 9.7.0 with and without the hypergraph optimizer enabled. I don&#8217;t expect it to help much because the queries run here are simple. I hope to learn it doesn&#8217;t hurt performance in that case.</p>
<p>tl;dr</p>
</p>
<ul>
<li>Throughput improves on two tests with the Hypergraph optimizer in 9.7.0 because they get better query plans.</li>
<li>One read-only test and several write-heavy tests have small regressions from 8.4.8 to 9.7.0. This might be from new CPU overheads but I don&#8217;t see obvious problems in the flamegraphs. </li>
</ul>
<div><b>Builds, configuration and hardware</b></div>
<div>
<div>
</p>
<div></div>
</p>
<div>I compiled MySQL from source for versions 8.4.8 and 9.7.0.</div>
</div>
<p>The server is an ASUS ExpertCenter PN53 with AMD Ryzen 7 7735HS, 32G RAM and an m.2 device for the database. More details on it <a href="https://smalldatum.blogspot.com/2022/10/small-servers-for-performance-testing-v4.html">are here</a>. The OS is Ubuntu 24.04 and the database filesystem is ext4 with discard enabled.</p>
<p>The my.cnf files os here for <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/my8406_rel_o2nofp/etc/my.cnf.cz12a_c8r32">8.4</a>. I call this the z12a configs and variants of it are used for MySQL 5.6 through 8.4.</p>
<p>For 9.7 I use two configs:</p>
</p>
<ul>
<li><a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/my97/etc/my.cnf.cz13a_c8r32">z13a</a></li>
<ul>
<li>This is as close as possible to z12a and <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/my97/etc/my.cnf.cz13a_c8r32#L76-L77">adds two options</a> to undo changes to the default values for two gtid-related options that arrived in 9.6. </li>
</ul>
<li><a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/my97/etc/my.cnf.cz13b_c8r32">z13b</a></li>
<ul>
<li>This is like z13a but then <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/my97/etc/my.cnf.cz13b_c8r32#L79">enables the hypergraph optimizer</a></li>
</ul>
</ul>
<p>All DBMS versions use the latin1 character set as <a href="https://smalldatum.blogspot.com/2026/03/selecting-character-set-for-mysql-and.html">explained here</a>.</p>
<p><b>Benchmark</b></p>
<div>
<div>I used sysbench and my usage is <a href="http://smalldatum.blogspot.com/2017/02/using-modern-sysbench-to-compare.html">explained here</a>. To save time I only run 32 of the 42 microbenchmarks and most test only 1 type of SQL statement. Benchmarks are run with the database cached by InnoDB.</div>
<div>The tests are run using 1 table with 50M rows. The read-heavy microbenchmarks run for 600 seconds and the write-heavy for 1800 seconds.</div>
</div>
</div>
<div></div>
<div>
<div><b>Results</b></div>
<div><span></p>
<div></div>
<div><span>The microbenchmarks are split into 4 groups &#8212; 1 for point queries, 2 for range queries, 1 for writes. For the range query microbenchmarks, part 1 has queries that don&#8217;t do aggregation while part 2 has queries that do aggregation. </span></div>
<div>I provide tables below with relative QPS. <span>When the relative QPS is &gt; 1 then </span><i>some version</i><span> is faster than the</span><span> </span><i>base version.</i><span> When it is &lt; 1 then there might be a regression.  </span><span>The relative QPS (<b>rQPS</b>) is:</span></div>
<div>
<div></div>
<blockquote><p>(QPS for some version) / (QPS for MySQL 8.4.8)<span> </span></p></blockquote>
<p><b>Results: point queries</b></p>
<div>
<div><span>I describe performance changes (changes to relative QPS, rQPS) in terms of basis points. Performance changes by one </span><i><b>basis point</b></i><span> when the difference in rQPS is 0.01. When rQPS decreases from 0.95 to 0.85 then it changed by 10 basis points.</span></div>
<div><span><br /></span></div>
<div><span>This shows the rQPS for MySQL 9.7.0 using both the z13a and z13b configs. It is relative to the throughput from MySQL 8.4.8.</span></div>
<div>
<ul>
<li>Throughput with MySQL 9.7.0 is similar to 8.4.8 except for point-query where there are regressions as rQPS drops by 5 and 7 basis points. The point-query test uses simple queries that fetch one column from one row by PK. From <a href="https://gist.github.com/mdcallag/bc910b227be30911a6f87d0dac3ec6d0#file-o-met-my8408plus-L17-L19">vmstat metrics</a> the CPU overhead per query for 9.7.0 is ~8% larger than for 8.4.8, with and without the hypergraph optimizer. I don&#8217;t see anything obvious in the flamegraphs.</li>
</ul>
</div>
</div>
<div><span>z13a    z13b</span></div>
<div><span></p>
<div><span>0.99    1.01    hot-points</span></div>
<div><span><span>0.95</span>    <span>0.93</span>    point-query</span></div>
<div><span>0.99    1.01    points-covered-pk</span></div>
<div><span>1.00    1.01    points-covered-si</span></div>
<div><span>0.98    1.00    points-notcovered-pk</span></div>
<div><span>0.99    1.01    points-notcovered-si</span></div>
<div><span>1.00    1.02    random-points_range=1000</span></div>
<div><span>0.99    1.01    random-points_range=100</span></div>
<div><span>0.96    1.00    random-points_range=10</span></div>
<div></div>
<p></span></div>
<div><b>Results: range queries without aggregation</b></div>
<div>
<div>
<div><span><br /></span></div>
<div><span>I describe performance changes (changes to relative QPS, rQPS) in terms of basis points. </span><span>When rQPS decreases from 0.95 to 0.85 then it changed by 10 basis points.</span></div>
</div>
<div><span><br /></span></div>
<div>This shows the rQPS for MySQL 9.7.0 using both the z13a and z13b configs. It is relative to the throughput from MySQL 8.4.8.</div>
<div>
<ul>
<li>Throughput with MySQL 9.7.0 is similar to 8.4.8. I am skeptical there is a regression for the scan test with the z13b config. I suspect that is noise.</li>
</ul>
</div>
<div><span>z13a    z13b</span></div>
<div>
<div><span>0.99    0.99    range-covered-pk</span></div>
<div><span>0.99    0.99    range-covered-si</span></div>
<div><span>0.99    0.99    range-notcovered-pk</span></div>
<div><span>0.98    0.98    range-notcovered-si</span></div>
<div><span>1.00    0.96    scan</span></div>
</div>
<div><b><br /></b></div>
<div><b>Results: range queries with aggregation</b></div>
<div>
<div>
<div><span><br /></span></div>
<div><span>I describe performance changes (changes to relative QPS, rQPS) in terms of basis points. </span><span>When rQPS decreases from 0.95 to 0.85 then it changed by 10 basis points.</span></div>
</div>
<div><span><br /></span></div>
<div>This shows the rQPS for MySQL 9.7.0 using both the z13a and z13b configs. It is relative to the throughput from MySQL 8.4.8.</div>
<div>
<ul>
<li>There might be small regressions in several tests with rQPS dropping by a few points but I will ignore that for now.</li>
<li>There is a large improvement for the read-only-distinct test with the z13b config. The query for this test is <i>select distinct c from sbtest where id between ? and ? order by c</i>. The reason for the performance improvment is that the hypergraph optimizer chooses a better plan, see <a href="https://gist.github.com/mdcallag/f532ef990d7f06df0338f431ad75147f">here</a>.</li>
<li>There is a large improvement for the read-only test with range=10000. This test uses the read-only version of the classic sysbench transaction (see <a href="https://github.com/mdcallag/mytools/blob/master/bench/sysbench.lua/lua/oltp_read_only.lua">here</a>). One of the queries it runs is the query used by read-only-distinct. So it benefits from the better plan for that query. </li>
</ul>
</div>
<div><span>z13a    z13b</span></div>
<div>
<div><span>0.97    0.97    read-only-count</span></div>
<div><span>0.98    <span>1.26</span>    read-only-distinct</span></div>
<div><span>0.96    0.95    read-only-order</span></div>
<div><span>0.99    <span>1.15</span>    read-only_range=10000</span></div>
<div><span>0.97    1.00    read-only_range=100</span></div>
<div><span>0.96    0.97    read-only_range=10</span></div>
<div><span>0.99    0.99    read-only-simple</span></div>
<div><span>0.97    0.96    read-only-sum</span></div>
</div>
<div><b><br /></b></div>
<div><b>Results: writes</b></div>
<div>
<div>
<div><span><br /></span></div>
<div><span>I describe performance changes (changes to relative QPS, rQPS) in terms of basis points. </span><span>When rQPS decreases from 0.95 to 0.85 then it changed by 10 basis points.</span></div>
</div>
<div><span><br /></span></div>
<div>This shows the rQPS for MySQL 9.7.0 using both the z13a and z13b configs. It is relative to the throughput from MySQL 8.4.8.</div>
<div>
<ul>
<li>There might be several small regressions here. I don&#8217;t see obvious problems in the flamegraphs.</li>
</ul>
</div>
<div>
<div><span>z13a    z13b</span></div>
<div><span><span>0.95</span>    <span>0.92</span>    delete</span></div>
<div><span>1.00    1.01    insert</span></div>
<div><span>0.97    0.98    read-write_range=100</span></div>
<div><span>0.96    0.95    read-write_range=10</span></div>
<div><span>0.97    0.96    update-index</span></div>
<div><span>0.97    <span>0.92</span>    update-inlist</span></div>
<div><span>0.95    <span>0.93</span>    update-nonindex</span></div>
<div><span>0.95    <span>0.92</span>    update-one</span></div>
<div><span>0.95    0.93    update-zipf</span></div>
<div><span>0.97    0.95    write-only</span></div>
</div>
</div>
</div>
</div>
</div>
<p></span></div>
</div>
<p><a href="https://smalldatum.blogspot.com/2026/04/mysql-970-vs-sysbench-on-small-server.html">MySQL 9.7.0 vs sysbench on a small server</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Sysbench vs MySQL on a small server: another way to view the regressions</title>
        <link>https://smalldatum.blogspot.com/2026/04/sysbench-vs-mysql-on-small-server-n.html</link>
        <pubDate>Thu, 09 Apr 2026 19:31:00 +0000</pubDate>
        <dc:creator>Mark Callaghan</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/sysbench-vs-mysql-on-a-small-server-another-way-to-view-the-regressions/</guid>
        <source url="https://smalldatum.blogspot.com/">Small Datum</source>
        <description><![CDATA[<p>This post provides another way to see the performance regressions in MySQL from versions 5.6 to 9.7. It complements what I shared in a recent post. The workload here is cached by InnoDB and my focus is on regressions from new CPU overheads. The good news is that there are few regressions after 8.0. The bad news is that there were many prior to that and these are unlikely to be undone.tl;drfor point queriesthere are large regressions from 5.6.51 to 5.7.44, 5.7.44 to 8.0.28 and 8.0.28 to 8.0.45there are few regressions from 8.0.45 to 8.4.8 to 9.7.0for range queries without aggregationthere are large regressions from 5.6.51 to 5.7.44 and 5.7.44 to 8.0.28there are mostly small regressions from 8.0.28 to 8.0.45, but scan has a large regressionthere are few regressions from 8.0.45 to 8.4.8 to 9.7.0for range queries with aggregationthere are large regressions from 5.6.51 to 5.7.44 with two improvementsthere are large regressions from 5.7.44 to 8.0.28there are small regressions from 8.0.28 to 8.0.45there are few regressions from 8.0.45 to 8.4.8 to 9.7.0for writesthere are large regressions from 5.6.51 to 5.7.44 and 5.7.44 to 8.0.28there are small regressions from 8.0.28 to 8.0.45there are few regressions from 8.0.45 to 8.4.8there are a few small regressions from 8.4.8 to 9.7.0Builds, configuration and hardwareI compiled MySQL from source for versions 5.6.51, 5.7.44, 8.0.28, 8.0.45, 8.4.8 and 9.7.0.The server is an ASUS ExpertCenter PN53 with AMD Ryzen 7 7735HS, 32G RAM and an m.2 device for the database. More details on it are here. The OS is Ubuntu 24.04 and the database filesystem is ext4 with discard enabled.The my.cnf files are here for 5.6, 5.7 and 8.4. I call these the z12a configs.For 9.7 I use the z13a config. It is as close as possible to z12a and adds two options for gtid-related features to undo a default config change that arrived in 9.6. All DBMS versions use the latin1 character set as explained here.BenchmarkI used sysbench and my usage is explained here. To save time I only run 32 of the 42 microbenchmarks and most test only 1 type of SQL statement. Benchmarks are run with the database cached by InnoDB.The tests are run using 1 table with 50M rows. The read-heavy microbenchmarks run for 600 seconds and the write-heavy for 1800 seconds.ResultsThe microbenchmarks are split into 4 groups -- 1 for point queries, 2 for range queries, 1 for writes. For the range query microbenchmarks, part 1 has queries that don't do aggregation while part 2 has queries that do aggregation. I provide tables below with relative QPS. When the relative QPS is &#62; 1 then some version is faster than the base version. When it is &#60; 1 then there might be a regression.  The relative QPS (rQPS) is:(QPS for some version) / (QPS for base version) Results: point queriesMySQL 5.6.51 gets from 1.18X to 1.61X more QPS than 9.7.0 on point queries. It is easier for me to write about this in terms of relative QPS (rQPS) which is as low as 0.62 for MySQL 9.7.0 vs 5.6.51. I define a basis point to mean a change of 0.01 in rQPS.Summary:from 5.6.51 to 9.7.0the median regression is a drop in rQPS of 27 basis pointsfrom 5.6.51 to 5.7.44the median regression is a drop in rQPS of 11 basis pointsfrom 5.7.44 to 8.0.28the median regression is a drop in rQPS of 25 basis pointsfrom 8.0.28 to 8.0.457 of 9 tests get more QPS with 8.0.452 tests have regressions where rQPS drops by ~6 basis pointsfrom 8.0.45 to 8.4.8there are few regressionsfrom 8.4.8 to 9.7.0there are few regressionsThis has (QPS for 9.7.0) / (QPS for 5.6.51) and is followed by tables that show the difference between the latest point release in adjacent versions.the largest regression is an rQPS drop of 38 basis points for point-query. Compared to most of the other tests in this section, this query does less work in the storage engine which implies the regression is from code above the storage engine.the smallest regression is an rQPS drop of 15 basis points for random-points_range=1000. The regression for the same query with a shorter range (=10, =100) is larger. That implies, at least for this query, that the regression is for something above the storage engine (optimizer, parser, etc).the median regression is an rQPS drop of 27 basis points0.65    hot-points0.62    point-query0.72    points-covered-pk0.78    points-covered-si0.73    points-notcovered-pk0.76    points-notcovered-si0.85    random-points_range=10000.73    random-points_range=1000.66    random-points_range=10This has: (QPS for 5.7.44) / (QPS for 5.6.51)the largest regression is an rQPS drop of 14 basis points for hot-points.the next largest regression is an rQPS drop of 13 basis points for random-points with range=10. The regressions for that query are smaller when a larger range is used =100, =1000 and this implies the problem is above the storage engine. the median regression is an rQPS drop of 11 basis points0.86    hot-points0.90    point-query0.89    points-covered-pk0.90    points-covered-si0.89    points-notcovered-pk0.88    points-notcovered-si1.00    random-points_range=10000.89    random-points_range=1000.87    random-points_range=10This has: (QPS for 8.0.28) / (QPS for 5.7.44)the largest regression is an rQPS drop of 66 basis points for random-points with range=1000. The regression for that same query with smaller ranges (=10, =100) is smaller. This implies the problem is in the storage engine.the second largest regression is an rQPS drop of 35 basis points for hot-pointsthe median regression is an rQPS drop of 25 basis points0.65    hot-points0.82    point-query0.74    points-covered-pk0.75    points-covered-si0.76    points-notcovered-pk0.84    points-notcovered-si0.34    random-points_range=10000.75    random-points_range=1000.86    random-points_range=10This has: (QPS for 8.0.45) / (QPS for 8.0.28)at last, there are many improvements. Some are from a fix for bug 102037 which I found with help from sysbenchthe regressions, with rQPS drops by ~6 basis points, are for queries that do less work in the storage engine relative to the other tests in this section1.20    hot-points0.93    point-query1.13    points-covered-pk1.19    points-covered-si1.09    points-notcovered-pk1.04    points-notcovered-si2.48    random-points_range=10001.12    random-points_range=1000.94    random-points_range=10This has: (QPS for 8.4.8) / (QPS for 8.0.45)there are few regressions from 8.0.45 to 8.4.80.99    hot-points0.96    point-query0.99    points-covered-pk0.98    points-covered-si1.00    points-notcovered-pk0.99    points-notcovered-si1.00    random-points_range=10001.00    random-points_range=1000.98    random-points_range=10This has: (QPS for 9.7.0) / (QPS for 8.4.8)there are few regressions from 8.4.8 to 9.7.00.99    hot-points0.95    point-query0.99    points-covered-pk1.00    points-covered-si0.98    points-notcovered-pk0.99    points-notcovered-si1.00    random-points_range=10000.99    random-points_range=1000.96    random-points_range=10Results: range queries without aggregationMySQL 5.6.51 gets from 1.35X to 1.52X more QPS than 9.7.0 on range queries without aggregation. It is easier for me to write about this in terms of relative QPS (rQPS) which is as low as 0.66 for MySQL 9.7.0 vs 5.6.51. I define a basis point to mean a change of 0.01 in rQPS.Summary:from 5.6.51 to 9.7.0the median regression is drop in rQPS of 33 basis pointsfrom 5.6.51 to 5.7.44the median regression is a drop in rQPS of 16 basis pointsfrom 5.7.44 to 8.0.28the median regression is a drop in rQPS ~10 basis pointsfrom 8.0.28 to 8.0.45the median regression is a drop in rQPS of 5 basis pointsfrom 8.0.45 to 8.4.8there are few regressions from 8.0.45 to 8.4.8from 8.4.8 to 9.7.0there are few regressions from 8.4.8 to 9.7.0This has (QPS for 9.7.0) / (QPS for 5.6.51) and is followed by tables that show the difference between the latest point release in adjacent versions.all tests have large regressions with an rQPS drop that ranges from 26 to 34 basis pointsthe median regression is an rQPS drop of 33 basis points0.66    range-covered-pk0.67    range-covered-si0.66    range-notcovered-pk0.74    range-notcovered-si0.67    scanThis has: (QPS for 5.7.44) / (QPS for 5.6.51)all tests have large regressions with an rQPS drop that ranges from 12 to 17 basis pointsthe median regression is an rQPS drop of 16 basis points0.85    range-covered-pk0.84    range-covered-si0.84    range-notcovered-pk0.88    range-notcovered-si0.83    scanThis has: (QPS for 8.0.28) / (QPS for 5.7.44)4 of 5 tests have regressions with an rQPS drop that ranges from 10 to 14 basis pointsthe median regression is ~10 basis pointsrQPS improves for the scan test0.86    range-covered-pk0.89    range-covered-si0.90    range-notcovered-pk0.90    range-notcovered-si1.04    scanThis has: (QPS for 8.0.45) / (QPS for 8.0.28)all tests are slower in 8.0.45 than 8.0.28, but the regression for 3 of 5 is</p>
<p><a href="https://smalldatum.blogspot.com/2026/04/sysbench-vs-mysql-on-small-server-n.html">Sysbench vs MySQL on a small server: another way to view the regressions</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>This post provides another way to see the performance regressions in MySQL from versions 5.6 to 9.7. It complements what I shared in a <a href="https://smalldatum.blogspot.com/2026/03/sysbench-vs-mysql-on-small-server-no.html">recent post</a>. The workload here is cached by InnoDB and my focus is on regressions from new CPU overheads. </p>
<p>The good news is that there are few regressions after 8.0. The bad news is that there were many prior to that and these are unlikely to be undone.</p>
</p>
<ul></ul>
</p>
<p>tl;dr</p>
</p>
<ul>
<li>for point queries</li>
<ul>
<li>there are large regressions from 5.6.51 to 5.7.44, 5.7.44 to 8.0.28 and 8.0.28 to 8.0.45</li>
<li>there are few regressions from 8.0.45 to 8.4.8 to 9.7.0</li>
</ul>
<li>for range queries without aggregation</li>
<ul>
<li>there are large regressions from 5.6.51 to 5.7.44 and 5.7.44 to 8.0.28</li>
<li>there are mostly small regressions from 8.0.28 to 8.0.45, but scan has a large regression</li>
<li>there are few regressions from 8.0.45 to 8.4.8 to 9.7.0</li>
</ul>
<li>for range queries with aggregation</li>
<ul>
<li>there are large regressions from 5.6.51 to 5.7.44 with two improvements</li>
<li>there are large regressions from 5.7.44 to 8.0.28</li>
<li>there are small regressions from 8.0.28 to 8.0.45</li>
<li>there are few regressions from 8.0.45 to 8.4.8 to 9.7.0</li>
</ul>
<li>for writes</li>
<ul>
<li>there are large regressions from 5.6.51 to 5.7.44 and 5.7.44 to 8.0.28</li>
<li>there are small regressions from 8.0.28 to 8.0.45</li>
<li>there are few regressions from 8.0.45 to 8.4.8</li>
<li>there are a few small regressions from 8.4.8 to 9.7.0</li>
</ul>
</ul>
<div><b>Builds, configuration and hardware</b></div>
<div>
<div>
</p>
<div></div>
</p>
<div>I compiled MySQL from source for versions 5.6.51, 5.7.44, 8.0.28, 8.0.45, 8.4.8 and 9.7.0.</div>
</div>
<p>The server is an ASUS ExpertCenter PN53 with AMD Ryzen 7 7735HS, 32G RAM and an m.2 device for the database. More details on it <a href="https://smalldatum.blogspot.com/2022/10/small-servers-for-performance-testing-v4.html">are here</a>. The OS is Ubuntu 24.04 and the database filesystem is ext4 with discard enabled.</p>
<p>The my.cnf files are here for <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/my5651_rel_o2nofp/etc/my.cnf.cz12a_c8r32">5.6</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/my5744_rel_o2nofp/etc/my.cnf.cz12a_c8r32">5.7</a> and <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/my8406_rel_o2nofp/etc/my.cnf.cz12a_c8r32">8.4</a>. I call these the z12a configs.</p>
<p>For 9.7 I use the <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/my97/etc/my.cnf.cz13a_c8r32">z13a</a> config. It is as close as possible to z12a and <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/my97/etc/my.cnf.cz13a_c8r32#L76-L77">adds two options</a> for gtid-related features to undo a default config change that arrived in 9.6. </p>
<p>All DBMS versions use the latin1 character set as <a href="https://smalldatum.blogspot.com/2026/03/selecting-character-set-for-mysql-and.html">explained here</a>.</p>
<p><b>Benchmark</b></p>
<div>
<div>I used sysbench and my usage is <a href="http://smalldatum.blogspot.com/2017/02/using-modern-sysbench-to-compare.html">explained here</a>. To save time I only run 32 of the 42 microbenchmarks and most test only 1 type of SQL statement. Benchmarks are run with the database cached by InnoDB.</div>
<div>The tests are run using 1 table with 50M rows. The read-heavy microbenchmarks run for 600 seconds and the write-heavy for 1800 seconds.</div>
</div>
</div>
<div></div>
<div>
<div><b>Results</b></div>
<div><span></p>
<div></div>
<div><span>The microbenchmarks are split into 4 groups &#8212; 1 for point queries, 2 for range queries, 1 for writes. For the range query microbenchmarks, part 1 has queries that don&#8217;t do aggregation while part 2 has queries that do aggregation. </span></div>
<div>I provide tables below with relative QPS. <span>When the relative QPS is &gt; 1 then </span><i>some version</i><span> is faster than the</span><span> </span><i>base version.</i><span> When it is &lt; 1 then there might be a regression.  </span><span>The relative QPS (<b>rQPS</b>) is:</span></div>
<div>
<div></div>
<blockquote><p>(QPS for some version) / (QPS for base version)<span> </span></p></blockquote>
</div>
<div><b>Results: point queries</b></div>
<div>
<div></div>
<div><span>MySQL 5.6.51 gets from 1.18X to 1.61X more QPS than 9.7.0 on point queries. It is easier for me to write about this in terms of relative QPS (rQPS) which is as low as 0.62 for MySQL 9.7.0 vs 5.6.51. I define a <i><b>basis point</b></i> to mean a change of 0.01 in rQPS.</span></div>
<div><span><br /></span></div>
<div><span>Summary:</span></div>
<div>
<ul>
<li><span>from 5.6.51 to 9.7.0</span></li>
<ul>
<li><span>the median regression is a drop in rQPS of 27 basis points</span></li>
</ul>
<li><span>from 5.6.51 to 5.7.44</span></li>
<ul>
<li>the median regression is a drop in rQPS of 11 basis points</li>
</ul>
<li><span>from 5.7.44 to 8.0.28</span></li>
<ul>
<li>the median regression is a drop in rQPS of 25 basis points</li>
</ul>
<li><span>from 8.0.28 to 8.0.45</span></li>
<ul>
<li>7 of 9 tests get more QPS with 8.0.45</li>
<li>2 tests have regressions where rQPS drops by ~6 basis points</li>
</ul>
<li><span>from 8.0.45 to 8.4.8</span></li>
<ul>
<li>there are few regressions</li>
</ul>
<li><span>from 8.4.8 to 9.7.0</span></li>
<ul>
<li>there are few regressions</li>
</ul>
</ul>
</div>
<div>
<div>
<div>This has (QPS for 9.7.0) / (QPS for 5.6.51) and is followed by tables that show the difference between the latest point release in adjacent versions.</div>
<div>
<ul>
<li>the largest regression is an rQPS drop of 38 basis points for point-query. Compared to most of the other tests in this section, this query does less work in the storage engine which implies the regression is from code above the storage engine.</li>
<li>the smallest regression is an rQPS drop of 15 basis points for random-points_range=1000. The regression for the same query with a shorter range (=10, =100) is larger. That implies, at least for this query, that the regression is for something above the storage engine (optimizer, parser, etc).</li>
<li>the median regression is an rQPS drop of 27 basis points</li>
</ul>
</div>
<div>
<div><span>0.65    hot-points</span></div>
<div><span><span>0.62</span>    point-query</span></div>
<div><span>0.72    points-covered-pk</span></div>
<div><span>0.78    points-covered-si</span></div>
<div><span>0.73    points-notcovered-pk</span></div>
<div><span>0.76    points-notcovered-si</span></div>
<div><span><span>0.85</span>    random-points_range=1000</span></div>
<div><span>0.73    random-points_range=100</span></div>
<div><span><span>0.66</span>    random-points_range=10</span></div>
</div>
<div></div>
</div>
<div>This has: (QPS for 5.7.44) / (QPS for 5.6.51)</div>
<div>
<ul>
<li>the largest regression is an rQPS drop of 14 basis points for hot-points.</li>
<li>the next largest regression is an rQPS drop of 13 basis points for random-points with range=10. The regressions for that query are smaller when a larger range is used =100, =1000 and this implies the problem is above the storage engine. </li>
<li>the median regression is an rQPS drop of 11 basis points</li>
</ul>
</div>
<div>
<div><span><span>0.86</span>    hot-points</span></div>
<div><span>0.90    point-query</span></div>
<div><span>0.89    points-covered-pk</span></div>
<div><span>0.90    points-covered-si</span></div>
<div><span>0.89    points-notcovered-pk</span></div>
<div><span>0.88    points-notcovered-si</span></div>
<div><span><span>1.00</span>    random-points_range=1000</span></div>
<div><span>0.89    random-points_range=100</span></div>
<div><span><span>0.87</span>    random-points_range=10</span></div>
</div>
<div></div>
<div>This has: (QPS for 8.0.28) / (QPS for 5.7.44)</div>
<div>
<ul>
<li>the largest regression is an rQPS drop of 66 basis points for random-points with range=1000. The regression for that same query with smaller ranges (=10, =100) is smaller. This implies the problem is in the storage engine.</li>
<li>the second largest regression is an rQPS drop of 35 basis points for hot-points</li>
<li>the median regression is an rQPS drop of 25 basis points</li>
</ul>
</div>
<div>
<div><span><span>0.65</span>    hot-points</span></div>
<div><span>0.82    point-query</span></div>
<div><span>0.74    points-covered-pk</span></div>
<div><span>0.75    points-covered-si</span></div>
<div><span>0.76    points-notcovered-pk</span></div>
<div><span>0.84    points-notcovered-si</span></div>
<div><span><span>0.34</span>    random-points_range=1000</span></div>
<div><span>0.75    random-points_range=100</span></div>
<div><span><span>0.86</span>    random-points_range=10</span></div>
</div>
<div></div>
<div>This has: (QPS for 8.0.45) / (QPS for 8.0.28)</div>
<div>
<ul>
<li>at last, there are many improvements. Some are from a fix for <a href="https://bugs.mysql.com/bug.php?id=102037">bug 102037</a> which I found with help from sysbench</li>
<li>the regressions, with rQPS drops by ~6 basis points, are for queries that do less work in the storage engine relative to the other tests in this section</li>
</ul>
</div>
<div>
<div><span><span>1.20</span>    hot-points</span></div>
<div><span><span>0.93</span>    point-query</span></div>
<div><span><span>1.13</span>    points-covered-pk</span></div>
<div><span><span>1.19</span>    points-covered-si</span></div>
<div><span><span>1.09</span>    points-notcovered-pk</span></div>
<div><span><span>1.04</span>    points-notcovered-si</span></div>
<div><span><span>2.48</span>    random-points_range=1000</span></div>
<div><span><span>1.12</span>    random-points_range=100</span></div>
<div><span><span>0.94</span>    random-points_range=10</span></div>
<div></div>
<div>This has: (QPS for 8.4.8) / (QPS for 8.0.45)</div>
<div>
<ul>
<li>there are few regressions from 8.0.45 to 8.4.8</li>
</ul>
</div>
</div>
<div>
<div><span>0.99    hot-points</span></div>
<div><span>0.96    point-query</span></div>
<div><span>0.99    points-covered-pk</span></div>
<div><span>0.98    points-covered-si</span></div>
<div><span>1.00    points-notcovered-pk</span></div>
<div><span>0.99    points-notcovered-si</span></div>
<div><span>1.00    random-points_range=1000</span></div>
<div><span>1.00    random-points_range=100</span></div>
<div><span>0.98    random-points_range=10</span></div>
</div>
<div></div>
<div><span>This has: (QPS for 9.7.0) / (QPS for 8.4.8)</span></div>
<div>
<ul>
<li>there are few regressions from 8.4.8 to 9.7.0</li>
</ul>
</div>
<div><span><span>0.99    hot-points</span></span></div>
<div><span><span></p>
<div>0.95    point-query</div>
<div>0.99    points-covered-pk</div>
<div>1.00    points-covered-si</div>
<div>0.98    points-notcovered-pk</div>
<div>0.99    points-notcovered-si</div>
<div>1.00    random-points_range=1000</div>
<div>0.99    random-points_range=100</div>
<div>0.96    random-points_range=10</div>
<p></span></span></div>
</div>
<div></div>
<div>
<div><b>Results: range queries without aggregation</b></div>
<div></div>
<div>MySQL 5.6.51 gets from 1.35X to 1.52X more QPS than 9.7.0 on range queries without aggregation. It is easier for me to write about this in terms of relative QPS (rQPS) which is as low as 0.66 for MySQL 9.7.0 vs 5.6.51. I define a <i><b>basis point</b></i> to mean a change of 0.01 in rQPS.</div>
<div></p>
<div><span>Summary:</span></div>
<div>
<ul>
<li><span>from 5.6.51 to 9.7.0</span></li>
<ul>
<li>the median regression is drop in rQPS of 33 basis points</li>
</ul>
<li><span>from 5.6.51 to 5.7.44</span></li>
<ul>
<li>the median regression is a drop in rQPS of 16 basis points</li>
</ul>
<li><span>from 5.7.44 to 8.0.28</span></li>
<ul>
<li>the median regression is a drop in rQPS ~10 basis points</li>
</ul>
<li><span>from 8.0.28 to 8.0.45</span></li>
<ul>
<li>the median regression is a drop in rQPS of 5 basis points</li>
</ul>
<li><span>from 8.0.45 to 8.4.8</span></li>
<ul>
<li>there are few regressions from 8.0.45 to 8.4.8</li>
</ul>
<li><span>from 8.4.8 to 9.7.0</span></li>
<ul>
<li>there are few regressions from 8.4.8 to 9.7.0</li>
</ul>
</ul>
</div>
</div>
<div><span>This has (QPS for 9.7.0) / (QPS for 5.6.51) and is followed by tables that show the difference between the latest point release in adjacent versions.</span></div>
<div>
<ul>
<li>all tests have large regressions with an rQPS drop that ranges from 26 to 34 basis points</li>
<li>the median regression is an rQPS drop of 33 basis points</li>
</ul>
</div>
<div><span>0.66</span><span>    range-covered-pk</span></div>
<div>
<div><span><span>0.67</span>    range-covered-si</span></div>
<div><span><span>0.66</span>    range-notcovered-pk</span></div>
<div><span><span>0.74</span>    range-notcovered-si</span></div>
<div><span><span>0.67</span>    scan</span></div>
</div>
<div></div>
<div>This has: (QPS for 5.7.44) / (QPS for 5.6.51)</div>
<div>
<ul>
<li>all tests have large regressions with an rQPS drop that ranges from 12 to 17 basis points</li>
<li>the median regression is an rQPS drop of 16 basis points</li>
</ul>
</div>
<div>
<div><span><span>0.85    range-covered-pk</span></span></div>
<div><span><span>0.84    range-covered-si</span></span></div>
<div><span><span>0.84    range-notcovered-pk</span></span></div>
<div><span><span>0.88</span><span>    range-notcovered-si</span></span></div>
<div><span><span>0.83</span><span>    scan</span></span></div>
</div>
<div></div>
<div>This has: (QPS for 8.0.28) / (QPS for 5.7.44)</div>
<div>
<ul>
<li>4 of 5 tests have regressions with an rQPS drop that ranges from 10 to 14 basis points</li>
<li>the median regression is ~10 basis points</li>
<li>rQPS improves for the scan test</li>
</ul>
</div>
<div><span><span>0.86</span>    range-covered-pk</span></div>
<div>
<div><span>0.89    range-covered-si</span></div>
<div><span>0.90    range-notcovered-pk</span></div>
<div><span>0.90    range-notcovered-si</span></div>
<div><span><span>1.04</span>    scan</span></div>
</div>
<div></div>
<div>This has: (QPS for 8.0.45) / (QPS for 8.0.28)</div>
<div>
<ul>
<li>all tests are slower in 8.0.45 than 8.0.28, but the regression for 3 of 5 is &lt;= 5 basis points</li>
<li>rQPS in the scan test drops by 21 basis points</li>
<li>the median regression is an rQPS drop of 5 basis points</li>
</ul>
</div>
<div>
<div><span>0.96    range-covered-pk</span></div>
<div><span>0.95    range-covered-si</span></div>
<div><span><span>0.91</span>    range-notcovered-pk</span></div>
<div><span>0.96    range-notcovered-si</span></div>
<div><span><span>0.79</span>    scan</span></div>
</div>
<div></div>
<div>This has: (QPS for 8.4.8) / (QPS for 8.0.45)</div>
<div>
<ul>
<li>there are few regressions from 8.0.45 to 8.4.8</li>
</ul>
</div>
<div><span>0.95    range-covered-pk</span></div>
<div>
<div><span>0.95    range-covered-si</span></div>
<div><span>0.98    range-notcovered-pk</span></div>
<div><span>0.99    range-notcovered-si</span></div>
<div><span>0.98    scan</span></div>
</div>
<div></div>
<div>This has: (QPS for 9.7.0) / (QPS for 8.4.8)</div>
<div>
<ul>
<li>there are few regressions from 8.4.8 to 9.7.0</li>
</ul>
</div>
<div><span>0.99    range-covered-pk</span></div>
<div>
<div><span>0.99    range-covered-si</span></div>
<div><span>0.99    range-notcovered-pk</span></div>
<div><span>0.98    range-notcovered-si</span></div>
<div><span>1.00    scan</span></div>
</div>
<div></div>
</div>
<div>
<div><b>Results: range queries with aggregation</b></div>
<div></div>
<div>
<div>
<div><span>Summary:</span></div>
<div>
<ul>
<li><span>from 5.6.51 to 9.7.0 rQPS</span></li>
<ul>
<li>the median result is a drop in rQPS of ~30 basis points</li>
</ul>
<li><span>from 5.6.51 to 5.7.44</span></li>
<ul>
<li>the median result is a drop in rQPS of ~10 basis points</li>
</ul>
<li><span>from 5.7.44 to 8.0.28</span></li>
<ul>
<li>the median result is a drop in rQPS of ~12 basis points</li>
</ul>
<li><span>from 8.0.28 to 8.0.45</span></li>
<ul>
<li>the median result is an rQPS drop of 5 basis points</li>
</ul>
<li><span>from 8.0.45 to 8.4.8</span></li>
<ul>
<li><span>there are few regressions from 8.0.45 to 8.4.8</span></li>
</ul>
<li><span>from 8.4.8 to 9.7.0</span></li>
<ul>
<li><span>there are few regressions from 8.4.8 to 9.7.0</span></li>
</ul>
</ul>
</div>
</div>
<div>This has (QPS for 9.7.0) / (QPS for 5.6.51) and is followed by tables that show the difference between the latest point release in adjacent versions.</div>
<div>
<ul>
<li>the median result is a drop in rQPS of ~30 basis points</li>
<li>rQPS for the read-only-distinct test improves by 25 basis point</li>
</ul>
</div>
<div>
<div><span>0.67    read-only-count</span></div>
<div><span><span>1.25</span>    read-only-distinct</span></div>
<div><span>0.75    read-only-order</span></div>
<div><span>1.02    read-only_range=10000</span></div>
<div><span>0.74    read-only_range=100</span></div>
<div><span>0.66    read-only_range=10</span></div>
<div><span>0.69    read-only-simple</span></div>
<div><span><span>0.66</span>    read-only-sum</span></div>
</div>
<div></div>
<div>This has: (QPS for 5.7.44) / (QPS for 5.6.51)</div>
<div>
<ul>
<li>the median result is an rQPS drop of ~10 basis points</li>
<li>rQPS improves by 45 basis points for read-only-distinct and by 23 basis points for read-only with the largest range (=10000)</li>
</ul>
</div>
<div><span>0.86    read-only-count</span></div>
<div>
<div><span><span>1.45</span>    read-only-distinct</span></div>
<div><span>0.93    read-only-order</span></div>
<div><span><span>1.23</span>    read-only_range=10000</span></div>
<div><span>0.96    read-only_range=100</span></div>
<div><span>0.88    read-only_range=10</span></div>
<div><span><span>0.85</span>    read-only-simple</span></div>
<div><span>0.86    read-only-sum</span></div>
</div>
<div></div>
<div>This has: (QPS for 8.0.28) / (QPS for 5.7.44)</div>
<div>
<ul>
<li>the median result is an rQPS drop of ~12 basis points</li>
</ul>
</div>
<div>
<div><span>0.91    read-only-count</span></div>
<div><span><span>0.94</span>    read-only-distinct</span></div>
<div><span>0.89    read-only-order</span></div>
<div><span><span>0.86</span>    read-only_range=10000</span></div>
<div><span>0.87    read-only_range=100</span></div>
<div><span><span>0.85</span>    read-only_range=10</span></div>
<div><span>0.90    read-only-simple</span></div>
<div><span>0.87    read-only-sum</span></div>
</div>
<div></div>
<div>This has: (QPS for 8.0.45) / (QPS for 8.0.28)</div>
<div>
<ul>
<li>the median result is an rQPS drop of 5 basis points</li>
</ul>
</div>
<div>
<div><span><span>0.89</span>    read-only-count</span></div>
<div><span>0.95    read-only-distinct</span></div>
<div><span>0.95    read-only-order</span></div>
<div><span><span>0.97</span>    read-only_range=10000</span></div>
<div><span>0.94    read-only_range=100</span></div>
<div><span>0.95    read-only_range=10</span></div>
<div><span>0.93    read-only-simple</span></div>
<div><span>0.93    read-only-sum</span></div>
</div>
<div></div>
<div>This has: (QPS for 8.4.8) / (QPS for 8.0.45)</div>
<div>
<ul>
<li>there are few regressions from 8.0.45 to 8.4.8</li>
</ul>
</div>
<div>
<div><span>0.99    read-only-count</span></div>
<div><span>0.98    read-only-distinct</span></div>
<div><span>0.99    read-only-order</span></div>
<div><span>1.00    read-only_range=10000</span></div>
<div><span>0.98    read-only_range=100</span></div>
<div><span>0.97    read-only_range=10</span></div>
<div><span>0.97    read-only-simple</span></div>
<div><span>0.98    read-only-sum</span></div>
</div>
<div></div>
<div>This has: (QPS for 9.7.0) / (QPS for 8.4.8)</div>
<div>
<ul>
<li><span>there are few regressions from 8.4.8 to 9.7.0</span></li>
</ul>
<div>
<div><span>0.97    read-only-count</span></div>
<div><span>0.98    read-only-distinct</span></div>
<div><span>0.96    read-only-order</span></div>
<div><span>0.99    read-only_range=10000</span></div>
<div><span>0.97    read-only_range=100</span></div>
<div><span>0.96    read-only_range=10</span></div>
<div><span>0.99    read-only-simple</span></div>
<div><span>0.97    read-only-sum</span></div>
</div>
</div>
</div>
<div></div>
<div>
<div><b>Results: writes</b></div>
<div></div>
<div>
<div>
<div><span>Summary:</span></div>
<div>
<ul>
<li><span>from 5.6.51 to 9.7.0 rQPS </span></li>
<ul>
<li><span>the median result is a drop in rQPS of ~33 basis points</span></li>
</ul>
<li><span>from 5.6.51 to 5.7.44</span></li>
<ul>
<li>the median result is an rQPS drop of ~13 basis points</li>
</ul>
<li><span>from 5.7.44 to 8.0.28</span></li>
<ul>
<li>the median result is an rQPS drop of ~18 basis points</li>
</ul>
<li><span>from 8.0.28 to 8.0.45</span></li>
<ul>
<li>the median result is an rQPS drop of 9 basis points</li>
</ul>
<li><span>from 8.0.45 to 8.4.8</span></li>
<ul>
<li>there are few regressions from 8.0.45 to 8.4.8</li>
</ul>
<li><span>from 8.4.8 to 9.7.0</span></li>
<ul>
<li>the median result is an rQPS drop of 4 basis points</li>
</ul>
</ul>
</div>
</div>
<div><span>This has (QPS for 9.7.0) / (QPS for 5.6.51) and is followed by tables that show the difference between the latest point release in adjacent versions.</span></div>
<div>
<ul>
<li><span>the median result is an rQPS drop of ~33 basis points</span></li>
</ul>
</div>
<div><span>0.56    delete</span></div>
<div>
<div><span><span>0.54</span>    insert</span></div>
<div><span>0.72    read-write_range=100</span></div>
<div><span>0.66    read-write_range=10</span></div>
<div><span><span>0.88</span>    update-index</span></div>
<div><span>0.74    update-inlist</span></div>
<div><span>0.60    update-nonindex</span></div>
<div><span>0.58    update-one</span></div>
<div><span>0.60    update-zipf</span></div>
<div><span>0.67    write-only</span></div>
</div>
<div></div>
<div>This has: (QPS for 5.7.44) / (QPS for 5.6.51)</div>
<div>
<ul>
<li>the median result is an rQPS drop of ~13 basis points</li>
<li>rQPS improves by 21 basis points for update-index and by 5 basis points for update-inlist</li>
</ul>
</div>
<div>
<div><span>0.82    delete</span></div>
<div><span><span>0.80</span>    insert</span></div>
<div><span>0.94    read-write_range=100</span></div>
<div><span>0.88    read-write_range=10</span></div>
<div><span><span>1.21</span>    update-index</span></div>
<div><span>1.05    update-inlist</span></div>
<div><span>0.86    update-nonindex</span></div>
<div><span>0.85    update-one</span></div>
<div><span>0.86    update-zipf</span></div>
<div><span>0.94    write-only</span></div>
</div>
<div></div>
<div>This has: (QPS for 8.0.28) / (QPS for 5.7.44)</div>
<div>
<ul>
<li>the median result is an rQPS drop of ~18 basis points</li>
</ul>
</div>
<div>
<div><span>0.80    delete</span></div>
<div><span><span>0.77</span>    insert</span></div>
<div><span>0.87    read-write_range=100</span></div>
<div><span>0.85    read-write_range=10</span></div>
<div><span><span>0.94</span>    update-index</span></div>
<div><span>0.79    update-inlist</span></div>
<div><span>0.81    update-nonindex</span></div>
<div><span>0.80    update-one</span></div>
<div><span>0.81    update-zipf</span></div>
<div><span>0.83    write-only</span></div>
</div>
<div></div>
<div>This has: (QPS for 8.0.45) / (QPS for 8.0.28)</div>
<div>
<ul>
<li>the median result is an rQPS drop of 9 basis points</li>
</ul>
</div>
<div>
<div><span>0.91    delete</span></div>
<div><span>0.90    insert</span></div>
<div><span><span>0.94</span>    read-write_range=100</span></div>
<div><span><span>0.94</span>    read-write_range=10</span></div>
<div><span><span>0.80</span>    update-index</span></div>
<div><span>0.92    update-inlist</span></div>
<div><span>0.91    update-nonindex</span></div>
<div><span>0.92    update-one</span></div>
<div><span>0.91    update-zipf</span></div>
<div><span>0.89    write-only</span></div>
</div>
<div></div>
<div>This has: (QPS for 8.4.8) / (QPS for 8.0.45)</div>
<div>
<ul>
<li>there are few regressions from 8.0.45 to 8.4.8</li>
</ul>
</div>
<div>
<div><span>0.98    delete</span></div>
<div><span>0.98    insert</span></div>
<div><span>0.98    read-write_range=100</span></div>
<div><span>0.98    read-write_range=10</span></div>
<div><span>0.99    update-index</span></div>
<div><span>0.99    update-inlist</span></div>
<div><span>0.99    update-nonindex</span></div>
<div><span>0.99    update-one</span></div>
<div><span>0.99    update-zipf</span></div>
<div><span>0.99    write-only</span></div>
</div>
<div></div>
<div>This has: (QPS for 9.7.0) / (QPS for 8.4.8)</div>
<div>
<ul>
<li>the median result is an rQPS drop of 4 basis points</li>
</ul>
<div>
<div><span><span>0.95</span>    delete</span></div>
<div><span>1.00    insert</span></div>
<div><span>0.97    read-write_range=100</span></div>
<div><span>0.96    read-write_range=10</span></div>
<div><span>0.97    update-index</span></div>
<div><span>0.97    update-inlist</span></div>
<div><span><span>0.95</span>    update-nonindex</span></div>
<div><span><span>0.95</span>    update-one</span></div>
<div><span><span>0.95</span>    update-zipf</span></div>
<div><span>0.97    write-only</span></div>
</div>
<div></div>
</div>
</div>
</div>
</div>
</div>
<p></span></div>
</div>
<p><a href="https://smalldatum.blogspot.com/2026/04/sysbench-vs-mysql-on-small-server-n.html">Sysbench vs MySQL on a small server: another way to view the regressions</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>The Insert Benchmark vs MariaDB 10.2 to 13.0 on a 32-core server</title>
        <link>https://smalldatum.blogspot.com/2026/04/the-insert-benchmark-vs-mariadb-102-to_8.html</link>
        <pubDate>Wed, 08 Apr 2026 21:41:00 +0000</pubDate>
        <dc:creator>Mark Callaghan</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/the-insert-benchmark-vs-mariadb-10-2-to-13-0-on-a-32-core-server/</guid>
        <source url="https://smalldatum.blogspot.com/">Small Datum</source>
        <description><![CDATA[<p>This has results for MariaDB versions 10.2 through 13.0 vs the Insert Benchmark on a 32-core server. The goal is to see how performance changes over time to find regressions or highlight improvements. My previous post has results from a 24-core server.  Differences between these servers include:RAM - 32-core server has 128G, 24-core server has 64Gfsync latency - 32-core has an SSD with high fsync latency, while it is fast on the 24-core serversockets - 32-core server has 1 CPU socket, 24-core server has twoCPU maker  - 32-core server uses an AMD Threadripper, 24-core server has an Intel Xeoncores - obviously it is 32 vs 24, Intel HT and AMD SMT are disabledThe results here for modern MariaDB are great for the CPU-bound workload but not for the IO-bound workload.. They were great for both on the 24-core server. The regressions are likely caused by the extra fsync calls that are done because the equivalent of equivalent of innodb_flush_method =O_DIRECT_NO_FSYNC was lost with the new options that replace innodb_flush_method starting in MariaDB 11.4. I created MDEV-33545 to request support for it. The workaround is to use an SSD that doesn't have high fsync latency, which is always a good idea, but not always possible.tl;drfor a CPU-bound workloadthe write-heavy steps are much faster in 13.0.0 than 10.2.30the read-heavy steps get similar QPS in 13.0.0 and 10.2.30this is similar to the results on the 24-core serverfor an IO-bound workloadthe initial load (l.i0) is much faster in 13.0.0 than 10.2.30the random write step (l.i1) is slower in 13.0.0 than 10.2.30 because fsync latencythe range query step (qr100) gets similar QPS in 13.0.0 and 10.2.30the point query step (qp100) is much slower in 13.0.0 than 10.2.30 because fsync latencyBuilds, configuration and hardwareI compiled MariaDB from source for versions 10.2.30, 10.2.44, 10.3.39, 10.4.34, 10.5.29, 10.6.25, 10.11.16, 11.4.10, 11.8.6, 12.3.1 and 13.0.0.The server has 24-cores, 2-sockets and 64G of RAM. Storage is 1 NVMe device with ext-4 and discard enabled. The OS is Ubuntu 24.04. Intel HT is disabled.The my.cnf files are here for: 10.2, 10.3, 10.4, 10.5, 10.6, 10.11, 11.4, 11.8, 12.3 and 13.0. For MariaDB 10.11.16 I used both the z12a config, as I did for all 10.x releases, and also used the z12b config. The difference is that the z12a config uses innodb_flush_method =O_DIRECT_NO_FSYNC while the z12b config uses =O_DIRECT. And the z12b config is closer to the configs used for MariaDB because with the new variables that replaced innodb_flush_method, we lose support for the equivalent of =O_DIRECT_NO_FSYNC.And I write about this because the extra fsync calls that are done when the z12b config is used have a large impact on throughput on a server that uses an SSD with high fsync latency, which causes perf regressions for all DBMS versions that used the z12b config -- 10.11.16, 11.4, 11.8, 12.3 and 13.0.The BenchmarkThe benchmark is explained here and is run with 12 clients with a table per client. I repeated it with two workloads:CPU-boundthe values for X, Y, Z are 10M, 16M, 4MIO-boundthe values for X, Y, Z are 300M, 4M, 1MThe point query (qp100, qp500, qp1000) and range query (qr100, qr500, qr1000) steps are run for 1800 seconds each.The benchmark steps are:l.i0insert X rows per table in PK order. The table has a PK index but no secondary indexes. There is one connection per client.l.xcreate 3 secondary indexes per table. There is one connection per client.l.i1use 2 connections/client. One inserts Y rows per table and the other does deletes at the same rate as the inserts. Each transaction modifies 50 rows (big transactions). This step is run for a fixed number of inserts, so the run time varies depending on the insert rate.l.i2like l.i1 but each transaction modifies 5 rows (small transactions) and Z rows are inserted and deleted per table.Wait for S seconds after the step finishes to reduce variance during the read-write benchmark steps that follow. The value of S is a function of the table size.qr100use 3 connections/client. One does range queries and performance is reported for this. The second does does 100 inserts/s and the third does 100 deletes/s. The second and third are less busy than the first. The range queries use covering secondary indexes. If the target insert rate is not sustained then that is considered to be an SLA failure. If the target insert rate is sustained then the step does the same number of inserts for all systems tested. This step is frequently not IO-bound for the IO-bound workload.qp100like qr100 except uses point queries on the PK indexqr500like qr100 but the insert and delete rates are increased from 100/s to 500/sqp500like qp100 but the insert and delete rates are increased from 100/s to 500/sqr1000like qr100 but the insert and delete rates are increased from 100/s to 1000/sqp1000like qp100 but the insert and delete rates are increased from 100/s to 1000/sResults: overviewThe performance reports are here for the CPU-bound and IO-bound workloads.The summary sections from the performances report have 3 tables. The first shows absolute throughput by DBMS tested X benchmark step. The second has throughput relative to the version from the first row of the table. The third shows the background insert rate for benchmark steps with background inserts. The second table makes it easy to see how performance changes over time. The third table makes it easy to see which DBMS+configs failed to meet the SLA.Below I use relative QPS to explain how performance changes. It is: (QPS for $me / QPS for $base) where $me is the result for some version. The base version is MariaDB 10.2.30.When relative QPS is &#62; 1.0 then performance improved over time. When it is &#60; 1.0 then there are regressions. The Q in relative QPS measures: insert/s for l.i0, l.i1, l.i2indexed rows/s for l.xrange queries/s for qr100, qr500, qr1000point queries/s for qp100, qp500, qp1000This statement doesn&#039;t apply to this blog post, but I keep it here for copy/paste into future posts. Below I use colors to highlight the relative QPS values with red for = 1.05 and grey for values between 0.95 and 1.05.Results: CPU-boundThe performance summary is here.The summary per benchmark step, where rQPS means relative QPS.l.i0MariaDB 13.0.0 is faster than 10.2.30, rQPS is 1.47CPU per insert (cpupq) and KB written to storage per insert (wKBpi) are much smaller in 13.0.0 than 10.2.30 (see here)l.xI will ignore thisl.i1, l.i2MariaDB 13.0.0 is faster than 10.2.30, rQPS is 1.50 and 1.37CPU per write (cpupq) is much smaller in 13.0.0 than 10.2.30 (see here)qr100, qr500, qr1000MariaDB 13.0.0 and 10.2.30 have similar QPS (rQPS is close to 1.0)CPU per query (cqpq) is similar in 13.0.0 and 10.2.30 (see here)qp100, qp500, qp1000MariaDB 13.0.0 and 10.2.30 have similar QPS (rQPS is close to 1.0)CPU per query (cqpq) is similar in 13.0.0 and 10.2.30 (see here)Results: IO-boundThe performance summary is here.The summary per benchmark step, where rQPS means relative QPS.l.i0MariaDB 13.0.0 is faster than 10.2.30, rQPS is 1.25CPU per insert (cpupq) and KB written to storage per insert (wKBpi) are much smaller in 13.0.0 than 10.2.30 (see here)l.xI will ignore thisl.i1, l.i2MariaDB 13.0.0 is slower than 10.2.30 for l.i1, rQPS is 0.68MariaDB 13.0.0 is faster than 10.2.30 for l.i2, rQPS is 1.31. I suspect it is faster on l.i2 because it inherits less MVCC GC debt from l.i1 because it was slower on l.i1. So I won&#039;t celebrate this result and will focus on l.i1.From the normalized vmstat and iostat metrics I don&#039;t see anything obvious. But I do see a reduction in storage reads/s (rps) and storage read MB/s (rMBps). And this reduction starts in 10.11.16 with the z12b config and continues to 13.0.0. This does not occur on the earlier releases that are eable to use the z12a config. So I am curious if the extra fsyncs are the root cause.From the iostat summary for l.i1 that includes average values for all iostat columns, and these are not divided by QPS, what I see a much higher rate for fsyncs (f/s) as well as an increase in read latency. For MariaDB 10.11.16 the value for r_await is 0.640 with the z12a config vs 0.888 with the z12b config. I assume that more frequent fsync calls hurt read latency. The iostat results don&#039;t look great for either the z12a or z12b config and the real solution is to avoid using an SSD with high fsync latency, but that isn&#039;t always possible.qr100, qr500, qr1000no DBMS versions were able to sustain the target write rate for qr500 or qr1000 so I ignore them. This server needs more IOPs capacity -- a second SSD, and both SSDs needs power loss protection to reduce fsync latency.MariaDB 13.0.0 and 10.2.30 have similar performance, rQPS is 0.96. The qr100 step for MariaDB 13.0.0 might not suffer from fsync latency like the qp100 step because it does less read IO per query than qp100 (see rpq here).qp100, qp500, qp1000no DBMS versions were able to sustain the target write rate for qp500 or qp1000 so I ignore them. This server needs more IOPs capacity -- a second SSD, and both SSDs needs power loss protection to reduce fsync latency.MariaDB 13.0.0 is slower than 10.2.30, rQPS is 0.62From the normalized vmstat and iostat metrics there are increases in CPU per query (cpupq) and storage reads per query (rpq) for all DBMS versions that use the z12b config (see here).From the iostat summary for qp100 that includes average values for all iostat columns the read latency increases for all DBMS versions that use the z12b config. I blame interference from the extra fsync calls.</p>
<p><a href="https://smalldatum.blogspot.com/2026/04/the-insert-benchmark-vs-mariadb-102-to_8.html">The Insert Benchmark vs MariaDB 10.2 to 13.0 on a 32-core server</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>This has results for MariaDB versions 10.2 through 13.0 vs the <a href="https://smalldatum.blogspot.com/2023/12/updates-for-insert-benchmark-december.html">Insert Benchmark</a> on a 32-core server. The goal is to see how performance changes over time to find regressions or highlight improvements. My <a href="https://smalldatum.blogspot.com/2026/04/the-insert-benchmark-vs-mariadb-102-to.html">previous post</a> has results from a 24-core server.  Differences between these servers include:</p>
<ul>
<li>RAM &#8211; 32-core server has 128G, 24-core server has 64G</li>
<li>fsync latency &#8211; 32-core has an SSD with <a href="https://smalldatum.blogspot.com/2026/01/ssds-power-loss-protection-and-fsync.html">high fsync latency</a>, while it is fast on the 24-core server</li>
<li>sockets &#8211; 32-core server has 1 CPU socket, 24-core server has two</li>
<li>CPU maker  &#8211; 32-core server uses an AMD Threadripper, 24-core server has an Intel Xeon</li>
<li>cores &#8211; obviously it is 32 vs 24, Intel HT and AMD SMT are disabled</li>
</ul>
<p>The results here for modern MariaDB are great for the CPU-bound workload but not for the IO-bound workload.. They were great for both on the 24-core server. The regressions are likely caused by the extra fsync calls that are done because the equivalent of equivalent of innodb_flush_method =O_DIRECT_NO_FSYNC was lost with the new options that replace innodb_flush_method starting in MariaDB 11.4. I created <a href="https://jira.mariadb.org/browse/MDEV-33545">MDEV-33545</a> to request support for it. The workaround is to use an SSD that doesn&#8217;t have high fsync latency, which is always a good idea, but not always possible.</p>
<p>tl;dr</p>
</p>
<ul>
<li>for a CPU-bound workload</li>
<ul>
<li>the write-heavy steps are much faster in 13.0.0 than 10.2.30</li>
<li>the read-heavy steps get similar QPS in 13.0.0 and 10.2.30</li>
<li>this is similar to the <a href="https://smalldatum.blogspot.com/2026/04/the-insert-benchmark-vs-mariadb-102-to.html">results on the 24-core server</a></li>
</ul>
<li>for an IO-bound workload</li>
<ul>
<li>the initial load (l.i0) is much faster in 13.0.0 than 10.2.30</li>
<li>the random write step (l.i1) is slower in 13.0.0 than 10.2.30 because fsync latency</li>
<li>the range query step (qr100) gets similar QPS in 13.0.0 and 10.2.30</li>
<li>the point query step (qp100) is much slower in 13.0.0 than 10.2.30 because fsync latency</li>
</ul>
</ul>
<div>
<div><b>Builds, configuration and hardware</b></div>
<div>
<div></div>
<div>I compiled MariaDB from source for versions 10.2.30, 10.2.44, 10.3.39, 10.4.34, 10.5.29, 10.6.25, 10.11.16, 11.4.10, 11.8.6, 12.3.1 and 13.0.0.</div>
<div></div>
<div>The server has 24-cores, 2-sockets and 64G of RAM. Storage is 1 NVMe device with ext-4 and discard enabled. The OS is Ubuntu 24.04. Intel HT is disabled.</div>
</div>
<div></div>
<div>The my.cnf files are here for: <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/ma100244_rel_withdbg/etc/my.cnf.cz12a_c32r128">10.2</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/ma100339_rel_withdbg/etc/my.cnf.cz12a_c32r128">10.3</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/ma100433_rel_withdbg/etc/my.cnf.cz12a_c32r128">10.4</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/ma100524_rel_withdbg/etc/my.cnf.cz12a_c32r128">10.5</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/ma100617_rel_withdbg/etc/my.cnf.cz12a_c32r128">10.6</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/ma101107_rel_withdbg/etc/my.cnf.cz12a_c32r128">10.11</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/ma110401_rel_withdbg/etc/my.cnf.cz12b_c32r128">11.4</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/ma110803_rel_withdbg/etc/my.cnf.cz12b_c32r128">11.8</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/ma1203/etc/my.cnf.cz12b_c32r128">12.3 and 13.0</a>. </div>
<div></div>
<div>For MariaDB 10.11.16 I used both the <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/ma101107_rel_withdbg/etc/my.cnf.cz12a_c32r128">z12a</a> config, as I did for all 10.x releases, and also used the <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/ma101107_rel_withdbg/etc/my.cnf.cz12b_c32r128">z12b</a> config. The difference is that the z12a config uses innodb_flush_method =O_DIRECT_NO_FSYNC while the z12b config uses =O_DIRECT. And the z12b config is closer to the configs used for MariaDB because with the new variables that replaced innodb_flush_method, we lose support for the equivalent of =O_DIRECT_NO_FSYNC.</p>
<p>And I write about this because the extra fsync calls that are done when the z12b config is used have a large impact on throughput on a server that uses an SSD with <a href="https://smalldatum.blogspot.com/2026/01/ssds-power-loss-protection-and-fsync.html">high fsync latency</a>, which causes perf regressions for all DBMS versions that used the z12b config &#8212; 10.11.16, 11.4, 11.8, 12.3 and 13.0.</div>
<div></div>
<div>
<div><b>The Benchmark</b></div>
<div>
<div></div>
<div>The benchmark is <a href="https://smalldatum.blogspot.com/2023/12/updates-for-insert-benchmark-december.html">explained here</a> and is run with 12 clients with a table per client. I repeated it with two workloads:</div>
<div>
<ul>
<li>CPU-bound</li>
<ul>
<li>the values for X, Y, Z are 10M, 16M, 4M</li>
</ul>
<li>IO-bound</li>
<ul>
<li>the values for X, Y, Z are 300M, 4M, 1M</li>
</ul>
</ul>
<div>The point query (qp100, qp500, qp1000) and range query (qr100, qr500, qr1000) steps are run for 1800 seconds each.</div>
</div>
<div></div>
<div>The benchmark steps are:</div>
<div>
<div>
<ul>
<li>l.i0</li>
<ul>
<li>insert X rows per table in PK order. The table has a PK index but no secondary indexes. There is one connection per client.</li>
</ul>
<li>l.x</li>
<ul>
<li>create 3 secondary indexes per table. There is one connection per client.</li>
</ul>
<li>l.i1</li>
<ul>
<li>use 2 connections/client. One inserts Y rows per table and the other does deletes at the same rate as the inserts. Each transaction modifies 50 rows (big transactions). This step is run for a fixed number of inserts, so the run time varies depending on the insert rate.</li>
</ul>
<li>l.i2</li>
<ul>
<li>like l.i1 but each transaction modifies 5 rows (small transactions) and Z rows are inserted and deleted per table.</li>
<li>Wait for S seconds after the step finishes to reduce variance during the read-write benchmark steps that follow. The value of S is a function of the table size.</li>
</ul>
<li>qr100</li>
<ul>
<li>use 3 connections/client. One does range queries and performance is reported for this. The second does does 100 inserts/s and the third does 100 deletes/s. The second and third are less busy than the first. The range queries use covering secondary indexes. If the target insert rate is not sustained then that is considered to be an SLA failure. If the target insert rate is sustained then the step does the same number of inserts for all systems tested. This step is frequently not IO-bound for the IO-bound workload.</li>
</ul>
<li>qp100</li>
<ul>
<li>like qr100 except uses point queries on the PK index</li>
</ul>
<li>qr500</li>
<ul>
<li>like qr100 but the insert and delete rates are increased from 100/s to 500/s</li>
</ul>
<li>qp500</li>
<ul>
<li>like qp100 but the insert and delete rates are increased from 100/s to 500/s</li>
</ul>
<li>qr1000</li>
<ul>
<li>like qr100 but the insert and delete rates are increased from 100/s to 1000/s</li>
</ul>
<li>qp1000</li>
<ul>
<li>like qp100 but the insert and delete rates are increased from 100/s to 1000/s</li>
</ul>
</ul>
<div>
<div>
<div><b>Results: overview</b></div>
<div>
<div><b><br /></b></div>
<div>The performance reports are here for the <a href="https://mdcallag.github.io/reports/apr26.ib.dell32.mem.10m.20m.1800s.12u.maria/all.html">CPU-bound</a> and <a href="https://mdcallag.github.io/reports/apr26.ib.dell32.io.300m.5m.1800s.12u.maria/all.html">IO-bound</a> workloads.</div>
</div>
</div>
<div></div>
<div>The summary sections from the performances report have 3 tables. The first shows absolute throughput by DBMS tested X benchmark step. The second has throughput relative to the version from the first row of the table. The third shows the background insert rate for benchmark steps with background inserts. The second table makes it easy to see how performance changes over time. The third table makes it easy to see which DBMS+configs failed to meet the SLA.</div>
<div>
<div></div>
<div>Below I use relative QPS to explain how performance changes. It is: (QPS for $me / QPS for $base) where $me is the result for some version. The base version is MariaDB 10.2.30.</p>
<p>When relative QPS is &gt; 1.0 then performance improved over time. When it is &lt; 1.0 then there are regressions. The Q in relative QPS measures: </p></div>
<div>
<ul>
<li>insert/s for l.i0, l.i1, l.i2</li>
<li>indexed rows/s for l.x</li>
<li>range queries/s for qr100, qr500, qr1000</li>
<li>point queries/s for qp100, qp500, qp1000</li>
</ul>
<div>This statement doesn&#8217;t apply to this blog post, but I keep it here for copy/paste into future posts. Below I use colors to highlight the relative QPS values with <span>red</span> for &lt;= 0.95, <span>green</span> for &gt;= 1.05 and <span>grey</span> for values between 0.95 and 1.05.</div>
</div>
</div>
</div>
<div>
<div></div>
</div>
</div>
</div>
</div>
</div>
<div></div>
<div>
<div><b>Results: CPU-bound</b></div>
<div></div>
<div>The performance summary <a href="https://mdcallag.github.io/reports/apr26.ib.dell32.mem.10m.20m.1800s.12u.maria/all.html#summary">is here</a>.</p>
<p>The summary per benchmark step, where rQPS means relative QPS.</p></div>
</div>
<div>
<ul>
<li>l.i0</li>
<ul>
<li>MariaDB 13.0.0 is faster than 10.2.30, <span>rQPS is 1.47</span></li>
<li>CPU per insert (cpupq) and KB written to storage per insert (wKBpi) are much smaller in 13.0.0 than 10.2.30 (see <a href="https://mdcallag.github.io/reports/apr26.ib.dell32.mem.10m.20m.1800s.12u.maria/all.html#l.i0.metrics">here</a>)</li>
</ul>
<li>l.x</li>
<ul>
<li>I will ignore this</li>
</ul>
<li>l.i1, l.i2</li>
<ul>
<li>MariaDB 13.0.0 is faster than 10.2.30, <span>rQPS is 1.50 and 1.37</span></li>
<li><span>CPU per write (cpupq) is much smaller in 13.0.0 than 10.2.30 (see <a href="https://mdcallag.github.io/reports/apr26.ib.dell32.mem.10m.20m.1800s.12u.maria/all.html#l.i1.metrics">here</a>)</span></li>
</ul>
<li>qr100, qr500, qr1000</li>
<ul>
<li>MariaDB 13.0.0 and 10.2.30 have similar QPS (<span>rQPS is close to 1.0</span>)</li>
<li>CPU per query (cqpq) is similar in 13.0.0 and 10.2.30 (see <a href="https://mdcallag.github.io/reports/apr26.ib.dell32.mem.10m.20m.1800s.12u.maria/all.html#qr100.L1.metrics">here</a>)</li>
</ul>
<li>qp100, qp500, qp1000</li>
<ul>
<li>MariaDB 13.0.0 and 10.2.30 have similar QPS (<span>rQPS is close to 1.0</span>)</li>
<li>CPU per query (cqpq) is similar in 13.0.0 and 10.2.30 (see <a href="https://mdcallag.github.io/reports/apr26.ib.dell32.mem.10m.20m.1800s.12u.maria/all.html#qp100.L2.metrics">here</a>)</li>
</ul>
</ul>
</div>
<div></div>
<div>
<div>
<div><b>Results: IO-bound</b></div>
<div></div>
<div>The performance summary <a href="https://mdcallag.github.io/reports/apr26.ib.dell32.io.300m.5m.1800s.12u.maria/all.html#summary">is here</a>.</p>
<p>The summary per benchmark step, where rQPS means relative QPS.</p></div>
</div>
<div>
<ul>
<li>l.i0</li>
<ul>
<li>MariaDB 13.0.0 is faster than 10.2.30, <span>rQPS is 1.25</span></li>
<li>CPU per insert (cpupq) and KB written to storage per insert (wKBpi) are much smaller in 13.0.0 than 10.2.30 (see <a href="https://mdcallag.github.io/reports/apr26.ib.dell32.io.300m.5m.1800s.12u.maria/all.html#l.i0.metrics">here</a>)</li>
</ul>
<li>l.x</li>
<ul>
<li>I will ignore this</li>
</ul>
<li>l.i1, l.i2</li>
<ul>
<li>MariaDB 13.0.0 is slower than 10.2.30 for l.i1, <span>rQPS is 0.68</span></li>
<li>MariaDB 13.0.0 is faster than 10.2.30 for l.i2, rQPS is <span>1.31</span>. I suspect it is faster on l.i2 because it inherits less MVCC GC debt from l.i1 because it was slower on l.i1. So I won&#8217;t celebrate this result and will focus on l.i1.</li>
<li>From the <a href="https://mdcallag.github.io/reports/apr26.ib.dell32.io.300m.5m.1800s.12u.maria/all.html#l.i1.metrics">normalized vmstat and iostat metrics</a> I don&#8217;t see anything obvious. But I do see a reduction in storage reads/s (rps) and storage read MB/s (rMBps). And this reduction starts in 10.11.16 with the z12b config and continues to 13.0.0. This does not occur on the earlier releases that are eable to use the z12a config. So I am curious if the extra fsyncs are the root cause.</li>
<li>From the <a href="https://mdcallag.github.io/reports/apr26.ib.dell32.io.300m.5m.1800s.12u.maria/all.html#l.i1.graph">iostat summary for l.i1</a> that includes average values for all iostat columns, and these are not divided by QPS, what I see a much higher rate for fsyncs (f/s) as well as an increase in read latency. For MariaDB 10.11.16 the value for r_await is 0.640 with the z12a config vs 0.888 with the z12b config. I assume that more frequent fsync calls hurt read latency. The iostat results don&#8217;t look great for either the z12a or z12b config and the real solution is to avoid using an SSD with high fsync latency, but that isn&#8217;t always possible.</li>
</ul>
<li>qr100, qr500, qr1000</li>
<ul>
<li>no DBMS versions were able to sustain the target write rate for qr500 or qr1000 so I ignore them. This server needs more IOPs capacity &#8212; a second SSD, and both SSDs needs power loss protection to reduce fsync latency.</li>
<li>MariaDB 13.0.0 and 10.2.30 have similar performance, <span>rQPS is 0.96</span><span>. </span>The qr100 step for MariaDB 13.0.0 might not suffer from fsync latency like the qp100 step because it does less read IO per query than qp100 (see rpq <a href="https://mdcallag.github.io/reports/apr26.ib.dell32.io.300m.5m.1800s.12u.maria/all.html#qr100.L1.metrics">here</a>).</li>
</ul>
<li>qp100, qp500, qp1000</li>
<ul>
<li>no DBMS versions were able to sustain the target write rate for qp500 or qp1000 so I ignore them. This server needs more IOPs capacity &#8212; a second SSD, and both SSDs needs power loss protection to reduce fsync latency.</li>
<li>MariaDB 13.0.0 is slower than 10.2.30, <span>rQPS is 0.62</span></li>
<li><span>From the <a href="https://mdcallag.github.io/reports/apr26.ib.dell32.io.300m.5m.1800s.12u.maria/all.html#qp100.L2.metrics">normalized vmstat and iostat metrics</a> there are increases in CPU per query (cpupq) and storage reads per query (rpq) for all DBMS versions that use the z12b config (see <a href="https://mdcallag.github.io/reports/apr26.ib.dell32.io.300m.5m.1800s.12u.maria/all.html#qp100.L2.metrics">here</a>).</span></li>
<li><span>From the <a href="https://mdcallag.github.io/reports/apr26.ib.dell32.io.300m.5m.1800s.12u.maria/all.html#qp100.L2.graph">iostat summary for qp100</a> that includes average values for all iostat columns the read latency increases for all DBMS versions that use the z12b config. I blame interference from the extra fsync calls.</span></li>
</ul>
</ul>
</div>
</div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<p><a href="https://smalldatum.blogspot.com/2026/04/the-insert-benchmark-vs-mariadb-102-to_8.html">The Insert Benchmark vs MariaDB 10.2 to 13.0 on a 32-core server</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>The Insert Benchmark vs MariaDB 10.2 to 13.0 on a 24-core server</title>
        <link>https://smalldatum.blogspot.com/2026/04/the-insert-benchmark-vs-mariadb-102-to.html</link>
        <pubDate>Wed, 08 Apr 2026 01:39:00 +0000</pubDate>
        <dc:creator>Mark Callaghan</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/the-insert-benchmark-vs-mariadb-10-2-to-13-0-on-a-24-core-server/</guid>
        <source url="https://smalldatum.blogspot.com/">Small Datum</source>
        <description><![CDATA[<p>This has results for MariaDB versions 10.2 through 13.0 vs the Insert Benchmark on a 24-core server. The goal is to see how performance changes over time to find regressions or highlight improvements.MariaDB 13.0.0 is faster than 10.2.30 on most benchmark steps and otherwise as fast as 10.2.30. This is a great result.tl;drfor a CPU-bound workloadthe write-heavy steps are much faster in 13.0.0 than 10.2.30the read-heavy steps get similar QPS in 13.0.0 and 10.2.30for an IO-bound workloadmost of the write-heavy steps are much faster in 13.0.0 than 10.2.30the point-query heavy steps get similar QPS in 13.0.0 and 10.2.30the range-query heavy steps get more QPS in 13.0.0 than 10.2.30Builds, configuration and hardwareI compiled MariaDB from source for versions 10.2.30, 10.2.44, 10.3.39, 10.4.34, 10.5.29, 10.6.25, 10.11.16, 11.4.10, 11.8.6, 12.3.1 and 13.0.0.The server has 24-cores, 2-sockets and 64G of RAM. Storage is 1 NVMe device with ext-4 and discard enabled. The OS is Ubuntu 24.04. Intel HT is disabled.The my.cnf files are here for: 10.2, 10.3, 10.4, 10.5, 10.6, 10.11, 11.4, 11.8, 12.3 and 13.0.The BenchmarkThe benchmark is explained here and is run with 8 clients with a table per client. I repeated it with two workloads:CPU-boundthe values for X, Y, Z are 10M, 16M, 4MIO-boundthe values for X, Y, Z are 250M, 4M, 1MThe point query (qp100, qp500, qp1000) and range query (qr100, qr500, qr1000) steps are run for 1800 seconds each.The benchmark steps are:l.i0insert X rows per table in PK order. The table has a PK index but no secondary indexes. There is one connection per client.l.xcreate 3 secondary indexes per table. There is one connection per client.l.i1use 2 connections/client. One inserts Y rows per table and the other does deletes at the same rate as the inserts. Each transaction modifies 50 rows (big transactions). This step is run for a fixed number of inserts, so the run time varies depending on the insert rate.l.i2like l.i1 but each transaction modifies 5 rows (small transactions) and Z rows are inserted and deleted per table.Wait for S seconds after the step finishes to reduce variance during the read-write benchmark steps that follow. The value of S is a function of the table size.qr100use 3 connections/client. One does range queries and performance is reported for this. The second does does 100 inserts/s and the third does 100 deletes/s. The second and third are less busy than the first. The range queries use covering secondary indexes. If the target insert rate is not sustained then that is considered to be an SLA failure. If the target insert rate is sustained then the step does the same number of inserts for all systems tested. This step is frequently not IO-bound for the IO-bound workload.qp100like qr100 except uses point queries on the PK indexqr500like qr100 but the insert and delete rates are increased from 100/s to 500/sqp500like qp100 but the insert and delete rates are increased from 100/s to 500/sqr1000like qr100 but the insert and delete rates are increased from 100/s to 1000/sqp1000like qp100 but the insert and delete rates are increased from 100/s to 1000/sResults: overviewThe performance reports are here for the CPU-bound and IO-bound workloads.The summary sections from the performances report have 3 tables. The first shows absolute throughput by DBMS tested X benchmark step. The second has throughput relative to the version from the first row of the table. The third shows the background insert rate for benchmark steps with background inserts. The second table makes it easy to see how performance changes over time. The third table makes it easy to see which DBMS+configs failed to meet the SLA.Below I use relative QPS to explain how performance changes. It is: (QPS for $me / QPS for $base) where $me is the result for some version. The base version is MariaDB 10.2.30.When relative QPS is &#62; 1.0 then performance improved over time. When it is &#60; 1.0 then there are regressions. The Q in relative QPS measures: insert/s for l.i0, l.i1, l.i2indexed rows/s for l.xrange queries/s for qr100, qr500, qr1000point queries/s for qp100, qp500, qp1000This statement doesn&#039;t apply to this blog post, but I keep it here for copy/paste into future posts. Below I use colors to highlight the relative QPS values with red for = 1.05 and grey for values between 0.95 and 1.05.Results: CPU-boundThe performance summary is here.The summary per benchmark step, where rQPS means relative QPS.l.i0MariaDB 13.0.0 is faster than 10.2.30 (rQPS is 1.22)KB written to storage per insert (wKBpi) and CPU per insert (cpupq) are smaller in 13.0.0 than 10.2.30, see herel.xI will ignore thisl.i1, l.i2MariaDB 13.0.0 is faster than 10.2.30 (rQPS is 1.21 and 1.45)for l.i1, CPU per insert (cpupq) is smaller in 13.0.0 than 10.2.30 but KB written to storage per insert (wKBpi) and the context switch rate (cspq) are larger in 13.0.0 than 10.2.30, see herefor l.i2, CPU per insert (cpupq) and KB written to storage per insert (wKBpi) are smaller in 13.0.0 than 10.2.30 but the context switch rate (cspq) is larger in 13.0.0 than 10.2.30, see hereqr100, qr500, qr1000MariaDB 13.0.0 and 10.2.30 have similar QPS (rQPS is close to 1.0)the results from vmstat and iostat are less useful here because the write rate in 10.2 to 10.4 was much larger than 10.5+. While the my.cnf settings are as close as possible across all versions, it looks like furious flushing was enabled in 10.2 to 10.4 and I need to figure out whether it is possible to disable that.qp100, qp500, qp1000MariaDB 13.0.0 and 10.2.30 have similar QPS (rQPS is close to 1.0)what I wrote above for vmstat and iostat with the qr* test also applies hereResults: IO-boundThe performance summary is here.The summary per benchmark step, where rQPS means relative QPS.l.i0MariaDB 13.0.0 is faster than 10.2.30 (rQPS is 1.16)KB written to storage per insert (wKBpi) and CPU per insert (cpupq) are smaller in 13.0.0 than 10.2.30, see herel.xI will ignore thisl.i1, l.i2MariaDB 13.0.0 and 10.2.30 have the same QPS for l.i1 while 13.0.0 is faster for l.i2 (rQPS is 1.03 and 3.70). It is odd that QPS drops from 12.3.1 to 13.0.0 on the l.i1 step.for l.i1, CPU per insert (cpupq) and the context switch rate (cspq) are larger in 13.0.0 than 12.3.1, see here. The flamegraphs, that I have not shared, look similar. From iostat results there is much more discard (TRIM, SSD GC) in progress with 13.0.0 than 12.3.1 and the overhead from that might explain the difference.for l.i2, almost everything looks better in 13.0.0 than 10.2.30. Unlike what occurs for the l.i1 step, the results for 13.0.0 are similar to 12.3.1, see here.qr100, qr500, qr1000no DBMS versions were able to sustain the target write rate for qr1000 so I ignore that stepMariaDB 13.0.0 and 10.2.30 have similar QPS (rQPS is close to 1.0)the results from vmstat and iostat are less useful here because the write rate in 10.2 to 10.4 was much larger than 10.5+. While the my.cnf settings are as close as possible across all versions, it looks like furious flushing was enabled in 10.2 to 10.4 and I need to figure out whether it is possible to disable that.qp100, qp500, qp1000no DBMS versions were able to sustain the target write rate for qr1000 so I ignore that stepMariaDB 13.0.0 is faster than 10.2.30 (rQPS is 1.17 and 1.56)what I wrote above for vmstat and iostat with the qr* test also applies here</p>
<p><a href="https://smalldatum.blogspot.com/2026/04/the-insert-benchmark-vs-mariadb-102-to.html">The Insert Benchmark vs MariaDB 10.2 to 13.0 on a 24-core server</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>This has results for MariaDB versions 10.2 through 13.0 vs the <a href="https://smalldatum.blogspot.com/2023/12/updates-for-insert-benchmark-december.html">Insert Benchmark</a> on a 24-core server. The goal is to see how performance changes over time to find regressions or highlight improvements.</p>
<p>MariaDB 13.0.0 is faster than 10.2.30 on most benchmark steps and otherwise as fast as 10.2.30. This is a great result.</p>
<p>tl;dr</p>
</p>
<ul>
<li>for a CPU-bound workload</li>
<ul>
<li>the write-heavy steps are much faster in 13.0.0 than 10.2.30</li>
<li>the read-heavy steps get similar QPS in 13.0.0 and 10.2.30</li>
</ul>
<li>for an IO-bound workload</li>
<ul>
<li>most of the write-heavy steps are much faster in 13.0.0 than 10.2.30</li>
<li>the point-query heavy steps get similar QPS in 13.0.0 and 10.2.30</li>
<li>the range-query heavy steps get more QPS in 13.0.0 than 10.2.30</li>
</ul>
</ul>
<div><b>Builds, configuration and hardware</b></div>
<div>
<div></div>
<div>I compiled MariaDB from source for versions 10.2.30, 10.2.44, 10.3.39, 10.4.34, 10.5.29, 10.6.25, 10.11.16, 11.4.10, 11.8.6, 12.3.1 and 13.0.0.</div>
<div></div>
<div>The server has 24-cores, 2-sockets and 64G of RAM. Storage is 1 NVMe device with ext-4 and discard enabled. The OS is Ubuntu 24.04. Intel HT is disabled.</div>
</div>
<div></div>
<div>The my.cnf files are here for: <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c24r64/ma100244_rel_withdbg/etc/my.cnf.cz12a_c24r64">10.2</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c24r64/ma100339_rel_withdbg/etc/my.cnf.cz12a_c24r64">10.3</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c24r64/ma100434_rel_withdbg/etc/my.cnf.cz12a_c24r64">10.4</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c24r64/ma100526_rel_withdbg/etc/my.cnf.cz12a_c24r64">10.5</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c24r64/ma100619_rel_withdbg/etc/my.cnf.cz12a_c24r64">10.6</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c24r64/ma101109_rel_withdbg/etc/my.cnf.cz12a_c24r64">10.11</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c24r64/ma110403_rel_withdbg/etc/my.cnf.cz12b_c24r64">11.4</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c24r64/ma110803_rel_withdbg/etc/my.cnf.cz12b_c24r64">11.8</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c24r64/ma1203/etc/my.cnf.cz12b_c24r64">12.3 and 13.0</a>.</div>
<div></div>
<div>
<div><b>The Benchmark</b></div>
<div>
<div></div>
<div>The benchmark is <a href="https://smalldatum.blogspot.com/2023/12/updates-for-insert-benchmark-december.html">explained here</a> and is run with 8 clients with a table per client. I repeated it with two workloads:</div>
<div>
<ul>
<li>CPU-bound</li>
<ul>
<li>the values for X, Y, Z are 10M, 16M, 4M</li>
</ul>
<li>IO-bound</li>
<ul>
<li>the values for X, Y, Z are 250M, 4M, 1M</li>
</ul>
</ul>
<div>The point query (qp100, qp500, qp1000) and range query (qr100, qr500, qr1000) steps are run for 1800 seconds each.</div>
</div>
<div></div>
<div>The benchmark steps are:</div>
<div>
<div>
<ul>
<li>l.i0</li>
<ul>
<li>insert X rows per table in PK order. The table has a PK index but no secondary indexes. There is one connection per client.</li>
</ul>
<li>l.x</li>
<ul>
<li>create 3 secondary indexes per table. There is one connection per client.</li>
</ul>
<li>l.i1</li>
<ul>
<li>use 2 connections/client. One inserts Y rows per table and the other does deletes at the same rate as the inserts. Each transaction modifies 50 rows (big transactions). This step is run for a fixed number of inserts, so the run time varies depending on the insert rate.</li>
</ul>
<li>l.i2</li>
<ul>
<li>like l.i1 but each transaction modifies 5 rows (small transactions) and Z rows are inserted and deleted per table.</li>
<li>Wait for S seconds after the step finishes to reduce variance during the read-write benchmark steps that follow. The value of S is a function of the table size.</li>
</ul>
<li>qr100</li>
<ul>
<li>use 3 connections/client. One does range queries and performance is reported for this. The second does does 100 inserts/s and the third does 100 deletes/s. The second and third are less busy than the first. The range queries use covering secondary indexes. If the target insert rate is not sustained then that is considered to be an SLA failure. If the target insert rate is sustained then the step does the same number of inserts for all systems tested. This step is frequently not IO-bound for the IO-bound workload.</li>
</ul>
<li>qp100</li>
<ul>
<li>like qr100 except uses point queries on the PK index</li>
</ul>
<li>qr500</li>
<ul>
<li>like qr100 but the insert and delete rates are increased from 100/s to 500/s</li>
</ul>
<li>qp500</li>
<ul>
<li>like qp100 but the insert and delete rates are increased from 100/s to 500/s</li>
</ul>
<li>qr1000</li>
<ul>
<li>like qr100 but the insert and delete rates are increased from 100/s to 1000/s</li>
</ul>
<li>qp1000</li>
<ul>
<li>like qp100 but the insert and delete rates are increased from 100/s to 1000/s</li>
</ul>
</ul>
<div>
<div>
<div><b>Results: overview</b></div>
<div>
<div><b><br /></b></div>
<div>The performance reports are here for the <a href="https://mdcallag.github.io/reports/apr26.ib.mem.10m.20m.1800s.8u.maria/all.html">CPU-bound</a> and <a href="https://mdcallag.github.io/reports/apr26.ib.io.250m.5m.1800s.8u.maria/all.html">IO-bound</a> workloads.</div>
</div>
</div>
<div></div>
<div>The summary sections from the performances report have 3 tables. The first shows absolute throughput by DBMS tested X benchmark step. The second has throughput relative to the version from the first row of the table. The third shows the background insert rate for benchmark steps with background inserts. The second table makes it easy to see how performance changes over time. The third table makes it easy to see which DBMS+configs failed to meet the SLA.</div>
<div>
<div></div>
<div>Below I use relative QPS to explain how performance changes. It is: (QPS for $me / QPS for $base) where $me is the result for some version. The base version is MariaDB 10.2.30.</p>
<p>When relative QPS is &gt; 1.0 then performance improved over time. When it is &lt; 1.0 then there are regressions. The Q in relative QPS measures: </p></div>
<div>
<ul>
<li>insert/s for l.i0, l.i1, l.i2</li>
<li>indexed rows/s for l.x</li>
<li>range queries/s for qr100, qr500, qr1000</li>
<li>point queries/s for qp100, qp500, qp1000</li>
</ul>
<div>This statement doesn&#8217;t apply to this blog post, but I keep it here for copy/paste into future posts. Below I use colors to highlight the relative QPS values with <span>red</span> for &lt;= 0.95, <span>green</span> for &gt;= 1.05 and <span>grey</span> for values between 0.95 and 1.05.</div>
</div>
</div>
</div>
<div></div>
<div>
<div><b>Results: CPU-bound</b></div>
<div></div>
<div>The performance summary <a href="https://mdcallag.github.io/reports/apr26.ib.mem.10m.20m.1800s.8u.maria/all.html#summary">is here</a>.</p>
<p>The summary per benchmark step, where rQPS means relative QPS.</p></div>
</div>
<div>
<ul>
<li>l.i0</li>
<ul>
<li>MariaDB 13.0.0 is faster than 10.2.30 (<span>rQPS is 1.22</span>)</li>
<li>KB written to storage per insert (wKBpi) and CPU per insert (cpupq) are smaller in 13.0.0 than 10.2.30, see <a href="https://mdcallag.github.io/reports/apr26.ib.mem.10m.20m.1800s.8u.maria/all.html#l.i0.metrics">here</a></li>
</ul>
<li>l.x</li>
<ul>
<li>I will ignore this</li>
</ul>
<li>l.i1, l.i2</li>
<ul>
<li>MariaDB 13.0.0 is faster than 10.2.30 (<span>rQPS is 1.21 and 1.45</span>)</li>
<li>for l.i1, CPU per insert (cpupq) is smaller in 13.0.0 than 10.2.30 but KB written to storage per insert (wKBpi) and the context switch rate (cspq) are larger in 13.0.0 than 10.2.30, see <a href="https://mdcallag.github.io/reports/apr26.ib.mem.10m.20m.1800s.8u.maria/all.html#l.i1.metrics">here</a></li>
<li>for l.i2, CPU per insert (cpupq) and KB written to storage per insert (wKBpi) are smaller in 13.0.0 than 10.2.30 but the context switch rate (cspq) is larger in 13.0.0 than 10.2.30, see <a href="https://mdcallag.github.io/reports/apr26.ib.mem.10m.20m.1800s.8u.maria/all.html#l.i2.metrics">here</a></li>
</ul>
<li>qr100, qr500, qr1000</li>
<ul>
<li>MariaDB 13.0.0 and 10.2.30 have similar QPS (<span>rQPS is close to 1.0</span>)</li>
<li>the <a href="https://mdcallag.github.io/reports/apr26.ib.mem.10m.20m.1800s.8u.maria/all.html#qr100.L1.metrics">results from vmstat and iostat</a> are less useful here because the write rate in 10.2 to 10.4 was much larger than 10.5+. While the my.cnf settings are as close as possible across all versions, it looks like furious flushing was enabled in 10.2 to 10.4 and I need to figure out whether it is possible to disable that.</li>
</ul>
<li>qp100, qp500, qp1000</li>
<ul>
<li>MariaDB 13.0.0 and 10.2.30 have similar QPS (<span>rQPS is close to 1.0</span>)</li>
<li>what I wrote above for vmstat and iostat with the qr* test also applies here</li>
</ul>
</ul>
</div>
<div><b>Results: IO-bound</b></div>
<div>
<div></div>
<div>The performance summary <a href="https://mdcallag.github.io/reports/apr26.ib.io.250m.5m.1800s.8u.maria/all.html#summary">is here</a>.</div>
</div>
<div></div>
<div>
<div>The summary per benchmark step, where rQPS means relative QPS.</div>
<div>
<ul>
<li>l.i0</li>
<ul>
<li>MariaDB 13.0.0 is faster than 10.2.30 (<span>rQPS is 1.16</span>)</li>
<li>KB written to storage per insert (wKBpi) and CPU per insert (cpupq) are smaller in 13.0.0 than 10.2.30, see <a href="https://mdcallag.github.io/reports/apr26.ib.io.250m.5m.1800s.8u.maria/all.html#l.i0.metrics">here</a></li>
</ul>
<li>l.x</li>
<ul>
<li>I will ignore this</li>
</ul>
<li>l.i1, l.i2</li>
<ul>
<li>MariaDB 13.0.0 and 10.2.30 have the same QPS for l.i1 while 13.0.0 is faster for l.i2 (rQPS is <span>1.03</span> and <span>3.70</span>). It is odd that QPS drops from 12.3.1 to 13.0.0 on the l.i1 step.</li>
</ul>
<ul>
<li>for l.i1, CPU per insert (cpupq) and the context switch rate (cspq) are larger in 13.0.0 than 12.3.1, see <a href="https://mdcallag.github.io/reports/apr26.ib.io.250m.5m.1800s.8u.maria/all.html#l.i1.metrics">here</a>. The flamegraphs, that I have not shared, look similar. From iostat results there is much more discard (TRIM, SSD GC) in progress with 13.0.0 than 12.3.1 and the overhead from that might explain the difference.</li>
<li>for l.i2, almost everything looks better in 13.0.0 than 10.2.30. Unlike what occurs for the l.i1 step, the results for 13.0.0 are similar to 12.3.1, see <a href="https://mdcallag.github.io/reports/apr26.ib.io.250m.5m.1800s.8u.maria/all.html#l.i2.metrics">here</a>.</li>
</ul>
<li>qr100, qr500, qr1000</li>
<ul>
<li>no DBMS versions were able to sustain the target write rate for qr1000 so I ignore that step</li>
<li>MariaDB 13.0.0 and 10.2.30 have similar QPS (<span>rQPS is close to 1.0</span>)</li>
<li>the <a href="https://mdcallag.github.io/reports/apr26.ib.io.250m.5m.1800s.8u.maria/all.html#qr100.L1.metrics">results from vmstat and iostat</a> are less useful here because the write rate in 10.2 to 10.4 was much larger than 10.5+. While the my.cnf settings are as close as possible across all versions, it looks like furious flushing was enabled in 10.2 to 10.4 and I need to figure out whether it is possible to disable that.</li>
</ul>
<li>qp100, qp500, qp1000</li>
<ul>
<li>no DBMS versions were able to sustain the target write rate for qr1000 so I ignore that step</li>
<li>MariaDB 13.0.0 is faster than 10.2.30 (<span>rQPS is 1.17 and 1.56</span>)</li>
<li>what I wrote above for vmstat and iostat with the qr* test also applies here</li>
</ul>
</ul>
<div></div>
</div>
</div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div>
<div></div>
</div>
</div>
</div>
</div>
</div>
<p><a href="https://smalldatum.blogspot.com/2026/04/the-insert-benchmark-vs-mariadb-102-to.html">The Insert Benchmark vs MariaDB 10.2 to 13.0 on a 24-core server</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Thanks AWS Open Source</title>
        <link>https://jfg-mysql.blogspot.com/2026/04/thanks-aws-open-source.html</link>
        <pubDate>Tue, 07 Apr 2026 20:11:00 +0000</pubDate>
        <dc:creator>Jean-François Gagné</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/thanks-aws-open-source-2/</guid>
        <source url="https://jfg-mysql.blogspot.com/">J-F Gagné&#039;s MySQL Blog</source>
        <description><![CDATA[<p>I would like to thank AWS Open Source for their support.</p>
<p>For some time, I am maintaining Planet for the MySQL Community, a blog / news aggregator for the MySQL Community/Ecosystem.  I am also maintaining a similar aggregator for the Valkey Community.</p>
<p>Maintaining blog / news aggregators is not free.  It incurs hosting, domain registration, and other costs (in addition to time,</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/04/thanks-aws-open-source.html">Thanks AWS Open Source</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>I would like to thank AWS Open Source for their support.</p>
<p>For some time, I am maintaining Planet for the MySQL Community, a blog / news aggregator for the MySQL Community/Ecosystem.  I am also maintaining a similar aggregator for the Valkey Community.</p>
<p>Maintaining blog / news aggregators is not free.  It incurs hosting, domain registration, and other costs (in addition to time,</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/04/thanks-aws-open-source.html">Thanks AWS Open Source</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Thanks AWS Open Source</title>
        <link>https://jfg-mysql.blogspot.com/2026/04/thanks-aws-open-source.html</link>
        <pubDate>Tue, 07 Apr 2026 20:11:00 +0000</pubDate>
        <dc:creator>Jean-François Gagné</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/thanks-aws-open-source/</guid>
        <source url="https://jfg-mysql.blogspot.com/">J-F Gagné&#039;s MySQL Blog</source>
        <description><![CDATA[<p>I would like to thank AWS Open Source for their support.</p>
<p>For some time, I am maintaining Planet for the MySQL Community, a blog / news aggregator for the MySQL Community/Ecosystem.  I am also maintaining a similar aggregator for the Valkey Community.</p>
<p>Maintaining blog / news aggregators is not free.  It incurs hosting, domain registration, and other costs (in addition to time,</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/04/thanks-aws-open-source.html">Thanks AWS Open Source</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>I would like to thank AWS Open Source for their support.</p>
<p>For some time, I am maintaining Planet for the MySQL Community, a blog / news aggregator for the MySQL Community/Ecosystem.  I am also maintaining a similar aggregator for the Valkey Community.</p>
<p>Maintaining blog / news aggregators is not free.  It incurs hosting, domain registration, and other costs (in addition to time,</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/04/thanks-aws-open-source.html">Thanks AWS Open Source</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>The AWS Lambda ‘Kiss of Death’</title>
        <link>https://shatteredsilicon.net/aws-lambda-kiss-of-death/</link>
        <pubDate>Tue, 07 Apr 2026 18:15:28 +0000</pubDate>
        <dc:creator>Jonathan Levin</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/the-aws-lambda-kiss-of-death/</guid>
        <source url="https://shatteredsilicon.net/category/databases-mysql-mariadb-postgresql/">Databases (MySQL, MariaDB, PostgreSQL) Archives - Shattered Silicon</source>
        <description><![CDATA[<p>Our story begins as most database issues start: with hands on foreheads, internally or externally, saying ‘WTF is going on?’. We observed a series of database freezes on our production environment. It was quite severe. Connections spiked, writes were stalled and at some point, a large database freeze and they cleared. Being a Galera environment, […]<br />
The post The AWS Lambda ‘Kiss of Death’ appeared first on Shattered Silicon.</p>
<p><a href="https://shatteredsilicon.net/aws-lambda-kiss-of-death/">The AWS Lambda ‘Kiss of Death’</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Our story begins as most database issues start: with hands on foreheads, internally or externally, saying ‘WTF is going on?’. We observed a series of database freezes on our production environment. It was quite severe. Connections spiked, writes were stalled and at some point, a large database freeze and they cleared. Being a Galera environment, […]</p>
<p>The post <a rel="nofollow" href="https://shatteredsilicon.net/aws-lambda-kiss-of-death/">The AWS Lambda ‘Kiss of Death’</a> appeared first on <a rel="nofollow" href="https://shatteredsilicon.net/">Shattered Silicon</a>.</p>
<p><a href="https://shatteredsilicon.net/aws-lambda-kiss-of-death/">The AWS Lambda ‘Kiss of Death’</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Sysbench vs MariaDB on a small server: using the same charset for all versions</title>
        <link>https://smalldatum.blogspot.com/2026/04/sysbench-vs-mariadb-on-small-server.html</link>
        <pubDate>Mon, 06 Apr 2026 03:38:00 +0000</pubDate>
        <dc:creator>Mark Callaghan</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/sysbench-vs-mariadb-on-a-small-server-using-the-same-charset-for-all-versions/</guid>
        <source url="https://smalldatum.blogspot.com/">Small Datum</source>
        <description><![CDATA[<p>This has results for sysbench vs MariaDB on a small server. I repeated tests using the same charset (latin1) for all versions as explained here. In previous results I used a multi-byte charset for modern MariaDB (probably 11.4+) by mistake and that adds a 5% CPU overhead for many tests.tl;drMariaDB has done much better than MySQL at avoid regressions from code bloat.There are several performance improvements in MariaDB 12.3 and 13.0For reads there are small regressions and frequent improvements.For writes there are  regressions up to 10%, and the biggest contributor is MariaDB 11.4Builds, configuration and hardwareI compiled MariaDB from source for versions 10.2.30, 10.2.44, 10.3.39, 10.4.34, 10.5.29, 10.6.25, 10.11.16, 11.4.10, 11.8.6, 12.3.1 and 13.0.0.The server is an ASUS ExpertCenter PN53 with AMD Ryzen 7 7735HS, 32G RAM and an m.2 device for the database. More details on it are here. The OS is Ubuntu 24.04 and the database filesystem is ext4 with discard enabled.The my.cnf files are here for 10.2, 10.3, 10.4, 10.5, 10.6, 10.11, 11.4, 11.8, 12.3 and 13.0.BenchmarkI used sysbench and my usage is explained here. To save time I only run 32 of the 42 microbenchmarks and most test only 1 type of SQL statement. Benchmarks are run with the database cached by InnoDB.The tests are run using 1 table with 50M rows. The read-heavy microbenchmarks run for 600 seconds and the write-heavy for 1800 seconds.ResultsThe microbenchmarks are split into 4 groups -- 1 for point queries, 2 for range queries, 1 for writes. For the range query microbenchmarks, part 1 has queries that don't do aggregation while part 2 has queries that do aggregation. I provide tables below with relative QPS. When the relative QPS is &#62; 1 then some version is faster than the base version. When it is &#60; 1 then there might be a regression.  The relative QPS is:(QPS for some version) / (QPS for MariaDB 10.2.30) Values from iostat and vmstat divided by QPS are here. These can help to explain why something is faster or slower because it shows how much HW is used per request.The spreadsheet with results and charts is here. Files with performance summaries are here.Results: point queriesSummaryThe y-axis starts at 0.8 to improve readability.Modern MariaDB (13.0) is faster than old MariaDB (10.2) in 7 of 9 testsThere were regressions from 10.2 through 10.5Performance has been improving from 10.6 through 13.0Results: range queries without aggregationSummaryThe y-axis starts at 0.8 to improve readability.Modern MariaDB (13.0) is faster than old MariaDB (10.2) in 2 of 5 testsThere were regressions from 10.2 through 10.5, then performance was stable from 10.6 though 11.8, and now performance has improved in 12.3 and 13.0.Results: range queries with aggregationSummaryThe y-axis starts at 0.8 to improve readability.Modern MariaDB (13.0) is faster than old MariaDB (10.2) in 1 of 8 tests and within 2% in 6 testsResults: writesSummaryThe y-axis starts at 0.8 to improve readability.Modern MariaDB (13.0) is about 10% slower than old MariaDB (10.2) in 5 of 10 tests and the largest regressions arrive in 11.4.</p>
<p><a href="https://smalldatum.blogspot.com/2026/04/sysbench-vs-mariadb-on-small-server.html">Sysbench vs MariaDB on a small server: using the same charset for all versions</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>This has results for sysbench vs MariaDB on a small server. I repeated tests using the same charset (latin1) for all versions as <a href="https://smalldatum.blogspot.com/2026/03/selecting-character-set-for-mysql-and.html">explained here</a>. In previous results I used a multi-byte charset for modern MariaDB (probably 11.4+) by mistake and that adds a 5% CPU overhead for many tests.</p>
<p>tl;dr</p>
</p>
<ul>
<li>MariaDB has done much better than MySQL at avoid regressions from code bloat.</li>
<li>There are several performance improvements in MariaDB 12.3 and 13.0</li>
<li>For reads there are small regressions and frequent improvements.</li>
<li>For writes there are  regressions up to 10%, and the biggest contributor is MariaDB 11.4</li>
</ul>
<div><b>Builds, configuration and hardware</b></div>
<div>
<div>
</p>
<div></div>
</p>
<div>I compiled MariaDB from source for versions 10.2.30, 10.2.44, 10.3.39, 10.4.34, 10.5.29, 10.6.25, 10.11.16, 11.4.10, 11.8.6, 12.3.1 and 13.0.0.</div>
</div>
<p>The server is an ASUS ExpertCenter PN53 with AMD Ryzen 7 7735HS, 32G RAM and an m.2 device for the database. More details on it <a href="https://smalldatum.blogspot.com/2022/10/small-servers-for-performance-testing-v4.html">are here</a>. The OS is Ubuntu 24.04 and the database filesystem is ext4 with discard enabled.</p>
<p>The my.cnf files are here for <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/ma100244_rel_withdbg/etc/my.cnf.cz12a_c8r32">10.2</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/ma100339_rel_withdbg/etc/my.cnf.cz12a_c8r32">10.3</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/ma100434_rel_withdbg/etc/my.cnf.cz12a_c8r32">10.4</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/ma100527_rel_withdbg/etc/my.cnf.cz12a_c8r32">10.5</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/ma100620_rel_withdbg/etc/my.cnf.cz12a_c8r32">10.6</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/ma101110_rel_withdbg/etc/my.cnf.cz12a_c8r32">10.11</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/ma110404_rel_withdbg/etc/my.cnf.cz12b_c8r32">11.4</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/ma110803_rel_withdbg/etc/my.cnf.cz12b_c8r32">11.8</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/ma1203/etc/my.cnf.cz12b_c8r32">12.3 and 13.0</a>.</p>
<p><b>Benchmark</b></p>
<div>
<div>I used sysbench and my usage is <a href="http://smalldatum.blogspot.com/2017/02/using-modern-sysbench-to-compare.html">explained here</a>. To save time I only run 32 of the 42 microbenchmarks and most test only 1 type of SQL statement. Benchmarks are run with the database cached by InnoDB.</div>
<div>The tests are run using 1 table with 50M rows. The read-heavy microbenchmarks run for 600 seconds and the write-heavy for 1800 seconds.</div>
</div>
</div>
<div></div>
<div>
<div><b>Results</b></div>
<div><span></p>
<div></div>
<div><span>The microbenchmarks are split into 4 groups &#8212; 1 for point queries, 2 for range queries, 1 for writes. For the range query microbenchmarks, part 1 has queries that don&#8217;t do aggregation while part 2 has queries that do aggregation. </span></div>
<div>I provide tables below with relative QPS. <span>When the relative QPS is &gt; 1 then </span><i>some version</i><span> is faster than the</span><span> </span><i>base version.</i><span> When it is &lt; 1 then there might be a regression.  </span><span>The relative QPS is:</span></div>
<div>
<div></div>
<blockquote><p>(QPS for some version) / (QPS for MariaDB 10.2.30)<span> </span></p></blockquote>
</div>
<div><span>Values from iostat and vmstat divided by QPS <a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.pn53.sb.ma.latin/o.met.latest">are here</a>. </span><span>These can help to explain why something is faster or slower because it shows how much HW is used per request.</span></div>
<div><span><br /></span></div>
<div><span>The spreadsheet with results and charts <a href="https://docs.google.com/spreadsheets/d/1rG3YaQd4BNKsDQBqEikW_P5neGL6ELq5C3cCt3x63oc/edit?usp=sharing">is here</a>. Files with performance summaries <a href="https://github.com/mdcallag/mytools/tree/master/bench/arc/apr26.pn53.sb.ma.latin">are here</a>.</span></div>
<div><span><br /></span></div>
<div><span><b>Results: point queries</b></span></div>
<div><span><br /></span></div>
<div>Summary</div>
<div>
<ul>
<li>The y-axis starts at 0.8 to improve readability.</li>
<li>Modern MariaDB (13.0) is faster than old MariaDB (10.2) in 7 of 9 tests</li>
<ul>
<li>There were regressions from 10.2 through 10.5</li>
<li>Performance has been improving from 10.6 through 13.0</li>
</ul>
</ul>
</div>
<div><span><br /></span></div>
<div>
<div class="separator"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS-plejCaTpjbyOeMglmeK4wDrgJKu6oGkBGRySzpoczJGWcHzfOw07_brkq7CgQPJcJk6LFpkms5d5CVUUwewQXuzCHSdZ0G5CXVtn3Rfzeupno4Qj0PK2_cS3JNzEeQgXQvnTYy8VMxrjKmeiDheuPG1fyuZ-xNw51Vsj596Bhq6BLjHl92paO0W9kOq/s600/QPS%20relative%20to%2010.2.30_%20point%20queries.png"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS-plejCaTpjbyOeMglmeK4wDrgJKu6oGkBGRySzpoczJGWcHzfOw07_brkq7CgQPJcJk6LFpkms5d5CVUUwewQXuzCHSdZ0G5CXVtn3Rfzeupno4Qj0PK2_cS3JNzEeQgXQvnTYy8VMxrjKmeiDheuPG1fyuZ-xNw51Vsj596Bhq6BLjHl92paO0W9kOq/w640-h396/QPS%20relative%20to%2010.2.30_%20point%20queries.png" width="640"></a></div>
<p><span><b>Results: range queries </b></span><b>without aggregation</b></div>
<div><span></p>
<div><span><br /></span></div>
<div>Summary</div>
<div>
<ul>
<li>The y-axis starts at 0.8 to improve readability.</li>
<li>Modern MariaDB (13.0) is faster than old MariaDB (10.2) in 2 of 5 tests</li>
<ul>
<li>There were regressions from 10.2 through 10.5, then performance was stable from 10.6 though 11.8, and now performance has improved in 12.3 and 13.0.</li>
</ul>
</ul>
</div>
<div>
<div class="separator"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuWI8AKtma5sPXcBYov7aSw_t4_a1sOoH_91TTHWA055KXuaE6CHbwTkE77q5iw86LNs38Wg-xwkqcVoGVpENLktRyYG-0nIvKnkc1vvWmZPSrR8eWG2DlUMTZEokyi7oZYSRYpWmsc8Z7orfL2ImO1jS_3ba2wT9STCLm3PYn6MoNfLi9JTwq1ndThEqO/s600/QPS%20relative%20to%2010.2.30_%20range%20queries%20without%20aggregation.png"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuWI8AKtma5sPXcBYov7aSw_t4_a1sOoH_91TTHWA055KXuaE6CHbwTkE77q5iw86LNs38Wg-xwkqcVoGVpENLktRyYG-0nIvKnkc1vvWmZPSrR8eWG2DlUMTZEokyi7oZYSRYpWmsc8Z7orfL2ImO1jS_3ba2wT9STCLm3PYn6MoNfLi9JTwq1ndThEqO/w640-h396/QPS%20relative%20to%2010.2.30_%20range%20queries%20without%20aggregation.png" width="640"></a></div>
<p><b>Results: range queries with aggregation</b></div>
<div><span></p>
<div><span><br /></span></div>
<div>Summary</div>
<div>
<ul>
<li>The y-axis starts at 0.8 to improve readability.</li>
<li>Modern MariaDB (13.0) is faster than old MariaDB (10.2) in 1 of 8 tests and within 2% in 6 tests</li>
</ul>
</div>
<div>
<div class="separator"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1EbOOoVHxU1ftQ0nLJIpkwfFx2nCxd7JKgphN10k850422eKfNwaaHVM9X8iSmHqDukfX6FF4Twb4Asqjch6qv4BSiZ5PvmZPe3abx4jEjmnZMk_GMmuf0QaI0AGR86ZXlW2GOcWL_C-hm8TgUHY6kg2CgkAdjt5BFXFKv4iWgC49rwUUllO0jroHknbm/s600/QPS%20relative%20to%2010.2.30_%20range%20queries%20with%20aggregation.png"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1EbOOoVHxU1ftQ0nLJIpkwfFx2nCxd7JKgphN10k850422eKfNwaaHVM9X8iSmHqDukfX6FF4Twb4Asqjch6qv4BSiZ5PvmZPe3abx4jEjmnZMk_GMmuf0QaI0AGR86ZXlW2GOcWL_C-hm8TgUHY6kg2CgkAdjt5BFXFKv4iWgC49rwUUllO0jroHknbm/w640-h396/QPS%20relative%20to%2010.2.30_%20range%20queries%20with%20aggregation.png" width="640"></a></div>
<p><b>Results: writes</b></div>
<div><span></p>
<div><span><br /></span></div>
<div>Summary</div>
<div>
<ul>
<li><span>The y-axis starts at 0.8 to improve readability.</span></li>
<li>Modern MariaDB (13.0) is about 10% slower than old MariaDB (10.2) in 5 of 10 tests and the largest regressions arrive in 11.4.</li>
</ul>
</div>
<div>
<div class="separator"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX77y2o1vLXSI64YguijPy17prsrARgyAAj53ZlmrvyJ9bRv33fuNp7IK5k6OieNZcBVoya5s8Ueuw6DBYSpXOaWNKArHb4oA5g29OiR5fNyCrDFGoQ76TmjDNQzlRpTQUbVuUCSrC8tG4c3RDkV-2kpXAzmNAgqElez2cTtlTfHGtFQNG-frMrmMSe8Yk/s600/QPS%20relative%20to%2010.2.30_%20writes.png"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX77y2o1vLXSI64YguijPy17prsrARgyAAj53ZlmrvyJ9bRv33fuNp7IK5k6OieNZcBVoya5s8Ueuw6DBYSpXOaWNKArHb4oA5g29OiR5fNyCrDFGoQ76TmjDNQzlRpTQUbVuUCSrC8tG4c3RDkV-2kpXAzmNAgqElez2cTtlTfHGtFQNG-frMrmMSe8Yk/w640-h396/QPS%20relative%20to%2010.2.30_%20writes.png" width="640"></a></div>
</div>
<p></span></div>
<p></span></div>
<p></span></div>
<p></span></div>
</div>
<p><a href="https://smalldatum.blogspot.com/2026/04/sysbench-vs-mariadb-on-small-server.html">Sysbench vs MariaDB on a small server: using the same charset for all versions</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>CPU-bound sysbench on a large server: Postgres, MySQL and MariaDB</title>
        <link>https://smalldatum.blogspot.com/2026/04/cpu-bound-sysbench-on-large-server.html</link>
        <pubDate>Sat, 04 Apr 2026 02:30:00 +0000</pubDate>
        <dc:creator>Mark Callaghan</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/cpu-bound-sysbench-on-a-large-server-postgres-mysql-and-mariadb/</guid>
        <source url="https://smalldatum.blogspot.com/">Small Datum</source>
        <description><![CDATA[<p>This post has results for CPU-bound sysbench vs Postgres, MySQL and MariaDB on a large server using older and newer releases. The goal is to measure:how performance changes over time from old versions to new versionsperformance between modern MySQL, MariaDB and PostgresThe context here is a collection of microbenchmarks using a large server with high concurrency. Results on other workloads might be different. But you might be able to predict performance for a more complex workload using the data I share here.tl;drfor point queriesPostgres is faster than MySQL, MySQL is faster than MariaDBmodern MariaDB suffers from huge regressions that arrived in 10.5 and remain in 12.xfor range queries without aggregationMySQL is about as fast as MariaDB, both are faster than Postgres (often 2X faster)for range queries with aggregationMySQL is about as fast as MariaDB, both are faster than Postgres (often 2X faster)for writesPostgres is much faster than MariaDB and MySQL (up to 4X faster)MariaDB is between 1.3X and 1.5X faster than MySQLon regressionsPostgres tends to be boring with few regressions from old to new versionsMySQL and MariaDB are exciting, with more regressions to debugHand-wavy summaryMy hand-wavy summary about performance over time has been the following. It needs a revision, but also needs to be concise. Modern Postgres is about as fast as old Postgres, with some improvements. It has done great at avoiding perf regressions.Modern MySQL at low concurrency has many performance regressions from new CPU overheads (code bloat). At high concurrency it is faster than old MySQL because the improvements for concurrency are larger than the regressions from code bloat.Modern MariaDB at low concurrency has similar perf as old MariaDB. But at high concurrency it has large regressions for point queries, small regressions for range queries and some large improvements for writes. Note that many things use point queries internally - range scan on non-covering index, updates, deletes. The regressions arrive in 10.5, 10.6, 10.11 and 11.4.For results on a small server with a low concurrency workload, I have many posts including:MySQL and MariaDB from 2024MySQL-only from 2026Postgres from 2025Builds, configuration and hardwareI compiled:Postgres from source for versions 12.22, 13.23, 14.21, 15.16, 16.12, 17.8 and 18.2.MySQL from source for versions 5.6.51, 5.7.44, 8.0.44, 8.4.7 and 9.5.0MariaDB from source for versions 10.2.30, 10.2.44, 10.3.39, 10.4.34, 10.5.29, 10.6.25, 10.11.15, 11.4.10, 11.8.6, 12.2.2 and 12.3.1I used a 48-core server from Hetzneran ax162s with an AMD EPYC 9454P 48-Core Processor with SMT disabled2 Intel D7-P5520 NVMe storage devices with RAID 1 (3.8T each) using ext4128G RAMUbuntu 22.04 running the non-HWE kernel (5.5.0-118-generic). The server has since been updated to Ubuntu 24.04 and I am repeating tests.Configuration files for Postgres:the config file is named conf.diff.cx10a_c32r128 (x10a_c32r128) and is here for versions 12, 13, 14, 15, 16 and 17.for Postgres 18 I used conf.diff.cx10b_c32r128 (x10b_c32r128) which is as close as possible to the Postgres 17 config and uses io_method=syncThe my.cnf files for MySQL are here: 5.6.51, 5.7.44, 8.0.4x, 8.4.x, 9.x.0The my.cnf files for MariaDB are here: 10.2, 10.3, 10.4, 10.5, 10.6, 10.11, 11.4, 11.8, 12.2, 12.3.I thought I was using the latin1 charset for all versions of MariaDB and MySQL but I recently learned I was using somehting like utf8mb4 on recent versions (maybe MariaDB 11.4+ and MySQL 8.0+). See here for details. I will soon repeat tests using latin1 for all versions. For some tests, the use of a multi-byte charset increases CPU overhead by up to 5%, which reduces throughput by a similar amount.With Postgres I have been using a multi-byte charset for all versions.BenchmarkI used sysbench and my usage is explained here. I now run 32 of the 42 microbenchmarks listed in that blog post. Most test only one type of SQL statement. Benchmarks are run with the database cached by Postgres.The read-heavy microbenchmarks are run for 600 seconds and the write-heavy for 900 seconds. The benchmark is run with 40 clients and 8 tables with 10M rows per table. The database is cached.The purpose is to search for regressions from new CPU overhead and mutex contention. I use the small server with low concurrency to find regressions from new CPU overheads and then larger servers with high concurrency to find regressions from new CPU overheads and mutex contention.The tests can be called microbenchmarks. They are very synthetic. But microbenchmarks also make it easy to understand which types of SQL statements have great or lousy performance. Performance testing benefits from a variety of workloads -- both more and less synthetic.ResultsThe microbenchmarks are split into 4 groups -- 1 for point queries, 2 for range queries, 1 for writes. For the range query microbenchmarks, part 1 has queries without aggregation while part 2 has queries with aggregation. I provide charts below with relative QPS. The relative QPS is the following:(QPS for some version) / (QPS for base version)When the relative QPS is &#62; 1 then some version is faster than base version.  When it is &#60; 1 then there might be a regression. When the relative QPS is 1.2 then some version is about 20% faster than base version.The per-test results from vmstat and iostat can help to explain why something is faster or slower because it shows how much HW is used per request, including CPU overhead per operation (cpu/o) and context switches per operation (cs/o) which are often a proxy for mutex contention.The spreadsheet with charts is here and in some cases is easier to read than the charts below. Files with performance summaries are archived here.The relative QPS numbers are also here for:MySQL vs MariaDB vs PostgresMySQLMariaDBPostgresFiles with HW efficiency numbers, average values from vmstat and iostat normalized by QPS, are here for:MySQL vs MariaDB vs PostgresMySQLMariaDBPostgresResults: MySQL vs MariaDB vs PostgresHW efficiency metrics are here. They have metrics from vmstat and iostat normalized by QPS.Point queriesPostgres is faster than MySQL is faster than MariaDBMySQL gets about 2X more QPS than MariaDB on 5 of the 9 testsa table for relative QPS by test is herefrom HW efficiency metrics for the random-points.range1000 test:Postgres is 1.35X faster than MySQL, MySQL is more than 2X faster than MariaDBMariaDB uses 2.28X more CPU and does 23.41X more context switches than MySQLPostgres uses less CPU but does ~1.93X more context switches than MySQLRange queries without aggregationMySQL is about as fast as MariaDB, both are faster than Postgres (often 2X faster)MariaDB has lousy results on the range-notcovered-si test because it must do many point lookups to fetch columns not in the index and MariaDB has problems with point queries at high concurrencya table for relative QPS by test is herefrom HW efficiency metrics for the scan:MySQL is 1.2X faster than Postgres and 1.5X faster than MariaDBMariaDB uses 1.19X more CPU and does ~1000X more context switches than MySQLPostgres uses 1.55X more CPU but does few context switches than MySQLRange queries with aggregationMySQL is about as fast as MariaDB, both are faster than Postgres (often 2X faster)a table for relative QPS by test is herefrom HW efficiency metrics for read-only-countMariaDB is 1.22X faster than MySQL, MySQL is 4.2X faster than PostgresMariaDB uses 1.22X more CPU than MySQL but does ~2X more context switchesPostgres uses 4.11X more CPU than MySQL and does 1.08X more context switchesQuery plans are here and MySQL + MariaDB benefit from the InnoDB clustered indexfrom HW efficiency metrics for read-only.range=10MariaDB is 1.22X faster than MySQL, MySQL is 4.2X fasterMySQL is 1.2X faster than Postgres and 1.5X faster than MariaDBMariaDB uses 1.19X more CPU and does ~1000X more context switches than MySQLPostgres uses 1.55X more CPU but does few context switches than MySQLWritesPostgres is much faster than MariaDB and MySQL (up to 4X faster)MariaDB is between 1.3X and 1.5X faster than MySQLa table for relative QPS by test is herefrom HW efficiency metrics for insertPostgres is 3.03X faster than MySQL, MariaDB is 1.32X faster than MySQLMySQL uses ~1.5X more CPU than MariaDB and ~2X more CPU than PostgresMySQL does ~1.3X more context switches than MariaDB and ~2.9X more than PostgresResults: MySQLHW efficiency metrics are here. They have metrics from vmstat and iostat normalized by QPS.Point queriesFor 7 of 9 tests QPS is ~1.8X larger or more in 5.7.44 than in 5.6.51For 2 tests there are small regressions after 5.6.51 -- points-covered-si &#38; points-notcovered-sia table for relative QPS by test is herefrom HW efficiency metrics for points-covered-si:the regression is explained by an increase in CPURange queries without aggregationthere is a small regression from 5.6 to 5.7 and a larger one from 5.7 to 8.0a table for relative QPS by test is herefrom HW efficiency metrics for range-covered-pk:CPU overhead grows by up to 1.4X after 5.6.51, this is true for all of the testsRange queries with aggregationregressions after 5.6.51 here are smaller than in the other groups, but 5.7 tends to do better than 8.0, 8.4 and 9.5a table for relative QPS by test is hereHW efficiency metrics are here for read-only_range=100QPS changes because CPU/query changesWritesQPS improves after 5.6 by up to ~7Xa table for relative QPS by test is hereHW efficiency metrics are here insertQPS improves after 5.6.51 because CPU per statement dropsResults: MariaDBHW efficiency metrics are here. The have metrics from vmstat and iostat normalized by QPS.Point queriesQPS for 6 of 9 tests drops in half (or more) from 10.2 to 12.3a table for relative QPS is heremost of the regressions arrive in 10.5 and the root cause might be remove support for innodb_buffer_pool_intances and only support one buffer pool instanceHW efficiency metrics are here for points-covered-pkthere are large increases in CPU overhead and the context switch rate starting in 10.5Range queries without aggregationfor range-covered-* and range-notcovered-pk there is a small regression in 10.4for range-not-covered-si there is a large regression in 10.5 because this query does frequent point lookups on the PK to get missing columnsfor scan there is a regression in 10.5 that goes away, but the regressions return in 10.11 and 11.4 a table for relative QPS by test is hereHW efficiency metrics are hereRange queries with aggregationfor most tests there are small regressions in 10.4 and 10.5a table for relative QPS by test is hereHW efficiency metrics are hereWritesfor most tests modern MariaDB is faster than 10.2table for relative QPS by test is hereHW efficiency metrics are hereResults: PostgresHW efficiency metrics are here. They have metrics from vmstat and iostat normalized by QPS.Point queriesQPS for hot-points increased by ~2.5X starting in Postgres 17.xotherwise QPS is stable from 12.22 through 18.2a table for relative QPS by test is hereHW efficiency metrics for the hot-points test are hereCPU drops by more than half starting in 17.xRange queries without aggregationQPS is stable for the range-not-covered-* and scan testsQPS drops almost in half for the range-covered-* testsa table for relative QPS by test is hereall versions use the same query plan for the range-covered-pk testHW efficiency metrics are here for range-covered-pk and for range-covered-siAn increase in CPU overhead explains the regressions for range-covered-*I hope to get flamegraphs and thread stacks for these tests to explain what happensRange queries with aggregationQPS is stable from 12.22 through 18.2a table for relative QPS by test is hereHW efficiency metrics are hereWritesQPS is stable for 5 of 10 testsQPS improves by up to 1.7X for the other 5 tests, most of that arrives in 17.xa table for relative QPS by test is hereHW efficiency metrics are here for update-indexCPU overhead and context switch rates drop almost in half starting in 17.x</p>
<p><a href="https://smalldatum.blogspot.com/2026/04/cpu-bound-sysbench-on-large-server.html">CPU-bound sysbench on a large server: Postgres, MySQL and MariaDB</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>This post has results for CPU-bound sysbench vs Postgres, MySQL and MariaDB on a large server using older and newer releases. </p>
<p>The goal is to measure:</p>
<ul>
<li>how performance changes over time from old versions to new versions</li>
<li>performance between modern MySQL, MariaDB and Postgres</li>
</ul>
<p>The context here is a collection of microbenchmarks using a large server with high concurrency. Results on other workloads might be different. But you might be able to predict performance for a more complex workload using the data I share here.</p>
<p>tl;dr</p>
<div>
<ul>
<li>for point queries</li>
<ul>
<li>Postgres is faster than MySQL, MySQL is faster than MariaDB</li>
<li>modern MariaDB suffers from huge regressions that arrived in 10.5 and remain in 12.x</li>
</ul>
<li>for range queries without aggregation</li>
<ul>
<li>MySQL is about as fast as MariaDB, both are faster than Postgres (often 2X faster)</li>
</ul>
<li>for range queries with aggregation</li>
<ul>
<li>MySQL is about as fast as MariaDB, both are faster than Postgres (often 2X faster)</li>
</ul>
<li>for writes</li>
<ul>
<li>Postgres is much faster than MariaDB and MySQL (up to 4X faster)</li>
<li>MariaDB is between 1.3X and 1.5X faster than MySQL</li>
</ul>
<li>on regressions</li>
<ul>
<li>Postgres tends to be boring with few regressions from old to new versions</li>
<li>MySQL and MariaDB are exciting, with more regressions to debug</li>
</ul>
</ul>
</div>
<div><b>Hand-wavy summary</b></div>
<div></div>
<div>My hand-wavy summary about performance over time has been the following. It needs a revision, but also needs to be concise. <br /><span><br /><span>Modern Postgres is about as fast as old Postgres, with some improvements. It has done great at avoiding perf regressions.</span><span><br /></span><span><br /></span><span>Modern MySQL at low concurrency has many performance regressions from new CPU overheads (code bloat). At high concurrency it is faster than old MySQL because the improvements for concurrency are larger than the regressions from code bloat.</span><span><br /></span><span><br /></span><span>Modern MariaDB at low concurrency has similar perf as old MariaDB. But at high concurrency it has large regressions for point queries, small regressions for range queries and some large improvements for writes. Note that many things use point queries internally &#8211; range scan on non-covering index, updates, deletes. The regressions arrive in 10.5, 10.6, 10.11 and 11.4.</span></span></div>
<div><span><span><br />For results on a small server with a low concurrency workload, I have many posts including:</p>
<ul>
<li><a href="https://smalldatum.blogspot.com/2024/04/sysbench-on-small-server-mariadb-and.html">MySQL and MariaDB</a> from 2024</li>
<li><a href="https://smalldatum.blogspot.com/2026/03/sysbench-vs-mysql-on-small-server-no.html">MySQL-only</a> from 2026</li>
<li><a href="https://smalldatum.blogspot.com/2025/09/postgres-180-vs-sysbench-on-small-server.html">Postgres</a> from 2025</li>
</ul>
<div>
<div><b>Builds, configuration and hardware</b></div>
<div>
<div>I compiled:</div>
<div>
<ul>
<li>Postgres from source for versions 12.22, 13.23, 14.21, 15.16, 16.12, 17.8 and 18.2.</li>
<li>MySQL from source for versions 5.6.51, 5.7.44, 8.0.44, 8.4.7 and 9.5.0</li>
<li>MariaDB from source for versions 10.2.30, 10.2.44, 10.3.39, 10.4.34, 10.5.29, 10.6.25, 10.11.15, 11.4.10, 11.8.6, 12.2.2 and 12.3.1</li>
</ul>
</div>
<div><span>I used a 48-core server from Hetzner</span></div>
<div>
<ul>
<li>an ax162s with an AMD EPYC 9454P 48-Core Processor with SMT disabled</li>
<li>2 Intel D7-P5520 NVMe storage devices with RAID 1 (3.8T each) using ext4</li>
<li>128G RAM</li>
<li>Ubuntu 22.04 running the non-HWE kernel (5.5.0-118-generic). The server has since been updated to Ubuntu 24.04 and I am repeating tests.</li>
</ul>
<div>
<div><span>Configuration files for Postgres:</span></div>
<div>
<ul>
<li><span>the config file is named conf.diff.cx10a_c32r128 (x10a_c32r128) and is here for versions </span><a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/pg1219_o2nofp/conf.diff.cx10a_c32r128">12</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/pg1315_o2nofp/conf.diff.cx10a_c32r128">13</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/pg1412_o2nofp/conf.diff.cx10a_c32r128">14</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/pg157_o2nofp/conf.diff.cx10a_c32r128">15</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/pg163_o2nofp/conf.diff.cx10a_c32r128">16</a> and <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/pg17beta1_o2nofp/conf.diff.cx10a_c32r128">17</a>.</li>
<li>for Postgres 18 I used <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/pg18beta3_o2nofp/conf.diff.cx10b_c32r128">conf.diff.cx10b_c32r128</a><span> </span><span>(x10b_c32r128) which is as close as possible to the Postgres 17 config and </span>uses io_method=sync</li>
</ul>
<div>The my.cnf files for MySQL are here: <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/my5651_rel_o2nofp/etc/my.cnf.cz12a_c32r128">5.6.51</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/my5744_rel_o2nofp/etc/my.cnf.cz12a_c32r128">5.7.44</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/my8043_rel_o2nofp/etc/my.cnf.cz12a_c32r128">8.0.4x</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/my8406_rel_o2nofp/etc/my.cnf.cz12a_c32r128">8.4.x</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/my9400_rel_o2nofp/etc/my.cnf.cz12a_c32r128">9.x.0</a></div>
<div></div>
<div>The my.cnf files for MariaDB are here: <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/ma100244_rel_withdbg/etc/my.cnf.cz12a_c32r128">10.2</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/ma100339_rel_withdbg/etc/my.cnf.cz12a_c32r128">10.3</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/ma100433_rel_withdbg/etc/my.cnf.cz12a_c32r128">10.4</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/ma100524_rel_withdbg/etc/my.cnf.cz12a_c32r128">10.5</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/ma100617_rel_withdbg/etc/my.cnf.cz12a_c32r128">10.6</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/ma101107_rel_withdbg/etc/my.cnf.cz12a_c32r128">10.11</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/ma110401_rel_withdbg/etc/my.cnf.cz12b_c32r128">11.4</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/ma110803_rel_withdbg/etc/my.cnf.cz12b_c32r128">11.8</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/ma120101_rel_withdbg/etc/my.cnf.cz12b_c32r128">12.2</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c32r128/ma1203/etc/my.cnf.cz12b_c32r128">12.3</a>.</p>
<p>I thought I was using the latin1 charset for all versions of MariaDB and MySQL but I recently learned I was using somehting like utf8mb4 on recent versions (maybe MariaDB 11.4+ and MySQL 8.0+). <a href="https://smalldatum.blogspot.com/2026/03/selecting-character-set-for-mysql-and.html">See here</a> for details. I will soon repeat tests using latin1 for all versions. For some tests, the use of a multi-byte charset increases CPU overhead by up to 5%, which reduces throughput by a similar amount.</div>
<div></div>
<div>With Postgres I have been using a multi-byte charset for all versions.</div>
<div></div>
<div>
<div>
<div><b>Benchmark</b></div>
<div>
<div></div>
<div>I used sysbench and my usage is <a href="http://smalldatum.blogspot.com/2017/02/using-modern-sysbench-to-compare.html">explained here</a>. I now run 32 of the 42 microbenchmarks listed in that blog post. Most test only one type of SQL statement. Benchmarks are run with the database cached by Postgres.</div>
<div>The read-heavy microbenchmarks are run for 600 seconds and the write-heavy for 900 seconds. The benchmark is run with 40 clients and 8 tables with 10M rows per table. The database is cached.</div>
</div>
</div>
<div></div>
<div>The purpose is to search for regressions from new CPU overhead and mutex contention. I use the small server with low concurrency to find regressions from new CPU overheads and then larger servers with high concurrency to find regressions from new CPU overheads and mutex contention.</div>
</div>
<div></div>
<div>The tests can be called microbenchmarks. They are very synthetic. But microbenchmarks also make it easy to understand which types of SQL statements have great or lousy performance. Performance testing benefits from a variety of workloads &#8212; both more and less synthetic.</div>
<div></div>
<div>
<div><b>Results</b></div>
<div><span></p>
<div></div>
<div><span>The microbenchmarks are split into 4 groups &#8212; 1 for point queries, 2 for range queries, 1 for writes. For the range query microbenchmarks, part 1 has queries without aggregation while part 2 has queries with aggregation. </span></div>
<div>I provide charts below with relative QPS. The relative QPS is the following:</div>
<div>
<div></div>
<blockquote><p>(QPS for some version) / (QPS for base version)</p></blockquote>
</div>
<div><span>When the relative QPS is &gt; 1 then </span><i>some version</i><span> is faster than <i>base version</i></span><span>.  When it is &lt; 1 then there might be a regression. When the relative QPS is 1.2 then <i>some version</i> is about 20% faster than </span><i>base version</i><span>.</span></div>
<div><span><br /></span></div>
<div><span>The per-test results from vmstat and iostat </span><span>can help to explain why something is faster or slower because it shows how much HW is used per request, including CPU overhead per operation (cpu/o) and context switches per operation (cs/o) which are often a proxy for mutex contention.</span></div>
<div><span><span><br /></span></span></div>
<div><span><span>The spreadsheet with charts <a href="https://docs.google.com/spreadsheets/d/1tDLbrRQuw0dSTzb-m1gSxtVCzuqLLQVeXAGmBWU3QOU/edit?usp=sharing">is here</a> and in some cases is easier to read than the charts below. Files with performance summaries are <a href="https://github.com/mdcallag/mytools/tree/master/bench/arc/apr26.sb.hetz">archived here</a>.</span></span></div>
<div><span><span><br /></span></span></div>
<div><span><span>The relative QPS numbers are also here for:</p>
<ul>
<li><a href="https://gist.github.com/mdcallag/b07c1f4ee95619b8e047129fdbeb3431">MySQL vs MariaDB vs Postgres</a></li>
<li><a href="https://gist.github.com/mdcallag/b743672d5a7df142a34488040d7bed54">MySQL</a></li>
<li><a href="https://gist.github.com/mdcallag/b2ce4329503feeb6b4f93ca1c416e61f">MariaDB</a></li>
<li><a href="https://gist.github.com/mdcallag/34402f015bf976d2452b871a1b0ace84">Postgres</a></li>
</ul>
<div>Files with HW efficiency numbers, average values from vmstat and iostat normalized by QPS, are here for:</div>
<div>
<ul>
<li><a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.my.ma.pg.latest">MySQL vs MariaDB vs Postgres</a></li>
<li><a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.my.latest">MySQL</a></li>
<li><a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.ma.latest">MariaDB</a></li>
<li><a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.pg.latest">Postgres</a></li>
</ul>
</div>
<p></span></span></div>
<div><span><span><b>Results: MySQL vs MariaDB vs Postgres</b></span></span></div>
<div></div>
<div>HW efficiency metrics <a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.my.ma.pg.latest">are here</a>. They have metrics from vmstat and iostat normalized by QPS.</div>
<div></div>
<div>Point queries</div>
<div>
<ul>
<li>Postgres is faster than MySQL is faster than MariaDB</li>
<li>MySQL gets about 2X more QPS than MariaDB on 5 of the 9 tests</li>
<li>a table for relative QPS by test <a href="https://gist.github.com/mdcallag/b07c1f4ee95619b8e047129fdbeb3431#file-gistfile1-txt-L5-L15">is here</a></li>
<li>from HW efficiency metrics for the <a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.my.ma.pg.latest#L221-L229">random-points.range1000 test</a>:</li>
<ul>
<li>Postgres is 1.35X faster than MySQL, MySQL is more than 2X faster than MariaDB</li>
<li>MariaDB uses 2.28X more CPU and does 23.41X more context switches than MySQL</li>
<li>Postgres uses less CPU but does ~1.93X more context switches than MySQL</li>
</ul>
</ul>
</div>
<div>
<div class="separator"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjPc2bM3MFO7wwdlYA8lBj_gJNDzhY7AgoHEwqQ_Ae8blJ0bSjAhUiVc1ryXZmanm7MQjr5j5hR09bhCvgl5vQKxR3I5Ji7j5FBG8BKJTyYrb2lm5_lRDiQtzEoYP_Ac54LINw-R2FgdTIiHf_vJ6rPqZqfPXRcrsRhJrLiDrbt_C-oy0BfYNJW93i5dLL/s600/QPS%20relative%20to%20MySQL%208.4.7_%20point%20queries.png"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjPc2bM3MFO7wwdlYA8lBj_gJNDzhY7AgoHEwqQ_Ae8blJ0bSjAhUiVc1ryXZmanm7MQjr5j5hR09bhCvgl5vQKxR3I5Ji7j5FBG8BKJTyYrb2lm5_lRDiQtzEoYP_Ac54LINw-R2FgdTIiHf_vJ6rPqZqfPXRcrsRhJrLiDrbt_C-oy0BfYNJW93i5dLL/w640-h396/QPS%20relative%20to%20MySQL%208.4.7_%20point%20queries.png" width="640"></a></div>
<p><span>Range queries without aggregation</span></div>
<div>
<ul>
<li>MySQL is about as fast as MariaDB, both are faster than Postgres (often 2X faster)</li>
<li>MariaDB has lousy results on the range-notcovered-si test because it must do many point lookups to fetch columns not in the index and MariaDB has problems with point queries at high concurrency</li>
<li>a table for relative QPS by test <a href="https://gist.github.com/mdcallag/b07c1f4ee95619b8e047129fdbeb3431#file-gistfile1-txt-L17-L23">is here</a></li>
<li>from HW efficiency metrics for the <a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.my.ma.pg.latest#L371-L379">scan</a>:</li>
<ul>
<li>MySQL is 1.2X faster than Postgres and 1.5X faster than MariaDB</li>
<li>MariaDB uses 1.19X more CPU and does ~1000X more context switches than MySQL</li>
<li>Postgres uses 1.55X more CPU but does few context switches than MySQL</li>
</ul>
</ul>
</div>
<div><span></p>
<div class="separator"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj36Sbjy4tV3opusAs5WkGUoW1O0g10K6IEXW_D90cGiqlRb-0VnFcTqjma_ezEzoozJFGTt_rTl8XxDk9soNaen-pirWN60bIXbCkHzFIb8PGpBJbfLD8CW03BWokN5vbTYX4y2aqlDNikOd2pmuLdqmU0rHAb2AZOBfQnHaLXS061zDemYrfiFo1hIeAl/s600/QPS%20relative%20to%20MySQL%208.4.7_%20range%20queries%20without%20aggregation.png"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj36Sbjy4tV3opusAs5WkGUoW1O0g10K6IEXW_D90cGiqlRb-0VnFcTqjma_ezEzoozJFGTt_rTl8XxDk9soNaen-pirWN60bIXbCkHzFIb8PGpBJbfLD8CW03BWokN5vbTYX4y2aqlDNikOd2pmuLdqmU0rHAb2AZOBfQnHaLXS061zDemYrfiFo1hIeAl/w640-h396/QPS%20relative%20to%20MySQL%208.4.7_%20range%20queries%20without%20aggregation.png" width="640"></a></div>
<p><span>Range queries with aggregation</span></span></div>
<div>
<ul>
<li>MySQL is about as fast as MariaDB, both are faster than Postgres (often 2X faster)</li>
<li>a table for relative QPS by test <a href="https://gist.github.com/mdcallag/b07c1f4ee95619b8e047129fdbeb3431#file-gistfile1-txt-L25-L34">is here</a></li>
<li>from HW efficiency metrics for <a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.my.ma.pg.latest#L181-L189">read-only-count</a></li>
<ul>
<li>MariaDB is 1.22X faster than MySQL, MySQL is 4.2X faster than Postgres</li>
<li>MariaDB uses 1.22X more CPU than MySQL but does ~2X more context switches</li>
<li>Postgres uses 4.11X more CPU than MySQL and does 1.08X more context switches</li>
<li>Query plans <a href="https://gist.github.com/mdcallag/42306744249b368d2a54b9d44d9b1def">are here</a> and MySQL + MariaDB benefit from the InnoDB clustered index</li>
</ul>
<li>from HW efficiency metrics for <a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.my.ma.pg.latest#L111-L119">read-only.range=10</a></li>
<ul>
<li>MariaDB is 1.22X faster than MySQL, MySQL is 4.2X fasterMySQL is 1.2X faster than Postgres and 1.5X faster than MariaDB</li>
<li>MariaDB uses 1.19X more CPU and does ~1000X more context switches than MySQL</li>
<li>Postgres uses 1.55X more CPU but does few context switches than MySQL</li>
</ul>
</ul>
</div>
<div class="separator"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm6dkOB_tSUPWWEfHDruFZZZNyS4_ROXA8INJWZwUsYPDmYIoP1NEWN8lqYlEa6T-F2XDmbJBTIxk82WEPKkHYeLtQ3HjE20lZetR4LxrpTL-eDhYYTH9iRu-ReqJH2Wri7HdDGQTvo1f1cClV0OksifLhOnmFsi_nRF8RyVVNt-OiPRY04k06gHhBy-Np/s600/QPS%20relative%20to%20MySQL%208.4.7_%20range%20queries%20with%20aggregation.png"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm6dkOB_tSUPWWEfHDruFZZZNyS4_ROXA8INJWZwUsYPDmYIoP1NEWN8lqYlEa6T-F2XDmbJBTIxk82WEPKkHYeLtQ3HjE20lZetR4LxrpTL-eDhYYTH9iRu-ReqJH2Wri7HdDGQTvo1f1cClV0OksifLhOnmFsi_nRF8RyVVNt-OiPRY04k06gHhBy-Np/w640-h396/QPS%20relative%20to%20MySQL%208.4.7_%20range%20queries%20with%20aggregation.png" width="640"></a></div>
<div><span>Writes</span></div>
<div>
<ul>
<li>Postgres is much faster than MariaDB and MySQL (up to 4X faster)</li>
<li>MariaDB is between 1.3X and 1.5X faster than MySQL</li>
<li>a table for relative QPS by test <a href="https://gist.github.com/mdcallag/b07c1f4ee95619b8e047129fdbeb3431#file-gistfile1-txt-L36-L47">is here</a></li>
<li>from HW efficiency metrics for <a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.my.ma.pg.latest#L341-L349">insert</a></li>
<ul>
<li>Postgres is 3.03X faster than MySQL, MariaDB is 1.32X faster than MySQL</li>
<li>MySQL uses ~1.5X more CPU than MariaDB and ~2X more CPU than Postgres</li>
<li>MySQL does ~1.3X more context switches than MariaDB and ~2.9X more than Postgres</li>
</ul>
</ul>
</div>
<p></span></p>
<div class="separator"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFQwpcPaXmp4RAQLHrjxueanJ9RlZdlFUj7UhhyQpWw-_K4Y1T-rOVmr22I_n8N6LR7L_ItB8hPRDCUiNsMgs7iXkSTXfX-CM-SI0C2RgAPCBnSHaxsOgkmgcES49_Gbzz3vsvt1Dau5A7awp-PgObBk_FgGwMiIZoafEgv1HlQxEGU9G1MXRns7HSDQvA/s600/QPS%20relative%20to%20MySQL%208.4.7_%20writes.png"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFQwpcPaXmp4RAQLHrjxueanJ9RlZdlFUj7UhhyQpWw-_K4Y1T-rOVmr22I_n8N6LR7L_ItB8hPRDCUiNsMgs7iXkSTXfX-CM-SI0C2RgAPCBnSHaxsOgkmgcES49_Gbzz3vsvt1Dau5A7awp-PgObBk_FgGwMiIZoafEgv1HlQxEGU9G1MXRns7HSDQvA/w640-h396/QPS%20relative%20to%20MySQL%208.4.7_%20writes.png" width="640"></a></div>
</div>
</div>
<div><b>Results: MySQL</b></div>
<div>
<div><span><br /></span></div>
<div><span>HW efficiency metrics </span><a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.my.latest">are here</a><span>. They have metrics from vmstat and iostat normalized by QPS.</span></div>
</div>
<div></div>
<div><span></p>
<div>Point queries</div>
<div>
<ul>
<li><span>For 7 of 9 tests QPS is ~1.8X larger or more in 5.7.44 than in 5.6.51</span></li>
<li><span>For 2 tests there are small regressions after 5.6.51 &#8212; points-covered-si &amp; points-notcovered-si</span></li>
<li>a table for relative QPS by test <a href="https://gist.github.com/mdcallag/b743672d5a7df142a34488040d7bed54#file-gistfile1-txt-L7-L17">is here</a></li>
<li>from HW efficiency metrics for <a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.my.latest#L407-L419">points-covered-si</a>:</li>
<ul>
<li>the regression is explained by an increase in CPU</li>
</ul>
</ul>
</div>
<p></span></div>
<div>
<div class="separator"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP4At7Kh-gvULwMVwRINHWt-KQ8rnMd0cRT-dYzOh0We9Q2d7ETfNDYb-ESNWZ5AU1JJhPHQyQuwsEtcqdxYuhFiXImhHV0mUOhsZUd9JtCHZhtursFNpIk_Btqwf-XBj76HoxAG-Uiv2VuOfHDZgZpyC-RIMbavDVhrNj32EK73D2cCrOIgdt5I-V1COg/s600/QPS%20relative%20to%20MySQL%205.6.51_%20point%20queries.png"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP4At7Kh-gvULwMVwRINHWt-KQ8rnMd0cRT-dYzOh0We9Q2d7ETfNDYb-ESNWZ5AU1JJhPHQyQuwsEtcqdxYuhFiXImhHV0mUOhsZUd9JtCHZhtursFNpIk_Btqwf-XBj76HoxAG-Uiv2VuOfHDZgZpyC-RIMbavDVhrNj32EK73D2cCrOIgdt5I-V1COg/w640-h396/QPS%20relative%20to%20MySQL%205.6.51_%20point%20queries.png" width="640"></a></div>
<p><span>Range queries without aggregation</span></div>
<div>
<ul>
<li>there is a small regression from 5.6 to 5.7 and a larger one from 5.7 to 8.0</li>
<li>a table for relative QPS by test <a href="https://gist.github.com/mdcallag/b743672d5a7df142a34488040d7bed54#file-gistfile1-txt-L19-L25">is here</a></li>
<li>from HW efficiency metrics for <a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.my.latest#L407-L419">range-covered-pk</a>:</li>
<ul>
<li>CPU overhead grows by up to 1.4X after 5.6.51, this is true for all of the tests</li>
</ul>
</ul>
</div>
<div>
<div class="separator"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivH-1mjq0V6Qwlz8E37klAz0Gzsbaz5W9Kvlts1H2YxiJO73mFcuoovANETn6v8vfqcMjVUCOZNVCZ3COvBcbAUtChbxfaTuBN3kJ9dFiiy-sRQGoLKLgmmeeZBmC9kJgk3jNLKcsbYHPWqy7xvlvv9bD_zZSZB40xS85xcL6ZUVvWA0CbT4IO9-TimpUG/s600/QPS%20relative%20to%20MySQL%205.6.51_%20range%20queries%20without%20aggregation.png"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivH-1mjq0V6Qwlz8E37klAz0Gzsbaz5W9Kvlts1H2YxiJO73mFcuoovANETn6v8vfqcMjVUCOZNVCZ3COvBcbAUtChbxfaTuBN3kJ9dFiiy-sRQGoLKLgmmeeZBmC9kJgk3jNLKcsbYHPWqy7xvlvv9bD_zZSZB40xS85xcL6ZUVvWA0CbT4IO9-TimpUG/w640-h396/QPS%20relative%20to%20MySQL%205.6.51_%20range%20queries%20without%20aggregation.png" width="640"></a></div>
<p><span>Range queries with aggregation</span></div>
<div>
<ul>
<li>regressions after 5.6.51 here are smaller than in the other groups, but 5.7 tends to do better than 8.0, 8.4 and 9.5</li>
<li><span>a table for relative QPS by test </span><a href="https://gist.github.com/mdcallag/b743672d5a7df142a34488040d7bed54#file-gistfile1-txt-L27-L36">is here</a></li>
<li><span>HW efficiency metrics </span><a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.my.latest#L169-L181">are here</a><span> for read-only_range=100</span></li>
<ul>
<li>QPS changes because CPU/query changes</li>
</ul>
</ul>
</div>
<div>
<div class="separator"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5V6YBLhqX6yrHEcV_RvTpSomxm-GfwLqVkivGLuONr0dyWfsi9GRgyWrwf8VsG3F8UI0vhi7z6ay5Yy86jHoJlfqS3kmCwGoKWZJqxN28lwlg2hyphenhyphenjg8-_PhSELP68rgrK-UtFMx4_uljr0TV500cmlzlU5zRMrVh16CrHk0kiVE95OejIHPGv7n0_3BHY/s600/QPS%20relative%20to%20MySQL%205.6.51_%20range%20queries%20with%20aggregation.png"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5V6YBLhqX6yrHEcV_RvTpSomxm-GfwLqVkivGLuONr0dyWfsi9GRgyWrwf8VsG3F8UI0vhi7z6ay5Yy86jHoJlfqS3kmCwGoKWZJqxN28lwlg2hyphenhyphenjg8-_PhSELP68rgrK-UtFMx4_uljr0TV500cmlzlU5zRMrVh16CrHk0kiVE95OejIHPGv7n0_3BHY/w640-h396/QPS%20relative%20to%20MySQL%205.6.51_%20range%20queries%20with%20aggregation.png" width="640"></a></div>
<p><span>Writes</span></div>
<div>
<ul>
<li>QPS improves after 5.6 by up to ~7X</li>
<li><span>a table for relative QPS by test </span><a href="https://gist.github.com/mdcallag/b743672d5a7df142a34488040d7bed54#file-gistfile1-txt-L37-L49">is here</a></li>
<li><span>HW efficiency metrics </span><a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.my.latest#L477-L489">are here</a><span> insert</span></li>
<ul>
<li>QPS improves after 5.6.51 because CPU per statement drops</li>
</ul>
</ul>
</div>
<div>
<div class="separator"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRDnSyz_I2LxAClMeXK6Fv7ThDk37OXYMsVVHrCk5ebWbKSjGqbm6SmNFDI3GpTcR-uN6iGZeyFxO1CKH0XgB7D1WHtmWsj4wVH0ZOQtZvDMtKs97uTKKUbM6_jQbcCg_stYEApr7EOVqCyUW03skJKIqWqsOW4YNMo1oVFs8YadO0rZKX-3b5NyRigVGX/s600/QPS%20relative%20to%20MySQL%205.6.51_%20writes.png"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRDnSyz_I2LxAClMeXK6Fv7ThDk37OXYMsVVHrCk5ebWbKSjGqbm6SmNFDI3GpTcR-uN6iGZeyFxO1CKH0XgB7D1WHtmWsj4wVH0ZOQtZvDMtKs97uTKKUbM6_jQbcCg_stYEApr7EOVqCyUW03skJKIqWqsOW4YNMo1oVFs8YadO0rZKX-3b5NyRigVGX/w640-h396/QPS%20relative%20to%20MySQL%205.6.51_%20writes.png" width="640"></a></div>
<p><b>Results: MariaDB</b></div>
<div><span></p>
<div><span><span><br /></span></span></div>
<div><span><span>HW efficiency metrics </span></span><a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.ma.latest">are here</a><span>. The have metrics from vmstat and iostat normalized by QPS.</span></div>
<div><span><span><br /></span></span></div>
<div><span><span></p>
<div><span>Point queries</span></div>
<div>
<ul>
<li>QPS for 6 of 9 tests drops in half (or more) from 10.2 to 12.3</li>
<li>a table for relative QPS <a href="https://gist.github.com/mdcallag/b2ce4329503feeb6b4f93ca1c416e61f#file-gistfile1-txt-L13-L23">is here</a></li>
<li>most of the regressions arrive in 10.5 and the root cause might be remove support for innodb_buffer_pool_intances and only support one buffer pool instance</li>
<li>HW efficiency metrics <a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.ma.latest#L625-L649">are here</a> for points-covered-pk</li>
<ul>
<li>there are large increases in CPU overhead and the context switch rate starting in 10.5</li>
</ul>
</ul>
</div>
<div>
<div class="separator"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7YV0KdAv1Z_Gx6w430JvOXzA1J6qtJjK2bkYV56jl_WDNX9Ka9Olh3nSBbWMJD3gazXl4JC_FtD-xs_V4drq2oulhC6HMI88269Msci_DgHb5yLQmiSLWIDnHGFKKV6oL_KQ8wPu8RmoDe_RrVqFvwgYe-ko_tH1WwRGjdF4QnMfOkf2kPcM24OZ5YjeN/s600/QPS%20relative%20to%20MariaDB%2010.2.30_%20point%20queries.png"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7YV0KdAv1Z_Gx6w430JvOXzA1J6qtJjK2bkYV56jl_WDNX9Ka9Olh3nSBbWMJD3gazXl4JC_FtD-xs_V4drq2oulhC6HMI88269Msci_DgHb5yLQmiSLWIDnHGFKKV6oL_KQ8wPu8RmoDe_RrVqFvwgYe-ko_tH1WwRGjdF4QnMfOkf2kPcM24OZ5YjeN/w640-h396/QPS%20relative%20to%20MariaDB%2010.2.30_%20point%20queries.png" width="640"></a></div>
<p><span>Range queries without aggregation</span></div>
<div>
<ul>
<li>for range-covered-* and range-notcovered-pk there is a small regression in 10.4</li>
<li>for range-not-covered-si there is a large regression in 10.5 because this query does frequent point lookups on the PK to get missing columns</li>
<li>for scan there is a regression in 10.5 that goes away, but the regressions return in 10.11 and 11.4 </li>
<li>a table for relative QPS by test <a href="https://gist.github.com/mdcallag/b2ce4329503feeb6b4f93ca1c416e61f#file-gistfile1-txt-L25-L31">is here</a></li>
<li>HW efficiency metrics <a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.ma.latest">are here</a></li>
</ul>
</div>
<div class="separator"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKNDY_QTl7eiVteNy2HA9WHun4Y8IAwqpwo30AtxxDFEzDyrpUnaXhZm4O61U1SueQoLvO6tqWmVs3cKBM7XqM0zQrknqXAlLng75xTOuWq-_QPr73FHj4kywTrBpGq43ShUWUNAdOtdY5XLz1iTLW_qehRGbUTTABxk8oLCmsziWjuLeT3xLJ9N4xqg6y/s600/QPS%20relative%20to%20MariaDB%2010.2.30_%20range%20queries%20without%20aggregation%20(1).png"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKNDY_QTl7eiVteNy2HA9WHun4Y8IAwqpwo30AtxxDFEzDyrpUnaXhZm4O61U1SueQoLvO6tqWmVs3cKBM7XqM0zQrknqXAlLng75xTOuWq-_QPr73FHj4kywTrBpGq43ShUWUNAdOtdY5XLz1iTLW_qehRGbUTTABxk8oLCmsziWjuLeT3xLJ9N4xqg6y/w640-h396/QPS%20relative%20to%20MariaDB%2010.2.30_%20range%20queries%20without%20aggregation%20(1).png" width="640"></a></div>
<div><span>Range queries with aggregation</span></div>
<div>
<ul>
<li>for most tests there are small regressions in 10.4 and 10.5</li>
<li>a table for relative QPS by test <a href="https://gist.github.com/mdcallag/b2ce4329503feeb6b4f93ca1c416e61f#file-gistfile1-txt-L33-L42">is here</a></li>
<li>HW efficiency metrics <a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.ma.latest">are here</a></li>
</ul>
</div>
<div>
<div class="separator"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD7iYP_ZRtGK3FJZU1ZVxqrqW2Mtj1lPhH_qnsZHo1N2H56weTl0i-4cYFuA5kriVJWi-rwJiCCEFVAozuYjq49lQ1g1DbfYhUp1noG7Qnh94Z5VTPGYf1rzi0NjBQUP-4Instv5KAUINMujXz7iBZn6YxjlkzehQo6Z-sRo8xBSvcjBFfYAquAR3FV1-W/s600/QPS%20relative%20to%20MariaDB%2010.2.30_%20range%20queries%20with%20aggregation.png"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD7iYP_ZRtGK3FJZU1ZVxqrqW2Mtj1lPhH_qnsZHo1N2H56weTl0i-4cYFuA5kriVJWi-rwJiCCEFVAozuYjq49lQ1g1DbfYhUp1noG7Qnh94Z5VTPGYf1rzi0NjBQUP-4Instv5KAUINMujXz7iBZn6YxjlkzehQo6Z-sRo8xBSvcjBFfYAquAR3FV1-W/w640-h396/QPS%20relative%20to%20MariaDB%2010.2.30_%20range%20queries%20with%20aggregation.png" width="640"></a></div>
<p><span>Writes</span></div>
<div>
<ul>
<li>for most tests modern MariaDB is faster than 10.2</li>
<li>table for relative QPS by test <a href="https://gist.github.com/mdcallag/b2ce4329503feeb6b4f93ca1c416e61f#file-gistfile1-txt-L44-L55">is here</a></li>
<li>HW efficiency metrics <a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.ma.latest">are here</a></li>
</ul>
</div>
<div>
<div class="separator"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIDUeUa6qlZg1vVirAqXU8PJKc0cLBbmu6HCe1fcJThzTot-smu5bEuv1Boon-0kxOKZ9Qu3pfFUvN_yikFW6WVzknonj3ob7JgC17SX7tLryNqOYbpQCCEO-YkmaWjJsvc9zZxj9zwTa4kZ9AmV-JKi_eeyhZ6uul1gND178hQgRmF3PdPVZndAzuyN26/s600/QPS%20relative%20to%20MariaDB%2010.2.30_%20writes.png"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIDUeUa6qlZg1vVirAqXU8PJKc0cLBbmu6HCe1fcJThzTot-smu5bEuv1Boon-0kxOKZ9Qu3pfFUvN_yikFW6WVzknonj3ob7JgC17SX7tLryNqOYbpQCCEO-YkmaWjJsvc9zZxj9zwTa4kZ9AmV-JKi_eeyhZ6uul1gND178hQgRmF3PdPVZndAzuyN26/w640-h396/QPS%20relative%20to%20MariaDB%2010.2.30_%20writes.png" width="640"></a></div>
<p><b>Results: Postgres</b></div>
<p></span></span></div>
<div><span><span></p>
<div><span><span><br /></span></span></div>
<div>HW efficiency metrics <a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.pg.latest">are here</a><span>. They have metrics from vmstat and iostat normalized by QPS.</span></div>
<p></span></span></div>
<p></span></div>
<div></div>
<div>
<div><span>Point queries</span></div>
<div>
<ul>
<li>QPS for hot-points increased by ~2.5X starting in Postgres 17.x</li>
<li>otherwise QPS is stable from 12.22 through 18.2</li>
<li>a table for relative QPS by test <a href="https://gist.github.com/mdcallag/34402f015bf976d2452b871a1b0ace84#file-gistfile1-txt-L9-L19">is here</a></li>
<li>HW efficiency metrics for the hot-points test <a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.pg.latest#L415-L431">are here</a></li>
<ul>
<li>CPU drops by more than half starting in 17.x</li>
</ul>
</ul>
</div>
<div>
<div class="separator"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDR1TNU6JDQTI4Y-6rP7CplRrZ_bKi82LP1cn7-KmiPsAMVkT4zXvr0V0Van8tqkBJreC-JY3oQHijDCH-viO_nK0K8sF-tveeRw5ClTUFaDe233VxUu4SUyuroGkjEj-SxhxbUNapK9XhMMYrnulXkJTKojMi4-WTe7C_asP01by3mn1Kmf3s8EUf7Mck/s600/QPS%20relative%20to%20Postgres%2012.22_%20point%20queries.png"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDR1TNU6JDQTI4Y-6rP7CplRrZ_bKi82LP1cn7-KmiPsAMVkT4zXvr0V0Van8tqkBJreC-JY3oQHijDCH-viO_nK0K8sF-tveeRw5ClTUFaDe233VxUu4SUyuroGkjEj-SxhxbUNapK9XhMMYrnulXkJTKojMi4-WTe7C_asP01by3mn1Kmf3s8EUf7Mck/w640-h396/QPS%20relative%20to%20Postgres%2012.22_%20point%20queries.png" width="640"></a></div>
<p><span>Range queries without aggregation</span></div>
<div>
<ul>
<li>QPS is stable for the range-not-covered-* and scan tests</li>
<li>QPS drops almost in half for the range-covered-* tests</li>
<li>a table for relative QPS by test <a href="https://gist.github.com/mdcallag/34402f015bf976d2452b871a1b0ace84#file-gistfile1-txt-L21-L27">is here</a></li>
<li>all versions use the same query plan for the range-covered-pk test</li>
<li>HW efficiency metrics are here <a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.pg.latest#L469-L485">for range-covered-pk</a> and for <a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.pg.latest#L559-L575">range-covered-si</a></li>
<ul>
<li>An increase in CPU overhead explains the regressions for range-covered-*</li>
<li>I hope to get flamegraphs and thread stacks for these tests to explain what happens</li>
</ul>
</ul>
</div>
<div>
<div class="separator"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJNz0U4RR5pJIvkthpcLoL7mBpl-W_pnQcOesqGmzZHXxXol-u4I7VX9b1CGUG89JxNipOjlV80pJjVb8e8tZT_uFAaNpmSeskHM4dxUShUdY_us2FCV9Z8hRqZxKrOz-foa1tVn61AbGv92u6kI__9nqlGBOVSh5lhL5Bp-9DF0GBpAh6D6sLp7Cq2iIF/s600/QPS%20relative%20to%20Postgres%2012.22_%20range%20queries%20without%20aggregation.png"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJNz0U4RR5pJIvkthpcLoL7mBpl-W_pnQcOesqGmzZHXxXol-u4I7VX9b1CGUG89JxNipOjlV80pJjVb8e8tZT_uFAaNpmSeskHM4dxUShUdY_us2FCV9Z8hRqZxKrOz-foa1tVn61AbGv92u6kI__9nqlGBOVSh5lhL5Bp-9DF0GBpAh6D6sLp7Cq2iIF/w640-h396/QPS%20relative%20to%20Postgres%2012.22_%20range%20queries%20without%20aggregation.png" width="640"></a></div>
<p><span>Range queries with aggregation</span></div>
<div>
<ul>
<li>QPS is stable from 12.22 through 18.2</li>
<li>a table for relative QPS by test <a href="https://gist.github.com/mdcallag/34402f015bf976d2452b871a1b0ace84#file-gistfile1-txt-L29-L38">is here</a></li>
<li>HW efficiency metrics <a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.pg.latest">are here</a></li>
</ul>
</div>
<div>
<div class="separator"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4UtG2u8m5vWLliRC-tXbp54BNtXuJ5ykqnsfsz5O8qXcHmfTBbe1635Jul6OfETnWSBUGnTd6Qz7dO3Yp3pipGQAdsXIygZSl3xWT5godbg_vpCkzkO24daRq_9gLWCWgA0IRO1hfJyHTNJSo-U2veMBIeKZENBya9wrqWAXHSbNvK4I49elaD1LibHct/s600/QPS%20relative%20to%20Postgres%2012.22_%20range%20queries%20with%20aggregation.png"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4UtG2u8m5vWLliRC-tXbp54BNtXuJ5ykqnsfsz5O8qXcHmfTBbe1635Jul6OfETnWSBUGnTd6Qz7dO3Yp3pipGQAdsXIygZSl3xWT5godbg_vpCkzkO24daRq_9gLWCWgA0IRO1hfJyHTNJSo-U2veMBIeKZENBya9wrqWAXHSbNvK4I49elaD1LibHct/w640-h396/QPS%20relative%20to%20Postgres%2012.22_%20range%20queries%20with%20aggregation.png" width="640"></a></div>
<p><span>Writes</span></div>
</div>
<div>
<ul>
<li>QPS is stable for 5 of 10 tests</li>
<li>QPS improves by up to 1.7X for the other 5 tests, most of that arrives in 17.x</li>
<li>a table for relative QPS by test <a href="https://gist.github.com/mdcallag/34402f015bf976d2452b871a1b0ace84#file-gistfile1-txt-L40-L51">is here</a></li>
<li>HW efficiency metrics are here for <a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.pg.latest#L73-L89">update-index</a></li>
<ul>
<li>CPU overhead and context switch rates drop almost in half <a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/apr26.sb.hetz/o.met.pg.latest#L73-L89">starting in 17.x</a></li>
</ul>
</ul>
</div>
<div>
<div class="separator"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWd7lCq0eEu0kAIABRifbRkJfQU3syKs3dBCls-MjA1t770TbY_AXBBYdArEvwJY0hhBdMLpQrq4nPa5MZUo6rk0jE-Sw2QrJcUUAmuORLDlgBDQrhBBUr0PSnJd5x6J0DZD7z6EGTvryVS2qS3rfWo_QRLfUBvfajisATtUHZDa4c3bG91oUa8q0rVOjy/s600/QPS%20relative%20to%20Postgres%2012.22_%20writes.png"><img loading="lazy" decoding="async" border="0" data-original-height="371" data-original-width="600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWd7lCq0eEu0kAIABRifbRkJfQU3syKs3dBCls-MjA1t770TbY_AXBBYdArEvwJY0hhBdMLpQrq4nPa5MZUo6rk0jE-Sw2QrJcUUAmuORLDlgBDQrhBBUr0PSnJd5x6J0DZD7z6EGTvryVS2qS3rfWo_QRLfUBvfajisATtUHZDa4c3bG91oUa8q0rVOjy/w640-h396/QPS%20relative%20to%20Postgres%2012.22_%20writes.png" width="640"></a></div>
<p><span><br /></span></div>
<div><span><br /></span></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<ul></ul>
</div>
</div>
</div>
</div>
</div>
<p></span></span></div></p>
<p><a href="https://smalldatum.blogspot.com/2026/04/cpu-bound-sysbench-on-large-server.html">CPU-bound sysbench on a large server: Postgres, MySQL and MariaDB</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Percona Bug Report: March 2026</title>
        <link>https://percona.community/blog/2026/04/03/percona-bug-report-march-2026/</link>
        <pubDate>Fri, 03 Apr 2026 00:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/percona-bug-report-march-2026/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>At Percona, we operate on the premise that full transparency makes a product better. We strive to build the best open-source database products, but also to help you manage any issues that arise in any of the databases that we support. And, in true open-source form, report back on any issues or bugs you might encounter along the way.</p>
<p><a href="https://percona.community/blog/2026/04/03/percona-bug-report-march-2026/">Percona Bug Report: March 2026</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>At Percona, we operate on the premise that full transparency makes a product better. We strive to build the best open-source database products, but also to help you manage any issues that arise in any of the databases that we support. And, in true open-source form, report back on any issues or bugs you might encounter along the way.</p>
<p>We constantly update our <a href="https://perconadev.atlassian.net/" target="_blank" rel="noopener noreferrer">bug reports</a> and monitor <a href="https://bugs.mysql.com/" target="_blank" rel="noopener noreferrer">other boards</a> to ensure we have the latest information, but we wanted to make it a little easier for you to keep track of the most critical ones. This post is a central place to get information on the most noteworthy open and recently resolved bugs.</p>
<p>In this edition of our bug report, we have the following list of bugs.</p>
<hr>
<h2>Percona Server/MySQL Bugs</h2>
<p><a href="https://perconadev.atlassian.net/browse/PS-10378" target="_blank" rel="noopener noreferrer">PS-10378</a>: In the MeCab plugin, BOOLEAN MODE full-text queries with a LIMIT clause do not behave as expected. Although the optimizer indicates that ranking should be skipped (Ft_hints: no_ranking), the query still performs full ranking and sorting before applying LIMIT, preventing the intended optimization and impacting performance.</p>
<p><strong>Reported Affected Version/s</strong>: 8.4.x<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: No workaround available<br />
<strong>Fixed/Planned Version/s</strong>: 8.0.46-37, 8.4.9-9, 9.7.0-0</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/PS-10448" target="_blank" rel="noopener noreferrer">PS-10448</a>: Insert prepared statements fail on partitioned tables with timestamp-based partitions when the partition key uses a non-constant default (e.g., <strong>CURRENT_TIMESTAMP</strong>). After initial execution, the statement remains bound to the original partition and fails with a partition mismatch error when data should go into a different partition.</p>
<p><strong>Reported Affected Version/s</strong>: 8.0.42-33, 8.0.43-34, 8.0.44-35, 8.4.7-7<br />
<strong>Upstream Bug</strong>: <a href="https://bugs.mysql.com/bug.php?id=119309" target="_blank" rel="noopener noreferrer">Bug #119309</a><br />
<strong>Workaround/Fix</strong>: Modify statements to explicitly use <strong>NOW()</strong> (requires updating procedures)<br />
<strong>Fixed/Planned Version/s</strong>: 8.0.46-37, 8.4.9-9, 9.7.0-0</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/PS-10481" target="_blank" rel="noopener noreferrer">PS-10481</a>: The range optimizer incorrectly falls back to a full table scan instead of using an index range scan for WHERE … IN() queries when values exceed column or prefix length on non-binary collations (e.g. utf8mb4_0900_ai_ci). A single truncated value in IN() can invalidate all valid ranges, forcing a full scan and degrading performance.</p>
<p><strong>Reported Affected Version/s</strong>: 8.4.x<br />
<strong>Upstream Bug</strong>: <a href="https://bugs.mysql.com/bug.php?id=118009" target="_blank" rel="noopener noreferrer">Bug #118009</a><br />
<strong>Workaround/Fix</strong>: No workaround available<br />
<strong>Fixed/Planned Version/s</strong>: Not fixed yet</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/PS-10593" target="_blank" rel="noopener noreferrer">PS-10593</a>: The audit_log plugin can crash (segfault) during memcpy operations when configured with audit_log_strategy=PERFORMANCE, audit_log_policy=ALL, and buffering enabled. The issue can be reproduced under specific memory allocator setups (e.g., jemalloc) and also occurs with standard libc malloc, indicating instability in the plugin’s memory handling.</p>
<p><strong>Reported Affected Version/s</strong>: 8.0.34-26, 8.0.45-36, 8.4.7-7<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: No workaround available<br />
<strong>Fixed/Planned Version/s</strong>: 8.0.46-37, 8.4.9-9</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/PS-10990" target="_blank" rel="noopener noreferrer">PS-10990</a>: Server crashes (signal 11) in Item_cache::walk when executing queries that use JOIN with a subquery in an IN clause inside stored procedures. The issue occurs during query execution/privilege checking and is reproducible across MySQL and Percona Server 8.0.x versions.</p>
<p><strong>Reported Affected Version/s</strong>: 8.0.45-36<br />
<strong>Upstream Bug</strong>: <a href="https://bugs.mysql.com/bug.php?id=115885" target="_blank" rel="noopener noreferrer">Bug #115885</a><br />
<strong>Workaround/Fix</strong>: Execute the query outside the stored procedure<br />
<strong>Fixed/Planned Version/s</strong>: Not specified</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/PS-10578" target="_blank" rel="noopener noreferrer">PS-10578</a>: The legacy audit_log plugin does not populate the DB field in audit records unless the session is started with the –database option. Even when a database is selected later using USE or referenced explicitly in queries, the DB field may remain empty.</p>
<p><strong>Reported Affected Version/s</strong>: 8.0.43-34, 8.0.45-36<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Use Audit Log Filter component (8.4) or audit log filter (8.0), where this issue is not reproducible<br />
<strong>Fixed/Planned Version/s</strong>: Not planned to be fixed</p>
<hr>
<h2>Percona Xtradb Cluster</h2>
<p><a href="https://perconadev.atlassian.net/browse/PXC-4844" target="_blank" rel="noopener noreferrer">PXC-4844</a>: In PXC clusters under high load, inconsistency voting during DDL or DCL operations can trigger an internal deadlock, causing standby nodes to get stuck applying transactions and continuously request FC pause. Although voting completes successfully and no node is expelled, writes remain blocked in wsrep: replicating and certifying write set, effectively stalling the cluster until the affected node is restarted.</p>
<p><strong>Reported Affected Version/s</strong>: 8.0.42<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Restart the blocked standby node to restore cluster activity<br />
<strong>Fixed/Planned Version/s</strong>: Not fixed yet</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/PXC-4799" target="_blank" rel="noopener noreferrer">PXC-4799</a>: In PXC clusters, when a backup lock (<strong>LOCK INSTANCE FOR BACKUP</strong>) is active and a replicated DDL is pending, executing <strong>FLUSH TABLES WITH READ LOCK</strong> on the same node can trigger a deadlock. This results in an inconsistency vote and causes the node to leave the cluster, disrupting backup operations.</p>
<p><strong>Reported Affected Version/s</strong>: 8.0.42, 8.0.43, 8.4.6<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Avoid running DDL operations during backup or use a single backup instance instead of parallel runs<br />
<strong>Fixed/Planned Version/s</strong>: 8.0.46, 8.4.9, 9.7.0</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/PXC-4814" target="_blank" rel="noopener noreferrer">PXC-4814</a>: In PXC with <strong>wsrep_OSU_method=‘RSU’</strong>, a failed DDL due to table name case mismatch (e.g., <strong>OPTIMIZE TABLE</strong>) is incorrectly written to the binary log as a successful transaction (<strong>error_code=0</strong>). This results in a GTID being generated for a failed operation, causing GTID inconsistencies across cluster nodes and in replication setups.</p>
<p><strong>Reported Affected Version/s</strong>: 8.0.33-25, 8.0.44, 8.4.6<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Validate table name case sensitivity before executing DDL in RSU mode<br />
<strong>Fixed/Planned Version/s</strong>: 8.0.45, 8.4.8, 9.6.0</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/PXC-4845" target="_blank" rel="noopener noreferrer">PXC-4845</a>: After an IST failure (e.g., due to network issues), a PXC node may remain running in an inconsistent state instead of restarting, causing the donor and other nodes to become unresponsive. The joiner node gets stuck during state transfer instead of failing cleanly, impacting overall cluster availability.</p>
<p><strong>Reported Affected Version/s</strong>: 8.0.42<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: No workaround available<br />
<strong>Fixed/Planned Version/s</strong>: 8.0.45, 8.4.8, 9.6.0</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/PXC-4849" target="_blank" rel="noopener noreferrer">PXC-4849</a>: A PXC node fails to start after successful SST when <strong>read_only</strong> or <strong>super_read_only</strong> is enabled and event scheduler objects exist on the donor. During initialization, the event scheduler fails to load, causing the node to abort, making it impossible to run read-only nodes with events defined in the cluster.</p>
<p><strong>Reported Affected Version/s</strong>: 8.0.44, 8.4.7<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Start the node without read_only, then enable it manually later, or remove events<br />
<strong>Fixed/Planned Version/s</strong>: 8.0.46, 8.4.9, 9.7.0</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/PXC-4965" target="_blank" rel="noopener noreferrer">PXC-4965</a>: Passwords containing the <code>'</code> character are incorrectly handled, causing syntax errors during replication (e.g., <strong>SET PASSWORD</strong>) and triggering inconsistency voting that can force a node to leave the cluster.</p>
<p><strong>Reported Affected Version/s</strong>: 8.0.45, 8.4.7<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Avoid using <code>'</code> character in passwords<br />
<strong>Fixed/Planned Version/s</strong>: 8.0.46, 8.4.8, 9.6.0</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/PXC-5198" target="_blank" rel="noopener noreferrer">PXC-5198</a>: Executing <strong>SELECT … FOR UPDATE SKIP LOCKED</strong> can trigger InnoDB crashes with fatal errors (e.g., “Unknown error code 21: Skip locked records”) under concurrent transactional workloads. Instead of returning expected deadlock errors, the query causes mysqld to abort, impacting cluster stability.</p>
<p><strong>Reported Affected Version/s</strong>: 8.0.33-25, 8.0.35-27, 8.0.36-28<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Avoid using <strong>SKIP LOCKED</strong> in <strong>SELECT … FOR UPDATE</strong> queries<br />
<strong>Fixed/Planned Version/s</strong>: 8.0.46, 8.4.8, 9.6.0</p>
<hr>
<h2>Percona XtraBackup</h2>
<p><a href="https://perconadev.atlassian.net/browse/PXB-3543" target="_blank" rel="noopener noreferrer">PXB-3543</a>: Incremental backups in XtraBackup can become significantly slower than full backups on instances with a very large number of small tables, due to excessive CPU usage in memset during incremental processing. This leads to severe performance degradation, with incremental backups taking hours compared to minutes for full backups.</p>
<p><strong>Reported Affected Version/s</strong>: 8.0.35-33, 8.0.35-34<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Use full backups instead of incremental backups<br />
<strong>Fixed/Planned Version/s</strong>: 8.0.35-35, 8.4.0-6, 9.6.0-1</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/PXB-3667" target="_blank" rel="noopener noreferrer">PXB-3667</a>: Installation of XtraBackup 8.4 fails on RHEL 9–based systems due to dependency conflicts between percona-xtrabackup-84, perl(DBD::mysql), and incompatible libmysqlclient versions. Percona Server 8.4 provides libmysqlclient.so.24, while required dependencies expect libmysqlclient.so.21, resulting in unresolved package installation errors.</p>
<p><strong>Reported Affected Version/s</strong>: 8.4.0-5<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Not specified<br />
<strong>Fixed/Planned Version/s</strong>: Not specified</p>
<hr>
<h2>Percona Toolkit</h2>
<p><a href="https://perconadev.atlassian.net/browse/PT-2519" target="_blank" rel="noopener noreferrer">PT-2519</a>: pt-query-digest fails when processing large, slow query logs, repeatedly throwing “Argument &#8220;&#8221; isn’t numeric” errors during the aggregate fingerprint stage. The tool retries multiple times but does not complete, resulting in stalled analysis and very slow progress.</p>
<p><strong>Reported Affected Version/s</strong>: 3.7.0, 3.7.1<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Not specified<br />
<strong>Fixed/Planned Version/s</strong>: 3.7.3</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/PT-2511" target="_blank" rel="noopener noreferrer">PT-2511</a>: pt-summary incorrectly reports that sshd is not running due to an invalid awk expression used to detect the process. The script checks the wrong field in ps output, causing false negatives even when sshd is active.</p>
<p><strong>Reported Affected Version/s</strong>: 3.7.1<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Not specified<br />
<strong>Fixed/Planned Version/s</strong>: 3.7.3</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/PT-2516" target="_blank" rel="noopener noreferrer">PT-2516</a>: pt-mongodb-index-check fails to detect duplicate indexes (e.g., <code>{a:1}</code> and <code>{a:1, b:1}</code>) and may produce no output, making it unclear whether the tool is functioning or connecting properly.</p>
<p><strong>Reported Affected Version/s</strong>: 3.7.1<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Not specified<br />
<strong>Fixed/Planned Version/s</strong>: Not specified</p>
<hr>
<h2>PMM [Percona Monitoring and Management]</h2>
<p><a href="https://perconadev.atlassian.net/browse/PMM-14493" target="_blank" rel="noopener noreferrer">PMM-14493</a>: PMM fails to start when using Podman with the <strong>–log-driver passthrough</strong> option due to an error opening /dev/stderr during Nginx initialization. This causes the container to exit with configuration test failure, while other log drivers work as expected.</p>
<p><strong>Reported Affected Version/s</strong>: 3.4.0, 3.4.1<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Use a different <strong>–log-driver</strong> option such as none or journald<br />
<strong>Fixed/Planned Version/s</strong>: 3.8.0</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/PMM-14576" target="_blank" rel="noopener noreferrer">PMM-14576</a>: PMM Client reports “failed to get backup status” errors during MongoDB backups, marking them as failed in the UI even though backups are successfully completed by PBM. This leads to incorrect backup status reporting and confusion for users.</p>
<p><strong>Reported Affected Version/s</strong>: 3.5.0<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Avoid using PMM Backup Management (not ideal)<br />
<strong>Fixed/Planned Version/s</strong>: 3.9.0, 3.X</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/PMM-14594" target="_blank" rel="noopener noreferrer">PMM-14594</a>: PMM incorrectly reports compatible XtraBackup versions as incompatible with supported MySQL versions during backup validation. This causes backups to be blocked in PMM even when the installed XtraBackup version is the latest available and should be accepted.</p>
<p><strong>Reported Affected Version/s</strong>: 3.5.0, 3.6.0<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Use the xtrabackup command-line tool to take backups<br />
<strong>Fixed/Planned Version/s</strong>: 3.9.0</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/PMM-14852" target="_blank" rel="noopener noreferrer">PMM-14852</a>: Some panels in the MongoDB InMemory dashboard show no data because they incorrectly use WiredTiger-specific metrics. As a result, dashboards for InMemory storage engine deployments can display empty or misleading panels instead of relevant metrics.</p>
<p><strong>Reported Affected Version/s</strong>: 3.2.0, 3.6.0<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Not specified<br />
<strong>Fixed/Planned Version/s</strong>: 3.8.0</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/PMM-14906" target="_blank" rel="noopener noreferrer">PMM-14906</a>: The postgres_exporter generates excessive <strong>SELECT version()</strong> queries (~4500/hour) after upgrading to PMM 3.6.0, flooding PostgreSQL logs and increasing unnecessary query load, causing log spam and disk growth.</p>
<p><strong>Reported Affected Version/s</strong>: 3.6.0<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Not specified<br />
<strong>Fixed/Planned Version/s</strong>: 3.8.0</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/PMM-14958" target="_blank" rel="noopener noreferrer">PMM-14958</a>: mysqld_exporter continues to generate duplicate metric collection errors with GTID and parallel replication enabled, even in PMM 3.6.0. These repeated errors (e.g., <strong>mysql_perf_schema_replication_group_worker_transport_time_seconds</strong>) lead to continuous log spam, causing rapid log growth (up to ~10GB/hour), disk space exhaustion, and increased noise that makes it difficult to identify real issues.</p>
<p><strong>Reported Affected Version/s</strong>: 3.6.0<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Not specified<br />
<strong>Fixed/Planned Version/s</strong>: 3.7.1</p>
<hr>
<h2>Percona Kubernetes Operator</h2>
<p><a href="https://perconadev.atlassian.net/browse/K8SPG-737" target="_blank" rel="noopener noreferrer">K8SPG-737</a>: In PostgreSQL Kubernetes deployments, the node_exporter in the PMM client sidecar cannot access the datadir mountpoint because it is not exposed via /proc, preventing collection of datadir-related metrics. This results in incomplete monitoring data for PostgreSQL pods.</p>
<p><strong>Reported Affected Version/s</strong>: 2.9.0<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: No workaround available<br />
<strong>Fixed/Planned Version/s</strong>: 2.10.0</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/K8SPXC-1737" target="_blank" rel="noopener noreferrer">K8SPXC-1737</a>: The PXC Operator crashes during reconciliation in CompareMySQLVersion when the cluster status lacks a MySQL version value. An empty version field causes a panic (“Malformed version”), preventing proper cluster reconciliation and replication setup.</p>
<p><strong>Reported Affected Version/s</strong>: 1.18.0, 1.19.0<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Create the cluster before configuring replication or manually patch the CR status to include the missing version value, for example:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">kubectl patch pxc  
</span></span><span class="line"><span class="cl"> --type=merge 
</span></span><span class="line"><span class="cl"> --subresource=status 
</span></span><span class="line"><span class="cl"> --patch '
</span></span><span class="line"><span class="cl">status:
</span></span><span class="line"><span class="cl"> pxc:
</span></span><span class="line"><span class="cl"> version: "8.0.42-33.1"'</span></span></code></pre>
</div>
</div>
</div>
<p><strong>Fixed/Planned Version/s:</strong> 1.20.0</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/K8SPXC-1843" target="_blank" rel="noopener noreferrer">K8SPXC-1843</a>: Backups can get stuck in a Running state if the Joiner/Garbd disconnects from the Donor (e.g., due to sst-idle-timeout). Even after the SST process fails and the donor leaves the cluster, the backup process (e.g., xbcloud put) continues indefinitely without timing out, preventing backup completion.</p>
<p><strong>Reported Affected Version/s</strong>: 1.19.0<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: No workaround available<br />
<strong>Fixed/Planned Version/s</strong>: 1.20.0</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/K8SPXC-1831" target="_blank" rel="noopener noreferrer">K8SPXC-1831</a>: When using mysqlAllocator=jemalloc on ARM images, the operator attempts to preload /usr/lib64/libjemalloc.so.1, but only libjemalloc.so.2 is available. This results in preload errors and prevents proper use of the jemalloc allocator.</p>
<p><strong>Reported Affected Version/s</strong>: 1.19.0<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Not specified<br />
<strong>Fixed/Planned Version/s</strong>: 1.20.0</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/K8SPXC-1830" target="_blank" rel="noopener noreferrer">K8SPXC-1830</a>: ProxySQL monitoring fails in PMM when using caching_sha2_password, causing proxysql_exporter to fail authentication with errors like:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Error opening connection to ProxySQL:
</span></span><span class="line"><span class="cl">unexpected resp from server for caching_sha2_password, perform full authentication</span></span></code></pre>
</div>
</div>
</div>
<p>This occurs because ProxySQL does not support the required RSA-based full authentication, breaking PMM monitoring integration.</p>
<p><strong>Reported Affected Version/s</strong>: 1.19.0<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Use <code>mysql_native_password</code><br />
<strong>Fixed/Planned Version/s</strong>: 1.20.0</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/K8SPSMDB-1617" target="_blank" rel="noopener noreferrer">K8SPSMDB-1617</a>: Scheduled backups can be triggered even when the MongoDB cluster is not ready (e.g., in initializing state) and without the required safety flags. This leads to failed backup attempts and inconsistent backup behaviour.</p>
<p><strong>Reported Affected Version/s</strong>: 1.22.0<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Not specified<br />
<strong>Fixed/Planned Version/s</strong>: Not specified</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/K8SPSMDB-1524" target="_blank" rel="noopener noreferrer">K8SPSMDB-1524</a>: The PBM agent continuously triggers resync storage operations, causing backup processes to stall or remain in pending/unknown states. Logs show repeated resync commands being executed without completion, leading to unstable backup behaviour.</p>
<p><strong>Reported Affected Version/s</strong>: 1.21.1<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Not specified<br />
<strong>Fixed/Planned Version/s</strong>: 1.22.0</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/K8SPG-939" target="_blank" rel="noopener noreferrer">K8SPG-939</a>: Patroni does not propagate labels defined in the PostgreSQL Operator CR, causing failures in environments with strict label policies. As a result, Kubernetes rejects resource creation (e.g., Services) due to missing mandatory labels, preventing cluster reconciliation.</p>
<p><strong>Reported Affected Version/s</strong>: 2.8.2<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Not specified<br />
<strong>Fixed/Planned Version/s</strong>: 2.9.0</p>
<hr>
<h2>PBM [Percona Backup for MongoDB]</h2>
<p><a href="https://perconadev.atlassian.net/browse/PBM-1683" target="_blank" rel="noopener noreferrer">PBM-1683</a>: The size_uncompressed_h field in pbm describe-backup reports incorrect (inflated) sizes for non-base incremental backups, showing significantly larger values than the actual data size and leading to misleading backup size reporting.</p>
<p><strong>Reported Affected Version/s</strong>: 2.10.0, 2.11.0, 2.12.0<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Not specified<br />
<strong>Fixed/Planned Version/s</strong>: 2.14.0</p>
<hr>
<h2>PSMDB [Percona Server for MongoDB]</h2>
<p><a href="https://perconadev.atlassian.net/browse/PSMDB-1915" target="_blank" rel="noopener noreferrer">PSMDB-1915</a>: Newer PSMDB packages fail to install or upgrade on RHEL 9.4 due to a dependency on OpenSSL 3.4, which is not available in that OS version. This breaks upgrades (e.g., from 6.0.25 to 6.0.27) and affects multiple major versions.</p>
<p><strong>Reported Affected Version/s</strong>: 6.0.27-21, 7.0.28-15, 8.0.17-6<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Not specified<br />
<strong>Fixed/Planned Version/s</strong>: 6.0.27-21, 7.0.28-15, 8.0.17-6</p>
<hr>
<p><a href="https://perconadev.atlassian.net/browse/PSMDB-1998" target="_blank" rel="noopener noreferrer">PSMDB-1998</a>: LDAP authentication can hang indefinitely when the LDAP server is unreachable due to missing timeout handling. This leads to continuously accumulating connections, eventually exhausting file descriptors and causing service disruption or crashes.</p>
<p><strong>Reported Affected Version/s</strong>: 7.0.16-10, 7.0.30-16<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: No workaround available<br />
<strong>Fixed/Planned Version/s</strong>: 7.0.31-17, 8.0.20-8</p>
<hr>
<h2>Percona Distribution for MySQL [Orchestrator]</h2>
<p><a href="https://perconadev.atlassian.net/browse/DISTMYSQL-584" target="_blank" rel="noopener noreferrer">DISTMYSQL-584</a>: Orchestrator loses SSL-related settings such as SOURCE_SSL_CA and SOURCE_SSL_VERIFY_SERVER_CERT during failover when issuing CHANGE REPLICATION SOURCE, causing replication to run without required security configurations and potentially violating compliance requirements.</p>
<p><strong>Reported Affected Version/s</strong>: 8.4.7<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Not specified<br />
<strong>Fixed/Planned Version/s</strong>: Not specified</p>
<hr>
<h2>PCSM [Percona ClusterSync for MongoDB]</h2>
<p><a href="https://perconadev.atlassian.net/browse/PCSM-294" target="_blank" rel="noopener noreferrer">PCSM-294</a>: PCSM replication can crash during change replication due to flawed conflict detection and unbatched pipeline generation. This results in oversized aggregation pipelines, memory exhaustion, or invalid $slice operations, causing replication to fail with errors such as stage limit exceeded, buffer limits, or invalid arguments.</p>
<p><strong>Reported Affected Version/s</strong>: 0.7.0<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Not specified<br />
<strong>Fixed/Planned Version/s</strong>: 0.8.0</p>
<hr>
<h2>PG_TDE [Percona Transparent Data Encryption for PostgreSQL]</h2>
<p><a href="https://perconadev.atlassian.net/browse/PG-2125" target="_blank" rel="noopener noreferrer">PG-2125</a>: pg_tde fails to create/register symmetric keys when using HashiCorp KMIP, returning errors from the KMIP server during key registration. This prevents key setup and blocks encryption workflows for users relying on KMIP integration.</p>
<p><strong>Reported Affected Version/s</strong>: pg_tde 2.1.0<br />
<strong>Upstream Bug</strong>: Not applicable<br />
<strong>Workaround/Fix</strong>: Not specified<br />
<strong>Fixed/Planned Version/s</strong>: pg_tde NEXT</p>
<hr>
<h2>Summary</h2>
<p>We welcome community input and feedback on all our products. If you find a bug or would like to suggest an improvement or a feature, learn how in our post, <a href="https://www.percona.com/blog/2019/06/12/report-bugs-improvements-new-feature-requests-for-percona-products/" target="_blank" rel="noopener noreferrer">How to Report Bugs, Improvements, New Feature Requests for Percona Products</a>.</p>
<p>For the most up-to-date information, be sure to follow us on <a href="https://twitter.com/percona" target="_blank" rel="noopener noreferrer">Twitter</a>, <a href="https://www.linkedin.com/company/percona" target="_blank" rel="noopener noreferrer">LinkedIn</a>, and <a href="https://www.facebook.com/Percona?fref=ts" target="_blank" rel="noopener noreferrer">Facebook</a>.</p>
<p>Quick References:</p>
<p><a href="https://jira.percona.com/" target="_blank" rel="noopener noreferrer">Percona JIRA</a></p>
<p><a href="https://bugs.mysql.com/" target="_blank" rel="noopener noreferrer">MySQL Bug Report</a></p>
<p><a href="https://www.percona.com/blog/2019/06/12/report-bugs-improvements-new-feature-requests-for-percona-products/" target="_blank" rel="noopener noreferrer">Report a Bug in a Percona Product</a></p>
<p><a href="https://percona.community/blog/2026/04/03/percona-bug-report-march-2026/">Percona Bug Report: March 2026</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>InnoDB Buffer Pool Tuning: From Rule-of-Thumb to Real Signals</title>
        <link>https://percona.community/blog/2026/04/02/innodb-buffer-pool-tuning-from-rule-of-thumb-to-real-signals/</link>
        <pubDate>Thu, 02 Apr 2026 00:00:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/innodb-buffer-pool-tuning-from-rule-of-thumb-to-real-signals/</guid>
        <source url="https://percona.community/blog/">Percona Community Blog - learn about MySQL, MariaDB, PostgreSQL, and MongoDB</source>
        <description><![CDATA[<p>Introduction Many MySQL setups begin life with a familiar incantation:</p>
<p><a href="https://percona.community/blog/2026/04/02/innodb-buffer-pool-tuning-from-rule-of-thumb-to-real-signals/">InnoDB Buffer Pool Tuning: From Rule-of-Thumb to Real Signals</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<h2>Introduction</h2>
<p>Many MySQL setups begin life with a familiar incantation:</p>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-0" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">innodb_buffer_pool_size = 70% of RAM</span></span></code></pre>
</div>
</div>
</div>
<p>…and then nothing changes.</p>
<p>That’s not tuning. That’s a starting guess.</p>
<p>Real tuning starts when the workload pushes back.</p>
<hr>
<h2>Visual Overview</h2>
<p><figure><img decoding="async" width="1024" height="1536" src="https://percona.community/blog/2026/04/innodb_buffer_pool_diagram_hu_fccfce324d38a928.webp" alt="InnoDB Buffer Pool Diagram" loading="lazy"></figure>
</p>
<hr>
<p>The InnoDB buffer pool is where database performance is quietly decided. It determines whether your workload hums along in memory or drags itself across disk. If you’re not actively observing and tuning it, you’re leaving performance on the table.</p>
<p>This guide walks through how to monitor, understand, and tune the buffer pool using real signals instead of guesswork.</p>
<hr>
<h2>What the Buffer Pool Really Is</h2>
<p>The buffer pool isn’t just “memory for MySQL.” It’s a living system under constant pressure:</p>
<ul>
<li>A cache of data and indexes</li>
<li>A write staging area (dirty pages)</li>
<li>A contention zone between reads, writes, and eviction</li>
</ul>
<p>Think of it as your database’s working memory. If your working set fits, queries glide. If it doesn’t, pages are constantly evicted and reloaded, introducing latency that rarely announces itself clearly.</p>
<hr>
<h2>A Simple Mental Model</h2>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-1" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl"> +---------------------------+
</span></span><span class="line"><span class="cl"> | Buffer Pool |
</span></span><span class="line"><span class="cl"> |---------------------------|
</span></span><span class="line"><span class="cl">Reads ---&gt; | Cached Pages |
</span></span><span class="line"><span class="cl"> | |
</span></span><span class="line"><span class="cl">Writes ---&gt; | Dirty Pages (pending IO) |
</span></span><span class="line"><span class="cl"> | |
</span></span><span class="line"><span class="cl">Eviction -&gt; | LRU / Free List |
</span></span><span class="line"><span class="cl"> +---------------------------+
</span></span><span class="line"><span class="cl"> |
</span></span><span class="line"><span class="cl"> v
</span></span><span class="line"><span class="cl"> Disk (slow)</span></span></code></pre>
</div>
</div>
</div>
<p>Three forces are always competing:</p>
<ul>
<li>Reads want hot data in memory</li>
<li>Writes generate dirty pages</li>
<li>Eviction makes room under pressure</li>
</ul>
<p>Your job is to keep this system balanced.</p>
<hr>
<h2>How to Monitor the Buffer Pool</h2>
<h3>Option 1: Quick Snapshot</h3>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-2" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SHOW</span><span class="w"> </span><span class="n">ENGINE</span><span class="w"> </span><span class="n">INNODB</span><span class="w"> </span><span class="n">STATUS</span><span class="err"></span><span class="k">G</span></span></span></code></pre>
</div>
</div>
</div>
<p>Useful for human inspection. Look for:</p>
<ul>
<li>Buffer pool size</li>
<li>Free buffers</li>
<li>Database pages</li>
<li>Modified (dirty) pages</li>
<li>Page read/write rates</li>
</ul>
<p>Great for debugging. Not ideal for automation.</p>
<hr>
<h3>Option 2: Structured Metrics (Recommended)</h3>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-3" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SELECT</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">pool_id</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">free_buffers</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">database_pages</span><span class="p">,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="n">modified_database_pages</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">FROM</span><span class="w"> </span><span class="n">information_schema</span><span class="p">.</span><span class="n">INNODB_BUFFER_POOL_STATS</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p><strong>Key fields:</strong></p>
<ul>
<li><code>free_buffers</code> → Available pages (breathing room)</li>
<li><code>database_pages</code> → Pages holding data</li>
<li><code>modified_database_pages</code> → Dirty pages waiting to flush</li>
</ul>
<p>Great for automation.</p>
<hr>
<h2>The 5 Signals That Actually Matter</h2>
<h3>1. Buffer Pool Hit Ratio (Handle With Care)</h3>
<p>Yes, it’s widely used. No, it’s not enough.</p>
<p>A high hit ratio does not mean your system is healthy. It does not capture:</p>
<ul>
<li>Page churn</li>
<li>Eviction pressure</li>
<li>Access patterns</li>
</ul>
<p>You can have a 99% hit ratio and still be IO-bound.</p>
<p>Use it as a sanity check, not a decision-maker.</p>
<hr>
<h3>2. Free Buffers</h3>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-4" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SELECT</span><span class="w"> </span><span class="k">SUM</span><span class="p">(</span><span class="n">free_buffers</span><span class="p">)</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="n">free_buffers</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">FROM</span><span class="w"> </span><span class="n">information_schema</span><span class="p">.</span><span class="n">INNODB_BUFFER_POOL_STATS</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p><strong>Interpretation:</strong></p>
<ul>
<li>Near zero during steady load → normal</li>
<li>Near zero + rising disk reads → pressure</li>
<li>Near zero while mostly idle → suspicious (possible misread or config issue)</li>
</ul>
<hr>
<h3>3. Dirty Page Percentage</h3>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-5" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SELECT</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="p">(</span><span class="k">SUM</span><span class="p">(</span><span class="n">modified_database_pages</span><span class="p">)</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="k">SUM</span><span class="p">(</span><span class="n">database_pages</span><span class="p">))</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">100</span><span class="p">.</span><span class="mi">0</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="n">dirty_pct</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">FROM</span><span class="w"> </span><span class="n">information_schema</span><span class="p">.</span><span class="n">INNODB_BUFFER_POOL_STATS</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p><strong>Interpretation (context matters):</strong></p>
<ul>
<li>0–5% → Very clean</li>
<li>5–20% → Typical</li>
<li>20–30%+ → Potential flushing lag</li>
</ul>
<hr>
<h3>4. Disk Read Pressure (Critical Signal)</h3>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-6" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SHOW</span><span class="w"> </span><span class="k">GLOBAL</span><span class="w"> </span><span class="n">STATUS</span><span class="w"> </span><span class="k">LIKE</span><span class="w"> </span><span class="s1">'Innodb_buffer_pool_reads'</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="c1">-- Take two samples 60s apart and compare</span></span></span></code></pre>
</div>
</div>
</div>
<p>Track the rate of change (reads/sec), not the absolute value.</p>
<p><strong>Interpretation:</strong></p>
<ul>
<li>Rising reads → Working set does not fit in memory</li>
<li>Flat reads → Memory is absorbing the workload</li>
</ul>
<hr>
<h3>5. Read Ahead / Eviction Pressure</h3>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-7" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SHOW</span><span class="w"> </span><span class="k">GLOBAL</span><span class="w"> </span><span class="n">STATUS</span><span class="w"> </span><span class="k">LIKE</span><span class="w"> </span><span class="s1">'Innodb_buffer_pool_read_ahead%'</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">SHOW</span><span class="w"> </span><span class="k">GLOBAL</span><span class="w"> </span><span class="n">STATUS</span><span class="w"> </span><span class="k">LIKE</span><span class="w"> </span><span class="s1">'Innodb_buffer_pool_pages_evicted'</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">SHOW</span><span class="w"> </span><span class="k">GLOBAL</span><span class="w"> </span><span class="n">STATUS</span><span class="w"> </span><span class="k">LIKE</span><span class="w"> </span><span class="s1">'Innodb_buffer_pool_reads'</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p><strong>Interpretation:</strong></p>
<ul>
<li>Efficient read-ahead:
<ul>
<li>read_ahead increases</li>
<li>read_ahead_evicted remains low</li>
</ul>
</li>
<li>Inefficient read-ahead (wasted IO):
<ul>
<li>High read_ahead_evicted / read_ahead</li>
<li>Indicates access patterns defeating prefetching</li>
</ul>
</li>
<li>Buffer pool churn:
<ul>
<li>pages_evicted rising</li>
<li>buffer_pool_reads rising</li>
<li>Indicates pages are evicted and re-read from disk</li>
</ul>
</li>
<li>Healthy vs unhealthy eviction:
<ul>
<li>High evictions + stable reads → normal turnover</li>
<li>High evictions + rising reads → memory pressure</li>
</ul>
</li>
</ul>
<p>Focus on rates of change over time, not absolute values.</p>
<hr>
<h2>Detecting Thrashing</h2>
<p>Thrashing is when the buffer pool constantly evicts and reloads pages.</p>
<h3>Classic Symptoms</h3>
<ul>
<li>Low or zero free buffers</li>
<li>Increasing disk reads</li>
<li>Stable (but misleading) hit ratio</li>
<li>Spiky query latency</li>
</ul>
<h3>Visualizing Thrash</h3>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-8" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Time ---&gt;
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Memory: [FULL][FULL][FULL][FULL]
</span></span><span class="line"><span class="cl">Reads: ↑ ↑↑ ↑↑↑ ↑↑↑↑
</span></span><span class="line"><span class="cl">Latency: - ^ ^^ ^^^
</span></span><span class="line"><span class="cl">Evictions: ↑ ↑↑ ↑↑↑ ↑↑↑↑</span></span></code></pre>
</div>
</div>
</div>
<p>If you see this pattern, your working set does not fit in memory.</p>
<hr>
<h2>Tuning the Buffer Pool</h2>
<h3>Step 1: Size It Intentionally</h3>
<p>Instead of blindly assigning 70% of RAM:</p>
<ul>
<li>Observe working set behavior</li>
<li>Monitor free buffers and reads</li>
<li>Increase gradually</li>
</ul>
<p>Avoid starving the OS or filesystem cache.</p>
<hr>
<h3>Step 2: Tune Flushing Behavior</h3>
<div class="code-block">
<div class="code-block__header"><button class="code-block__copy" type="button" data-copy-target="codeblock-9" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">innodb_max_dirty_pages_pct = 75
</span></span><span class="line"><span class="cl">innodb_io_capacity = 1000
</span></span><span class="line"><span class="cl">innodb_io_capacity_max = 2000</span></span></code></pre>
</div>
</div>
</div>
<ul>
<li>Sustained IO spikes → increase innodb_io_capacity</li>
<li>Dirty pages climbing → flushing lag</li>
<li>Sudden stalls → checkpoint pressure</li>
</ul>
<p><strong>What they control:</strong></p>
<ul>
<li><code>innodb_io_capacity</code> → Expected steady-state IO throughput</li>
<li><code>innodb_io_capacity_max</code> → Burst flushing capacity</li>
<li><code>innodb_max_dirty_pages_pct</code> → Threshold for aggressive flushing</li>
</ul>
<p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/26a0.png" alt="⚠" class="wp-smiley" style="height: 1em; max-height: 1em;" /> These values should reflect real hardware capability.</p>
<hr>
<h3>Step 3: Buffer Pool Instances:Reduce Contention</h3>
<p>A practical, battle-tested guideline:</p>
<p>Use 1 instance per ~1GB of buffer pool, up to a reasonable limit.</p>
<p>Buffer Pool Instances: Reducing Contention</p>
<p>The buffer pool can be split into multiple instances, each managing its own internal structures. This helps reduce contention under high concurrency.</p>
<p>Without this, all threads compete for the same buffer pool internals. With multiple instances, that load is distributed.</p>
<hr>
<h3>When It Matters</h3>
<p>Buffer pool instances only help when contention exists. You’ll see benefits if your system has:</p>
<ul>
<li>High concurrency (many active threads)</li>
<li>CPU-bound workloads</li>
<li>Mutex contention in InnoDB</li>
</ul>
<p>If your workload is primarily IO-bound, this setting will have little impact.</p>
<hr>
<h3>Sizing Guidelines</h3>
<p>General guidance:</p>
<ul>
<li>&lt; 1GB buffer pool → 1 instance</li>
<li>1GB–8GB → 2–4 instances</li>
<li>8GB–64GB → 4–8 instances</li>
<li>64GB+ → 8–16 instances</li>
</ul>
<hr>
<h3>Keep Instances Large Enough</h3>
<p>Each instance needs enough memory to function efficiently.</p>
<p>Avoid going below ~1GB per instance.</p>
<p>If instances are too small:</p>
<ul>
<li>LRU efficiency drops</li>
<li>Eviction becomes more aggressive</li>
<li>Cache locality suffers</li>
</ul>
<p>Example</p>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-10" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="n">innodb_buffer_pool_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">32</span><span class="k">G</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="n">innodb_buffer_pool_instances</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">8</span></span></span></code></pre>
</div>
</div>
</div>
<p>This gives ~4GB per instance, which is well-balanced.</p>
<hr>
<h3>Common Mistakes</h3>
<ul>
<li>Increasing instances without evidence of contention</li>
<li>Matching instance count to CPU cores</li>
<li>Using many instances with a small buffer pool</li>
<li>Expecting this to fix IO bottlenecks</li>
</ul>
<hr>
<h3>Step 4: Understand Resizing Behavior</h3>
<p>Buffer pool resizing is online in modern MySQL versions, but:</p>
<ul>
<li>It happens in chunks</li>
<li>Controlled by <code>innodb_buffer_pool_chunk_size</code></li>
</ul>
<hr>
<h2>Real-World Scenarios</h2>
<h3>Scenario 1: “Everything Looks Fine… But It’s Slow”</h3>
<ul>
<li>High hit ratio</li>
<li>Low free buffers</li>
<li>Rising disk reads</li>
</ul>
<p><strong>Cause:</strong> Working set barely fits</p>
<p><strong>Fix:</strong> Increase buffer pool size gradually</p>
<p>If increasing the buffer pool size does not reduce disk reads, the problem is not memory.</p>
<hr>
<h3>Scenario 2: Write-Heavy Workload</h3>
<ul>
<li>Dirty pages increasing</li>
<li>Periodic IO spikes</li>
</ul>
<p><strong>Cause:</strong> Flushing cannot keep up</p>
<p><strong>Fix:</strong></p>
<ul>
<li>Increase <code>innodb_io_capacity</code></li>
<li>Adjust dirty page thresholds</li>
</ul>
<hr>
<h3>Scenario 3: Sudden Latency Spikes</h3>
<ul>
<li>Sharp performance drops</li>
<li>Disk activity surges</li>
</ul>
<p><strong>Cause:</strong> Checkpoint pressure</p>
<p><strong>Fix:</strong></p>
<ul>
<li>Improve IO capacity tuning</li>
<li>Reduce dirty page buildup</li>
</ul>
<hr>
<h2>Practical Monitoring Queries</h2>
<h3>Buffer Pool Usage (MB)</h3>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-11" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SELECT</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="p">(</span><span class="k">SUM</span><span class="p">(</span><span class="n">database_pages</span><span class="p">)</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">16</span><span class="p">)</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mi">1024</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="n">mb_used</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">FROM</span><span class="w"> </span><span class="n">information_schema</span><span class="p">.</span><span class="n">INNODB_BUFFER_POOL_STATS</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<p>Assumes default 16KB page size (innodb_page_size).</p>
<h3>Dirty Page Percentage</h3>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-12" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SELECT</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="p">(</span><span class="n">modified_database_pages</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="n">database_pages</span><span class="p">)</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">100</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="n">dirty_pct</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">FROM</span><span class="w"> </span><span class="n">information_schema</span><span class="p">.</span><span class="n">INNODB_BUFFER_POOL_STATS</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<h3>Free Buffer Check</h3>
<div class="code-block">
<div class="code-block__header"><span class="code-block__lang">sql</span><button class="code-block__copy" type="button" data-copy-target="codeblock-13" aria-label="Copy code to clipboard"><br />
<span class="code-block__copy-default">Copy</span><br />
<span class="code-block__copy-success" aria-hidden="true">Copied!</span><br />
</button>
</div>
<div class="code-block__content">
<div class="highlight">
<pre class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">SELECT</span><span class="w"> </span><span class="k">SUM</span><span class="p">(</span><span class="n">free_buffers</span><span class="p">)</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="n">free_buffers</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="k">FROM</span><span class="w"> </span><span class="n">information_schema</span><span class="p">.</span><span class="n">INNODB_BUFFER_POOL_STATS</span><span class="p">;</span></span></span></code></pre>
</div>
</div>
</div>
<hr>
<h2>Common Mistakes</h2>
<ul>
<li>Treating 70% as a rule instead of a starting point</li>
<li>Blindly trusting hit ratio</li>
<li>Ignoring disk read trends</li>
<li>Oversizing and starving the OS</li>
<li>Not tuning IO capacity</li>
<li>Leaving defaults in write-heavy systems</li>
</ul>
<hr>
<h2>Quick Checklist</h2>
<p>If you remember nothing else:</p>
<ul>
<li>Reads increasing? → working set too big</li>
<li>Free buffers always ~0? → pressure</li>
<li>Dirty pages high? → flushing lag</li>
<li>Latency spiking? → checkpoint or IO saturation</li>
</ul>
<hr>
<h2>Final Thoughts</h2>
<p>The InnoDB buffer pool doesn’t fail loudly. It degrades quietly until your disk becomes the bottleneck.</p>
<p>By the time you notice, you’re debugging latency instead of preventing it.</p>
<p>Monitor the right signals, and you’ll see problems forming before users do.</p>
<p>That’s the difference between reacting to performance… and controlling it.</p>
<p><a href="https://percona.community/blog/2026/04/02/innodb-buffer-pool-tuning-from-rule-of-thumb-to-real-signals/">InnoDB Buffer Pool Tuning: From Rule-of-Thumb to Real Signals</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>gcc vs clang for sysbench on a small server with Postgres, MySQL and MariaDB</title>
        <link>https://smalldatum.blogspot.com/2026/03/gcc-vs-clang-for-sysbench-on-small.html</link>
        <pubDate>Tue, 31 Mar 2026 20:28:00 +0000</pubDate>
        <dc:creator>Mark Callaghan</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/gcc-vs-clang-for-sysbench-on-a-small-server-with-postgres-mysql-and-mariadb/</guid>
        <source url="https://smalldatum.blogspot.com/">Small Datum</source>
        <description><![CDATA[<p>This has results for sysbench on a small server and compares performanc for Postgres, MySQL and MariaDB compiled using clang vs using gcc.tl;drThroughput with clang and gcc is similarBuilds, configuration and hardwareI compiled Postgres 18.3, MySQL 8.4.8 and MariaDB 11.8.6 from source. The server has 8 AMD cores with SMT disabled and 32G of RAM. The OS is Ubuntu 24.04, gcc is version 13.3.0 and clang is version 18.1.3. Storage is ext-4 with discard enabled and an NVMe SSD.BenchmarkI used sysbench and my usage is explained here. To save time I only run 32 of the 42 microbenchmarks and most test only 1 type of SQL statement. Benchmarks are run with the database cached by InnoDB.The tests are run using 1 client and 1 table with 50M rows. The read-heavy microbenchmarks run for 630 seconds and the write-heavy for 930 seconds.ResultsThe microbenchmarks are split into 4 groups -- 1 for point queries, 2 for range queries, 1 for writes. For the range query microbenchmarks, part 1 has queries that don't do aggregation while part 2 has queries that do aggregation. I provide tables below with relative QPS. When the relative QPS is &#62; 1 then some version is faster than the base version. When it is &#60; 1 then there might be a regression. The number below are the relative QPS computed as: (QPS with a gcc build / QPS with a clang build)Legend:* pg - for Postgres 18.3, (QPS with gcc / QPS with clang)* my - for MySQL 8.4.8, (QPS with gcc / QPS with clang)* ma - for MariaDB 11.8.6, (QPS with gcc / QPS with clang)-- point queriespg      my      ma1.02    1.00    0.99    hot-points1.02    0.98    1.02    point-query0.95    1.01    1.02    points-covered-pk0.96    1.02    1.02    points-covered-si0.97    1.00    1.02    points-notcovered-pk0.96    1.03    1.02    points-notcovered-si0.97    1.01    1.01    random-points_range=10000.98    1.01    1.01    random-points_range=1001.00    0.99    1.00    random-points_range=10-- range queries without aggregationpg      my      ma1.01    0.98    1.03    range-covered-pk1.00    0.98    1.05    range-covered-si0.99    0.98    1.04    range-notcovered-pk0.99    1.02    0.97    range-notcovered-si1.02    1.06    1.03    scan-- range queries with aggregationpg      my      ma1.01    0.96    1.05    read-only-count0.99    0.99    1.01    read-only-distinct0.99    1.00    1.00    read-only-order0.99    1.00    1.01    read-only_range=100001.00    0.98    1.00    read-only_range=1001.01    0.97    1.00    read-only_range=100.99    0.97    1.03    read-only-simple1.02    0.98    1.02    read-only-sum-- writespg      my      ma1.03    0.98    1.00    delete1.01    1.00    1.00    insert1.00    0.98    1.00    read-write_range=1001.00    0.98    1.00    read-write_range=100.99    1.01    0.97    update-index0.96    1.01    0.99    update-inlist0.99    0.99    0.99    update-nonindex1.02    0.98    0.99    update-one0.98    0.98    0.99    update-zipf1.00    0.99    0.99    write-only</p>
<p><a href="https://smalldatum.blogspot.com/2026/03/gcc-vs-clang-for-sysbench-on-small.html">gcc vs clang for sysbench on a small server with Postgres, MySQL and MariaDB</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>This has results for sysbench on a small server and compares performanc for Postgres, MySQL and MariaDB compiled using clang vs using gcc.</p>
<p>tl;dr</p>
</p>
<ul>
<li>Throughput with clang and gcc is similar</li>
</ul>
<div><b>Builds, configuration and hardware</b></div>
<div>
</p>
<div></div>
</p>
<div>I compiled Postgres 18.3, MySQL 8.4.8 and MariaDB 11.8.6 from source. The server has 8 AMD cores with SMT disabled and 32G of RAM. The OS is Ubuntu 24.04, gcc is version 13.3.0 and clang is version 18.1.3. Storage is ext-4 with discard enabled and an NVMe SSD.</div>
</div>
<div><b><br /></b></div>
<div><b>Benchmark</b></div>
<div><b><br /></b></div>
<div>
<div>
<div>
<div>I used sysbench and my usage is <a href="http://smalldatum.blogspot.com/2017/02/using-modern-sysbench-to-compare.html">explained here</a>. To save time I only run 32 of the 42 microbenchmarks and most test only 1 type of SQL statement. Benchmarks are run with the database cached by InnoDB.</div>
<div>The tests are run using 1 client and 1 table with 50M rows. The read-heavy microbenchmarks run for 630 seconds and the write-heavy for 930 seconds.</div>
</div>
</div>
<div></div>
<div>
<div><b>Results</b></div>
<div><span></p>
<div></div>
<div><span>The microbenchmarks are split into 4 groups &#8212; 1 for point queries, 2 for range queries, 1 for writes. For the range query microbenchmarks, part 1 has queries that don&#8217;t do aggregation while part 2 has queries that do aggregation. </span></div>
<div>I provide tables below with relative QPS. <span>When the relative QPS is &gt; 1 then </span><i>some version</i><span> is faster than the</span><span> </span><i>base version.</i><span> When it is &lt; 1 then there might be a regression. </span><span>The number below are the relative QPS computed as:</span> (QPS with a gcc build / QPS with a clang build)</div>
<div></div>
<p></span></div>
</div>
</div>
<div><span>Legend:<br /></span><span>* pg &#8211; for Postgres 18.3, (QPS with gcc / QPS with clang)<br /></span><span>* my &#8211; for MySQL 8.4.8, (QPS with gcc / QPS with clang)<br /></span><span>* ma &#8211; for MariaDB 11.8.6, (QPS with gcc / QPS with clang)</span></div>
<div><span><br /></span><span>&#8212; point queries<br /></span><span>pg      my      ma<br /></span><span>1.02    1.00    0.99    hot-points<br /></span><span>1.02    0.98    1.02    point-query<br /></span><span>0.95    1.01    1.02    points-covered-pk<br /></span><span>0.96    1.02    1.02    points-covered-si<br /></span><span>0.97    1.00    1.02    points-notcovered-pk<br /></span><span>0.96    1.03    1.02    points-notcovered-si<br /></span><span>0.97    1.01    1.01    random-points_range=1000<br /></span><span>0.98    1.01    1.01    random-points_range=100<br /></span><span>1.00    0.99    1.00    random-points_range=10</span><span><br /></span><span><br /></span></div>
<div><span>&#8212; range queries without aggregation<br /></span><span>pg      my      ma<br /></span><span>1.01    0.98    1.03    range-covered-pk<br /></span><span>1.00    0.98    1.05    range-covered-si<br /></span><span>0.99    0.98    1.04    range-notcovered-pk<br /></span><span>0.99    1.02    0.97    range-notcovered-si<br /></span><span>1.02    1.06    1.03    scan</span></div>
<div><span><br />&#8212; range queries with aggregation<br /></span><span>pg      my      ma<br /></span><span>1.01    0.96    1.05    read-only-count<br /></span><span>0.99    0.99    1.01    read-only-distinct<br /></span><span>0.99    1.00    1.00    read-only-order<br /></span><span>0.99    1.00    1.01    read-only_range=10000<br /></span><span>1.00    0.98    1.00    read-only_range=100<br /></span><span>1.01    0.97    1.00    read-only_range=10<br /></span><span>0.99    0.97    1.03    read-only-simple<br /></span><span>1.02    0.98    1.02    read-only-sum</span><span><br /></span><span><br />&#8212; writes<br /></span><span>pg      my      ma<br /></span><span>1.03    0.98    1.00    delete<br /></span><span>1.01    1.00    1.00    insert<br /></span><span>1.00    0.98    1.00    read-write_range=100<br /></span><span>1.00    0.98    1.00    read-write_range=10<br /></span><span>0.99    1.01    0.97    update-index<br /></span><span>0.96    1.01    0.99    update-inlist<br /></span><span>0.99    0.99    0.99    update-nonindex<br /></span><span>1.02    0.98    0.99    update-one<br /></span><span>0.98    0.98    0.99    update-zipf<br /></span><span>1.00    0.99    0.99    write-only</span></div>
<p><a href="https://smalldatum.blogspot.com/2026/03/gcc-vs-clang-for-sysbench-on-small.html">gcc vs clang for sysbench on a small server with Postgres, MySQL and MariaDB</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>The insert benchmark on a small server : Postgres 12.22 through 18.3</title>
        <link>https://smalldatum.blogspot.com/2026/03/the-insert-benchmark-on-small-server.html</link>
        <pubDate>Sun, 29 Mar 2026 20:59:00 +0000</pubDate>
        <dc:creator>Mark Callaghan</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/the-insert-benchmark-on-a-small-server-postgres-12-22-through-18-3/</guid>
        <source url="https://smalldatum.blogspot.com/">Small Datum</source>
        <description><![CDATA[<p>This has results for Postgres versions 12.22 through 18.3 with the Insert Benchmark on a small server. My previous post for the same hardware with results up to Postgres 18.1 is here. This post also has results for:all 17.x releases from 17.0 through 17.9 18.2 with and without full page writes enabledboth 1 and 4 usersPostgres continues to be boring in a good way. It is hard to find performance regressions. Performance wasn't always stable, but I am reluctant to expect it to show no changes because there are sources of variance beyond the DBMS, especially HW (a too-hot SSD or CPU will run slower). Sometimes perf changes because there are obvious perf bugs, sometimes it changes for other reasons. tl;dr for a  CPU-bound workloadperformance is stable from Postgres 12 through 18performance is stable from Postgres 17.0 through 17.9disabling full-page writes improves throughput on write-heavy benchmark stepstl;dr for an IO-bound workloadperformance is mostly stable from Postgres 12 through 18performance is stable from Postgres 17.0 through 17.9disabling full-page writes improves throughput on write-heavy benchmark stepsin a few cases there are large improvements to point-query throughput on the qp1000 benchmark step. I will try to explain that soon.Builds, configuration and hardwareI compiled Postgres from source using -O2 -fno-omit-frame-pointer for versions 12.22, 13.23, 14.22, 15.17, 16.13, 17.0 to 17.9, 18.2 and 18.3.The server is an Beelink SER7 with a Ryzen 7 7840HS CPU with 8 cores and AMD SMT disabled, 32G of RAM. Storage is one SSD for the OS and an NVMe SSD for the database using ext-4 with discard enabled. The OS is Ubuntu 24.04.For versions prior to 18, the config file is named conf.diff.cx10a_c8r32 and they are as similar as possible and here for versions 12, 13, 14, 15, 16 and 17.For Postgres 18 in most cases I used a config named conf.diff.cx10b_c8r32 (aka cx10b) which is as similar as possible to the configs for versions 17 and earlier. But for tests with full-page writes disabled I used additional configs to compare with results from the cx10b config.cx10b_fpw0this adds full_page_writes=off while cx10b has =oncx10b_wallz4this adds wal_compression=lz4 while cx10b has =offcx10b_fpw0_wallz4this adds full_page_writes=off and wal_compression=lz4The BenchmarkThe benchmark is explained here and is run with 1 and 4 clients. In each case each client uses a separate table. I repeated it with two workloads:CPU-boundfor 1 user the values for X, Y, Z are 30M, 40M, 10Mfor 4 users the values for X, Y, Z are 10M, 16M, 4MIO-boundfor 1 user the values for X, Y, Z are 800M, 4M, 1Mfor 4 users the values for X, Y, Z are 200M, 4M, 1MThe point query (qp100, qp500, qp1000) and range query (qr100, qr500, qr1000) steps are run for 1800 seconds each.The benchmark steps are:l.i0insert X rows per table in PK order. The table has a PK index but no secondary indexes. There is one connection per client.l.xcreate 3 secondary indexes per table. There is one connection per client.l.i1use 2 connections/client. One inserts Y rows per table and the other does deletes at the same rate as the inserts. Each transaction modifies 50 rows (big transactions). This step is run for a fixed number of inserts, so the run time varies depending on the insert rate.l.i2like l.i1 but each transaction modifies 5 rows (small transactions) and Z rows are inserted and deleted per table.Wait for S seconds after the step finishes to reduce variance during the read-write benchmark steps that follow. The value of S is a function of the table size.qr100use 3 connections/client. One does range queries and performance is reported for this. The second does does 100 inserts/s and the third does 100 deletes/s. The second and third are less busy than the first. The range queries use covering secondary indexes. If the target insert rate is not sustained then that is considered to be an SLA failure. If the target insert rate is sustained then the step does the same number of inserts for all systems tested. This step is frequently not IO-bound for the IO-bound workload.qp100like qr100 except uses point queries on the PK indexqr500like qr100 but the insert and delete rates are increased from 100/s to 500/sqp500like qp100 but the insert and delete rates are increased from 100/s to 500/sqr1000like qr100 but the insert and delete rates are increased from 100/s to 1000/sqp1000like qp100 but the insert and delete rates are increased from 100/s to 1000/sResults: overviewThe performance reports are here for:CPU-boundLatest point releases: 1 user and 4 usersAll 17.x releases: 1 user and 4 usersFull-page writes enabled and disabled: 1 user and 4 usersIO-boundLatest point releases: 1 user and 4 usersAll 17.x releases: 1 user and 4 usersFull-page writes enabled and disabled: 1 user and 4 usersThe summary sections from the performances report have 3 tables. The first shows absolute throughput by DBMS tested X benchmark step. The second has throughput relative to the version from the first row of the table. The third shows the background insert rate for benchmark steps with background inserts. The second table makes it easy to see how performance changes over time. The third table makes it easy to see which DBMS+configs failed to meet the SLA.Below I use relative QPS to explain how performance changes. It is: (QPS for $me / QPS for $base) where $me is the result for some version. The base version is Postgres 12.22 for the latest point releases comparison, 17.0 for the 17.x releases comparison and 18.2 with the cx10b config for the full-page writes comparison. When relative QPS is &#62; 1.0 then performance improved over time. When it is &#60; 1.0 then there are regressions. The Q in relative QPS measures: insert/s for l.i0, l.i1, l.i2indexed rows/s for l.xrange queries/s for qr100, qr500, qr1000point queries/s for qp100, qp500, qp1000This statement doesn&#039;t apply to this blog post, but I keep it here for copy/paste into future posts. Below I use colors to highlight the relative QPS values with red for = 1.05 and grey for values between 0.95 and 1.05.Results: CPU-boundThe performance summaries are here for:1 user: latest point releases, all 17.x releases and full-page writes4 users: latest point releases, all 17.x releases and full-page writesFor latest point releases at 1 userthere is either no change or a small improvement for l.i0 (load in PK order), l.x (create indexes) and the read-write tests (qr*, qp*).for l.i1 and l.i2 (random write-only) throughput drops by 5% to 10% from 12.22 to 13.23 and has been stable since then (throughput in 18.2 is similar to 13.23. The CPU per operation overhead (cpupq here) increases after 12.22 for the l.i2 step but there wasn&#039;t an obvious increase for the l.i1 step - but the way I measure this is far from perfect. The results I share here are worse than what I measured in December 2025.For latest point releases at 4 usersthere might be a small (3%) regression for l.i0 (load in PK order) in 18.2 vs 12.22. Perhaps this is noise. From vmstat and iostat metrics there aren&#039;t obvious changes.throughput in 18.2 is better than 12.22 for all other benchmark stepsFor all 17.x releases at 1 userthroughput is stable from 17.0 to 17.9 for all benchmark steps except l.i1 and l.i2 (random writes) where there might be a 5% regression late in 17.x. This might be from new CPU overhead - see cpupq here.For all 17.x releases at 4 usersthroughput is stable with small improvements from 17.0 to 17.9For full-page writes at 1 userthroughput improves by ~5% for l.i1 and l.i2 (random writes) when full-page writes are disabled  and KB written to storage per commit drops by ~20% -- see wkbpi here.enabling wal_compression=lz4 decreases write throughput for all write-heavy steps when full-page writes are enabled. The impact is smaller when full page writes are disabled.For full-page writes at 4 usersthroughput improves by</p>
<p><a href="https://smalldatum.blogspot.com/2026/03/the-insert-benchmark-on-small-server.html">The insert benchmark on a small server : Postgres 12.22 through 18.3</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>This has results for Postgres versions 12.22 through 18.3 with the <a href="https://smalldatum.blogspot.com/2023/12/updates-for-insert-benchmark-december.html">Insert Benchmark</a> on a small server. My previous post for the same hardware with results up to Postgres 18.1 <a href="https://smalldatum.blogspot.com/2025/12/the-insert-benchmark-on-small-server.html">is here</a>. This post also has results for:</p>
</p>
<ul>
<li>all 17.x releases from 17.0 through 17.9 </li>
<li>18.2 with and without full page writes enabled</li>
<li>both 1 and 4 users</li>
</ul>
<p>Postgres continues to be boring in a good way. It is hard to find performance regressions. Performance wasn&#8217;t always stable, but I am reluctant to expect it to show no changes because there are sources of variance beyond the DBMS, especially HW (a too-hot SSD or CPU will run slower). Sometimes perf changes because there are obvious perf bugs, sometimes it changes for other reasons.</p>
<p> tl;dr for a  CPU-bound workload</p>
<div>
<ul>
<li>performance is stable from Postgres 12 through 18</li>
<li>performance is stable from Postgres 17.0 through 17.9</li>
<li>disabling full-page writes improves throughput on write-heavy benchmark steps</li>
</ul>
<div>tl;dr for an IO-bound workload</div>
<div>
<ul>
<li>performance is mostly stable from Postgres 12 through 18</li>
<li>performance is stable from Postgres 17.0 through 17.9</li>
<li>disabling full-page writes improves throughput on write-heavy benchmark steps</li>
<li>in a few cases there are large improvements to point-query throughput on the qp1000 benchmark step. I will try to explain that soon.</li>
</ul>
</div>
<div><b>Builds, configuration and hardware</b></div>
<div>
<div></div>
<div>I compiled Postgres from source using <i>-O2 -fno-omit-frame-pointer</i> for versions 12.22, 13.23, 14.22, 15.17, 16.13, 17.0 to 17.9, 18.2 and 18.3.</div>
<div>The server is an Beelink SER7 with a Ryzen 7 7840HS CPU with 8 cores and AMD SMT disabled, 32G of RAM. Storage is one SSD for the OS and an NVMe SSD for the database using ext-4 with discard enabled. The OS is Ubuntu 24.04.</div>
<div></div>
<div>For versions prior to 18, the config file is named conf.diff.cx10a_c8r32 and they are as similar as possible and here for versions <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/pg1219_o2nofp/conf.diff.cx10a_c8r32">12</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/pg1315_o2nofp/conf.diff.cx10a_c8r32">13</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/pg1412_o2nofp/conf.diff.cx10a_c8r32">14</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/pg157_o2nofp/conf.diff.cx10a_c8r32">15</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/pg163_o2nofp/conf.diff.cx10a_c8r32">16</a> and <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/pg172_o2nofp/conf.diff.cx10a_c8r32">17</a>.</div>
</p>
<div>For Postgres 18 in most cases I used a config named <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/pg18_o2nofp/conf.diff.cx10b_c8r32">conf.diff.cx10b_c8r32</a> (aka cx10b) which is as similar as possible to the configs for versions 17 and earlier. But for tests with full-page writes disabled I used additional configs to compare with results from the cx10b config.</div>
<div>
<ul>
<li><a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/pg18_o2nofp/conf.diff.cx10b_fpw0_c8r32">cx10b_fpw0</a></li>
<ul>
<li>this adds full_page_writes=off while cx10b has =on</li>
</ul>
<li><a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/pg18_o2nofp/conf.diff.cx10b_wallz4_c8r32">cx10b_wallz4</a></li>
<ul>
<li>this adds wal_compression=lz4 while cx10b has =off</li>
</ul>
<li><a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/pg18_o2nofp/conf.diff.cx10b_fpw0_wallz4_c8r32">cx10b_fpw0_wallz4</a></li>
<ul>
<li>this adds full_page_writes=off and wal_compression=lz4</li>
</ul>
</ul>
<div>
<div><b>The Benchmark</b></div>
<div>
<div></div>
<div>The benchmark is <a href="https://smalldatum.blogspot.com/2023/12/updates-for-insert-benchmark-december.html">explained here</a> and is run with 1 and 4 clients. In each case each client uses a separate table. I repeated it with two workloads:</div>
<div>
<ul>
<li>CPU-bound</li>
<ul>
<li>for 1 user the values for X, Y, Z are 30M, 40M, 10M</li>
<li>for 4 users the values for X, Y, Z are 10M, 16M, 4M</li>
</ul>
<li>IO-bound</li>
<ul>
<li>for 1 user the values for X, Y, Z are 800M, 4M, 1M</li>
<li>for 4 users the values for X, Y, Z are 200M, 4M, 1M</li>
</ul>
</ul>
<div>The point query (qp100, qp500, qp1000) and range query (qr100, qr500, qr1000) steps are run for 1800 seconds each.</div>
</div>
<div></div>
<div>The benchmark steps are:</div>
<div>
<div>
<ul>
<li>l.i0</li>
<ul>
<li>insert X rows per table in PK order. The table has a PK index but no secondary indexes. There is one connection per client.</li>
</ul>
<li>l.x</li>
<ul>
<li>create 3 secondary indexes per table. There is one connection per client.</li>
</ul>
<li>l.i1</li>
<ul>
<li>use 2 connections/client. One inserts Y rows per table and the other does deletes at the same rate as the inserts. Each transaction modifies 50 rows (big transactions). This step is run for a fixed number of inserts, so the run time varies depending on the insert rate.</li>
</ul>
<li>l.i2</li>
<ul>
<li>like l.i1 but each transaction modifies 5 rows (small transactions) and Z rows are inserted and deleted per table.</li>
<li>Wait for S seconds after the step finishes to reduce variance during the read-write benchmark steps that follow. The value of S is a function of the table size.</li>
</ul>
<li>qr100</li>
<ul>
<li>use 3 connections/client. One does range queries and performance is reported for this. The second does does 100 inserts/s and the third does 100 deletes/s. The second and third are less busy than the first. The range queries use covering secondary indexes. If the target insert rate is not sustained then that is considered to be an SLA failure. If the target insert rate is sustained then the step does the same number of inserts for all systems tested. This step is frequently not IO-bound for the IO-bound workload.</li>
</ul>
<li>qp100</li>
<ul>
<li>like qr100 except uses point queries on the PK index</li>
</ul>
<li>qr500</li>
<ul>
<li>like qr100 but the insert and delete rates are increased from 100/s to 500/s</li>
</ul>
<li>qp500</li>
<ul>
<li>like qp100 but the insert and delete rates are increased from 100/s to 500/s</li>
</ul>
<li>qr1000</li>
<ul>
<li>like qr100 but the insert and delete rates are increased from 100/s to 1000/s</li>
</ul>
<li>qp1000</li>
<ul>
<li>like qp100 but the insert and delete rates are increased from 100/s to 1000/s</li>
</ul>
</ul>
<div>
<div>
<div><b>Results: overview</b></div>
<div>
<div><b><br /></b></div>
<div>The performance reports are here for:</div>
</div>
</div>
<div>
<ul>
<li>CPU-bound</li>
<ul>
<li>Latest point releases: <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.mem.30m.50m.1800s.1u.pglatest/all.html">1 user</a> and <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.mem.10m.20m.1800s.4u.pglatest/all.html">4 users</a></li>
<li>All 17.x releases: <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.mem.30m.50m.1800s.1u.pg17/all.html">1 user</a> and <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.mem.10m.20m.1800s.4u.pg17/all.html">4 users</a></li>
<li>Full-page writes enabled and disabled: <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.mem.30m.50m.1800s.1u.pg.fpw/all.html">1 user</a> and <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.mem.10m.20m.1800s.4u.pg.fpw/all.html">4 users</a></li>
</ul>
<li>IO-bound</li>
<ul>
<li>Latest point releases: <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.io.800m.5m.1800s.1u.pglatest/all.html">1 user</a> and <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.io.200m.5m.1800s.4u.pglatest/all.html">4 users</a></li>
<li>All 17.x releases: <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.io.800m.5m.1800s.1u.pg17/all.html">1 user</a> and <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.io.200m.5m.1800s.4u.pg17/all.html">4 users</a></li>
<li>Full-page writes enabled and disabled: <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.io.800m.5m.1800s.1u.pg.fpw/all.html">1 user</a> and <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.io.200m.5m.1800s.4u.pg.fpw/all.html">4 users</a></li>
</ul>
</ul>
</div>
<div>The summary sections from the performances report have 3 tables. The first shows absolute throughput by DBMS tested X benchmark step. The second has throughput relative to the version from the first row of the table. The third shows the background insert rate for benchmark steps with background inserts. The second table makes it easy to see how performance changes over time. The third table makes it easy to see which DBMS+configs failed to meet the SLA.</div>
<div>
<div></div>
<div>Below I use relative QPS to explain how performance changes. It is: (QPS for $me / QPS for $base) where $me is the result for some version. The base version is Postgres 12.22 for the latest point releases comparison, 17.0 for the 17.x releases comparison and 18.2 with the cx10b config for the full-page writes comparison. </p>
<p>When relative QPS is &gt; 1.0 then performance improved over time. When it is &lt; 1.0 then there are regressions. The Q in relative QPS measures: </p></div>
<div>
<ul>
<li>insert/s for l.i0, l.i1, l.i2</li>
<li>indexed rows/s for l.x</li>
<li>range queries/s for qr100, qr500, qr1000</li>
<li>point queries/s for qp100, qp500, qp1000</li>
</ul>
<div>This statement doesn&#8217;t apply to this blog post, but I keep it here for copy/paste into future posts. Below I use colors to highlight the relative QPS values with <span>red</span> for &lt;= 0.95, <span>green</span> for &gt;= 1.05 and <span>grey</span> for values between 0.95 and 1.05.</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div></div>
<div><b>Results: CPU-bound</b></div>
<div></div>
<div>The performance summaries are here for:</div>
<div>
<ul>
<li>1 user: <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.mem.30m.50m.1800s.1u.pglatest/all.html#summary">latest point releases</a>, <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.mem.30m.50m.1800s.1u.pg17/all.html#summary">all 17.x releases</a> and <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.mem.30m.50m.1800s.1u.pg.fpw/all.html#summary">full-page writes</a></li>
<li>4 users: <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.mem.10m.20m.1800s.4u.pglatest/all.html#summary">latest point releases</a>, <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.mem.10m.20m.1800s.4u.pg17/all.html#summary">all 17.x releases</a> and <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.mem.10m.20m.1800s.4u.pg.fpw/all.html#summary">full-page writes</a></li>
</ul>
<div>For latest point releases at 1 user</div>
<div>
<ul>
<li>there is either no change or a small improvement for l.i0 (load in PK order), l.x (create indexes) and the read-write tests (qr*, qp*).</li>
<li>for l.i1 and l.i2 (random write-only) throughput drops by 5% to 10% from 12.22 to 13.23 and has been stable since then (throughput in 18.2 is similar to 13.23. The CPU per operation overhead (<a href="https://mdcallag.github.io/reports/mar26.ib.ser7.mem.30m.50m.1800s.1u.pglatest/all.html#l.i1.metrics">cpupq here</a>) increases after 12.22 for the l.i2 step but there wasn&#8217;t an obvious increase for the l.i1 step &#8211; but the way I measure this is far from perfect. The results I share here are worse than what I <a href="https://mdcallag.github.io/reports/dec25.ib.pn53.pg.latest.mem.30m.50m.1800s/all.html#summary">measured in December 2025</a>.</li>
</ul>
<div>For latest point releases at 4 users</div>
</div>
<div>
<ul>
<li>there might be a small (3%) regression for l.i0 (load in PK order) in 18.2 vs 12.22. Perhaps this is noise. From <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.mem.10m.20m.1800s.4u.pglatest/all.html#l.i0.metrics">vmstat and iostat metrics</a> there aren&#8217;t obvious changes.</li>
<li>throughput in 18.2 is better than 12.22 for all other benchmark steps</li>
</ul>
<div>For all 17.x releases at 1 user</div>
</div>
<div>
<ul>
<li>throughput is stable from 17.0 to 17.9 for all benchmark steps except l.i1 and l.i2 (random writes) where there might be a 5% regression late in 17.x. This might be from new CPU overhead &#8211; see <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.mem.30m.50m.1800s.1u.pg17/all.html#l.i1.metrics">cpupq here</a>.</li>
</ul>
<div>
<div>For all 17.x releases at 4 users</div>
<div>
<ul>
<li>throughput is stable with small improvements from 17.0 to 17.9</li>
</ul>
<div>
<div>For full-page writes at 1 user</div>
<div>
<ul>
<li>throughput improves by ~5% for l.i1 and l.i2 (random writes) when full-page writes are disabled  and KB written to storage per commit drops by ~20% &#8212; see <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.mem.30m.50m.1800s.1u.pg.fpw/all.html#l.i1.metrics">wkbpi here</a>.</li>
<li>enabling wal_compression=lz4 decreases write throughput for all write-heavy steps when full-page writes are enabled. The impact is smaller when full page writes are disabled.</li>
</ul>
<div>
<div>For full-page writes at 4 users</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<ul>
<li>throughput improves by &lt;= 5% for all write-heavy steps when full-page writes are disabled</li>
<li>the impact from wal_compression=lz4 isn&#8217;t obvious</li>
</ul>
</div>
<div><b>Results: IO-bound</b></div>
<div>
<div></div>
<div>The performance summaries are here for:</div>
<div>
<ul>
<li>1 user:  <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.io.800m.5m.1800s.1u.pglatest/all.html#summary">latest point releases</a>, <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.io.800m.5m.1800s.1u.pg17/all.html#summary">all 17.x releases</a> and <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.io.800m.5m.1800s.1u.pg.fpw/all.html#summary">full-page writes</a></li>
<li>4 users: <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.io.200m.5m.1800s.4u.pglatest/all.html#summary">latest point releases</a>, <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.io.200m.5m.1800s.4u.pg17/all.html#summary">all 17.x releases</a> and <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.io.200m.5m.1800s.4u.pg.fpw/all.html#summary">full-page writes</a></li>
</ul>
<div>
<div>For latest point releases at 1 user</div>
<div>
<ul>
<li>there are small (&lt;= 10%) improvements for l.i0 (load in PK order) and l.x (create index). I don&#039;t see anything obvious <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.io.800m.5m.1800s.1u.pglatest/all.html#l.i0.metrics">in vmstat and iostat metrics</a> to explain this.</li>
<li>there are small (&lt;= 10%) regressions for l.i1 and l.i2 (random writes) that might be from a sequence of small regressions from 13.x through 18.x. I don&#039;t see anything obvious <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.io.800m.5m.1800s.1u.pglatest/all.html#l.i0.metrics">in vmstat and iostat metrics</a> to explain this.</li>
<li>throughput is unchanged for the range-query read+write tests (qr*)</li>
<li>throughput improves by ~1.4X for the point-query read+write tests (qp*). This improvement arrived in 13.x. This can be explained by large drops in CPU overhead (cpupq) and context switch rates (cspq) &#8212; <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.io.800m.5m.1800s.1u.pglatest/all.html#qp500.L4.metrics">see here</a>.</li>
<li>the results here are similar to what I <a href="https://mdcallag.github.io/reports/dec25.ib.pn53.pg.latest.io.800m.5m.1800s/all.html#summary">measured in December 2025</a></li>
</ul>
<div>For latest point releases at 4 users</div>
</div>
<div>
<ul>
<li>there are small (~10%) regressions for l.i0 (load in PK order) that arrived in 17.x. The context switch rate (cspq) <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.io.200m.5m.1800s.4u.pglatest/all.html#l.i0.metrics">increases in 17.x</a>. </li>
<li>there are small (&lt;= 20%) improvements for l.x (create index) that arrived in 13.x</li>
<li>there are large regressions for l.i1 and l.i2 (random writes) that arrive in 15.x through 18.x. There are large increases in CPU overhead (cpupq) &#8212; <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.io.200m.5m.1800s.4u.pglatest/all.html#l.i1.metrics">see here</a>.</li>
<li>throughput is unchanged for the range-query read+write tests (qr*)</li>
<li>throughput improves for the point-query read+write tests (qp*) at higher write rates (qp500, qp1000).</li>
</ul>
<div>For all 17.x releases at 1 user</div>
</div>
<div>
<ul>
<li>throughput is stable with a few exceptions</li>
<li>for qp1000 (point-query, read+write) it improves by ~5% in 17.1 and is then stable to 17.9</li>
<li>in 17.9 there are large (~1.4x) improvements for all of the point-query, read+write tests</li>
<li>the changes in throughput for qp1000 might be explained by a small drop in CPU overhead per query (cpupq) that arrived in 17.1 and a large drop that arrived in 17.9 &#8212; <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.io.800m.5m.1800s.1u.pg17/all.html#qp1000.L6.metrics">see here</a>.</li>
</ul>
<div>
<div>For all 17.x releases at 4 users</div>
<div>
<ul>
<li>throughput for most steps (l.i0, l.x, qr*, qp100, qp500) is stable</li>
<li>throughput for l.i1 and l.i2 (random writes) has more variance</li>
<li>throughput for qp1000 drops by up to 10% from 17.3 through 17.8 and in those cases the CPU overhead increased &#8212; see <a href="https://mdcallag.github.io/reports/mar26.ib.ser7.io.200m.5m.1800s.4u.pg17/all.html#qp1000.L6.metrics">cpupq here</a>.</li>
</ul>
<div>
<div>For full-page writes at 1 user</div>
<div>
<ul>
<li>throughput improves by 6% for l.i1 (random writes) when full-page writes are disabled</li>
<li>throughput improved for qp* tests when either full-page writes were disabled or lz4 was used for log_compression. That is harder to explain, perhaps it is noise.</li>
</ul>
<div>
<div>For full-page writes at 4 users</div>
<div>
<ul>
<li>throughput improves by 20% for l.i1 (random writes) when full-page writes are disabled</li>
<li>throughput improved for qp* tests when either full-page writes were disabled or lz4 was used for log_compression. That is harder to explain, perhaps it is noise.</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div></div>
<p><b>n_dead_tup vs n_live_tup</b></div>
<div><b><br /></b></div>
<div>The tables below show the ratio: n_dead_tup / (n_dead_tup + n_live_tup) for the CPU-bound and IO-bound workloads using 1 user (and one table). These were measured at the end of each benchmark step.</p>
</div>
</div>
</div>
<div>
<div><span>CPU-bound</span></div>
<div><span>        12.22   18.3</span></div>
<div><span>l.i0    0.000   0.000</span></div>
<div><span>l.x     0.000   0.000</span></div>
<div><span>l.i1    0.065   0.035</span></div>
<div><span>l.i2    0.045   0.020</span></div>
<div><span>qr100   0.006   0.006</span></div>
<div><span>qp100   0.012   0.012</span></div>
<div><span>qr500   0.040   0.040</span></div>
<div><span>qp500   0.021   0.024</span></div>
<div><span>qr1000  0.031   0.036</span></div>
<div><span>qp1000  0.040   0.003</span></div>
<div><span><br /></span></div>
<div><span>IO-bound</span></div>
<div><span>        12.22   18.3</span></div>
<div><span>l.i0    0.000   0.000</span></div>
<div><span>l.x     0.000   0.000</span></div>
<div><span>l.i1    0.005   0.005</span></div>
<div><span>l.i2    0.006   0.006</span></div>
<div><span>qr100   0.000   0.000</span></div>
<div><span>qp100   0.000   0.000</span></div>
<div><span>qr500   0.002   0.002</span></div>
<div><span>qp500   0.003   0.003</span></div>
<div><span>qr1000  0.005   0.005</span></div>
<div><span>qp1000  0.007   0.007</span></div>
</div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<p> </p>
<p><a href="https://smalldatum.blogspot.com/2026/03/the-insert-benchmark-on-small-server.html">The insert benchmark on a small server : Postgres 12.22 through 18.3</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Selecting a character set for MySQL and MariaDB clients</title>
        <link>https://smalldatum.blogspot.com/2026/03/selecting-character-set-for-mysql-and.html</link>
        <pubDate>Sun, 29 Mar 2026 00:26:00 +0000</pubDate>
        <dc:creator>Mark Callaghan</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/selecting-a-character-set-for-mysql-and-mariadb-clients/</guid>
        <source url="https://smalldatum.blogspot.com/">Small Datum</source>
        <description><![CDATA[<p> MySQL and MariaDB have many character-set related options, perhaps too many:character_set_clientcharacter_set_connectioncharacter_set_databasecharacter_set_filesystemcharacter_set_resultscharacter_set_servercharacter_set_systemThis is a topic that I don't know much about and I am still far from an expert. My focus has been other DBMS topics. But I spent time recently on this topic while explaining what looked like a performance regression, but really was just a new release of MySQL using a charset that is less CPU-efficient than the previous charset that was used.DebuggingThe intial sequence to understand what was going on was:mysql -e 'SHOW GLOBAL VARIABLES like "character_set_%"mysql -e 'SHOW SESSION VARIABLES like "character_set_%"run "SHOW SESSION VARIABLES" from my benchmark clientNote:the output from steps 1 and 2 was differentwith SHOW GLOBAL VARIABLES I got character_set_client =latin1 but with SHOW SESSION VARIABLES I got character_set_client =utf8mb3. This happens. One reason is that some MySQL client binaries autodetect the charset based on the value of LANG or LC_TYPE from your Linux env. Another reason is that if autodetection isn't done then the clients can use the default charset that was set at compile time. That charset is then passed to the server during connection handshake (see thd_init_client_charset). So it is likely that character_set_client as displayed by SHOW GLOBAL VARIABLES isn't what your client will use.the output from steps 2 and 3 was differentautodetection is only done when mysql_options() is called with a certain flag (see below). And that is not done by the MySQL driver in sysbench, nor is it done by Python's MySQLdb. So my benchmark clients are likely selecting the default charset and don't do autodetection. And that default is determined by the version of the MySQL client library, meaning that default can change over the years. For the source that implements this, search for MYSQL_AUTODETECT_CHARSET_NAME and read sql-common/client.c.The following enables autodetection and should be called before calling mysql_real_connect():    mysql_options(...,                   MYSQL_SET_CHARSET_NAME,                  MYSQL_AUTODETECT_CHARSET_NAME);Note that adding the following into my.cnf isn't a workaround for clients that don't do autodetect.    [client]    default-character-set=...NotesThese are from my usage of MySQL 5.7.44, 8.0.45 and 8.4.8 along with MariaDB 10.6.25, 10.11.16 and 11.4.10. All were compiled from source as was sysbench. I installed MySQLdb and the MySQL client library via apt for Ubuntu 24.04.The values for character_set_client, character_set_results and character_set_connection were measured via the MySQL command-line client running SHOW GLOBAL VARIABLES and SHOW SESSION VARIABLES and then the benchmark clients running SHOW SESSION VARIABLES.The reason for sharing this is to explain the many possible values your session might use for character_set_client, character_set_results and character_set_connection. And using the wrong value might waste CPU.What per-session values are used for character_set_client&#124;results&#124;connection?* my.cnf has character_set_server=latin1* per SHOW GLOBAL VARIABLES each is set to =latin1* values below measured via SHOW SESSION VARIABLES<br />
Values for character_set_client&#124;results&#124;connection... with "mysql" command line client... this is easy to change with --default-character-set command line option or equivalent option in my.cnfdbms5.7.44     utf88.0.45     utf8mb48.4.8      utf8mb4<br />
10.6.25     utf8mb310.11.16    utf8mb311.4.10     utf8mb3<br />
Values for character_set_client&#124;results&#124;connection... with sysbench<br />
        client library versiondbms      5.7   8.0   8.4   10.6  10.11  11.45.7.44     latin1 latin1 latin1 NA   NA   NA8.0.45     latin1 utf8mb4 utf8mb4 NA   NA   NA8.4.8      latin1 utf8mb4 utf8mb4 NA   NA   NA<br />
10.6.25     latin1 latin1 latin1 utf8mb4 utf8mb4 utf8mb410.11.16    latin1 latin1 latin1 utf8mb4 utf8mb4 utf8mb411.4.10     latin1 utf8mb4 utf8mb4 utf8mb4 utf8mb4 utf8mb4<br />
Values for character_set_client&#124;results&#124;connection... with insert benchmark (Python MySQLdb and /lib/x86_64-linux-gnu/libmysqlclient.so.21... I am not what version is libmysqlclient.so.21, this is on Ubuntu 24.04<br />
dbms5.7.44     latin18.0.45     utf8mb48.4.8      utf8mb4<br />
10.6.25     latin110.11.16    latin111.4.10     utf8mb4</p>
<p><a href="https://smalldatum.blogspot.com/2026/03/selecting-character-set-for-mysql-and.html">Selecting a character set for MySQL and MariaDB clients</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p> MySQL and MariaDB have many character-set related options, perhaps too many:</p>
</p>
<ol>
<li>character_set_client</li>
<li>character_set_connection</li>
<li>character_set_database</li>
<li>character_set_filesystem</li>
<li>character_set_results</li>
<li>character_set_server</li>
<li>character_set_system</li>
</ol>
<div>This is a topic that I don&#8217;t know much about and I am still far from an expert. My focus has been other DBMS topics. But I spent time recently on this topic while explaining what looked like a performance regression, but really was just a new release of MySQL using a charset that is less CPU-efficient than the previous charset that was used.</div>
<div></div>
<div><b>Debugging</b></div>
<div></div>
<div>The intial sequence to understand what was going on was:</div>
<div>
<ol>
<li>mysql -e &#8216;SHOW GLOBAL VARIABLES like &#8220;character_set_%&#8221;</li>
<li>mysql -e &#8216;SHOW SESSION VARIABLES like &#8220;character_set_%&#8221;</li>
<li>run &#8220;SHOW SESSION VARIABLES&#8221; from my benchmark client</li>
</ol>
<div>Note:</div>
</div>
<div>
<ul>
<li>the output from steps 1 and 2 was different</li>
<ul>
<li>with SHOW GLOBAL VARIABLES I got character_set_client =latin1 but with SHOW SESSION VARIABLES I got character_set_client =utf8mb3. This happens. One reason is that some MySQL client binaries autodetect the charset based on the value of LANG or LC_TYPE from your Linux env. Another reason is that if autodetection isn&#8217;t done then the clients can use the default charset that was set at compile time. That charset is then passed to the server during connection handshake (see thd_init_client_charset). So it is likely that character_set_client as displayed by SHOW GLOBAL VARIABLES isn&#8217;t what your client will use.</li>
</ul>
<li>the output from steps 2 and 3 was different</li>
<ul>
<li>autodetection is only done when mysql_options() is called with a certain flag (see below). And that is not done by the MySQL driver in sysbench, nor is it done by Python&#8217;s MySQLdb. So my benchmark clients are likely selecting the default charset and don&#8217;t do autodetection. And that default is determined by the version of the MySQL client library, meaning that default can change over the years. For the source that implements this, search for MYSQL_AUTODETECT_CHARSET_NAME and read sql-common/client.c.</li>
</ul>
</ul>
<div>The following enables autodetection and should be called before calling mysql_real_connect():</div>
<div><span><span>    mysql_options(&#8230;, </span></span></div>
<div><span><span>                  MYSQL_SET_CHARSET_NAME,</span></span></div>
<div><span><span>                  MYSQL_AUTODETECT_CHARSET_NAME);</span></span></div>
<div><span><span><span><br /></span></span></span></div>
<div><span><span>Note that adding the following into my.cnf isn&#8217;t a workaround for clients that don&#8217;t do autodetect.</span></span></div>
<div><span>    [client]</span></div>
<div><span>    default-character-set=&#8230;</span></div>
<div><span><br /><span><b>Notes</b></span></span></div>
</div>
<div><span><span><br /></span></span></div>
<div><span><span>These are from my usage of MySQL 5.7.44, 8.0.45 and 8.4.8 along with MariaDB 10.6.25, 10.11.16 and 11.4.10. All were compiled from source as was sysbench. I installed MySQLdb and the MySQL client library via apt for Ubuntu 24.04.</p>
<p>The values for character_set_client, character_set_results and character_set_connection were measured via the MySQL command-line client running SHOW GLOBAL VARIABLES and SHOW SESSION VARIABLES and then the benchmark clients running SHOW SESSION VARIABLES.</p>
<p>The reason for sharing this is to explain the many possible values your session might use for character_set_client, character_set_results and character_set_connection. And using the wrong value might waste CPU.</span></span></div>
<div></div>
</p>
<table class="highlight tab-size js-file-line-container" data-hpc="" data-paste-markdown-skip="" data-tab-size="4" data-tagsearch-path="gistfile1.txt">
<tbody>
<tr>
<td class="blob-code blob-code-inner js-file-line">What per-session values are used for character_set_client|results|connection?</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">* my.cnf has character_set_server=latin1</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">* per SHOW GLOBAL VARIABLES each is set to =latin1</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">* values below measured via SHOW SESSION VARIABLES</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">Values for character_set_client|results|connection</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">&#8230; with &#8220;mysql&#8221; command line client</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">&#8230; this is easy to change with &#8211;default-character-set command line option or equivalent option in my.cnf</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">dbms</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">5.7.44          utf8</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">8.0.45          utf8mb4</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">8.4.8           utf8mb4</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">10.6.25         utf8mb3</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">10.11.16        utf8mb3</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">11.4.10         utf8mb3</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">Values for character_set_client|results|connection</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">&#8230; with sysbench</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line"></td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">                client library version</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">dbms            5.7     8.0     8.4     10.6    10.11   11.4</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">5.7.44          latin1  latin1  latin1  NA      NA      NA</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">8.0.45          latin1  utf8mb4 utf8mb4 NA      NA      NA</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">8.4.8           latin1  utf8mb4 utf8mb4 NA      NA      NA</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">10.6.25         latin1  latin1  latin1  utf8mb4 utf8mb4 utf8mb4</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">10.11.16        latin1  latin1  latin1  utf8mb4 utf8mb4 utf8mb4</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">11.4.10         latin1  utf8mb4 utf8mb4 utf8mb4 utf8mb4 utf8mb4</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">Values for character_set_client|results|connection</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">&#8230; with insert benchmark (Python MySQLdb and /lib/x86_64-linux-gnu/libmysqlclient.so.21</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">&#8230; I am not what version is libmysqlclient.so.21, this is on Ubuntu 24.04</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line"></td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">dbms</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">5.7.44          latin1</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">8.0.45          utf8mb4</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">8.4.8           utf8mb4</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">10.6.25         latin1</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">10.11.16        latin1</td>
</tr>
<tr>
<td class="blob-code blob-code-inner js-file-line">11.4.10         utf8mb4</td>
</tr>
</tbody>
</table>
<p><a href="https://smalldatum.blogspot.com/2026/03/selecting-character-set-for-mysql-and.html">Selecting a character set for MySQL and MariaDB clients</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Binary Log Compression is Safe since MySQL 8.0.34</title>
        <link>https://jfg-mysql.blogspot.com/2026/03/binlog-compression-now-safe.html</link>
        <pubDate>Thu, 26 Mar 2026 20:41:00 +0000</pubDate>
        <dc:creator>Jean-François Gagné</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/binary-log-compression-is-safe-since-mysql-8-0-34-2/</guid>
        <source url="https://jfg-mysql.blogspot.com/">J-F Gagné&#039;s MySQL Blog</source>
        <description><![CDATA[<p>This is a quick one.  My attention was recently brought (thanks Simon) on a relatively recent comment (25 Nov 2025) in Bug #103672 - Binlog compression transaction payload event exceeds max allowed packet :</p>
<p>The underlying server bug was fixed in 8.0.34 in BUG#33588473. The server now falls back to writing the transaction without compression, if the compressed size would</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/03/binlog-compression-now-safe.html">Binary Log Compression is Safe since MySQL 8.0.34</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>This is a quick one.  My attention was recently brought (thanks Simon) on a relatively recent comment (25 Nov 2025) in Bug #103672 &#8211; Binlog compression transaction payload event exceeds max allowed packet :</p>
<p>The underlying server bug was fixed in 8.0.34 in BUG#33588473. The server now falls back to writing the transaction without compression, if the compressed size would</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/03/binlog-compression-now-safe.html">Binary Log Compression is Safe since MySQL 8.0.34</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Binary Log Compression is Safe since MySQL 8.0.34</title>
        <link>https://jfg-mysql.blogspot.com/2026/03/binlog-compression-now-safe.html</link>
        <pubDate>Thu, 26 Mar 2026 20:41:00 +0000</pubDate>
        <dc:creator>Jean-François Gagné</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/binary-log-compression-is-safe-since-mysql-8-0-34/</guid>
        <source url="https://jfg-mysql.blogspot.com/">J-F Gagné&#039;s MySQL Blog</source>
        <description><![CDATA[<p>This is a quick one.  My attention was recently brought (thanks Simon) on a relatively recent comment (25 Nov 2025) in Bug #103672 - Binlog compression transaction payload event exceeds max allowed packet :</p>
<p>The underlying server bug was fixed in 8.0.34 in BUG#33588473. The server now falls back to writing the transaction without compression, if the compressed size would</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/03/binlog-compression-now-safe.html">Binary Log Compression is Safe since MySQL 8.0.34</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>This is a quick one.  My attention was recently brought (thanks Simon) on a relatively recent comment (25 Nov 2025) in Bug #103672 &#8211; Binlog compression transaction payload event exceeds max allowed packet :</p>
<p>The underlying server bug was fixed in 8.0.34 in BUG#33588473. The server now falls back to writing the transaction without compression, if the compressed size would</p>
<p><a href="https://jfg-mysql.blogspot.com/2026/03/binlog-compression-now-safe.html">Binary Log Compression is Safe since MySQL 8.0.34</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>Sysbench vs MySQL on a small server: no new regressions, many old ones</title>
        <link>https://smalldatum.blogspot.com/2026/03/sysbench-vs-mysql-on-small-server-no.html</link>
        <pubDate>Tue, 24 Mar 2026 21:31:00 +0000</pubDate>
        <dc:creator>Mark Callaghan</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/sysbench-vs-mysql-on-a-small-server-no-new-regressions-many-old-ones/</guid>
        <source url="https://smalldatum.blogspot.com/">Small Datum</source>
        <description><![CDATA[<p>This has performance results for InnoDB from MySQL 5.6.51, 5.7.44, 8.0.X, 8.4.8 and 9.7.0 on a small server with sysbench microbenchmarks. The workload here is cached by InnoDB and my focus is on regressions from new CPU overheads. In many cases, MySQL 5.6.51 gets about 1.5X more QPS than modern MySQL (8.0.x thru 9.7). The root cause is new CPU overhead, possibly from code bloat.tl;drThere are too many performance regressions in MySQL 8.0.XThere are few performance regressions in MySQL 8.4 through 9.7.0In many cases MySQL 5.6.51 gets ~1.5X more QPS than 9.7.0 because 9.7.0 uses more CPULarge regressions arrived in MySQL 8.0.30 and 8.0.32, especiall for full-table scansBuilds, configuration and hardwareI compiled MySQL from source for versions 5.6.51, 5.7.44, 8.0.X, 8.4.8 and 9.7.0. For MySQL 8.0.X I used 8.0.28, 8.0.30, 8.0.31, 8.0.32, 8.0.33, 8.0.34, 8.0.35, 8.0.36 and 8.0.45.The server is an ASUS ExpertCenter PN53 with AMD Ryzen 7 7735HS, 32G RAM and an m.2 device for the database. More details on it are here. The OS is Ubuntu 24.04 and the database filesystem is ext4 with discard enabled.The my.cnf files are here for 5.6, 5.7, 8.4 and 9.7.The my.cnf files are here fo 8.0.28, 8.0.30, 8.0.31, 8.0.32, 8.0.33, 8.0.34, 8.0.35, 8.0.36 and 8.0.45.BenchmarkI used sysbench and my usage is explained here. To save time I only run 32 of the 42 microbenchmarks and most test only 1 type of SQL statement. Benchmarks are run with the database cached by InnoDB.The tests are run using 1 table with 50M rows. The read-heavy microbenchmarks run for 630 seconds and the write-heavy for 930 seconds.ResultsThe microbenchmarks are split into 4 groups -- 1 for point queries, 2 for range queries, 1 for writes. For the range query microbenchmarks, part 1 has queries that don't do aggregation while part 2 has queries that do aggregation. I provide tables below with relative QPS. When the relative QPS is &#62; 1 then some version is faster than the base version. When it is &#60; 1 then there might be a regression.  The relative QPS is below where the base version is either MySQL 5.6.51 or 8.0.28:(QPS for some version) / (QPS for base version) Values from iostat and vmstat divided by QPS are here for 5.6.51 as the base version and then here for 8.0.28 as the base version. These can help to explain why something is faster or slower because it shows how much HW is used per request.Results: point queriesSummary:there are large regressions from 5.6.51 to 5.7.44there are larger regressions from 5.7.44 to 8.0.45the regressions from 8.0.45 to 9.7.0 are smallthe regressions in the random-points tests are larger for range=10 than range=1000 (larger when the range is smaller). So the regressions are more likely to be in places other than InnoDB. The problem is new CPU overhead (see cpu/o here) which is 1.55X larger in 9.7.0 vs 5.6.51 for random-points_range=10 but only 1.19X larger in 9.7.0 for random-points_range=1000.Relative to: 5.6.51col-1 : 5.7.44col-2 : 8.0.45col-3 : 8.4.8col-4 : 9.7.0col-1   col-2   col-3   col-40.87    0.65    0.65    0.64    hot-points0.87    0.69    0.67    0.63    point-query0.87    0.72    0.72    0.71    points-covered-pk0.90    0.78    0.78    0.76    points-covered-si0.89    0.73    0.72    0.71    points-notcovered-pk0.89    0.77    0.76    0.75    points-notcovered-si1.00    0.84    0.83    0.83    random-points_range=10000.89    0.72    0.72    0.72    random-points_range=1000.87    0.69    0.68    0.66    random-points_range=10Summary:The large regressions in 8.0.x for point queries (see above) occur prior to 8.0.28Relative to: 8.0.28col-1 : 8.0.30col-2 : 8.0.31col-3 : 8.0.32col-4 : 8.0.33col-5 : 8.0.34col-6 : 8.0.35col-7 : 8.0.36col-8 : 8.0.45col-1   col-2   col-3   col-4   col-5   col-6   col-7   col-80.92    1.14    1.14    1.12    1.17    1.16    1.16    1.16    hot-points0.97    0.97    0.95    0.96    0.95    0.95    0.95    0.95    point-query0.94    1.09    1.09    1.08    1.12    1.12    1.11    1.15    points-covered-pk0.90    1.08    1.07    1.07    1.12    1.13    1.12    1.16    points-covered-si0.91    1.04    1.04    1.03    1.07    1.07    1.06    1.11    points-notcovered-pk0.88    0.96    0.96    0.95    1.00    1.01    1.00    1.06    points-notcovered-si0.79    2.35    2.42    2.37    2.45    2.45    2.47    2.56    random-points_range=10000.94    1.07    1.06    1.06    1.09    1.08    1.10    1.12    random-points_range=1000.93    0.94    0.93    0.93    0.94    0.94    0.93    0.95    random-points_range=10Results: range queries without aggregationSummary:there are large regressions from 5.6.51 to 5.7.44there are larger regressions from 5.7.44 to 8.0.45the regressions from 8.0.45 to 9.7.0 are smallthe problem is new CPU overhead and for the scan test the CPU overhead per query is about 1.5X larger in modern MySQL (8.0 thru 9.7) relative to MySQL 5.6.51 (see cpu/o here)Relative to: 5.6.51col-1 : 5.7.44col-2 : 8.0.45col-3 : 8.4.8col-4 : 9.7.0col-1   col-2   col-3   col-40.83    0.68    0.66    0.65    range-covered-pk0.83    0.70    0.69    0.67    range-covered-si0.84    0.66    0.65    0.64    range-notcovered-pk0.88    0.74    0.73    0.73    range-notcovered-si0.84    0.67    0.66    0.67    scanSummary:There is a large regression in 8.0.30 and a larger one in 8.0.32The scan test is the worst case for the regression.Relative to: 8.0.28col-1 : 8.0.30col-2 : 8.0.31col-3 : 8.0.32col-4 : 8.0.33col-5 : 8.0.34col-6 : 8.0.35col-7 : 8.0.36col-8 : 8.0.45col-1   col-2   col-3   col-4   col-5   col-6   col-7   col-80.95    0.94    0.92    0.92    0.92    0.93    0.93    0.96    range-covered-pk0.96    0.96    0.94    0.93    0.93    0.94    0.93    0.95    range-covered-si0.94    0.94    0.93    0.93    0.94    0.94    0.93    0.93    range-notcovered-pk0.89    0.87    0.87    0.86    0.89    0.91    0.89    0.95    range-notcovered-si0.93    0.92    0.79    0.82    0.83    0.77    0.82    0.80    scanResults: range queries with aggregationSummary:there are large regressions from 5.6.51 to 5.7.44there are larger regressions from 5.7.44 to 8.0.45the regressions from 8.0.45 to 9.7.0 are smallRelative to: 5.6.51col-1 : 5.7.44col-2 : 8.0.45col-3 : 8.4.8col-4 : 9.7.0col-1   col-2   col-3   col-40.86    0.70    0.69    0.68    read-only-count1.42    1.27    1.24    1.23    read-only-distinct0.91    0.75    0.74    0.73    read-only-order1.23    1.01    1.01    1.01    read-only_range=100000.93    0.77    0.76    0.74    read-only_range=1000.86    0.69    0.68    0.66    read-only_range=100.83    0.68    0.68    0.66    read-only-simple0.83    0.67    0.67    0.66    read-only-sumSummary:There are significant regressions in 8.0.30 and 8.0.32Relative to: 8.0.28col-1 : 8.0.30col-2 : 8.0.31col-3 : 8.0.32col-4 : 8.0.33col-5 : 8.0.34col-6 : 8.0.35col-7 : 8.0.36col-8 : 8.0.45col-1   col-2   col-3   col-4   col-5   col-6   col-7   col-80.95    0.94    0.87    0.87    0.88    0.87    0.89    0.91    read-only-count0.97    0.96    0.94    0.95    0.96    0.95    0.95    0.96    read-only-distinct0.97    0.96    0.93    0.95    0.95    0.94    0.95    0.95    read-only-order0.96    0.95    0.93    0.94    0.95    0.95    0.96    0.98    read-only_range=100000.96    0.96    0.94    0.95    0.95    0.94    0.95    0.94    read-only_range=1000.96    0.97    0.95    0.95    0.95    0.94    0.95    0.94    read-only_range=100.94    0.94    0.92    0.93    0.93    0.93    0.94    0.94    read-only-simple0.94    0.94    0.89    0.91    0.92    0.90    0.93    0.91    read-only-sumResults: writesSummary:there are large regressions from 5.6.51 to 5.7.44there are larger regressions from 5.7.44 to 8.0.45the regressions from 8.0.45 to 9.7.0 are smallthe insert test is the worst case and a big part of that is new CPU overhead, see cpu/o here, where it is 2.13X larger in 9.7.0 than 5.6.51. But for update-one the problem is writing more to storage per commit (see wkbpi here) rather than new CPU overhead.Relative to: 5.6.51col-1 : 5.7.44col-2 : 8.0.45col-3 : 8.4.8col-4 : 9.7.0col-1   col-2   col-3   col-40.85    0.60    0.59    0.55    delete0.81    0.55    0.54    0.52    insert0.93    0.75    0.74    0.71    read-write_range=1000.87    0.70    0.68    0.66    read-write_range=101.20    0.88    0.89    0.91    update-index1.04    0.74    0.73    0.71    update-inlist0.87    0.62    0.61    0.57    update-nonindex0.87    0.62    0.60    0.57    update-one0.87    0.63    0.61    0.58    update-zipf0.93    0.69    0.68    0.66    write-onlySummary:There are significant regressions in 8.0.30 and 8.0.32Relative to: 8.0.28col-1 : 8.0.30col-2 : 8.0.31col-3 : 8.0.32col-4 : 8.0.33col-5 : 8.0.34col-6 : 8.0.35col-7 : 8.0.36col-8 : 8.0.45col-1   col-2   col-3   col-4   col-5   col-6   col-7   col-80.96    0.95    0.92    0.92    0.92    0.91    0.91    0.91    delete0.94    0.93    0.91    0.91    0.91    0.90    0.90    0.90    insert0.96    0.96    0.94    0.94    0.94    0.94    0.94    0.93    read-write_range=1000.96    0.96    0.94    0.94    0.94    0.94    0.94    0.93    read-write_range=100.91    0.91    0.84    0.84    0.86    0.85    0.86    0.79    update-index0.94    0.95    0.92    0.91    0.92    0.91    0.91    0.91    update-inlist0.95    0.96    0.92    0.92    0.92    0.91    0.91    0.90    update-nonindex0.96    0.96    0.93    0.92    0.92    0.91    0.92    0.91    update-one0.96    0.96    0.92    0.92    0.92    0.91    0.91    0.90    update-zipf0.94    0.94    0.91    0.91    0.91    0.91    0.91    0.89    write-only</p>
<p><a href="https://smalldatum.blogspot.com/2026/03/sysbench-vs-mysql-on-small-server-no.html">Sysbench vs MySQL on a small server: no new regressions, many old ones</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>This has performance results for InnoDB from MySQL 5.6.51, 5.7.44, 8.0.X, 8.4.8 and 9.7.0 on a small server with sysbench microbenchmarks. The workload here is cached by InnoDB and my focus is on regressions from new CPU overheads. </p>
<p>In many cases, MySQL 5.6.51 gets about 1.5X more QPS than modern MySQL (8.0.x thru 9.7). The root cause is new CPU overhead, possibly from code bloat.</p>
<p>tl;dr</p>
</p>
<ul>
<li>There are too many performance regressions in MySQL 8.0.X</li>
<li>There are few performance regressions in MySQL 8.4 through 9.7.0</li>
<li>In many cases MySQL 5.6.51 gets ~1.5X more QPS than 9.7.0 because 9.7.0 uses more CPU</li>
<li>Large regressions arrived in MySQL 8.0.30 and 8.0.32, especiall for full-table scans</li>
</ul>
<div><b>Builds, configuration and hardware</b></div>
<div>
<div>
</p>
<div></div>
</p>
<div>I compiled MySQL from source for versions 5.6.51, 5.7.44, 8.0.X, 8.4.8 and 9.7.0. For MySQL 8.0.X I used 8.0.28, 8.0.30, 8.0.31, 8.0.32, 8.0.33, 8.0.34, 8.0.35, 8.0.36 and 8.0.45.</div>
</div>
<p>The server is an ASUS ExpertCenter PN53 with AMD Ryzen 7 7735HS, 32G RAM and an m.2 device for the database. More details on it <a href="https://smalldatum.blogspot.com/2022/10/small-servers-for-performance-testing-v4.html">are here</a>. The OS is Ubuntu 24.04 and the database filesystem is ext4 with discard enabled.</p>
<p>The my.cnf files are here for <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/my5651_rel_o2nofp/etc/my.cnf.cz12a_c8r32">5.6</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/my5744_rel_o2nofp/etc/my.cnf.cz12a_c8r32">5.7</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/my8406_rel_o2nofp/etc/my.cnf.cz12a_c8r32">8.4</a> and <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/my97/etc/my.cnf.cz12a_c8r32">9.7</a>.</p>
<p>The my.cnf files are here fo <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/my8028_rel_o2nofp/etc/my.cnf.cz12a_c8r32">8.0.28</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/my8030_rel_o2nofp/etc/my.cnf.cz12a_c8r32">8.0.30</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/my8031_rel_o2nofp/etc/my.cnf.cz12a_c8r32">8.0.31</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/my8032_rel_o2nofp/etc/my.cnf.cz12a_c8r32">8.0.32</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/my8033_rel_o2nofp/etc/my.cnf.cz12a_c8r32">8.0.33</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/my8034_rel/etc/my.cnf.cz12a_c8r32">8.0.34</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/my8035_rel_o2nofp/etc/my.cnf.cz12a_c8r32">8.0.35</a>, <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/my8036_rel_o2nofp/etc/my.cnf.cz12a_c8r32">8.0.36</a> and <a href="https://github.com/mdcallag/mytools/blob/master/bench/conf/arc/oct24/c8r32/my8040_rel_o2nofp/etc/my.cnf.cz12a_c8r32">8.0.45</a>.</p>
<p><b>Benchmark</b></p>
<div>
<div>I used sysbench and my usage is <a href="http://smalldatum.blogspot.com/2017/02/using-modern-sysbench-to-compare.html">explained here</a>. To save time I only run 32 of the 42 microbenchmarks and most test only 1 type of SQL statement. Benchmarks are run with the database cached by InnoDB.</div>
<div>The tests are run using 1 table with 50M rows. The read-heavy microbenchmarks run for 630 seconds and the write-heavy for 930 seconds.</div>
</div>
</div>
<div></div>
<div>
<div><b>Results</b></div>
<div><span></p>
<div></div>
<div><span>The microbenchmarks are split into 4 groups &#8212; 1 for point queries, 2 for range queries, 1 for writes. For the range query microbenchmarks, part 1 has queries that don&#8217;t do aggregation while part 2 has queries that do aggregation. </span></div>
<div>I provide tables below with relative QPS. <span>When the relative QPS is &gt; 1 then </span><i>some version</i><span> is faster than the</span><span> </span><i>base version.</i><span> When it is &lt; 1 then there might be a regression.  </span><span>The relative QPS is below where the base version is either MySQL 5.6.51 or 8.0.28:</span></div>
<div>
<div></div>
<blockquote><p>(QPS for some version) / (QPS for base version)<span> </span></p></blockquote>
</div>
<div><span>Values from iostat and vmstat divided by QPS are <a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/mar26.pn53.sb.my/o.met.latest">here for 5.6.51</a> as the base version and then <a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/mar26.pn53.sb.my/o.met.my80v2">here for 8.0.28</a> as the base version</span><span>. These can help to explain why something is faster or slower because it shows how much HW is used per request.</span></div>
<div></div>
<div><b>Results: point queries</b></div>
<div></div>
<div>Summary:</div>
<div>
<ul>
<li>there are large regressions from 5.6.51 to 5.7.44</li>
<li>there are larger regressions from 5.7.44 to 8.0.45</li>
<li>the regressions from 8.0.45 to 9.7.0 are small</li>
<li>the regressions in the random-points tests are larger for range=10 than range=1000 (larger when the range is smaller). So the regressions are more likely to be in places other than InnoDB. The problem is new CPU overhead (<a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/mar26.pn53.sb.my/o.met.latest#L281-L321">see cpu/o here</a>) which is 1.55X larger in 9.7.0 vs 5.6.51 for random-points_range=10 but only 1.19X larger in 9.7.0 for random-points_range=1000.</li>
</ul>
</div>
<div><span>Relative to: 5.6.51</span></div>
<div>
<div><span>col-1 : 5.7.44</span></div>
<div><span>col-2 : 8.0.45</span></div>
<div><span>col-3 : 8.4.8</span></div>
<div><span>col-4 : 9.7.0</span></div>
<div><span><br /></span></div>
<div><span>col-1   col-2   col-3   col-4</span></div>
<div><span>0.87    <span>0.65</span>    0.65    0.64    hot-points</span></div>
<div><span>0.87    0.69    0.67    0.63    point-query</span></div>
<div><span>0.87    0.72    0.72    0.71    points-covered-pk</span></div>
<div><span>0.90    0.78    0.78    0.76    points-covered-si</span></div>
<div><span>0.89    0.73    0.72    0.71    points-notcovered-pk</span></div>
<div><span>0.89    0.77    0.76    0.75    points-notcovered-si</span></div>
<div><span>1.00    <span>0.84</span>    0.83    0.83    random-points_range=1000</span></div>
<div><span>0.89    <span>0.72</span>    0.72    0.72    random-points_range=100</span></div>
<div><span>0.87    <span>0.69</span>    0.68    0.66    random-points_range=10</span></div>
</div>
<div></div>
<div>Summary:</div>
<div>
<ul>
<li>The large regressions in 8.0.x for point queries (see above) occur prior to 8.0.28</li>
</ul>
</div>
<div><span>Relative to: 8.0.28</span></div>
<div>
<div><span>col-1 : 8.0.30</span></div>
<div><span>col-2 : 8.0.31</span></div>
<div><span>col-3 : 8.0.32</span></div>
<div><span>col-4 : 8.0.33</span></div>
<div><span>col-5 : 8.0.34</span></div>
<div><span>col-6 : 8.0.35</span></div>
<div><span>col-7 : 8.0.36</span></div>
<div><span>col-8 : 8.0.45</span></div>
<div><span><br /></span></div>
<div><span>col-1   col-2   col-3   col-4   col-5   col-6   col-7   col-8</span></div>
<div><span>0.92    1.14    1.14    1.12    1.17    1.16    1.16    1.16    hot-points</span></div>
<div><span>0.97    0.97    0.95    0.96    0.95    0.95    0.95    0.95    point-query</span></div>
<div><span>0.94    1.09    1.09    1.08    1.12    1.12    1.11    1.15    points-covered-pk</span></div>
<div><span>0.90    1.08    1.07    1.07    1.12    1.13    1.12    1.16    points-covered-si</span></div>
<div><span>0.91    1.04    1.04    1.03    1.07    1.07    1.06    1.11    points-notcovered-pk</span></div>
<div><span>0.88    0.96    0.96    0.95    1.00    1.01    1.00    1.06    points-notcovered-si</span></div>
<div><span>0.79    2.35    2.42    2.37    2.45    2.45    2.47    2.56    random-points_range=1000</span></div>
<div><span>0.94    1.07    1.06    1.06    1.09    1.08    1.10    1.12    random-points_range=100</span></div>
<div><span>0.93    0.94    0.93    0.93    0.94    0.94    0.93    0.95    random-points_range=10</span></div>
</div>
<div></div>
<div>
<div><b>Results: range queries without aggregation</b></div>
<div></div>
<div>
<div>Summary:</div>
<div>
<ul>
<li>there are large regressions from 5.6.51 to 5.7.44</li>
<li>there are larger regressions from 5.7.44 to 8.0.45</li>
<li>the regressions from 8.0.45 to 9.7.0 are small</li>
<li>the problem is new CPU overhead and for the scan test the CPU overhead per query is about 1.5X larger in modern MySQL (8.0 thru 9.7) relative to MySQL 5.6.51 (<a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/mar26.pn53.sb.my/o.met.latest#L519-L531">see cpu/o here</a>)</li>
</ul>
</div>
</div>
<div>
<div><span>Relative to: 5.6.51</span></div>
<div><span>col-1 : 5.7.44</span></div>
<div><span>col-2 : 8.0.45</span></div>
<div><span>col-3 : 8.4.8</span></div>
<div><span>col-4 : 9.7.0</span></div>
<div><span><br /></span></div>
<div><span>col-1   col-2   col-3   col-4</span></div>
<div><span>0.83    0.68    0.66    0.65    range-covered-pk</span></div>
<div><span>0.83    0.70    0.69    0.67    range-covered-si</span></div>
<div><span>0.84    0.66    0.65    0.64    range-notcovered-pk</span></div>
<div><span>0.88    0.74    0.73    0.73    range-notcovered-si</span></div>
<div><span><span>0.84</span>    <span>0.67</span>    0.66    0.67    scan</span></div>
</div>
<div></div>
<div>
<div>Summary:</div>
<div>
<ul>
<li>There is a large regression in 8.0.30 and a larger one in 8.0.32</li>
<li>The scan test is the worst case for the regression.</li>
</ul>
</div>
</div>
<div>
<div><span>Relative to: 8.0.28</span></div>
<div><span>col-1 : 8.0.30</span></div>
<div><span>col-2 : 8.0.31</span></div>
<div><span>col-3 : 8.0.32</span></div>
<div><span>col-4 : 8.0.33</span></div>
<div><span>col-5 : 8.0.34</span></div>
<div><span>col-6 : 8.0.35</span></div>
<div><span>col-7 : 8.0.36</span></div>
<div><span>col-8 : 8.0.45</span></div>
<div><span><br /></span></div>
<div><span>col-1   col-2   col-3   col-4   col-5   col-6   col-7   col-8</span></div>
<div><span>0.95    0.94    0.92    0.92    0.92    0.93    0.93    0.96    range-covered-pk</span></div>
<div><span>0.96    0.96    0.94    0.93    0.93    0.94    0.93    0.95    range-covered-si</span></div>
<div><span>0.94    0.94    0.93    0.93    0.94    0.94    0.93    0.93    range-notcovered-pk</span></div>
<div><span>0.89    0.87    0.87    0.86    0.89    0.91    0.89    0.95    range-notcovered-si</span></div>
<div><span><span>0.93</span>    0.92    <span>0.79</span>    0.82    0.83    0.77    0.82    0.80    scan</span></div>
</div>
<div></div>
<div>
<div><b>Results: range queries with aggregation</b></div>
<div></div>
<div>
<div>Summary:</div>
<div>
<ul>
<li>there are large regressions from 5.6.51 to 5.7.44</li>
<li>there are larger regressions from 5.7.44 to 8.0.45</li>
<li>the regressions from 8.0.45 to 9.7.0 are small</li>
</ul>
</div>
</div>
<div>
<div><span>Relative to: 5.6.51</span></div>
<div><span>col-1 : 5.7.44</span></div>
<div><span>col-2 : 8.0.45</span></div>
<div><span>col-3 : 8.4.8</span></div>
<div><span>col-4 : 9.7.0</span></div>
<div><span><br /></span></div>
<div><span>col-1   col-2   col-3   col-4</span></div>
<div><span>0.86    0.70    0.69    0.68    read-only-count</span></div>
<div><span>1.42    1.27    1.24    1.23    read-only-distinct</span></div>
<div><span>0.91    0.75    0.74    0.73    read-only-order</span></div>
<div><span>1.23    1.01    1.01    1.01    read-only_range=10000</span></div>
<div><span>0.93    0.77    0.76    0.74    read-only_range=100</span></div>
<div><span>0.86    0.69    0.68    0.66    read-only_range=10</span></div>
<div><span><span>0.83</span>    <span>0.68</span>    0.68    0.66    read-only-simple</span></div>
<div><span>0.83    0.67    0.67    0.66    read-only-sum</span></div>
</div>
<div></div>
<div>
<div>Summary:</div>
<div>
<ul>
<li>There are significant regressions in 8.0.30 and 8.0.32</li>
</ul>
</div>
</div>
<div>
<div><span>Relative to: 8.0.28</span></div>
<div><span>col-1 : 8.0.30</span></div>
<div><span>col-2 : 8.0.31</span></div>
<div><span>col-3 : 8.0.32</span></div>
<div><span>col-4 : 8.0.33</span></div>
<div><span>col-5 : 8.0.34</span></div>
<div><span>col-6 : 8.0.35</span></div>
<div><span>col-7 : 8.0.36</span></div>
<div><span>col-8 : 8.0.45</span></div>
<div><span><br /></span></div>
<div><span>col-1   col-2   col-3   col-4   col-5   col-6   col-7   col-8</span></div>
<div><span>0.95    0.94    0.87    0.87    0.88    0.87    0.89    0.91    read-only-count</span></div>
<div><span>0.97    0.96    0.94    0.95    0.96    0.95    0.95    0.96    read-only-distinct</span></div>
<div><span>0.97    0.96    0.93    0.95    0.95    0.94    0.95    0.95    read-only-order</span></div>
<div><span>0.96    0.95    0.93    0.94    0.95    0.95    0.96    0.98    read-only_range=10000</span></div>
<div><span>0.96    0.96    0.94    0.95    0.95    0.94    0.95    0.94    read-only_range=100</span></div>
<div><span>0.96    0.97    0.95    0.95    0.95    0.94    0.95    0.94    read-only_range=10</span></div>
<div><span>0.94    0.94    0.92    0.93    0.93    0.93    0.94    0.94    read-only-simple</span></div>
<div><span><span>0.94</span>    0.94    <span>0.89</span>    0.91    0.92    0.90    0.93    0.91    read-only-sum</span></div>
</div>
<div></div>
<div>
<div><b>Results: writes</b></div>
<div></div>
<div>
<div>Summary:</div>
<div>
<ul>
<li>there are large regressions from 5.6.51 to 5.7.44</li>
<li>there are larger regressions from 5.7.44 to 8.0.45</li>
<li>the regressions from 8.0.45 to 9.7.0 are small</li>
<li>the insert test is the worst case and a big part of that is new CPU overhead, <a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/mar26.pn53.sb.my/o.met.latest#L477-L489">see cpu/o here</a>, where it is 2.13X larger in 9.7.0 than 5.6.51. But for update-one the problem is writing more to storage per commit (<a href="https://github.com/mdcallag/mytools/blob/master/bench/arc/mar26.pn53.sb.my/o.met.latest#L477-L489">see wkbpi here</a>) rather than new CPU overhead.</li>
</ul>
</div>
</div>
<div>
<div><span>Relative to: 5.6.51</span></div>
<div><span>col-1 : 5.7.44</span></div>
<div><span>col-2 : 8.0.45</span></div>
<div><span>col-3 : 8.4.8</span></div>
<div><span>col-4 : 9.7.0</span></div>
<div><span><br /></span></div>
<div><span>col-1   col-2   col-3   col-4</span></div>
<div><span>0.85    0.60    0.59    0.55    delete</span></div>
<div><span><span>0.81</span>    <span>0.55</span>    0.54    0.52    insert</span></div>
<div><span>0.93    0.75    0.74    0.71    read-write_range=100</span></div>
<div><span>0.87    0.70    0.68    0.66    read-write_range=10</span></div>
<div><span>1.20    0.88    0.89    0.91    update-index</span></div>
<div><span>1.04    0.74    0.73    0.71    update-inlist</span></div>
<div><span>0.87    0.62    0.61    0.57    update-nonindex</span></div>
<div><span>0.87    0.62    0.60    0.57    update-one</span></div>
<div><span>0.87    0.63    0.61    0.58    update-zipf</span></div>
<div><span>0.93    0.69    0.68    0.66    write-only</span></div>
</div>
<div></div>
<div>
<div>Summary:</div>
<div>
<ul>
<li>There are significant regressions in 8.0.30 and 8.0.32</li>
</ul>
</div>
</div>
<div>
<div><span>Relative to: 8.0.28</span></div>
<div><span>col-1 : 8.0.30</span></div>
<div><span>col-2 : 8.0.31</span></div>
<div><span>col-3 : 8.0.32</span></div>
<div><span>col-4 : 8.0.33</span></div>
<div><span>col-5 : 8.0.34</span></div>
<div><span>col-6 : 8.0.35</span></div>
<div><span>col-7 : 8.0.36</span></div>
<div><span>col-8 : 8.0.45</span></div>
<div><span><br /></span></div>
<div><span>col-1   col-2   col-3   col-4   col-5   col-6   col-7   col-8</span></div>
<div><span>0.96    0.95    0.92    0.92    0.92    0.91    0.91    0.91    delete</span></div>
<div><span>0.94    0.93    0.91    0.91    0.91    0.90    0.90    0.90    insert</span></div>
<div><span>0.96    0.96    0.94    0.94    0.94    0.94    0.94    0.93    read-write_range=100</span></div>
<div><span>0.96    0.96    0.94    0.94    0.94    0.94    0.94    0.93    read-write_range=10</span></div>
<div><span>0.91    0.91    0.84    0.84    0.86    0.85    0.86    0.79    update-index</span></div>
<div><span>0.94    0.95    0.92    0.91    0.92    0.91    0.91    0.91    update-inlist</span></div>
<div><span><span>0.95</span>    0.96    <span>0.92</span>    0.92    0.92    0.91    0.91    0.90    update-nonindex</span></div>
<div><span>0.96    0.96    0.93    0.92    0.92    0.91    0.92    0.91    update-one</span></div>
<div><span>0.96    0.96    0.92    0.92    0.92    0.91    0.91    0.90    update-zipf</span></div>
<div><span>0.94    0.94    0.91    0.91    0.91    0.91    0.91    0.89    write-only</span></div>
</div>
<div></div>
</div>
</div>
</div>
<p></span></div>
</div>
<p><a href="https://smalldatum.blogspot.com/2026/03/sysbench-vs-mysql-on-small-server-no.html">Sysbench vs MySQL on a small server: no new regressions, many old ones</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB/MySQL Environment MyEnv 3.0.0 has been released</title>
        <link>https://www.fromdual.com/blog/myenv-release-notes/fromdual-environment-myenv-3.0.0-has-been-released/</link>
        <pubDate>Mon, 23 Mar 2026 16:42:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-mysql-environment-myenv-3-0-0-has-been-released-2/</guid>
        <source url="https://www.fromdual.com/aggregator/categories/9/">FromDual: FromDual all (en)</source>
        <description><![CDATA[<p>FromDual has the pleasure to announce the release of the new version 3.0.0 of its popular MariaDB, MySQL and PostgreSQL multi-instance environment MyEnv.<br />
The new MyEnv can be downloaded here. How to install MyEnv is described in the MyEnv Installation Guide.<br />
In the inconceivable case that you find a bug in the MyEnv please report it to us by sending an email.<br />
Any feedback, statements and testimonials are welcome as well! Please send them to us.<br />
Upgrade from 2.x to 3.0<br />
Please check the MyEnv Installation Guide.<br />
Changes in MyEnv 3.0.0<br />
MyEnv</p>
<p>Template warning improved.<br />
Distro version in --version added.<br />
Check MyEnv configuration permissions.<br />
#fd increased for MyEnv.<br />
myenv.conf should have more secure permissions now.<br />
Situation caught when my.cnf is missing in myenv.conf.<br />
Directories home and run moved to dba and myenv.<br />
Unit file mariadb.service and mysql.service replaced by dba.service.<br />
User mysql replaced by dba in template.<br />
start_stop fixed warning in case argv[1] is missing.<br />
sys_uid filter fixed for Rocky Linux.<br />
dba unit file added to package.<br />
Nagios plugins detection removed from showMyEnvVersion.<br />
Old SysV init files removed and replaced by Systemd unit files.<br />
dba user was introduced and check for system user added.<br />
User dba changed an cosmetic fixes.</p>
<p>MyEnv Installer</p>
<p>2 concurrent installMyEnv versions cannot run any more.<br />
Directroy binlog, cgroups and angel removed from postgresql type installation.<br />
Wrapper script installMyEnv.sh removed.<br />
Cosmetics fixed in installer.<br />
Installation made more mysql friendly.<br />
libaio1t64 considered during installation recommendations on DEB systems.<br />
Next free port suggestion during installMyEnv improved. It will suggest the first free port now.<br />
apt-get and yum replaced by apt and dnf.</p>
<p>MyEnv Utilities</p>
<p>insert_test.sh made PostgreSQL ready.</p>
<p>PostgreSQL</p>
<p>PostgreSQL instance is stopped with fast instead of immediate now.<br />
show_create_table.sh for PostgreSQL made nicer.<br />
PostgreSQL status.sql added.<br />
Minor fixes for PostgreSQL.</p>
<p>General</p>
<p>CHANGELOG updated.<br />
rc made unique.<br />
Minor bugs fixed.<br />
Copyright year updated from 2024 to 2026.<br />
mkdir changed from /bin to /usr/bin which is the new/right standard on all our 3 supported distributions.</p>
<p>Documentation</p>
<p>README updated.<br />
Installation documentation improved, library related stuff documented.<br />
PostgreSQL added to documentation.<br />
lsb_release removed from documentation.<br />
Documentation restructured.<br />
Documentation made more resilient agaist errors.<br />
Documentation process improved.<br />
Documentation moved completely to asciidoc.</p>
<p>Packaging</p>
<p>Package list completed.<br />
Makefile fixed.<br />
Old distro stuff and initV stuff removed.<br />
Build scripts fixed.</p>
<p>For subscriptions of commercial use of MyEnv please get in contact with us.</p>
<p><a href="https://www.fromdual.com/blog/myenv-release-notes/fromdual-environment-myenv-3.0.0-has-been-released/">MariaDB/MySQL Environment MyEnv 3.0.0 has been released</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>FromDual has the pleasure to announce the release of the new version 3.0.0 of its popular MariaDB, MySQL and PostgreSQL multi-instance environment <a href="https://www.fromdual.com/software/fromdual-myenv/" title="MariaDB, MySQL and PostgreSQL multi-instance environment">MyEnv</a>.</p>
<p>The new MyEnv can be downloaded <a href="https://support.fromdual.com/admin/public/download.php" target="_blank" title="FromDual download">here</a>. How to install MyEnv is described in the <a href="https://support.fromdual.com/documentation/myenv/myenv.html#installation-guide" target="_blank">MyEnv Installation Guide</a>.</p>
<p>In the inconceivable case that you find a bug in the MyEnv please report it to us by sending an <a href="mailto:contact@fromdual.com?Subject=Bug%20report%20for%20myenv">email</a>.</p>
<p>Any feedback, statements and testimonials are welcome as well! Please <a href="mailto:feedback@fromdual.com?Subject=Feedback%20for%20fpmmm">send them to us</a>.</p>
<h2>Upgrade from 2.x to 3.0</h2>
<p>Please check the <a href="https://support.fromdual.com/documentation/myenv/myenv.html#upgrade" target="_blank" title="Upgrading MyEnv">MyEnv Installation Guide</a>.</p>
<h2>Changes in MyEnv 3.0.0</h2>
<h3>MyEnv</h3>
<ul>
<li>Template warning improved.</li>
<li>Distro version in <code>--version</code> added.</li>
<li>Check MyEnv configuration permissions.</li>
<li>#fd increased for MyEnv.</li>
<li><code>myenv.conf</code> should have more secure permissions now.</li>
<li>Situation caught when <code>my.cnf</code> is missing in <code>myenv.conf</code>.</li>
<li>Directories <code>home</code> and <code>run</code> moved to <code>dba</code> and <code>myenv</code>.</li>
<li>Unit file <code>mariadb.service</code> and <code>mysql.service</code> replaced by <code>dba.service</code>.</li>
<li>User <code>mysql</code> replaced by <code>dba</code> in template.</li>
<li><code>start_stop</code> fixed warning in case <code>argv[1]</code> is missing.</li>
<li><code>sys_uid</code> filter fixed for Rocky Linux.</li>
<li><code>dba</code> unit file added to package.</li>
<li>Nagios plugins detection removed from <code>showMyEnvVersion</code>.</li>
<li>Old SysV init files removed and replaced by Systemd unit files.</li>
<li><code>dba</code> user was introduced and check for system user added.</li>
<li>User <code>dba</code> changed an cosmetic fixes.</li>
</ul>
<h3>MyEnv Installer</h3>
<ul>
<li>2 concurrent <code>installMyEnv</code> versions cannot run any more.</li>
<li>Directroy <code>binlog</code>, <code>cgroups</code> and <code>angel</code> removed from <code>postgresql</code> <code>type</code> installation.</li>
<li>Wrapper script <code>installMyEnv.sh</code> removed.</li>
<li>Cosmetics fixed in installer.</li>
<li>Installation made more mysql friendly.</li>
<li><code>libaio1t64</code> considered during installation recommendations on DEB systems.</li>
<li>Next free port suggestion during <code>installMyEnv</code> improved. It will suggest the first free port now.</li>
<li><code>apt-get</code> and <code>yum</code> replaced by <code>apt</code> and <code>dnf</code>.</li>
</ul>
<h3>MyEnv Utilities</h3>
<ul>
<li><code>insert_test.sh</code> made PostgreSQL ready.</li>
</ul>
<h3>PostgreSQL</h3>
<ul>
<li>PostgreSQL instance is stopped with fast instead of immediate now.</li>
<li><code>show_create_table.sh</code> for PostgreSQL made nicer.</li>
<li>PostgreSQL <code>status.sql</code> added.</li>
<li>Minor fixes for PostgreSQL.</li>
</ul>
<h3>General</h3>
<ul>
<li><code>CHANGELOG</code> updated.</li>
<li><code>rc</code> made unique.</li>
<li>Minor bugs fixed.</li>
<li>Copyright year updated from 2024 to 2026.</li>
<li><code>mkdir</code> changed from <code>/bin</code> to <code>/usr/bin</code> which is the new/right standard on all our 3 supported distributions.</li>
</ul>
<h3>Documentation</h3>
<ul>
<li>README updated.</li>
<li>Installation documentation improved, library related stuff documented.</li>
<li>PostgreSQL added to documentation.</li>
<li><code>lsb_release</code> removed from documentation.</li>
<li>Documentation restructured.</li>
<li>Documentation made more resilient agaist errors.</li>
<li>Documentation process improved.</li>
<li>Documentation moved completely to asciidoc.</li>
</ul>
<h3>Packaging</h3>
<ul>
<li>Package list completed.</li>
<li>Makefile fixed.</li>
<li>Old distro stuff and initV stuff removed.</li>
<li>Build scripts fixed.</li>
</ul>
<p>For subscriptions of commercial use of MyEnv please <a href="mailto:contact@fromdual.com?Subject=Commercial%20use%20of%20MyEnv">get in contact</a> with us.</p>
<p><a href="https://www.fromdual.com/blog/myenv-release-notes/fromdual-environment-myenv-3.0.0-has-been-released/">MariaDB/MySQL Environment MyEnv 3.0.0 has been released</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>MariaDB/MySQL Environment MyEnv 3.0.0 has been released</title>
        <link>https://www.fromdual.com/blog/myenv-release-notes/fromdual-environment-myenv-3.0.0-has-been-released/</link>
        <pubDate>Mon, 23 Mar 2026 16:42:00 +0000</pubDate>
        <dc:creator>Source Author</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/mariadb-mysql-environment-myenv-3-0-0-has-been-released/</guid>
        <source url="https://www.fromdual.com/aggregator/categories/9/">FromDual: FromDual all (en)</source>
        <description><![CDATA[<p>FromDual has the pleasure to announce the release of the new version 3.0.0 of its popular MariaDB, MySQL and PostgreSQL multi-instance environment MyEnv.<br />
The new MyEnv can be downloaded here. How to install MyEnv is described in the MyEnv Installation Guide.<br />
In the inconceivable case that you find a bug in the MyEnv please report it to us by sending an email.<br />
Any feedback, statements and testimonials are welcome as well! Please send them to us.<br />
Upgrade from 2.x to 3.0<br />
Please check the MyEnv Installation Guide.<br />
Changes in MyEnv 3.0.0<br />
MyEnv</p>
<p>Template warning improved.<br />
Distro version in --version added.<br />
Check MyEnv configuration permissions.<br />
#fd increased for MyEnv.<br />
myenv.conf should have more secure permissions now.<br />
Situation caught when my.cnf is missing in myenv.conf.<br />
Directories home and run moved to dba and myenv.<br />
Unit file mariadb.service and mysql.service replaced by dba.service.<br />
User mysql replaced by dba in template.<br />
start_stop fixed warning in case argv[1] is missing.<br />
sys_uid filter fixed for Rocky Linux.<br />
dba unit file added to package.<br />
Nagios plugins detection removed from showMyEnvVersion.<br />
Old SysV init files removed and replaced by Systemd unit files.<br />
dba user was introduced and check for system user added.<br />
User dba changed an cosmetic fixes.</p>
<p>MyEnv Installer</p>
<p>2 concurrent installMyEnv versions cannot run any more.<br />
Directroy binlog, cgroups and angel removed from postgresql type installation.<br />
Wrapper script installMyEnv.sh removed.<br />
Cosmetics fixed in installer.<br />
Installation made more mysql friendly.<br />
libaio1t64 considered during installation recommendations on DEB systems.<br />
Next free port suggestion during installMyEnv improved. It will suggest the first free port now.<br />
apt-get and yum replaced by apt and dnf.</p>
<p>MyEnv Utilities</p>
<p>insert_test.sh made PostgreSQL ready.</p>
<p>PostgreSQL</p>
<p>PostgreSQL instance is stopped with fast instead of immediate now.<br />
show_create_table.sh for PostgreSQL made nicer.<br />
PostgreSQL status.sql added.<br />
Minor fixes for PostgreSQL.</p>
<p>General</p>
<p>CHANGELOG updated.<br />
rc made unique.<br />
Minor bugs fixed.<br />
Copyright year updated from 2024 to 2026.<br />
mkdir changed from /bin to /usr/bin which is the new/right standard on all our 3 supported distributions.</p>
<p>Documentation</p>
<p>README updated.<br />
Installation documentation improved, library related stuff documented.<br />
PostgreSQL added to documentation.<br />
lsb_release removed from documentation.<br />
Documentation restructured.<br />
Documentation made more resilient agaist errors.<br />
Documentation process improved.<br />
Documentation moved completely to asciidoc.</p>
<p>Packaging</p>
<p>Package list completed.<br />
Makefile fixed.<br />
Old distro stuff and initV stuff removed.<br />
Build scripts fixed.</p>
<p>For subscriptions of commercial use of MyEnv please get in contact with us.</p>
<p><a href="https://www.fromdual.com/blog/myenv-release-notes/fromdual-environment-myenv-3.0.0-has-been-released/">MariaDB/MySQL Environment MyEnv 3.0.0 has been released</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>FromDual has the pleasure to announce the release of the new version 3.0.0 of its popular MariaDB, MySQL and PostgreSQL multi-instance environment <a href="https://www.fromdual.com/software/fromdual-myenv/" title="MariaDB, MySQL and PostgreSQL multi-instance environment">MyEnv</a>.</p>
<p>The new MyEnv can be downloaded <a href="https://support.fromdual.com/admin/public/download.php" target="_blank" title="FromDual download">here</a>. How to install MyEnv is described in the <a href="https://support.fromdual.com/documentation/myenv/myenv.html#installation-guide" target="_blank">MyEnv Installation Guide</a>.</p>
<p>In the inconceivable case that you find a bug in the MyEnv please report it to us by sending an <a href="mailto:contact@fromdual.com?Subject=Bug%20report%20for%20myenv">email</a>.</p>
<p>Any feedback, statements and testimonials are welcome as well! Please <a href="mailto:feedback@fromdual.com?Subject=Feedback%20for%20fpmmm">send them to us</a>.</p>
<h2>Upgrade from 2.x to 3.0</h2>
<p>Please check the <a href="https://support.fromdual.com/documentation/myenv/myenv.html#upgrade" target="_blank" title="Upgrading MyEnv">MyEnv Installation Guide</a>.</p>
<h2>Changes in MyEnv 3.0.0</h2>
<h3>MyEnv</h3>
<ul>
<li>Template warning improved.</li>
<li>Distro version in <code>--version</code> added.</li>
<li>Check MyEnv configuration permissions.</li>
<li>#fd increased for MyEnv.</li>
<li><code>myenv.conf</code> should have more secure permissions now.</li>
<li>Situation caught when <code>my.cnf</code> is missing in <code>myenv.conf</code>.</li>
<li>Directories <code>home</code> and <code>run</code> moved to <code>dba</code> and <code>myenv</code>.</li>
<li>Unit file <code>mariadb.service</code> and <code>mysql.service</code> replaced by <code>dba.service</code>.</li>
<li>User <code>mysql</code> replaced by <code>dba</code> in template.</li>
<li><code>start_stop</code> fixed warning in case <code>argv[1]</code> is missing.</li>
<li><code>sys_uid</code> filter fixed for Rocky Linux.</li>
<li><code>dba</code> unit file added to package.</li>
<li>Nagios plugins detection removed from <code>showMyEnvVersion</code>.</li>
<li>Old SysV init files removed and replaced by Systemd unit files.</li>
<li><code>dba</code> user was introduced and check for system user added.</li>
<li>User <code>dba</code> changed an cosmetic fixes.</li>
</ul>
<h3>MyEnv Installer</h3>
<ul>
<li>2 concurrent <code>installMyEnv</code> versions cannot run any more.</li>
<li>Directroy <code>binlog</code>, <code>cgroups</code> and <code>angel</code> removed from <code>postgresql</code> <code>type</code> installation.</li>
<li>Wrapper script <code>installMyEnv.sh</code> removed.</li>
<li>Cosmetics fixed in installer.</li>
<li>Installation made more mysql friendly.</li>
<li><code>libaio1t64</code> considered during installation recommendations on DEB systems.</li>
<li>Next free port suggestion during <code>installMyEnv</code> improved. It will suggest the first free port now.</li>
<li><code>apt-get</code> and <code>yum</code> replaced by <code>apt</code> and <code>dnf</code>.</li>
</ul>
<h3>MyEnv Utilities</h3>
<ul>
<li><code>insert_test.sh</code> made PostgreSQL ready.</li>
</ul>
<h3>PostgreSQL</h3>
<ul>
<li>PostgreSQL instance is stopped with fast instead of immediate now.</li>
<li><code>show_create_table.sh</code> for PostgreSQL made nicer.</li>
<li>PostgreSQL <code>status.sql</code> added.</li>
<li>Minor fixes for PostgreSQL.</li>
</ul>
<h3>General</h3>
<ul>
<li><code>CHANGELOG</code> updated.</li>
<li><code>rc</code> made unique.</li>
<li>Minor bugs fixed.</li>
<li>Copyright year updated from 2024 to 2026.</li>
<li><code>mkdir</code> changed from <code>/bin</code> to <code>/usr/bin</code> which is the new/right standard on all our 3 supported distributions.</li>
</ul>
<h3>Documentation</h3>
<ul>
<li>README updated.</li>
<li>Installation documentation improved, library related stuff documented.</li>
<li>PostgreSQL added to documentation.</li>
<li><code>lsb_release</code> removed from documentation.</li>
<li>Documentation restructured.</li>
<li>Documentation made more resilient agaist errors.</li>
<li>Documentation process improved.</li>
<li>Documentation moved completely to asciidoc.</li>
</ul>
<h3>Packaging</h3>
<ul>
<li>Package list completed.</li>
<li>Makefile fixed.</li>
<li>Old distro stuff and initV stuff removed.</li>
<li>Build scripts fixed.</li>
</ul>
<p>For subscriptions of commercial use of MyEnv please <a href="mailto:contact@fromdual.com?Subject=Commercial%20use%20of%20MyEnv">get in contact</a> with us.</p>
<p><a href="https://www.fromdual.com/blog/myenv-release-notes/fromdual-environment-myenv-3.0.0-has-been-released/">MariaDB/MySQL Environment MyEnv 3.0.0 has been released</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></content:encoded>
                    </item>
        <item>
        <title>PostgreSQL 18 Upgrades for AI-Era Workloads and Operations</title>
        <link>https://severalnines.com/blog/postgresql-18-upgrades-for-ai-era-workloads-and-operations/</link>
        <pubDate>Fri, 20 Mar 2026 08:00:00 +0000</pubDate>
        <dc:creator>Sebastian Insausti</dc:creator>
        <guid isPermaLink="false">https://mariadb.org/wprss_feed_item/postgresql-18-upgrades-for-ai-era-workloads-and-operations-2/</guid>
        <source url="https://severalnines.com/">Severalnines</source>
        <description><![CDATA[<p>Today, we’re asking PostgreSQL to do more and more, like handling both transactions and analytics, powering huge SaaS platforms, managing event data, and even dipping into AI-related tasks like vector search. This intense pressure highlights some pain points: slow, unpredictable reads, rigid indexing, complex setups, and risky major upgrades.  PostgreSQL 18 directly addresses these real-world […]<br />
The post PostgreSQL 18 Upgrades for AI-Era Workloads and Operations appeared first on Severalnines.</p>
<p><a href="https://severalnines.com/blog/postgresql-18-upgrades-for-ai-era-workloads-and-operations/">PostgreSQL 18 Upgrades for AI-Era Workloads and Operations</a> appeared first on <a href="https://mariadb.org">MariaDB.org</a></p>
]]></description>
        <content:encoded><![CDATA[<p>Today, we’re asking PostgreSQL to do more and more, like handling both transactions and analytics, powering huge SaaS platforms, managing event data, and even dipping into AI-related tasks like vector search. This intense pressure highlights some pain points: slow, unpredictable reads, rigid indexing, complex setups, and risky major upgrades. </p>
<p>PostgreSQL 18 directly addresses these real-world operational challenges, skipping flashy features for practical improvements like asynchronous I/O to speed up reads, safer upgrades from keeping optimizer stats, better multi-column indexes, UUIDv7 support, and useful enhancements to logical replication.</p>
<p>I’ll dive into these key operational changes, show how they fit your modern workflows, and explain how tools like ClusterControl can make adopting them smooth and painless.</p>
<h2 class="wp-block-heading"><strong>PostgreSQL 18’s key features that improve core workload performance</strong></h2>
<p>PostgreSQL 18 isn’t about one big, new thing. Instead, it offers fixes for common headaches: slow storage, reads competing with new transactions, inconsistent performance post-upgrade, indexes that don’t quite hit the mark, messy authentication, and confusing replication errors — these fixes smooth out the rough operational edges. Let’s look at two key features that will have the greatest effect on production work.</p>
<h3 class="wp-block-heading"><strong>Async I/O subsystem (AIO)</strong></h3>
<p>Slow storage often causes problems, not the computer itself. Older PostgreSQL waited for each storage request, which is safe but can slow things down, especially when your data is too big for the cache or when running big scans alongside regular transactions.</p>
<p>PostgreSQL 18 fixes this with Asynchronous I/O (AIO). Now, the system can ask for multiple data blocks and keep working instead of waiting for each one. This can significantly improve read-heavy scans and some maintenance operations under the right I/O conditions. New settings like <code>io_method</code> help you tune this — <strong>don’t just test AIO with a single query.</strong></p>
<p>Its real power shows up under heavy, simultaneous load. To see the benefit, test your actual, read-heavy workload, focusing on P95/P99 latency improvements. Pay special attention to maintenance, since PG 18 specifically aims to reduce I/O slowdown during VACUUM.</p>
<p><strong>TIP:</strong> A good test is to compare latency under pressure with and without AIO while background maintenance is running.</p>
<h3 class="wp-block-heading"><strong>Skip-scan on B-tree indexes</strong></h3>
<p>In large systems, especially SaaS, we often use multi-column indexes. The problem is that queries don’t always filter by the index’s first column. For example, an index on (tenant_id, created_at) won’t help a query just filtering by created_at. This usually means creating extra, redundant indexes — <strong>PostgreSQL 18 adds skip-scan for multi-column B-tree indexes.</strong></p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="979" src="https://severalnines.com/wp-content/uploads/2026/03/diagram-pg18-skip_vs_classic_scans-1024x979.png" alt="" class="wp-image-42910"></figure>
<p>When the planner estimates it’s cheaper than scanning the table, it can iterate over the leading column’s distinct values and reuse the same index to satisfy predicates on the later columns, even if the leading column isn’t constrained. This is a big win because it means fewer extra indexes, making things cleaner, helping performance by reducing write overhead, and keeping VACUUM happy as your data inevitably scales.</p>
<h2 class="wp-block-heading"><strong>How Postgres 18 features practically support modern workload patterns</strong></h2>
<p>PostgreSQL 18’s new stuff isn’t just random. It’s built around how people are actually using Postgres right now. Most setups mix transactions, reporting, search, and more AI stuff, with evolving replication.</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="660" src="https://severalnines.com/wp-content/uploads/2026/03/diagram-pg18-modern_workload_patterns-1024x660.png" alt="" class="wp-image-42913"></figure>
<p>Looking at what users are doing makes the improvements way easier to understand how they benefit day-to-day operations than just seeing a list of new features.</p>
<h3 class="wp-block-heading"><strong>AI &amp; vector search</strong></h3>
<p>When people use AI with PostgreSQL, they usually don’t replace the database with a specialized vector engine. Instead, they keep PostgreSQL as the main system for transactional data and put AI-related data, like embeddings, right alongside it.</p>
<p>When running vector search and transactional workloads together, it’s best to keep those data embeddings right next to the data they describe. This means you need reliable performance: steady write speeds, predictable read times even when searches spike, and enough replicas to scale reads without bogging down the main database.</p>
<p>Query complexity grows, mixing things like finding similar items with standard filters on who, when, permissions, or categories. This often leads to heavy database scans, unpredictable read bursts, and competition between search / reporting tasks and regular writes — PostgreSQL 18’s features help smooth all of this out.</p>
<p>Asynchronous I/O helps with storage slowdowns during heavy reads, and skip-scan makes filtering around your similarity searches much faster by improving multicolumn indexes. You still need a smart strategy for your AI indexes, e.g. when to use HNSW, how to organize data, etc., but PG helps the whole system handle the pressure better. Adding ClusterControl to the mix creates a winning combination, as managing replicas, backups, and monitoring performance as you grow becomes much easier.</p>
<h3 class="wp-block-heading"><strong>Serverless ingestion + BI</strong></h3>
<p>Many teams want applications to feel serverless and handle real-time data analysis, even when self-managing PostgreSQL or in a hybrid setup. Raw speed isn’t the priority; it’s how the system handles sudden spikes and recovers quickly, posing two hurdles:</p>
<p><strong>First,</strong> when lots of people use it at once, things can get slow. <strong>Second,</strong> we have less and less time for maintenance and upgrades, and we need stability right away after an update.</p>
<p>PostgreSQL 18 fixes both. Better I/O helps with slow reads during busy times, and keeping performance stats after an upgrade means less post-update drama. Basically, PostgreSQL is becoming stronger for unpredictable loads, and when you can’t afford any downtime. ClusterControl makes upgrades and backups consistent across all your setups; that’s what makes the difference between a normal maintenance window and a full-blown incident.</p>
<h3 class="wp-block-heading"><strong>Isolated replication for multi-tenant workloads</strong></h3>
<p>Multi-tenant systems often use replication to handle more reads, separate workloads, or serve different regions. This usually means having read replicas for regions, consumers for analytics or search, and moving tenants around as the system grows.</p>
<p>PostgreSQL 18 improves replication by better supporting generated columns and making conflicts much easier to see. This makes tenant-specific replication safer to run and easier to fix when problems occur. ClusterControl helps by setting up and monitoring these setups consistently, preventing hard-to-maintain, one-off replication configurations.</p>
<p>The result is fewer unexpected issues during replication, clearer insight when conflicts happen, and more confidence when changing how your replication is set up.</p>
<h2 class="wp-block-heading"><strong>Postgres 18 features that reduce upgrade &amp; migration workflow risks</strong></h2>
<p>Upgrading PostgreSQL is mostly about managing risk, not the specific steps. What teams truly care about is getting the system back to normal, predictable performance fast.</p>
<p>Tight maintenance windows, huge databases, and low tolerance for issues mean the period after the upgrade can be brutal. Slow query plans, unexpected slowdowns, or emergency tuning can quickly turn a successful upgrade into an on-call nightmare. Here are the design changes and features PostgreSQL 18 implements to tackle these specific problems.</p>
<h3 class="wp-block-heading"><strong>Faster upgrades with retained statistics</strong></h3>
<p>Historically, PostgreSQL upgrades caused frustrating performance degradation because the query planner had to relearn all data statistics. PG 18’s pg_upgrade utility now transfers most optimizer statistics. This feature dramatically stabilizes performance much faster post-upgrade by immediately providing current data knowledge to the planner, eliminating the stressful, lengthy process of relearning statistics, especially for large databases.</p>
<h3 class="wp-block-heading"><strong>Checksums enabled by default in initdb</strong></h3>
<p>PostgreSQL 18 changes a big default: new clusters now turn on data checksums automatically when you run <code>initdb</code>. Checksums are great for catching sneaky data corruption, though they use a tiny bit more CPU. Most teams already use them for better durability or compliance — you can still opt out with <code>--no-data-checksums</code>.</p>
<p><strong>However,</strong> <strong>checksum settings must match exactly when you upgrade</strong>. If your old cluster didn’t have checksums, you can’t magically turn them on during the upgrade.</p>
<p>Think of the checksum setting as a contract for your cluster. Document it, keep it consistent everywhere, and test it during your upgrade dry runs. Don’t leave it as a last-minute decision, or you’ll find problems during the final cutover instead of in testing.</p>
<h2 class="wp-block-heading"><strong>PG 18 enhancements that improve developer &amp; SQL quality of life</strong></h2>
<p>Even though some PostgreSQL features seem like they are just for developers, they often impact how things run behind the scenes. Schema and SQL choices can unexpectedly influence storage, how much data is written, replication size, and index performance over time. Postgres 18 brings changes in this area that operators should really pay attention to.</p>
<h3 class="wp-block-heading"><strong>Virtual generated columns (default)</strong></h3>
<p>PostgreSQL 18’s generated columns are usually virtual, meaning the value is calculated when you read the row, not saved on disk, unless you choose to store it.</p>
<p>Operationally, this is key. Virtual columns cut down on writes and storage, which is great for busy tables. But if you read the derived value a lot or need to index it predictably, stored columns might be better, as the calculation is done once on write, not on read; for example,</p>
<pre class="wp-block-code"><code>CREATE TABLE orders (
  id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
  amount numeric(12,2) NOT NULL,
  amount_cents bigint GENERATED ALWAYS AS ((amount * 100)::bigint)
);</code></pre>
<p>In PostgreSQL 18, amount_cents is virtual by default. If you want the value precomputed and stored, because it’s heavily queried or indexed, you can still do so explicitly:</p>
<pre class="wp-block-code"><code>amount_cents bigint GENERATED ALWAYS AS ((amount * 100)::bigint) STORED</code></pre>
<p><strong>N.B. This decision is crucial for replication.</strong> PG 18’s logical replication is better at publishing stored generated values.</p>
<h3 class="wp-block-heading"><strong>UUIDv7 for time-ordered IDs</strong></h3>
<p>UUIDs are great because they’re unique everywhere and easy to make across different systems. The problem has been how they mess up B-tree indexes. Random UUIDs scatter new entries, causing slow index bloat and cache issues, especially on busy tables.</p>
<p>Recent PostgreSQL releases fixed this natively with uuidv7(), making it the operational standard for PostgreSQL 18 architectures. It generates UUIDs that are mostly time-ordered. This keeps your indexes much tidier whil