Re: Way to access LSN (for each transaction) by directly talking to postgres?
От | Joshua Bay |
---|---|
Тема | Re: Way to access LSN (for each transaction) by directly talking to postgres? |
Дата | |
Msg-id | CABb-U3bqGxd1-0PEVbrf8u9JaoRbKez=hDYb2koSOde5WO34RA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Way to access LSN (for each transaction) by directly talking to postgres? (Michael Paquier <michael.paquier@gmail.com>) |
Список | pgsql-hackers |
<div dir="ltr">Sorry I forgot to reply. Thanks! using decoding plugins works great</div><div class="gmail_extra"><br /><divclass="gmail_quote">On Wed, Aug 3, 2016 at 8:37 PM, Michael Paquier <span dir="ltr"><<a href="mailto:michael.paquier@gmail.com"target="_blank">michael.paquier@gmail.com</a>></span> wrote:<br /><blockquote class="gmail_quote"style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thu, Aug 4, 2016at 3:02 AM, Joshua Bay <<a href="mailto:joshuabay93@gmail.com">joshuabay93@gmail.com</a>> wrote:<br /> > Couldyou please tell me how I can get LSN of each transaction at decoder<br /> > plugin?<br /><br /></span>Craig alreadygave you hints, but here are more. You will need to hack<br /> your own plugin. You could just use the one in contrib/test_decoding,<br/> remove most of its code, and use the commit callback to issue the LSN<br /> you are interestedin. Note as well that when using<br /> pg_logical_slot_peek_changes or pg_logical_slot_get_changes, you can<br/> get a LSN location. Using test_decoding as a base, that's not a<br /> complicated effort.<br /><span class="HOEnZb"><fontcolor="#888888">--<br /> Michael<br /></font></span></blockquote></div><br /></div>
В списке pgsql-hackers по дате отправления: