From 67fdd00ced59eb7aba6d06f80cfeebb080390787 Mon Sep 17 00:00:00 2001 From: kaitokimuraofficial Date: Sat, 14 Feb 2026 22:14:40 +0900 Subject: [PATCH 1/6] Update preflight validator to support PostgreSQL 14 --- .../infra-server/libraries/preflight_postgres_validator.rb | 6 +++--- .../spec/libraries/preflight_postgres_validator_spec.rb | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/omnibus/files/server-ctl-cookbooks/infra-server/libraries/preflight_postgres_validator.rb b/omnibus/files/server-ctl-cookbooks/infra-server/libraries/preflight_postgres_validator.rb index 686a17f59e..f10666df1d 100644 --- a/omnibus/files/server-ctl-cookbooks/infra-server/libraries/preflight_postgres_validator.rb +++ b/omnibus/files/server-ctl-cookbooks/infra-server/libraries/preflight_postgres_validator.rb @@ -21,10 +21,10 @@ class PostgresqlPreflightValidator < PreflightValidator # we ship. When we bumped the version we ship to 9.6, we haven't yet # introduced any changes that _require_ 9.6. So, these constants reflect the # actually required PG version. - REQUIRED_VERSION = PgVersion.new('9.6') + REQUIRED_VERSION = PgVersion.new('9.6') # supported PG version - SUPPORTED_VERSION = PgVersion.new('13') + SUPPORTED_VERSION = PgVersion.new('14') def run! warn_about_removed_attribute('checkpoint_segments') @@ -190,7 +190,7 @@ def backend_verify_postgres_version(connection) v = PgVersion.new /^([0-9\.]+)/.match(r.first['server_version']).to_a.first # Note that we're looking for the same major, and using our minor as the minimum version - # This provides compatibility with external databases that use < 13 before we make use + # This provides compatibility with external databases that use < 14 before we make use # of any features available in > 9.6. if v.major == REQUIRED_VERSION || v.major == SUPPORTED_VERSION diff --git a/omnibus/files/server-ctl-cookbooks/infra-server/spec/libraries/preflight_postgres_validator_spec.rb b/omnibus/files/server-ctl-cookbooks/infra-server/spec/libraries/preflight_postgres_validator_spec.rb index 3b50fe14c9..e14f6571e6 100644 --- a/omnibus/files/server-ctl-cookbooks/infra-server/spec/libraries/preflight_postgres_validator_spec.rb +++ b/omnibus/files/server-ctl-cookbooks/infra-server/spec/libraries/preflight_postgres_validator_spec.rb @@ -102,8 +102,8 @@ class ConnectionBad < RuntimeError; end end end - context 'when external version is > 13.x' do - let(:version) { '14.0' } + context 'when external version is > 14.x' do + let(:version) { '15.0' } it 'fails with a CSPG014 error' do expect(postgres_validator).to receive(:fail_with).with(error_message) From e01ccfc1516e1547f2fd4af2784b8bd5009819f2 Mon Sep 17 00:00:00 2001 From: kaitokimuraofficial Date: Sat, 14 Feb 2026 22:16:10 +0900 Subject: [PATCH 2/6] cp omnibus/config/software/postgresql13.rb omnibus/config/software/postgresql14.rb --- omnibus/config/software/postgresql14.rb | 76 +++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 omnibus/config/software/postgresql14.rb diff --git a/omnibus/config/software/postgresql14.rb b/omnibus/config/software/postgresql14.rb new file mode 100644 index 0000000000..ff02c22f9b --- /dev/null +++ b/omnibus/config/software/postgresql14.rb @@ -0,0 +1,76 @@ +# +# Copyright:: Chef Software, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +name "postgresql13" + +default_version "13.22" + +license "PostgreSQL" +license_file "COPYRIGHT" +skip_transitive_dependency_licensing true + +dependency "zlib" +dependency "openssl" +dependency "libedit" +dependency "ncurses" +dependency "libossp-uuid" +dependency "config_guess" + +# version_list: url=https://ftp.postgresql.org/pub/source/v#{version}/ filter=*.tar.bz2 + +version("13.22") do + source url: "#{ENV['ARTIFACTORY_REPO_URL']}/postgresql13/#{name}-#{version}.tuxcare.1.0.0.tar.bz2", + authorization: "X-JFrog-Art-Api:#{ENV['ARTIFACTORY_TOKEN']}", + sha256: "d36d83dc89e625502cf6fb1d0529642ba1266bd614b4e4a41cefd1dddcf09080" +end + +version("13.21") { source sha256: "dcda1294df45f033b0656cf7a8e4afbbc624c25e1b144aec79530f74d7ef4ab4" } +version("13.18") { source sha256: "ceea92abee2a8c19408d278b68de6a78b6bd3dbb4fa2d653fa7ca745d666aab1" } +version("13.14") { source sha256: "b8df078551898960bd500dc5d38a177e9905376df81fe7f2b660a1407fa6a5ed" } +version("13.5") { source sha256: "9b81067a55edbaabc418aacef457dd8477642827499560b00615a6ea6c13f6b3" } +version("13.6") { source sha256: "bafc7fa3d9d4da8fe71b84c63ba8bdfe8092935c30c0aa85c24b2c08508f67fc" } + +source url: "https://ftp.postgresql.org/pub/source/v#{version}/postgresql-#{version}.tar.bz2" +internal_source url: "#{ENV["ARTIFACTORY_REPO_URL"]}/postgresql13/#{name}-#{version}.tuxcare.1.0.0.tar.bz2", + authorization: "X-JFrog-Art-Api:#{ENV["ARTIFACTORY_TOKEN"]}" + +relative_path "postgresql-#{version}" + +build do + env = with_standard_compiler_flags(with_embedded_path) + short_version = version.gsub(/^([0-9]+).[0-9]+$/, '\1') + + update_config_guess(target: "config") + + command "./configure" \ + " --prefix=#{install_dir}/embedded/postgresql/#{short_version}" \ + " --with-libedit-preferred" \ + " --with-openssl" \ + " --with-ossp-uuid" \ + " --with-includes=#{install_dir}/embedded/include" \ + " --with-libraries=#{install_dir}/embedded/lib", env: env + + make "world -j #{workers}", env: env + make "install-world -j #{workers}", env: env + + block do + Dir.glob("#{install_dir}/embedded/postgresql/#{short_version}/bin/*").sort.each do |bin| + link bin, "#{install_dir}/embedded/bin/#{File.basename(bin)}" + end + + delete "#{install_dir}/embedded/postgresql/#{short_version}/share/doc" + end +end From e7d91c0b3c2bf83c6e31edb588ea060ec8e3ec1b Mon Sep 17 00:00:00 2001 From: kaitokimuraofficial Date: Sat, 14 Feb 2026 22:18:19 +0900 Subject: [PATCH 3/6] Modify copied file for PostgreSQL 14.20 --- omnibus/config/software/postgresql14.rb | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/omnibus/config/software/postgresql14.rb b/omnibus/config/software/postgresql14.rb index ff02c22f9b..de42ce284f 100644 --- a/omnibus/config/software/postgresql14.rb +++ b/omnibus/config/software/postgresql14.rb @@ -14,9 +14,9 @@ # limitations under the License. # -name "postgresql13" +name "postgresql14" -default_version "13.22" +default_version "14.20" license "PostgreSQL" license_file "COPYRIGHT" @@ -31,21 +31,9 @@ # version_list: url=https://ftp.postgresql.org/pub/source/v#{version}/ filter=*.tar.bz2 -version("13.22") do - source url: "#{ENV['ARTIFACTORY_REPO_URL']}/postgresql13/#{name}-#{version}.tuxcare.1.0.0.tar.bz2", - authorization: "X-JFrog-Art-Api:#{ENV['ARTIFACTORY_TOKEN']}", - sha256: "d36d83dc89e625502cf6fb1d0529642ba1266bd614b4e4a41cefd1dddcf09080" -end - -version("13.21") { source sha256: "dcda1294df45f033b0656cf7a8e4afbbc624c25e1b144aec79530f74d7ef4ab4" } -version("13.18") { source sha256: "ceea92abee2a8c19408d278b68de6a78b6bd3dbb4fa2d653fa7ca745d666aab1" } -version("13.14") { source sha256: "b8df078551898960bd500dc5d38a177e9905376df81fe7f2b660a1407fa6a5ed" } -version("13.5") { source sha256: "9b81067a55edbaabc418aacef457dd8477642827499560b00615a6ea6c13f6b3" } -version("13.6") { source sha256: "bafc7fa3d9d4da8fe71b84c63ba8bdfe8092935c30c0aa85c24b2c08508f67fc" } +version("14.20") { source sha256: "7527f10f1640761bc280ad97d105d286d0cf72e54d36d78cf68e5e5f752b646b" } source url: "https://ftp.postgresql.org/pub/source/v#{version}/postgresql-#{version}.tar.bz2" -internal_source url: "#{ENV["ARTIFACTORY_REPO_URL"]}/postgresql13/#{name}-#{version}.tuxcare.1.0.0.tar.bz2", - authorization: "X-JFrog-Art-Api:#{ENV["ARTIFACTORY_TOKEN"]}" relative_path "postgresql-#{version}" From 5e474c613f84bba0f3e7f1b76916413b17825142 Mon Sep 17 00:00:00 2001 From: kaitokimuraofficial Date: Sat, 14 Feb 2026 22:23:19 +0900 Subject: [PATCH 4/6] Add postgresql14 dependency and keep postgresql13 for upgrade path --- omnibus/config/software/server-complete.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/omnibus/config/software/server-complete.rb b/omnibus/config/software/server-complete.rb index d77ab14716..f4aaf81883 100644 --- a/omnibus/config/software/server-complete.rb +++ b/omnibus/config/software/server-complete.rb @@ -30,7 +30,8 @@ # the backend dependency "postgresql96-bin" # for upgrading 9.6 -> 13 -dependency "postgresql13" +dependency "postgresql13" # for upgrading 13 -> 14 +dependency "postgresql14" dependency "valkey" # dynamic routing controls dependency "haproxy" dependency "opensearch" # used by search From 46e4cc80d26005425a36b0cdcc82b33af44898f6 Mon Sep 17 00:00:00 2001 From: kaitokimuraofficial Date: Sat, 14 Feb 2026 22:24:31 +0900 Subject: [PATCH 5/6] Update omnibus software dependencies to postgresql14 --- omnibus/config/software/oc_id.rb | 2 +- omnibus/config/software/partybus.rb | 2 +- omnibus/config/software/perl_pg_driver.rb | 2 +- omnibus/config/software/private-chef-ctl.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/omnibus/config/software/oc_id.rb b/omnibus/config/software/oc_id.rb index 96b0b5ab7c..89017d12a9 100644 --- a/omnibus/config/software/oc_id.rb +++ b/omnibus/config/software/oc_id.rb @@ -27,7 +27,7 @@ # and makeds more sense than adding the thing that is stopping # it from building on s390 (libxml2). dependency "nokogiri" -dependency "postgresql13" # for libpq +dependency "postgresql14" # for libpq dependency "ruby" relative_path "oc-id" diff --git a/omnibus/config/software/partybus.rb b/omnibus/config/software/partybus.rb index 0167b6334d..e02fc7d4b7 100644 --- a/omnibus/config/software/partybus.rb +++ b/omnibus/config/software/partybus.rb @@ -21,7 +21,7 @@ license :project_license dependency "ruby" -dependency "postgresql13" +dependency "postgresql14" build do env = with_standard_compiler_flags(with_embedded_path) diff --git a/omnibus/config/software/perl_pg_driver.rb b/omnibus/config/software/perl_pg_driver.rb index a44257c4fc..dd33f09ba5 100644 --- a/omnibus/config/software/perl_pg_driver.rb +++ b/omnibus/config/software/perl_pg_driver.rb @@ -22,7 +22,7 @@ dependency "perl" dependency "cpanminus" -dependency "postgresql13" +dependency "postgresql14" source url: "http://search.cpan.org/CPAN/authors/id/T/TU/TURNSTEP/DBD-Pg-#{version}.tar.gz", md5: "547de1382a47d66872912fe64282ff55" diff --git a/omnibus/config/software/private-chef-ctl.rb b/omnibus/config/software/private-chef-ctl.rb index ff467c8f34..af83c94219 100644 --- a/omnibus/config/software/private-chef-ctl.rb +++ b/omnibus/config/software/private-chef-ctl.rb @@ -21,7 +21,7 @@ license :project_license skip_transitive_dependency_licensing true -dependency "postgresql13" # for libpq +dependency "postgresql14" # for libpq dependency "omnibus-ctl" build do From f8c04967cc0253ca726a665d307742139ec712de Mon Sep 17 00:00:00 2001 From: kaitokimuraofficial Date: Sat, 14 Feb 2026 22:28:52 +0900 Subject: [PATCH 6/6] Set default PostgreSQL version to 14 --- .../server-ctl-cookbooks/infra-server/attributes/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omnibus/files/server-ctl-cookbooks/infra-server/attributes/default.rb b/omnibus/files/server-ctl-cookbooks/infra-server/attributes/default.rb index 86686323b8..276147f6ee 100755 --- a/omnibus/files/server-ctl-cookbooks/infra-server/attributes/default.rb +++ b/omnibus/files/server-ctl-cookbooks/infra-server/attributes/default.rb @@ -575,7 +575,7 @@ ### # For now, we're hardcoding the version directory suffix here. # Since postgresql 10, only use major version numbers. -default['private_chef']['postgresql']['version'] = '13' +default['private_chef']['postgresql']['version'] = '14' # In the future, we're probably going to want to do something more elegant so we # don't accidentally overwrite this directory if we upgrade PG to 9.3: keeping these # directories straight is important because in the distant future (the year 2000)