-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install downgrade scripts by default #6637
base: main
Are you sure you want to change the base?
Conversation
7fab05d
to
46b1606
Compare
Codecov Report
@@ Coverage Diff @@
## main #6637 +/- ##
=======================================
Coverage 93.01% 93.02%
=======================================
Files 259 259
Lines 55851 55852 +1
=======================================
+ Hits 51952 51958 +6
+ Misses 3899 3894 -5 |
Do we need to remove the downgrades/ folder? The separation seems kind of useful given the large number of files in the sql directory. |
No we do not need to do that. We can keep the folder.
I agree. However, for several reasons we did not place all the downgrade scripts in that folder. How about keeping |
seems reasonable |
46b1606
to
f34ac23
Compare
I removed all I intentionally left I suggest we complete this PR after 11.2 release is over. |
So what are the downgrade steps that people are supposed to follow? Is it this?
|
This list of actions is not possible without I think it is still safer to do the following instead:
The end user does not (and IMO should not) really care about the migration version, and they can easily break their systems if they migrate to a wrong version. For example, A better solution would be maintaining a downgrade package that installs the latest downgrade scripts. If we had such a package, we could prefer the following actions:
|
I think @marcocitus found some problem with this flow a while back, and that it didn't actually work in practice. And we never noticed because our tests don't actually do it, but instead use the I would really like a flow that allows you to run For context, the reason why downgrades from the downgrades directory are not installed by default is because we indeed had this |
Iirc the columnar decoupling in 11.0 -> 11.1 necessitates that we do the There was an issue downgrading from 11.0 to 10.2 #6041, though that was using 10.2 binaries for running the ALTER EXTENSION. |
This commit removes downgrades/ folders and merges their contents with their parents.
Downgrade script mechanism is now working fine for quite a while. I think it makes sense to install all the downgrades scripts by default as well.
This change will potentially solve some issues with downgrades such as citusdata/citus_docs#1070 where a user had troubles downgrading because we started to place some of the downgrade scripts in the usual sql directory and hence we are not able to install all downgrade scripts on
make install-downgrades
. This PR solves this issue.Closes citusdata/citus_docs#1070