question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Connection methods does not accept classic nor unusual arguments supported in other pgsql connection solution

See original GitHub issue

Hello,

While trying to configure a Cockroach DB cluster async connection, there seems to be missing support for usual PostgreSQL parameters (or renamed) or supported options not frequently used.

I don’t know why the connection part does not seems to follow other library but it would be nice to at least support all options existing in postgresql client (even renamed ^^).

For example, the part I am missing to connect is options keyword. It is used to provide complementary informations on the connection (in my case a cluster id to identify exact connection). Guess it is not mandatory by itself but it fells strange to have the issue only on asyncpg 😕

  • asyncpg version: Version: 0.26.0
  • PostgreSQL version:
  • Do you use a PostgreSQL SaaS? If so, which? Can you reproduce the issue with a local PostgreSQL install?: Cockroach Cloud
  • Python version: 3.10.7 (venv)
  • Platform: Linux (Docker VSCode python dev container)
  • Do you use pgbouncer?: No
  • Did you install asyncpg with pip?: Yes (using setuptools)
  • If you built asyncpg locally, which version of Cython did you use?:
  • Can the issue be reproduced under both asyncio and uvloop?:

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
elpranscommented, Nov 30, 2022

server_settings={"cluster": "XXXX"} should work. If it doesn’t I’d ask on the CockroachDB tracker.

1reaction
elpranscommented, Nov 25, 2022

asyncpg is largely compatible with libpq conventions. Can you be more specific?

or example, the part I am missing to connect is options keyword.

asyncpg calls this server_settings

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · MagicStack/asyncpg - GitHub
Connection methods does not accept classic nor unusual arguments supported in other pgsql connection solution. #979 opened 18 days ago by titouanfreville.
Read more >
34.1. Database Connection Control Functions - PostgreSQL
It accepts connection parameters identical to those of PQconnectdb , described above. It is not necessary to supply correct user name, password, or...
Read more >
Unable to connect to Postgres DB due to the authentication ...
In my case, the only way to solve this problem in a Docker image was to downgrade Postgres version, as per my colleague's...
Read more >
How to Secure PostgreSQL: Security Hardening Best ... - EDB
Learn how to secure your PostgreSQL database. Guide for PostgreSQL security hardening best practices. Get tips about securing PostgreSQL ...
Read more >
SQL Injection Cheat Sheet - Invicti
PHP – MySQL doesn't support stacked queries, Java doesn't support stacked queries (I'm sure for ORACLE, not quite sure about other databases). Normally...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found