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

feat: Enable event triggers in single user mode #266

Merged
merged 6 commits into from
Aug 27, 2024

Conversation

msfstef
Copy link
Collaborator

@msfstef msfstef commented Aug 26, 2024

Addresses #258

In regular postgres, event triggers are disabled in single user mode as per the docs:

Event triggers are disabled in single-user mode (see postgres). If an erroneous event trigger disables the database so much that you can't even drop the trigger, restart in single-user mode and you'll be able to do that.

I've patched event_triggers.c to skip the check in order to enable them in single user mode and thus PGlite. I'm not sure what "layer" the patch belongs to @pmp-p would love your input.

I've also added a test suite for the event triggers, and did a little bit of cleanup on the build scripts since I encountered some issues while working on this.

@msfstef msfstef requested review from samwillis and pmp-p August 26, 2024 15:02
@msfstef msfstef linked an issue Aug 26, 2024 that may be closed by this pull request
Copy link
Contributor

@msfstef
Copy link
Collaborator Author

msfstef commented Aug 27, 2024

Merging this but @samwillis please do have a look when you're back from holiday to check this is the right approach as well.

@msfstef msfstef merged commit 0dc34af into main Aug 27, 2024
7 checks passed
@msfstef msfstef deleted the msfste/event-triggers-not-firing branch August 27, 2024 11:01
@jamesgpearce
Copy link
Contributor

Amazing! Let me take it for a spin.

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

Successfully merging this pull request may close these issues.

Event triggers not firing
2 participants