Disable sending messages to the client side

How can I disable sending unnecessary messages from pg_stat_monitor to the client side? We configured pg_stat_monitor.pgsm_max to limit shared memory consumption. And if the buffer doesn’t free up in time, the following message is generated:

WARNING: [pg_stat_monitor] pgsm_store: Hash table is out of memory and can no longer store queries!
DETAIL: You may reset the view or when the buckets are deallocated, pg_stat_monitor will resume saving queries. Alternatively, try increasing the value of pg_stat_monitor.pgsm_max.

And these messages are being sent to the client side. Sending such messages is not needed by the client.

Hi @ANDiv1976 ,

You could try setting a higher lever for client_min_messages, but this will of course mean you may be missing on some other (more important) messages.

These shouldn’t be too verbose, since they should be firing only once per out of memory occurrence:

Is it firing too much either way?

Under high load, starting from approximately 8,000 TPS, queries disappear in QAN and errors appear in the logs. Until I limited the memory usage with pg_stat_monitor.pgsm_max, PostgreSQL was restarting.