neondatabase / neon

Neon: Serverless Postgres. We separated storage and compute to offer autoscaling, code-like database branching, and scale to zero.
https://neon.tech
Apache License 2.0
15.22k stars 444 forks source link

safekeeper: use protobuf for sending compressed records to pageserver #9821

Open VladLazar opened 2 days ago

VladLazar commented 2 days ago

Problem

https://github.com/neondatabase/neon/pull/9746 lifted decoding and interpretation of WAL to the safekeeper. This reduced the ingested amount on the pageservers by around 10x for a tenant with 8 shards, but doubled the ingested amount for single sharded tenants.

Also, https://github.com/neondatabase/neon/pull/9746 uses bincode which doesn't support schema evolution. Technically the schema can be evolved, but it's very cumbersome.

Summary of changes

This patch set addresses both problems by adding protobuf support for the interpreted wal records and adding compression support. Compressed protobuf reduced the ingested amount by 100x on the 32 shards test_sharded_ingest case (compared to non-interpreted proto). For the 1 shard case the reduction is 5x.

github-actions[bot] commented 2 days ago

5650 tests run: 5420 passed, 3 failed, 227 skipped (full report)


Failures on Postgres 17

Postgres 17

Code coverage* (full report)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
8b13a09a5c233d98abd4a0d3e59157e7db16d6fd at 2024-11-21T10:57:02.228Z :recycle: