mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-04 12:02:55 +00:00
## Problem Spun off from https://github.com/neondatabase/neon/pull/6394 -- this PR is just the persistence parts and the changes that enable it to work nicely ## Summary of changes - Revert #6444 and #6450 - In neon_local, start a vanilla postgres instance for the attachment service to use. - Adopt `diesel` crate for database access in attachment service. This uses raw SQL migrations as the source of truth for the schema, so it's a soft dependency: we can switch libraries pretty easily. - Rewrite persistence.rs to use postgres (via diesel) instead of JSON. - Preserve JSON read+write at startup and shutdown: this enables using the JSON format in compatibility tests, so that we don't have to commit to our DB schema yet. - In neon_local, run database creation + migrations before starting attachment service - Run the initial reconciliation in Service::spawn in the background, so that the pageserver + attachment service don't get stuck waiting for each other to start, when restarting both together in a test.
10 lines
310 B
TOML
10 lines
310 B
TOML
# For documentation on how to configure this file,
|
|
# see https://diesel.rs/guides/configuring-diesel-cli
|
|
|
|
[print_schema]
|
|
file = "control_plane/attachment_service/src/schema.rs"
|
|
custom_type_derives = ["diesel::query_builder::QueryId"]
|
|
|
|
[migrations_directory]
|
|
dir = "control_plane/attachment_service/migrations"
|