Re: proposal: get oldest LSN - function

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: proposal: get oldest LSN - function
Дата
Msg-id CAB7nPqSJh5=idbhAnS3tf09O5zK_RcK2cTfr6Rti532c-ykEdg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: get oldest LSN - function  (Kartyshov Ivan <i.kartyshov@postgrespro.ru>)
Ответы Re: proposal: get oldest LSN - function  (Kartyshov Ivan <i.kartyshov@postgrespro.ru>)
Список pgsql-hackers
On Sun, Feb 28, 2016 at 4:40 PM, Kartyshov Ivan wrote:
> It will not satisfy our purposes and our administrators for three reasons.
> 1) DBA set me task to get the oldest number that present in WAL, not last

Yeah I got that.

> 2) Surely we can choose the oldest segment from list "pg_ls_dir('pg_xlog')"
> of segments and calculate the first LSN by hand, but it is not what we want
> to do manually.

That's where I am not following. In any case you are just one SQL
query away from the result. And actually  your patch is incorrect I
think. If you care about the oldest record available you should look
for the first LSN position of the oldest segment, no? What you are
calculating now is the oldest virtual LSN position in local pg_xlog.
-- 
Michael



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

Предыдущее
От: Kartyshov Ivan
Дата:
Сообщение: Re: proposal: get oldest LSN - function
Следующее
От: Yury Zhuravlev
Дата:
Сообщение: Re: [PATH] Correct negative/zero year into_date/to_timestamp