Re: Add a permission check to pg_stat_get_backend_subxact() - Mailing list pgsql-hackers

From shihao zhong
Subject Re: Add a permission check to pg_stat_get_backend_subxact()
Date
Msg-id CAGRkXqTLuE3PrRn7tXJ8t+7UHcTUJ9cuaFxbZkuhpAySD0RpfA@mail.gmail.com
Whole thread
In response to Re: Add a permission check to pg_stat_get_backend_subxact()  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Responses Re: Add a permission check to pg_stat_get_backend_subxact()
List pgsql-hackers
> Do you mean adding the user ID on top of Shihao's 0002? If so, I can have a look,
> unless Shihao is already planning to update the patch along those lines?

Done in v8, attached.

0001 is the PID check, same as v7-0002. It goes first now because 0002
needs a field in PgStat_Backend.

0002 stores the user ID in PgStat_Backend next to the PID when the entry
is created, and pg_stat_get_backend_io(), wal() and lock() check the
caller against that instead of the beentry. The reset callback restores
both fields. pg_stat_get_backend_subxact() still checks the beentry, the
counters it reports come from there.

Thanks,
Shihao
Attachment

pgsql-hackers by date:

Previous
From: jian he
Date:
Subject: stale comment in struct AlteredTableInfo
Next
From: Masahiko Sawada
Date:
Subject: Re: Adding a range check on the sequence index from the publisher.