From: | torikoshia <torikoshia(at)oss(dot)nttdata(dot)com> |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
Cc: | Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Change log level for notifying hot standby is waiting non-overflowed snapshot |
Date: | 2025-04-01 11:54:58 |
Message-ID: | db500e6a53bc099963f8523d64531b87@oss.nttdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2025-04-01 01:12, Fujii Masao wrote:
> On 2025/03/31 22:45, Yugo Nagata wrote:
>> I prefer this approach clarifying that consistency and subtransaction
>> overflow
>> are separate concepts in the documentation.
>>
>> Here are minor comments on the patch:
>
> Thanks for the review!
>
>
>> - case CAC_NOTCONSISTENT:
>> - if (EnableHotStandby)
>> + case CAC_NOTHOTSTANDBY:
>> + if (!EnableHotStandby)
>> ereport(FATAL,
>> (errcode(ERRCODE_CANNOT_CONNECT_NOW),
>> errmsg("the database system is not yet
>> accepting connections"),
>> - errdetail("Consistent recovery state has
>> not been yet reached.")));
>> + errdetail("Hot standby mode is
>> disabled.")));
>> + else if (reachedConsistency)
>> + ereport(FATAL,
>> + (errcode(ERRCODE_CANNOT_CONNECT_NOW),
>> + errmsg("the database system is not
>> accepting connections"),
>> + errdetail("Recovery snapshot is not yet
>> ready for hot standby."),
>> + errhint("To enable hot standby, close
>> write transactions with more than %d subtransactions on the primary
>> server.",
>> + PGPROC_MAX_CACHED_SUBXIDS)));
>> else
>> ereport(FATAL,
>> (errcode(ERRCODE_CANNOT_CONNECT_NOW),
>> errmsg("the database system is not
>> accepting connections"),
>> - errdetail("Hot standby mode is
>> disabled.")));
>> + errdetail("Consistent recovery state has
>> not been yet reached.")));
>>
>> The message says "the database system is not yet accepting
>> connections" when "Hot standby mode is disabled".
>> I think "yet" is not necessary in this case. Otherwise, when "Recovery
>> snapshot is not yet ready for hot standby"
>> or "Consistent recovery state has not been yet reached", it seems
>> better to use "yet"
>
> I may have unintentionally modified the error message.
> I fixed the patch as suggested. Please check the latest patch
> I posted earlier in response to Torikoshi-san.
Thank you for updating the patch!
LGTM.
I feel like changing the status to 'Ready for Committer', but since
Nagata-san may have additional comments, I'm leaving it as 'Needs
Review'.
--
Regards,
--
Atsushi Torikoshi
Seconded from NTT DATA GROUP CORPORATION to SRA OSS K.K.
From | Date | Subject | |
---|---|---|---|
Next Message | Aleksander Alekseev | 2025-04-01 11:56:17 | Re: AIO v2.5 |
Previous Message | Hayato Kuroda (Fujitsu) | 2025-04-01 11:52:46 | RE: Fix 035_standby_logical_decoding.pl race conditions |