Re: Hot Standby 0.2.1

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Hot Standby 0.2.1
Дата
Msg-id 4AB9D8B9.9090804@enterprisedb.com
обсуждение исходный текст
Ответ на Hot Standby 0.2.1  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: Hot Standby 0.2.1  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
Looking at the way cache invalidations are handled in two-phase
transactions, it would be simpler if we store the shared cache
invalidation messages in the twophase state file header, like we store
deleted relations and subxids. This allows them to be copied to the
COMMIT_PREPARED WAL record, so that we don't need treat twophase commits
differently than regular ones in xact_redo_commit. As the patch stands,
the new
xactGetCommittedInvalidationMessages/MakeSharedInvalidMessagesArray
mechanism is duplicated functionality with
AtPrepare_Inval/-PersistInvalidationMessage - both materialize the
pending shared invalidation messages so that they can be written to
disk. I did that in my git branch.

I wonder if we might have alignment issues with the
SharedInvalidationMessages being stored in WAL records, following the
subxids. All the data stored in that record have 4-byte alignment at the
moment, but if SharedInvalidationMessage ever needs 8-byte alignment, we
would have trouble. Probably not worth changing code, it's highly
unlikely that SharedInvalidationMessage will ever need 8-byte alignment,
but perhaps a comment somewhere would be in order.

I note that we don't emit RunningXacts after a shutdown checkpoint. So
if recovery starts at a shutdown checkpoint, we don't let read-only
backends in until the first online checkpoint. Could we treat a shutdown
checkpoint as a snapshot with no transactions running? Or do prepared
transactions screw that up?

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


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

Предыдущее
От: daveg
Дата:
Сообщение: Re: numeric_to_number() function skipping some digits
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Hot Standby 0.2.1