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

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Floris Van Nee <florisvannee@optiver.com>
Cc: Andres Freund <andres@anarazel.de>, Tom Lane <tgl@sss.pgh.pa.us>, "pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>
Date: 2024-06-04T05:04:00Z
Lists: pgsql-bugs
On Sun, Jun 02, 2024 at 10:01:53PM +0000, Floris Van Nee wrote:
> Would it make sense to at least commit your patch to enhance the
> error message a bit?

FWIW, I am +1 for the improvement of this error message.

Note that there is a very similar proposal here:
https://www.postgresql.org/message-id/ZkM30paAD8Cr/Bix@ip-10-97-1-34.eu-west-3.compute.internal

The only reason why I did not do one or the other yet is that this is
an improvement, hence I was waiting for v18 to open.  If somebody
feels differently, feel free to proceed before that with the format
you like.  Still I'd vote for the addition of the refcount to the
patch proposed on this thread, to provide more debugging info to the
information reported.
--
Michael

Commits

  1. Add more debugging information when dropping twice pgstats entry