Thread

  1. Re: bug reapper: Empty query_id in pg_stat_activity

    Greg Sabino Mullane <htamfids@gmail.com> — 2025-08-28T12:42:32Z

    On Thu, Aug 28, 2025 at 8:25 AM Srinath Reddy Sadipiralla <
    srinath2133@gmail.com> wrote:
    
    > The fix I tried is to retain the previous query_id (prev_st_query_id) and
    > return it when st_query_id is still 0 but query_id computation is enabled,
    > thoughts?
    >
    
    This just moves the race condition around a little - you can end up with a
    query that does not agree with its query_id.
    
    
    Cheers,
    Greg
    
    --
    Crunchy Data - https://www.crunchydata.com
    Enterprise Postgres Software Products & Tech Support