← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~lgp171188/launchpad:launchpad-dev-environment-postgresql-16-support into launchpad:master

 

Guruprasad has proposed merging ~lgp171188/launchpad:launchpad-dev-environment-postgresql-16-support into launchpad:master.

Commit message:
Add support for setting up PostgreSQL 16 in the dev environment

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~lgp171188/launchpad/+git/launchpad/+merge/477891
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~lgp171188/launchpad:launchpad-dev-environment-postgresql-16-support into launchpad:master.
diff --git a/utilities/launchpad-database-setup b/utilities/launchpad-database-setup
index beb3fd3..cf3a271 100755
--- a/utilities/launchpad-database-setup
+++ b/utilities/launchpad-database-setup
@@ -24,7 +24,7 @@ pgversion=
 # This loop contains multiple versions when we are in the process of
 # migrating between PostgreSQL versions.
 # shellcheck disable=SC2043
-for try_pgversion in 12 14
+for try_pgversion in 12 14 16
 do
   if sudo grep -qs "^auto" /etc/postgresql/$try_pgversion/main/start.conf; then
     pgversion="$try_pgversion"
diff --git a/utilities/rocketfuel-setup b/utilities/rocketfuel-setup
index 242286d..886cc9a 100755
--- a/utilities/rocketfuel-setup
+++ b/utilities/rocketfuel-setup
@@ -9,8 +9,9 @@
 
 DO_WORKSPACE=1
 INSTALL_POSTGRES_14=0
+INSTALL_POSTGRES_16=0
 INSTALL_OPTS=""
-getopt_output="$(getopt -o '' -l no-workspace,postgres14,lpusername:,assume-yes -- "$@")" || exit 1
+getopt_output="$(getopt -o '' -l no-workspace,postgres14,postgres16,lpusername:,assume-yes -- "$@")" || exit 1
 eval set -- "$getopt_output"
 while :; do
   case $1 in
@@ -22,6 +23,10 @@ while :; do
         INSTALL_POSTGRES_14=1
         shift
         ;;
+    --postgres16)
+        INSTALL_POSTGRES_16=1
+        shift
+        ;;
     --lpusername)
         lpusername=$2
         echo "Using username $lpusername for Launchpad"
@@ -104,8 +109,11 @@ do_install() {
 sudo apt update
 REQUIRED_PACKAGES="launchpad-developer-dependencies apache2 libapache2-mod-wsgi-py3"
 if [ $INSTALL_POSTGRES_14 == 1 ]; then
-  sudo add-apt-repository ppa:launchpad/postgresql-ports
+  sudo add-apt-repository ppa:launchpad/postgresql-14-ports
   REQUIRED_PACKAGES="launchpad-database-dependencies-14 ${REQUIRED_PACKAGES}"
+elif [ $INSTALL_POSTGRES_16 == 1 ]; then
+  sudo add-apt-repository ppa:launchpad/postgresql-16-ports
+  REQUIRED_PACKAGES="launchpad-database-dependencies-16 ${REQUIRED_PACKAGES}"
 fi
 for pkg in $REQUIRED_PACKAGES; do
   do_install;