Re: exposing pg_controldata and pg_config as functions

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: exposing pg_controldata and pg_config as functions
Дата
Msg-id CAB7nPqSGhav1egJ0k2-0m-va8wCQpnEdkR0eMThRHY0+nzVqXQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: exposing pg_controldata and pg_config as functions  (Joe Conway <mail@joeconway.com>)
Ответы Re: exposing pg_controldata and pg_config as functions  (Joe Conway <mail@joeconway.com>)
Re: exposing pg_controldata and pg_config as functions  (Joe Conway <mail@joeconway.com>)
Список pgsql-hackers
On Wed, Dec 30, 2015 at 9:08 AM, Joe Conway <mail@joeconway.com> wrote:
> 1) Change NextXID output format from "%u/%u" to "%u:%u"
>    (see recent hackers thread)

!     printf(_("Latest checkpoint's NextXID:          %u/%u\n"),            ControlFile.checkPointCopy.nextXidEpoch,
       ControlFile.checkPointCopy.nextXid);     printf(_("Latest checkpoint's NextOID:          %u\n"),
 
--- 646,652 ----            ControlFile.checkPointCopy.ThisTimeLineID);     printf(_("Latest checkpoint's
full_page_writes:%s\n"),            ControlFile.checkPointCopy.fullPageWrites ? _("on") : _("off"));
 
!     printf(_("Latest checkpoint's NextXID:          %u:%u\n"),
This should be definitely a separate patch.

> 2) Refactor bin/pg_controldata (there should be no visible change to
>    pg_controldata output)
> 3) Adds new functions, more or less in line with previous discussions:
>    * pg_checkpoint_state()
>    * pg_controldata_state()
>    * pg_recovery_state()
>    * pg_init_state()

Taking the opposite direction of Josh upthread, why is this split
actually necessary? Isn't the idea to provide a SQL interface of what
pg_controldata shows? If this split proves to be useful, shouldn't we
do it as well for pg_controldata?

> ===============
> Missing (TODO once agreement on the above is reached):
> ---------------
> a) documentation

This would be good to have.

> b) catversion bump

That's committer work.

> c) regression tests

Hm, what would be the value of those tests? I think we could live
without for simple functions like that honestly.

I think that those functions should be superuser-only. They provide
information about the system globally.
-- 
Michael



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re:
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: exposing pg_controldata and pg_config as functions