You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pg_stat_activity shows previous query within transaction. Actual (hanged) query is insert to different table. We exec query INSERT INTO changelog, search_path is configured via connection string.
datid,datname,pid,leader_pid,usesysid,usename,application_name,client_addr,client_hostname,client_port,backend_start,xact_start,query_start,state_change,wait_event_type,wait_event,state,backend_xid,backend_xmin,query_id,query,backend_type
17747,example,380476,,16391,username,"",172.22.254.100,,56947,2024-09-04 10:30:22.571011+03,2024-09-04 10:30:37.258628+03,2024-09-04 10:30:37.264224+03,2024-09-04 10:30:37.26514+03,Client,ClientRead,idle in transaction,2363397245,,-8112338289380391596,"UPDATE example_schema.customers SET name = 'User Name'",client backend
I recently switched a service to pgx from lib/pq because of a suspiciously similar issue. I'm only able to reproduce it by hammering my service with a large number of requests. A connection which is idle in transaction according to Postgres will, on the client side, still be waiting for data. This stack trace is from lib/pq; the same conditions do not produce this condition using pgx, but the issue is similar enough that I thought I'd add this here.
Query execution stuck until idle-in-transaction timeout is reached and application receives error
Library stack trace:
pg_stat_activity shows previous query within transaction. Actual (hanged) query is insert to different table. We exec query
INSERT INTO changelog
, search_path is configured via connection string.pg_locks
Version
The text was updated successfully, but these errors were encountered: