Re: Index on (fixed size) bytea value

From: Les <nagylzs(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Index on (fixed size) bytea value
Date: 2023-06-20 06:13:07
Message-ID: CAKXe9UA9gmFH8AeY6_LLiWDt=Z648c+3Wqb3uY7B455hZEAT_g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> ezt írta (időpont: 2023.
jún. 19., H, 22:30):

> On Mon, Jun 19, 2023 at 1:05 PM Les <nagylzs(at)gmail(dot)com> wrote:
>
>> AFAIK PostgreSQL does not allow a row to occupy multiple blocks.
>>
>
> Your plan is going to heavily involve out-of-band storage. Please read up
> on it here:
>
> https://www.postgresql.org/docs/current/storage-toast.html
>
I'm aware of the TOAST, and how it works. I was referring to it ("I think
that it should be as large as possible, without hitting the toast. ") I
have designed a separate "block" table specifically to avoid storing binary
data in the TOAST. So my plan is not going to involve out-of-band storage.

Just to make this very clear: a record in the block table would store a
block, not the whole file. My question is to finding the optimal block size
(without hitting the toast), and finding the optimal hash algorithm for
block de-duplication.

Unless I totally misunderstood how the TOAST works. (?)

Laszlo

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Laurenz Albe 2023-06-20 06:50:58 Re: Index on (fixed size) bytea value
Previous Message Tomas Vondra 2023-06-19 23:25:52 Re: Merge David and Goliath tables efficiently