Open dhiaayachi opened 2 months ago
Thank you for reporting this issue. It appears that you're running into a compatibility issue between Temporal, PgBouncer, and the pq
driver when using JSONB fields in your visibility store.
We are aware of this issue and are currently investigating it. In the meantime, here are a couple of possible workarounds that you can try:
pq
driver, consider exploring alternative PostgreSQL drivers for your application, such as pgx. This might provide a workaround or offer better compatibility.It's important to note that these workarounds may not be suitable for every situation. If you continue to experience issues, please provide more information about your configuration, and the specific error messages you receive. We're ready to help you investigate and resolve this problem.
Expected Behavior
Log behavior:
temporal-history
visibility queue processor can process JSONB fields. UI behavior: Actually completed workflows are shown as Completed in both the workflow list and details UIs.Actual Behavior
Logged behavior:
temporal-history
visibility queue processor apparently fails to read rows containing JSONB fields, failing with the error:pq: unsupported jsonb version number 123
.In my limited spot checking, Temporal appears otherwise functional. Hello world and more realistic workflows complete as expected.
Logging example:
UI behavior: Actually completed workflows are shown as Running in the workflow list UI, but Completed in the details UI. I do not believe the root cause is related to https://github.com/temporalio/temporal/issues/888
Steps to Reproduce the Problem
Specifications
1.20.0
2.13.1
1.2
Linux xxxx 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
PostgreSQL 14.5 (Ubuntu 14.5-2.pgdg22.04+2) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0, 64-bit
persistence.datastores.postgres-{default,visibility}.sql.connectAttributes.binary_parameters = yes
in order to run in transaction pooling mode. I'm runningPgBouncer 1.17.0
TL;DR
The combination of Temporal
1.20.0+
, visibility schema version1.2+
, pgbouncer run in transaction pooling mode, and temporal configured to use postgres with thebinary_parameters
flag set is apparently causingtemporal-history
to fail reading rows within the visibility queue processor. This somehow prevents the web UI from updating rows in the workflow list with the latest execution status.Context
pq
: https://github.com/lib/pq/issues/528