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

Missing documentation for Pool #318

Open
bryanoltman opened this issue Apr 2, 2024 · 4 comments
Open

Missing documentation for Pool #318

bryanoltman opened this issue Apr 2, 2024 · 4 comments

Comments

@bryanoltman
Copy link

I am migrating my app away from the discontinued postgres_pool. The documentation for this package says that pooling is supported, but there is no documentation that the Pool class exists or how to use it. Reading through the doc comments has helped, but it's still not clear what reasonable/correct use of "locality" is.

@isoos
Copy link
Owner

isoos commented Apr 2, 2024

@bryanoltman: locality is useful if you have (1) a sharded (e.g. multiple database instances), (2) a distributed (e.g. cockroachdb) database system or (3) custom fallback rules for connecting to a read-only replica. I don't have a public implementation for any of the use cases yet, and if you don't have these use-cases, you can safely ignore it.

If you have any of these, I'm happy to take PRs that create public implementation for these.

@bryanoltman
Copy link
Author

I don't – I'm not totally sure what that would look like, to be honest. I've been using Pool<void> to silence the analyzer warnings, but I'm not positive this is correct.

@isoos
Copy link
Owner

isoos commented Apr 2, 2024

@bryanoltman: yeah, that is fine.

@bryanoltman
Copy link
Author

Good to know. I think updating the readme to include a code snippet under the Connection pooling header would be useful.

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

No branches or pull requests

2 participants