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

Request: Make it possible to disable schema check when connecting to a tenant #481

Open
senny opened this issue Oct 4, 2017 · 1 comment

Comments

@senny
Copy link

senny commented Oct 4, 2017

The current PostgreSQL adapter checks if the schema exists whenever the tenant is changed. Our application connects to a new tenant on every request. While the schema check is usually fast, with a high request throughput it starts to add up. Summed up per day, our database spends a lot of time verifying the same thing over and over again.

We have a fixed list of available tenants. We need to restart anyway when we add a new tenant. At the point where Apartment.tenant_names includes a tenant, we are certain that the schema exists. And if not, it's fine to blow up.

It would be great if there was a possibility to disable this check with a configuration of sorts.

@mikecmpbll
Copy link
Collaborator

i'm in favour of this. there's been a PR for this already (#411) but the implications weren't sufficiently explored imo and not being a pg user myself, i wasn't confident that it wouldn't cause problems.

if you can add to this work to make it configurable, i would be more than happy to merge that.

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