Re: Hot standby and GiST page splits (was Re: WIP: Fast GiST index build)

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Hot standby and GiST page splits (was Re: WIP: Fast GiST index build)
Дата
Msg-id 4E37E2E3.601@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Hot standby and GiST page splits (was Re: WIP: Fast GiST index build)  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: Hot standby and GiST page splits (was Re: WIP: Fast GiST index build)  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
On 02.08.2011 14:36, Simon Riggs wrote:
> On Tue, Aug 2, 2011 at 12:03 PM, Heikki Linnakangas
> <heikki.linnakangas@enterprisedb.com>  wrote:
>> If we change the WAL record, we have to make it so that the new version can
>> still read the old format, which complicates the implementation a bit.
>> Neverthelss, I'm leaning towards option 1.
>
> We may as well do (1), with two versions of the WAL record.

Actually I think we can append the new information to the end of the 
page split record, so that an old version server can read WAL generated 
by new version, too. It just won't set the right link and NSN correctly, 
so hot standby will be broken like it is today.

> Hmm, the biggest issue is actually that existing GIST indexes are
> corrupted, from the perspective of being unusable during HS.
>
> We can fix the cause but that won't repair the existing damage. So the
> requirement is for us to re/create new indexes, which can then use a
> new WAL record format.

No-no, it's not that bad. The right-links and NSNs are only needed to 
handle scans concurrent with page splits. The existing indexes are fine, 
you only have a problem if you run queries in hot standby mode, while 
you replay page splits on it. As soon as you upgrade the master and 
standby to new minor version with the fix, that will work too.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Hot standby and GiST page splits (was Re: WIP: Fast GiST index build)
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Compressing the AFTER TRIGGER queue