Re: New XLOG record indicating WAL-skipping

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: New XLOG record indicating WAL-skipping
Дата
Msg-id 407d949e1001150801v4bcb088bu8d8c2f863ee13036@mail.gmail.com
обсуждение исходный текст
Ответ на Re: New XLOG record indicating WAL-skipping  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Ответы Re: New XLOG record indicating WAL-skipping  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-hackers
On Fri, Jan 15, 2010 at 11:28 AM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> I can see that it
> was required to avoid the flooding from heap_insert(), but we can move
> the XLogSkipLogging() call from heap_insert() to heap_sync().
>
> Attached is an updated patch, doing the above. Am I missing anything?

Hm, perhaps the timing is actually important? What if someone takes a
hot backup while an unlogged operation is in progress. The checkpoint
can occur and finish and the backup finish all while the unlogged
operation is happening. Then the replica can start restoring archived
logs from that point forward. In the original coding it sounds like
the replica would never notice the unlogged operation which might not
have been synced before the start of the initial hot backup.  If the
record occurs when the sync begins then the replica would be in
trouble if the checkpoint begins before the operation completed but
finished after the sync began and the record was emitted.

It seems like it's important that the record occur only after the sync
*completes* to be sure that if the replica doesn't see the record then
it knows the sync was done before its initial backup image was taken.

-- 
greg


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

Предыдущее
От: Leonardo F
Дата:
Сообщение: Re: About "Our CLUSTER implementation is pessimal" patch
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Streaming replication, loose ends