I've recently updated from version 14 to 15 and I can't figure out why it's still using the data directory for 14.
I've verified that I'm using version 15.
$ sudo -u postgres psql -V psql (PostgreSQL) 15.1 (Ubuntu 15.1-1.pgdg20.04+1)
However the data directory is still version 14.
$ sudo -u postgres psql -c "SHOW data_directory;" data_directory ----------------------------- /var/lib/postgresql/14/main (1 row)
I've verified that the data directory in
postgresql.conf is correct.
$ sudo grep data_directory /etc/postgresql/15/main/postgresql.conf data_directory = '/var/lib/postgresql/15/main'
When I switch to the postgres user and check
/var/lib/postgresql/15/main there is no
How can I get postgres to use the correct data directory?
I've just checked
sudo -u postgres psql -c "SHOW config_file;" and it's set to
/etc/postgresql/14/main/postgresql.conf so I will dig into that.