Re: Add pg_stat_recovery system view

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Xuneng Zhou <xunengzhou(at)gmail(dot)com>, yangyz <1197620467(at)qq(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add pg_stat_recovery system view
Date: 2026-03-09 06:57:03
Message-ID: 500B406F-4968-4F33-9E21-02C0E50904B8@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Mar 9, 2026, at 14:06, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Mon, Mar 09, 2026 at 01:20:45PM +0800, Chao Li wrote:
>>> [1] https://www.postgresql.org/docs/devel/error-message-reporting.html
>>
>> Would it make sense to mention this distinction in the header
>> comments for ereport and elog in the code? For these logging APIs, I
>> think developers are often more likely to read the code comments
>> than the documentation.
>
> As of the link already mentioned:
> "Therefore, elog should be used only for internal errors .."
> --
> Michael

Yes, the doc has clearly explained everything. I meant to ask if we want to add a bit explanation to the header comment of elog and ereport. Currently elog’s comment only says:
```
/*----------
* Old-style error reporting API: to be used in this way:
* elog(ERROR, "portal \"%s\" not found", stmt->portalname);
*----------
```
That sounds elog is just old, but somewhat equivalent to ereport.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Xuneng Zhou 2026-03-09 06:59:31 Re: Refactor recovery conflict signaling a little
Previous Message Chao Li 2026-03-09 06:46:57 Re: ALTER TABLE: warn when actions do not recurse to partitions