-
Notifications
You must be signed in to change notification settings - Fork 155
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
Postgres 16 client support with wolfi-base #1898
Comments
@jasaltvik I'm experiencing a similar issue, but I'm trying to create a minimal postgres image to run as a server to reproduce without all of our extra "fluff" I'm struggling to get it to throw this error for some reason (e.g. basic postgres image with just a single username/password set up). Are you able to share how you are running your postgres server? Is it just a simple docker setup or something similar? |
Digging into this we found an issue with the way We're fixing that regardless, but if you have an easy repro, I am curious whether installing |
@mattmoor I was able to find out that it has to do with TLS/SSL being enabled on the server. I've been going back and forth in a ticket (but did eventually end up in this issue after hours of trying to figure out specific server config was causing the issue lol) and did find a way to reproduce it. Installing that package specifically doesn't seem to help. I'll post the steps here as well for anyone that needs it. To start, you have to generate a certificate and key and then set the permissions for the postgres user in the container.
Then you can use this compose file to launch postgres using that cert/key and with TLS enabled. The chainguard postgres image can work as the server here, but it has some issues after the first login (likely due to the same issue, it will go into recovery mode due to some tls issue), so just use the docker hub one. services:
postgres:
container_name: postgres
image: postgres:15.5-alpine
command: -c ssl=on -c ssl_cert_file=/cert.pem -c ssl_key_file=/key.pem
ports:
- "5432:5432"
volumes:
- ./server.crt:/cert.pem
- ./server.key:/key.pem
environment:
- POSTGRES_USER=sensify
- POSTGRES_PASSWORD=password Even when installing that package you mentioned explicitly it seems to still be an issue
|
@camden-xage One of the other things I noticed diffing the good/bad digests you shared is that the one meaningful dependency change (other than epoch bumps) was openssl went from 3.1 to 3.2, so I am curious (given that this relates to crypto) whether you've tried pinning / downgrading to openssl 3.1? |
This seems very similar to the issue here (h/t Natacha for the pointer): Homebrew/homebrew-core#155651 |
Yeah, so it definitely seems like Postgres needs a patch to work properly with openssl 3.2. Thanks for the super detailed repro case above, I'll work with the folks on our side to reproduce this, confirm a fix, and get it turned into a test case for this particular code path. 🙏 |
@mattmoor Downgrading everything to 3.1 works
|
Awesome. Seems like we have our smoking gun. Will sync up with our folks tomorrow to get the postgres patch in place, and the above turned into a test case 🤞 |
@camden-xage / @mattmoor Thanks guys! Nice catch with the openssl upgrade. @camden-xage I guess this is not very relevant anymore, but the client was used to connect to a Azure Database for PostgreSQL flexible server. |
hey folks, I believe the pieces are in place now to close this. since opening, we have:
as the ticket is written (1) should be sufficient. @jasaltvik can you verify and close if so? if not please lmk what else we need 🙏 |
@joshrwolf Sorry for the late reply. Just verified that the client works now, thanks! |
Which image/versions are related to this issue/feature request?
The latest
postgres
image (ish)Issue/Feature description
Hi,
I used the postgres image as inspiration to create a really simple Postgres 15 client image like this
It's just used as a way for devs to spin up a container that can be used to connect to a Postgres server, and has been working fine.
Then Postgres 16 was released, and I thought I would try to upgrade the client image to 16 as well
RUN apk update && apk add --no-cache --update-cache glibc-locale-en busybox su-exec bash postgresql-16-client libpq-16
This works, but when connecting to the server I get
I've not been able to understand the cause of this. Do you have any input on what could be missing to make it work with Postgres 16?
If this issue doesn't belong here, feel free to close it.
Thanks in advance.
The text was updated successfully, but these errors were encountered: