pgsql: Allow SetHintBits() to succeed if the buffer's LSN is new enough

Поиск
Список
Период
Сортировка
От Andres Freund
Тема pgsql: Allow SetHintBits() to succeed if the buffer's LSN is new enough
Дата
Msg-id E1aVRCi-0004t8-CH@gemulon.postgresql.org
обсуждение исходный текст
Ответы Re: pgsql: Allow SetHintBits() to succeed if the buffer's LSN is new enough  (Andres Freund <andres@anarazel.de>)
Список pgsql-committers
Allow SetHintBits() to succeed if the buffer's LSN is new enough.

Previously we only allowed SetHintBits() to succeed if the commit LSN of
the last transaction touching the page has already been flushed to
disk. We can't generally change the LSN of the page, because we don't
necessarily have the required locks on the page. But the required LSN
interlock does not mean the commit record has to be flushed immediately,
it just requires that the commit record will be flushed before the page is
written out. Therefore if the buffer LSN is newer than the commit LSN,
the hint bit can be safely set.

In a number of scenarios (e.g. pgbench) this noticeably increases the
number of hint bits are set. But more importantly it also keeps the
success rate up when flushing WAL less frequently. That was the original
reason for commit 4de82f7d7, which has negative performance consequences
in a number of scenarios. This will allow a followup commit to reduce
the flush rate.

Discussion: 20160118163908.GW10941@awork2.anarazel.de

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/db76b1efbbab2441428a9ef21f7ac9ba43c52482

Modified Files
--------------
src/backend/utils/time/tqual.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)


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

Предыдущее
От: Joe Conway
Дата:
Сообщение: pgsql: Correct Copyright year from 2015 to 2016
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Suppress compiler warnings about useless comparison of unsigned