Statement-level history tracking #158
wesleykendall
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm considering support for conditional statement-level triggers in pgtrigger. While this isn't a native feature of Postgres triggers, there are ways to still support it.
If supported, this would allow pghistory triggers to be statement-level, meaning there would be one bulk history event insertion instead of N happening for each row in a bulk insert or create. This could be a substantial performance boost for those tracking history across bulk inserts/upserts/deletes.
Let me know what you think. I'm aiming to incorporate this without breaking the main interface. Just toggle a flag in
pghistory.track
or a setting, and all triggers will be migrated to statement-level triggersBeta Was this translation helpful? Give feedback.
All reactions