0

I upgraded a postgres cluster from version 10.6 to 12.3 with the pg_upgrade command, it was fine, but when I connect with psql they appear:

> psql
psql (12.3, server 10.6)

# select version ();
                                                  version
-------------------------------------------------- -------------------------------------------------- -----
  PostgreSQL 10.6 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28), 64 bit
(1 row)

What did I do wrong?

pifor
  • 7,419
  • 2
  • 8
  • 16
Hugo B.
  • 11
  • 2
  • You need to give more details: did you check that you are connected to the right instance - the one that has been upgraded (check with `short port` and `show data_directory`) ? Do you have the pg_upgrade log ? – pifor Jun 17 '20 at 07:57

1 Answers1

0

Let me guess: You ran pg_upgrade without -k, so that the data from the old cluster were copied to the new cluster.

But the old cluster is still there. So your problem is probably just that you started and used the old cluster by mistake.

Try with the new cluster (the one you specified with the -D option of pg_upgrade).

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263
  • Thanks for your collaboration, the environment variables were wrongly configured, I had one for version 10, 11 and another for 12. It was a matter of calmly reviewing it;) I'm going to repeat the steps again correctly because I don't trust anything I did, thnk.- – Hugo B. Jun 17 '20 at 10:33