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

Provide image for v17 #48

Merged
merged 3 commits into from
Sep 30, 2024
Merged

Provide image for v17 #48

merged 3 commits into from
Sep 30, 2024

Conversation

andyundso
Copy link
Member

@andyundso andyundso commented Sep 27, 2024

This PR provides a new image for Postgres v17.

@justinclift from what I've seen in the code, we actually do not have to provide a new build-17 build stage, since we only need to compile Postgres when upgrading from that version. Since we do not need to upgrade from v17 at the moment, this is not needed.

Closes #47.

Comment on lines +510 to +519
# LC_COLLATE and LC_TYPE have been removed with PG v16
# https://www.postgresql.org/docs/release/16.0/
if [ "${PGVER}" -lt 16 ]; then
COLLATE=$(echo 'SHOW LC_COLLATE' | "${OLDPATH}/bin/postgres" --single -D "${OLD}" "${POSTGRES_DB}" | grep 'lc_collate = "' | cut -d '"' -f 2)
CTYPE=$(echo 'SHOW LC_CTYPE' | "${OLDPATH}/bin/postgres" --single -D "${OLD}" "${POSTGRES_DB}" | grep 'lc_ctype = "' | cut -d '"' -f 2)

POSTGRES_INITDB_ARGS="--locale=${COLLATE} --lc-collate=${COLLATE} --lc-ctype=${CTYPE} --encoding=${ENCODING}"
else
POSTGRES_INITDB_ARGS="--encoding=${ENCODING}"
fi
Copy link
Member Author

Choose a reason for hiding this comment

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

not sure if there are any consequences when leaving out --lc-collate when booting a Postgres v16 database ...

Copy link
Member

Choose a reason for hiding this comment

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

Good catch. I guess we'll find out, though no-one's raised any issues yet and it's been about a year. 😬

@@ -0,0 +1,58 @@
version: "2.1"
x-redash-service: &redash-service
image: redash/redash:10.1.0.b50633
Copy link
Member Author

Choose a reason for hiding this comment

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

on another note: do we want to update this version at some point?

Copy link
Member

@justinclift justinclift Sep 30, 2024

Choose a reason for hiding this comment

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

We will at some point, but there hasn't been a new official Redash release since. We (the Redash team) are getting close to that happening, but there's a final major bug being worked on currently. 😄

@dillfrescott
Copy link

This works great, just used this PR to upgrade a db from 16 to 17 and it worked well.

@justinclift justinclift self-assigned this Sep 30, 2024
Copy link
Member

@justinclift justinclift left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for getting this done @andyundso. 😄

@justinclift justinclift merged commit 10a4664 into main Sep 30, 2024
26 checks passed
@justinclift justinclift deleted the pg-17 branch September 30, 2024 05:24
andyundso added a commit that referenced this pull request Sep 30, 2024
Missed this with #48.
@andyundso andyundso mentioned this pull request Sep 30, 2024
justinclift pushed a commit that referenced this pull request Sep 30, 2024
Missed this with #48.
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.

PostgreSQL 17 released
3 participants