Re: Any way to get timestamp from LSN value ?

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: Any way to get timestamp from LSN value ?
Дата
Msg-id CALj2ACVgFvOQQEoyuuZeceQrStGsePWvU1noU5aAvJNenv8qTQ@mail.gmail.com
обсуждение исходный текст
Ответ на Any way to get timestamp from LSN value ?  (Harinath Kanchu <hkanchu@apple.com>)
Список pgsql-hackers
On Thu, Jul 28, 2022 at 1:17 PM Harinath Kanchu <hkanchu@apple.com> wrote:
>
> Hello,
>
> Is there any way to get the timestamp of the transaction using LSN value ?
>
> For example:
> can we use the minimum recovery ending location in pg control file to get the minimum recovery timestamp ?
>
> Minimum recovery ending location:     28/28000B68

Can't pg_waldump be used? If you are on PG 15, you could as well use
pg_walinspect functions, something like below:

select * from pg_get_wal_records_info_till_end_of_wal(<<start_lsn>>)
where record_type like '%COMMIT%'

[1] https://www.postgresql.org/docs/15/pgwalinspect.html

-- 
Bharath Rupireddy
RDS Open Source Databases: https://aws.amazon.com/



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

Предыдущее
От: Julien Rouhaud
Дата:
Сообщение: Re: small windows psqlrc re-wording
Следующее
От: Tom Lane
Дата:
Сообщение: How come drongo didn't fail authentication here?