Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?

From: Julien Rouhaud <julien(dot)rouhaud(at)free(dot)fr>
To: Evgeny Efimkin <efimkin(at)yandex-team(dot)ru>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?
Date: 2019-07-31 21:51:40
Message-ID: CAOBaU_YEgEiTuQr8O32TqxdoA+mM=owXKe2P1eKM_5XssR1_FQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

On Wed, Jul 31, 2019 at 10:55 AM Evgeny Efimkin <efimkin(at)yandex-team(dot)ru> wrote:
>
> What reason to use pg_atomic_uint64?

The queryid is read and written without holding any lock on the PGPROC
entry, so the pg_atomic_uint64 will guarantee that we get a consistent
value in pg_stat_get_activity(). Other reads shouldn't be a problem
as far as I remember.

> In docs:
> occured - > occurred

Thanks! I fixed it on my local branch.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-07-31 21:53:14 Re: Unused header file inclusion
Previous Message Peter Geoghegan 2019-07-31 21:21:39 Re: pgbench - implement strict TPC-B benchmark