Skip to content

Commit 107d2ec

Browse files
Clemens Beckibaum
authored andcommitted
Default to PostgreSQL 14 for fresh installations
Default to PostgreSQL 14 for fresh installations instead of PostgreSQL 13. No automatic upgrades are performed. To upgrade to PostgreSQL 14 see: https://docs.gitlab.com/omnibus/settings/database.html#upgrade-packaged-postgresql-server Changelog: changed
1 parent 1588e1c commit 107d2ec

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

config/software/postgresql.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,6 @@
5858

5959
make "world -j #{workers}", env: env
6060
make 'install-world', env: env
61-
62-
# NOTE: There are several dependencies which require these files in these
63-
# locations and have dependency on `postgresql_new`. So when this block is
64-
# changed to be in the `postgresql` software definition for default PG
65-
# version changes, change those dependencies to `postgresql`.
66-
block 'link bin files' do
67-
Dir.glob("#{prefix}/bin/*").each do |bin_file|
68-
link bin_file, "#{install_dir}/embedded/bin/#{File.basename(bin_file)}"
69-
end
70-
end
7161
end
7262

7363
# exclude headers and static libraries from package

config/software/postgresql_new.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@
6161
make 'install-world', env: env
6262

6363
link "#{prefix}/lib/#{libpq}", "#{install_dir}/embedded/lib/#{libpq}"
64+
65+
# NOTE: There are several dependencies which require these files in these
66+
# locations and have dependency on `postgresql_new`. So when this block is
67+
# changed to be in the `postgresql` software definition for default PG
68+
# version changes, change those dependencies to `postgresql`.
69+
block 'link bin files' do
70+
Dir.glob("#{prefix}/bin/*").each do |bin_file|
71+
link bin_file, "#{install_dir}/embedded/bin/#{File.basename(bin_file)}"
72+
end
73+
end
6474
end
6575

6676
# exclude headers and static libraries from package

doc/settings/database.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ of that setting in the running PostgreSQL instance.
4242
#### Automatic restart when the PostgreSQL version changes
4343

4444
By default, Linux package installations automatically restart PostgreSQL when the underlying
45-
version changes, as suggested by the [upstream documentation](https://www.postgresql.org/docs/13/upgrading.html).
45+
version changes, as suggested by the [upstream documentation](https://www.postgresql.org/docs/14/upgrading.html).
4646
This behavior can be controlled using the `auto_restart_on_version_change` setting
4747
available for `postgresql` and `geo-postgresql`.
4848

@@ -73,7 +73,7 @@ to avoid errors like the [one related to loading necessary libraries](#could-not
7373
Linux package installations automatically enable SSL on the PostgreSQL server, but it will accept
7474
both encrypted and unencrypted connections by default. Enforcing SSL requires
7575
using the `hostssl` configuration in `pg_hba.conf`. For more details, see the
76-
[`pg_hba.conf` documentation](https://www.postgresql.org/docs/13/auth-pg-hba-conf.html).
76+
[`pg_hba.conf` documentation](https://www.postgresql.org/docs/14/auth-pg-hba-conf.html).
7777

7878
SSL support depends on the following files:
7979

files/gitlab-ctl-commands/pg-upgrade.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ def old_version
746746
end
747747

748748
def default_version
749-
PGVersion.parse(version_from_manifest('postgresql'))
749+
PGVersion.parse(version_from_manifest('postgresql_new')) || PGVersion.parse(version_from_manifest('postgresql'))
750750
end
751751

752752
def new_version

0 commit comments

Comments
 (0)