{
  "db_name": "PostgreSQL",
  "query": "SELECT\n             (SELECT COALESCE(SUM(bytes), 0) FROM workspace_storage_usage WHERE workspace_id = $1)::bigint as \"committed!\",\n             COALESCE(\n               (SELECT MIN(computed_at) FROM workspace_storage_usage WHERE workspace_id = $1) < now() - interval '10 minutes',\n               true) as \"stale!\",\n             (SELECT COALESCE(SUM(GREATEST(t.total - t.existing, 0)), 0)\n                FROM (SELECT SUM(part_bytes) as total, MAX(target_existing_size) as existing\n                        FROM workspace_multipart_inflight\n                        WHERE workspace_id = $1 AND created_at > now() - ($2::text)::interval\n                          AND ($3::text IS NULL OR upload_id <> $3)\n                        GROUP BY upload_id) t)::bigint as \"reserved!\"",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "committed!",
        "type_info": "Int8"
      },
      {
        "ordinal": 1,
        "name": "stale!",
        "type_info": "Bool"
      },
      {
        "ordinal": 2,
        "name": "reserved!",
        "type_info": "Int8"
      }
    ],
    "parameters": {
      "Left": [
        "Text",
        "Text",
        "Text"
      ]
    },
    "nullable": [
      null,
      null,
      null
    ]
  },
  "hash": "d4923137cf9b6bf06e0e21ba907e7c80dd0ef92d78224792bec4c3323e14023c"
}
