Skip to content

PostgreSQL

The engine, worked by someone who sends it patches.

Almost everything we build runs on PostgreSQL, and using it well stopped being enough a while ago: we review and fix its core on pgsql-hackers, report what breaks and publish extensions. That changes what we can do for your database: when something fails inside the engine, we know how to read it.

9
contributions to the PostgreSQL core
2 as author, 1 as co-author, 4 as reviewer, 2 as reporter · 16 commits across PostgreSQL 18, 19 and the 20 development branch
10+
bugs reported
to pgsql-bugs, with reproductions; several confirmed by committers
5
extensions on PGXN
pure SQL: they run on RDS, Aurora and Supabase

Verified against the PostgreSQL repository on 6 October 2026.

What the work looks like

A slow query, its plan and the fix.

The most common case that arrives: a query that got slow when the table grew. This is what gets done, with real PostgreSQL output.

psql · pedidos table · 2,000,000 rows measured

app=> EXPLAIN (ANALYZE, BUFFERS, COSTS OFF) SELECT id, total FROM pedidos WHERE cliente_id = 4217 AND estado = 'pendiente';

Seq Scan on pedidos (actual time=0.289..47.126 rows=10.00 loops=1)

Filter: ((cliente_id = 4217) AND (estado = 'pendiente'::text))

Rows Removed by Filter: 1999990

Buffers: shared hit=12573 read=4094

Execution Time: 47.155 ms

-- It walks 2,000,000 rows to return 10.

app=> CREATE INDEX CONCURRENTLY pedidos_cliente_estado_idx ON pedidos (cliente_id, estado);

CREATE INDEX

app=> EXPLAIN (ANALYZE, BUFFERS, COSTS OFF) SELECT id, total FROM pedidos WHERE cliente_id = 4217 AND estado = 'pendiente';

Bitmap Heap Scan on pedidos (actual time=0.025..0.057 rows=10.00 loops=1)

Recheck Cond: ((cliente_id = 4217) AND (estado = 'pendiente'::text))

Heap Blocks: exact=10

Buffers: shared hit=13

-> Bitmap Index Scan on pedidos_cliente_estado_idx (actual time=0.016..0.017 rows=10.00 loops=1)

Index Cond: ((cliente_id = 4217) AND (estado = 'pendiente'::text))

Index Searches: 1

Buffers: shared hit=3

Execution Time: 0.083 ms

-- With the index it reads 13 pages instead of 16,667.

PostgreSQL 18.6

568×

times faster

Before 47.2 ms
After 0.083 ms
Rows scanned
2,000,00010
Pages read
16,66713

The output is real: PostgreSQL 18.6, measured on October 3, 2026 against a 2,000,000-row table built for this demonstration. On your database the numbers will differ; the method is the same.

What we do with your database

  1. 01

    Performance and plans

    Slow queries, indexes that are missing or redundant, and plans that drift over time without anyone noticing. We measure with a median and a confidence interval, not a single number.

  2. 02

    Tenant isolation

    Row Level Security design that the database actually enforces, and an audit of the side channels the policies do not cover.

  3. 03

    Migrations

    From SQL Server to PostgreSQL and across major versions, with the schema reviewed and the tests run before cutover. Done in production, not in slides.

  4. 04

    Extensions and tooling

    Custom pure-SQL extensions for managed services, and the five published on PGXN to watch what fails silently.

  5. 05

    Operations

    Backups with tested restores, logical replication, version upgrades and a review of what each release brings before applying it.

Where to start

A small first step, with a fixed timeline and price.

  1. 01 Three days

    PostgreSQL health check

    Who it is for
    Databases that got slow or that nobody has reviewed in years.
    What it covers
    • The heaviest queries and why
    • Indexes that are missing, redundant or no longer useful
    • Configuration, automatic maintenance, backup and restore
    What you get
    A list ordered by impact: what to fix first and what each fix is expected to gain.
  2. 02 Two weeks

    Architecture assessment

    Who it is for
    Before building a new system or migrating from SQL Server.
    What it covers
    • Data model and tenant isolation
    • What gets migrated or built, in what order and at what risk
    • Operations: deployment, backup and monitoring
    What you get
    A plan with stages, timelines and budget, whether you build it with us or not.

The price is quoted before we start and does not change. If something outside the scope comes up during the work, we flag it and decide together.

Ask for a proposal

Who signs

Manuel Reyes Bravo

Systems engineer · Betriva Systems

Every report and every assessment is signed by a person with a name, not an anonymous team. Manuel contributes to the PostgreSQL core (author, co-author, reviewer and reporter in PostgreSQL 18, 19 and 20), publishes extensions on PGXN and runs production platforms on AWS.

Core contributions

