Re: Way to access LSN (for each transaction) by directly talking to postgres?

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Way to access LSN (for each transaction) by directly talking to postgres?
Дата
Msg-id CAB7nPqS6zSCvbqJyOZFTpfBq7EerG4F-9QUsPzz40k0bz1eBSA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Way to access LSN (for each transaction) by directly talking to postgres?  (Joshua Bay <joshuabay93@gmail.com>)
Ответы Re: Way to access LSN (for each transaction) by directly talking to postgres?  (Joshua Bay <joshuabay93@gmail.com>)
Список pgsql-hackers
On Thu, Aug 4, 2016 at 3:02 AM, Joshua Bay <joshuabay93@gmail.com> wrote:
> Could you please tell me how I can get LSN of each transaction at decoder
> plugin?

Craig already gave you hints, but here are more. You will need to hack
your own plugin. You could just use the one in contrib/test_decoding,
remove most of its code, and use the commit callback to issue the LSN
you are interested in. Note as well that when using
pg_logical_slot_peek_changes or pg_logical_slot_get_changes, you can
get a LSN location. Using test_decoding as a base, that's not a
complicated effort.
-- 
Michael



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Lossy Index Tuple Enhancement (LITE)
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Implementing full UTF-8 support (aka supporting 0x00)