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

Error with Postgresql Engine row is too big: size 8480, maximum size 8160 #13388

Open
ichasco-heytrade opened this issue Dec 10, 2021 · 3 comments

Comments

@ichasco-heytrade
Copy link

I have had errors in postgresql when lots of roles are created. The error:

row is too big: size 8480, maximum size 8160

This is because the limitation of granting permissions to a role. The best way to do this is not to gran all permissions to the dynamic role. I better to create a "generic" role and then grant the "generic" role to created role:
https://stackoverflow.com/questions/57087519/row-is-too-big-maximum-size-8160-when-running-grant-connect-on-database

Steps:

Create generic role:

CREATE ROLE "generic-role";
ALTER ROLE "generic-role" NOLOGIN;
GRANT ALL PRIVILEGES ON DATABASE database TO "generic-role";

Vault creation statement:

CREATE ROLE \"{{name}}\" WITH LOGIN PASSWORD '{{password}}' VALID UNTIL '{{expiration}}' NOCREATEDB NOCREATEROLE NOSUPERUSER;
GRANT generic-role to \"{{name}}\";

With this it will work better.

@kalafut
Copy link
Contributor

kalafut commented Dec 10, 2021

Thanks for highlighting this. Maybe a good start could be to update the PostgreSQL secrets engine docs to highlight the limitation and provide the workaround?

@ichasco-heytrade
Copy link
Author

Hi @kalafut, I'm not DBA so I don't know if my solution is the best.. This is the workaround I have used. If anyone who knows more about this can confirm the solution, it will be perfect :)

@epinzur
Copy link

epinzur commented Aug 31, 2022

I just ran into this issue... is there any work-around for a database already returning this?

I no longer have any access to credentails outside what vault creates dynamically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants