[{"age":{"milliseconds":8.345},"pid":14504,"query":"SELECT * FROM \"users_select_or_insert\"($1,$2,$3,$4,$5,$6);","state":"active","client":"172.18.0.2:54772","usename":"postgres"},{"age":{"milliseconds":6.205},"pid":14515,"query":"-- BLOCK set_session\nINSERT INTO\n  user_sessions (session_id, user_id, data, updated_at, expires_at)\nVALUES\n  (\n    $1,\n    $2,\n    $3::jsonb,\n    now(),\n    $4\n  )\nON CONFLICT (session_id) DO UPDATE\nSET\n  user_id = $2,\n  data = $3::jsonb,\n  updated_at = now(),\n  expires_at = $4;\n","state":"active","client":"172.18.0.2:54884","usename":"postgres"},{"age":{"milliseconds":3.09},"pid":14513,"query":"SELECT * FROM \"users_select_or_insert\"($1,$2,$3,$4,$5,$6);","state":"active","client":"172.18.0.2:54868","usename":"postgres"},{"age":{"milliseconds":2.086},"pid":14529,"query":"SELECT\n  pid,\n  age (clock_timestamp(), query_start),\n  usename,\n  host(client_addr) || ':' || client_port AS client,\n  state,\n  query\nFROM\n  pg_stat_activity\nWHERE\n  state != 'idle'\nORDER BY\n  age DESC;\n","state":"active","client":"172.18.0.2:55012","usename":"postgres"},{"age":{"milliseconds":0.397},"pid":14436,"query":"-- BLOCK select_active_prairietest_reservation\nWITH\n  active_reservations AS (\n    SELECT\n      r.session_id,\n      -- We consider a session to be \"active\" if either of the following is true:\n      (\n        -- The reservation is checked in but hasn't had their access start yet.\n        -- We'll consider the reservation active for the first hour after check-in.\n        r.checked_in IS NOT NULL\n        AND r.access_start IS NULL\n        AND r.access_end IS NULL\n        AND $1 BETWEEN r.checked_in AND r.checked_in  + '1 hour'::interval\n      )\n      OR (\n        -- The reservation has had their access start at some point, and the current\n        -- time is within the access window.\n        r.access_start IS NOT NULL\n        AND $1 >= r.access_start\n        AND (\n          r.access_end IS NULL\n          OR $1 < r.access_end\n        )\n      ) AS reservation_active,\n      (\n        -- PrairieTest accepts reports only while access is open.\n        r.access_start IS NOT NULL\n        AND $1 >= r.access_start\n       ","state":"active","client":"172.18.0.2:59580","usename":"postgres"}]