mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-15 09:22:55 +00:00
This adds an API to the storage controller to list safekeepers
registered to it.
This PR does a `diesel print-schema > storage_controller/src/schema.rs`
because of an inconsistency between up.sql and schema.rs, introduced by
[this](2c142f14f7)
commit, so there is some updates of `schema.rs` due to that. As a
followup to this, we should maybe think about running `diesel
print-schema` in CI.
Part of #9981
68 lines
1.5 KiB
Rust
68 lines
1.5 KiB
Rust
// @generated automatically by Diesel CLI.
|
|
|
|
diesel::table! {
|
|
controllers (address, started_at) {
|
|
address -> Varchar,
|
|
started_at -> Timestamptz,
|
|
}
|
|
}
|
|
|
|
diesel::table! {
|
|
metadata_health (tenant_id, shard_number, shard_count) {
|
|
tenant_id -> Varchar,
|
|
shard_number -> Int4,
|
|
shard_count -> Int4,
|
|
healthy -> Bool,
|
|
last_scrubbed_at -> Timestamptz,
|
|
}
|
|
}
|
|
|
|
diesel::table! {
|
|
nodes (node_id) {
|
|
node_id -> Int8,
|
|
scheduling_policy -> Varchar,
|
|
listen_http_addr -> Varchar,
|
|
listen_http_port -> Int4,
|
|
listen_pg_addr -> Varchar,
|
|
listen_pg_port -> Int4,
|
|
availability_zone_id -> Varchar,
|
|
}
|
|
}
|
|
|
|
diesel::table! {
|
|
safekeepers (id) {
|
|
id -> Int8,
|
|
region_id -> Text,
|
|
version -> Int8,
|
|
host -> Text,
|
|
port -> Int4,
|
|
active -> Bool,
|
|
http_port -> Int4,
|
|
availability_zone_id -> Text,
|
|
}
|
|
}
|
|
|
|
diesel::table! {
|
|
tenant_shards (tenant_id, shard_number, shard_count) {
|
|
tenant_id -> Varchar,
|
|
shard_number -> Int4,
|
|
shard_count -> Int4,
|
|
shard_stripe_size -> Int4,
|
|
generation -> Nullable<Int4>,
|
|
generation_pageserver -> Nullable<Int8>,
|
|
placement_policy -> Varchar,
|
|
splitting -> Int2,
|
|
config -> Text,
|
|
scheduling_policy -> Varchar,
|
|
preferred_az_id -> Nullable<Varchar>,
|
|
}
|
|
}
|
|
|
|
diesel::allow_tables_to_appear_in_same_query!(
|
|
controllers,
|
|
metadata_health,
|
|
nodes,
|
|
safekeepers,
|
|
tenant_shards,
|
|
);
|