-
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
base: main
Are you sure you want to change the base?
Changes from all commits
7fbbbe4
f8b9065
770aaed
195bf12
d102443
58ed81a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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; |
| 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 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it is smart idea in general. It does replace one patch with another though (but smaller). I am thinking one day we could have a spock-lite with reduced functionality that would work with plain Postgres. I will think about this some more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mason-sharp , |
||
| +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; | ||
| 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; |
| 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; |
Uh oh!
There was an error while loading. Please reload this page.