Skip to content
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

Epic: Extension Upgrades #6936

Open
skyzh opened this issue Feb 27, 2024 · 5 comments
Open

Epic: Extension Upgrades #6936

skyzh opened this issue Feb 27, 2024 · 5 comments
Labels
c/compute Component: compute, excluding postgres itself f/extensions Feature: extentions t/Epic Issue type: Epic

Comments

@skyzh
Copy link
Member

skyzh commented Feb 27, 2024

Motivation

The deployment cannot be rolled back if we upgrade the neon pg extension or any other 3rd party extensions. We need a solution for that. Keeping it for the record there and update the details of this epic later.

https://neondb.slack.com/archives/C04DGM6SMTM/p1709042818937799

DoD

Implementation ideas

Tasks

Tasks

No tasks being tracked yet.

Other related tasks and Epics

@skyzh skyzh added t/Epic Issue type: Epic c/compute Component: compute, excluding postgres itself labels Feb 27, 2024
@skyzh
Copy link
Member Author

skyzh commented Mar 5, 2024

also some problems with read/write replica with different compute node versions

@skyzh
Copy link
Member Author

skyzh commented Mar 8, 2024

#7066

@skyzh
Copy link
Member Author

skyzh commented Mar 8, 2024

A viable solution is to put 3rd-party extensions in a bucket, and for neon extensions, always provide a downgrade script.

remote_extension_bucket
  compute-version-4000
    pg-someext1
    pg-someext2
  compute-version-4001
    pg-someext1
    pg-someext2

the extension build process should be decoupled from compute node builds. therefore, when we add a new extension, we should built them against all available versions of compute node.

remote_extension_bucket
  compute-version-4000
    pg-someext1
    pg-someext2
    pg-someext3 <- added extension, also build it for previous versions
  compute-version-4001 <- current latest version
    pg-someext1
    pg-someext2
    pg-someext3 <- added extension

@lubennikovaav
Copy link
Contributor

@skyzh. fyi we already have part of this mechanism
https://github.com/neondatabase/build-custom-extensions

there is no support for different versions of the same extension, yet.
and the spec is now not added into compute, it must be set manually in user settings

@lubennikovaav
Copy link
Contributor

Situation with 3rd party extensions is less dramatic than with neon, because most likely users don't perform
ALTER EXTENSION UPDATE too often. And when they do, it will be "user-space" error, not stuck compute.

Of course this is still a potential issue and we need to fix it properly.

skyzh added a commit that referenced this issue Mar 14, 2024
This pull request disables neon extension auto upgrade to help the next
compute image upgrade smooth.

## Summary of changes

We have two places to auto-upgrade neon extension: during compute spec
update, and when the compute node starts. The compute spec update logic
is always there, and the compute node start logic is added in
#7029. In this pull request, we
disable both of them, so that we can still roll back to an older version
of compute before figuring out the best way of extension
upgrade-downgrade. #6936

We will enable auto-upgrade in the next release following this release.

There are no other extension upgrades from release 4917 and therefore
after this pull request, it would be safe to revert to release 4917.

Impact:

* Project created after unpinning the compute image -> if we need to
roll back, **they will stuck**, because the default neon extension
version is 1.3. Need to manually pin the compute image version if such
things happen.
* Projects already stuck on staging due to not downgradeable -> I don't
know their current status, maybe they are already running the latest
compute image?
* Other projects -> can be rolled back to release 4917.

Signed-off-by: Alex Chi Z <chi@neon.tech>
@stepashka stepashka added the f/extensions Feature: extentions label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/compute Component: compute, excluding postgres itself f/extensions Feature: extentions t/Epic Issue type: Epic
Projects
None yet
Development

No branches or pull requests

3 participants