Re: Change log level for notifying hot standby is waiting non-overflowed snapshot - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Change log level for notifying hot standby is waiting non-overflowed snapshot
Date
Msg-id 436b0f6b-b7a6-44a1-aed4-1b6c6fd13d1b@oss.nttdata.com
Whole thread Raw
In response to Re: Change log level for notifying hot standby is waiting non-overflowed snapshot  (torikoshia <torikoshia@oss.nttdata.com>)
Responses Re: Change log level for notifying hot standby is waiting non-overflowed snapshot
List pgsql-hackers

On 2025/03/21 21:29, torikoshia wrote:
> Hi,
> 
> On 2025-03-21 02:15, Fujii Masao wrote:
> Thanks for your review!
> 
>>> Personally, I feel 1st patch may be sufficient, but I would appreciate any feedback.
>>
>> Agreed.
>>
>> -                             errdetail("Consistent recovery state has not been yet reached.")));
>> +                             errdetail("Consistent recovery state has not been yet
>> reached, or snappshot is pending because subtransaction is
>> overflowed."),
>> +                             errhint("In the latter case, find and close the transaction
>> with more than %d subtransactions", PGPROC_MAX_CACHED_SUBXIDS)));
>>
>> This message might be too detailed. Instead, how about simplifying it
>> to something like: "Consistent recovery state has not been reached,
>> or snapshot is not ready for hot standby."
> 
> Agreed.
> 
> Do you also think the errhint message is unnecessary?
> I agree with your idea to add a description of the overflowed subtransaction in the manual, but I'm not sure all
userswill be able to find it.
 
> Some people may not understand what needs to be done to make the snapshot ready for hot standby.
> I think adding an errhint may help those users.

I see your concern that users might overlook the documentation and
struggle to find a solution. However, I still believe it's better to
include this information in the documentation rather than logging it
as a hint. Since the scenario where the hint would be useful is
relatively rare, logging it every time might be more confusing than helpful.

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION




pgsql-hackers by date:

Previous
From: Sami Imseih
Date:
Subject: Re: Proposal - Allow extensions to set a Plan Identifier
Next
From: Andres Freund
Date:
Subject: Re: AIO v2.5