update postgres update
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
vincent 2025-01-18 14:10:56 +01:00
parent 222658e87f
commit 46dbb390b9

View File

@ -26,6 +26,14 @@ sudo -iu postgres
cd /var/lib/postgres/tmp
```
- init new db
```bash
initdb -D /var/lib/postgres/data --locale=C.UTF-8 --encoding=UTF8 --data-checksums
```
- if use extention copy extention file from /usr/lib/postgresql/ to /opt/pgsql-PG_VERSION/lib
- launch upgrade
```bash
@ -35,6 +43,12 @@ pg_upgrade -b /opt/pgsql-PG_VERSION/bin -B /usr/bin -d /var/lib/postgres/olddata
- check both pg_hba.conf in new and old cluster
- restart server `sc-start postgresql`
if need to restart old database
```bash
/opt/pgsql-16/bin/pg_ctl -w -D "/var/lib/postgres/olddata" -o "-p 50432 -b -c listen_addresses='' -c unix_socket_permissions=0700 -c unix_socket_directories='/var/lib/postgres/tmp'" stop
```
## sequece manipulation
sequence are use to generate uniq identifier