pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Georgios <gkokolatos@protonmail.com>
Cc: Julien Rouhaud <julien.rouhaud@free.fr>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: robertmhaas@gmail.com <robertmhaas@gmail.com>
Subject: Re: Shared memory size computation oversight?
Date: Wed, 03 Mar 2021 11:23:54 -0500
Message-ID: <1183451.1614788634@sss.pgh.pa.us> (raw)
In-Reply-To: <SeVx6SxBxMHIm_66gE4M8rzAn5vqXw8akcyJ-26bJxHeNC_wW9fN-xDr_G3AGiSH328-rxMzXbNf6H4TsaNIG-OJFE8LvmdflG9Zb-yIKq4=@protonmail.com>
References: <20210227080815.jryyhy6lrn6gahkm@nol>
	<SeVx6SxBxMHIm_66gE4M8rzAn5vqXw8akcyJ-26bJxHeNC_wW9fN-xDr_G3AGiSH328-rxMzXbNf6H4TsaNIG-OJFE8LvmdflG9Zb-yIKq4=@protonmail.com>

Georgios <gkokolatos@protonmail.com> writes:
> My limited understanding is also based in a comment in CreateSharedMemoryAndSemaphores()

>          * Size of the Postgres shared-memory block is estimated via
>          * moderately-accurate estimates for the big hogs, plus 100K for the
>          * stuff that's too small to bother with estimating.

Right.  That 100K slop factor is capable of hiding a multitude of sins.

I have not looked at this patch, but I think the concern is basically that
if we have space-estimation infrastructure that misestimates what it is
supposed to estimate, then if that infrastructure is used to estimate the
size of any of the "big hog" data structures, we might misestimate by
enough that the slop factor wouldn't hide it.

			regards, tom lane





view thread (16+ messages)  latest in thread

Message-ID: <1183451.1614788634@sss.pgh.pa.us>
Permalink:  ../1183451.1614788634@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1183451.1614788634@sss.pgh.pa.us

 · 

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-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, gkokolatos@protonmail.com, julien.rouhaud@free.fr, pgsql-hackers@lists.postgresql.org, robertmhaas@gmail.com
  Subject: Re: Shared memory size computation oversight?
  In-Reply-To: <1183451.1614788634@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