Re: Streaming Replication patch for CommitFest 2009-09

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: Streaming Replication patch for CommitFest 2009-09
Дата
Msg-id 3f0b79eb0910060145ref434ecwa3cbdc78b8403b89@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Streaming Replication patch for CommitFest 2009-09  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-hackers
Hi,

On Mon, Sep 21, 2009 at 4:51 PM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> I've pushed that to 'replication-orig' branch in my git
> repository, attached is the same as a diff against your SR_0914.patch.

The following changes about crossing a xlogid boundary seem wrong,
which would break the management of some XLOG positions.

> !         /* Update state for read */
> !         tmp = recptr.xrecoff + byteswritten;
> !         if (tmp < recptr.xrecoff)
> !             recptr.xlogid++; /* overflow */
> !         recptr.xrecoff = tmp;

> !         endptr.xrecoff += MAX_SEND_SIZE;
> !         if(endptr.xrecoff < startptr.xrecoff)
> !             endptr.xlogid++; /* xrecoff overflowed */

> !         if (endptr.xlogid != startptr.xlogid)
>           {
> !             Assert(endptr.xlogid == startptr.xlogid + 1);
> !             nbytes = (0xffffffff - endptr.xrecoff) + startptr.xrecoff;
> !         }

The size of a logical XLOG file is 0xff000000. So, even if xrecoff has
not been overflowed yet, we might need to cross a xlogid boundary.
The xrecoff should be compared with XLogFileSize, I think. Can I fix those?

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


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

Предыдущее
От: KaiGai Kohei
Дата:
Сообщение: Re: Privileges and inheritance
Следующее
От: Roger Leigh
Дата:
Сообщение: Re: Unicode UTF-8 table formatting for psql text output