mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-27 10:00:38 +00:00
Use pg_upgrade to upgrade projects from one Postgres major version to the next
This commit is contained in:
@@ -12,3 +12,9 @@ use serde::Deserialize;
|
||||
pub struct ConfigurationRequest {
|
||||
pub spec: ComputeSpec,
|
||||
}
|
||||
|
||||
/// Request body of the /upgrade API
|
||||
#[derive(Deserialize, Debug)]
|
||||
pub struct UpgradeRequest {
|
||||
pub pg_version: String,
|
||||
}
|
||||
|
||||
@@ -44,10 +44,15 @@ pub enum ComputeStatus {
|
||||
// Compute node has spec and initial startup and
|
||||
// configuration is in progress.
|
||||
Init,
|
||||
// Compute has been prepared, meaning that remote extensions have been
|
||||
// downloaded and the data directory has been prepared.
|
||||
Prepared,
|
||||
// Compute is configured and running.
|
||||
Running,
|
||||
// New spec is being applied.
|
||||
Configuration,
|
||||
// Compute is upgrading Postgres.
|
||||
Upgrading,
|
||||
// Either startup or configuration failed,
|
||||
// compute will exit soon or is waiting for
|
||||
// control-plane to terminate it.
|
||||
|
||||
@@ -199,6 +199,11 @@ pub enum ComputeMode {
|
||||
/// Future versions may want to distinguish between replicas with hot standby
|
||||
/// feedback and other kinds of replication configurations.
|
||||
Replica,
|
||||
/// An upgrade-only node
|
||||
///
|
||||
/// This node will not accept remote Postgres connections. It's only
|
||||
/// purpose is to upgrade a timeline.
|
||||
Upgrade,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
|
||||
Reference in New Issue
Block a user