Postgrex error handling - what to do?

18 views
Skip to first unread message

Vaughn Micciche

unread,
Aug 26, 2025, 12:49:26 PMAug 26
to elixir-ecto
Hello World -- 

I apologize if this is the wrong forum for such questions -- happy to take it to the right place if not...

Started testing the use of a new DB from amazon that auto-scales and was built using postgres... (it also autoscales to zero which is nice) 

One of the aspects that is odd about this DB is that it only allows one DDL or DML statement per transaction.  Our migrations were violating this caveat and failing with no good message because the DB was trying to call an error message function within Postgrex that didn't exist in that context.. 

We forked postgrex and made changes to catch the messages, and could then work past the DDL/DML transaction issues.  

Maybe of note that even when using postgres db, we are seeing our new error messages when there was an unsupported operation or unsupported feature utilized in a sql statement










Greg Rychlewski

unread,
Oct 14, 2025, 7:53:42 AM (yesterday) Oct 14
to elixir-ecto
Hi,

Are you able to link to your fork? Thanks.

Vaughn Micciche

unread,
Oct 14, 2025, 11:12:37 AM (yesterday) Oct 14
to elixi...@googlegroups.com
https://github.com/Wepinion/postgrex/tree/aurora-dsql

all developed with claude -- so lots of commits --   basically DB was sending messages that postgrex wasn't expecting at that time and that was failing without transferring the message ... have experienced the same with postgres itself... caused a lot of confusing when we were first trying to get started with amazon aurora dsql 







--
You received this message because you are subscribed to a topic in the Google Groups "elixir-ecto" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elixir-ecto/QaG4DtEWCVA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elixir-ecto...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/elixir-ecto/4f80f70f-866b-4b31-a0d0-0315d48b2107n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages