Re: Compressed TOAST Slicing

From: Rafia Sabih <rafia(dot)sabih(at)enterprisedb(dot)com>
To: pramsey(at)cleverelephant(dot)ca
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, sfrost(at)snowman(dot)net, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Compressed TOAST Slicing
Date: 2018-12-02 15:03:03
Message-ID: CAOGQiiONHzXS3_32SV1uUQVV3ArTTLpCOxoqd_mjwvbxGs4UeQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 2, 2018 at 11:55 PM Paul Ramsey <pramsey(at)cleverelephant(dot)ca> wrote:
>
> As threatened, I have also added a patch to left() to also use sliced access.

Hi Paul,

The idea looks good and believing your performance evaluation it seems
like a practical one too.

I had a look at this patch and here are my initial comments,
1.
- if (dp != destend || sp != srcend)
+ if (!is_slice && (dp != destend || sp != srcend))
return -1;

A comment explaining how this check differs for is_slice case would be helpful.
2.
- int len = VARSIZE_ANY_EXHDR(str);
- int n = PG_GETARG_INT32(1);
- int rlen;
+ int n = PG_GETARG_INT32(1);

Looks like PG indentation is not followed here for n.

--
Regards,
Rafia Sabih
EnterpriseDB: http://www.enterprisedb.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2018-12-02 15:13:29 Re: [proposal] Add an option for returning SQLSTATE in psql error message
Previous Message Andrey Borodin 2018-12-02 14:40:04 Re: [HACKERS] Can ICU be used for a database's default sort order?