-
Notifications
You must be signed in to change notification settings - Fork 17
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
Post-upgrade things we should include #10
Comments
And yep, this is likely opening a can of worms. 😉 |
Checking back over the older PG 15.x announcements:
So it looks like for upgrades internal to the PG 15.x series, then only the reindex of BRIN indexes is needed. And only if they're indexing NULL values. |
PostgreSQL SQL that returns a list of the BRIN indexes in a given database:
Not (yet) sure if there's a way to figure out whether a BRIN index is indexing NULLs or not. Probably need to investigate that, although BRIN indexes should be pretty fast & cheap to recreate anyway. So we could probably run that once per database, then regenerate the brin indexes for all of the databases on the system. We also need to keep track of what version of PostgreSQL binaries were last being run with, so we know to only do this once upon running PG 15.4 for the first time. I'm not (yet) aware of any existing place that stores this info. The We might need to start storing this data ourselves, either on the filesystem (DATA_DIR/pgautoupgrade/something maybe?), or perhaps in a new If we go with the But, adding that in could also have some downsides. Some software is likely very strongly bound to the database structure, so seeing new schema/structure could muck it up. Probably safer (for now at least) to just create a "pgautoupgrade" directory inside the data directory, and store any persistent info we need there. Can also put upgrade history, error logs, etc there too I guess. |
Looking at the Release Notes for today's PostgreSQL point release, it says people using BRIN indexes may need to run a re-index:
Previous PostgreSQL releases (both major and minor) will probably also have similar things that need doing.
It would make sense for us to try and detect situations where these post-upgrade tasks need doing. At the very least we could attempt to alert the database admin of the need (for their database), though preferably we'd automate the task itself to keep this being "automatic".
The text was updated successfully, but these errors were encountered: