Skip to content

Conversation

@FxKu
Copy link
Member

@FxKu FxKu commented Mar 9, 2020

Changing the Postgres version can currently break the cluster. It is caught on Update but not on Sync.

Retrieving the current PG version on sync is only possible through the bin_dir setting in the SPILO_CONFIGURATION env variable of the postgres container. Extracting the version is done with Sscanf to make it work even when the bin path template is configurable, as suggested in #554.

This PR also adds PostgresParam where PgVersion field is read

@FxKu FxKu force-pushed the version-change-error branch from 5e486b7 to 9668d27 Compare March 9, 2020 17:12
@FxKu FxKu changed the title log error on version update earlier omit PgVersion diff on sync Mar 9, 2020
@FxKu FxKu added this to the 1.5 milestone Mar 9, 2020
}

func extractPgVersionFromBinPath(binPath string, template string) (string, error) {
var pgVersion float32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be just an integer?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when there can be 9.6?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, forgot that for a couple of years it still would be a thing.

@FxKu
Copy link
Member Author

FxKu commented Mar 13, 2020

👍

1 similar comment
@erthalion
Copy link
Contributor

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants