pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Allow SetHintBits() to succeed if the buffer's LSN is new enough
3+ messages / 2 participants
[nested] [flat]

* pgsql: Allow SetHintBits() to succeed if the buffer's LSN is new enough
@ 2016-02-15 22:01 Andres Freund <andres@anarazel.de>
  2016-02-15 22:17 ` Re: pgsql: Allow SetHintBits() to succeed if the buffer's LSN is new enough Andres Freund <andres@anarazel.de>
  0 siblings, 1 reply; 3+ messages in thread

From: Andres Freund @ 2016-02-15 22:01 UTC (permalink / raw)
  To: 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(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pgsql: Allow SetHintBits() to succeed if the buffer's LSN is new enough
  2016-02-15 22:01 pgsql: Allow SetHintBits() to succeed if the buffer's LSN is new enough Andres Freund <andres@anarazel.de>
@ 2016-02-15 22:17 ` Andres Freund <andres@anarazel.de>
  2016-02-15 22:19   ` Re: pgsql: Allow SetHintBits() to succeed if the buffer's LSN is new enough Peter Geoghegan <pg@heroku.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Andres Freund @ 2016-02-15 22:17 UTC (permalink / raw)
  To: pgsql-committers

On 2016-02-15 22:01:12 +0000, Andres Freund wrote:
> Allow SetHintBits() to succeed if the buffer's LSN is new enough.

Thanks, that works with my brand of annoying compiler...

Andres


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pgsql: Allow SetHintBits() to succeed if the buffer's LSN is new enough
  2016-02-15 22:01 pgsql: Allow SetHintBits() to succeed if the buffer's LSN is new enough Andres Freund <andres@anarazel.de>
  2016-02-15 22:17 ` Re: pgsql: Allow SetHintBits() to succeed if the buffer's LSN is new enough Andres Freund <andres@anarazel.de>
@ 2016-02-15 22:19   ` Peter Geoghegan <pg@heroku.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Peter Geoghegan @ 2016-02-15 22:19 UTC (permalink / raw)
  To: Andres Freund <andres@anarazel.de>; +Cc: pgsql-committers

On Mon, Feb 15, 2016 at 2:17 PM, Andres Freund <andres@anarazel.de> wrote:
> On 2016-02-15 22:01:12 +0000, Andres Freund wrote:
>> Allow SetHintBits() to succeed if the buffer's LSN is new enough.
>
> Thanks, that works with my brand of annoying compiler...

Wrong commit message. :-)


-- 
Peter Geoghegan


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2016-02-15 22:19 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-02-15 22:01 pgsql: Allow SetHintBits() to succeed if the buffer's LSN is new enough Andres Freund <andres@anarazel.de>
2016-02-15 22:17 ` Andres Freund <andres@anarazel.de>
2016-02-15 22:19   ` Peter Geoghegan <pg@heroku.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox