Uninstall old postgres before installing new one.

This commit is contained in:
Sam Rose 2024-12-05 11:09:12 +00:00
parent 2d776e1db6
commit 7cbb4e361c
No known key found for this signature in database
1 changed files with 6 additions and 0 deletions

View File

@ -203,6 +203,12 @@ jobs:
- name: Set up PostgreSQL 16
if: matrix.datasource == 'postgres'
run: |
sudo systemctl stop postgresql
sudo apt-get remove --purge -y postgresql* libpq-dev
sudo rm -rf /etc/postgresql /var/lib/postgresql
sudo apt-get autoremove -y
sudo apt-get autoclean
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update