pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tom Lane <tgl@sss.pgh.pa.us>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Tomas Vondra <tv@fuzzy.cz>
Cc: pgsql-committers <pgsql-committers@postgresql.org>
Subject: Re: pgsql: Generational memory allocator
Date: Sun, 26 Nov 2017 13:53:37 -0500
Message-ID: <28144.1511722417@sss.pgh.pa.us> (raw )
In-Reply-To: <CANP8+jKCX0sTqR8ZexTMxr03Eu3wsuwV2qit0EB0TVorMeSXBg@mail.gmail.com >
References: <E1eHa4J-0006hI-Q8@gemulon.postgresql.org >
<20171123001649.y2nf7422iay6cw3v@alap3.anarazel.de >
<CANP8+jKoT=Pg5W_3FcKiDf+FMrJhFYacxt_g5E0=tkmb5s8M6g@mail.gmail.com >
<c903f275-2150-fa52-64bf-dca7b53ebf8d@fuzzy.cz >
<16449.1511548313@sss.pgh.pa.us >
<4618.1511573138@sss.pgh.pa.us >
<bf84d940-90d4-de91-19dd-612e011007f4@fuzzy.cz >
<6189.1511587105@sss.pgh.pa.us >
<8991.1511639441@sss.pgh.pa.us >
<20171125200014.qbewtip5oydqsklt@alap3.anarazel.de >
<21466.1511644760@sss.pgh.pa.us >
<2875.1511646362@sss.pgh.pa.us >
<CANP8+jKRt0Yenw8Ln4J4u=UsDVkCBgPmjDE2buYou-H9VTMZjw@mail.gmail.com >
<16797.1511718406@sss.pgh.pa.us >
<CANP8+jKCX0sTqR8ZexTMxr03Eu3wsuwV2qit0EB0TVorMeSXBg@mail.gmail.com >
Simon Riggs <simon@2ndquadrant.com> writes:
> On 27 November 2017 at 04:46, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Well, I'm concerned about the possibility of a lot of palloc thrashing
>> if the first bunch of records it reads happen to have steadily increasing
>> sizes. However, rather than doubling, it might be sufficient to set a
>> robust minimum on the first allocation, ie use something along the lines
>> of Max(1024, MAXALIGN(state->main_data_len)).
> Agreed.
> I was just researching what that number should be... and I was
> thinking that we should use the maximum normal tuple size, which I
> think is
> TOAST_TUPLE_THRESHOLD +
> SizeOfXLogRecord +
> SizeOfXLogRecordDataHeaderLong
Well, let's not overthink this, because anything under 8K is going to
be rounded up to the next power of 2 anyway by aset.c. Based on this
point I'd say that BLCKSZ/2 or BLCKSZ/4 would be reasonable candidates
for the minimum.
regards, tom lane
view thread (37+ messages) latest in thread
Message-ID: <28144.1511722417@sss.pgh.pa.us>
Permalink: ../28144.1511722417@sss.pgh.pa.us/
Also on: postgresql.org/message-id/28144.1511722417@sss.pgh.pa.us
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, simon@2ndquadrant.com, andres@anarazel.de, tv@fuzzy.cz
Subject: Re: pgsql: Generational memory allocator
In-Reply-To: <28144.1511722417@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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