Re: error "can only drop stats once" brings down database

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: florisvannee@optiver.com, andres@anarazel.de, bertranddrouvot.pg@gmail.com, tgl@sss.pgh.pa.us, pgsql-bugs@lists.postgresql.org
Date: 2024-06-25T04:00:39Z
Lists: pgsql-bugs
On Tue, Jun 25, 2024 at 09:22:48AM +0900, Kyotaro Horiguchi wrote:
> Is it something like this? I forgot the reason why this was excluded
> from the vinal version, though.
> 
> https://www.postgresql.org/message-id/20201001.090722.322196928507744460.horikyota.ntt%40gmail.com

That's a bit different than the gc_count presented in 0004, because
there is no relationship to autovacuum with the cleanup of the
entries, still there is some overlap in the thought process: this
suggestion just makes sure that any backend holding local references
to a shared entry with a different age does not attempt to manipulate
it after switching locally to a dropped state. 
--
Michael

Commits

  1. Add more debugging information when dropping twice pgstats entry