neondatabase / neon

Neon: Serverless Postgres. We separated storage and compute to offer autoscaling, code-like database branching, and scale to zero.
https://neon.tech
Apache License 2.0
13.7k stars 385 forks source link

Feature request: Support Postgres event triggers #7570

Open danieltprice opened 3 months ago

danieltprice commented 3 months ago

Add support for event triggers to capture DDL events: https://www.postgresql.org/docs/current/event-triggers.html

We currently do not support event triggers due to the superuser requirement.

Related slack thread: https://neondb.slack.com/archives/C03QLRH7PPD/p1710592909306899

User requests: https://discord.com/channels/1176467419317940276/1216517379366846474/1216517382898454639 https://community.neon.tech/t/permission-denied-to-create-event-trigger/443

clarkbw commented 1 month ago

Supported by RDS https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/PostgreSQL.Concepts.General.FeatureSupport.html#PostgreSQL.Concepts.General.FeatureSupport.EventTriggers

clarkbw commented 3 weeks ago

Integration partners need to capture DDL events and use EVENT TRIGGERS to listen for them. Is it possible that, instead of trying to allow for event triggers completely, we offer a specific function to register for DDL events of a table. Partners need the DDL events, not necessarily the event triggers.

ololobus commented 2 weeks ago

Use-case from Readyset https://github.com/readysettech/readyset/blob/7bf77a8558908dab347ffa09130494a9c984c5d5/replicators/src/postgres_connector/ddl_replication.sql#L24-L50