public inbox for [email protected]  
help / color / mirror / Atom feed
From: Heikki Linnakangas <[email protected]>
To: Fujii Masao <[email protected]>
To: [email protected]
Subject: Re: Improve error messages for database object stats manipulation functions during recovery
Date: Tue, 12 Nov 2024 23:09:58 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

On 25/10/2024 20:07, Fujii Masao wrote:
> Hi,
> 
> When database object stats manipulation functions like 
> pg_set_relation_stats() are run,
> they currently produce the following error and hint messages, which are 
> "internal"
> and make it hard for users to understand the issue:
> 
>        ERROR:  cannot acquire lock mode ShareUpdateExclusiveLock on 
> database objects while recovery is in progress
>        HINT:  Only RowExclusiveLock or less can be acquired on database 
> objects during recovery.
> 
> So I'd like to propose updating these to clearer messages:
> 
>        ERROR:  recovery is in progress
>        HINT:  Database object statistics manipulation functions cannot 
> be executed during recovery.
> 
> Thought?

Makes sense.

"Database object statistics manipulation functions" is a bit of a 
mouthful". Maybe something like "statistics cannot be modified during 
recovery".

> I've attached a patch implementing these changes. It also updates the 
> documentation to
> clearly state that these functions are not available during recovery.

Looks good to me.

-- 
Heikki Linnakangas
Neon (https://neon.tech)







view thread (4+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Improve error messages for database object stats manipulation functions during recovery
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox