Re: display hot standby state in psql prompt
| От | Fujii Masao |
|---|---|
| Тема | Re: display hot standby state in psql prompt |
| Дата | |
| Msg-id | CAHGQGwHRPi7L2oRA4S76DHm-TCnAHGsxYmxe6CDX7POQQ-i0-A@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: display hot standby state in psql prompt (Chao Li <li.evan.chao@gmail.com>) |
| Ответы |
Re: display hot standby state in psql prompt
|
| Список | pgsql-hackers |
On Wed, Jan 28, 2026 at 4:35 PM Chao Li <li.evan.chao@gmail.com> wrote: > > > > > On Jan 27, 2026, at 22:43, Jim Jones <jim.jones@uni-muenster.de> wrote: > > > >> ----------------- > >> Indicates whether the connected server is running in hot standby mode. > >> The value is shown as <literal>standby</literal> if the server is > >> currently in hot standby and reports <xref > >> linkend="guc-in-hot-standby"/> as <literal>on</literal>, and > >> <literal>primary</literal> otherwise. This is useful when connecting > >> to multiple servers to quickly determine the role of each connection. > >> A value of <literal>?</literal> is shown when connected to a server > >> running <productname>PostgreSQL</productname> 13 or older. > >> ----------------- > > > > Added as you suggested. Thanks for updating the patch! It looks good to me overall, with one minor point: + This can be useful when connecting to multiple hosts to quickly identify + if the connected server is currently in recovery mode. I'd prefer not to mix the terms "hot standby mode" and "recovery mode" here, as that could be confusing. So I've updated the patch to use the descriptions I suggested earlier, avoiding references to "recovery mode". Patch attached. Barring any objections, I'll commit this patch. > > Best, Jim<v9-0001-Add-i-prompt-escape-to-indicate-hot-standby-statu.patch> > > V9 looks good to me. And I just did some tests, and all look good. Sounds nice. Regards, -- Fujii Masao
Вложения
В списке pgsql-hackers по дате отправления: