From 9794f386f48144f4475c8f950dbf736c3664624c Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Wed, 16 Apr 2025 18:23:37 -0500 Subject: [PATCH] Make Postgres 17 the default version (#11619) This is mostly a documentation update, but a few updates with regard to neon_local, pageserver, and tests. 17 is our default for users in production, so dropping references to 16 makes sense. Signed-off-by: Tristan Partin Signed-off-by: Tristan Partin --- .github/workflows/pg-clients.yml | 2 +- README.md | 2 +- control_plane/src/bin/neon_local.rs | 2 +- control_plane/src/local_env.rs | 2 +- pageserver/src/lib.rs | 2 +- pageserver/src/tenant/metadata.rs | 5 +++-- test_runner/README.md | 2 +- test_runner/performance/README.md | 2 +- test_runner/performance/pageserver/README.md | 2 +- .../pageserver/interactive/test_many_small_tenants.py | 2 +- test_runner/regress/test_compatibility.py | 6 +++--- 11 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pg-clients.yml b/.github/workflows/pg-clients.yml index 098503769e..cad222f60d 100644 --- a/.github/workflows/pg-clients.yml +++ b/.github/workflows/pg-clients.yml @@ -30,7 +30,7 @@ permissions: statuses: write # require for posting a status update env: - DEFAULT_PG_VERSION: 16 + DEFAULT_PG_VERSION: 17 PLATFORM: neon-captest-new AWS_DEFAULT_REGION: eu-central-1 diff --git a/README.md b/README.md index 4453904346..c3ba00393e 100644 --- a/README.md +++ b/README.md @@ -270,7 +270,7 @@ By default, this runs both debug and release modes, and all supported postgres v testing locally, it is convenient to run just one set of permutations, like this: ```sh -DEFAULT_PG_VERSION=16 BUILD_TYPE=release ./scripts/pytest +DEFAULT_PG_VERSION=17 BUILD_TYPE=release ./scripts/pytest ``` ## Flamegraphs diff --git a/control_plane/src/bin/neon_local.rs b/control_plane/src/bin/neon_local.rs index 1ff4295438..af0504b957 100644 --- a/control_plane/src/bin/neon_local.rs +++ b/control_plane/src/bin/neon_local.rs @@ -63,7 +63,7 @@ const DEFAULT_PAGESERVER_ID: NodeId = NodeId(1); const DEFAULT_BRANCH_NAME: &str = "main"; project_git_version!(GIT_VERSION); -const DEFAULT_PG_VERSION: u32 = 16; +const DEFAULT_PG_VERSION: u32 = 17; const DEFAULT_PAGESERVER_CONTROL_PLANE_API: &str = "http://127.0.0.1:1234/upcall/v1/"; diff --git a/control_plane/src/local_env.rs b/control_plane/src/local_env.rs index b7906e5f81..5e3cf95a31 100644 --- a/control_plane/src/local_env.rs +++ b/control_plane/src/local_env.rs @@ -23,7 +23,7 @@ use crate::object_storage::{OBJECT_STORAGE_REMOTE_STORAGE_DIR, ObjectStorage}; use crate::pageserver::{PAGESERVER_REMOTE_STORAGE_DIR, PageServerNode}; use crate::safekeeper::SafekeeperNode; -pub const DEFAULT_PG_VERSION: u32 = 16; +pub const DEFAULT_PG_VERSION: u32 = 17; // // This data structures represents neon_local CLI config diff --git a/pageserver/src/lib.rs b/pageserver/src/lib.rs index bda218444d..42454e7356 100644 --- a/pageserver/src/lib.rs +++ b/pageserver/src/lib.rs @@ -49,7 +49,7 @@ use tracing::{info, info_span}; /// backwards-compatible changes to the metadata format. pub const STORAGE_FORMAT_VERSION: u16 = 3; -pub const DEFAULT_PG_VERSION: u32 = 16; +pub const DEFAULT_PG_VERSION: u32 = 17; // Magic constants used to identify different kinds of files pub const IMAGE_FILE_MAGIC: u16 = 0x5A60; diff --git a/pageserver/src/tenant/metadata.rs b/pageserver/src/tenant/metadata.rs index dceae89d1c..bea3128265 100644 --- a/pageserver/src/tenant/metadata.rs +++ b/pageserver/src/tenant/metadata.rs @@ -564,8 +564,9 @@ mod tests { Lsn(0), Lsn(0), Lsn(0), - // Any version will do here, so use the default - crate::DEFAULT_PG_VERSION, + // Updating this version to 17 will cause the test to fail at the + // next assert_eq!(). + 16, ); let expected_bytes = vec![ /* TimelineMetadataHeader */ diff --git a/test_runner/README.md b/test_runner/README.md index f342ef8aaa..c93352aaa9 100644 --- a/test_runner/README.md +++ b/test_runner/README.md @@ -72,7 +72,7 @@ Inside that dir, a `bin/postgres` binary should be present. `COMPATIBILITY_POSTGRES_DISTRIB_DIR`: The directory where the prevoius version of postgres distribution can be found. `DEFAULT_PG_VERSION`: The version of Postgres to use, This is used to construct full path to the postgres binaries. -Format is 2-digit major version nubmer, i.e. `DEFAULT_PG_VERSION=16` +Format is 2-digit major version nubmer, i.e. `DEFAULT_PG_VERSION=17` `TEST_OUTPUT`: Set the directory where test state and test output files should go. `RUST_LOG`: logging configuration to pass into Neon CLI diff --git a/test_runner/performance/README.md b/test_runner/performance/README.md index 85096d3770..3b25a60e9b 100644 --- a/test_runner/performance/README.md +++ b/test_runner/performance/README.md @@ -7,7 +7,7 @@ easier to see if you have compile errors without scrolling up. You may also need to run `./scripts/pysync`. Then run the tests -`DEFAULT_PG_VERSION=16 NEON_BIN=./target/release poetry run pytest test_runner/performance` +`DEFAULT_PG_VERSION=17 NEON_BIN=./target/release poetry run pytest test_runner/performance` Some handy pytest flags for local development: - `-x` tells pytest to stop on first error diff --git a/test_runner/performance/pageserver/README.md b/test_runner/performance/pageserver/README.md index 56ffad9963..b8bc8923cd 100644 --- a/test_runner/performance/pageserver/README.md +++ b/test_runner/performance/pageserver/README.md @@ -11,6 +11,6 @@ It supports mounting snapshots using overlayfs, which improves iteration time. Here's a full command line. ``` -RUST_BACKTRACE=1 NEON_ENV_BUILDER_USE_OVERLAYFS_FOR_SNAPSHOTS=1 DEFAULT_PG_VERSION=16 BUILD_TYPE=release \ +RUST_BACKTRACE=1 NEON_ENV_BUILDER_USE_OVERLAYFS_FOR_SNAPSHOTS=1 DEFAULT_PG_VERSION=17 BUILD_TYPE=release \ ./scripts/pytest test_runner/performance/pageserver/pagebench/test_pageserver_max_throughput_getpage_at_latest_lsn.py ```` diff --git a/test_runner/performance/pageserver/interactive/test_many_small_tenants.py b/test_runner/performance/pageserver/interactive/test_many_small_tenants.py index 4931295beb..0e67a6b709 100644 --- a/test_runner/performance/pageserver/interactive/test_many_small_tenants.py +++ b/test_runner/performance/pageserver/interactive/test_many_small_tenants.py @@ -16,7 +16,7 @@ from performance.pageserver.util import ensure_pageserver_ready_for_benchmarking """ Usage: -DEFAULT_PG_VERSION=16 BUILD_TYPE=debug NEON_ENV_BUILDER_USE_OVERLAYFS_FOR_SNAPSHOTS=1 INTERACTIVE=true \ +DEFAULT_PG_VERSION=17 BUILD_TYPE=debug NEON_ENV_BUILDER_USE_OVERLAYFS_FOR_SNAPSHOTS=1 INTERACTIVE=true \ ./scripts/pytest --timeout 0 test_runner/performance/pageserver/interactive/test_many_small_tenants.py """ diff --git a/test_runner/regress/test_compatibility.py b/test_runner/regress/test_compatibility.py index e23b1e0bca..7bd25cb109 100644 --- a/test_runner/regress/test_compatibility.py +++ b/test_runner/regress/test_compatibility.py @@ -48,7 +48,7 @@ if TYPE_CHECKING: # # How to run `test_backward_compatibility` locally: # -# export DEFAULT_PG_VERSION=16 +# export DEFAULT_PG_VERSION=17 # export BUILD_TYPE=release # export CHECK_ONDISK_DATA_COMPATIBILITY=true # export COMPATIBILITY_SNAPSHOT_DIR=test_output/compatibility_snapshot_pgv${DEFAULT_PG_VERSION} @@ -70,7 +70,7 @@ if TYPE_CHECKING: # # How to run `test_forward_compatibility` locally: # -# export DEFAULT_PG_VERSION=16 +# export DEFAULT_PG_VERSION=17 # export BUILD_TYPE=release # export CHECK_ONDISK_DATA_COMPATIBILITY=true # export COMPATIBILITY_NEON_BIN=neon_previous/target/${BUILD_TYPE} @@ -96,7 +96,7 @@ if TYPE_CHECKING: # # How to run `test_version_mismatch` locally: # -# export DEFAULT_PG_VERSION=16 +# export DEFAULT_PG_VERSION=17 # export BUILD_TYPE=release # export CHECK_ONDISK_DATA_COMPATIBILITY=true # export COMPATIBILITY_NEON_BIN=neon_previous/target/${BUILD_TYPE}