Re: Re: A separate table level option to control compression

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Shaun Thomas <shaun(dot)thomas(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, David Steele <david(at)pgmasters(dot)net>
Subject: Re: Re: A separate table level option to control compression
Date: 2019-04-03 06:23:33
Message-ID: 20190403062333.GE3298@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 03, 2019 at 11:40:57AM +0530, Pavan Deolasee wrote:
> On Wed, Apr 3, 2019 at 10:19 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>> - The comments in tuptoaster.h need to be updated to outline the
>> difference between the compression invocation and the toast invocation
>> thresholds. The wording could be better though.
>
> I see that you've done this already. But please let me if more is needed.

If you have a better idea of wording for that part... Please feel
free.

> Yeah, this is an issue with the existing code. Even though we allow setting
> toast_tuple_target to a value less than compile-time TOAST_TUPLE_THRESHOLD,
> the code doesn't really honour a value less than TOAST_TUPLE_THRESHOLD. In
> other words, setting toast_tuple_target lesser than TOAST_TUPLE_THRESHOLD
> doesn't have any effect. We don't even create a toast table if the
> estimated length of tuple is not greater than TOAST_TUPLE_THRESHOLD.
>
> The change introduced by this patch will now trigger the tuptoaster code
> when the compression or toast threshold is set to a value lower than
> TOAST_TUPLE_THRESHOLD. But as far as I can see, that doesn't have any bad
> effect on the toasting since toast_insert_or_update() is capable of
> handling the case when the toast table is missing. There will be a
> behavioural change though. e.g.

It seems to me that c251336 should have done all those things from the
start... In other terms, isn't that a bug and something that we
should fix and back-patch? I'll begin a new thread about that to
catch more attention, with Simon and Andrew in CC.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2019-04-03 06:37:43 Re: [HACKERS] generated columns
Previous Message Pavan Deolasee 2019-04-03 06:10:57 Re: Re: A separate table level option to control compression