Each one links to the commit on git.postgresql.org. The credits are given by the committer, not by us.

  1. Author
    Fix three blips with progress reporting data (heap and GIN)

    Michael Paquier · 2026-10-06 · 3be29d9346d

    Three miscounted figures in the progress views of an index build: the last key of a parallel GIN build was counted twice, a counter did not advance when trimming pointers, and the first block of a heap scan was reported as if it were the total. We reported two of them; the committer found the third while reviewing our patches. In master, for PostgreSQL 20.

  2. Co-author
    Fix ADD PRIMARY KEY after dropping and re-adding a column

    Fujii Masao · 2026-10-06 · dd97e0c8e38

    Dropping a NOT NULL column, adding a new one with the same name and making it the primary key in a single ALTER TABLE failed with a spurious error. The check now runs after the column changes have been executed, with a regression test. Fixed in master and in PostgreSQL 18 and 19 (5659e549ade, 5e32454019b).

  3. Author
    Don’t quote the relation name twice in EXCEPT clause errors

    Amit Kapila · 2026-09-18 · 926627bf902

    In master and REL_19_STABLE (644e00f7f2d). A qualified name arrived quoted inside a message that already quoted it.

  4. Reporter
    Fix online checksums revert leftovers

    Daniel Gustafsson · 2026-09-16 · 4a9a6c5a69c

    The checksums revert removed a resource manager without bumping XLOG_PAGE_MAGIC. Demonstrated with real 19beta3 WAL.

  5. Reporter
    Further post-revert cleanup after online checksums

    Daniel Gustafsson · 2026-09-17 · 6b0760a10a3

    A mechanical sweep of the thirty revert commits matched the committer’s manual sweep: the same three leftovers, no false positives.

  6. Reviewer
    Distinguish publication exclusions in object addresses

    Amit Kapila · 2026-09-17 · 94670ba6d56

    Review with the ambiguity case built inside the new code. Also in REL_19_STABLE (91ff666f1d8).

  7. Reviewer
    doc: Clarify phase descriptions of pg_stat_progress_repack

    Masahiko Sawada · 2026-09-23 · bd2aebd7a7f

    REPACK progress phases, reviewed against the real behaviour on 19beta2. Also in REL_19_STABLE (8a2beb5f15f).

  8. Reviewer
    Turn "check" into assertion

    Álvaro Herrera · 2026-09-28 · 6dc3fd90f12

    Review credit for the fix to the TOAST lost update in REPACK, with an isolation test that catches the bug. Also in REL_19_STABLE (2b1d52b1979).

  9. Reviewer
    Refresh autovacuum costs while waiting for parallel workers

    Masahiko Sawada · 2026-10-01 · 42e96cf2fe0

    The switch to SetLatch() came out of a cost measurement sent to the thread. Also in REL_19_STABLE (4a80214270a).

Bugs reported to the project

Every report ships with the minimal case that reproduces it. These are the numbers in PostgreSQL’s public bug tracker.

  • #19686

    Rolling back SET TABLESPACE plus an INSERT corrupts the index

    with replies from Michael Paquier and Peter Geoghegan

  • #19692

    A generic partition-pruning plan delays statement_timeout cancellation

    confirmed by David Rowley

  • #19705

    One NaN box makes a BRIN index omit unrelated rows

    reviewed by John Naylor

  • #19701

    A GIN trigram index loses rows at similarity_threshold 0

  • #19641

    Unexpected results on an SP-GiST column with a non-deterministic collation

  • #19602

    citext split_part silently returns NULL where the core raises an error

  • #19621

    json_value with DEFAULT ON EMPTY returns unexpected results

  • #19695

    json_value RETURNING jsonb stays NULL after one null evaluation

  • #19715

    pg_restore_attribute_stats rejects range statistics for a domain

  • #19507

    Constraint name conflicts in partition trees spanning schemas

    with a proposed patch

Published extensions

Five, all on PGXN, all pure SQL: they install on RDS, Aurora and Supabase, where a C extension cannot go. They watch what fails with no error, no alert and no log line.

Around the core

  • Our own patch in the commitfest

    Progress reporting: a debug trace and a test framework. A framework to test progress reporting of long operations, under review in the PostgreSQL commitfest.

    Commitfest #7331
  • Co-maintenance of pg_isok

    Karl O. Pinc’s data-integrity extension. We contributed isok_lint, which checks saved queries without running them, with a test matrix across PostgreSQL 10 to 19: forty green runs.

    codeberg.org/kop/pg_isok
  • pgvector and pgvectorscale

    An open pull request on pgvector (HNSW prefetch) and pgvectorscale ported to the PostgreSQL 19 beta: it runs in production behind thirty vector and full-text indexes in daily use.

    pgvector #1020

How it is measured

  1. 01

    Facts are measured by code, not by opinion: pgbench with a median and a 95 % confidence interval, never a single number.

  2. 02

    Correctness with oracles: SQLancer (NoREC and TLP) finds wrong answers; ASan finds memory corruption.

  3. 03

    Every claim sent to the project carries exact commands and a counter-proof: the test must catch the bug when the fix is reverted.

  4. 04

    Extensions are tested against more than one major version before release.

Questions

Do you work with RDS, Aurora or Supabase?

Yes. The extensions were written in pure SQL precisely for that: they install where a C extension cannot go. And performance, isolation and migration work is the same on a managed service.

Do you migrate from SQL Server?

Yes, and we have done it in production: schema, data, procedures and the application on top. Cutover happens with the tests run and a way back.

What does my project gain from your core contributions?

Two things. When something fails inside the engine, we know how to read it, reproduce it and report it instead of working around it. And the judgement for designing a schema or an isolation policy comes from having seen how they break.

Can you review what we already have without rebuilding it?

That is the usual case. A review of schema, indexes, plans and policies delivers a report with what to change and why; the change is made by your team or by us, as you prefer.

Contact

Got a process falling apart on you?

Tell us which operation you want to put in order. If we can help, we say so with a plan and a timeline; if it is not our thing, we say that too.

Free check

Thirty minutes, no strings attached.

Give us read-only access to your PostgreSQL or your AWS account and we tell you what we find: the three queries costing you the most, or where you are overpaying AWS. If something is serious, you see it first.

Ask for the free check

It is an email. We reply within one business day to arrange the access.

Write to us at contacto@betrivasystems.com · We reply within one business day.