-
-
Notifications
You must be signed in to change notification settings - Fork 571
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
Server crashes when watch is used by non-super user #368
Comments
Only super users can create event triggers which is what we need for watch mode: https://www.postgresql.org/docs/9.6/static/sql-createeventtrigger.html If you don’t want to run PostGraphQL as a superuser and development, but still want watch mode just run this SQL file: https://github.com/calebmer/postgraphql/blob/master/resources/watch-fixtures.sql But yes, we definitely should not crash if we fail to run the fixtures. I’m not entirely sure what is causing this. I opened a PR with my initial thoughts on how to fix it (#369), but then I remembered that the watch fixtures are run in a transaction already: https://github.com/calebmer/postgraphql/blob/master/resources/watch-fixtures.sql Is your code automatically running SQL commands in a transaction? |
Not that I know of, I just used PostGraphQL as a library and set it up to another path. I noticed another thing. I tried running the I mention this, because it might be relevant to check the display the error message to the user.
This does not work, as it still crashes, even if the trigger already exists. |
This should fix it, I’ll try to get it in a release soon: #371 |
Hi,
when running PostGraphQL with
pgWatch
enabled, but without access to a super user, the server will not start and crash instead.My guess is that there is automatic rollback missing.
Related question: which permissions are required to this to work?
The text was updated successfully, but these errors were encountered: