mirror of
https://github.com/neondatabase/neon.git
synced 2025-12-28 00:23:00 +00:00
## 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. Sister change to `rust-postgres` is [here](https://github.com/neondatabase/rust-postgres/pull/33). ## Links Related: https://github.com/neondatabase/neon/issues/9336 Epic: https://github.com/neondatabase/neon/issues/9329
12 lines
524 B
Rust
12 lines
524 B
Rust
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
// Generate rust code from .proto protobuf.
|
|
//
|
|
// Note: we previously tried to use deterministic location at proto/ for
|
|
// easy location, but apparently interference with cachepot sometimes fails
|
|
// the build then. Anyway, per cargo docs build script shouldn't output to
|
|
// anywhere but $OUT_DIR.
|
|
tonic_build::compile_protos("proto/interpreted_wal.proto")
|
|
.unwrap_or_else(|e| panic!("failed to compile protos {:?}", e));
|
|
Ok(())
|
|
}
|