Re: redo failed in physical streaming replication while stopping the master server
От | lannis |
---|---|
Тема | Re: redo failed in physical streaming replication while stopping the master server |
Дата | |
Msg-id | 1456999122522-5890391.post@n5.nabble.com обсуждение исходный текст |
Ответ на | Re: Re: redo failed in physical streaming replication while stopping the master server (Michael Paquier <michael.paquier@gmail.com>) |
Ответы |
Re: Re: redo failed in physical streaming replication while
stopping the master server
|
Список | pgsql-hackers |
Thanks for your reply. If we only take replay for consideration, yeah, we do this header check until we've read the page first. But thanks to the master xlog generator, we know that: when we try advance XLOG insert buffer (page), we treate the new page header as short header at first. then we use this condition to make it a long header. if ((NewPage->xlp_pageaddr.xrecoff % XLogSegSize) == 0){ XLogLongPageHeader NewLongPage = (XLogLongPageHeader)NewPage; NewLongPage->xlp_sysid = ControlFile->system_identifier; NewLongPage->xlp_seg_size = XLogSegSize; NewLongPage->xlp_xlog_blcksz= XLOG_BLCKSZ; NewPage ->xlp_info |= XLP_LONG_HEADER; Insert->currpos = ((char *) NewPage) +SizeOfXLogLongPHD;} So in the replay scenario, before we read the page from wal segment file, using the specical RecPtr which point to the next page header address, can we predicat the page header is a long or short? regards, fanbin -- View this message in context: http://postgresql.nabble.com/redo-failed-in-physical-streaming-replication-while-stopping-the-master-server-tp5889961p5890391.html Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.
В списке pgsql-hackers по дате отправления: