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

Kyotaro Horiguchi <horikyota.ntt@gmail.com>

From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: bertranddrouvot.pg@gmail.com
Cc: michael@paquier.xyz, florisvannee@optiver.com, andres@anarazel.de, tgl@sss.pgh.pa.us, pgsql-bugs@lists.postgresql.org
Date: 2024-06-07T01:15:40Z
Lists: pgsql-bugs
At Thu, 6 Jun 2024 06:05:11 +0000, Bertrand Drouvot <bertranddrouvot.pg@gmail.com> wrote in 
> > What would both of you think about the attached.  This is a mix of
> > what's been proposed on the two threads, with the addition of the
> > refcount.
> 
> I like the idea of adding refcount in the error message. OTOH I think it's more
> appropriate to make use of errdetail_internal() as proposed in [1], but that's
> a nit.

To me, this is something that is not expected to happen, but if it
does, we would want detailed information. In that sense, it might be
better not to hide it in the DETAILS field.

regards.

> [1]: https://www.postgresql.org/message-id/ZkRsoOMrSrNI945i%40ip-10-97-1-34.eu-west-3.compute.internal

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



Commits

  1. Add more debugging information when dropping twice pgstats entry