Re: Compressed TOAST Slicing - Mailing list pgsql-hackers

From Rafia Sabih
Subject Re: Compressed TOAST Slicing
Date
Msg-id CAOGQiiONHzXS3_32SV1uUQVV3ArTTLpCOxoqd_mjwvbxGs4UeQ@mail.gmail.com
Whole thread Raw
In response to Re: Compressed TOAST Slicing  (Paul Ramsey <pramsey@cleverelephant.ca>)
Responses Re: Compressed TOAST Slicing
List pgsql-hackers
On Fri, Nov 2, 2018 at 11:55 PM Paul Ramsey <pramsey@cleverelephant.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/


pgsql-hackers by date:

Previous
From: Andrey Borodin
Date:
Subject: Re: [HACKERS] Can ICU be used for a database's default sort order?
Next
From: Pavel Stehule
Date:
Subject: Re: [proposal] Add an option for returning SQLSTATE in psql error message