-
Notifications
You must be signed in to change notification settings - Fork 47
spoc-504: 5.x -> 6.x upgrade path and version safety nets #421
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
Open
danolivo
wants to merge
8
commits into
main
Choose a base branch
from
spoc-504
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
64e8b07
patches: expose SpockCorePatchsetVersion from PG core
danolivo 0d1fb65
spock: refuse to load against a mismatched core patchset
danolivo b4e332c
sql: align extension upgrade chain with v5_STABLE
danolivo f04a7f5
spock: add node_version safety net in spock.local_node
danolivo f75142e
spock: model delta-apply columns as SECURITY LABELs
danolivo 69bf1ab
spock: install ProcessUtility shim for 5.x->6.x binary upgrades
danolivo d1c03ab
tests: drive 5.x -> 6.x pg_upgrade via TAP
danolivo 66c2d78
tests: 002_create_subscriber: use sync_event/wait_for_sync_event
danolivo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| Spock core-patchset: export patchset version via miscadmin.h and globals.c. | ||
|
|
||
| Adds SPOCK_CORE_PATCHSET_VERSION (compile-time constant) and | ||
| SpockCorePatchsetVersion (runtime global) to the standard places | ||
| PostgreSQL already uses for server-wide state. No new files. | ||
|
|
||
| --- a/src/include/miscadmin.h | ||
| +++ b/src/include/miscadmin.h | ||
| @@ -498,4 +498,11 @@ | ||
| /* in executor/nodeHash.c */ | ||
| extern size_t get_hash_memory_limit(void); | ||
|
|
||
| +/* | ||
| + * Spock core-patchset identity. Bump the version when the patchset | ||
| + * changes in a way visible to the extension binary. | ||
| + */ | ||
| +#define SPOCK_CORE_PATCHSET_VERSION 1 | ||
| +extern PGDLLIMPORT int SpockCorePatchsetVersion; | ||
| + | ||
| #endif /* MISCADMIN_H */ | ||
| --- a/src/backend/utils/init/globals.c | ||
| +++ b/src/backend/utils/init/globals.c | ||
| @@ -114,6 +114,9 @@ | ||
| bool IsBinaryUpgrade = false; | ||
| bool IsBackgroundWorker = false; | ||
|
|
||
| +/* Spock core-patchset identity. */ | ||
| +int SpockCorePatchsetVersion = SPOCK_CORE_PATCHSET_VERSION; | ||
| + | ||
| bool ExitOnAnyError = false; | ||
|
|
||
| int DateStyle = USE_ISO_DATES; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| Spock core-patchset: export patchset version via miscadmin.h and globals.c. | ||
|
|
||
| Adds SPOCK_CORE_PATCHSET_VERSION (compile-time constant) and | ||
| SpockCorePatchsetVersion (runtime global) to the standard places | ||
| PostgreSQL already uses for server-wide state. No new files. | ||
|
|
||
| --- a/src/include/miscadmin.h | ||
| +++ b/src/include/miscadmin.h | ||
| @@ -510,4 +510,11 @@ | ||
| /* in executor/nodeHash.c */ | ||
| extern size_t get_hash_memory_limit(void); | ||
|
|
||
| +/* | ||
| + * Spock core-patchset identity. Bump the version when the patchset | ||
| + * changes in a way visible to the extension binary. | ||
| + */ | ||
| +#define SPOCK_CORE_PATCHSET_VERSION 1 | ||
| +extern PGDLLIMPORT int SpockCorePatchsetVersion; | ||
| + | ||
| #endif /* MISCADMIN_H */ | ||
| --- a/src/backend/utils/init/globals.c | ||
| +++ b/src/backend/utils/init/globals.c | ||
| @@ -114,6 +114,9 @@ | ||
| bool IsBinaryUpgrade = false; | ||
| bool IsBackgroundWorker = false; | ||
|
|
||
| +/* Spock core-patchset identity. */ | ||
| +int SpockCorePatchsetVersion = SPOCK_CORE_PATCHSET_VERSION; | ||
| + | ||
| bool ExitOnAnyError = false; | ||
|
|
||
| int DateStyle = USE_ISO_DATES; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| Spock core-patchset: export patchset version via miscadmin.h and globals.c. | ||
|
|
||
| Adds SPOCK_CORE_PATCHSET_VERSION (compile-time constant) and | ||
| SpockCorePatchsetVersion (runtime global) to the standard places | ||
| PostgreSQL already uses for server-wide state. No new files. | ||
|
|
||
| --- a/src/include/miscadmin.h | ||
| +++ b/src/include/miscadmin.h | ||
| @@ -525,4 +525,11 @@ | ||
| /* in executor/nodeHash.c */ | ||
| extern size_t get_hash_memory_limit(void); | ||
|
|
||
| +/* | ||
| + * Spock core-patchset identity. Bump the version when the patchset | ||
| + * changes in a way visible to the extension binary. | ||
| + */ | ||
| +#define SPOCK_CORE_PATCHSET_VERSION 1 | ||
| +extern PGDLLIMPORT int SpockCorePatchsetVersion; | ||
| + | ||
| #endif /* MISCADMIN_H */ | ||
| --- a/src/backend/utils/init/globals.c | ||
| +++ b/src/backend/utils/init/globals.c | ||
| @@ -117,6 +117,9 @@ | ||
| bool IsUnderPostmaster = false; | ||
| bool IsBinaryUpgrade = false; | ||
|
|
||
| +/* Spock core-patchset identity. */ | ||
| +int SpockCorePatchsetVersion = SPOCK_CORE_PATCHSET_VERSION; | ||
| + | ||
| bool ExitOnAnyError = false; | ||
|
|
||
| int DateStyle = USE_ISO_DATES; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| Spock core-patchset: export patchset version via miscadmin.h and globals.c. | ||
|
|
||
| Adds SPOCK_CORE_PATCHSET_VERSION (compile-time constant) and | ||
| SpockCorePatchsetVersion (runtime global) to the standard places | ||
| PostgreSQL already uses for server-wide state. No new files. | ||
|
|
||
| --- a/src/include/miscadmin.h | ||
| +++ b/src/include/miscadmin.h | ||
| @@ -540,4 +540,11 @@ | ||
| /* in executor/nodeHash.c */ | ||
| extern size_t get_hash_memory_limit(void); | ||
|
|
||
| +/* | ||
| + * Spock core-patchset identity. Bump the version when the patchset | ||
| + * changes in a way visible to the extension binary. | ||
| + */ | ||
| +#define SPOCK_CORE_PATCHSET_VERSION 1 | ||
| +extern PGDLLIMPORT int SpockCorePatchsetVersion; | ||
| + | ||
| #endif /* MISCADMIN_H */ | ||
| --- a/src/backend/utils/init/globals.c | ||
| +++ b/src/backend/utils/init/globals.c | ||
| @@ -120,6 +120,9 @@ | ||
| bool IsUnderPostmaster = false; | ||
| bool IsBinaryUpgrade = false; | ||
|
|
||
| +/* Spock core-patchset identity. */ | ||
| +int SpockCorePatchsetVersion = SPOCK_CORE_PATCHSET_VERSION; | ||
| + | ||
| bool ExitOnAnyError = false; | ||
|
|
||
| int DateStyle = USE_ISO_DATES; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.