Closed williamge closed 4 months ago
Something changed in how PostgreSQL 16.2 treats injected values in a union. This is fixed with explicit casting for all union queries in main, and we'll backport to v1.4
Glad to hear it's been fixed, and likely the whole thing will be improved in 1.5 👍 .
Is there a rough timeline on a 1.4 backport? I've been able to work around this for now, but it's been a tricky issue with batch workers in our dev environment.
@williamge We'll have a new v1.5.0 RC and a v1.4 patch released this week.
:) awesome thanks a lot!
Precheck
Environment
elixir --version
)Current Behavior
Inserting a batch worker after upgrading to Aurora PSQL 16.2 causes the job to be stuck in "executing" for a prolonged period of time, never completing or failing, and eventually getting stuck in the "scheduled" state. No errors are recorded for the job, the attempt is shown as attempt 1 of 5.
Additionally, after inserting the batch worker, other jobs (non-batch) in that queue will also get stuck in the "available" state, never actually executing.
When looking at error logs, we see repeated instances of the same error:
This is a very similar error as this previous post in the Elixir/Oban forums: https://elixirforum.com/t/error-when-enqueuing-oban-jobs-with-unicity-constraint-on-aurora-postgresql-16-1-postgrex-error-error-42p18-indeterminate-datatype-could-not-determine-data-type-of-parameter-7/63996
We previously experienced that other bug after this 14->16 upgrade, raising the error immediately while inserting those jobs. That issue was resolved after the Oban Pro update to 1.4.10, but this issue has popped up after that update separately, and seems to happen in the background.
Expected Behavior
Inserting a batch worker should work, the worker should execute, the queue it was in should not form a logjam, and no errors from Oban internals should be thrown.