# PostgreSQL 15 update

**URL:** <https://meta.discourse.org/t/postgresql-15-update/349515>\
**Category:** Announcements\
**Created:** [January 29, 2025, 7:20am UTC](https://meta.discourse.org/t/postgresql-15-update/349515 "2025-01-29T07:20:00Z")\
**Posts on this page:** 1\
**Showing post:** 121

<div class="post-metadata">

**Author:** ![chrisc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisc/32/119982_2.png) [@chrisc](https://meta.discourse.org/u/chrisc)\
**Post date:** [February 9, 2025, 3:56pm UTC](https://meta.discourse.org/t/postgresql-15-update/349515/121 "2025-02-09T15:56:53Z")

</div>

I have solved the [problem I had with the PostgreSQL 13 to 15 upgrade](https://meta.discourse.org/t/postgresql-15-update/349515/109), after restoring the server with the failed upgrade from backups, the following steps worked for me with a PostgreSQL `en_GB.UTF-8` locale:

```bash
sudo -i
su - discourse
cd /var/discourse
git stash
git stash drop
git pull
./launcher stop app
docker run --rm \
    --entrypoint=/bin/bash \
    -e LANG='en_GB.UTF-8' \
    -v /var/discourse/shared/standalone/postgres_data:/var/lib/postgresql/13/data \
    -v /var/discourse/shared/standalone/postgres_data_new:/var/lib/postgresql/15/data \
    tianon/postgres-upgrade:13-to-15 \
    -c 'sed -i "s/^# $LANG/$LANG/" /etc/locale.gen && locale-gen &&
    apt-get update && apt-get install -y postgresql-13-pgvector postgresql-15-pgvector &&
    docker-upgrade'
exit
mv /var/discourse/shared/standalone/postgres_data /var/discourse/shared/standalone/postgres_data_old
mv /var/discourse/shared/standalone/postgres_data_new /var/discourse/shared/standalone/postgres_data
chown -R 101:104 /var/discourse/shared/standalone/postgres_data
su - discourse
cd /var/discourse
docker run --rm -v /var/discourse/shared/standalone:/shared \
local_discourse/app chown -R postgres:postgres /shared/postgres_data 
./launcher rebuild app

```

I needed to remove the local changes that had been made in the past for the PostgreSQL LANG using `git stash; git stash drop` and the moving of the PostgreSQL data directories needed to be be done as `root` and a `chown` was needed.

---

_[View the full topic](https://meta.discourse.org/t/postgresql-15-update/349515)._
