Re: Change log level for notifying hot standby is waiting non-overflowed snapshot

From: torikoshia <torikoshia(at)oss(dot)nttdata(dot)com>
To: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Change log level for notifying hot standby is waiting non-overflowed snapshot
Date: 2025-03-21 12:29:58
Message-ID: bd1e49f910a7f7913f60a40a17fe0a21@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 users will 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.

> We can then update the documentation to clarify that overflowed
> subtransactions
> may delay snapshot readiness for hot standby and explain how to address
> it.
> For example, the current description - "it will begin accepting
> connections once
> the recovery has brought the system to a consistent state." - should be
> updated
> to reflect this condition.

--
Regards,

--
Atsushi Torikoshi
Seconded from NTT DATA GROUP CORPORATION to SRA OSS K.K.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2025-03-21 12:34:02 Re: Test to dump and restore objects left behind by regression
Previous Message Hayato Kuroda (Fujitsu) 2025-03-21 12:28:10 RE: Fix 035_standby_logical_decoding.pl race conditions