Re: shared-memory based stats collector

Started by Ranier Vilelaabout 4 years ago2 messageshackers
Jump to latest
#1Ranier Vilela
ranier.vf@gmail.com

Hi,

Per Coverity.

pgstat_reset_entry does not check if lock it was really blocked.
I think if shared_stat_reset_contents is called without lock,
is it an issue not?

regards,

Ranier Vilela

Attachments:

0001-avoid-reset-stats-without-lock.patchapplication/octet-stream; name=0001-avoid-reset-stats-without-lock.patchDownload+5-3
#2Andres Freund
andres@anarazel.de
In reply to: Ranier Vilela (#1)

Hi,

On April 8, 2022 4:49:48 AM PDT, Ranier Vilela <ranier.vf@gmail.com> wrote:

Hi,

Per Coverity.

pgstat_reset_entry does not check if lock it was really blocked.
I think if shared_stat_reset_contents is called without lock,
is it an issue not?

I don't think so - the nowait parameter is say to false, so the lock acquisition is blocking.

Andres

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.