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

target_session_attrs=read-only is only supported on libpq >= 14 #3699

Open
steve-chavez opened this issue Aug 21, 2024 · 1 comment
Open
Labels
docs Only related to documentation

Comments

@steve-chavez
Copy link
Member

steve-chavez commented Aug 21, 2024

Problem

The docs instruct to add target_session_attrs=read-only to the db-uri, but this will fail on an instance with libpq < 14:

"Failed to query the role settings. {"code":"PGRST000","details":"invalid target_session_attrs value: \"read-only\"\n","hint":null,"message":"Database connection error. Retrying the connection."}"

(uses the ubuntu-aarch64 release)

This happens because target_session_attrs only accepts read-only starting from libpq 14. target_session_attrs only supports read-write on libpq13, see https://www.postgresql.org/docs/13/libpq-connect.html#LIBPQ-CONNECT-TARGET-SESSION-ATTRS.

Solution

Warn about this limitation on the docs.

@steve-chavez

This comment was marked as outdated.

@steve-chavez steve-chavez changed the title libpq >= 14 is required since PostgREST v12.2.0 target_session_attrs=read-only is only supported on libpq >= 14 Aug 21, 2024
@wolfgangwalther wolfgangwalther added docs Only related to documentation and removed bug labels Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Only related to documentation
Development

No branches or pull requests

2 participants