How to uninstall old versions of postgres?

I’ve noticed that my server has several versions of postgres installed:

grep -H '^port' /etc/postgresql/*/main/postgresql.conf
/etc/postgresql/10/main/postgresql.conf:port = 5432				# (change requires restart)
/etc/postgresql/12/main/postgresql.conf:port = 5434				# (change requires restart)
/etc/postgresql/13/main/postgresql.conf:port = 5435				# (change requires restart)

I think this might be causing problems when starting/stopping the postgresql service via service postgresql restart.

I have two questions:

  1. Which one does the latest version of Discourse use?
  2. How can I safely uninstall the other versions?
1 Like

Sorry but what does this have to do with Discourse? Discourse ships with PostgreSQL inside the container image, so we are not involved with any software installed on your server.

➜  discoursesmall git:(6a42acbf) docker run --rm -it discourse/base:2.0.20201125-2246
root@f89c549fdef1:/# ls /etc/postgresql

By default, none since it uses the container one. If talking only about versions, we are currently using 12 and will migrate to 13 very soon.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.