Skip to content

doc: documentation for dropping to READ COMMITTED isolation consensus#37662

Open
petrosagg wants to merge 1 commit into
mainfrom
read-committed-consensus-docs
Open

doc: documentation for dropping to READ COMMITTED isolation consensus#37662
petrosagg wants to merge 1 commit into
mainfrom
read-committed-consensus-docs

Conversation

@petrosagg

Copy link
Copy Markdown
Contributor

No description provided.

@petrosagg petrosagg requested a review from a team as a code owner July 15, 2026 13:07
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
@petrosagg petrosagg force-pushed the read-committed-consensus-docs branch from c267980 to 271a0fd Compare July 15, 2026 13:08
Comment on lines +1 to +6
v26.33.0 lets self-managed deployments run Materialize's internal consensus
queries under `READ COMMITTED` transaction isolation instead of `SERIALIZABLE`
when using a PostgreSQL metadata database. The consensus queries are designed to
be linearizable under `READ COMMITTED`, and running under it avoids the
serialization-failure retries that `SERIALIZABLE` incurs under contention, which
improves metadata write throughput.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe?

Suggested change
v26.33.0 lets self-managed deployments run Materialize's internal consensus
queries under `READ COMMITTED` transaction isolation instead of `SERIALIZABLE`
when using a PostgreSQL metadata database. The consensus queries are designed to
be linearizable under `READ COMMITTED`, and running under it avoids the
serialization-failure retries that `SERIALIZABLE` incurs under contention, which
improves metadata write throughput.
Starting in v26.33, Self-Managed deployments that use a **PostgreSQL metadata
database** can configure Materialize to run its internal consensus queries under
`READ COMMITTED` transaction isolation instead of `SERIALIZABLE`. The consensus
queries are linearizable under `READ COMMITTED`. `READ COMMITTED` also improves
metadata write throughput by avoiding the serialization-failure retries
that `SERIALIZABLE` incurs under contention.

connected to CockroachDB.

**Recommendation**: After your entire environment has finished upgrading to v26.33
or later, enable the parameter on PostgreSQL-backed deployments with [`ALTER SYSTEM

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we list the configmap option first?

databases: Materialize refuses to run consensus queries if it is enabled while
connected to CockroachDB.

**Recommendation**: After your entire environment has finished upgrading to v26.33

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, by this recommendation ... double-checking that we're recommending people set this flag. (I wasn't sure whether it was more that you set it after you're on v26.33)

Comment on lines +9 to +11
which is **off by default**. The parameter must stay off on CockroachDB metadata
databases: Materialize refuses to run consensus queries if it is enabled while
connected to CockroachDB.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would make this part about cockroach a warning ... (also could people use other dbs as consensus db?). Am wondering if we should just make it generic?

something like:

{{< warning >}}

- Do not use with non-PostgreSQL metadata databases; Materialize will refuse to
  run consensus queries when the parameter is enabled for other metadata databases.

- You must be on v26.33+ before enabling the parameter.

{{< /warning >}}

or

{{< warning >}}

- Only enable if using PostgreSQL metadata databases. Materialize will refuse to
  run consensus queries when the parameter is enabled for other metadata databases.

- You must be on v26.33+ before enabling the parameter.

{{< /warning >}}

serialization-failure retries that `SERIALIZABLE` incurs under contention, which
improves metadata write throughput.

This is controlled by the `persist_pg_consensus_read_committed` system parameter,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just make it 2 sentences:

To use `READ COMMITTED` with a PostgreSQL metadata database, enable the
`persist_pg_consensus_read_committed` parameter. The parameter is **disabled by
default**.

Comment on lines +31 to +35
The parameter applies only to PostgreSQL metadata databases and must stay off on
CockroachDB, so Materialize Cloud and other CockroachDB-backed deployments are
unaffected. Enable it only after your entire environment has finished upgrading to
v26.33 or later. For details, see the [Self-Managed upgrade
notes](/self-managed-deployments/upgrading/version-notes/).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The parameter applies only to PostgreSQL metadata databases and must stay off on
CockroachDB, so Materialize Cloud and other CockroachDB-backed deployments are
unaffected. Enable it only after your entire environment has finished upgrading to
v26.33 or later. For details, see the [Self-Managed upgrade
notes](/self-managed-deployments/upgrading/version-notes/).
{{< note >}}
The parameter applies only to PostgreSQL metadata databases. Only enable it
after you have upgraded your self-managed deployment to v26.33 or later.
{{< /note >}}
For details, see the [Self-Managed upgrade
notes](/self-managed-deployments/upgrading/version-notes/).

Comment on lines +23 to +29
Self-managed deployments that use a PostgreSQL metadata database can now run
Materialize's internal consensus queries under `READ COMMITTED` transaction
isolation instead of `SERIALIZABLE`. The consensus queries are designed to be
linearizable under `READ COMMITTED`, and running under it avoids the
serialization-failure retries that `SERIALIZABLE` incurs under contention,
improving metadata write throughput. This is controlled by the new
`persist_pg_consensus_read_committed` system parameter, which is off by default.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Self-managed deployments that use a PostgreSQL metadata database can now run
Materialize's internal consensus queries under `READ COMMITTED` transaction
isolation instead of `SERIALIZABLE`. The consensus queries are designed to be
linearizable under `READ COMMITTED`, and running under it avoids the
serialization-failure retries that `SERIALIZABLE` incurs under contention,
improving metadata write throughput. This is controlled by the new
`persist_pg_consensus_read_committed` system parameter, which is off by default.
*Materialize Self-Managed only*
Starting in v26.33, self-managed deployments that use a PostgreSQL metadata
database can configure Materialize to run its internal consensus queries under
`READ COMMITTED` transaction isolation instead of `SERIALIZABLE`. The consensus
queries are linearizable under `READ COMMITTED`, while avoiding the
serialization-failure retries that `SERIALIZABLE` incurs under contention,
improving metadata write throughput. To use `READ COMMITTED`, Materialize
introduces the `persist_pg_consensus_read_committed` system parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants