Re: Patch for fail-back without fresh backup

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: Patch for fail-back without fresh backup
Дата
Msg-id CAMkU=1zNE0DzFgKi9J+czJCcium2vLESP_KFy5y_Jr37onQPgQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Patch for fail-back without fresh backup  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: Patch for fail-back without fresh backup  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
On Thu, Nov 21, 2013 at 2:43 PM, Andres Freund <andres@2ndquadrant.com> wrote:
On 2013-11-21 14:40:36 -0800, Jeff Janes wrote:
> But if the transaction would not have otherwise generated WAL (i.e. a
> select that did not have to do any HOT pruning, or an update with zero rows
> matching the where condition), doesn't it now have to flush and wait when
> it would otherwise not?

We short circuit that if there's no xid assigned. Check
RecordTransactionCommit().

It looks like that only short-circuits the flush if both there is no xid assigned, and !wrote_xlog.  (line 1054 of xact.c)

I do see stalls on fdatasync on flush from select statements which had no xid, but did generate xlog due to HOT pruning, I don't see why WAL logging hint bits would be different.

Cheers,

Jeff

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: WAL Rate Limiting
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Patch for fail-back without fresh backup