Re: pg_receivexlog and feedback message
От | Magnus Hagander |
---|---|
Тема | Re: pg_receivexlog and feedback message |
Дата | |
Msg-id | CABUevEynybE3Kpo+auFFD1vgDp6nRPv+5+jfjAitQ+GTyrgnZQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: pg_receivexlog and feedback message (Fujii Masao <masao.fujii@gmail.com>) |
Список | pgsql-hackers |
On Mon, Jun 11, 2012 at 5:24 PM, Fujii Masao <masao.fujii@gmail.com> wrote: > On Mon, Jun 11, 2012 at 10:04 PM, Magnus Hagander <magnus@hagander.net> wrote: >> On Sun, Jun 10, 2012 at 4:02 PM, Fujii Masao <masao.fujii@gmail.com> wrote: >>> On Sun, Jun 10, 2012 at 7:55 PM, Magnus Hagander <magnus@hagander.net> wrote: >>>> How about this? >>> >>> + /* >>> + * Set flushed position to the last byte in the previous >>> + * file. Per above we know that xrecoff%XLOG_SEG_SIZE=0 >>> + */ >>> + flushedpos = blockpos; >>> + if (flushedpos.xrecoff == 0) >>> + { >>> + flushedpos.xlogid--; >>> + flushedpos.xrecoff = XLogFileSize-1; >>> + } >>> + else >>> + flushedpos.xrecoff--; >>> >>> flushedpos.xrecoff doesn't need to be decremented by one. >>> If xrecoff % XLOG_SEG_SIZE = 0, the position should be the last >>> byte of previous (i.e., flushed) WAL file. >> >> Hmm. I thikn I confused myself with "last byte written" vs "current >> position". And we're dealing with current position here... >> >> So it should just be flushedpos = blockpos and be done with it, right? > > Yep. > >> Though before I commit anything with this, we need to decide what to >> wrt syncrep on that, per the other thread. > > Yep. Per the other thread, we decided to postpone this until 9.3. And also figure out a better set of switches for pg_receivexlog to control it with. -- Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/
В списке pgsql-hackers по дате отправления: