Re: Preventing free space from being reused

From: Noah Bergbauer <noah(at)statshelix(dot)com>
To: Michael Lewis <mlewis(at)entrata(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Preventing free space from being reused
Date: 2021-02-12 16:36:09
Message-ID: CABjy+RgKCVF4E1pGb_PT_1e=LAf-0P2B6h5oDyiy8c2PQ6grTQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

This is on version 12.5. The usage pattern is inserts only, no updates or
deletes at all. Hence, fillfactor is set to 100.

It just seems extremely unfortunate in this particular case that Postgres
goes to all the trouble of tetris-ing new tuples into existing pages, only
to cripple performance in two different ways (BRIN and disk fragmentation).
In other words, if there is no workaround for this problem, then I believe
that an option to essentially just disable free space maps on a
per-relation basis should be added.

On Fri, Feb 12, 2021 at 4:58 PM Michael Lewis <mlewis(at)entrata(dot)com> wrote:

> What version are you using? What is your usage pattern for
> insert/update/deletes? If sometimes the JSON data gets too big and the data
> is moved from in-line storage to TOASTED, then that would be opening up
> gaps. Or if you are doing deletes. Perhaps adjusting your fillfactor
> and/or TOAST_TUPLE_TARGET would influence that behavior in the direction
> you want to go. As best I understand though if you are doing deletes, you
> won't be able to prevent those gaps from showing up and being re-used. I
> don't believe there is any way to influence Postgres to append-only the
> tuples and pages.
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Lewis 2021-02-12 16:48:40 Re: Preventing free space from being reused
Previous Message Michael Lewis 2021-02-12 15:57:38 Re: Preventing free space from being reused