citusdata / citus_docs

Documentation for Citus. Distributed PostgreSQL as an extension.
Creative Commons Attribution 4.0 International
58 stars 59 forks source link

Downgrade citus gives error. #1070

Open yuratushnyak opened 1 year ago

yuratushnyak commented 1 year ago

Trying to downgrade citus from 11.1.4 to 10.2.7 gives error.

At first, We've upgraded citus from 10.2.7 to 11.1.4 successfully. When We're trying to downgrade with the install-downgrades, the following error occurs: 2022-12-09 09:55:05.816 UTC [32593] ERROR: extension "citus" has no update path from version "11.1-1" to version "10.2-5" 2022-12-09 09:55:05.816 UTC [32593] STATEMENT: alter extension citus update;

Steps to reproduce:

  1. Download and extract source code of 10.2.7 and 11.1.4 versions

  2. Change directory to citus-10.2.7 and install binaries through: make, make install

  3. Change directory to citus-11.1.4 and install downgrade script through: make, make install-downgrades

  4. Restart postgresql service and run the extension upgrade script: ALTER EXTENSION citus UPDATE;

hanefi commented 1 year ago

Thanks for sharing this error with us. It appears that this is a mistake on our end.

The main problem is that make install-downgrades did not install one of the required files for this downgrade. You can mitigate this error by copying a file to your installation directory manually.

Right after step 3, and before step 4 can you run the following on citus-11.1.4 directory?

cp src/backend/distributed/build/sql/citus--11.0-4--11.0-3.sql "$(pg_config --sharedir)/extension/"
yuratushnyak commented 1 year ago

Sorry for delay in response. I've run on citus-11-1.4 directory just right after step 3 cp src/backend/distributed/build/sql/citus--11.0-4--11.0-3.sql "$(pg_config --sharedir)/extension/"

After I did restart postgresql and tried to run: ALTER EXTENSION citus UPDATE; but received the ERROR: schema columnar is already a member of extension "citus_columnar". What does it mean?