pgsql: Pad XLogReaderState's per-buffer data_bufsz more aggressively.

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Pad XLogReaderState's per-buffer data_bufsz more aggressively.
Date: 2017-11-27 09:34:44
Message-ID: E1eJFoK-0000Vt-1i@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Pad XLogReaderState's per-buffer data_bufsz more aggressively.

Originally, we palloc'd this buffer just barely big enough to hold the
largest xlog backup block seen so far. We now MAXALIGN the palloc size.

The original coding could result in many repeated palloc cycles, in the
worst case where we see a series ofgradually larger xlog records. We
ameliorate that similarly to 8735978e7aebfbc499843630131c18d1f7346c79
by imposing a minimum buffer size of BLCKSZ.

Discussion: https://postgr.es/m/E1eHa4J-0006hI-Q8@gemulon.postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/59af8d4384ba5ae72986eab7e5cdc514a969aa05

Modified Files
--------------
src/backend/access/transam/xlogreader.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Simon Riggs 2017-11-27 09:53:27 pgsql: Additional docs for toast_tuple_target changes
Previous Message Magnus Hagander 2017-11-27 08:32:02 pgsql: Fix typo in comment