hasura / hasura/graphql-engine
Dropping inconsistent event trigger metadata does not remove underlying postgres triggers
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Server Version: 2.12.0
### Environment
OSS
### What is the current behaviour?
When dropping inconsistent metadata that includes event trigger metadata, the underlying postgres triggers are not deleted.
This is a problem as these triggers will continue to create events in the `hdb_catalog.event_log` table, leading to bloat over time.
### What is the expected behaviour?
Removing event trigger metadata should remote the underlying postgres triggers
### How to reproduce the issue?
1. Create an event trigger that references an environment variable for the URL
2. Remove the environment variable and restart the instance, metadata is now inconsistent
3. From the console, drop the inconsistent metadata
4. Check the database, the underlying postgres triggers still exist
Contributor guide
Research direction
The issue names no files, tests, or entry points. Reproduce the inconsistent event-trigger cleanup flow described in the steps, inspect the metadata-removal path and the PostgreSQL trigger state, and verify that dropping inconsistent event-trigger metadata also removes its underlying triggers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, typescript
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100