Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Inquery (YC W23) – Real-time events for Postgres (github.com/inqueryio)
23 points by mitchpatin on Feb 16, 2023 | hide | past | favorite | 15 comments
Hi HN, we're excited to share our open source tool with the community!

Inquery is a utility for Postgres that triggers webhooks when rows are inserted, updated, or deleted. It uses database triggers that send low-latency websocket messages to a Go application. This application then calls any configured webhooks with a JSON payload that includes specified values from the database row.

Let us know if you have any feedback or questions!




Pretty cool! Any plans for a cloud version? If so, what would be the pricing model?


Thanks! We've discussed offering a cloud version at some point; however, we're initially focused on the self-hosted version.

Regarding the cloud option, we'd likely take a usage-based approach to pricing. Not sure if that would be based on number of events, actions, or some combination of the two. When we do offer this, we'll make sure that the free tier is generous and easy for small projects to use without worrying about paying.


Supabase said 8k payload limit of listen/ notify is deal breaker for them so they had to start own websocket based realtime engine by watching oplog. How would you handle that?


We're working on and looking into a few different solutions right now:

1. Split the payload into chunks of 8k bytes and send them as separate messages to the server (in progress, will be released in the next few days).

2. Use a new table as an event queue where the trigger will write data and our server will consume it. We do want to incorporate an event queue soon so this approach would solve for that as long as users are ok with the system writing to a new table.

3. Use one of the Postgres logs to stream events instead of LISTEN/NOTIFY.

Let me know if you have thoughts on any of these approaches!


What are the specific requirements postgres must soppprt? Any extensions or pl language support needed?


No extensions are required since we're using LISTEN/NOTIFY in the triggers! We haven't tested full backwards compatibility with older versions but are planning on doing that soon.


This is exactly what I was looking for. Can you add it to Supabase please?


{disclosure - supabase employee}

hopefully this isn't detracting too much from Inquery's product, which looks great, but I thought it's worth flagging - https://supabase.com/docs/guides/database/webhooks


Not at all detracting - we're big fans of Supabase! We're taking a bit of a different approach by trying to bring tools to existing databases (like those hosted in RDS) as opposed to the full platform approach.

We played around with Database Webhooks in Supabase and really liked the experience!


I completely agree with your approach - it's something missing in RDS.

Feel free to reach out if there's anything we can help with


Yeah, we already use this feature in Supabase, works great!


Are you using NOTIFY? If so, how do you handle the limit of 8000 bytes?


Yes and great question, right now we are limited to 8000 bytes but are working on an update to handle large payloads via chunking—stay tuned!


can you elaborate on how this would work?


The trigger will break the message out into chunks of <8k bytes and send them as separate messages with a unique ID and then an EOF once the message is complete. Planning on releasing this change in the next few days.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: